diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-01-21 02:57:20 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-01-21 02:57:20 +0800 |
commit | c2beffd03405e6db4295afd6c2982388b808cb2e (patch) | |
tree | 819e50881626c5109ccdba5abb158585a3ca148b /lib/egg/eggseparatortoolitem.c | |
parent | 822ca51797e05edbe42b80f1a33a70a7327d732e (diff) | |
download | gsoc2013-epiphany-c2beffd03405e6db4295afd6c2982388b808cb2e.tar gsoc2013-epiphany-c2beffd03405e6db4295afd6c2982388b808cb2e.tar.gz gsoc2013-epiphany-c2beffd03405e6db4295afd6c2982388b808cb2e.tar.bz2 gsoc2013-epiphany-c2beffd03405e6db4295afd6c2982388b808cb2e.tar.lz gsoc2013-epiphany-c2beffd03405e6db4295afd6c2982388b808cb2e.tar.xz gsoc2013-epiphany-c2beffd03405e6db4295afd6c2982388b808cb2e.tar.zst gsoc2013-epiphany-c2beffd03405e6db4295afd6c2982388b808cb2e.zip |
Merge eog-menu-api branch
2003-01-20 Marco Pesenti Gritti <marco@it.gnome.org>
* Merge eog-menu-api branch
Diffstat (limited to 'lib/egg/eggseparatortoolitem.c')
-rw-r--r-- | lib/egg/eggseparatortoolitem.c | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/lib/egg/eggseparatortoolitem.c b/lib/egg/eggseparatortoolitem.c new file mode 100644 index 000000000..e3fe098fc --- /dev/null +++ b/lib/egg/eggseparatortoolitem.c @@ -0,0 +1,86 @@ +#include <gtk/gtkseparatormenuitem.h> +#include "eggseparatortoolitem.h" + +#ifndef _ +# define _(s) (s) +#endif + +static void egg_separator_tool_item_init (EggSeparatorToolItem *self); +static void egg_separator_tool_item_class_init (EggSeparatorToolItemClass*class); + +static void egg_separator_tool_item_add (GtkContainer *container, + GtkWidget *child); +static GtkWidget *egg_separator_tool_item_create_menu_proxy (EggToolItem *self); + +static GObjectClass *parent_class = NULL; + + +GType +egg_separator_tool_item_get_type (void) +{ + static GType type = 0; + + if (!type) + { + static const GTypeInfo type_info = + { + sizeof (EggSeparatorToolItemClass), + (GBaseInitFunc) 0, + (GBaseFinalizeFunc) 0, + (GClassInitFunc) egg_separator_tool_item_class_init, + (GClassFinalizeFunc) 0, + NULL, + sizeof (EggSeparatorToolItem), + 0, /* n_preallocs */ + (GInstanceInitFunc) egg_separator_tool_item_init + }; + + type = g_type_register_static (EGG_TYPE_TOOL_ITEM, + "EggSeparatorToolItem", &type_info, 0); + } + return type; +} + + +static void +egg_separator_tool_item_class_init (EggSeparatorToolItemClass *class) +{ + GtkContainerClass *container_class; + EggToolItemClass *toolitem_class; + + parent_class = g_type_class_peek_parent (class); + container_class = (GtkContainerClass *)class; + toolitem_class = (EggToolItemClass *)class; + + container_class->add = egg_separator_tool_item_add; + toolitem_class->create_menu_proxy = egg_separator_tool_item_create_menu_proxy; +} + +static void +egg_separator_tool_item_init (EggSeparatorToolItem *self) +{ +} + +static void +egg_separator_tool_item_add (GtkContainer *container, GtkWidget *child) +{ + g_warning("attempt to add a child to an EggSeparatorToolItem"); +} + +static GtkWidget * +egg_separator_tool_item_create_menu_proxy (EggToolItem *item) +{ + return gtk_separator_menu_item_new (); +} + + +EggToolItem * +egg_separator_tool_item_new (void) +{ + EggToolItem *self; + + self = g_object_new (EGG_TYPE_SEPARATOR_TOOL_ITEM, + NULL); + + return self; +} |