diff options
author | David Bordoley <bordoley@msu.edu> | 2003-03-25 04:08:08 +0800 |
---|---|---|
committer | Dave Bordoley <Bordoley@src.gnome.org> | 2003-03-25 04:08:08 +0800 |
commit | 53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a (patch) | |
tree | b4192302efea2200304e148e7ae8345c3dea01da /src/bookmarks | |
parent | 63b600e23ba36103cc5d28b2314c2d885577bc56 (diff) | |
download | gsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.tar.gz gsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.tar.zst gsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.zip |
New epiphany-bookmark-page stock image. I'm not at all attached to this
2003-03-24 David Bordoley <bordoley@msu.edu>
* data/art/epiphany-bookmark-page.png: (New file):
* data/art/Makefile.am:
* lib/ephy-stock-icons.c:
* lib/ephy-stock-icons.h:
New epiphany-bookmark-page stock image. I'm not at all attached to this icon,
if you can make a better one, please do :)
* data/glade/epiphany.glade:
Change button ordering to [clear][cancel][jump to].
* embed/find-dialog.c:
Use GTK_STOCK_FIND for the window border icon.
* embed/print-dialog.c:
Use GTK_STOCK_PRINT for the window border icon.
* src/bookmarks/ephy-new-bookmark.c:
Use EPHY_STOCK_BOOKMARK_PAGE for the window icon.
s/add bookmark/new bookmark for the window title.
* src/bookmarks/ephy-bookmark-properties.c: (set_window_icon),
(update_window_title):
New functions. Dynamically set the property window title base on the
bookmark title. Use the favicon icon if available for the window icon, otherwise use
GTK_STOCK_PROPERTIES.
* src/window-commands.c:
Use GNOME_STOCK_ABOUT for the about window icon.
* src/prefs-dialog.c:
USE GTK_STOCK_PREFERENCES for the window icon.
* src/history-dialog.c:
Use epiphany-history.png for the window border icon.
* src/ephy-window.c:
Use EPHY_STOCK_BOOKMARK_PAGE for the boomark page/link menu items.
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/ephy-bookmark-properties.c | 52 | ||||
-rw-r--r-- | src/bookmarks/ephy-new-bookmark.c | 11 |
2 files changed, 59 insertions, 4 deletions
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c index 1c15bb464..4b70b2e6b 100644 --- a/src/bookmarks/ephy-bookmark-properties.c +++ b/src/bookmarks/ephy-bookmark-properties.c @@ -20,6 +20,7 @@ #include "ephy-bookmark-properties.h" #include "ephy-topics-selector.h" #include "ephy-debug.h" +#include "ephy-shell.h" #include <gtk/gtkstock.h> #include <gtk/gtkentry.h> @@ -217,9 +218,24 @@ update_entry (EphyBookmarkProperties *props, GtkWidget *entry, guint prop) } static void +update_window_title(EphyBookmarkProperties *editor) +{ + char *title; + const char *tmp; + + tmp = ephy_node_get_property_string (editor->priv->bookmark, + EPHY_NODE_BMK_PROP_TITLE); + title = g_strdup_printf (_("%s Properties"), tmp); + gtk_window_set_title (GTK_WINDOW (editor), title); + g_free (title); +} + + +static void title_entry_changed_cb (GtkWidget *entry, EphyBookmarkProperties *props) { update_entry (props, entry, EPHY_NODE_BMK_PROP_TITLE); + update_window_title(props); } static void @@ -229,6 +245,36 @@ location_entry_changed_cb (GtkWidget *entry, EphyBookmarkProperties *props) } static void +set_window_icon (EphyBookmarkProperties *editor) +{ + EphyFaviconCache *cache; + const char *icon_location; + GdkPixbuf *icon = NULL; + + cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)); + icon_location = ephy_node_get_property_string + (editor->priv->bookmark, EPHY_NODE_BMK_PROP_ICON); + + LOG ("Get favicon for %s", icon_location ? icon_location : "None") + + if (icon_location) + { + icon = ephy_favicon_cache_get (cache, icon_location); + } + + else + { + icon = gtk_widget_render_icon (GTK_WIDGET (editor), + GTK_STOCK_PROPERTIES, + GTK_ICON_SIZE_MENU, + NULL); + } + + gtk_window_set_icon (GTK_WINDOW (editor), icon); + g_object_unref (icon); +} + +static void build_ui (EphyBookmarkProperties *editor) { GtkWidget *table, *label, *entry, *topics_selector; @@ -239,9 +285,9 @@ build_ui (EphyBookmarkProperties *editor) "response", G_CALLBACK (bookmark_properties_response_cb), editor); - - gtk_window_set_title (GTK_WINDOW (editor), - _("Bookmark properties")); + + update_window_title (editor); + set_window_icon (editor); gtk_dialog_set_has_separator (GTK_DIALOG (editor), FALSE); gtk_container_set_border_width (GTK_CONTAINER (editor), 6); diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c index 7edf24d6c..ac5c68c3f 100644 --- a/src/bookmarks/ephy-new-bookmark.c +++ b/src/bookmarks/ephy-new-bookmark.c @@ -29,6 +29,7 @@ #include "ephy-new-bookmark.h" #include "ephy-topics-selector.h" #include "ephy-debug.h" +#include "ephy-stock-icons.h" static void ephy_new_bookmark_class_init (EphyNewBookmarkClass *klass); static void ephy_new_bookmark_init (EphyNewBookmark *editor); @@ -228,8 +229,16 @@ build_editing_table (EphyNewBookmark *editor) static void ephy_new_bookmark_construct (EphyNewBookmark *editor) { + GdkPixbuf *icon; + gtk_window_set_title (GTK_WINDOW (editor), - _("Add bookmark")); + _("New Bookmark")); + icon = gtk_widget_render_icon (GTK_WIDGET (editor), + EPHY_STOCK_BOOKMARK_PAGE, + GTK_ICON_SIZE_MENU, + NULL); + gtk_window_set_icon (GTK_WINDOW (editor), icon); + g_object_unref(icon); gtk_dialog_set_has_separator (GTK_DIALOG (editor), FALSE); gtk_container_set_border_width (GTK_CONTAINER (editor), 6); |