[glade] GladeWindow: Fix recent files
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GladeWindow: Fix recent files
- Date: Thu, 11 Apr 2013 13:39:23 +0000 (UTC)
commit 1215b4022923ec27245a8e4deb64e931242ec7a5
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Thu Apr 11 22:07:14 2013 +0900
GladeWindow: Fix recent files
Glade's main open recent menu was not properly filtered, now
only allow Glade to open recent files that are of mime type
"application/x-glade"
src/glade-window.c | 6 ------
src/glade.glade | 24 +++++++++++++++---------
2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/glade-window.c b/src/glade-window.c
index 7a84b49..e197bdd 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -3160,12 +3160,6 @@ glade_window_constructed (GObject *object)
/* recent files */
priv->recent_manager = gtk_recent_manager_get_default ();
- {
- GtkRecentFilter *filter = gtk_recent_filter_new ();
- gtk_recent_filter_add_application (filter, g_get_application_name ());
- gtk_recent_chooser_set_filter (GET_OBJECT (builder, GTK_RECENT_CHOOSER, "open_recent_action"),
- filter);
- }
/* Init preferences */
priv->preferences = (GladePreferences *)glade_preferences_new ();
diff --git a/src/glade.glade b/src/glade.glade
index 07b611f..ea5bd89 100644
--- a/src/glade.glade
+++ b/src/glade.glade
@@ -211,15 +211,6 @@
<accelerator key="q" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
- <object class="GtkRecentAction" id="open_recent_action">
- <property name="label" translatable="yes">Open _Recent</property>
- <property name="limit">10</property>
- <property name="sort_type">mru</property>
- <property name="show_numbers">True</property>
- <signal name="item-activated" handler="on_open_recent_action_item_activated" swapped="no"/>
- </object>
- </child>
- <child>
<object class="GtkAction" id="about_action">
<property name="label" translatable="yes">About</property>
<property name="tooltip" translatable="yes">About this application</property>
@@ -243,6 +234,16 @@
<signal name="activate" handler="on_preferences_action_activate" swapped="no"/>
</object>
</child>
+ <child>
+ <object class="GtkRecentAction" id="open_recent_action">
+ <property name="label" translatable="yes">Open _Recent</property>
+ <property name="filter">recentfilter</property>
+ <property name="limit">10</property>
+ <property name="sort_type">mru</property>
+ <property name="show_numbers">True</property>
+ <signal name="item-activated" handler="on_open_recent_action_item_activated" swapped="no"/>
+ </object>
+ </child>
</object>
<object class="GtkActionGroup" id="view_actiongroup">
<property name="name">view_actiongroup</property>
@@ -1130,4 +1131,9 @@ Andreas Nilsson <andreas andreasn se></property>
</packing>
</child>
</object>
+ <object class="GtkRecentFilter" id="recentfilter">
+ <mime-types>
+ <mime-type>application/x-glade</mime-type>
+ </mime-types>
+ </object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]