diff options
-rw-r--r-- | grc/gui/Executor.py | 6 | ||||
-rw-r--r-- | grc/gui/NotebookPage.py | 3 | ||||
-rw-r--r-- | grc/gui/VariableEditor.py | 8 |
3 files changed, 6 insertions, 11 deletions
diff --git a/grc/gui/Executor.py b/grc/gui/Executor.py index c39f743809..13a1cfd942 100644 --- a/grc/gui/Executor.py +++ b/grc/gui/Executor.py @@ -23,7 +23,7 @@ import sys import re from distutils.spawn import find_executable -from gi.repository import GObject +from gi.repository import GLib from ..core import Messages @@ -91,10 +91,10 @@ class ExecFlowGraphThread(threading.Thread): # handle completion r = "\n" while r: - GObject.idle_add(Messages.send_verbose_exec, r) + GLib.idle_add(Messages.send_verbose_exec, r) r = os.read(self.process.stdout.fileno(), 1024) self.process.poll() - GObject.idle_add(self.done) + GLib.idle_add(self.done) def done(self): """Perform end of execution tasks.""" diff --git a/grc/gui/NotebookPage.py b/grc/gui/NotebookPage.py index e7a024ab3e..bcfb4d87fe 100644 --- a/grc/gui/NotebookPage.py +++ b/grc/gui/NotebookPage.py @@ -54,8 +54,7 @@ class NotebookPage(Gtk.HBox): # tab box to hold label and close button self.label = Gtk.Label() - image = Gtk.Image() - image.set_from_stock('gtk-close', Gtk.IconSize.MENU) + image = Gtk.Image.new_from_icon_name('window-close', Gtk.IconSize.MENU) image_box = Gtk.HBox(homogeneous=False, spacing=0) image_box.pack_start(image, True, False, 0) button = Gtk.Button() diff --git a/grc/gui/VariableEditor.py b/grc/gui/VariableEditor.py index 299d3cdb6e..d34903e241 100644 --- a/grc/gui/VariableEditor.py +++ b/grc/gui/VariableEditor.py @@ -161,11 +161,7 @@ class VariableEditor(Gtk.VBox): # Sets cell contents def set_icon(self, col, cell, model, iter, data): block = model.get_value(iter, BLOCK_INDEX) - if block: - pb = self.treeview.render_icon(Gtk.STOCK_CLOSE, 16, None) - else: - pb = self.treeview.render_icon(Gtk.STOCK_ADD, 16, None) - cell.set_property('pixbuf', pb) + cell.set_property('icon-name', 'window-close' if block else 'list-add') def set_value(self, col, cell, model, iter, data): sp = cell.set_property @@ -270,7 +266,7 @@ class VariableEditor(Gtk.VBox): # Create a context menu to confirm the delete operation confirmation_menu = Gtk.Menu() block_id = self._block.get_param('id').get_value().replace("_", "__") - confirm = Gtk.MenuItem("Delete {}".format(block_id)) + confirm = Gtk.MenuItem(label="Delete {}".format(block_id)) confirm.connect('activate', self.handle_action, self.DELETE_BLOCK) confirmation_menu.add(confirm) confirmation_menu.show_all() |