|
|
@ -24,7 +24,6 @@ gobject.threads_init() |
|
|
|
|
|
|
|
|
|
|
|
import logging |
|
|
|
import logging |
|
|
|
import urllib2 |
|
|
|
import urllib2 |
|
|
|
import webbrowser |
|
|
|
|
|
|
|
import gettext |
|
|
|
import gettext |
|
|
|
|
|
|
|
|
|
|
|
from mitterlib.ui.helpers.image_helpers import find_image |
|
|
|
from mitterlib.ui.helpers.image_helpers import find_image |
|
|
@ -84,8 +83,7 @@ class Interface(object): |
|
|
|
(menu, toolbar, accelerators) = self._create_menu_and_toolbar() |
|
|
|
(menu, toolbar, accelerators) = self._create_menu_and_toolbar() |
|
|
|
self._update_field = UpdateBox( |
|
|
|
self._update_field = UpdateBox( |
|
|
|
self._images['avatar'], |
|
|
|
self._images['avatar'], |
|
|
|
self._options[self.NAMESPACE]['spell_check'] |
|
|
|
self._options[self.NAMESPACE]['spell_check']) |
|
|
|
) |
|
|
|
|
|
|
|
self._statusbar = self._create_statusbar() |
|
|
|
self._statusbar = self._create_statusbar() |
|
|
|
|
|
|
|
|
|
|
|
# the messages grid |
|
|
|
# the messages grid |
|
|
@ -299,7 +297,8 @@ class Interface(object): |
|
|
|
view_messages_action = gtk.Action('Messages', _('_Messages'), |
|
|
|
view_messages_action = gtk.Action('Messages', _('_Messages'), |
|
|
|
_('Display messages'), None) |
|
|
|
_('Display messages'), None) |
|
|
|
view_messages_action.connect('activate', self._change_tab, 0) |
|
|
|
view_messages_action.connect('activate', self._change_tab, 0) |
|
|
|
self._action_group.add_action_with_accel(view_messages_action, '<Alt>1') |
|
|
|
self._action_group.add_action_with_accel(view_messages_action, |
|
|
|
|
|
|
|
'<Alt>1') |
|
|
|
|
|
|
|
|
|
|
|
view_replies_action = gtk.Action('Replies', _('_Replies'), |
|
|
|
view_replies_action = gtk.Action('Replies', _('_Replies'), |
|
|
|
_('Display replies'), None) |
|
|
|
_('Display replies'), None) |
|
|
@ -322,7 +321,6 @@ class Interface(object): |
|
|
|
|
|
|
|
|
|
|
|
return (main_menu, main_toolbar, uimanager.get_accel_group()) |
|
|
|
return (main_menu, main_toolbar, uimanager.get_accel_group()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _create_statusbar(self): |
|
|
|
def _create_statusbar(self): |
|
|
|
"""Create the statusbar.""" |
|
|
|
"""Create the statusbar.""" |
|
|
|
statusbar = gtk.Statusbar() |
|
|
|
statusbar = gtk.Statusbar() |
|
|
@ -361,7 +359,6 @@ class Interface(object): |
|
|
|
# ------------------------------------------------------------ |
|
|
|
# ------------------------------------------------------------ |
|
|
|
# Helper functions |
|
|
|
# Helper functions |
|
|
|
# ------------------------------------------------------------ |
|
|
|
# ------------------------------------------------------------ |
|
|
|
|
|
|
|
|
|
|
|
def _update_statusbar(self, message): |
|
|
|
def _update_statusbar(self, message): |
|
|
|
"""Update the statusbar with the message.""" |
|
|
|
"""Update the statusbar with the message.""" |
|
|
|
self._statusbar.pop(self._statusbar_context) |
|
|
|
self._statusbar.pop(self._statusbar_context) |
|
|
@ -397,8 +394,7 @@ class Interface(object): |
|
|
|
'message_count': str(messages), |
|
|
|
'message_count': str(messages), |
|
|
|
'message': N_('message', 'messages', messages), |
|
|
|
'message': N_('message', 'messages', messages), |
|
|
|
'replies_count': str(replies), |
|
|
|
'replies_count': str(replies), |
|
|
|
'replies': N_('reply', 'replies', replies) |
|
|
|
'replies': N_('reply', 'replies', replies)} |
|
|
|
} |
|
|
|
|
|
|
|
mask = self._options[self.NAMESPACE]['window_title'] |
|
|
|
mask = self._options[self.NAMESPACE]['window_title'] |
|
|
|
for variable in title_info: |
|
|
|
for variable in title_info: |
|
|
|
mask = mask.replace('{' + variable + '}', title_info[variable]) |
|
|
|
mask = mask.replace('{' + variable + '}', title_info[variable]) |
|
|
|