[wiican: 12/16] [s/ui] As toolbuttons doesn't show related GtkAction appearance, they've been unlinked.
- From: J. FÃlix OntaÃÃn <felixonta src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wiican: 12/16] [s/ui] As toolbuttons doesn't show related GtkAction appearance, they've been unlinked.
- Date: Sun, 19 Aug 2012 23:23:24 +0000 (UTC)
commit 257390935e61b7a8b9888bd48678feb6379e33d4
Author: J. FÃlix OntaÃÃn <fontanon emergya es>
Date: Wed Aug 15 17:47:06 2012 +0200
[s/ui] As toolbuttons doesn't show related GtkAction appearance, they've been unlinked.
data/mapping.ui | 83 ++++++++++++++++++++++++++++++-----------------
data/wiimotemanager.ui | 18 ++++++----
wiican/ui/managerdlg.py | 18 +++++-----
3 files changed, 73 insertions(+), 46 deletions(-)
---
diff --git a/data/mapping.ui b/data/mapping.ui
index 4203345..2a54994 100644
--- a/data/mapping.ui
+++ b/data/mapping.ui
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkCellRendererPixbuf" id="autostart_cell"/>
<object class="GtkToggleAction" id="autostart_toggleaction">
<property name="label" translatable="yes">Autostart running this mapping</property>
<property name="short_label" translatable="yes">_Autostart</property>
@@ -43,6 +42,7 @@
<property name="stock_id">gtk-new</property>
<signal name="activate" handler="new_action_activate_cb" swapped="no"/>
</object>
+ <object class="GtkCellRendererPixbuf" id="autostart_cell"/>
<object class="GtkDialog" id="mapping_editor_dlg">
<property name="width_request">400</property>
<property name="height_request">550</property>
@@ -70,6 +70,7 @@
<child>
<object class="GtkButton" id="cancel_btn">
<property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -85,6 +86,7 @@
<child>
<object class="GtkButton" id="save_btn">
<property name="label">gtk-save</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -369,6 +371,7 @@
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="help_btn">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -392,6 +395,7 @@
</child>
<child>
<object class="GtkToggleButton" id="execute_btn">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -514,6 +518,22 @@ Changes will be saved in a new mapping.</property>
<action-widget response="-5">save_btn</action-widget>
</action-widgets>
</object>
+ <object class="GtkListStore" id="mapping_store">
+ <columns>
+ <!-- column-name icon -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name autostart_icon -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ <!-- column-name comment -->
+ <column type="gchararray"/>
+ <!-- column-name visible -->
+ <column type="gboolean"/>
+ <!-- column-name mapping_id -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
<object class="GtkDialog" id="mapping_manager_dlg">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -541,6 +561,7 @@ Changes will be saved in a new mapping.</property>
<child>
<object class="GtkButton" id="close_btn">
<property name="label">gtk-close</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -576,11 +597,14 @@ Changes will be saved in a new mapping.</property>
<property name="toolbar_style">both</property>
<child>
<object class="GtkToolButton" id="toolbutton1">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="related_action">new_action</property>
- <property name="label" translatable="yes">toolbutton1</property>
+ <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">_New</property>
<property name="use_underline">True</property>
+ <property name="stock_id">gtk-new</property>
+ <signal name="clicked" handler="new_action_activate_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -589,11 +613,14 @@ Changes will be saved in a new mapping.</property>
</child>
<child>
<object class="GtkToolButton" id="toolbutton2">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="related_action">edit_action</property>
- <property name="label" translatable="yes">toolbutton2</property>
+ <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
+ <property name="stock_id">gtk-edit</property>
+ <signal name="clicked" handler="edit_action_activate_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -602,11 +629,13 @@ Changes will be saved in a new mapping.</property>
</child>
<child>
<object class="GtkToolButton" id="toolbutton3">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="related_action">delete_action</property>
- <property name="label" translatable="yes">toolbutton3</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="stock_id">gtk-delete</property>
+ <signal name="clicked" handler="delete_action_activate_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -614,12 +643,14 @@ Changes will be saved in a new mapping.</property>
</packing>
</child>
<child>
- <object class="GtkToggleToolButton" id="toolbutton7">
+ <object class="GtkToggleToolButton" id="autostart_toggletoolbutton">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="related_action">autostart_toggleaction</property>
- <property name="label" translatable="yes">toolbutton7</property>
+ <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">_Autostart</property>
<property name="use_underline">True</property>
+ <property name="icon_name">emblem-favorite</property>
</object>
<packing>
<property name="expand">False</property>
@@ -638,11 +669,14 @@ Changes will be saved in a new mapping.</property>
</child>
<child>
<object class="GtkToolButton" id="toolbutton4">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="related_action">import_action</property>
- <property name="label" translatable="yes">toolbutton4</property>
+ <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">_Import</property>
<property name="use_underline">True</property>
+ <property name="stock_id">gtk-add</property>
+ <signal name="clicked" handler="import_action_activate_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -651,11 +685,14 @@ Changes will be saved in a new mapping.</property>
</child>
<child>
<object class="GtkToolButton" id="toolbutton5">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="related_action">export_action</property>
- <property name="label" translatable="yes">toolbutton5</property>
+ <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">E_xport</property>
<property name="use_underline">True</property>
+ <property name="icon_name">package-x-generic</property>
+ <signal name="clicked" handler="export_action_activate_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -752,6 +789,7 @@ Changes will be saved in a new mapping.</property>
<child>
<object class="GtkButton" id="up_btn">
<property name="label">gtk-go-up</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -769,6 +807,7 @@ Changes will be saved in a new mapping.</property>
<child>
<object class="GtkButton" id="down_btn">
<property name="label">gtk-go-down</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -811,20 +850,4 @@ Changes will be saved in a new mapping.</property>
<action-widget response="-7">close_btn</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="mapping_store">
- <columns>
- <!-- column-name icon -->
- <column type="GdkPixbuf"/>
- <!-- column-name autostart_icon -->
- <column type="GdkPixbuf"/>
- <!-- column-name name -->
- <column type="gchararray"/>
- <!-- column-name comment -->
- <column type="gchararray"/>
- <!-- column-name visible -->
- <column type="gboolean"/>
- <!-- column-name mapping_id -->
- <column type="gchararray"/>
- </columns>
- </object>
</interface>
diff --git a/data/wiimotemanager.ui b/data/wiimotemanager.ui
index 082d78a..7447b08 100644
--- a/data/wiimotemanager.ui
+++ b/data/wiimotemanager.ui
@@ -17,6 +17,7 @@
<object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area2">
@@ -26,6 +27,7 @@
<child>
<object class="GtkButton" id="no_btn">
<property name="label">gtk-close</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -41,6 +43,7 @@
<child>
<object class="GtkButton" id="open_editor_btn">
<property name="label">gtk-edit</property>
+ <property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
@@ -863,6 +866,7 @@ Ulisse <ulisail yahoo it></property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
@@ -892,9 +896,9 @@ Ulisse <ulisail yahoo it></property>
<property name="can_focus">False</property>
<child>
<object class="GtkMenuItem" id="error_menuitem">
+ <property name="use_action_appearance">False</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label">error</property>
<property name="use_underline">True</property>
</object>
@@ -902,9 +906,9 @@ Ulisse <ulisail yahoo it></property>
<child>
<object class="GtkImageMenuItem" id="edit_menuitem">
<property name="label" translatable="yes">Edit mappings...</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="image">image2</property>
<property name="use_stock">False</property>
<signal name="activate" handler="preferences_cb" swapped="no"/>
@@ -912,9 +916,9 @@ Ulisse <ulisail yahoo it></property>
</child>
<child>
<object class="GtkCheckMenuItem" id="mngrstartup_menuitem">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Show mappings on startup</property>
<property name="use_underline">True</property>
<signal name="toggled" handler="mngrstartup_menuitem_toggled_cb" swapped="no"/>
@@ -930,26 +934,26 @@ Ulisse <ulisail yahoo it></property>
<child>
<object class="GtkImageMenuItem" id="disconnect_menuitem">
<property name="label">gtk-disconnect</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="menuitem1">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem4">
<property name="label">gtk-about</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="about_cb" swapped="no"/>
@@ -958,9 +962,9 @@ Ulisse <ulisail yahoo it></property>
<child>
<object class="GtkImageMenuItem" id="menuitem5">
<property name="label">gtk-quit</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="quit_cb" swapped="no"/>
diff --git a/wiican/ui/managerdlg.py b/wiican/ui/managerdlg.py
index ef60cd9..91a6338 100644
--- a/wiican/ui/managerdlg.py
+++ b/wiican/ui/managerdlg.py
@@ -49,14 +49,14 @@ class MappingManagerDialog(object):
if not builder.add_objects_from_file(MAPPING_UI,
['mapping_manager_dlg', 'image3', 'image4', 'mapping_store',
'new_action', 'edit_action', 'delete_action',
- 'import_action', 'export_action', 'autostart_toggleaction']):
+ 'import_action', 'export_action', 'autostart_toggletoolbutton']):
raise 'Cant load %s' % MAPPING_UI
builder.connect_signals(self)
self.mapping_dlg = builder.get_object('mapping_manager_dlg')
self.mapping_store = builder.get_object('mapping_store')
self.mapping_list = builder.get_object('mapping_list')
- self.autostart_toggleaction = builder.get_object('autostart_toggleaction')
+ self.autostart_ttb = builder.get_object('autostart_toggletoolbutton')
# Enable Drag&Drop
target_entries = [('catalog', gtk.TARGET_SAME_WIDGET, 0)]
@@ -90,8 +90,8 @@ class MappingManagerDialog(object):
# Hack? Save this signal id for blocking at
# MappingManagerDialog::mapping_list_cursor_changed_cb()
- self.autostart_toggle_signal_id = self.autostart_toggleaction.connect('toggled',
- self.autostart_toggle_action_toggled_cb)
+ self.autostart_toggle_signal_id = self.autostart_ttb.connect('toggled',
+ self.autostart_toggle_action_toggled_cb)
pref_store.loadconf()
self.mapping_dlg.resize(pref_store.options['mapping_dlg_width'],
@@ -168,9 +168,9 @@ class MappingManagerDialog(object):
is_def_mapping = mapping_manager.is_default_mapping(mapping_id)
# Hack? Prevent triggering autostart_toggle_action_toggled_cb
- self.autostart_toggleaction.handler_block(self.autostart_toggle_signal_id)
- self.autostart_toggleaction.set_active(is_def_mapping)
- self.autostart_toggleaction.handler_unblock(self.autostart_toggle_signal_id)
+ self.autostart_ttb.handler_block(self.autostart_toggle_signal_id)
+ self.autostart_ttb.set_active(is_def_mapping)
+ self.autostart_ttb.handler_unblock(self.autostart_toggle_signal_id)
def delete_action_activate_cb(self, widget):
selection = self.mapping_list.get_selection()
@@ -295,7 +295,7 @@ class MappingManagerDialog(object):
mapping_id = model[selected][MAPPING_ID_COL]
if mapping_manager.is_default_mapping(mapping_id):
- self.autostart_toggleaction.set_active(False)
+ self.autostart_ttb.set_active(False)
model[selected][AUTOSTART_COL] = None
mapping_manager.set_default_mapping(None)
else:
@@ -303,7 +303,7 @@ class MappingManagerDialog(object):
# TODO: autostart as radiobuttons-type widgets
for item in model: item[AUTOSTART_COL] = None
- self.autostart_toggleaction.set_active(True)
+ self.autostart_ttb.set_active(True)
model[selected][AUTOSTART_COL] = autostart_icon
mapping_manager.set_default_mapping(mapping_id)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]