hamster-applet r897 - in trunk: data hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r897 - in trunk: data hamster
- Date: Tue, 14 Apr 2009 18:43:17 +0000 (UTC)
Author: tbaugis
Date: Tue Apr 14 18:43:17 2009
New Revision: 897
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=897&view=rev
Log:
show a hint line when no activity is being tracked.
fixes bug 567059
Modified:
trunk/data/applet.ui
trunk/hamster/applet.py
Modified: trunk/data/applet.ui
==============================================================================
--- trunk/data/applet.ui (original)
+++ trunk/data/applet.ui Tue Apr 14 18:43:17 2009
@@ -37,29 +37,99 @@
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label2">
+ <object class="GtkAlignment" id="alignment3">
<property name="visible">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="label" translatable="yes">_Activity:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">activity-list</property>
+ <property name="yalign">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">4</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">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="label" translatable="yes">_Activity:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">activity-list</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment1">
+ <object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
- <property name="yscale">0</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkComboBoxEntry" id="activity-list">
- <property name="width_request">250</property>
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <signal name="changed" handler="on_activity_switched"/>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkComboBoxEntry" id="activity-list">
+ <property name="width_request">250</property>
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <signal name="changed" handler="on_activity_switched"/>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="more_info_label">
+ <property name="xalign">0</property>
+ <property name="left_padding">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <object class="GtkLabel" id="input_description">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.50999999046325684</property>
+ <property name="label" translatable="yes"><span size="small" >Type in activity and hit Enter to start tracking!</span></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xscale">0</property>
+ <child>
+ <object class="GtkButton" id="more_info_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <signal name="clicked" handler="on_more_info_button_clicked"/>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><span size="small" color="blue" underline="single">Tell me more</span></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
@@ -67,17 +137,23 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="stop_tracking">
- <property name="label" translatable="yes">_Stop Tracking</property>
+ <object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">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="use_underline">True</property>
- <signal name="clicked" handler="on_stop_tracking"/>
+ <property name="yalign">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkButton" id="stop_tracking">
+ <property name="label" translatable="yes">_Stop Tracking</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="use_underline">True</property>
+ <signal name="clicked" handler="on_stop_tracking"/>
+ </object>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
Modified: trunk/hamster/applet.py
==============================================================================
--- trunk/hamster/applet.py (original)
+++ trunk/hamster/applet.py Tue Apr 14 18:43:17 2009
@@ -278,12 +278,37 @@
dispatcher.add_handler('gconf_timeout_enabled_changed', self.on_timeout_enabled_changed)
self.on_timeout_enabled_changed(None, self.config.get_timeout_enabled())
+
# init nagging timeout
if PYNOTIFY:
self.notify = Notifier('HamsterApplet', gtk.STOCK_DIALOG_QUESTION, self.button)
dispatcher.add_handler('gconf_notify_interval_changed', self.on_notify_interval_changed)
self.on_notify_interval_changed(None, self.config.get_notify_interval())
+ def give_more_info(self):
+ def on_response(self, widget):
+ self.destroy()
+ message_dialog = gtk.MessageDialog(buttons = gtk.BUTTONS_OK)
+ message_dialog.set_property("title", _("What to type in the activity box?"))
+ message_dialog.connect("response", on_response)
+
+ more_info = _("""There is simple syntax that enables you to add details to your activities:
+
+"@" symbol marks category. Example: "watering flowers home" will start tracking activity "watering flowers" in category "home".
+
+Comma (",") marks beginning of description. Example: "watering flowers, begonias and forgetmenots" will start tracking activity "watering flowers" and add description "begonias and forgetmenots" to it.
+
+Both can be combined: "watering flowers home, begonias and forgetmenots" will work just fine!
+
+Now, start tracking!
+ """)
+
+ message_dialog.set_markup(more_info)
+ message_dialog.show()
+
+ def on_more_info_button_clicked(self, button):
+ self.give_more_info()
+
def setup_activity_tree(self):
self.treeview = self._gui.get_object('today')
self.treeview.set_tooltip_column(1)
@@ -608,8 +633,10 @@
self.activity_list.child.set_text(label)
self.activity_list.child.select_region(0, -1)
+ self._gui.get_object("more_info_label").hide()
else:
self.activity_list.child.set_text('')
+ self._gui.get_object("more_info_label").show()
# doing unstick / stick here, because sometimes while switching
# between workplaces window still manages to dissappear
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]