3 * This file implements the interface of the Gnome filemanager Nautilus.
4 * It connects the interface with the implementation of the platform
5 * specific functions found in menu.c for git-cheetah.
7 * Copyright (C) Heiko Voigt, 2009
11 #include "../common/git-compat-util.h"
12 #include "../common/debug.h"
13 #include "../common/strbuf.h"
14 #include "../common/menuengine.h"
15 #include "../common/cheetahmenu.h"
28 GObjectClass parent_slot
;
31 void nautilus_module_initialize(GTypeModule
*module
);
32 void nautilus_module_shutdown(void);
33 void nautilus_module_list_types(const GType
**types
, int *num_types
);
34 GType
git_extension_get_type(void);
36 static void git_extension_register_type(GTypeModule
*module
);
37 static void git_extension_menu_provider_iface_init(
38 NautilusMenuProviderIface
*iface
);
43 static GType provider_types
[1];
44 static GType git_extension_type
;
45 static GObjectClass
*parent_class
;
47 void nautilus_module_initialize(GTypeModule
*module
)
49 git_extension_register_type(module
);
51 provider_types
[0] = git_extension_get_type();
54 void nautilus_module_shutdown(void)
56 /* Any module-specific shutdown */
59 void nautilus_module_list_types(const GType
**types
,
62 *types
= provider_types
;
63 *num_types
= G_N_ELEMENTS(provider_types
);
66 GType
git_extension_get_type(void)
68 return git_extension_type
;
71 static void git_extension_instance_init(GitExtension
*object
)
75 static void git_extension_class_init(GitExtensionClass
*class)
77 parent_class
= g_type_class_peek_parent(class);
80 static void git_extension_register_type(GTypeModule
*module
)
82 static const GTypeInfo info
= {
83 sizeof(GitExtensionClass
),
85 (GBaseFinalizeFunc
) NULL
,
86 (GClassInitFunc
) git_extension_class_init
,
91 (GInstanceInitFunc
) git_extension_instance_init
,
94 static const GInterfaceInfo menu_provider_iface_info
= {
95 (GInterfaceInitFunc
) git_extension_menu_provider_iface_init
,
100 git_extension_type
= g_type_module_register_type(module
,
105 g_type_module_add_interface(module
,
107 NAUTILUS_TYPE_MENU_PROVIDER
,
108 &menu_provider_iface_info
);
111 static void git_extension_menu_provider_iface_init(
112 NautilusMenuProviderIface
*iface
)
114 iface
->get_file_items
= git_extension_get_file_items
;
115 iface
->get_background_items
= git_extension_get_background_items
;
116 iface
->get_toolbar_items
= git_extension_get_toolbar_items
;