aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-25 05:37:01 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-25 05:37:01 +0800
commitae57c2b4273588704f9065b1cd0d445a8cd4a48f (patch)
treeeb78f9b7266623e044d603f6a4d6ddce0ea96297 /embed/mozilla
parentdadad030dc244a53b6e275cb5b022ed676eaf51c (diff)
downloadgsoc2013-epiphany-ae57c2b4273588704f9065b1cd0d445a8cd4a48f.tar
gsoc2013-epiphany-ae57c2b4273588704f9065b1cd0d445a8cd4a48f.tar.gz
gsoc2013-epiphany-ae57c2b4273588704f9065b1cd0d445a8cd4a48f.tar.bz2
gsoc2013-epiphany-ae57c2b4273588704f9065b1cd0d445a8cd4a48f.tar.lz
gsoc2013-epiphany-ae57c2b4273588704f9065b1cd0d445a8cd4a48f.tar.xz
gsoc2013-epiphany-ae57c2b4273588704f9065b1cd0d445a8cd4a48f.tar.zst
gsoc2013-epiphany-ae57c2b4273588704f9065b1cd0d445a8cd4a48f.zip
Remove code to get the printer list, and fix a compile warning.
2005-07-24 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed-single.c: (ephy_embed_single_open_window): * embed/ephy-embed-single.h: * embed/mozilla/EphyUtils.cpp: * embed/mozilla/MozillaPrivate.cpp: * embed/mozilla/MozillaPrivate.h: * embed/mozilla/mozilla-embed-single.cpp: Remove code to get the printer list, and fix a compile warning.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyUtils.cpp2
-rw-r--r--embed/mozilla/MozillaPrivate.cpp45
-rw-r--r--embed/mozilla/MozillaPrivate.h1
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp7
4 files changed, 3 insertions, 52 deletions
diff --git a/embed/mozilla/EphyUtils.cpp b/embed/mozilla/EphyUtils.cpp
index 55a392b44..66ac7b4f3 100644
--- a/embed/mozilla/EphyUtils.cpp
+++ b/embed/mozilla/EphyUtils.cpp
@@ -138,6 +138,8 @@ EphyUtils::CollatePrintSettings (EmbedPrintInfo *info,
switch (info->range)
{
+ case GNOME_PRINT_RANGE_CURRENT:
+ case GNOME_PRINT_RANGE_SELECTION_UNSENSITIVE:
case GNOME_PRINT_RANGE_ALL:
options->SetPrintRange (nsIPrintSettings::kRangeAllPages);
break;
diff --git a/embed/mozilla/MozillaPrivate.cpp b/embed/mozilla/MozillaPrivate.cpp
index 23e8a391b..a3dc3483f 100644
--- a/embed/mozilla/MozillaPrivate.cpp
+++ b/embed/mozilla/MozillaPrivate.cpp
@@ -24,11 +24,8 @@
#include "MozillaPrivate.h"
-#include <nsIPrintSettingsService.h>
-#include <nsIPrintOptions.h>
#include <nsIServiceManager.h>
-#include <nsISimpleEnumerator.h>
-#include <nsISupportsPrimitives.h>
+#include <nsString.h>
#include <nsPromiseFlatString.h>
#include "ephy-debug.h"
@@ -37,43 +34,3 @@
* example) in this file. Note that you cannot use embed strings here,
* the header inclusions will conflict.
*/
-
-GList *
-MozillaPrivate::GetPrinterList ()
-{
- GList *printers = NULL;
- nsresult rv = NS_OK;
-
- nsCOMPtr<nsIPrintSettingsService> pss =
- do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv);
- NS_ENSURE_SUCCESS(rv, nsnull);
-
- nsCOMPtr<nsIPrintOptions> po = do_QueryInterface(pss, &rv);
- NS_ENSURE_SUCCESS(rv, nsnull);
-
- nsCOMPtr<nsISimpleEnumerator> avPrinters;
- rv = po->AvailablePrinters(getter_AddRefs(avPrinters));
- NS_ENSURE_SUCCESS(rv, nsnull);
-
- PRBool more = PR_FALSE;
-
- for (avPrinters->HasMoreElements(&more);
- more == PR_TRUE;
- avPrinters->HasMoreElements(&more))
- {
- nsCOMPtr<nsISupports> i;
- rv = avPrinters->GetNext(getter_AddRefs(i));
- NS_ENSURE_SUCCESS(rv, nsnull);
-
- nsCOMPtr<nsISupportsString> printer = do_QueryInterface(i, &rv);
- NS_ENSURE_SUCCESS(rv, nsnull);
-
- nsAutoString data;
- rv = printer->GetData(data);
- NS_ENSURE_SUCCESS(rv, nsnull);
-
- printers = g_list_prepend (printers, g_strdup (NS_ConvertUCS2toUTF8 (data).get()));
- }
-
- return g_list_reverse (printers);
-}
diff --git a/embed/mozilla/MozillaPrivate.h b/embed/mozilla/MozillaPrivate.h
index 5c7c0a8d6..4ea2fab0f 100644
--- a/embed/mozilla/MozillaPrivate.h
+++ b/embed/mozilla/MozillaPrivate.h
@@ -22,5 +22,4 @@
namespace MozillaPrivate
{
- GList *GetPrinterList ();
}
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 00d06875a..9d90d0626 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -673,12 +673,6 @@ impl_get_offline_mode (EphyEmbedSingle *shell)
}
static GList *
-impl_get_printer_list (EphyEmbedSingle *shell)
-{
- return MozillaPrivate::GetPrinterList ();
-}
-
-static GList *
impl_get_font_list (EphyEmbedSingle *shell,
const char *langGroup)
{
@@ -1035,7 +1029,6 @@ ephy_embed_single_iface_init (EphyEmbedSingleIface *iface)
iface->get_offline_mode = impl_get_offline_mode;
iface->get_font_list = impl_get_font_list;
iface->open_window = impl_open_window;
- iface->get_printer_list = impl_get_printer_list;
}
static void