diff --git a/data/gui/account_context_menu.ui b/data/gui/account_context_menu.ui
index 0924fb7de..7b57e2884 100644
--- a/data/gui/account_context_menu.ui
+++ b/data/gui/account_context_menu.ui
@@ -1,87 +1,84 @@
-
+
+
-
-
+
-
-
-
-
-
-
-
-
diff --git a/data/gui/advanced_menuitem_menu.ui b/data/gui/advanced_menuitem_menu.ui
index 1c1869400..dbc6a778a 100644
--- a/data/gui/advanced_menuitem_menu.ui
+++ b/data/gui/advanced_menuitem_menu.ui
@@ -1,10 +1,12 @@
-
+
+
-
-
+
-
-
diff --git a/data/gui/chat_context_menu.ui b/data/gui/chat_context_menu.ui
index 339c2a4a9..f38ff3da7 100644
--- a/data/gui/chat_context_menu.ui
+++ b/data/gui/chat_context_menu.ui
@@ -1,111 +1,71 @@
-
+
+
-
-
+
-
-
-
-
-
-
-
diff --git a/data/gui/contact_context_menu.ui b/data/gui/contact_context_menu.ui
index f8c074833..2841ef6bb 100644
--- a/data/gui/contact_context_menu.ui
+++ b/data/gui/contact_context_menu.ui
@@ -1,61 +1,60 @@
-
+
+
-
-
+
+
diff --git a/data/gui/filetransfers.ui b/data/gui/filetransfers.ui
index 201d8e7c3..16bb28271 100644
--- a/data/gui/filetransfers.ui
+++ b/data/gui/filetransfers.ui
@@ -1,23 +1,79 @@
-
+
+
-
-
+
+
+
+
+
False
@@ -156,7 +195,7 @@
False
Hides the window
True
-
+
False
@@ -167,73 +206,40 @@
False
+ True
end
1
+
+
+ _Notify me when a file transfer is complete
+ True
+ True
+ False
+ True
+ 0.5
+ True
+
+
+
+ When a file transfer is complete show a popup notification
+
+
+
+
+ False
+ False
+ 2
+
+
-
-
diff --git a/data/gui/gc_control_popup_menu.ui b/data/gui/gc_control_popup_menu.ui
index 24fbcf645..13edcc19b 100644
--- a/data/gui/gc_control_popup_menu.ui
+++ b/data/gui/gc_control_popup_menu.ui
@@ -1,58 +1,56 @@
-
+
+
-
-
+
diff --git a/data/gui/gc_occupants_menu.ui b/data/gui/gc_occupants_menu.ui
index 0c907dec7..d949599eb 100644
--- a/data/gui/gc_occupants_menu.ui
+++ b/data/gui/gc_occupants_menu.ui
@@ -1,39 +1,40 @@
-
+
+
-
-
+
+
diff --git a/data/gui/history_manager.ui b/data/gui/history_manager.ui
index 27ad1d614..6816779f8 100644
--- a/data/gui/history_manager.ui
+++ b/data/gui/history_manager.ui
@@ -1,272 +1,41 @@
-
+
+
-
-
-
- 6
- Gajim History Logs Manager
- 650
- 500
-
-
-
- True
- vertical
- 6
-
-
- True
- True
- 200
-
-
- True
- True
- automatic
- automatic
- in
-
-
- True
- True
- True
-
-
-
-
-
-
- False
- True
-
-
-
-
- True
- vertical
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- vertical
-
-
- True
- <big><b>Welcome to Gajim History Logs Manager</b></big>
- True
- center
- True
-
-
- 0
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 1
- 0
- gtk-info
-
-
- 0
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- This log manager is not intended for log viewing. If you are looking for such functionality, use the history window instead.
-
-Use this program to delete or export logs. You can select logs from the left and/or search database from below.
- True
- True
-
-
- 1
-
-
-
-
- False
- False
- 20
- 1
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 1
- 0
- gtk-dialog-warning
-
-
- 0
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- <b>WARNING:</b>
-If you plan to do massive deletions, please make sure Gajim is not running. Generally avoid deletions with contacts you currently chat with.
- True
- True
-
-
- 1
-
-
-
-
- False
- False
- 20
- 2
-
-
-
-
- False
- 0
-
-
-
-
- True
- True
- automatic
- automatic
- in
-
-
- True
- True
- True
- False
-
-
-
-
-
-
- 1
-
-
-
-
- True
- True
- automatic
- automatic
- in
-
-
- True
- True
- True
-
-
-
-
-
-
- 2
-
-
-
-
- True
- True
-
-
-
-
- 0
-
-
-
-
- True
- 6
-
-
- True
- True
- True
-
-
- 0
-
-
-
-
- _Search Database
- True
- True
- True
- True
- False
- image1
- True
- bottom
-
-
-
- False
- False
- 1
-
-
-
-
- False
- 1
-
-
-
-
-
+
+ False
dialog
save
-
+
True
+ False
vertical
24
-
+
True
+ False
end
@@ -302,6 +71,7 @@ If you plan to do massive deletions, please make sure Gajim is not running. Gene
False
+ False
end
0
@@ -315,6 +85,275 @@ If you plan to do massive deletions, please make sure Gajim is not running. Gene
True
+ False
gtk-find
+
+ False
+ 6
+ Gajim History Logs Manager
+ 650
+ 500
+
+
+
+ True
+ False
+ 6
+
+
+ True
+ True
+ 200
+
+
+ True
+ True
+ in
+
+
+ True
+ True
+ True
+
+
+
+
+
+
+
+
+
+ False
+ True
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ False
+ <big><b>Welcome to Gajim History Logs Manager</b></big>
+ True
+ center
+ True
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 1
+ 0
+ gtk-info
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ This log manager is not intended for log viewing. If you are looking for such functionality, use the history window instead.
+
+Use this program to delete or export logs. You can select logs from the left and/or search database from below.
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ False
+ 20
+ 1
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 1
+ 0
+ gtk-dialog-warning
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ <b>WARNING:</b>
+If you plan to do massive deletions, please make sure Gajim is not running. Generally avoid deletions with contacts you currently chat with.
+ True
+ True
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ False
+ 20
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ in
+
+
+ True
+ True
+ True
+ False
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ in
+
+
+ True
+ True
+ True
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ True
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 6
+
+
+ True
+ True
+ True
+
+
+ True
+ True
+ 0
+
+
+
+
+ _Search Database
+ True
+ True
+ True
+ True
+ False
+ image1
+ True
+ bottom
+
+
+
+ False
+ False
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
diff --git a/data/gui/roster_window.ui b/data/gui/roster_window.ui
index 7c8eb9007..5dbdc1af7 100644
--- a/data/gui/roster_window.ui
+++ b/data/gui/roster_window.ui
@@ -1,91 +1,8 @@
+
-
+
-
- True
- False
- gtk-help
- 1
-
-
- True
- False
- gtk-dialog-question
- 1
-
-
- True
- False
- gtk-properties
- 1
-
-
- True
- False
- gtk-justify-fill
- 1
-
-
- True
- False
- gtk-jump-to
- 1
-
-
- True
- False
- gtk-disconnect
- 1
-
-
- True
- False
- gtk-info
- 1
-
-
- True
- False
- gtk-new
- 1
-
-
- True
- False
- gtk-connect
- 1
-
-
- True
- False
- gtk-add
- 1
-
-
- True
- False
- gtk-find
- 1
-
-
- True
- False
- gtk-network
- 1
-
-
- True
- False
- gtk-properties
- 1
-
-
- True
- False
- gtk-save
- 1
-
85
200
@@ -97,15 +14,16 @@
-
+
-
+
True
False
+ vertical
-
-
@@ -195,15 +98,13 @@
-
@@ -221,27 +122,21 @@
-
-
@@ -293,8 +184,8 @@
False
Show _Offline Contacts
True
-
+
@@ -303,8 +194,8 @@
False
Show Only _Active Contacts
True
-
+
@@ -325,8 +216,8 @@
Show _Roster
True
True
-
+
@@ -336,28 +227,22 @@
-
-
@@ -375,39 +260,31 @@
-
-
@@ -453,16 +325,17 @@
-
+
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
-
+
True
False
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ vertical
True
@@ -490,15 +363,18 @@
True
False
True
-
-
-
-
+
+
+
+
-
-
+
+
+
+
+
diff --git a/data/gui/subscription_request_popup_menu.ui b/data/gui/subscription_request_popup_menu.ui
index 966b1a256..d275e0b66 100644
--- a/data/gui/subscription_request_popup_menu.ui
+++ b/data/gui/subscription_request_popup_menu.ui
@@ -1,34 +1,27 @@
-
+
+
-
-
-
+
-
- True
- gtk-jump-to
- 1
+
diff --git a/data/gui/systray_context_menu.ui b/data/gui/systray_context_menu.ui
index c2cc6ae12..fc465ee48 100644
--- a/data/gui/systray_context_menu.ui
+++ b/data/gui/systray_context_menu.ui
@@ -1,128 +1,96 @@
-
+
+
-
-
+
+
-
-
- True
- gtk-network
- 1
-
-
- True
- gtk-jump-to
- 1
-
-
- True
- gtk-connect
- 1
-
-
- True
- gtk-new
- 1
-
-
- True
- gtk-home
- 1
-
diff --git a/data/gui/zeroconf_context_menu.ui b/data/gui/zeroconf_context_menu.ui
index fef1996d7..b8fe5763c 100644
--- a/data/gui/zeroconf_context_menu.ui
+++ b/data/gui/zeroconf_context_menu.ui
@@ -1,41 +1,31 @@
-
+
+
-
-
+
-
- True
- gtk-network
- 1
-
-
- True
- gtk-preferences
- 1
-
diff --git a/src/chat_control.py b/src/chat_control.py
index e6bfa57c3..2e952220b 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -550,7 +550,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
spell.set_language(lang)
widget.set_active(True)
- item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_UNDO, None)
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Undo'))
menu.prepend(item)
id_ = item.connect('activate', self.msg_textview.undo)
self.handlers[id_] = item
@@ -558,7 +558,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
item = Gtk.SeparatorMenuItem.new()
menu.prepend(item)
- item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_CLEAR, None)
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Clear'))
menu.prepend(item)
id_ = item.connect('activate', self.msg_textview.clear)
self.handlers[id_] = item
@@ -1095,31 +1095,25 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
- item = Gtk.ImageMenuItem.new_with_label(_('Color'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_SELECT_COLOR, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_label(_('Color'))
item.connect('activate', self.on_color_menuitem_activale)
menu.append(item)
- item = Gtk.ImageMenuItem.new_with_label(_('Font'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_SELECT_FONT, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_label(_('Font'))
item.connect('activate', self.on_font_menuitem_activale)
menu.append(item)
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
- item = Gtk.ImageMenuItem.new_with_label(_('Clear formating'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_CLEAR, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_label(_('Clear formating'))
item.connect('activate', self.msg_textview.clear_tags)
menu.append(item)
menu.show_all()
menu.attach_to_widget(widget, None)
gtkgui_helpers.popup_emoticons_under_button(menu, widget,
- self.parent_win)
+ self.parent_win)
def on_color_menuitem_activale(self, widget):
color_dialog = Gtk.ColorChooserDialog(None, self.parent_win.window)
@@ -2046,7 +2040,7 @@ class ChatControl(ChatControlBase):
"""
if event.button == 3: # right click
menu = Gtk.Menu()
- menuitem = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_SAVE_AS, None)
+ menuitem = Gtk.MenuItem.new_with_mnemonic(_('Save _As'))
id_ = menuitem.connect('activate',
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
self.contact.jid, self.contact.get_shown_name())
diff --git a/src/conversation_textview.py b/src/conversation_textview.py
index c7580354e..2474777cd 100644
--- a/src/conversation_textview.py
+++ b/src/conversation_textview.py
@@ -297,7 +297,7 @@ class ConversationTextview(GObject.GObject):
tag.set_property('foreground', color)
self.tv.create_tags()
-
+
tag = buffer_.create_tag('bold')
tag.set_property('weight', Pango.Weight.BOLD)
@@ -762,7 +762,7 @@ class ConversationTextview(GObject.GObject):
menu.prepend(item)
separator_menuitem_was_added = True
- item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_CLEAR, None)
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Clear'))
menu.prepend(item)
id_ = item.connect('activate', self.clear)
self.handlers[id_] = item
@@ -931,9 +931,6 @@ class ConversationTextview(GObject.GObject):
else: # It's a mail or a JID
# load muc icon
join_group_chat_menuitem = xml.get_object('join_group_chat_menuitem')
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- join_group_chat_menuitem.set_image(muc_icon)
text = text.lower()
if text.startswith('xmpp:'):
diff --git a/src/groupchat_control.py b/src/groupchat_control.py
index c5dc1108c..fceafe911 100644
--- a/src/groupchat_control.py
+++ b/src/groupchat_control.py
@@ -833,15 +833,6 @@ class GroupchatControl(ChatControlBase):
separatormenuitem2 = xml.get_object('separatormenuitem2')
request_voice_separator = xml.get_object('request_voice_separator')
- if gtkgui_helpers.gtk_icon_theme.has_icon('bookmark-new'):
- img = Gtk.Image()
- img.set_from_icon_name('bookmark-new', Gtk.IconSize.MENU)
- bookmark_room_menuitem.set_image(img)
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- img = Gtk.Image()
- img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
- history_menuitem.set_image(img)
-
if hide_buttonbar_items:
change_nick_menuitem.hide()
change_subject_menuitem.hide()
@@ -2543,9 +2534,6 @@ class GroupchatControl(ChatControlBase):
self.handlers[id_] = item
item = xml.get_object('invite_menuitem')
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- item.set_image(muc_icon)
if jid and c.name != self.nick:
bookmarked = False
contact = gajim.contacts.get_contact(self.account, jid, c.resource)
@@ -2561,10 +2549,6 @@ class GroupchatControl(ChatControlBase):
self.handlers[id_] = item
item = xml.get_object('history_menuitem')
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- img = Gtk.Image()
- img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
- item.set_image(img)
id_ = item.connect('activate', self.on_history, nick)
self.handlers[id_] = item
@@ -2595,11 +2579,6 @@ class GroupchatControl(ChatControlBase):
self.handlers[id_] = item
item = xml.get_object('send_file_menuitem')
- # add a special img for send file menuitem
- pixbuf = gtkgui_helpers.get_icon_pixmap('document-send', quiet=True)
- img = Gtk.Image.new_from_pixbuf(pixbuf)
- item.set_image(img)
-
if not c.resource:
item.set_sensitive(False)
else:
diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py
index d07bb04a3..f35211774 100644
--- a/src/gtkgui_helpers.py
+++ b/src/gtkgui_helpers.py
@@ -83,14 +83,11 @@ from common import helpers
screen_w = Gdk.Screen.width()
screen_h = Gdk.Screen.height()
-def add_image_to_menuitem(menuitem, icon_name):
+def add_image_to_button(button, icon_name):
img = Gtk.Image()
path_img = get_icon_path(icon_name)
img.set_from_file(path_img)
- menuitem.set_image(img)
-
-def add_image_to_button(button, icon_name):
- add_image_to_menuitem(button, icon_name)
+ button.set_image(img)
GUI_DIR = os.path.join(gajim.DATA_DIR, 'gui')
def get_gtk_builder(file_name, widget=None):
diff --git a/src/gui_menu_builder.py b/src/gui_menu_builder.py
index 953fbf133..2ff388129 100644
--- a/src/gui_menu_builder.py
+++ b/src/gui_menu_builder.py
@@ -42,13 +42,8 @@ def build_resources_submenu(contacts, account, action, room_jid=None,
iconset = gajim.config.DEFAULT_ICONSET
path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
for c in contacts:
- # icon MUST be different instance for every item
- state_images = gtkgui_helpers.load_iconset(path)
- item = Gtk.ImageMenuItem.new_with_label(
+ item = Gtk.MenuItem.new_with_label(
'%s (%s)' % (c.resource, str(c.priority)))
- icon_name = helpers.get_icon_name_to_show(c, account)
- icon = state_images[icon_name]
- item.set_image(icon)
sub_menu.append(item)
if action == roster.on_invite_to_room:
@@ -97,10 +92,8 @@ show_bookmarked=False, force_resource=False):
return
invite_to_submenu = Gtk.Menu()
invite_menuitem.set_submenu(invite_to_submenu)
- invite_to_new_room_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_(
+ invite_to_new_room_menuitem = Gtk.MenuItem.new_with_mnemonic(_(
'_New Group Chat'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU)
- invite_to_new_room_menuitem.set_image(icon)
if len(contact_list) > 1: # several resources
invite_to_new_room_menuitem.set_submenu(build_resources_submenu(
contact_list, account, roster.on_invite_to_new_room, cap=NS_MUC))
@@ -155,9 +148,7 @@ show_bookmarked=False, force_resource=False):
item = Gtk.SeparatorMenuItem.new() # separator
invite_to_submenu.append(item)
for (room_jid, account) in rooms:
- menuitem = Gtk.ImageMenuItem.new_with_label(room_jid.split('@')[0])
- muc_active_icon = gtkgui_helpers.load_icon('muc_active')
- menuitem.set_image(muc_active_icon)
+ menuitem = Gtk.MenuItem.new_with_label(room_jid.split('@')[0])
if len(contact_list) > 1: # several resources
menuitem.set_submenu(build_resources_submenu(
contact_list, account, roster.on_invite_to_room, room_jid,
@@ -191,9 +182,7 @@ show_bookmarked=False, force_resource=False):
item = Gtk.SeparatorMenuItem.new() # separator
invite_to_submenu.append(item)
for (room_jid, account) in rooms2:
- menuitem = Gtk.ImageMenuItem.new_with_label(room_jid.split('@')[0])
- muc_inactive_icon = gtkgui_helpers.load_icon('muc_inactive')
- menuitem.set_image(muc_inactive_icon)
+ menuitem = Gtk.MenuItem.new_with_label(room_jid.split('@')[0])
if len(contact_list) > 1: # several resources
menuitem.set_submenu(build_resources_submenu(
contact_list, account, roster.on_invite_to_room, room_jid,
@@ -259,19 +248,6 @@ control=None, gc_contact=None, is_anonymous=True):
items_to_hide = []
- # add a special img for send file menuitem
- pixbuf = gtkgui_helpers.get_icon_pixmap('document-send', quiet=True)
- img = Gtk.Image.new_from_pixbuf(pixbuf)
- send_file_menuitem.set_image(img)
-
- if not our_jid:
- # add a special img for rename menuitem
- gtkgui_helpers.add_image_to_menuitem(rename_menuitem, 'gajim-kbd_input')
-
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- convert_to_gc_menuitem.set_image(muc_icon)
-
contacts = gajim.contacts.get_contacts(account, jid)
if len(contacts) > 1 and use_multiple_contacts: # several resources
start_chat_menuitem.set_submenu(build_resources_submenu(contacts,
@@ -304,16 +280,12 @@ control=None, gc_contact=None, is_anonymous=True):
execute_command_menuitem.set_sensitive(False)
rename_menuitem.connect('activate', roster.on_rename, 'contact', jid,
- account)
+ account)
history_menuitem.connect('activate', roster.on_history, contact, account)
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- img = Gtk.Image()
- img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
- history_menuitem.set_image(img)
if control:
convert_to_gc_menuitem.connect('activate',
- control._on_convert_to_gc_menuitem_activate)
+ control._on_convert_to_gc_menuitem_activate)
else:
items_to_hide.append(convert_to_gc_menuitem)
@@ -429,19 +401,7 @@ control=None, gc_contact=None, is_anonymous=True):
# Transport contact, send custom status unavailable
send_custom_status_menuitem.set_sensitive(False)
elif blocked:
- send_custom_status_menuitem.set_image(gtkgui_helpers.load_icon('offline'))
send_custom_status_menuitem.set_sensitive(False)
- elif account in gajim.interface.status_sent_to_users and \
- jid in gajim.interface.status_sent_to_users[account]:
- send_custom_status_menuitem.set_image(gtkgui_helpers.load_icon(
- gajim.interface.status_sent_to_users[account][jid]))
- else:
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NETWORK, Gtk.IconSize.MENU)
- send_custom_status_menuitem.set_image(icon)
-
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- invite_menuitem.set_image(muc_icon)
if gc_contact:
if not gc_contact.jid:
@@ -469,24 +429,18 @@ control=None, gc_contact=None, is_anonymous=True):
# One or several resource, we do the same for send_custom_status
status_menuitems = Gtk.Menu()
send_custom_status_menuitem.set_submenu(status_menuitems)
- iconset = gajim.config.get('iconset')
- path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
for s in ('online', 'chat', 'away', 'xa', 'dnd', 'offline'):
# icon MUST be different instance for every item
- state_images = gtkgui_helpers.load_iconset(path)
- status_menuitem = Gtk.ImageMenuItem.new_with_label(
- helpers.get_uf_show(s))
+ status_menuitem = Gtk.MenuItem.new_with_label(helpers.get_uf_show(s))
status_menuitem.connect('activate', roster.on_send_custom_status,
[(contact, account)], s)
- icon = state_images[s]
- status_menuitem.set_image(icon)
status_menuitems.append(status_menuitem)
send_single_message_menuitem.connect('activate',
- roster.on_send_single_message_menuitem_activate, account, contact)
+ roster.on_send_single_message_menuitem_activate, account, contact)
remove_from_roster_menuitem.connect('activate', roster.on_req_usub,
- [(contact, account)])
+ [(contact, account)])
information_menuitem.connect('activate', roster.on_info, contact, account)
if _('Not in Roster') not in contact.get_shown_groups():
@@ -584,9 +538,7 @@ def get_transport_menu(contact, account):
menu = Gtk.Menu()
# Send single message
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('Send Single _Message...'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('Send Single _Message...'))
item.connect('activate', roster.on_send_single_message_menuitem_activate,
account, contact)
menu.append(item)
@@ -598,35 +550,18 @@ def get_transport_menu(contact, account):
blocked = True
# Send Custom Status
- send_custom_status_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(
+ send_custom_status_menuitem = Gtk.MenuItem.new_with_mnemonic(
_('Send Cus_tom Status'))
- # add a special img for this menuitem
if blocked:
- send_custom_status_menuitem.set_image(gtkgui_helpers.load_icon(
- 'offline'))
send_custom_status_menuitem.set_sensitive(False)
else:
- if account in gajim.interface.status_sent_to_users and \
- jid in gajim.interface.status_sent_to_users[account]:
- send_custom_status_menuitem.set_image(gtkgui_helpers.load_icon(
- gajim.interface.status_sent_to_users[account][jid]))
- else:
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NETWORK,
- Gtk.IconSize.MENU)
- send_custom_status_menuitem.set_image(icon)
status_menuitems = Gtk.Menu()
send_custom_status_menuitem.set_submenu(status_menuitems)
- iconset = gajim.config.get('iconset')
- path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
for s in ('online', 'chat', 'away', 'xa', 'dnd', 'offline'):
- # icon MUST be different instance for every item
- state_images = gtkgui_helpers.load_iconset(path)
- status_menuitem = Gtk.ImageMenuItem.new_with_label(
- helpers.get_uf_show(s))
+ status_menuitem = Gtk.MenuItem.new_with_label(helpers.get_uf_show(
+ s))
status_menuitem.connect('activate', roster.on_send_custom_status,
[(contact, account)], s)
- icon = state_images[s]
- status_menuitem.set_image(icon)
status_menuitems.append(status_menuitem)
menu.append(send_custom_status_menuitem)
if gajim.account_is_disconnected(account):
@@ -636,9 +571,7 @@ def get_transport_menu(contact, account):
menu.append(item)
# Execute Command
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('E_xecute Command...'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_EXECUTE, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('E_xecute Command...'))
menu.append(item)
item.connect('activate', roster.on_execute_command, contact, account,
contact.resource)
@@ -646,26 +579,20 @@ def get_transport_menu(contact, account):
item.set_sensitive(False)
# Manage Transport submenu
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Manage Transport'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_PROPERTIES, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Manage Transport'))
manage_transport_submenu = Gtk.Menu()
item.set_submenu(manage_transport_submenu)
menu.append(item)
# Modify Transport
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Modify Transport'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_PREFERENCES, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Modify Transport'))
manage_transport_submenu.append(item)
item.connect('activate', roster.on_edit_agent, contact, account)
if gajim.account_is_disconnected(account):
item.set_sensitive(False)
# Rename
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Rename...'))
- # add a special img for rename menuitem
- gtkgui_helpers.add_image_to_menuitem(item, 'gajim-kbd_input')
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Rename...'))
manage_transport_submenu.append(item)
item.connect('activate', roster.on_rename, 'agent', jid, account)
if gajim.account_is_disconnected(account):
@@ -676,22 +603,18 @@ def get_transport_menu(contact, account):
# Block
if blocked:
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Unblock'))
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Unblock'))
item.connect('activate', roster.on_unblock, [(contact, account)])
else:
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Block'))
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Block'))
item.connect('activate', roster.on_block, [(contact, account)])
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_STOP, Gtk.IconSize.MENU)
- item.set_image(icon)
manage_transport_submenu.append(item)
if gajim.account_is_disconnected(account):
item.set_sensitive(False)
# Remove
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('Remo_ve'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_REMOVE, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('Remo_ve'))
manage_transport_submenu.append(item)
item.connect('activate', roster.on_remove_agent, [(contact, account)])
if gajim.account_is_disconnected(account):
@@ -701,10 +624,7 @@ def get_transport_menu(contact, account):
menu.append(item)
# Information
- information_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(
- _('_Information'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_INFO, Gtk.IconSize.MENU)
- information_menuitem.set_image(icon)
+ information_menuitem = Gtk.MenuItem.new_with_mnemonic(_('_Information'))
menu.append(information_menuitem)
information_menuitem.connect('activate', roster.on_info, contact, account)
if gajim.account_is_disconnected(account):
diff --git a/src/htmltextview.py b/src/htmltextview.py
index f1790949b..8df674522 100644
--- a/src/htmltextview.py
+++ b/src/htmltextview.py
@@ -966,9 +966,6 @@ class HtmlTextView(Gtk.TextView):
else: # It's a mail or a JID
# load muc icon
join_group_chat_menuitem = xml.get_object('join_group_chat_menuitem')
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- join_group_chat_menuitem.set_image(muc_icon)
text = text.lower()
if text.startswith('xmpp:'):
diff --git a/src/profile_window.py b/src/profile_window.py
index 2c0de03a9..f0f93711e 100644
--- a/src/profile_window.py
+++ b/src/profile_window.py
@@ -211,14 +211,13 @@ class ProfileWindow:
if pixbuf not in (None, 'ask'):
nick = gajim.config.get_per('accounts', self.account, 'name')
- menuitem = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_SAVE_AS,
- None)
+ menuitem = Gtk.MenuItem.new_with_mnemonic(_('Save _As'))
menuitem.connect('activate',
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
self.jid, nick)
menu.append(menuitem)
# show clear
- menuitem = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_CLEAR, None)
+ menuitem = Gtk.MenuItem.new_with_mnemonic(_('_Clear'))
menuitem.connect('activate', self.on_clear_button_clicked)
menu.append(menuitem)
menu.connect('selection-done', lambda w:w.destroy())
diff --git a/src/roster_window.py b/src/roster_window.py
index 6af97853c..245f0f6cd 100644
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -5261,17 +5261,10 @@ class RosterWindow:
if not force and not self.actions_menu_needs_rebuild:
return
history_menuitem = self.xml.get_object('history_menuitem')
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- img = Gtk.Image()
- img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
- history_menuitem.set_image(img)
new_chat_menuitem = self.xml.get_object('new_chat_menuitem')
single_message_menuitem = self.xml.get_object(
'send_single_message_menuitem')
join_gc_menuitem = self.xml.get_object('join_gc_menuitem')
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- join_gc_menuitem.set_image(muc_icon)
add_new_contact_menuitem = self.xml.get_object(
'add_new_contact_menuitem')
service_disco_menuitem = self.xml.get_object('service_disco_menuitem')
@@ -5456,10 +5449,7 @@ class RosterWindow:
newitem = Gtk.SeparatorMenuItem.new() # separator
gc_sub_menu.append(newitem)
- newitem = Gtk.ImageMenuItem.new_with_mnemonic(_('_Manage Bookmarks...'))
- img = Gtk.Image.new_from_stock(Gtk.STOCK_PREFERENCES,
- Gtk.IconSize.MENU)
- newitem.set_image(img)
+ newitem = Gtk.MenuItem.new_with_mnemonic(_('_Manage Bookmarks...'))
newitem.connect('activate', self.on_manage_bookmarks_menuitem_activate)
gc_sub_menu.append(newitem)
gc_sub_menu.show_all()
@@ -5539,7 +5529,6 @@ class RosterWindow:
# using self.jabber_status_images is poopoo
iconset = gajim.config.get('iconset')
path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
- state_images = gtkgui_helpers.load_iconset(path)
if not gajim.config.get_per('accounts', account, 'is_zeroconf'):
xml = gtkgui_helpers.get_gtk_builder('account_context_menu.ui')
@@ -5549,9 +5538,6 @@ class RosterWindow:
start_chat_menuitem = xml.get_object('start_chat_menuitem')
join_group_chat_menuitem = xml.get_object(
'join_group_chat_menuitem')
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- join_group_chat_menuitem.set_image(muc_icon)
open_gmail_inbox_menuitem = xml.get_object(
'open_gmail_inbox_menuitem')
add_contact_menuitem = xml.get_object('add_contact_menuitem')
@@ -5565,9 +5551,7 @@ class RosterWindow:
for show in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible'):
uf_show = helpers.get_uf_show(show, use_mnemonic=True)
- item = Gtk.ImageMenuItem.new_with_mnemonic(uf_show)
- icon = state_images[show]
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(uf_show)
sub_menu.append(item)
con = gajim.connections[account]
if show == 'invisible' and con.connected > 1 and \
@@ -5579,8 +5563,7 @@ class RosterWindow:
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Change Status Message'))
- gtkgui_helpers.add_image_to_menuitem(item, 'gajim-kbd_input')
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Change Status Message'))
sub_menu.append(item)
item.connect('activate', self.on_change_status_message_activate,
account)
@@ -5591,9 +5574,7 @@ class RosterWindow:
sub_menu.append(item)
uf_show = helpers.get_uf_show('offline', use_mnemonic=True)
- item = Gtk.ImageMenuItem.new_with_mnemonic(uf_show)
- icon = state_images['offline']
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(uf_show)
sub_menu.append(item)
item.connect('activate', self.change_status, account, 'offline')
@@ -5617,7 +5598,7 @@ class RosterWindow:
add_item(_('Publish Location'), 'publish_location',
self.on_publish_location_toggled)
- pep_config = Gtk.ImageMenuItem.new_with_label(
+ pep_config = Gtk.MenuItem.new_with_label(
_('Configure Services...'))
item = Gtk.SeparatorMenuItem.new()
pep_submenu.append(item)
@@ -5625,9 +5606,6 @@ class RosterWindow:
pep_submenu.append(pep_config)
pep_config.connect('activate',
self.on_pep_services_menuitem_activate, account)
- img = Gtk.Image.new_from_stock(Gtk.STOCK_PREFERENCES,
- Gtk.IconSize.MENU)
- pep_config.set_image(img)
else:
pep_menuitem.set_sensitive(False)
@@ -5679,17 +5657,14 @@ class RosterWindow:
for show in ('online', 'away', 'dnd', 'invisible'):
uf_show = helpers.get_uf_show(show, use_mnemonic=True)
- item = Gtk.ImageMenuItem.new_with_mnemonic(uf_show)
- icon = state_images[show]
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(uf_show)
sub_menu.append(item)
item.connect('activate', self.change_status, account, show)
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Change Status Message'))
- gtkgui_helpers.add_image_to_menuitem(item, 'gajim-kbd_input')
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Change Status Message'))
sub_menu.append(item)
item.connect('activate', self.on_change_status_message_activate,
account)
@@ -5697,9 +5672,7 @@ class RosterWindow:
item.set_sensitive(False)
uf_show = helpers.get_uf_show('offline', use_mnemonic=True)
- item = Gtk.ImageMenuItem.new_with_mnemonic(uf_show)
- icon = state_images['offline']
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(uf_show)
sub_menu.append(item)
item.connect('activate', self.change_status, account, 'offline')
@@ -5726,11 +5699,7 @@ class RosterWindow:
accounts.append(account)
accounts.sort()
for account in accounts:
- state_images = gtkgui_helpers.load_iconset(path)
- item = Gtk.ImageMenuItem.new_with_label(account)
- show = gajim.SHOW_LIST[gajim.connections[account].connected]
- icon = state_images[show]
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_label(account)
account_menu = self.build_account_menu(account)
item.set_submenu(account_menu)
menu.append(item)
@@ -5770,20 +5739,15 @@ class RosterWindow:
# Make special context menu if group is Groupchats
if group == _('Groupchats'):
- maximize_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_(
+ maximize_menuitem = Gtk.MenuItem.new_with_mnemonic(_(
'_Maximize All'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_GOTO_TOP,
- Gtk.IconSize.MENU)
- maximize_menuitem.set_image(icon)
maximize_menuitem.connect('activate',
self.on_all_groupchat_maximized, list_)
menu.append(maximize_menuitem)
else:
# Send Group Message
- send_group_message_item = Gtk.ImageMenuItem.new_with_mnemonic(
+ send_group_message_item = Gtk.MenuItem.new_with_mnemonic(
_('Send Group M_essage'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU)
- send_group_message_item.set_image(icon)
send_group_message_submenu = Gtk.Menu()
send_group_message_item.set_submenu(send_group_message_submenu)
@@ -5805,41 +5769,27 @@ class RosterWindow:
# Invite to
if group != _('Transports'):
- invite_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(
+ invite_menuitem = Gtk.MenuItem.new_with_mnemonic(
_('In_vite to'))
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- invite_menuitem.set_image(muc_icon)
gui_menu_builder.build_invite_submenu(invite_menuitem,
list_online, show_bookmarked=show_bookmarked)
menu.append(invite_menuitem)
# Send Custom Status
- send_custom_status_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(
+ send_custom_status_menuitem = Gtk.MenuItem.new_with_mnemonic(
_('Send Cus_tom Status'))
- # add a special img for this menuitem
if helpers.group_is_blocked(account, group):
- send_custom_status_menuitem.set_image(gtkgui_helpers.load_icon(
- 'offline'))
send_custom_status_menuitem.set_sensitive(False)
- else:
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NETWORK,
- Gtk.IconSize.MENU)
- send_custom_status_menuitem.set_image(icon)
status_menuitems = Gtk.Menu()
send_custom_status_menuitem.set_submenu(status_menuitems)
iconset = gajim.config.get('iconset')
path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
for s in ('online', 'chat', 'away', 'xa', 'dnd', 'offline'):
- # icon MUST be different instance for every item
- state_images = gtkgui_helpers.load_iconset(path)
- status_menuitem = Gtk.ImageMenuItem.new_with_label(
+ status_menuitem = Gtk.MenuItem.new_with_label(
helpers.get_uf_show(s))
status_menuitem.connect('activate', self.on_send_custom_status,
list_, s, group)
- icon = state_images[s]
- status_menuitem.set_image(icon)
status_menuitems.append(status_menuitem)
menu.append(send_custom_status_menuitem)
@@ -5858,9 +5808,7 @@ class RosterWindow:
menu.append(item)
# Rename
- rename_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Rename...'))
- # add a special img for rename menuitem
- gtkgui_helpers.add_image_to_menuitem(rename_item, 'gajim-kbd_input')
+ rename_item = Gtk.MenuItem.new_with_mnemonic(_('_Rename...'))
menu.append(rename_item)
rename_item.connect('activate', self.on_rename, 'group', group,
account)
@@ -5877,30 +5825,19 @@ class RosterWindow:
if is_blocked and gajim.connections[account].\
privacy_rules_supported:
- unblock_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(
- _('_Unblock'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_STOP,
- Gtk.IconSize.MENU)
- unblock_menuitem.set_image(icon)
+ unblock_menuitem = Gtk.MenuItem.new_with_mnemonic(_('_Unblock'))
unblock_menuitem.connect('activate', self.on_unblock, list_,
group)
menu.append(unblock_menuitem)
else:
- block_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(
- _('_Block'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_STOP,
- Gtk.IconSize.MENU)
- block_menuitem.set_image(icon)
+ block_menuitem = Gtk.MenuItem.new_with_mnemonic(_('_Block'))
block_menuitem.connect('activate', self.on_block, list_, group)
menu.append(block_menuitem)
if not gajim.connections[account].privacy_rules_supported:
block_menuitem.set_sensitive(False)
# Remove group
- remove_item = Gtk.ImageMenuItem.new_with_mnemonic(_('Remo_ve'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_REMOVE,
- Gtk.IconSize.MENU)
- remove_item.set_image(icon)
+ remove_item = Gtk.MenuItem.new_with_mnemonic(_('Remo_ve'))
menu.append(remove_item)
remove_item.connect('activate', self.on_remove_group_item_activated,
group, account)
@@ -5971,19 +5908,14 @@ class RosterWindow:
show_bookmarked = False
break
if account is not None:
- send_group_message_item = Gtk.ImageMenuItem.new_with_mnemonic(
+ send_group_message_item = Gtk.MenuItem.new_with_mnemonic(
_('Send Group M_essage'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU)
- send_group_message_item.set_image(icon)
menu.append(send_group_message_item)
send_group_message_item.connect('activate',
self.on_send_single_message_menuitem_activate, account, list_)
# Invite to Groupchat
- invite_item = Gtk.ImageMenuItem.new_with_mnemonic(_('In_vite to'))
- muc_icon = gtkgui_helpers.load_icon('muc_active')
- if muc_icon:
- invite_item.set_image(muc_icon)
+ invite_item = Gtk.MenuItem.new_with_mnemonic(_('In_vite to'))
gui_menu_builder.build_invite_submenu(invite_item, list_,
show_bookmarked=show_bookmarked)
@@ -5993,19 +5925,13 @@ class RosterWindow:
menu.append(item)
# Manage Transport submenu
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Manage Contacts'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_PROPERTIES,
- Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Manage Contacts'))
manage_contacts_submenu = Gtk.Menu()
item.set_submenu(manage_contacts_submenu)
menu.append(item)
# Edit Groups
- edit_groups_item = Gtk.ImageMenuItem.new_with_mnemonic(_(
- 'Edit _Groups...'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_EDIT, Gtk.IconSize.MENU)
- edit_groups_item.set_image(icon)
+ edit_groups_item = Gtk.MenuItem.new_with_mnemonic(_('Edit _Groups...'))
manage_contacts_submenu.append(edit_groups_item)
edit_groups_item.connect('activate', self.on_edit_groups, list_)
@@ -6014,16 +5940,11 @@ class RosterWindow:
# Block
if is_blocked and privacy_rules_supported:
- unblock_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(
- _('_Unblock'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_STOP, Gtk.IconSize.MENU)
- unblock_menuitem.set_image(icon)
+ unblock_menuitem = Gtk.MenuItem.new_with_mnemonic(_('_Unblock'))
unblock_menuitem.connect('activate', self.on_unblock, list_)
manage_contacts_submenu.append(unblock_menuitem)
else:
- block_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_('_Block'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_STOP, Gtk.IconSize.MENU)
- block_menuitem.set_image(icon)
+ block_menuitem = Gtk.MenuItem.new_with_mnemonic(_('_Block'))
block_menuitem.connect('activate', self.on_block, list_)
manage_contacts_submenu.append(block_menuitem)
@@ -6031,9 +5952,7 @@ class RosterWindow:
block_menuitem.set_sensitive(False)
# Remove
- remove_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Remove'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_REMOVE, Gtk.IconSize.MENU)
- remove_item.set_image(icon)
+ remove_item = Gtk.MenuItem.new_with_mnemonic(_('_Remove'))
manage_contacts_submenu.append(remove_item)
remove_item.connect('activate', self.on_req_usub, list_)
# unsensitive remove if one account is not connected
@@ -6070,29 +5989,20 @@ class RosterWindow:
menu = Gtk.Menu()
if jid in gajim.interface.minimized_controls[account]:
- maximize_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_(
+ maximize_menuitem = Gtk.MenuItem.new_with_mnemonic(_(
'_Maximize'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_GOTO_TOP,
- Gtk.IconSize.MENU)
- maximize_menuitem.set_image(icon)
maximize_menuitem.connect('activate', self.on_groupchat_maximized, \
jid, account)
menu.append(maximize_menuitem)
if not gajim.gc_connected[account].get(jid, False):
- connect_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_(
+ connect_menuitem = Gtk.MenuItem.new_with_mnemonic(_(
'_Reconnect'))
- connect_icon = Gtk.Image.new_from_stock(Gtk.STOCK_CONNECT, \
- Gtk.IconSize.MENU)
- connect_menuitem.set_image(connect_icon)
connect_menuitem.connect('activate', self.on_reconnect, jid,
account)
menu.append(connect_menuitem)
- disconnect_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_(
+ disconnect_menuitem = Gtk.MenuItem.new_with_mnemonic(_(
'_Disconnect'))
- disconnect_icon = Gtk.Image.new_from_stock(Gtk.STOCK_DISCONNECT, \
- Gtk.IconSize.MENU)
- disconnect_menuitem.set_image(disconnect_icon)
disconnect_menuitem.connect('activate', self.on_disconnect, jid,
account)
menu.append(disconnect_menuitem)
@@ -6100,18 +6010,7 @@ class RosterWindow:
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
- history_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_('_History'))
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- history_icon = Gtk.Image()
- history_icon.set_from_icon_name('document-open-recent',
- Gtk.IconSize.MENU)
- else:
- history_icon = Gtk.Image.new_from_stock(Gtk.STOCK_JUSTIFY_FILL, \
- Gtk.IconSize.MENU)
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- history_icon = Gtk.Image()
- history_icon.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
- history_menuitem.set_image(history_icon)
+ history_menuitem = Gtk.MenuItem.new_with_mnemonic(_('_History'))
history_menuitem .connect('activate', self.on_history, contact, account)
menu.append(history_menuitem)
@@ -6186,14 +6085,7 @@ class RosterWindow:
menu.append(item)
# History manager
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('History Manager'))
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- icon = Gtk.Image()
- icon.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
- else:
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_JUSTIFY_FILL,
- Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('History Manager'))
menu.append(item)
item.connect('activate', self.on_history_manager_menuitem_activate)
@@ -6201,9 +6093,7 @@ class RosterWindow:
"""
Show join new group chat item and bookmarks list for an account
"""
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Join New Group Chat'))
- icon = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU)
- item.set_image(icon)
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Join New Group Chat'))
item.connect('activate', self.on_join_gc_activate, account)
gc_sub_menu.append(item)
@@ -6426,11 +6316,6 @@ class RosterWindow:
# Add a Separator (self._iter_is_separator() checks on string SEPARATOR)
liststore.append(['SEPARATOR', None, '', True])
- path = gtkgui_helpers.get_icon_path('gajim-plugins')
- img = Gtk.Image()
- img.set_from_file(path)
- self.xml.get_object('plugins_menuitem').set_image(img)
-
path = gtkgui_helpers.get_icon_path('gajim-kbd_input')
img = Gtk.Image()
img.set_from_file(path)
@@ -6477,13 +6362,6 @@ class RosterWindow:
self.xml.get_object('show_roster_menuitem').set_active(True)
- if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
- history_icon = Gtk.Image()
- history_icon.set_from_icon_name('document-open-recent',
- Gtk.IconSize.MENU)
- history_menuitem = self.xml.get_object('history_menuitem')
- history_menuitem.set_image(history_icon)
-
# columns
col = Gtk.TreeViewColumn()
# list of renderers with attributes / properties in the form:
diff --git a/src/statusicon.py b/src/statusicon.py
index 1b73af413..cb6e7b797 100644
--- a/src/statusicon.py
+++ b/src/statusicon.py
@@ -223,23 +223,17 @@ class StatusIcon:
# We need our own set of status icons, let's make 'em!
iconset = gajim.config.get('iconset')
path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
- state_images = gtkgui_helpers.load_iconset(path)
-
- if 'muc_active' in state_images:
- join_gc_menuitem.set_image(state_images['muc_active'])
for show in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible'):
uf_show = helpers.get_uf_show(show, use_mnemonic=True)
- item = Gtk.ImageMenuItem.new_with_mnemonic(uf_show)
- item.set_image(state_images[show])
+ item = Gtk.MenuItem.new_with_mnemonic(uf_show)
sub_menu.append(item)
item.connect('activate', self.on_show_menuitem_activate, show)
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Change Status Message...'))
- gtkgui_helpers.add_image_to_menuitem(item, 'gajim-kbd_input')
+ item = Gtk.MenuItem.new_with_mnemonic(_('_Change Status Message...'))
sub_menu.append(item)
item.connect('activate', self.on_change_status_message_activate)
@@ -253,8 +247,7 @@ class StatusIcon:
sub_menu.append(item)
uf_show = helpers.get_uf_show('offline', use_mnemonic=True)
- item = Gtk.ImageMenuItem.new_with_mnemonic(uf_show)
- item.set_image(state_images['offline'])
+ item = Gtk.MenuItem.new_with_mnemonic(uf_show)
sub_menu.append(item)
item.connect('activate', self.on_show_menuitem_activate, 'offline')
@@ -340,11 +333,9 @@ class StatusIcon:
newitem = Gtk.SeparatorMenuItem.new() # separator
gc_sub_menu.append(newitem)
- newitem = Gtk.ImageMenuItem.new_with_mnemonic(_('_Manage Bookmarks...'))
- img = Gtk.Image.new_from_stock(Gtk.STOCK_PREFERENCES, Gtk.IconSize.MENU)
- newitem.set_image(img)
+ newitem = Gtk.MenuItem.new_with_mnemonic(_('_Manage Bookmarks...'))
newitem.connect('activate',
- gajim.interface.roster.on_manage_bookmarks_menuitem_activate)
+ gajim.interface.roster.on_manage_bookmarks_menuitem_activate)
gc_sub_menu.append(newitem)
if connected_accounts_with_private_storage == 0:
newitem.set_sensitive(False)
diff --git a/src/vcard.py b/src/vcard.py
index dd92b4ad6..76e5be8ed 100644
--- a/src/vcard.py
+++ b/src/vcard.py
@@ -183,7 +183,7 @@ class VcardWindow:
"""
if event.button == 3: # right click
menu = Gtk.Menu()
- menuitem = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_SAVE_AS, None)
+ menuitem = Gtk.MenuItem.new_with_mnemonic(_('Save _As'))
menuitem.connect('activate',
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
self.contact.jid, self.contact.get_shown_name())
@@ -541,7 +541,7 @@ class ZeroconfVcardWindow:
"""
if event.button == 3: # right click
menu = Gtk.Menu()
- menuitem = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_SAVE_AS, None)
+ menuitem = Gtk.MenuItem.new_with_mnemonic(_('Save _As'))
menuitem.connect('activate',
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
self.contact.jid, self.contact.get_shown_name())