[hamster-applet] dropped tell me more link in favour to icon in the textfield and pointing straight to input
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] dropped tell me more link in favour to icon in the textfield and pointing straight to input
- Date: Wed, 28 Jul 2010 06:44:07 +0000 (UTC)
commit 8201f4d58b3f16f16be3001de9ad12c016006c19
Author: Toms Bauģis <toms baugis gmail com>
Date: Tue Jul 27 16:32:40 2010 +0200
dropped tell me more link in favour to icon in the textfield and pointing straight to input
data/applet.ui | 57 +++++++++----------------------
data/hamster.ui | 85 ++++++++++++++++-----------------------------
src/hamster-time-tracker | 8 ++--
src/hamster/applet.py | 10 +++---
4 files changed, 55 insertions(+), 105 deletions(-)
---
diff --git a/data/applet.ui b/data/applet.ui
index 1095a1c..8db961c 100644
--- a/data/applet.ui
+++ b/data/applet.ui
@@ -78,60 +78,35 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox4">
- <property name="height_request">40</property>
+ <object class="GtkVBox" id="activity_info_box">
<property name="visible">True</property>
<child>
- <object class="GtkVBox" id="activity_info_box">
+ <object class="GtkLabel" id="last_activity_duration">
<property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="last_activity_duration">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label">1h 23m</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="last_activity_description">
- <property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="xalign">0</property>
- <property name="label">it's like in case if you need a description, i'll be here</property>
- <property name="wrap">True</property>
- <property name="ellipsize">end</property>
- <attributes>
- <attribute name="size" value="10000"/>
- </attributes>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label">1h 23m</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLinkButton" id="more_info_button">
- <property name="label" translatable="yes">Tell me more</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <object class="GtkLabel" id="last_activity_description">
+ <property name="visible">True</property>
<property name="no_show_all">True</property>
- <property name="relief">none</property>
<property name="xalign">0</property>
- <property name="uri"> </property>
- <signal name="clicked" handler="on_more_info_button_clicked" swapped="no"/>
+ <property name="label">it's like in case if you need a description, i'll be here</property>
+ <property name="wrap">True</property>
+ <property name="ellipsize">end</property>
+ <attributes>
+ <attribute name="size" value="10000"/>
+ </attributes>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/data/hamster.ui b/data/hamster.ui
index b231712..da65090 100644
--- a/data/hamster.ui
+++ b/data/hamster.ui
@@ -1,12 +1,13 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkAccelGroup" id="accelgroup"/>
<object class="GtkWindow" id="hamster-window">
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Time Tracker</property>
- <signal name="configure_event" handler="on_window_configure_event"/>
+ <signal name="configure-event" handler="on_window_configure_event" swapped="no"/>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
@@ -29,7 +30,7 @@
<property name="visible">True</property>
<property name="accel_path"><hamster-applet>/tracking/add</property>
<property name="label" translatable="yes">Add earlier activity</property>
- <signal name="activate" handler="on_menu_add_earlier_activate"/>
+ <signal name="activate" handler="on_menu_add_earlier_activate" swapped="no"/>
</object>
</child>
<child>
@@ -37,7 +38,7 @@
<property name="visible">True</property>
<property name="accel_path"><hamster-applet>/tracking/overview</property>
<property name="label" translatable="yes">Overview</property>
- <signal name="activate" handler="on_menu_overview_activate"/>
+ <signal name="activate" handler="on_menu_overview_activate" swapped="no"/>
</object>
</child>
<child>
@@ -46,7 +47,7 @@
<property name="accel_path"><hamster-applet>/tracking/stats</property>
<property name="label" translatable="yes">Statistics</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="on_menu_statistics_activate"/>
+ <signal name="activate" handler="on_menu_statistics_activate" swapped="no"/>
</object>
</child>
<child>
@@ -61,7 +62,7 @@
<property name="accel_path"><hamster-applet>/tracking/quit</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
- <signal name="activate" handler="close_window"/>
+ <signal name="activate" handler="close_window" swapped="no"/>
</object>
</child>
</object>
@@ -85,7 +86,7 @@
<property name="accel_path"><hamster-applet>/edit/prefs</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
- <signal name="activate" handler="on_menu_preferences_activate"/>
+ <signal name="activate" handler="on_menu_preferences_activate" swapped="no"/>
</object>
</child>
</object>
@@ -109,7 +110,7 @@
<property name="accel_path"><hamster-applet>/help/contents</property>
<property name="label" translatable="yes">Contents</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="on_menu_help_contents_activate"/>
+ <signal name="activate" handler="on_menu_help_contents_activate" swapped="no"/>
</object>
</child>
<child>
@@ -119,7 +120,7 @@
<property name="accel_path"><hamster-applet>/help/about</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
- <signal name="activate" handler="on_menu_about_activate"/>
+ <signal name="activate" handler="on_menu_about_activate" swapped="no"/>
</object>
</child>
</object>
@@ -184,62 +185,37 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox4">
- <property name="height_request">40</property>
+ <object class="GtkVBox" id="activity_info_box">
<property name="visible">True</property>
+ <property name="no_show_all">True</property>
<child>
- <object class="GtkVBox" id="activity_info_box">
+ <object class="GtkLabel" id="last_activity_duration">
<property name="visible">True</property>
<property name="no_show_all">True</property>
- <child>
- <object class="GtkLabel" id="last_activity_duration">
- <property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="xalign">0</property>
- <property name="label">1h 23m</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="last_activity_description">
- <property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="xalign">0</property>
- <property name="label">it's like in case if you need a description, i'll be here</property>
- <property name="wrap">True</property>
- <property name="ellipsize">end</property>
- <attributes>
- <attribute name="size" value="10000"/>
- </attributes>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label">1h 23m</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLinkButton" id="more_info_button">
- <property name="label" translatable="yes">Tell me more</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <object class="GtkLabel" id="last_activity_description">
+ <property name="visible">True</property>
<property name="no_show_all">True</property>
- <property name="relief">none</property>
<property name="xalign">0</property>
- <property name="uri"> </property>
- <signal name="clicked" handler="on_more_info_button_clicked"/>
+ <property name="label">it's like in case if you need a description, i'll be here</property>
+ <property name="wrap">True</property>
+ <property name="ellipsize">end</property>
+ <attributes>
+ <attribute name="size" value="10000"/>
+ </attributes>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -269,7 +245,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_stop_tracking_clicked"/>
+ <signal name="clicked" handler="on_stop_tracking_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -342,7 +318,7 @@
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_switch_activity_clicked"/>
+ <signal name="clicked" handler="on_switch_activity_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -357,7 +333,7 @@
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_switch_activity_clicked"/>
+ <signal name="clicked" handler="on_switch_activity_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -437,5 +413,4 @@
</object>
</child>
</object>
- <object class="GtkAccelGroup" id="accelgroup"/>
</interface>
diff --git a/src/hamster-time-tracker b/src/hamster-time-tracker
index 57cf8a1..c36c80c 100755
--- a/src/hamster-time-tracker
+++ b/src/hamster-time-tracker
@@ -40,6 +40,9 @@ class ProjectHamster(object):
self.get_widget("new_name_box").add(self.new_name)
self.new_name.connect("changed", self.on_activity_text_changed)
+ self.new_name.set_property("secondary-icon-name", "help")
+ self.new_name.connect("icon-press", self.on_more_info_button_clicked)
+
self.new_tags = widgets.TagsEntry()
self.new_tags.connect("tags_selected", self.on_switch_activity_clicked)
widgets.add_hint(self.new_tags, _("Tags"))
@@ -217,8 +220,6 @@ class ProjectHamster(object):
else:
self.get_widget("last_activity_name").set_text(activity['name'])
- self._gui.get_object("more_info_button").hide()
-
self.get_widget("last_activity_duration").set_text(stuff.format_duration(duration) or _("Just started"))
self.get_widget("last_activity_description").set_text(activity['description'] or "")
self.get_widget("activity_info_box").show()
@@ -231,7 +232,6 @@ class ProjectHamster(object):
self.get_widget("last_activity_name").set_text(_("No activity"))
self.get_widget("activity_info_box").hide()
- self._gui.get_object("more_info_button").show()
self.tag_box.draw([])
@@ -420,7 +420,7 @@ class ProjectHamster(object):
return self._gui.get_object(name)
def on_more_info_button_clicked(self, *args):
- gtk.show_uri(gtk.gdk.Screen(), "ghelp:hamster-applet", 0L)
+ gtk.show_uri(gtk.gdk.Screen(), "ghelp:hamster-applet#input", 0L)
return False
def close_window(self, *args):
diff --git a/src/hamster/applet.py b/src/hamster/applet.py
index 29b2460..ae61d54 100755
--- a/src/hamster/applet.py
+++ b/src/hamster/applet.py
@@ -202,6 +202,10 @@ class HamsterApplet(object):
self.new_name = widgets.ActivityEntry()
self.new_name.connect("value-entered", self.on_switch_activity_clicked)
+
+ self.new_name.set_property("secondary-icon-name", "help")
+ self.new_name.connect("icon-press", self.on_more_info_button_clicked)
+
widgets.add_hint(self.new_name, _("Activity"))
self.get_widget("new_name_box").add(self.new_name)
self.new_name.connect("changed", self.on_activity_text_changed)
@@ -395,8 +399,6 @@ class HamsterApplet(object):
self.get_widget("last_activity_name").set_text(activity['name'])
- self._gui.get_object("more_info_button").hide()
-
self.get_widget("last_activity_duration").set_text(stuff.format_duration(duration) or _("Just started"))
self.get_widget("last_activity_description").set_text(activity['description'] or "")
self.get_widget("activity_info_box").show()
@@ -409,8 +411,6 @@ class HamsterApplet(object):
self.get_widget("last_activity_name").set_text(_("No activity"))
self.get_widget("activity_info_box").hide()
- self._gui.get_object("more_info_button").show()
-
self.tag_box.draw([])
@@ -695,5 +695,5 @@ class HamsterApplet(object):
return self._gui.get_object(name)
def on_more_info_button_clicked(self, *args):
- gtk.show_uri(gtk.gdk.Screen(), "ghelp:hamster-applet", 0L)
+ gtk.show_uri(gtk.gdk.Screen(), "ghelp:hamster-applet#input", 0L)
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]