source: trunk/third/gnome-core/panel/tearoffitem.c @ 15328

Revision 15328, 1.2 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15327, which included commits to RCS files with non-trunk default branches.
Line 
1#include "config.h"
2#include <gnome.h>
3
4#include "panel-include.h"
5#include "tearoffitem.h"
6
7static void tearoff_item_class_init     (TearoffItemClass       *klass);
8static void tearoff_item_init           (TearoffItem    *tearoff_menu_item);
9
10GtkType
11tearoff_item_get_type(void)
12{
13        static GtkType tearoff_menu_item_type = 0;
14
15        if (!tearoff_menu_item_type) {
16                static const GtkTypeInfo tearoff_menu_item_info = {
17                        "TearoffItem",
18                        sizeof (TearoffItem),
19                        sizeof (TearoffItemClass),
20                        (GtkClassInitFunc) tearoff_item_class_init,
21                        (GtkObjectInitFunc) tearoff_item_init,
22                        /* reserved_1 */ NULL,
23                        /* reserved_2 */ NULL,
24                        (GtkClassInitFunc) NULL,
25                };
26
27                tearoff_menu_item_type =
28                        gtk_type_unique(gtk_tearoff_menu_item_get_type(),
29                                        &tearoff_menu_item_info);
30        }
31
32        return tearoff_menu_item_type;
33}
34
35GtkWidget*
36tearoff_item_new(void)
37{
38        g_return_val_if_fail (gnome_preferences_get_menus_have_tearoff (), NULL);
39        return GTK_WIDGET(gtk_type_new(tearoff_item_get_type()));
40}
41
42static void
43tearoff_item_class_init(TearoffItemClass *klass)
44{
45        GtkMenuItemClass *menu_item_class;
46
47        menu_item_class = (GtkMenuItemClass*) klass;
48
49        menu_item_class->activate = NULL;
50}
51
52static void
53tearoff_item_init(TearoffItem *tearoff_menu_item)
54{
55}
Note: See TracBrowser for help on using the repository browser.