[gnome-games/sudoku-tube] Hide game detail in an expander
- From: Zhang Sen <zhangsen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games/sudoku-tube] Hide game detail in an expander
- Date: Thu, 20 Aug 2009 03:56:11 +0000 (UTC)
commit 59794ea0766b31a955643f51716f25c7332deb6f
Author: Zhang Sen <zh jesse gmail com>
Date: Thu Aug 20 11:08:19 2009 +0800
Hide game detail in an expander
gnome-sudoku/data/network_game_offer.ui | 44 ++++++++++++++++++++++++------
gnome-sudoku/src/lib/tube_handler.py | 12 ++++++--
2 files changed, 44 insertions(+), 12 deletions(-)
---
diff --git a/gnome-sudoku/data/network_game_offer.ui b/gnome-sudoku/data/network_game_offer.ui
index 593d801..c7fe1e0 100644
--- a/gnome-sudoku/data/network_game_offer.ui
+++ b/gnome-sudoku/data/network_game_offer.ui
@@ -16,7 +16,7 @@
<object class="GtkLabel" id="name_label">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">label</property>
+ <property name="label" translatable="yes">user name</property>
<property name="selectable">True</property>
<attributes>
<attribute name="weight" value="semibold"/>
@@ -30,14 +30,40 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="info_label">
+ <object class="GtkExpander" id="expander">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkLabel" id="detail_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">dif_detail_label</property>
+ <property name="selectable">True</property>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="info_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">info_label</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="mode_label">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">label</property>
+ <property name="label" translatable="yes">mode_label</property>
<property name="selectable">True</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
<child internal-child="action_area">
@@ -45,7 +71,7 @@
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="button2">
+ <object class="GtkButton" id="button_no">
<property name="label">gtk-no</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -59,7 +85,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="button1">
+ <object class="GtkButton" id="button_ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -78,14 +104,14 @@
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
- <property name="position">2</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
</child>
<action-widgets>
- <action-widget response="-6">button2</action-widget>
- <action-widget response="-5">button1</action-widget>
+ <action-widget response="-6">button_no</action-widget>
+ <action-widget response="-5">button_ok</action-widget>
</action-widgets>
</object>
</interface>
diff --git a/gnome-sudoku/src/lib/tube_handler.py b/gnome-sudoku/src/lib/tube_handler.py
index fc4f6fc..1737914 100644
--- a/gnome-sudoku/src/lib/tube_handler.py
+++ b/gnome-sudoku/src/lib/tube_handler.py
@@ -122,9 +122,15 @@ class TubeHandler(dbus.service.Object):
name_label.set_text(_("%s wants to play with you") % alias)
info = sudoku.SudokuRater(self._puzzle).difficulty()
- mode_str = _("Collaborative") if mode else _("Competitive")
- text = info.to_string() + "\n\n" + _("Game mode: %s") % mode_str
info_label = builder.get_object("info_label")
- info_label.set_text(text)
+ info_label.set_text(_("Difficulty: %s ") % info.value_string())
+
+ detail_label = builder.get_object("detail_label")
+ detail_label.set_text(info.to_string())
+
+ mode_str = _("Collaborative") if mode else _("Competitive")
+ text = _("Game mode: %s") % mode_str
+ mode_label = builder.get_object("mode_label")
+ mode_label.set_text(text)
dialog.run()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]