Merge lp:~muktupavels/alacarte/fix-creating-new-menus-and-items into lp:ubuntu/trusty/alacarte

Proposed by Alberts Muktupāvels
Status: Merged
Merge reported by: Dmitry Shachnev
Merged at revision: not available
Proposed branch: lp:~muktupavels/alacarte/fix-creating-new-menus-and-items
Merge into: lp:ubuntu/trusty/alacarte
Diff against target: 146 lines (+117/-0)
5 files modified
debian/changelog (+9/-0)
debian/patches/git-fix-creating-new-items.patch (+40/-0)
debian/patches/git-fix-creating-new-menus.patch (+40/-0)
debian/patches/git-make-the-restore-button-work.patch (+25/-0)
debian/patches/series (+3/-0)
To merge this branch: bzr merge lp:~muktupavels/alacarte/fix-creating-new-menus-and-items
Reviewer Review Type Date Requested Status
Dmitry Shachnev Approve
Ubuntu branches Pending
Review via email: mp+215284@code.launchpad.net

Commit message

Backport upstream patches to:
* fix creating new items.
* fix creating new menus.
* make the restore button work.

Description of the change

Backport upstream patches to:
* fix creating new items.
* fix creating new menus.
* make the restore button work.

To post a comment you must log in.
72. By Alberts Muktupāvels

Update version...

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Refreshed patches, fixed the changelog, and uploaded. Waiting in the review queue as we are in the final freeze now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-10-03 22:04:16 +0000
3+++ debian/changelog 2014-04-10 19:30:25 +0000
4@@ -1,3 +1,12 @@
5+alacarte (3.10.0-1ubuntu2) UNRELEASED; urgency=medium
6+
7+ * Backport upstream patches to:
8+ - fix creating new items.
9+ - fix creating new menus.
10+ - make the restore button work.
11+
12+ -- Alberts Muktupāvels <alberts.muktupavels@gmail.com> Thu, 10 Apr 2014 22:28:53 +0300
13+
14 alacarte (3.10.0-1) unstable; urgency=low
15
16 * New upstream release.
17
18=== added file 'debian/patches/git-fix-creating-new-items.patch'
19--- debian/patches/git-fix-creating-new-items.patch 1970-01-01 00:00:00 +0000
20+++ debian/patches/git-fix-creating-new-items.patch 2014-04-10 19:30:25 +0000
21@@ -0,0 +1,40 @@
22+From 1166883e5d7fcfc24ce24b5f5b158053c59be7a2 Mon Sep 17 00:00:00 2001
23+From: Matthias Clasen <mclasen@redhat.com>
24+Date: Thu, 27 Feb 2014 19:29:49 -0500
25+Subject: Fix creating new items
26+
27+Just as for menus, the code to insert the new item in
28+the right place was dropped in refactoring.
29+Bring it back.
30+
31+https://bugzilla.gnome.org/show_bug.cgi?id=725360
32+
33+diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
34+index a0c884c..f52f216 100644
35+--- a/Alacarte/MainWindow.py
36++++ b/Alacarte/MainWindow.py
37+@@ -261,11 +261,19 @@ class MainWindow(object):
38+ menu_tree.get_selection().select_path((0,))
39+ else:
40+ parent = menus[iter][2]
41+- file_path = os.path.join(util.getUserItemPath(), util.getUniqueFileId('alacarte-made', '.desktop'))
42++ file_name = util.getUniqueFileId('alacarte-made', '.desktop')
43++ file_path = os.path.join(util.getUserItemPath(), file_name)
44+
45+ editor = LauncherEditor(self.main_window, file_path)
46++ editor.file_name = file_name;
47++ editor.parent = parent.get_menu_id()
48++ editor.connect ('response', self.on_item_created)
49+ editor.run()
50+
51++ def on_item_created(self, editor, response):
52++ if response == True:
53++ self.editor.insertExternalItem(editor.file_name, editor.parent)
54++
55+ def on_new_separator_button_clicked(self, button):
56+ item_tree = self.tree.get_object('item_tree')
57+ items, iter = item_tree.get_selection().get_selected()
58+--
59+cgit v0.10.1
60+
61+
62
63=== added file 'debian/patches/git-fix-creating-new-menus.patch'
64--- debian/patches/git-fix-creating-new-menus.patch 1970-01-01 00:00:00 +0000
65+++ debian/patches/git-fix-creating-new-menus.patch 2014-04-10 19:30:25 +0000
66@@ -0,0 +1,40 @@
67+From fd2c16c3929e57f5f2071ed3bc36f02c77930bab Mon Sep 17 00:00:00 2001
68+From: Matthias Clasen <mclasen@redhat.com>
69+Date: Wed, 26 Feb 2014 20:29:51 -0500
70+Subject: Fix creating new menus
71+
72+We were still creating the .directory file, but some
73+refactoring dropped the code that inserted the menu
74+into the menu tree. Bring it back.
75+
76+https://bugzilla.gnome.org/show_bug.cgi?id=725287
77+
78+diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
79+index aa36aaa..a0c884c 100644
80+--- a/Alacarte/MainWindow.py
81++++ b/Alacarte/MainWindow.py
82+@@ -239,11 +239,19 @@ class MainWindow(object):
83+ menu_tree.get_selection().select_path((0,))
84+ else:
85+ parent = menus[iter][2]
86+- file_path = os.path.join(util.getUserDirectoryPath(), util.getUniqueFileId('alacarte-made', '.directory'))
87++ file_name = util.getUniqueFileId('alacarte-made', '.directory')
88++ file_path = os.path.join(util.getUserDirectoryPath(), file_name)
89+
90+ editor = DirectoryEditor(self.main_window, file_path)
91++ editor.file_name = file_name;
92++ editor.parent = parent.get_menu_id()
93++ editor.connect ('response', self.on_directory_created)
94+ editor.run()
95+
96++ def on_directory_created(self, editor, response):
97++ if response == True:
98++ self.editor.insertExternalMenu(editor.file_name, editor.parent)
99++
100+ def on_new_item_button_clicked(self, button):
101+ menu_tree = self.tree.get_object('menu_tree')
102+ menus, iter = menu_tree.get_selection().get_selected()
103+--
104+cgit v0.10.1
105+
106+
107
108=== added file 'debian/patches/git-make-the-restore-button-work.patch'
109--- debian/patches/git-make-the-restore-button-work.patch 1970-01-01 00:00:00 +0000
110+++ debian/patches/git-make-the-restore-button-work.patch 2014-04-10 19:30:25 +0000
111@@ -0,0 +1,25 @@
112+From ba22fb0db948a65f19a22fc3e6f390d336a11eac Mon Sep 17 00:00:00 2001
113+From: Matthias Clasen <mclasen@redhat.com>
114+Date: Mon, 17 Feb 2014 18:04:16 -0500
115+Subject: Make the Restore button work
116+
117+The callback assumes that the first argument is 'self', not
118+the button that was clicked.
119+
120+diff --git a/data/alacarte.ui b/data/alacarte.ui
121+index 28905c2..90941a6 100644
122+--- a/data/alacarte.ui
123++++ b/data/alacarte.ui
124+@@ -77,7 +77,7 @@
125+ <property name="receives_default">False</property>
126+ <property name="tooltip_text" translatable="yes">Restore the default menu layout</property>
127+ <property name="use_stock">True</property>
128+- <signal name="clicked" handler="on_restore_button_clicked" swapped="no"/>
129++ <signal name="clicked" handler="on_restore_button_clicked" swapped="yes"/>
130+ </object>
131+ <packing>
132+ <property name="expand">False</property>
133+--
134+cgit v0.10.1
135+
136+
137
138=== modified file 'debian/patches/series'
139--- debian/patches/series 2013-10-03 22:04:16 +0000
140+++ debian/patches/series 2014-04-10 19:30:25 +0000
141@@ -1,2 +1,5 @@
142 03-bind_textdomain_codeset.patch
143 30-python_private_dir.patch
144+git-fix-creating-new-items.patch
145+git-fix-creating-new-menus.patch
146+git-make-the-restore-button-work.patch

Subscribers

People subscribed via source and target branches