[dots] Add nemonics and use activate signal instead of button-press
- From: Fernando Herrera de las Heras <fherrera src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dots] Add nemonics and use activate signal instead of button-press
- Date: Tue, 14 Sep 2010 02:15:52 +0000 (UTC)
commit f1d20bfc58b3d4361b1ac02b383667ed95e685cf
Author: Fernando Herrera <fherrera onirica com>
Date: Tue Sep 14 04:12:33 2010 +0200
Add nemonics and use activate signal instead of button-press
data/app_window.xml | 35 +++++++++++++++++------------------
data/config.xml | 32 ++++++++++++++++++++++++++------
dots/table_editor.py | 14 ++++++--------
3 files changed, 49 insertions(+), 32 deletions(-)
---
diff --git a/data/app_window.xml b/data/app_window.xml
index 358d150..db635e6 100644
--- a/data/app_window.xml
+++ b/data/app_window.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
@@ -41,7 +41,7 @@ are placed in the same directory as the table</property>
<object class="GtkWindow" id="window1">
<property name="default_width">480</property>
<property name="default_height">360</property>
- <signal name="delete-event" handler="_onQuit" swapped="no"/>
+ <signal name="delete_event" handler="_onQuit"/>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
@@ -160,17 +160,17 @@ are placed in the same directory as the table</property>
<child>
<object class="GtkRadioMenuItem" id="ascii_radio">
<property name="visible">True</property>
- <property name="label" translatable="yes">ASCII</property>
+ <property name="label" translatable="yes">_ASCII</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_as_radio">True</property>
- <signal name="toggled" handler="_OnBrailleViewToggle" swapped="no"/>
+ <signal name="toggled" handler="_OnBrailleViewToggle"/>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="braille_radio">
<property name="visible">True</property>
- <property name="label" translatable="yes">Braille</property>
+ <property name="label" translatable="yes">_Braille</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
<property name="group">ascii_radio</property>
@@ -179,10 +179,9 @@ are placed in the same directory as the table</property>
<child>
<object class="GtkCheckMenuItem" id="line_check">
<property name="visible">True</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Revision line</property>
+ <property name="label" translatable="yes">_Revision line</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="_OnRevisionLine" swapped="no"/>
+ <signal name="toggled" handler="_OnRevisionLine"/>
</object>
</child>
</object>
@@ -209,7 +208,7 @@ are placed in the same directory as the table</property>
<property name="visible">True</property>
<property name="label" translatable="yes">_Edit current Table...</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="_OnTranslationEditTableActivate" swapped="no"/>
+ <signal name="activate" handler="_OnTranslationEditTableActivate"/>
</object>
</child>
<child>
@@ -217,7 +216,7 @@ are placed in the same directory as the table</property>
<property name="visible">True</property>
<property name="label" translatable="yes">_Format...</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="_OnTranslationFormatActivate" swapped="no"/>
+ <signal name="activate" handler="_OnTranslationFormatActivate"/>
</object>
</child>
</object>
@@ -318,7 +317,7 @@ are placed in the same directory as the table</property>
<object class="GtkEntry" id="reviewentry">
<property name="can_focus">True</property>
<property name="editable">False</property>
- <property name="invisible_char">â?¢</property>
+ <property name="invisible_char">•</property>
</object>
<packing>
<property name="expand">False</property>
@@ -342,34 +341,34 @@ are placed in the same directory as the table</property>
<object class="GtkAction" id="action_open">
<property name="tooltip">Open a file</property>
<property name="stock_id">gtk-open</property>
- <signal name="activate" handler="_onOpen" swapped="no"/>
+ <signal name="activate" handler="_onOpen"/>
</object>
<object class="GtkAction" id="action_save">
<property name="stock_id">gtk-save</property>
<property name="sensitive">False</property>
- <signal name="activate" handler="_onSave" swapped="no"/>
+ <signal name="activate" handler="_onSave"/>
</object>
<object class="GtkAction" id="action_save_as">
<property name="stock_id">gtk-save-as</property>
<property name="sensitive">False</property>
- <signal name="activate" handler="_onSaveAs" swapped="no"/>
+ <signal name="activate" handler="_onSaveAs"/>
</object>
<object class="GtkAction" id="action_quit">
<property name="stock_id">gtk-quit</property>
- <signal name="activate" handler="_onQuit" swapped="no"/>
+ <signal name="activate" handler="_onQuit"/>
</object>
<object class="GtkAction" id="action_print">
<property name="stock_id">gtk-print</property>
<property name="sensitive">False</property>
- <signal name="activate" handler="_onPrint" swapped="no"/>
+ <signal name="activate" handler="_onPrint"/>
</object>
<object class="GtkAction" id="action_about">
<property name="stock_id">gtk-about</property>
- <signal name="activate" handler="_onAbout" swapped="no"/>
+ <signal name="activate" handler="_onAbout"/>
</object>
<object class="GtkAction" id="action_help">
<property name="stock_id">gtk-help</property>
- <signal name="activate" handler="_onHelp" swapped="no"/>
+ <signal name="activate" handler="_onHelp"/>
</object>
<object class="GtkMessageDialog" id="notext-dialog">
<property name="border_width">5</property>
diff --git a/data/config.xml b/data/config.xml
index 2f2b60f..bf98b59 100644
--- a/data/config.xml
+++ b/data/config.xml
@@ -21,7 +21,14 @@
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Show page numbers at:</property>
+ <property name="label" translatable="yes">_Show page numbers at:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">page_top</property>
+ <accessibility>
+ <relation type="label-for" target="page_top"/>
+ <relation type="label-for" target="page_bottom"/>
+ <relation type="label-for" target="page_none"/>
+ </accessibility>
</object>
<packing>
<property name="position">0</property>
@@ -33,10 +40,11 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkRadioButton" id="page_top">
- <property name="label" translatable="yes">Top</property>
+ <property name="label" translatable="yes">_Top</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -47,10 +55,11 @@
</child>
<child>
<object class="GtkRadioButton" id="page_bottom">
- <property name="label" translatable="yes">Bottom</property>
+ <property name="label" translatable="yes">_Bottom</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">page_top</property>
@@ -62,10 +71,11 @@
</child>
<child>
<object class="GtkRadioButton" id="page_none">
- <property name="label" translatable="yes">Don't show</property>
+ <property name="label" translatable="yes">_Don't show</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">page_top</property>
@@ -91,7 +101,12 @@
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="label" translatable="yes">Lines per page</property>
+ <property name="label" translatable="yes">_Lines per page</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">lines_entry</property>
+ <accessibility>
+ <relation type="label-for" target="lines_entry"/>
+ </accessibility>
</object>
<packing>
<property name="position">0</property>
@@ -123,7 +138,12 @@
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="label" translatable="yes">Cells per line</property>
+ <property name="label" translatable="yes">_Cells per line</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">lines_entry</property>
+ <accessibility>
+ <relation type="label-for" target="cells_entry"/>
+ </accessibility>
</object>
<packing>
<property name="position">0</property>
diff --git a/dots/table_editor.py b/dots/table_editor.py
index a4b07b3..eee0fc3 100755
--- a/dots/table_editor.py
+++ b/dots/table_editor.py
@@ -351,7 +351,7 @@ class TableEditor(gtk.Dialog):
tvcolumn.pack_start(cell, True)
tvcolumn.add_attribute(cell, 'text', 1)
- self.treeview.connect("button-press-event", self.row_clicked)
+ self.treeview.connect("row-activated", self.row_clicked)
scrolledwindow = gtk.ScrolledWindow ()
scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
@@ -360,18 +360,18 @@ class TableEditor(gtk.Dialog):
vbox = self.get_content_area()
buttonbox = gtk.HButtonBox()
buttonbox.set_layout(gtk.BUTTONBOX_START)
- button = gtk.Button(_("Add"))
+ button = gtk.Button(_("_Add"))
button.connect("clicked", self.add_clicked, self.treeview)
buttonbox.pack_start(button, False, False, 6)
- button = gtk.Button(_("Remove"))
+ button = gtk.Button(_("_Remove"))
button.connect("clicked", self.remove_clicked, self.treeview)
buttonbox.pack_start(button, False, False, 6)
vbox.pack_start(scrolledwindow, True, True, 6)
vbox.pack_start(buttonbox, False, False, 6)
- self.add_button(_("Cancel editing"), gtk.RESPONSE_CANCEL)
- self.add_button(_("Save table and use"), gtk.RESPONSE_OK)
+ self.add_button(_("_Cancel editing"), gtk.RESPONSE_CANCEL)
+ self.add_button(_("_Save table and use"), gtk.RESPONSE_OK)
def _write_line(self, model, path, iter, f):
@@ -427,9 +427,7 @@ class TableEditor(gtk.Dialog):
model, iter = selection.get_selected()
model.remove(iter)
- def row_clicked(self, view, event):
- if event.type != gtk.gdk._2BUTTON_PRESS:
- return
+ def row_clicked(self, view, path, col):
selection = view.get_selection();
model, iter = selection.get_selected()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]