diff --git a/gajim/chat_control.py b/gajim/chat_control.py
index 8631c0796..fa4b03557 100644
--- a/gajim/chat_control.py
+++ b/gajim/chat_control.py
@@ -461,17 +461,17 @@ class ChatControl(ChatControlBase):
else:
banner_image.show()
if state == self.JINGLE_STATE_CONNECTING:
- banner_image.set_from_stock(
- Gtk.STOCK_CONVERT, 1)
+ banner_image.set_from_icon_name(
+ Gtk.STOCK_CONVERT, Gtk.IconSize.MENU)
elif state == self.JINGLE_STATE_CONNECTION_RECEIVED:
- banner_image.set_from_stock(
- Gtk.STOCK_NETWORK, 1)
+ banner_image.set_from_icon_name(
+ "network-workgroup", Gtk.IconSize.MENU)
elif state == self.JINGLE_STATE_CONNECTED:
- banner_image.set_from_stock(
- Gtk.STOCK_CONNECT, 1)
+ banner_image.set_from_icon_name(
+ Gtk.STOCK_CONNECT, Gtk.IconSize.MENU)
elif state == self.JINGLE_STATE_ERROR:
- banner_image.set_from_stock(
- Gtk.STOCK_DIALOG_WARNING, 1)
+ banner_image.set_from_icon_name(
+ "dialog-warning", Gtk.IconSize.MENU)
self.update_toolbar()
def update_audio(self):
diff --git a/gajim/config.py b/gajim/config.py
index 449bab701..a51851461 100644
--- a/gajim/config.py
+++ b/gajim/config.py
@@ -2443,7 +2443,7 @@ class AccountCreationWizardWindow:
self.go_online_checkbutton.show()
img = self.xml.get_object('finish_image')
if self.modify:
- img.set_from_stock(Gtk.STOCK_APPLY, Gtk.IconSize.DIALOG)
+ img.set_from_icon_name(Gtk.STOCK_APPLY, Gtk.IconSize.DIALOG)
else:
path_to_file = gtkgui_helpers.get_icon_path('org.gajim.Gajim', 48)
img.set_from_file(path_to_file)
@@ -2701,7 +2701,7 @@ class AccountCreationWizardWindow:
self.go_online_checkbutton.hide()
self.show_vcard_checkbutton.hide()
img = self.xml.get_object('finish_image')
- img.set_from_stock(Gtk.STOCK_DIALOG_ERROR, Gtk.IconSize.DIALOG)
+ img.set_from_icon_name("dialog-error", Gtk.IconSize.DIALOG)
finish_text = '%s\n\n%s' % (
_('An error occurred during account creation'), obj.reason)
self.finish_label.set_markup(finish_text)
@@ -2735,7 +2735,7 @@ class AccountCreationWizardWindow:
if self.account in app.config.get_per('accounts'):
app.config.del_per('accounts', self.account)
img = self.xml.get_object('finish_image')
- img.set_from_stock(Gtk.STOCK_DIALOG_ERROR, Gtk.IconSize.DIALOG)
+ img.set_from_icon_name("dialog-error", Gtk.IconSize.DIALOG)
finish_text = '%s\n\n%s' % (_(
'An error occurred during account creation'), obj.reason)
self.finish_label.set_markup(finish_text)
diff --git a/gajim/disco.py b/gajim/disco.py
index 43f8c29ad..536e6ee74 100644
--- a/gajim/disco.py
+++ b/gajim/disco.py
@@ -891,7 +891,7 @@ class AgentBrowser:
self.browse_button = Gtk.Button()
self.browse_button.connect('clicked', self.on_browse_button_clicked)
self.window.action_buttonbox.add(self.browse_button)
- image = Gtk.Image.new_from_stock(Gtk.STOCK_OPEN, Gtk.IconSize.BUTTON)
+ image = Gtk.Image.new_from_icon_name("document-open", Gtk.IconSize.BUTTON)
self.browse_button.set_image(image)
label = _('Browse')
self.browse_button.set_label(label)
@@ -1299,7 +1299,7 @@ class ToplevelAgentBrowser(AgentBrowser):
self.execute_button = Gtk.Button()
self.execute_button.connect('clicked', self.on_execute_button_clicked)
self.window.action_buttonbox.add(self.execute_button)
- image = Gtk.Image.new_from_stock(Gtk.STOCK_EXECUTE, Gtk.IconSize.BUTTON)
+ image = Gtk.Image.new_from_icon_name("system-run", Gtk.IconSize.BUTTON)
self.execute_button.set_image(image)
label = _('Execute Command')
self.execute_button.set_label(label)
@@ -1314,8 +1314,6 @@ class ToplevelAgentBrowser(AgentBrowser):
self.join_button = Gtk.Button()
self.join_button.connect('clicked', self.on_join_button_clicked)
self.window.action_buttonbox.add(self.join_button)
- image = Gtk.Image.new_from_stock(Gtk.STOCK_CONNECT, Gtk.IconSize.BUTTON)
- self.join_button.set_image(image)
label = _('Join')
self.join_button.set_label(label)
self.join_button.show_all()
@@ -1323,7 +1321,7 @@ class ToplevelAgentBrowser(AgentBrowser):
self.search_button = Gtk.Button()
self.search_button.connect('clicked', self.on_search_button_clicked)
self.window.action_buttonbox.add(self.search_button)
- image = Gtk.Image.new_from_stock(Gtk.STOCK_FIND, Gtk.IconSize.BUTTON)
+ image = Gtk.Image.new_from_icon_name("edit-find", Gtk.IconSize.BUTTON)
self.search_button.set_image(image)
label = _('Search')
self.search_button.set_label(label)
diff --git a/gajim/filetransfers_window.py b/gajim/filetransfers_window.py
index 0f3325158..d78617047 100644
--- a/gajim/filetransfers_window.py
+++ b/gajim/filetransfers_window.py
@@ -897,8 +897,8 @@ class FileTransfersWindow:
if status:
label = _('Pause')
self.pause_button.set_label(label)
- self.pause_button.set_image(Gtk.Image.new_from_stock(
- Gtk.STOCK_MEDIA_PAUSE, Gtk.IconSize.MENU))
+ self.pause_button.set_image(Gtk.Image.new_from_icon_name(
+ "media-playback-pause", Gtk.IconSize.MENU))
self.pause_menuitem.set_sensitive(True)
self.pause_menuitem.set_no_show_all(False)
@@ -908,8 +908,8 @@ class FileTransfersWindow:
else:
label = _('_Continue')
self.pause_button.set_label(label)
- self.pause_button.set_image(Gtk.Image.new_from_stock(
- Gtk.STOCK_MEDIA_PLAY, Gtk.IconSize.MENU))
+ self.pause_button.set_image(Gtk.Image.new_from_icon_name(
+ "media-playback-start", Gtk.IconSize.MENU))
self.pause_menuitem.hide()
self.pause_menuitem.set_no_show_all(True)
self.continue_menuitem.set_sensitive(True)
diff --git a/gajim/tooltips.py b/gajim/tooltips.py
index 4111b4ad1..8a7cb0e55 100644
--- a/gajim/tooltips.py
+++ b/gajim/tooltips.py
@@ -258,7 +258,7 @@ class StatusTable:
self.table.attach(status_label, 3, self.current_row, 1, 1)
if show_lock:
lock_image = Gtk.Image()
- lock_image.set_from_stock(Gtk.STOCK_DIALOG_AUTHENTICATION,
+ lock_image.set_from_icon_name("dialog-password",
Gtk.IconSize.MENU)
self.table.attach(lock_image, 4, self.current_row, 1, 1)
self.current_row += 1