~ubuntu-branches/ubuntu/oneiric/alacarte/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/10-properties_button.patch

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-21 18:07:53 UTC
  • Revision ID: james.westby@ubuntu.com-20100521180753-hbaqpim5d2ozfsmo
Tags: 0.13.1-1ubuntu1
* debian/patches/10-properties_button.patch: 
  - patch for adding "properties" and "delete" buttons
* debian/rules:
  - add gettext domain to desktop file and run intltool-update 
    during the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nurp alacarte-0.12.1/Alacarte/MainWindow.py alacarte-0.12.1.new/Alacarte/MainWindow.py
 
2
--- alacarte-0.12.1/Alacarte/MainWindow.py      2009-05-04 15:55:43.000000000 +0200
 
3
+++ alacarte-0.12.1.new/Alacarte/MainWindow.py  2009-05-12 02:07:28.000000000 +0200
 
4
@@ -387,6 +387,8 @@ class MainWindow:
 
5
                self.tree.get_object('move_up_button').set_sensitive(False)
 
6
                self.tree.get_object('move_down_button').set_sensitive(False)
 
7
                self.tree.get_object('new_separator_button').set_sensitive(False)
 
8
+               self.tree.get_object('properties_button').set_sensitive(False)
 
9
+               self.tree.get_object('delete_button').set_sensitive(False)
 
10
 
 
11
        def on_menu_tree_drag_data_get(self, treeview, context, selection, target_id, etime):
 
12
                menus, iter = treeview.get_selection().get_selected()
 
13
@@ -434,14 +436,17 @@ class MainWindow:
 
14
                item = items[iter][3]
 
15
                self.tree.get_object('edit_delete').set_sensitive(True)
 
16
                self.tree.get_object('new_separator_button').set_sensitive(True)
 
17
+               self.tree.get_object('delete_button').set_sensitive(True)
 
18
                if self.editor.canRevert(item):
 
19
                        self.tree.get_object('edit_revert_to_original').set_sensitive(True)
 
20
                else:
 
21
                        self.tree.get_object('edit_revert_to_original').set_sensitive(False)
 
22
                if not item.get_type() == gmenu.TYPE_SEPARATOR:
 
23
                        self.tree.get_object('edit_properties').set_sensitive(True)
 
24
+                       self.tree.get_object('properties_button').set_sensitive(True)
 
25
                else:
 
26
                        self.tree.get_object('edit_properties').set_sensitive(False)
 
27
+                       self.tree.get_object('properties_button').set_sensitive(False)
 
28
 
 
29
                # If first item...
 
30
                if items.get_path(iter)[0] == 0:
 
31
@@ -609,6 +614,11 @@ class MainWindow:
 
32
                        pass
 
33
                gobject.timeout_add(10, self.quit)
 
34
 
 
35
+       def on_properties_button_clicked(self, button):
 
36
+               self.on_edit_properties_activate(None)
 
37
+       def on_delete_button_clicked(self, button):
 
38
+               self.on_edit_delete_activate(None)
 
39
+
 
40
        def on_style_set(self, *args):
 
41
                self.loadUpdates()
 
42
 
 
43
diff -Nurp alacarte-0.12.1/data/alacarte.ui alacarte-0.12.1.new/data/alacarte.ui
 
44
--- alacarte-0.12.1/data/alacarte.ui    2009-05-04 15:55:43.000000000 +0200
 
45
+++ alacarte-0.12.1.new/data/alacarte.ui        2009-05-12 02:07:43.000000000 +0200
 
46
@@ -610,6 +610,36 @@
 
47
                                             </child>
 
48
                                           </object>
 
49
                                         </child>
 
50
+                                        <child>
 
51
+                                          <object class="GtkButton" id="properties_button">
 
52
+                                            <property name="label" translatable="no">gtk-properties</property>
 
53
+                                            <property name="visible">True</property>
 
54
+                                            <property name="can_focus">True</property>
 
55
+                                            <property name="receives_default">True</property>
 
56
+                                            <property name="use_stock">True</property>
 
57
+                                           <signal handler="on_properties_button_clicked" name="clicked"/>
 
58
+                                          </object>
 
59
+                                          <packing>
 
60
+                                            <property name="expand">False</property>
 
61
+                                            <property name="fill">False</property>
 
62
+                                            <property name="position">2</property>
 
63
+                                          </packing>
 
64
+                                        </child>
 
65
+                                        <child>
 
66
+                                          <object class="GtkButton" id="delete_button">
 
67
+                                            <property name="label" translatable="no">gtk-delete</property>
 
68
+                                            <property name="visible">True</property>
 
69
+                                            <property name="can_focus">True</property>
 
70
+                                            <property name="receives_default">True</property>
 
71
+                                            <property name="use_stock">True</property>
 
72
+                                           <signal handler="on_delete_button_clicked" name="clicked"/>
 
73
+                                          </object>
 
74
+                                          <packing>
 
75
+                                            <property name="expand">False</property>
 
76
+                                            <property name="fill">False</property>
 
77
+                                            <property name="position">3</property>
 
78
+                                          </packing>
 
79
+                                       </child>
 
80
                                       </object>
 
81
                                     </child>
 
82
                                   </object>