diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-10-11 03:24:33 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-11 03:24:33 +0800 |
commit | 44592d8463a27f756746201136a97e2d47dcc4f8 (patch) | |
tree | 05c53587966742bd4be74dc3217904ac026ff120 | |
parent | 63c8906e7436c3910348a6549dfd8d6199772624 (diff) | |
download | gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar.gz gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar.zst gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.zip |
Reenable deprecated api where necessary, fixup some header inclusions.
2003-10-10 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/FilePicker.cpp:
* embed/mozilla/FilePicker.h:
* embed/mozilla/mozilla-embed-single.cpp:
* lib/Makefile.am:
* lib/ephy-dialog.c: (get_pref_type_from_widget),
(prefs_connect_signals), (load_props), (save_props):
* lib/ephy-gui.h:
* lib/widgets/Makefile.am:
* src/Makefile.am:
* src/bookmarks/Makefile.am:
* src/bookmarks/ephy-topic-action.c:
* src/ephy-history-window.c:
Reenable deprecated api where necessary, fixup some
header inclusions.
Remove unused color picker control in ephy-dialog.
Remove unused file types optionmenu in Filepicker.
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | embed/mozilla/FilePicker.cpp | 48 | ||||
-rw-r--r-- | embed/mozilla/FilePicker.h | 7 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 7 | ||||
-rw-r--r-- | lib/Makefile.am | 1 | ||||
-rw-r--r-- | lib/ephy-dialog.c | 68 | ||||
-rw-r--r-- | lib/ephy-gui.h | 3 | ||||
-rw-r--r-- | lib/widgets/Makefile.am | 1 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/bookmarks/Makefile.am | 1 | ||||
-rw-r--r-- | src/bookmarks/ephy-topic-action.c | 1 | ||||
-rw-r--r-- | src/ephy-history-window.c | 1 |
12 files changed, 27 insertions, 132 deletions
@@ -1,3 +1,23 @@ +2003-10-10 Marco Pesenti Gritti <marco@gnome.org> + + * embed/mozilla/FilePicker.cpp: + * embed/mozilla/FilePicker.h: + * embed/mozilla/mozilla-embed-single.cpp: + * lib/Makefile.am: + * lib/ephy-dialog.c: (get_pref_type_from_widget), + (prefs_connect_signals), (load_props), (save_props): + * lib/ephy-gui.h: + * lib/widgets/Makefile.am: + * src/Makefile.am: + * src/bookmarks/Makefile.am: + * src/bookmarks/ephy-topic-action.c: + * src/ephy-history-window.c: + + Reenable deprecated api where necessary, fixup some + header inclusions. + Remove unused color picker control in ephy-dialog. + Remove unused file types optionmenu in Filepicker. + 2003-10-07 Marco Pesenti Gritti <marco@gnome.org> * lib/widgets/ephy-tree-model-node.c: (root_child_removed_cb), diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp index 537a66d7b..42c17be06 100644 --- a/embed/mozilla/FilePicker.cpp +++ b/embed/mozilla/FilePicker.cpp @@ -79,8 +79,7 @@ /* Implementation file */ NS_IMPL_ISUPPORTS1(GFilePicker, nsIFilePicker) -GFilePicker::GFilePicker(FileFormat *aFileFormats) : - mFileFormats(aFileFormats) +GFilePicker::GFilePicker() { NS_INIT_ISUPPORTS(); @@ -247,33 +246,6 @@ NS_IMETHODIMP GFilePicker::Show(PRInt16 *_retval) gtk_window_set_transient_for(GTK_WINDOW(mFileSelector), GTK_WINDOW(mParentWidget)); - if (mFileFormats) - { - mFormatChooser = gtk_option_menu_new(); - GtkMenu *options = GTK_MENU(gtk_menu_new()); - - FileFormat *current = mFileFormats; - while (current->description != NULL) - { - /* FIXME: the label should include the extensions too */ - gchar *label = current->description; - GtkWidget *item = gtk_menu_item_new_with_label(label); - gtk_widget_show(item); - gtk_menu_shell_append(GTK_MENU_SHELL(options), item); - current++; - } - gtk_option_menu_set_menu(GTK_OPTION_MENU(mFormatChooser), - GTK_WIDGET(options)); - gtk_widget_show(mFormatChooser); - gtk_box_pack_start(GTK_BOX(GTK_FILE_SELECTION (mFileSelector)->action_area), - mFormatChooser, - FALSE, TRUE, 0); - } - else - { - mFormatChooser = NULL; - } - if (mMode == nsIFilePicker::modeGetFolder) { gtk_widget_set_sensitive(GTK_FILE_SELECTION(mFileSelector) @@ -432,24 +404,6 @@ NS_METHOD GFilePicker::HandleFilePickerResult() mFile->GetNativeLeafName(mDefaultString); } - if (mFormatChooser) - { - GtkWidget *menu = gtk_option_menu_get_menu - (GTK_OPTION_MENU(mFormatChooser)); - GtkWidget *selected = gtk_menu_get_active (GTK_MENU(menu)); - - gint i(0); - for (GList *iterator = GTK_MENU_SHELL(menu)->children ; - iterator ; iterator = iterator->next, i++) - { - if (iterator->data == selected) - { - mSelectedFileFormat = i; - break; - } - } - } - return NS_OK; } diff --git a/embed/mozilla/FilePicker.h b/embed/mozilla/FilePicker.h index 0b4c98af1..430e8d854 100644 --- a/embed/mozilla/FilePicker.h +++ b/embed/mozilla/FilePicker.h @@ -54,7 +54,7 @@ class GFilePicker : public nsIFilePicker returnCancel = nsIFilePicker::returnCancel, returnReplace = nsIFilePicker::returnReplace }; - GFilePicker(FileFormat *aFileFormats = nsnull); + GFilePicker(); virtual ~GFilePicker(); /* additional members */ @@ -62,8 +62,6 @@ class GFilePicker : public nsIFilePicker const char *aTitle, PRInt16 aMode); NS_METHOD SanityCheck(PRBool *retIsSane); - PRInt16 mSelectedFileFormat; - private: NS_METHOD HandleFilePickerResult(); NS_METHOD ValidateFilePickerResult(PRInt16 *retval); @@ -81,9 +79,6 @@ class GFilePicker : public nsIFilePicker GtkWidget *mParentWidget; GtkWidget *mFileSelector; - GtkWidget *mFormatChooser; - - FileFormat *mFileFormats; }; #endif diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 7e90f4065..6491ce33d 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -1016,7 +1016,7 @@ impl_show_file_picker (EphyEmbedSingle *shell, char *expanded_directory = NULL; gresult result; - GFilePicker *filePicker = new GFilePicker (file_formats); + GFilePicker *filePicker = new GFilePicker (); if (directory != NULL) { @@ -1047,11 +1047,6 @@ impl_show_file_picker (EphyEmbedSingle *shell, PRInt16 retval; filePicker->Show (&retval); - if (ret_file_format != NULL) - { - *ret_file_format = filePicker->mSelectedFileFormat; - } - nsCOMPtr<nsILocalFile> local_file; filePicker->GetFile (getter_AddRefs(local_file)); nsCAutoString tempFullPathStr; diff --git a/lib/Makefile.am b/lib/Makefile.am index f70c0c170..bc0c0901c 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -6,7 +6,6 @@ INCLUDES = \ -DSHARE_DIR=\"$(pkgdatadir)\" \ -DG_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ - -DGTK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGNOME_DISABLE_DEPRECATED diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c index 973aca87a..721cfa4cf 100644 --- a/lib/ephy-dialog.c +++ b/lib/ephy-dialog.c @@ -24,6 +24,7 @@ #include "ephy-gui.h" #include "eel-gconf-extensions.h" +#include <stdlib.h> #include <string.h> #include <gtk/gtktogglebutton.h> @@ -80,7 +81,6 @@ typedef enum PT_TOGGLEBUTTON, PT_RADIOBUTTON, PT_SPINBUTTON, - PT_COLOR, PT_OPTIONMENU, PT_ENTRY, PT_UNKNOWN @@ -335,23 +335,6 @@ set_config_from_togglebutton (GtkWidget *togglebutton, const char *config_name) } static void -set_config_from_color (GtkWidget *colorpicker, const char *config_name) -{ - guint8 r, g, b, a; - gchar color_string[9]; - - /* get color values from color picker */ - gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (colorpicker), - &r, &g, &b, &a); - - /* write into string (bounded size) */ - g_snprintf (color_string, 9, "#%02X%02X%02X", r, g, b); - - /* set the configuration value */ - eel_gconf_set_string (config_name, color_string); -} - -static void set_editable_from_config (GtkWidget *editable, const char *config_name) { GConfValue *gcvalue = eel_gconf_get_value (config_name); @@ -502,26 +485,6 @@ set_togglebutton_from_config (GtkWidget *togglebutton, const char *config_name) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (togglebutton), value); } -static void -set_color_from_config (GtkWidget *colorpicker, const char *config_name) -{ - gchar *color_string; - guint r, g, b; - - /* get the string from config */ - color_string = eel_gconf_get_string (config_name); - - if (color_string) - { - /* parse it and setup the color picker */ - sscanf (color_string, "#%2X%2X%2X", &r, &g, &b); - gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (colorpicker), - r, g, b, 0); - /* free the string */ - g_free (color_string); - } -} - static PrefType get_pref_type_from_widget (GtkWidget *widget) { @@ -545,10 +508,6 @@ get_pref_type_from_widget (GtkWidget *widget) { return PT_ENTRY; } - else if (GNOME_IS_COLOR_PICKER (widget)) - { - return PT_COLOR; - } return PT_UNKNOWN; } @@ -705,16 +664,6 @@ prefs_spinbutton_changed_cb (GtkWidget *widget, PropertyInfo *pi) } static void -prefs_color_changed_cb (GtkWidget *widget, guint r, guint g, - guint b, guint a, const PropertyInfo *pi) -{ - if (pi->type == PT_AUTOAPPLY) - { - set_config_from_color (widget, pi->pref); - } -} - -static void prefs_entry_changed_cb (GtkWidget *widget, PropertyInfo *pi) { if (pi->type == PT_AUTOAPPLY) @@ -779,11 +728,6 @@ prefs_connect_signals (EphyDialog *dialog) G_CALLBACK(prefs_spinbutton_changed_cb), (gpointer)info); break; - case PT_COLOR: - g_signal_connect (G_OBJECT (info->widget), "color_set", - G_CALLBACK(prefs_color_changed_cb), - (gpointer)info); - break; case PT_OPTIONMENU: g_signal_connect (G_OBJECT (info->widget), "changed", @@ -875,11 +819,6 @@ load_props (PropertyInfo *props) props[i].pref, props[i].string_enum); } - else if (GNOME_IS_COLOR_PICKER(props[i].widget)) - { - set_color_from_config (props[i].widget, - props[i].pref); - } } } @@ -922,11 +861,6 @@ save_props (PropertyInfo *props) props[i].pref, props[i].string_enum); } - else if (GNOME_IS_COLOR_PICKER(props[i].widget)) - { - set_config_from_color (props[i].widget, - props[i].pref); - } } } diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h index 17063388d..203eba975 100644 --- a/lib/ephy-gui.h +++ b/lib/ephy-gui.h @@ -19,10 +19,9 @@ #ifndef EPHY_GUI_H #define EPHY_GUI_H -/* system includes */ #include <gtk/gtk.h> #include <gdk-pixbuf/gdk-pixbuf.h> -#include <gnome.h> +#include <gdk/gdkkeysyms.h> G_BEGIN_DECLS diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am index e89a98023..7331079a5 100644 --- a/lib/widgets/Makefile.am +++ b/lib/widgets/Makefile.am @@ -6,7 +6,6 @@ INCLUDES = \ -DSHARE_DIR=\"$(pkgdatadir)\" \ -DG_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ - -DGTK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGNOME_DISABLE_DEPRECATED diff --git a/src/Makefile.am b/src/Makefile.am index 268d6e34f..38c1a5195 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,6 @@ INCLUDES = \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ -DG_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ - -DGTK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGNOME_DISABLE_DEPRECATED diff --git a/src/bookmarks/Makefile.am b/src/bookmarks/Makefile.am index 5b1865d31..9a051c521 100644 --- a/src/bookmarks/Makefile.am +++ b/src/bookmarks/Makefile.am @@ -11,7 +11,6 @@ INCLUDES = \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ -DG_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ - -DGTK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGNOME_DISABLE_DEPRECATED diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c index 9d2d049a0..3459a6c1f 100644 --- a/src/bookmarks/ephy-topic-action.c +++ b/src/bookmarks/ephy-topic-action.c @@ -23,6 +23,7 @@ #endif #include <gtk/gtktoolitem.h> +#include <bonobo/bonobo-i18n.h> #include "ephy-topic-action.h" #include "ephy-node-common.h" diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 5406e5895..97b889197 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -35,6 +35,7 @@ #include <bonobo/bonobo-i18n.h> #include <libgnomeui/gnome-stock-icons.h> #include <string.h> +#include <time.h> #include "ephy-node-view.h" #include "ephy-window.h" |