aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Bordoley <bordoley@msu.edu>2003-03-25 04:08:08 +0800
committerDave Bordoley <Bordoley@src.gnome.org>2003-03-25 04:08:08 +0800
commit53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a (patch)
treeb4192302efea2200304e148e7ae8345c3dea01da /src
parent63b600e23ba36103cc5d28b2314c2d885577bc56 (diff)
downloadgsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.tar
gsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.tar.gz
gsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.tar.bz2
gsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.tar.lz
gsoc2013-epiphany-53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a.tar.xz
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')
-rw-r--r--src/bookmarks/ephy-bookmark-properties.c52
-rw-r--r--src/bookmarks/ephy-new-bookmark.c11
-rw-r--r--src/ephy-window.c4
-rwxr-xr-xsrc/history-dialog.c12
-rw-r--r--src/prefs-dialog.c8
-rw-r--r--src/window-commands.c10
6 files changed, 90 insertions, 7 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);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index c2b6e9961..649c9ded3 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -81,7 +81,7 @@ static EggActionGroupEntry ephy_menu_entries [] = {
{ "FileSendTo", N_("S_end To..."), EPHY_STOCK_SEND_LINK, NULL,
N_("Send a link of the current page"),
G_CALLBACK (window_cmd_file_send_to), NULL },
- { "FileBookmarkPage", N_("Boo_kmark Page..."), NULL, "<control>D",
+ { "FileBookmarkPage", N_("Boo_kmark Page..."), EPHY_STOCK_BOOKMARK_PAGE, "<control>D",
N_("Add a bookmark for the current page"),
G_CALLBACK (window_cmd_file_bookmark_page), NULL },
{ "FileCloseWindow", N_("_Close"), GTK_STOCK_CLOSE, "<control>W",
@@ -225,7 +225,7 @@ static EggActionGroupEntry ephy_popups_entries [] = {
NULL, G_CALLBACK (popup_cmd_link_in_new_tab), NULL },
{ "DownloadLink", N_("_Download Link"), GTK_STOCK_SAVE, NULL,
NULL, G_CALLBACK (popup_cmd_download_link), NULL },
- { "BookmarkLink", N_("_Bookmark Link..."), NULL, NULL,
+ { "BookmarkLink", N_("_Bookmark Link..."), EPHY_STOCK_BOOKMARK_PAGE, NULL,
NULL, G_CALLBACK (popup_cmd_bookmark_link), NULL },
{ "CopyLinkLocation", N_("_Copy Link Location"), NULL, NULL,
NULL, G_CALLBACK (popup_cmd_copy_link_location), NULL },
diff --git a/src/history-dialog.c b/src/history-dialog.c
index 70710252a..6756f14c3 100755
--- a/src/history-dialog.c
+++ b/src/history-dialog.c
@@ -19,6 +19,7 @@
#include "history-dialog.h"
#include "ephy-shell.h"
#include "ephy-embed-shell.h"
+#include "ephy-file-helpers.h"
#include "ephy-string.h"
#include "ephy-gui.h"
#include "ephy-dnd.h"
@@ -69,6 +70,7 @@ static GObjectClass *parent_class = NULL;
struct HistoryDialogPrivate
{
+ GtkWidget *window;
EphyHistory *gh;
EphyNode *root;
EphyNode *pages;
@@ -91,6 +93,7 @@ enum
enum
{
+ PROP_WINDOW,
PROP_TREEVIEW,
PROP_WORD,
PROP_TIME,
@@ -100,6 +103,7 @@ enum
static const
EphyDialogProperty properties [] =
{
+ { PROP_WINDOW, "history_dialog", NULL, PT_NORMAL, NULL },
{ PROP_TREEVIEW, "history_treeview", NULL, PT_NORMAL, NULL },
{ PROP_WORD, "history_entry", CONF_HISTORY_SEARCH_TEXT, PT_NORMAL, NULL },
{ PROP_TIME, "history_time_optionmenu", CONF_HISTORY_SEARCH_TIME, PT_NORMAL, NULL },
@@ -402,6 +406,8 @@ static void
history_dialog_set_embedded (HistoryDialog *dialog,
gboolean embedded)
{
+ const char *icon_path;
+
dialog->priv->embedded = embedded;
ephy_dialog_construct (EPHY_DIALOG (dialog),
@@ -410,11 +416,15 @@ history_dialog_set_embedded (HistoryDialog *dialog,
embedded ?
"history_dock_box" :
"history_dialog");
+ dialog->priv->window = ephy_dialog_get_control (EPHY_DIALOG (dialog), PROP_WINDOW);
dialog->priv->go_button = ephy_dialog_get_control (EPHY_DIALOG (dialog), PROP_GO_BUTTON);
-
dialog->priv->treeview = GTK_TREE_VIEW (
ephy_dialog_get_control (EPHY_DIALOG(dialog),
PROP_TREEVIEW));
+
+ icon_path = ephy_file ("epiphany-history.png");
+ gtk_window_set_icon_from_file (GTK_WINDOW(dialog->priv->window), icon_path, NULL);
+
history_dialog_setup_view (dialog);
history_dialog_setup_filter (dialog);
}
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index c94998d60..94ff74c8c 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -301,6 +301,7 @@ prefs_build_notebook (PrefsDialog *pd)
static void
prefs_dialog_init (PrefsDialog *pd)
{
+ GdkPixbuf *icon;
pd->priv = g_new0 (PrefsDialogPrivate, 1);
gtk_window_set_title (GTK_WINDOW(pd), _("Preferences"));
@@ -308,6 +309,13 @@ prefs_dialog_init (PrefsDialog *pd)
ephy_state_add_window (GTK_WIDGET(pd),
"prefs_dialog", -1, -1);
+
+ icon = gtk_widget_render_icon (GTK_WIDGET(pd),
+ GTK_STOCK_PREFERENCES,
+ GTK_ICON_SIZE_MENU,
+ "prefs_dialog");
+ gtk_window_set_icon (GTK_WINDOW(pd), icon);
+ g_object_unref(icon);
prefs_build_notebook (pd);
}
diff --git a/src/window-commands.c b/src/window-commands.c
index 3da431353..2891160a6 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -38,6 +38,7 @@
#include <libgnomevfs/gnome-vfs-utils.h>
#include <bonobo/bonobo-i18n.h>
#include <libgnomeui/gnome-about.h>
+#include <libgnomeui/gnome-stock-icons.h>
#include <libgnome/gnome-help.h>
#include <gtk/gtkmessagedialog.h>
#include <gtk/gtkeditable.h>
@@ -673,6 +674,7 @@ window_cmd_help_about (EggAction *action,
EphyWindow *window)
{
static GtkWidget *about = NULL;
+ GdkPixbuf *icon;
static gchar *authors[] = {
"Marco Pesenti Gritti <mpeseng@tin.it>",
@@ -704,6 +706,14 @@ window_cmd_help_about (EggAction *action,
gtk_window_set_transient_for (GTK_WINDOW (about),
GTK_WINDOW (window));
+
+ icon = gtk_widget_render_icon (about,
+ GNOME_STOCK_ABOUT,
+ GTK_ICON_SIZE_MENU,
+ NULL);
+ gtk_window_set_icon (GTK_WINDOW (about), icon);
+ g_object_unref(icon);
+
g_object_add_weak_pointer (G_OBJECT (about), (gpointer *)&about);
gtk_widget_show (about);
}