coding standards, HIG plz adhere! :)
This commit is contained in:
parent
b9e37da407
commit
9a03441f75
|
@ -534,7 +534,7 @@ class BaseTooltip:
|
||||||
self.id = None
|
self.id = None
|
||||||
|
|
||||||
def populate(self, data):
|
def populate(self, data):
|
||||||
''' this method must be overridenby all extenders '''
|
''' this method must be overriden by all extenders '''
|
||||||
self.create_window()
|
self.create_window()
|
||||||
self.win.add(gtk.Label(data))
|
self.win.add(gtk.Label(data))
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ class StatusTable:
|
||||||
self.table.attach(self.text_lable, 1, 4, 1, 2)
|
self.table.attach(self.text_lable, 1, 4, 1, 2)
|
||||||
|
|
||||||
def get_status_info(self, resource, priority, show, status):
|
def get_status_info(self, resource, priority, show, status):
|
||||||
str_status = resource + ' ('+str(priority)+')'
|
str_status = resource + ' (' + str(priority) + ')'
|
||||||
if status:
|
if status:
|
||||||
status = status.strip()
|
status = status.strip()
|
||||||
if status != '':
|
if status != '':
|
||||||
|
@ -631,7 +631,7 @@ class StatusTable:
|
||||||
str_status += ' - ' + status
|
str_status += ' - ' + status
|
||||||
return gtkgui_helpers.escape_for_pango_markup(str_status)
|
return gtkgui_helpers.escape_for_pango_markup(str_status)
|
||||||
|
|
||||||
# "too long status make the tooltip large than the screen" problem, reported by koorek
|
# fix "too long status make the tooltip large than the screen" problem
|
||||||
def strip_text(self, text, max_length):
|
def strip_text(self, text, max_length):
|
||||||
text = text.strip()
|
text = text.strip()
|
||||||
if len(text) > max_length:
|
if len(text) > max_length:
|
||||||
|
@ -670,8 +670,7 @@ class NotificationAreaTooltip(BaseTooltip, StatusTable):
|
||||||
self.plugin = plugin
|
self.plugin = plugin
|
||||||
BaseTooltip.__init__(self)
|
BaseTooltip.__init__(self)
|
||||||
StatusTable.__init__(self)
|
StatusTable.__init__(self)
|
||||||
|
|
||||||
|
|
||||||
def populate(self, data):
|
def populate(self, data):
|
||||||
self.create_window()
|
self.create_window()
|
||||||
self.create_table()
|
self.create_table()
|
||||||
|
@ -696,8 +695,8 @@ class NotificationAreaTooltip(BaseTooltip, StatusTable):
|
||||||
# the other solution is to hide offline accounts
|
# the other solution is to hide offline accounts
|
||||||
elif status == 'offline':
|
elif status == 'offline':
|
||||||
message = helpers.get_uf_show(status)
|
message = helpers.get_uf_show(status)
|
||||||
accounts.append({'name':account, 'status_line':single_line,
|
accounts.append({'name': account, 'status_line': single_line,
|
||||||
'show':status, 'message':message})
|
'show': status, 'message': message})
|
||||||
unread_messages_no = self.plugin.roster.nb_unread
|
unread_messages_no = self.plugin.roster.nb_unread
|
||||||
if unread_messages_no > 1:
|
if unread_messages_no > 1:
|
||||||
text = _('Gajim - %s unread messages') % unread_messages_no
|
text = _('Gajim - %s unread messages') % unread_messages_no
|
||||||
|
@ -1039,7 +1038,7 @@ _('Without a connection, you can not change your password.')).get_response()
|
||||||
if rep == gtk.RESPONSE_OK:
|
if rep == gtk.RESPONSE_OK:
|
||||||
password1 = self.password1_entry.get_text()
|
password1 = self.password1_entry.get_text()
|
||||||
if not password1:
|
if not password1:
|
||||||
ErrorDialog(_('Invalid password.'),
|
ErrorDialog(_('Invalid password'),
|
||||||
_('You must enter a password.')).get_response()
|
_('You must enter a password.')).get_response()
|
||||||
continue
|
continue
|
||||||
password2 = self.password2_entry.get_text()
|
password2 = self.password2_entry.get_text()
|
||||||
|
@ -1350,7 +1349,7 @@ class XMLConsoleWindow:
|
||||||
|
|
||||||
#self.input_textview.set_name('input')
|
#self.input_textview.set_name('input')
|
||||||
#s = '''\
|
#s = '''\
|
||||||
style "console" { GtkTextView::cursor-color="%s" }
|
#style "console" { GtkTextView::cursor-color="%s" }
|
||||||
#widget "*.*.input" style : application "console"''' % '#FFFFFF'
|
#widget "*.*.input" style : application "console"''' % '#FFFFFF'
|
||||||
#gtk.rc_parse_string(s)
|
#gtk.rc_parse_string(s)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue