diff --git a/data/gui/join_groupchat_window.ui b/data/gui/join_groupchat_window.ui index c2db0bc17..58322d9cd 100644 --- a/data/gui/join_groupchat_window.ui +++ b/data/gui/join_groupchat_window.ui @@ -33,7 +33,7 @@ 2 3 4 - + @@ -48,7 +48,7 @@ 2 2 3 - + @@ -61,7 +61,7 @@ 3 4 GTK_FILL - + @@ -74,7 +74,7 @@ 2 3 GTK_FILL - + @@ -87,7 +87,7 @@ 1 2 GTK_FILL - + @@ -114,7 +114,7 @@ 5 6 GTK_FILL - + @@ -129,7 +129,7 @@ 2 5 6 - + @@ -147,7 +147,7 @@ 7 8 GTK_FILL - + @@ -158,7 +158,7 @@ GTK_FILL - + @@ -188,7 +188,7 @@ 6 7 GTK_FILL - + @@ -207,10 +207,9 @@ True 6 - + True liststore1 - 0 0 diff --git a/src/dataforms_widget.py b/src/dataforms_widget.py index cf35d0ebb..425a42ec3 100644 --- a/src/dataforms_widget.py +++ b/src/dataforms_widget.py @@ -570,7 +570,7 @@ class SingleForm(Gtk.Table, object): pixbuf_l = GdkPixbuf.PixbufLoader() pixbuf_l.write(img_data) pixbuf_l.close() - media = Gtk.image_new_from_pixbuf(pixbuf_l.\ + media = Gtk.Image.new_from_pixbuf(pixbuf_l.\ get_pixbuf()) except Exception: media = Gtk.Label(label=_('Unable to load image')) diff --git a/src/dialogs.py b/src/dialogs.py index 7a2977774..fbd4a7b82 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -1643,7 +1643,7 @@ class YesNoDialog(HigDialog): label = Gtk.Label(label=text_label) self.vbox.pack_start(label, False, True, 0) buff = Gtk.TextBuffer() - self.textview = Gtk.TextView(buff) + self.textview = Gtk.TextView.new_with_buffer(buff) frame = Gtk.Frame() frame.set_shadow_type(Gtk.ShadowType.IN) frame.add(self.textview) @@ -2341,7 +2341,7 @@ class JoinGroupchatWindow: liststore = Gtk.ListStore(str) account_combobox.set_model(liststore) cell = Gtk.CellRendererText() - account_combobox.pack_start(cell, True, True, 0) + account_combobox.pack_start(cell, True) account_combobox.add_attribute(cell, 'text', 0) account_combobox.set_active(-1) @@ -2350,7 +2350,7 @@ class JoinGroupchatWindow: gajim.account_is_connected(a)]: if gajim.connections[acct].is_zeroconf: continue - account_combobox.append_text(acct) + liststore.append([acct]) if account and account == acct: account_combobox.set_active(liststore.iter_n_children(None)-1) @@ -2379,7 +2379,13 @@ class JoinGroupchatWindow: self.window.set_title(title) self.server_comboboxentry = self.xml.get_object('server_comboboxentry') - self.server_model = self.server_comboboxentry.get_model() + liststore = Gtk.ListStore(str) + self.server_comboboxentry.set_model(liststore) + cell = Gtk.CellRendererText() + self.server_comboboxentry.pack_start(cell, True) + self.server_comboboxentry.add_attribute(cell, 'text', 0) + self.server_comboboxentry.set_active(-1) + self.server_model = liststore#self.server_comboboxentry.get_model() server_list = [] # get the muc server of our server if 'jabber' in gajim.connections[account].muc_jid: @@ -2389,11 +2395,11 @@ class JoinGroupchatWindow: liststore = Gtk.ListStore(str) self.recently_combobox.set_model(liststore) cell = Gtk.CellRendererText() - self.recently_combobox.pack_start(cell, True, True, 0) + self.recently_combobox.pack_start(cell, True) self.recently_combobox.add_attribute(cell, 'text', 0) self.recently_groupchat = gajim.config.get('recently_groupchat').split() for g in self.recently_groupchat: - self.recently_combobox.append_text(g) + liststore.append([g]) server = gajim.get_server_from_jid(g) if server not in server_list and not server.startswith('irc'): server_list.append(server) @@ -2463,7 +2469,9 @@ class JoinGroupchatWindow: def _set_room_jid(self, room_jid): room, server = gajim.get_name_and_server_from_jid(room_jid) self._room_jid_entry.set_text(room) - self.server_comboboxentry.get_child().set_text(server) + model = self.server_comboboxentry.get_model() + model.append([server]) + #self.server_comboboxentry.set_active(0) def on_recently_combobox_changed(self, widget): model = widget.get_model() @@ -2509,8 +2517,9 @@ class JoinGroupchatWindow: 'groupchat.')) return nickname = self._nickname_entry.get_text().decode('utf-8') - server = self.server_comboboxentry.get_child().get_text().decode('utf-8').\ - strip() + row = self.server_comboboxentry.get_child().get_displayed_row() + model = self.server_comboboxentry.get_model() + server = model[row][0].decode('utf-8').strip() room = self._room_jid_entry.get_text().decode('utf-8').strip() room_jid = room + '@' + server password = self._password_entry.get_text().decode('utf-8') diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 210b9a398..fe276c202 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -470,7 +470,7 @@ class GroupchatControl(ChatControlBase): # workaround to avoid gtk arrows to be shown column = Gtk.TreeViewColumn() # 2nd COLUMN renderer = Gtk.CellRendererPixbuf() - column.pack_start(renderer, False, True, 0) + column.pack_start(renderer, False) self.list_treeview.append_column(column) column.set_visible(False) self.list_treeview.set_expander_column(column) @@ -508,7 +508,7 @@ class GroupchatControl(ChatControlBase): def fill_column(self, col): for rend in self.renderers_list: - col.pack_start(rend[1], rend[2], True, 0) + col.pack_start(rend[1], rend[2]) col.add_attribute(rend[1], rend[3], rend[4]) col.set_cell_data_func(rend[1], rend[5], rend[6]) # set renderers propertys @@ -594,8 +594,9 @@ class GroupchatControl(ChatControlBase): """ The MUC treeview has resized. Move the hpaned in all tabs to match """ - if gparamspec.name != 'position': - return + # print pane, dir(pane) + #if gparamspec.name != 'position': + #return if self.resize_from_another_muc: # Don't send the event to other MUC return @@ -1430,7 +1431,7 @@ class GroupchatControl(ChatControlBase): gc_contact.affiliation != 'none' and gajim.config.get( 'show_affiliation_in_groupchat'): pixbuf1 = image.get_pixbuf().copy() - pixbuf2 = GdkPixbuf.Pixbuf(GdkPixbuf.Colorspace.RGB, True, 8, 4, 4) + pixbuf2 = GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB, True, 8, 4, 4) if gc_contact.affiliation == 'owner': pixbuf2.fill(0xff0000ff) # Red elif gc_contact.affiliation == 'admin': @@ -1440,7 +1441,7 @@ class GroupchatControl(ChatControlBase): pixbuf2.composite(pixbuf1, 12, 12, pixbuf2.get_property('width'), pixbuf2.get_property('height'), 0, 0, 1.0, 1.0, GdkPixbuf.InterpType.HYPER, 127) - image = Gtk.image_new_from_pixbuf(pixbuf1) + image = Gtk.Image.new_from_pixbuf(pixbuf1) self.model[iter_][C_IMG] = image self.model[iter_][C_TEXT] = name @@ -1453,7 +1454,7 @@ class GroupchatControl(ChatControlBase): fake_jid = self.room_jid + '/' + nick pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(fake_jid) if pixbuf in ('ask', None): - scaled_pixbuf = None + scaled_pixbuf = '' else: scaled_pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'roster') self.model[iter_][C_AVATAR] = scaled_pixbuf diff --git a/src/roster_window.py b/src/roster_window.py index 5860fc774..95b81cb91 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1489,7 +1489,10 @@ class RosterWindow: # do not change selection while DND'ing return # Expand his parent, so this path is visible, don't expand it. - self.tree.expand_to_path(path[:-1]) + path_ = str(path.get_indices()[:-1])[1:-1] + path_ = path_.replace(', ', ':') + path = path.new_from_string(path_) + self.tree.expand_to_path(path) self.tree.scroll_to_cell(path) self.tree.set_cursor(path) @@ -2395,7 +2398,7 @@ class RosterWindow: if isinstance(w, dict): self.close_all_from_dict(w) else: - w.window().destroy() + w.window.destroy() def close_all(self, account, force=False): """