Skip to content

Commit

Permalink
#1766: make sure that the item selected in the combo box is also the …
Browse files Browse the repository at this point in the history
…only one marked as "active"

git-svn-id: https://xpra.org/svn/Xpra/trunk@18428 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 13, 2018
1 parent 2b31008 commit 210f182
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/xpra/client/gtk_base/client_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@ def update_gui_from_config(self):
if self.config.encoding and self.encoding_combo:
index = self.encoding_combo.get_menu().encoding_to_index.get(self.config.encoding, -1)
log("setting encoding combo to %s / %s", self.config.encoding, index)
#make sure the right one is the only one selected:
for i,item in enumerate(self.encoding_combo.get_menu().get_children()):
item.set_active(i==index)
#then select it in the combo:
if index>=0:
self.encoding_combo.set_history(index)
self.username_entry.set_text(self.config.username)
Expand Down Expand Up @@ -980,6 +984,7 @@ def force_show():
#wait a little bit for the "openFile" signal
app.__osx_open_signal = False
def do_open_file(filename):
log.info("do_open_file(%s)", filename)
app.update_options_from_file(filename)
#the compressors and packet encoders cannot be changed from the UI
#so apply them now:
Expand All @@ -991,9 +996,10 @@ def do_open_file(filename):
else:
force_show()
def open_file(_, filename):
log("open_file(%s)", filename)
log.info("open_file(%s)", filename)
glib.idle_add(do_open_file, filename)
def do_open_URL(url):
log.info("do_open_URL(%s)", url)
app.__osx_open_signal = True
app.update_options_from_URL(url)
#the compressors and packet encoders cannot be changed from the UI
Expand All @@ -1002,7 +1008,7 @@ def do_open_URL(url):
app.update_gui_from_config()
glib.idle_add(app.do_connect)
def open_URL(url):
log("open_URL(%s)", url)
log.info("open_URL(%s)", url)
glib.idle_add(do_open_URL, url)
from xpra.platform.darwin.gui import get_OSXApplication, register_URL_handler
register_URL_handler(open_URL)
Expand Down

0 comments on commit 210f182

Please sign in to comment.