[wiican: 6/15] [s][ui] indicator status messages changed from tooltips to menuitems
- From: J. FÃlix OntaÃÃn <felixonta src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wiican: 6/15] [s][ui] indicator status messages changed from tooltips to menuitems
- Date: Mon, 8 Aug 2011 11:54:31 +0000 (UTC)
commit 50ffc0ba582cbe1b0efa42d4eca04cb8a7307c92
Author: J. FÃlix OntaÃÃn <fontanon emergya es>
Date: Fri Aug 5 19:17:59 2011 +0200
[s][ui] indicator status messages changed from tooltips to menuitems
bin/wiican | 11 ++++++-----
data/wiimotemanager.ui | 9 +++++++++
2 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/bin/wiican b/bin/wiican
index 0502770..fdc865e 100755
--- a/bin/wiican
+++ b/bin/wiican
@@ -67,6 +67,7 @@ class WiicanIndicator(appindicator.Indicator, GConfStore):
self.aboutdlg = builder.get_object('WiiAboutDialog')
self.main_menu = builder.get_object('main_menu')
self.mngrstartup_menuitem = builder.get_object('mngrstartup_menuitem')
+ self.error_menuitem = builder.get_object('error_menuitem')
self.set_menu(self.main_menu)
self.aboutdlg.connect('response', lambda d, r: d.hide())
@@ -106,19 +107,20 @@ class WiicanIndicator(appindicator.Indicator, GConfStore):
def __set_no_bluetooth_st(self):
self.set_icon('wiican-off')
- #self.set_tooltip(_('Plug a bluetooth adapter'))
+ self.error_menuitem.get_child().set_text(_('Plug a bluetooth adapter'))
+ self.error_menuitem.set_visible(True)
self.__disconnect_item.set_sensitive(False)
def __set_no_uinput_st(self):
self.set_icon('wiican-off')
- #self.set_tooltip(_('Please load uinput module first'))
+ self.error_menuitem.get_child().set_text(_('Please load uinput module first'))
+ self.error_menuitem.set_visible(True)
self.__disconnect_item.set_sensitive(False)
def __idle_st(self):
self.__disconnect_item.set_sensitive(False)
+ self.error_menuitem.set_visible(False)
self.set_icon('wiican-on')
- #self.set_tooltip(_('Hold left button for use wiimote\n' \
- #'Right button for menu'))
def __discovering_st(self):
def animate():
@@ -129,7 +131,6 @@ class WiicanIndicator(appindicator.Indicator, GConfStore):
return True
self.__disconnect_item.set_sensitive(True)
- #self.set_tooltip(_('Discovering Wiimote'))
gobject.timeout_add(500, animate)
def __load_mappings_menu(self):
diff --git a/data/wiimotemanager.ui b/data/wiimotemanager.ui
index f649cfd..30632ab 100644
--- a/data/wiimotemanager.ui
+++ b/data/wiimotemanager.ui
@@ -860,6 +860,15 @@ Ulisse <ulisail yahoo it></property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
+ <object class="GtkMenuItem" id="error_menuitem">
+ <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>
+ </child>
+ <child>
<object class="GtkImageMenuItem" id="edit_menuitem">
<property name="label" translatable="yes">Edit mappings...</property>
<property name="visible">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]