From f7128bcd9f79c0adf34e91256710253cf22c939a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:47:26 +0000 Subject: import alacarte-3.11.91-1.el7 --- diff --git a/.alacarte.metadata b/.alacarte.metadata index b8c1b15..2ba389e 100644 --- a/.alacarte.metadata +++ b/.alacarte.metadata @@ -1 +1 @@ -de81fde922fdc210a3779c9eb8ab9ff9f450cdfb SOURCES/alacarte-3.7.90.tar.xz +b200e7e9721c18c83ab2983234edf8986962d335 SOURCES/alacarte-3.11.91.tar.xz diff --git a/.gitignore b/.gitignore index 8341af7..f78dc13 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/alacarte-3.7.90.tar.xz +SOURCES/alacarte-3.11.91.tar.xz diff --git a/SOURCES/0001-Fix-creating-new-items.patch b/SOURCES/0001-Fix-creating-new-items.patch deleted file mode 100644 index 8e356cb..0000000 --- a/SOURCES/0001-Fix-creating-new-items.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1166883e5d7fcfc24ce24b5f5b158053c59be7a2 Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Thu, 27 Feb 2014 19:29:49 -0500 -Subject: [PATCH] Fix creating new items - -Just as for menus, the code to insert the new item in -the right place was dropped in refactoring. -Bring it back. - -https://bugzilla.gnome.org/show_bug.cgi?id=725360 ---- - Alacarte/MainWindow.py | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py -index a0c884c..f52f216 100644 ---- a/Alacarte/MainWindow.py -+++ b/Alacarte/MainWindow.py -@@ -261,11 +261,19 @@ class MainWindow(object): - menu_tree.get_selection().select_path((0,)) - else: - parent = menus[iter][2] -- file_path = os.path.join(util.getUserItemPath(), util.getUniqueFileId('alacarte-made', '.desktop')) -+ file_name = util.getUniqueFileId('alacarte-made', '.desktop') -+ file_path = os.path.join(util.getUserItemPath(), file_name) - - editor = LauncherEditor(self.main_window, file_path) -+ editor.file_name = file_name; -+ editor.parent = parent.get_menu_id() -+ editor.connect ('response', self.on_item_created) - editor.run() - -+ def on_item_created(self, editor, response): -+ if response == True: -+ self.editor.insertExternalItem(editor.file_name, editor.parent) -+ - def on_new_separator_button_clicked(self, button): - item_tree = self.tree.get_object('item_tree') - items, iter = item_tree.get_selection().get_selected() --- -1.9.0 - diff --git a/SOURCES/0001-Fix-creating-new-menus.patch b/SOURCES/0001-Fix-creating-new-menus.patch deleted file mode 100644 index c9aafe9..0000000 --- a/SOURCES/0001-Fix-creating-new-menus.patch +++ /dev/null @@ -1,42 +0,0 @@ -From fd2c16c3929e57f5f2071ed3bc36f02c77930bab Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Wed, 26 Feb 2014 20:29:51 -0500 -Subject: [PATCH] Fix creating new menus - -We were still creating the .directory file, but some -refactoring dropped the code that inserted the menu -into the menu tree. Bring it back. - -https://bugzilla.gnome.org/show_bug.cgi?id=725287 ---- - Alacarte/MainWindow.py | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py -index aa36aaa..a0c884c 100644 ---- a/Alacarte/MainWindow.py -+++ b/Alacarte/MainWindow.py -@@ -239,11 +239,19 @@ class MainWindow(object): - menu_tree.get_selection().select_path((0,)) - else: - parent = menus[iter][2] -- file_path = os.path.join(util.getUserDirectoryPath(), util.getUniqueFileId('alacarte-made', '.directory')) -+ file_name = util.getUniqueFileId('alacarte-made', '.directory') -+ file_path = os.path.join(util.getUserDirectoryPath(), file_name) - - editor = DirectoryEditor(self.main_window, file_path) -+ editor.file_name = file_name; -+ editor.parent = parent.get_menu_id() -+ editor.connect ('response', self.on_directory_created) - editor.run() - -+ def on_directory_created(self, editor, response): -+ if response == True: -+ self.editor.insertExternalMenu(editor.file_name, editor.parent) -+ - def on_new_item_button_clicked(self, button): - menu_tree = self.tree.get_object('menu_tree') - menus, iter = menu_tree.get_selection().get_selected() --- -1.9.0 - diff --git a/SOURCES/0001-ItemEditor-Fix-validity-check.patch b/SOURCES/0001-ItemEditor-Fix-validity-check.patch deleted file mode 100644 index 971258a..0000000 --- a/SOURCES/0001-ItemEditor-Fix-validity-check.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ccf5b18a16216bbc807d8eb1f425aa632fc76e1b Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Thu, 12 Dec 2013 13:46:10 -0500 -Subject: [PATCH 1/2] ItemEditor: Fix validity check - ---- - Alacarte/ItemEditor.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py -index 64d713f..c6b9fba 100644 ---- a/Alacarte/ItemEditor.py -+++ b/Alacarte/ItemEditor.py -@@ -182,7 +182,7 @@ class LauncherEditor(ItemEditor): - def resync_validity(self, *args): - name_text = self.builder.get_object('name-entry').get_text() - exec_text = self.builder.get_object('exec-entry').get_text() -- valid = (name_text is not None and exec_text is not None) -+ valid = (name_text != "" and exec_text != "") - self.builder.get_object('ok').set_sensitive(valid) - - def load(self): -@@ -223,7 +223,7 @@ class DirectoryEditor(ItemEditor): - - def resync_validity(self, *args): - name_text = self.builder.get_object('name-entry').get_text() -- valid = (name_text is not None) -+ valid = (name_text != "") - self.builder.get_object('ok').set_sensitive(valid) - - def load(self): --- -1.9.0 - diff --git a/SOURCES/0001-ItemEditor-Make-sure-to-include-the-extension-in-the.patch b/SOURCES/0001-ItemEditor-Make-sure-to-include-the-extension-in-the.patch deleted file mode 100644 index 34ebd1b..0000000 --- a/SOURCES/0001-ItemEditor-Make-sure-to-include-the-extension-in-the.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d31ce6b696cdae0e28aca49e0c8887b450114780 Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Tue, 22 Oct 2013 15:08:39 -0400 -Subject: [PATCH] ItemEditor: Make sure to include the extension in the icon - name - ---- - Alacarte/ItemEditor.py | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py -index 2330de0..64d713f 100644 ---- a/Alacarte/ItemEditor.py -+++ b/Alacarte/ItemEditor.py -@@ -33,8 +33,6 @@ def try_icon_name(filename): - if not filename.endswith(EXTENSIONS): - return filename - -- filename = filename[:-4] -- - theme = Gtk.IconTheme.get_default() - resolved_path = None - for path in theme.get_search_path(): -@@ -50,7 +48,10 @@ def try_icon_name(filename): - if len(parts) != 4: - return filename - -- return parts[3] -+ icon_name = parts[3] -+ -+ # strip extension -+ return icon_name[:-4] - - def get_icon_string(image): - filename = image.props.file --- -1.9.0 - diff --git a/SOURCES/0001-MainWindow-Add-back-main_window.patch b/SOURCES/0001-MainWindow-Add-back-main_window.patch deleted file mode 100644 index 656f58e..0000000 --- a/SOURCES/0001-MainWindow-Add-back-main_window.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 73eaf9959f20fdab545237188672bf01f6e22fa1 Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Thu, 12 Dec 2013 13:38:09 -0500 -Subject: [PATCH] MainWindow: Add back main_window - -We use this for the launchers ---- - Alacarte/MainWindow.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py -index 7bd3106..aa36aaa 100644 ---- a/Alacarte/MainWindow.py -+++ b/Alacarte/MainWindow.py -@@ -50,6 +50,8 @@ class MainWindow(object): - self.tree.get_object('move_down_button').set_sensitive(False) - self.tree.get_object('new_separator_button').set_sensitive(False) - -+ self.main_window = self.tree.get_object('mainwindow') -+ - self.editor = None - - def setMenuBasename(self, menu_basename): --- -1.9.0 - diff --git a/SOURCES/0001-Make-the-Restore-button-work.patch b/SOURCES/0001-Make-the-Restore-button-work.patch deleted file mode 100644 index 80dd22f..0000000 --- a/SOURCES/0001-Make-the-Restore-button-work.patch +++ /dev/null @@ -1,27 +0,0 @@ -From ba22fb0db948a65f19a22fc3e6f390d336a11eac Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Mon, 17 Feb 2014 18:04:16 -0500 -Subject: [PATCH] Make the Restore button work - -The callback assumes that the first argument is 'self', not -the button that was clicked. ---- - data/alacarte.ui | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/alacarte.ui b/data/alacarte.ui -index 28905c2..90941a6 100644 ---- a/data/alacarte.ui -+++ b/data/alacarte.ui -@@ -77,7 +77,7 @@ - False - Restore the default menu layout - True -- -+ - - - False --- -1.8.5.3 - diff --git a/SOURCES/0001-Remove-the-Help-button.patch b/SOURCES/0001-Remove-the-Help-button.patch deleted file mode 100644 index 2e4ab0e..0000000 --- a/SOURCES/0001-Remove-the-Help-button.patch +++ /dev/null @@ -1,71 +0,0 @@ -From a05a5e8317740d2486a474196530d6dfc724303e Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Thu, 12 Dec 2013 11:31:58 -0500 -Subject: [PATCH] Remove the Help button - -There is no help for alacarte, so don't show a non-functional -Help button. - -https://bugzilla.gnome.org/show_bug.cgi?id=720334 ---- - Alacarte/MainWindow.py | 9 --------- - data/alacarte.ui | 16 ---------------- - 2 files changed, 25 deletions(-) - -diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py -index 2a3427f..7bd3106 100644 ---- a/Alacarte/MainWindow.py -+++ b/Alacarte/MainWindow.py -@@ -49,12 +49,6 @@ class MainWindow(object): - self.tree.get_object('move_up_button').set_sensitive(False) - self.tree.get_object('move_down_button').set_sensitive(False) - self.tree.get_object('new_separator_button').set_sensitive(False) -- accelgroup = Gtk.AccelGroup() -- keyval, modifier = Gtk.accelerator_parse('F1') -- accelgroup.connect(keyval, modifier, Gtk.AccelFlags.VISIBLE, self.on_help_button_clicked) -- -- self.main_window = self.tree.get_object('mainwindow') -- self.main_window.add_accel_group(accelgroup) - - self.editor = None - -@@ -427,9 +421,6 @@ class MainWindow(object): - after = items[path][3] - self.editor.moveItem(item.get_parent(), item, after=after) - -- def on_help_button_clicked(self, *args): -- Gtk.show_uri(Gdk.Screen.get_default(), "ghelp:user-guide#menu-editor", Gtk.get_current_event_time()) -- - def on_restore_button_clicked(self, button): - self.editor.restoreToSystem() - -diff --git a/data/alacarte.ui b/data/alacarte.ui -index e09ae88..28905c2 100644 ---- a/data/alacarte.ui -+++ b/data/alacarte.ui -@@ -51,22 +51,6 @@ - False - 6 - -- -- gtk-help -- True -- True -- True -- False -- True -- -- -- -- False -- True -- 0 -- -- -- - - gtk-close - True --- -1.8.4.2 - diff --git a/SOURCES/0002-ItemEditor-Make-sure-that-we-have-a-valid-Exec-line.patch b/SOURCES/0002-ItemEditor-Make-sure-that-we-have-a-valid-Exec-line.patch deleted file mode 100644 index b1cf617..0000000 --- a/SOURCES/0002-ItemEditor-Make-sure-that-we-have-a-valid-Exec-line.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 666d843940b9020c3ffb94e29b306ddcbc566ddf Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Thu, 12 Dec 2013 13:47:01 -0500 -Subject: [PATCH 2/2] ItemEditor: Make sure that we have a valid Exec line - -Otherwise, gnome-menus / gio will ignore it. ---- - Alacarte/ItemEditor.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py -index c6b9fba..3b48324 100644 ---- a/Alacarte/ItemEditor.py -+++ b/Alacarte/ItemEditor.py -@@ -182,7 +182,7 @@ class LauncherEditor(ItemEditor): - def resync_validity(self, *args): - name_text = self.builder.get_object('name-entry').get_text() - exec_text = self.builder.get_object('exec-entry').get_text() -- valid = (name_text != "" and exec_text != "") -+ valid = (name_text != "" and GLib.find_program_in_path(exec_text) is not None) - self.builder.get_object('ok').set_sensitive(valid) - - def load(self): --- -1.9.0 - diff --git a/SOURCES/alacarte.1 b/SOURCES/alacarte.1 deleted file mode 100644 index c825fe1..0000000 --- a/SOURCES/alacarte.1 +++ /dev/null @@ -1,89 +0,0 @@ -'\" t -.\" Title: alacarte -.\" Author: Trevor Watkins -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/07/2014 -.\" Manual: User Commands -.\" Source: GNOME -.\" Language: English -.\" -.TH "ALACARTE" "1" "" "GNOME" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -alacarte \- Edit freedesktop\&.org menus -.SH "SYNOPSIS" -.HP \w'\fBalacarte\fR\ 'u -\fBalacarte\fR -.SH "DESCRIPTION" -.PP -alacarte -is a graphical editor for the freedesktop\&.org menus that are used by many desktop environments\&. It can also edit and create application desktop files\&. -.SH "OPTIONS" -.PP -\fBalacarte\fR -does not accept any commandline options\&. -.SH "ENVIRONMENT" -.PP -\fBXDG_CONFIG_DIRS\fR -.RS 4 -\fBalacarte\fR -looks in the -menus -subdirectory of these directories for menu files\&. The default location for menu files is -/etc/xdg/menus\&. -.RE -.PP -\fBXDG_DATA_DIRS\fR -.RS 4 -\fBalacarte\fR -looks in the -applications -subdirectory of these directories for desktop files\&. The default location for desktop files is -/usr/share/applications\&. -.RE -.PP -\fBXDG_CONFIG_HOME\fR -.RS 4 -The -menus -subdirectory of this directory is where -\fBalacarte\fR -stores modified menu files\&. The default location for modified menu files is -\fB$HOME\fR/\&.config/menus\&. -.RE -.PP -\fBXDG_DATA_HOME\fR -.RS 4 -The -applications -subdirectory of this directory is where -\fBalacarte\fR -stores modified and newly created desktop files\&. The default location for these is -\fB$HOME\fR/\&.local/share/applications\&. -.RE -.PP -\fBXDG_MENU_PREFIX\fR -.RS 4 -\fBalacarte\fR -is editing the menus defined by the file -\fB$XDG_MENU_PREFIX\fRapplications\&.menu\&. GNOME uses the menu file -gnome\-applications\&.menu\&. -.RE diff --git a/SOURCES/commit-0d7f351 b/SOURCES/commit-0d7f351 deleted file mode 100644 index fff5cdc..0000000 --- a/SOURCES/commit-0d7f351 +++ /dev/null @@ -1,39 +0,0 @@ -commit 0d7f35124a0e23a0aaf57edf0e2d84f9ba1f12d8 -Author: Jasper St. Pierre -Date: Tue Apr 30 00:08:55 2013 -0400 - - MenuEditor: Don't write binary data as unicode - - g_keyfile_to_data returns binary data, not unicode - -diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py -index 15523e2..4ed7172 100644 ---- a/Alacarte/MenuEditor.py -+++ b/Alacarte/MenuEditor.py -@@ -263,7 +263,7 @@ class MenuEditor(object): - - contents, length = keyfile.to_data() - -- with codecs.open(out_path, 'w', 'utf8') as f: -+ with open(out_path, 'w') as f: - f.write(contents) - - self.addItem(new_parent, file_id, dom) -@@ -404,7 +404,7 @@ class MenuEditor(object): - contents, length = keyfile.to_data() - - path = os.path.join(util.getUserItemPath(), file_id) -- with codecs.open(path, 'w', 'utf8') as f: -+ with open(path, 'w') as f: - f.write(contents) - - return file_id -@@ -426,7 +426,7 @@ class MenuEditor(object): - contents, length = keyfile.to_data() - - path = os.path.join(util.getUserDirectoryPath(), file_id) -- with codecs.open(path, 'w', 'utf8') as f: -+ with open(path, 'w') as f: - f.write(contents) - return file_id - diff --git a/SOURCES/commit-d1920ec b/SOURCES/commit-d1920ec deleted file mode 100644 index 8e631a1..0000000 --- a/SOURCES/commit-d1920ec +++ /dev/null @@ -1,34 +0,0 @@ -commit d1920ecd9cbcbd9c486f9fe79a5379ab7cfb10d3 -Author: Stefano Facchini -Date: Mon Aug 26 18:34:35 2013 +0200 - - Quit on delete event - - https://bugzilla.gnome.org/show_bug.cgi?id=706821 - -diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py -index 40c108d..b02d84a 100644 ---- a/Alacarte/MainWindow.py -+++ b/Alacarte/MainWindow.py -@@ -232,6 +232,9 @@ class MainWindow(object): - - self.item_store.append((show, icon, name, item)) - -+ def on_delete_event(self, widget, event): -+ self.quit() -+ - def on_new_menu_button_clicked(self, button): - menu_tree = self.tree.get_object('menu_tree') - menus, iter = menu_tree.get_selection().get_selected() -diff --git a/data/alacarte.ui b/data/alacarte.ui -index cf918a1..e09ae88 100644 ---- a/data/alacarte.ui -+++ b/data/alacarte.ui -@@ -39,6 +39,7 @@ - center - 675 - 530 -+ - - - True diff --git a/SOURCES/commit-e8f3c73 b/SOURCES/commit-e8f3c73 deleted file mode 100644 index 73c3ef3..0000000 --- a/SOURCES/commit-e8f3c73 +++ /dev/null @@ -1,26 +0,0 @@ -commit e8f3c734dab2958740b524b19f3c2d20206b6118 -Author: Jasper St. Pierre -Date: Tue Apr 30 01:52:46 2013 -0400 - - MenuEditor: Don't save after restoring default conditions - -diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py -index 4ed7172..e280ca3 100644 ---- a/Alacarte/MenuEditor.py -+++ b/Alacarte/MenuEditor.py -@@ -58,14 +58,12 @@ class MenuEditor(object): - - def restoreToSystem(self): - self.restoreTree(self.tree.get_root_directory()) -- path = os.path.join(util.getUserMenuPath(), os.path.basename(self.tree.get_canonical_menu_path())) - try: -- os.unlink(path) -+ os.unlink(self.path) - except OSError: - pass - - self.loadDOM() -- self.save() - - def restoreTree(self, menu): - item_iter = menu.iter() diff --git a/SOURCES/commit-f1c0f97 b/SOURCES/commit-f1c0f97 deleted file mode 100644 index 9be2b2b..0000000 --- a/SOURCES/commit-f1c0f97 +++ /dev/null @@ -1,19 +0,0 @@ -commit f1c0f9708e8bbaf5759a558221b6fe8eaad2c6f1 -Author: Jasper St. Pierre -Date: Tue Apr 30 01:53:36 2013 -0400 - - MenuEditor: Consistently use os.remove - -diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py -index e280ca3..077b113 100644 ---- a/Alacarte/MenuEditor.py -+++ b/Alacarte/MenuEditor.py -@@ -59,7 +59,7 @@ class MenuEditor(object): - def restoreToSystem(self): - self.restoreTree(self.tree.get_root_directory()) - try: -- os.unlink(self.path) -+ os.remove(self.path) - except OSError: - pass - diff --git a/SOURCES/commit-fab91e9 b/SOURCES/commit-fab91e9 deleted file mode 100644 index 7bd3755..0000000 --- a/SOURCES/commit-fab91e9 +++ /dev/null @@ -1,73 +0,0 @@ -commit fab91e9c2549bd284dda3cc0f2cffc7ae6c14f0f -Author: Stefano Facchini -Date: Mon Aug 26 16:37:34 2013 +0200 - - Do not leave behind stale .desktop files - - If the user clicked on Cancel in the Editor dialog, we should remove - the .desktop file we just copied to ~/.local/share/applications. - - https://bugzilla.gnome.org/show_bug.cgi?id=706807 - -diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py -index f9d709a..2330de0 100644 ---- a/Alacarte/ItemEditor.py -+++ b/Alacarte/ItemEditor.py -@@ -20,7 +20,7 @@ import gettext - import os - import gi - gi.require_version('Gtk', '3.0') --from gi.repository import GLib, Gtk -+from gi.repository import GLib, GObject, Gtk - from Alacarte import config, util - - _ = gettext.gettext -@@ -91,10 +91,15 @@ class IconPicker(object): - self.image.props.file = chooser.get_filename() - chooser.destroy() - --class ItemEditor(object): -+class ItemEditor(GObject.GObject): - ui_file = None - -+ __gsignals__ = { -+ 'response': (GObject.SIGNAL_RUN_FIRST, None, (bool,)) -+ } -+ - def __init__(self, parent, item_path): -+ GObject.GObject.__init__(self) - self.builder = Gtk.Builder() - self.builder.add_from_file(os.path.join(config.pkgdatadir, self.ui_file)) - -@@ -158,6 +163,7 @@ class ItemEditor(object): - if response == Gtk.ResponseType.OK: - self.save() - self.dialog.destroy() -+ self.emit('response', response == Gtk.ResponseType.OK) - - class LauncherEditor(ItemEditor): - ui_file = 'launcher-editor.ui' -diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py -index 291949d..40c108d 100644 ---- a/Alacarte/MainWindow.py -+++ b/Alacarte/MainWindow.py -@@ -303,12 +303,19 @@ class MainWindow(object): - file_type = 'Menu' - Editor = DirectoryEditor - -+ copied = False - if not os.path.isfile(file_path): - shutil.copy(item.get_desktop_file_path(), file_path) -+ copied = True - - editor = Editor(self.main_window, file_path) -+ editor.connect('response', self.on_editor_response, file_path if copied else None) - editor.run() - -+ def on_editor_response(self, editor, modified, file_path): -+ if not modified and file_path is not None: -+ os.remove(file_path) -+ - def on_menu_tree_cursor_changed(self, treeview): - selection = treeview.get_selection() - if selection is None: diff --git a/SPECS/alacarte.spec b/SPECS/alacarte.spec index d025e01..c836702 100644 --- a/SPECS/alacarte.spec +++ b/SPECS/alacarte.spec @@ -1,30 +1,15 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: alacarte -Version: 3.7.90 -Release: 8%{?dist} +Version: 3.11.91 +Release: 1%{?dist} Summary: Menu editor for the GNOME desktop Group: Applications/System License: LGPLv2+ URL: http://www.gnome.org #VCS: git:git://git.gnome.org/alacarte -Source0: http://download.gnome.org/sources/alacarte/3.7/%{name}-%{version}.tar.xz -Source1: alacarte.1 - -Patch0: commit-0d7f351 -Patch1: commit-e8f3c73 -Patch2: commit-f1c0f97 -Patch3: commit-fab91e9 -Patch4: commit-d1920ec -Patch5: 0001-Remove-the-Help-button.patch -Patch6: 0001-Make-the-Restore-button-work.patch -Patch7: 0001-ItemEditor-Make-sure-to-include-the-extension-in-the.patch -Patch8: 0001-MainWindow-Add-back-main_window.patch -Patch9: 0001-ItemEditor-Fix-validity-check.patch -Patch10: 0002-ItemEditor-Make-sure-that-we-have-a-valid-Exec-line.patch -Patch11: 0001-Fix-creating-new-menus.patch -Patch12: 0001-Fix-creating-new-items.patch +Source0: http://download.gnome.org/sources/alacarte/3.11/%{name}-%{version}.tar.xz BuildArch: noarch @@ -36,6 +21,8 @@ BuildRequires: intltool BuildRequires: desktop-file-utils BuildRequires: autoconf BuildRequires: automake +BuildRequires: libxslt +BuildRequires: docbook-style-xsl Requires: gnome-menus >= 3.2.0.1 Requires: gtk3 Requires: pygobject3 @@ -49,19 +36,6 @@ should work with any desktop environment that uses this specification. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 autoreconf -i -f @@ -73,9 +47,6 @@ make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' -install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/alacarte.1 -gzip $RPM_BUILD_ROOT%{_mandir}/man1/alacarte.1 - # desktop-file-install can't manipulate NotShowIn sed -i -e 's/NotShowIn=KDE;/OnlyShowIn=GNOME;/' \ $RPM_BUILD_ROOT%{_datadir}/applications/alacarte.desktop @@ -116,6 +87,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Nov 24 2016 Kalev Lember - 3.11.91-1 +- Update to 3.11.91 +- Resolves: #1386773 + * Fri Feb 28 2014 Matthias Clasen - 3.7.90-8 - Put new items in the correct menu Resolves: #1040403