diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | lib/ephy-file-chooser.c | 2 | ||||
-rw-r--r-- | lib/ephy-gui.c | 43 | ||||
-rw-r--r-- | lib/ephy-gui.h | 2 | ||||
-rw-r--r-- | src/bookmarks/ephy-new-bookmark.c | 3 | ||||
-rw-r--r-- | src/ephy-history-window.c | 1 | ||||
-rw-r--r-- | src/ephy-window.c | 3 | ||||
-rwxr-xr-x | src/pdm-dialog.c | 6 | ||||
-rw-r--r-- | src/window-commands.c | 2 |
9 files changed, 74 insertions, 2 deletions
@@ -1,3 +1,17 @@ +2004-10-05 Christian Persch <chpe@cvs.gnome.org> + + * lib/ephy-file-chooser.c: (ephy_file_chooser_constructor): + * lib/ephy-gui.c: (ephy_gui_confirm_overwrite_file), + (ephy_gui_is_middle_click), (ephy_gui_set_default_window_icon): + * lib/ephy-gui.h: + * src/bookmarks/ephy-new-bookmark.c: (duplicate_dialog_construct): + * src/ephy-history-window.c: (ephy_history_window_construct): + * src/ephy-window.c: (confirm_close_with_modified_forms): + * src/pdm-dialog.c: (pdm_dialog_init): + * src/window-commands.c: (window_cmd_edit_toolbar): + + Set window icon to default ephy icon. + 2004-10-02 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/MozDownload.cpp: diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c index 2494c9e38..d7aa393a2 100644 --- a/lib/ephy-file-chooser.c +++ b/lib/ephy-file-chooser.c @@ -119,6 +119,8 @@ ephy_file_chooser_constructor (GType type, (GTK_FILE_CHOOSER (object), downloads_dir, NULL); g_free (downloads_dir); + ephy_gui_set_default_window_icon (GTK_WINDOW (object)); + return object; } diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c index 88460dc78..5cf8ea5bc 100644 --- a/lib/ephy-gui.c +++ b/lib/ephy-gui.c @@ -36,6 +36,8 @@ #include <gtk/gtklabel.h> #include <gtk/gtkstock.h> #include <gtk/gtkmain.h> +#include <gtk/gtkwindow.h> +#include <gtk/gtkversion.h> /* Styles for tab labels */ GtkStyle *loading_text_style = NULL; @@ -112,6 +114,8 @@ ephy_gui_confirm_overwrite_file (GtkWidget *parent, const char *filename) GTK_RESPONSE_CANCEL, _("_Overwrite"), GTK_RESPONSE_ACCEPT, NULL); + ephy_gui_set_default_window_icon (GTK_WINDOW (dialog)); + hbox = gtk_hbox_new (FALSE, 6); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 12); image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); @@ -246,3 +250,42 @@ ephy_gui_is_middle_click (void) return new_tab; } + +void +ephy_gui_set_default_window_icon (GtkWindow *window) +{ +#if GTK_CHECK_VERSION (2, 5, 4) + gtk_window_set_icon_name (window, "web-browser"); +#else + const char *icon_path; + GdkPixbuf *icon = NULL; + GtkIconTheme *icon_theme; + GtkIconInfo *icon_info; + + icon_theme = gtk_icon_theme_get_default (); + icon_info = gtk_icon_theme_lookup_icon (icon_theme, "web-browser", -1, 0); + + if (icon_info != NULL) + { + icon_path = gtk_icon_info_get_filename (icon_info); + + if (icon_path != NULL) + { + icon = gdk_pixbuf_new_from_file (icon_path, NULL); + } + + gtk_icon_info_free (icon_info); + } + else + { + g_warning ("Web browser gnome icon not found"); + } + + gtk_window_set_icon (GTK_WINDOW (about), icon); + + if (icon != NULL) + { + g_object_unref (icon); + } +#endif +} diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h index 8c3846d10..b6ab7a048 100644 --- a/lib/ephy-gui.h +++ b/lib/ephy-gui.h @@ -49,6 +49,8 @@ void ephy_gui_help (GtkWindow *parent, const char *file_name, const char *link_id); +void ephy_gui_set_default_window_icon (GtkWindow *window); + G_END_DECLS #endif diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c index 5897a23d1..d47ac6d5c 100644 --- a/src/bookmarks/ephy-new-bookmark.c +++ b/src/bookmarks/ephy-new-bookmark.c @@ -325,7 +325,8 @@ duplicate_dialog_construct (GtkWindow *parent, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - + ephy_gui_set_default_window_icon (GTK_WINDOW (dialog)); + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14); diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index b045d48ab..fc0b5b163 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -1206,6 +1206,7 @@ ephy_history_window_construct (EphyHistoryWindow *editor) GTK_ICON_SIZE_MENU, NULL); gtk_window_set_icon (GTK_WINDOW(editor), icon); + g_object_unref (icon); g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), NULL); diff --git a/src/ephy-window.c b/src/ephy-window.c index 3410c8e70..74c33ef1f 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -52,6 +52,7 @@ #include "ephy-stock-icons.h" #include "ephy-extension.h" #include "ephy-favicon-cache.h" +#include "ephy-gui.h" #include <string.h> #include <glib/gi18n.h> @@ -661,6 +662,8 @@ confirm_close_with_modified_forms (EphyWindow *window) GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("Close _Document"), GTK_RESPONSE_OK, NULL); + + ephy_gui_set_default_window_icon (GTK_WINDOW (dialog)); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index 68f054479..893412a7f 100755 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -804,7 +804,7 @@ static void pdm_dialog_init (PdmDialog *dialog) { PdmActionInfo *cookies, *passwords; - GtkWidget *notebook; + GtkWidget *notebook, *window; dialog->priv = EPHY_PDM_DIALOG_GET_PRIVATE (dialog); @@ -817,6 +817,10 @@ pdm_dialog_init (PdmDialog *dialog) "pdm_dialog", NULL); + window = ephy_dialog_get_control (EPHY_DIALOG (dialog), + properties[PROP_WINDOW].id); + ephy_gui_set_default_window_icon (GTK_WINDOW (window)); + /** * Group all Properties and Remove buttons in the same size group to * avoid the little jerk you get otherwise when switching pages because diff --git a/src/window-commands.c b/src/window-commands.c index 50c263c0e..7d22c11c4 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -882,6 +882,8 @@ window_cmd_edit_toolbar (GtkAction *action, gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window)); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); + ephy_gui_set_default_window_icon (GTK_WINDOW (dialog)); + editor = egg_toolbar_editor_new (GTK_UI_MANAGER (window->ui_merge), model); egg_toolbar_editor_load_actions (EGG_TOOLBAR_EDITOR (editor), ephy_file ("epiphany-toolbar.xml")); |