[meld] recent: Use MIME type instead of application name
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] recent: Use MIME type instead of application name
- Date: Sat, 22 Mar 2014 22:30:15 +0000 (UTC)
commit 166e31b782814d5cd8cd46f2e6989fee95e1b4ad
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Mar 23 08:27:53 2014 +1000
recent: Use MIME type instead of application name
This is probably more correct, but actually motivated by
https://bugzilla.gnome.org/show_bug.cgi?id=695970
meld/recent.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/meld/recent.py b/meld/recent.py
index 2d28afa..71626d0 100644
--- a/meld/recent.py
+++ b/meld/recent.py
@@ -50,6 +50,7 @@ COMPARISON_TYPES = (TYPE_FILE, TYPE_FOLDER, TYPE_VC, TYPE_MERGE)
class RecentFiles(object):
+ mime_type = "application/x-meld-comparison"
recent_path = os.path.join(GLib.get_user_data_dir(), "meld")
recent_path = recent_path.decode('utf8')
recent_suffix = ".meldcmp"
@@ -60,7 +61,7 @@ class RecentFiles(object):
def __init__(self):
self.recent_manager = Gtk.RecentManager.get_default()
self.recent_filter = Gtk.RecentFilter()
- self.recent_filter.add_application(self.app_name)
+ self.recent_filter.add_mime_type(self.mime_type)
self._stored_comparisons = []
self.app_exec = os.path.abspath(sys.argv[0])
@@ -106,7 +107,7 @@ class RecentFiles(object):
description = "%s comparison\n%s" % (comp_type, ", ".join(paths))
recent_metadata = Gtk.RecentData()
- recent_metadata.mime_type = "application/x-meld-comparison"
+ recent_metadata.mime_type = self.mime_type
recent_metadata.app_name = self.app_name
recent_metadata.app_exec = "%s --comparison-file %%u" % self.app_exec
recent_metadata.display_name = display_name.encode('utf8')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]