~emesene-team/emesene/master

« back to all changes in this revision

Viewing changes to emesene/gui/qt4ui/widgets/ConversationToolbar.py

  • Committer: Sven (Sbte)
  • Date: 2012-09-06 22:13:17 UTC
  • Revision ID: git-v1:213f21f89b82d2974d8424b738b42ad33a89d918
emeseneĀ 2.12.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
        self._action_dict['ublock'].setToolTip(tooltip_text)
55
55
        self._action_dict['ublock'].setIcon(ublock_icon)
56
 
   
 
56
 
 
57
    def set_ublock_sensitive(self, is_sensitive):
 
58
        self._action_dict['ublock'].setEnabled(is_sensitive)
 
59
 
57
60
    def set_sensitive(self, is_sensitive, force_sensitive_block_button=False):
58
61
        self._action_dict['ublock'].setEnabled(force_sensitive_block_button or is_sensitive)
59
62
        self._action_dict['toggle_avatars'].setEnabled(force_sensitive_block_button or is_sensitive)
62
65
        self._action_dict['clean'].setEnabled(is_sensitive)
63
66
        self._action_dict['change_color'].setEnabled(is_sensitive)
64
67
        self._action_dict['add_smiley'].setEnabled(is_sensitive)
 
68
        self._action_dict['invite'].setEnabled(is_sensitive)
65
69
 
66
 
#        self.invite.set_sensitive(is_sensitive)
67
70
#        self.invite_av_call.set_sensitive(is_sensitive)
68
71
#        self.invite_video_call.set_sensitive(is_sensitive)
69
72
#        self.invite_audio_call.set_sensitive(is_sensitive)
101
104
            self.theme_tool_unblock = QtGui.QIcon(image_theme.tool_unblock)
102
105
        else:
103
106
            theme_tool_font = QtGui.QIcon.fromTheme("preferences-desktop-font")
104
 
            theme_tool_font_color = QtGui.QIcon.fromTheme("preferences-desktop-theme") #FIXME: no stock icon
 
107
            theme_tool_font_color = QtGui.QIcon.fromTheme("preferences-desktop-theme")
105
108
 
106
109
            emote_theme = gui.theme.emote_theme
107
110
 
141
144
        action_dict['send_nudge'].triggered.connect(
142
145
                            self.handler.on_notify_attention_selected)
143
146
 
144
 
#        self.invite = gtk.ToolButton(theme_tool_invite)
145
 
#        self.invite.set_label(_('Invite a buddy'))
146
 
#        self.invite.set_tooltip_text(_('Invite a buddy'))
147
 
#        self.invite.connect('clicked',
148
 
#            lambda *args: self.handler.on_invite_selected())
 
147
        action_dict['invite'] = QtGui.QAction(theme_tool_invite, tr('Invite a buddy'), self)
 
148
        action_dict['invite'].triggered.connect(
 
149
                            self.handler.on_invite_selected)
149
150
 
150
151
        action_dict['clean'] = QtGui.QAction(theme_tool_clean, tr('Clean the conversation'), self)
151
152
        action_dict['clean'].triggered.connect(
158
159
#            lambda *args: self.handler.on_invite_file_transfer_selected())
159
160
 
160
161
        action_dict['ublock'] = QtGui.QAction(
161
 
                            self.theme_tool_show_avatar, tr('Block/Unblock contact'), self) 
 
162
                            self.theme_tool_show_avatar, tr('Block/Unblock contact'), self)
162
163
        action_dict['ublock'].triggered.connect(
163
164
                            self.handler.on_ublock_selected)
164
165
 
165
166
        action_dict['toggle_avatars'] = QtGui.QAction(
166
 
                            self.theme_tool_block, tr('Hide/Show avatar'), self) 
 
167
                            self.theme_tool_block, tr('Hide/Show avatar'), self)
167
168
        action_dict['toggle_avatars'].triggered.connect(
168
169
                            self.handler.on_toggle_avatar_selected)
169
170
        self.update_toggle_avatar_icon(self.session.config.b_show_info)
193
194
        self.addAction(action_dict['add_smiley'])
194
195
        self.addAction(action_dict['send_nudge'])
195
196
 
 
197
        if self.handler.session_service_supported(e3.Session.SERVICE_CONTACT_INVITE):
 
198
            self.addSeparator()
 
199
            self.addAction(action_dict['invite'])
196
200
#FIXME: implement this actions
197
 
#        if self.handler.session_service_supported(e3.Session.SERVICE_CONTACT_INVITE):
198
 
#            self.addSeparator()
199
 
#            self.add(self.invite)
200
201
#        if self.handler.session_service_supported(e3.Session.SERVICE_FILETRANSFER):
201
202
#            self.add(self.invite_file_transfer)
202
203
        self.addSeparator()