Skip to content

Commit

Permalink
more gtk3 deprecation warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19700 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 24, 2018
1 parent f326073 commit d19b679
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
13 changes: 9 additions & 4 deletions src/xpra/client/gtk_base/gtk_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,11 +853,16 @@ def process_ui_capabilities(self):
UIXpraClient.process_ui_capabilities(self)
if self.server_randr:
display = display_get_default()
i=0
while i<display.get_n_screens():
screen = display.get_screen(i)
if is_gtk3():
#always one screen per display:
screen = gdk.Screen.get_default()
screen.connect("size-changed", self.screen_size_changed)
i += 1
else:
i=0
while i<display.get_n_screens():
screen = display.get_screen(i)
screen.connect("size-changed", self.screen_size_changed)
i += 1


def window_grab(self, window):
Expand Down
18 changes: 7 additions & 11 deletions src/xpra/client/gtk_base/gtk_tray_menu_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,14 @@ def setup_menu(self, show_close=True):
title_item.set_label(self.client.session_name or u"Xpra")
set_sensitive(title_item, False)
menu.append(title_item)
def set_menu_title(*_args):
#set the real name when available:
try:
title = self.client.get_tray_title()
except:
title = self.client.session_name or u"Xpra"
m = self.menu
if m:
m.set_title(title)
if title_item:
def set_menu_title(*_args):
#set the real name when available:
try:
title = self.client.get_tray_title()
except:
title = self.client.session_name or u"Xpra"
title_item.set_label(title)
self.client.after_handshake(set_menu_title)
self.client.after_handshake(set_menu_title)

menu.append(self.make_infomenuitem())
menu.append(self.make_featuresmenuitem())
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/client/mixins/window_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def watcher_terminated(*args):
getChildReaper().add_process(proc, "signal listener for remote process %s" % pid, command="xpra_signal_listener", ignore=True, forget=True, callback=watcher_terminated)
log("using watcher pid=%i for server pid=%i", proc.pid, pid)
self._pid_to_signalwatcher[pid] = proc
proc.stdout_io_watch = glib.io_add_watch(proc.stdout, glib.IO_IN, self.signal_watcher_event, proc, pid, wid)
proc.stdout_io_watch = glib.io_add_watch(proc.stdout, glib.IO_IN, self.signal_watcher_event, proc, pid, wid, priority=glib.PRIORITY_DEFAULT)
if proc:
self._signalwatcher_to_wids.setdefault(proc, []).append(wid)
return proc.pid
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/server/server_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def add_listen_socket(self, socktype, sock):
from xpra.gtk_common.gobject_compat import import_glib
glib = import_glib()
sock.listen(5)
glib.io_add_watch(sock, glib.IO_IN, self._new_connection, sock)
glib.io_add_watch(sock, glib.IO_IN, self._new_connection, sock, priority=glib.PRIORITY_DEFAULT)
except Exception as e:
netlog("add_listen_socket(%s, %s)", socktype, sock, exc_info=True)
netlog.error("Error: failed to listen on %s socket %s:", socktype, info or sock)
Expand Down

0 comments on commit d19b679

Please sign in to comment.