fix some windows
This commit is contained in:
parent
59a621bd87
commit
92ce48886c
|
@ -75,7 +75,7 @@ Select the contacts you want to invite</property>
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxEntry" id="server_list_comboboxentry">
|
||||
<object class="GtkComboBox" id="server_list_comboboxentry">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
@ -119,11 +119,11 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
|||
|
||||
keymap = Gdk.Keymap.get_default()
|
||||
try:
|
||||
keycode_c = keymap.get_entries_for_keyval(Gdk.KEY_c)[0][0]
|
||||
keycode_c = keymap.get_entries_for_keyval(Gdk.KEY_c)[1][0].keycode
|
||||
except TypeError:
|
||||
keycode_c = 54
|
||||
try:
|
||||
keycode_ins = keymap.get_entries_for_keyval(Gdk.KEY_Insert)[0][0]
|
||||
keycode_ins = keymap.get_entries_for_keyval(Gdk.KEY_Insert)[1][0].keycode
|
||||
except TypeError:
|
||||
keycode_ins = 118
|
||||
|
||||
|
@ -693,10 +693,11 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
|||
|
||||
def _conv_textview_key_press_event(self, widget, event):
|
||||
# translate any layout to latin_layout
|
||||
keymap = Gdk.keymap_get_default()
|
||||
keycode = keymap.get_entries_for_keyval(event.keyval)[0][0]
|
||||
if (event.get_state() & Gdk.ModifierType.CONTROL_MASK and keycode in (self.keycode_c,
|
||||
self.keycode_ins)) or (event.get_state() & Gdk.ModifierType.SHIFT_MASK and \
|
||||
valid, entries = self.keymap.get_entries_for_keyval(event.keyval)
|
||||
keycode = entries[0].keycode
|
||||
if (event.get_state() & Gdk.ModifierType.CONTROL_MASK and keycode in (
|
||||
self.keycode_c, self.keycode_ins)) or (
|
||||
event.get_state() & Gdk.ModifierType.SHIFT_MASK and \
|
||||
event.keyval in (Gdk.KEY_Page_Down, Gdk.KEY_Page_Up)):
|
||||
return False
|
||||
self.parent_win.notebook.emit('key_press_event', event)
|
||||
|
|
|
@ -1460,7 +1460,8 @@ class FileChooserDialog(Gtk.FileChooserDialog):
|
|||
|
||||
GObject.GObject.__init__(self, title=title_text, action=action)
|
||||
self.add_button(buttons[0],buttons[1])
|
||||
self.add_button(buttons[2],buttons[3])
|
||||
if len(buttons) ==4:
|
||||
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):
|
||||
|
@ -4862,8 +4863,9 @@ class TransformChatToMUC:
|
|||
server_list = []
|
||||
self.servers = Gtk.ListStore(str)
|
||||
self.server_list_comboboxentry.set_model(self.servers)
|
||||
|
||||
self.server_list_comboboxentry.set_text_column(0)
|
||||
cell = Gtk.CellRendererText()
|
||||
self.server_list_comboboxentry.pack_start(cell, True)
|
||||
self.server_list_comboboxentry.add_attribute(cell, 'text', 0)
|
||||
|
||||
# get the muc server of our server
|
||||
if 'jabber' in gajim.connections[account].muc_jid:
|
||||
|
@ -4950,7 +4952,9 @@ class TransformChatToMUC:
|
|||
self.window.destroy()
|
||||
|
||||
def on_invite_button_clicked(self, widget):
|
||||
server = self.server_list_comboboxentry.get_active_text()
|
||||
row = self.server_list_comboboxentry.get_child().get_displayed_row()
|
||||
model = self.server_list_comboboxentry.get_model()
|
||||
server = model[row][0].decode('utf-8').strip()
|
||||
if server == '':
|
||||
return
|
||||
gajim.connections[self.account].check_unique_room_id_support(server, self)
|
||||
|
|
|
@ -892,9 +892,9 @@ def create_combobox(value_list, selected_value = None):
|
|||
Value_list is [(label1, value1)]
|
||||
"""
|
||||
liststore = Gtk.ListStore(str, str)
|
||||
combobox = Gtk.ComboBox(liststore)
|
||||
combobox = Gtk.ComboBox.new_with_model(liststore)
|
||||
cell = Gtk.CellRendererText()
|
||||
combobox.pack_start(cell, True, True, 0)
|
||||
combobox.pack_start(cell, True)
|
||||
combobox.add_attribute(cell, 'text', 0)
|
||||
i = -1
|
||||
for value in value_list:
|
||||
|
@ -911,7 +911,7 @@ def create_list_multi(value_list, selected_values=None):
|
|||
Value_list is [(label1, value1)]
|
||||
"""
|
||||
liststore = Gtk.ListStore(str, str)
|
||||
treeview = Gtk.TreeView(liststore)
|
||||
treeview = Gtk.TreeView.new_with_model(liststore)
|
||||
treeview.get_selection().set_mode(Gtk.SelectionMode.MULTIPLE)
|
||||
treeview.set_headers_visible(False)
|
||||
col = Gtk.TreeViewColumn()
|
||||
|
|
Loading…
Reference in New Issue