From ae57c2b4273588704f9065b1cd0d445a8cd4a48f Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 24 Jul 2005 21:37:01 +0000 Subject: Remove code to get the printer list, and fix a compile warning. 2005-07-24 Christian Persch * 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. --- ChangeLog | 12 +++++++++ embed/ephy-embed-single.c | 7 ------ embed/ephy-embed-single.h | 1 - embed/mozilla/EphyUtils.cpp | 2 ++ embed/mozilla/MozillaPrivate.cpp | 45 +--------------------------------- embed/mozilla/MozillaPrivate.h | 1 - embed/mozilla/mozilla-embed-single.cpp | 7 ------ 7 files changed, 15 insertions(+), 60 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c18db060..adb2be8c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-07-24 Christian Persch + + * 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. + 2005-07-24 Christian Persch * src/bookmarks/ephy-bookmark-action.c: (connect_proxy): diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index e80a6bfdb..8fb7141ed 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -304,10 +304,3 @@ ephy_embed_single_open_window (EphyEmbedSingle *single, EphyEmbedSingleIface *iface = EPHY_EMBED_SINGLE_GET_IFACE (single); return iface->open_window (single, parent, address, name, features); } - -GList * -ephy_embed_single_get_printer_list (EphyEmbedSingle *single) -{ - EphyEmbedSingleIface *iface = EPHY_EMBED_SINGLE_GET_IFACE (single); - return iface->get_printer_list (single); -} diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h index 63d065666..f99741bb2 100644 --- a/embed/ephy-embed-single.h +++ b/embed/ephy-embed-single.h @@ -93,7 +93,6 @@ struct _EphyEmbedSingleIface gboolean (* get_offline_mode) (EphyEmbedSingle *single); GList * (* get_font_list) (EphyEmbedSingle *shell, const char *langGroup); - GList * (* get_printer_list) (EphyEmbedSingle *shell); }; GType ephy_embed_single_get_type (void); 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 -#include #include -#include -#include +#include #include #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 pss = - do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv); - NS_ENSURE_SUCCESS(rv, nsnull); - - nsCOMPtr po = do_QueryInterface(pss, &rv); - NS_ENSURE_SUCCESS(rv, nsnull); - - nsCOMPtr 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 i; - rv = avPrinters->GetNext(getter_AddRefs(i)); - NS_ENSURE_SUCCESS(rv, nsnull); - - nsCOMPtr 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 @@ -672,12 +672,6 @@ impl_get_offline_mode (EphyEmbedSingle *shell) return isOffline; } -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 -- cgit v1.2.3