1 #include <glib-object.h>
2 #include <glib/gi18n.h>
8 typedef struct _ChimaraBrowserPrivate {
10 } ChimaraBrowserPrivate;
12 #define CHIMARA_BROWSER_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), CHIMARA_TYPE_BROWSER, ChimaraBrowserPrivate))
13 #define CHIMARA_BROWSER_USE_PRIVATE ChimaraBrowserPrivate *priv = CHIMARA_BROWSER_PRIVATE(self)
15 G_DEFINE_TYPE(ChimaraBrowser, chimara_browser, GTK_TYPE_WINDOW);
18 chimara_browser_finalize(GObject *self)
21 G_OBJECT_CLASS(chimara_browser_parent_class)->finalize(self);
25 chimara_browser_class_init(ChimaraBrowserClass *klass)
27 /* Override methods of parent classes */
28 GObjectClass *object_class = G_OBJECT_CLASS(klass);
29 //object_class->set_property = chimara_if_set_property;
30 //object_class->get_property = chimara_if_get_property;
31 object_class->finalize = chimara_browser_finalize;
38 g_type_class_add_private(klass, sizeof(ChimaraBrowserPrivate));
42 chimara_browser_init(ChimaraBrowser *self)
44 ChimaraApp *theapp = chimara_app_get();
47 /* Set own properties */
49 "title", _("Chimara"),
52 GtkUIManager *uimanager = new_ui_manager("browser.menus");
54 gtk_ui_manager_insert_action_group(uimanager, chimara_app_get_action_group(theapp), 0);
55 GtkWidget *menubar = gtk_ui_manager_get_widget(uimanager, "/browser_menu");
56 gtk_container_add(GTK_CONTAINER(self), menubar);
59 /* PUBLIC FUNCTIONS */
61 chimara_browser_new(void)
63 return GTK_WIDGET(g_object_new(CHIMARA_TYPE_BROWSER,
64 "type", GTK_WINDOW_TOPLEVEL,