[gitg] Fixed filter for recently opened repositories
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Subject: [gitg] Fixed filter for recently opened repositories
- Date: Sun, 5 Jul 2009 01:14:40 +0000 (UTC)
commit 2dcdddf28d990145404c734e857ebe90a488628d
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sat Jul 4 20:27:54 2009 +0200
Fixed filter for recently opened repositories
gitg/gitg-ui.xml | 3 ---
gitg/gitg-window.c | 14 +++++++++-----
2 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/gitg/gitg-ui.xml b/gitg/gitg-ui.xml
index 660b123..7bfc35f 100644
--- a/gitg/gitg-ui.xml
+++ b/gitg/gitg-ui.xml
@@ -171,9 +171,6 @@
</popup>
</ui>
</object>
- <object class="GtkMenuBar" id="menubar_main" constructor="uiman">
- <property name="visible">True</property>
- </object>
</interface>
<!-- vi:ts=2:et -->
diff --git a/gitg/gitg-window.c b/gitg/gitg-window.c
index 98d304b..d32223c 100644
--- a/gitg/gitg-window.c
+++ b/gitg/gitg-window.c
@@ -538,17 +538,21 @@ gitg_window_parser_finished(GtkBuildable *buildable, GtkBuilder *builder)
// Insert menu from second ui file
GtkBuilder *b = gitg_utils_new_builder("gitg-ui.xml");
- GtkWidget *menu = GTK_WIDGET(gtk_builder_get_object(b, "menubar_main"));
- GtkWidget *vbox = GTK_WIDGET(gtk_builder_get_object(builder, "vbox_main"));
-
- gtk_box_pack_start(GTK_BOX(vbox), menu, FALSE, FALSE, 0);
- gtk_box_reorder_child(GTK_BOX(vbox), menu, 0);
+ GtkUIManager *uiman = GTK_UI_MANAGER (gtk_builder_get_object(b, "uiman"));
GtkRecentChooser *chooser = GTK_RECENT_CHOOSER(gtk_builder_get_object(b, "RecentOpenAction"));
GtkRecentFilter *filter = gtk_recent_filter_new();
gtk_recent_filter_add_group(filter, "gitg");
gtk_recent_chooser_add_filter(chooser, filter);
+ gtk_recent_chooser_set_show_tips(chooser, TRUE);
+
+ GtkWidget *menu = gtk_ui_manager_get_widget (uiman, "/ui/menubar_main");
+ GtkWidget *vbox = GTK_WIDGET(gtk_builder_get_object(builder, "vbox_main"));
+
+ gtk_box_pack_start(GTK_BOX(vbox), menu, FALSE, FALSE, 0);
+ gtk_box_reorder_child(GTK_BOX(vbox), menu, 0);
+
window->priv->edit_group = GTK_ACTION_GROUP(gtk_builder_get_object(b, "action_group_menu_edit"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]