Merge lp:~dobey/software-center/fix-typeerror into lp:software-center

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: no longer in the source branch.
Merged at revision: 3301
Proposed branch: lp:~dobey/software-center/fix-typeerror
Merge into: lp:software-center
Diff against target: 71 lines (+1/-24)
2 files modified
data/ui/gtk3/SoftwareCenter.ui (+0/-12)
softwarecenter/ui/gtk3/app.py (+1/-12)
To merge this branch: bzr merge lp:~dobey/software-center/fix-typeerror
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve
Mike McCracken (community) Approve
Review via email: mp+157234@code.launchpad.net

Commit message

Don't use the main copy/cut menu items for search entry selections.
Remove the main cut menu item as it was not used for anything else.

To post a comment you must log in.
Revision history for this message
Mike McCracken (mikemc) wrote :

When launching SC I get this:

Traceback (most recent call last):
  File "/home/mmccrack/src/software-center/softwarecenter/ui/gtk3/app.py", line 941, in on_menu_edit_activate
    self.menuitem_cut,
AttributeError: 'SoftwareCenterAppGtk3' object has no attribute 'menuitem_cut'

review: Needs Fixing
Revision history for this message
Mike McCracken (mikemc) :
review: Approve
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
3301. By dobey

Don't use the main copy/cut menu items for search entry selections.
Remove the main cut menu item as it was not used for anything else.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/ui/gtk3/SoftwareCenter.ui'
2--- data/ui/gtk3/SoftwareCenter.ui 2012-09-25 23:13:51 +0000
3+++ data/ui/gtk3/SoftwareCenter.ui 2013-04-04 22:24:21 +0000
4@@ -253,18 +253,6 @@
5 </object>
6 </child>
7 <child>
8- <object class="GtkImageMenuItem" id="menuitem_cut">
9- <property name="label">gtk-cut</property>
10- <property name="visible">True</property>
11- <property name="can_focus">False</property>
12- <property name="use_action_appearance">False</property>
13- <property name="use_underline">True</property>
14- <property name="use_stock">True</property>
15- <accelerator key="x" signal="activate" modifiers="GDK_CONTROL_MASK"/>
16- <signal name="activate" handler="on_menuitem_cut_activate" swapped="no"/>
17- </object>
18- </child>
19- <child>
20 <object class="GtkImageMenuItem" id="menuitem_copy">
21 <property name="label">gtk-copy</property>
22 <property name="visible">True</property>
23
24=== modified file 'softwarecenter/ui/gtk3/app.py'
25--- softwarecenter/ui/gtk3/app.py 2012-12-14 16:44:25 +0000
26+++ softwarecenter/ui/gtk3/app.py 2013-04-04 22:24:21 +0000
27@@ -668,8 +668,6 @@
28 if (event.keyval == Gdk.keyval_from_name("x") and
29 event.state == Gdk.ModifierType.CONTROL_MASK):
30 self.menuitem_edit.activate()
31- if self.menuitem_cut.get_sensitive():
32- self.menuitem_cut.activate()
33
34 if (event.keyval == Gdk.keyval_from_name("c") and
35 event.state == Gdk.ModifierType.CONTROL_MASK):
36@@ -938,7 +936,6 @@
37 """
38 edit_menu_items = [self.menuitem_undo,
39 self.menuitem_redo,
40- self.menuitem_cut,
41 self.menuitem_copy,
42 self.menuitem_copy_web_link,
43 self.menuitem_paste,
44@@ -964,10 +961,7 @@
45 self.menuitem_undo.set_sensitive(True)
46 if len(self.active_pane.searchentry._redo_stack) > 0:
47 self.menuitem_redo.set_sensitive(True)
48- bounds = self.active_pane.searchentry.get_selection_bounds()
49- if bounds:
50- self.menuitem_cut.set_sensitive(True)
51- self.menuitem_copy.set_sensitive(True)
52+
53 self.menuitem_paste.set_sensitive(True)
54 if self.active_pane.searchentry.get_text():
55 self.menuitem_delete.set_sensitive(True)
56@@ -998,15 +992,10 @@
57 def on_menuitem_redo_activate(self, menuitem):
58 self.active_pane.searchentry.redo()
59
60- def on_menuitem_cut_activate(self, menuitem):
61- self.active_pane.searchentry.cut_clipboard()
62-
63 def on_menuitem_copy_activate(self, menuitem):
64 if (self.active_pane and
65 self.active_pane.is_app_details_view_showing()):
66 self.active_pane.app_details_view.desc.copy_clipboard()
67- elif self.active_pane:
68- self.active_pane.searchentry.copy_clipboard()
69
70 def on_menuitem_paste_activate(self, menuitem):
71 self.active_pane.searchentry.paste_clipboard()

Subscribers

People subscribed via source and target branches