diff --git a/src/dialogs.py b/src/dialogs.py index e6131ec23..449a01bdb 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -1458,9 +1458,9 @@ class FileChooserDialog(Gtk.FileChooserDialog): select_multiple=False, current_folder=None, on_response_ok=None, on_response_cancel=None): - GObject.GObject.__init__(self, title=title_text, action=action, - buttons=buttons) - + GObject.GObject.__init__(self, title=title_text, action=action) + self.add_button(buttons[0],buttons[1]) + self.add_button(buttons[2],buttons[3]) self.set_default_response(default_response) self.set_select_multiple(select_multiple) if current_folder and os.path.isdir(current_folder): @@ -4702,7 +4702,8 @@ class ImageChooserDialog(FileChooserDialog): if path_to_file is None or os.path.isdir(path_to_file): # nothing to preview or directory # make sure you clean image do show nothing - widget.get_preview_widget().set_from_file(None) + preview = widget.get_preview_widget() + preview.clear() return try: pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(path_to_file, 100, 100) diff --git a/src/profile_window.py b/src/profile_window.py index 2e698284b..7e7fc76e7 100644 --- a/src/profile_window.py +++ b/src/profile_window.py @@ -23,6 +23,7 @@ # THIS FILE IS FOR **OUR** PROFILE (when we edit our INFO) from gi.repository import Gtk +from gi.repository import Gdk from gi.repository import GdkPixbuf from gi.repository import GObject import base64 @@ -46,7 +47,7 @@ class ProfileWindow: def __init__(self, account, transient_for=None): self.xml = gtkgui_helpers.get_gtk_builder('profile_window.ui') self.window = self.xml.get_object('profile_window') - self.set_transient_for(transient_for) + self.window.set_transient_for(transient_for) self.progressbar = self.xml.get_object('progressbar') self.statusbar = self.xml.get_object('statusbar') self.context_id = self.statusbar.get_context_id('profile') @@ -84,7 +85,7 @@ class ProfileWindow: return True # loop forever def remove_statusbar(self, message_id): - self.statusbar.remove_message(self.context_id, message_id) + self.statusbar.remove(self.context_id, message_id) self.remove_statusbar_timeout_id = None def on_profile_window_destroy(self, widget): @@ -288,7 +289,7 @@ class ProfileWindow: self.set_value(i + '_entry', vcard_[i]) if self.update_progressbar_timeout_id is not None: if self.message_id: - self.statusbar.remove_message(self.context_id, self.message_id) + self.statusbar.remove(self.context_id, self.message_id) self.message_id = self.statusbar.push(self.context_id, _('Information received')) self.remove_statusbar_timeout_id = GObject.timeout_add_seconds(3, @@ -398,7 +399,7 @@ class ProfileWindow: if obj.conn.name != self.account: return if self.message_id: - self.statusbar.remove_message(self.context_id, self.message_id) + self.statusbar.remove(self.context_id, self.message_id) self.message_id = self.statusbar.push(self.context_id, _('Information NOT published')) self.remove_statusbar_timeout_id = GObject.timeout_add_seconds(3,