aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmark-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-12 06:06:26 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-12 06:06:26 +0800
commit45aa254e9c7d745fe0d8aaa1627fced919b0bbdc (patch)
treef3729ebbf884d7ccf69cc60f9e23a244b11127fc /src/bookmarks/ephy-bookmark-action.c
parent0daded02b044566c4b9f8495c762508cbce39a0b (diff)
downloadgsoc2013-epiphany-45aa254e9c7d745fe0d8aaa1627fced919b0bbdc.tar
gsoc2013-epiphany-45aa254e9c7d745fe0d8aaa1627fced919b0bbdc.tar.gz
gsoc2013-epiphany-45aa254e9c7d745fe0d8aaa1627fced919b0bbdc.tar.bz2
gsoc2013-epiphany-45aa254e9c7d745fe0d8aaa1627fced919b0bbdc.tar.lz
gsoc2013-epiphany-45aa254e9c7d745fe0d8aaa1627fced919b0bbdc.tar.xz
gsoc2013-epiphany-45aa254e9c7d745fe0d8aaa1627fced919b0bbdc.tar.zst
gsoc2013-epiphany-45aa254e9c7d745fe0d8aaa1627fced919b0bbdc.zip
Moved bookmark tool item creation to a dedicated tool item. That way we
2003-06-11 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmark-toolitem.h: * src/bookmarks/ephy-bookmark-toolitem.c: * src/bookmarks/ephy-bookmark-action.c: (create_tool_item), (create_menu_item), (ephy_bookmark_action_class_init): Moved bookmark tool item creation to a dedicated tool item. That way we can provide toolbar overflow menu items.
Diffstat (limited to 'src/bookmarks/ephy-bookmark-action.c')
-rw-r--r--src/bookmarks/ephy-bookmark-action.c58
1 files changed, 5 insertions, 53 deletions
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index 4264483d7..50be80fd3 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -24,6 +24,7 @@
#include <libgnomevfs/gnome-vfs-uri.h>
#include "ephy-bookmark-action.h"
+#include "ephy-bookmark-toolitem.h"
#include "ephy-bookmarks.h"
#include "ephy-shell.h"
#include "ephy-string.h"
@@ -89,56 +90,6 @@ ephy_bookmark_action_get_type (void)
return type;
}
-static GtkWidget *
-create_menu_item (EggAction *action)
-{
- GtkWidget *item;
-
- item = gtk_image_menu_item_new ();
-
- return item;
-}
-
-static GtkWidget *
-create_tool_item (EggAction *action)
-{
- GtkWidget *item, *button, *hbox, *label,
- *icon, *entry;
-
- item = (* EGG_ACTION_CLASS (parent_class)->create_tool_item) (action);
-
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox);
- gtk_container_add (GTK_CONTAINER (item), hbox);
-
- button = gtk_button_new ();
- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- gtk_widget_show (button);
- gtk_container_add (GTK_CONTAINER (hbox), button);
- g_object_set_data (G_OBJECT (item), "button", button);
-
- entry = gtk_entry_new ();
- gtk_widget_set_size_request (entry, 120, -1);
- gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
- g_object_set_data (G_OBJECT (item), "entry", entry);
-
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox);
- gtk_container_add (GTK_CONTAINER (button), hbox);
-
- icon = gtk_image_new ();
- gtk_widget_show (icon);
- gtk_box_pack_start (GTK_BOX (hbox), icon, TRUE, TRUE, 0);
- g_object_set_data (G_OBJECT (item), "icon", icon);
-
- label = gtk_label_new (NULL);
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
- g_object_set_data (G_OBJECT (item), "label", label);
-
- return item;
-}
-
static void
ephy_bookmark_action_sync_smart_url (EggAction *action, GParamSpec *pspec, GtkWidget *proxy)
{
@@ -304,6 +255,8 @@ connect_proxy (EggAction *action, GtkWidget *proxy)
{
GtkWidget *button, *entry;
+ LOG ("Connecting action %p to proxy %p", action, proxy)
+
(* EGG_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
ephy_bookmark_action_sync_label (action, NULL, proxy);
@@ -411,9 +364,8 @@ ephy_bookmark_action_class_init (EphyBookmarkActionClass *class)
parent_class = g_type_class_peek_parent (class);
action_class = EGG_ACTION_CLASS (class);
- action_class->toolbar_item_type = EGG_TYPE_TOOL_ITEM;
- action_class->create_tool_item = create_tool_item;
- action_class->create_menu_item = create_menu_item;
+ action_class->toolbar_item_type = EPHY_TYPE_BOOKMARK_TOOLITEM;
+ action_class->menu_item_type = GTK_TYPE_IMAGE_MENU_ITEM;
action_class->connect_proxy = connect_proxy;
object_class->finalize = ephy_bookmark_action_finalize;