xpra icon
Bug tracker and wiki

Ignore:
Location:
tags/v0.17.x/src/xpra/client
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tags/v0.17.x/src/xpra/client/client_base.py

    r12925 r27514  
    2929from xpra.version_util import version_compat_check, get_version_info, local_version
    3030from xpra.platform.info import get_name
    31 from xpra.os_util import get_hex_uuid, get_machine_id, get_user_uuid, load_binary_file, SIGNAMES, strtobytes, bytestostr
     31from xpra.os_util import get_machine_id, get_user_uuid, load_binary_file, SIGNAMES, strtobytes, bytestostr
    3232from xpra.util import flatten_dict, typedict, updict, xor, repr_ellipsized, nonl, disconnect_is_an_error, dump_all_frames
    3333from xpra.net.file_transfer import FileTransferHandler
     
    537537        #they also tell us which digest to use:
    538538        digest = packet[3]
    539         client_salt = get_hex_uuid()+get_hex_uuid()
     539        client_salt = get_salt(len(salt))
    540540        #TODO: use some key stretching algorigthm? (meh)
    541541        try:
     
    554554                warn_server_and_exit(EXIT_ENCRYPTION, "server requested digest %s, cowardly refusing to use it without encryption" % digest, "invalid digest")
    555555                return
    556             challenge_response = xor(password, salt)
     556            salt = salt[:len(password)]
     557            challenge_response = strtobytes(xor(password, salt))
    557558        else:
    558559            warn_server_and_exit(EXIT_PASSWORD_REQUIRED, "server requested an unsupported digest: %s" % digest, "invalid digest")
  • tags/v0.17.x/src/xpra/client/client_window_base.py

    r12925 r27514  
    195195                        return value
    196196                    title = re.sub("@[\w\-]*@", metadata_replace, title)
    197                     if sys.version<'3':
    198                         utf8_title = title.encode("utf-8")
    199                     else:
    200                         utf8_title = title
     197                if sys.version<'3':
     198                    utf8_title = title.encode("utf-8")
     199                else:
     200                    utf8_title = title
    201201            except Exception as e:
    202202                log.error("error parsing window title: %s", e)
  • tags/v0.17.x/src/xpra/client/gl/gl_window_backing_base.py

    r12925 r27514  
    207207        self.paint_screen = False
    208208        self.paint_spinner = False
    209         self.draw_needs_refresh = False
    210209        self.offscreen_fbo = None
    211210        self.pending_fbo_paint = []
     
    214213
    215214        GTKWindowBacking.__init__(self, wid, window_alpha)
     215        self.draw_needs_refresh = False
    216216        self.init_gl_config(window_alpha)
    217217        self.init_backing()
  • tags/v0.17.x/src/xpra/client/gtk_base/client_launcher.py

    r12925 r27514  
    819819                    app.__osx_open_file = False
    820820                    def do_open_file(filename):
    821                         app.__osx_open_file = True
    822821                        app.update_options_from_file(filename)
    823822                        #the compressors and packet encoders cannot be changed from the UI
     
    826825                        app.update_gui_from_config()
    827826                        if app.config.autoconnect:
     827                            app.__osx_open_file = True
    828828                            glib.idle_add(app.do_connect)
    829829                    def open_file(_, filename):
  • tags/v0.17.x/src/xpra/client/gtk_base/gtk_client_window_base.py

    r12925 r27514  
    893893        if self._client.server_window_frame_extents and "frame" not in state:
    894894            wfs = self.get_window_frame_size()
    895             if wfs:
     895            if wfs and len(wfs)==4:
    896896                state["frame"] = self._client.crect(*wfs)
    897897                self._current_frame_extents = wfs
  • tags/v0.17.x/src/xpra/client/gtk_base/gtk_tray_menu_base.py

    r12925 r27514  
    567567    def make_keyboardsyncmenuitem(self):
    568568        def set_keyboard_sync_tooltip():
    569             if not self.client.keyboard_helper:
     569            kh = self.client.keyboard_helper
     570            if not kh:
    570571                self.keyboard_sync_menuitem.set_tooltip_text("Keyboard support is not loaded")
    571             elif self.client.keyboard_helper.keyboard_sync:
     572            elif kh.keyboard_sync:
    572573                self.keyboard_sync_menuitem.set_tooltip_text("Disable keyboard synchronization (prevents spurious key repeats on high latency connections)")
    573574            else:
     
    581582        set_sensitive(self.keyboard_sync_menuitem, False)
    582583        def set_keyboard_sync_menuitem(*args):
    583             log("set_keyboard_sync_menuitem%s enabled=%s", args, self.client.keyboard_helper.keyboard_sync)
    584             self.keyboard_sync_menuitem.set_active(self.client.keyboard_helper.keyboard_sync)
    585             set_sensitive(self.keyboard_sync_menuitem, True)
     584            kh = self.client.keyboard_helper
     585            set_sensitive(self.keyboard_sync_menuitem, bool(kh))
     586            if kh:
     587                log("set_keyboard_sync_menuitem%s enabled=%s", args, kh.keyboard_sync)
     588            self.keyboard_sync_menuitem.set_active(bool(kh) and bool(kh.keyboard_sync))
    586589            set_keyboard_sync_tooltip()
    587590        self.client.after_handshake(set_keyboard_sync_menuitem)
     
    892895            c.connect("toggled", activate_cb, menu)
    893896            return c
     897        webcam = self.menuitem("Webcam", "webcam.png", "Forward webcam pictures to the server", None)
     898        if not self.client.webcam_forwarding:
     899            webcam.set_tooltip_text("Webcam forwarding is disabled")
     900            set_sensitive(webcam, False)
     901            return webcam
     902            return c
    894903        def start_webcam(*args):
    895904            webcamlog("start_webcam%s", args)
     
    903912        menu.append(off)
    904913
    905         webcam = self.menuitem("Webcam", "webcam.png", "Forward webcam pictures to the server", None)
    906914        webcam.set_submenu(menu)
    907915        def webcam_changed(*args):
  • tags/v0.17.x/src/xpra/client/ui_client_base.py

    r12925 r27514  
    10031003
    10041004    def scaleset(self, xscale=1, yscale=1):
    1005         self.scale_change(xscale/self.xscale, yscale/self.yscale)
     1005        scalinglog("scaleset(%s, %s) current scaling: %s, %s", xscale, yscale, self.xscale, self.yscale)
     1006        self.scale_change(float(xscale)/self.xscale, float(yscale)/self.yscale)
    10061007
    10071008    def scale_change(self, xchange=1, ychange=1):
     1009        scalinglog("scale_change(%s, %s)", xchange, ychange)
    10081010        if self.server_is_shadow and self.shadow_fullscreen:
    10091011            scalinglog("scale_change(%s, %s) ignored, fullscreen shadow mode is active", xchange, ychange)
     
    12751277                log("window_close_event(%i) metadata=%s", wid, metadata)
    12761278                class_instance = metadata.get("class-instance")
    1277                 title = metadata.get("title")
    1278                 log("window_close_event(%i) title=%s, class-instance(%s)=%s", wid, title, class_instance)
    1279                 if title in TITLE_CLOSEEXIT:
     1279                title = metadata.get("title", "")
     1280                log("window_close_event(%i) title=%s, class-instance=%s", wid, title, class_instance)
     1281                matching_title_close = [x for x in TITLE_CLOSEEXIT if x and title.startswith(x)]
     1282                if matching_title_close:
    12801283                    log.info("window-close event on %s window, disconnecting", title)
    12811284                    self.quit(0)
    12821285                    return True
    1283                 if class_instance and class_instance[0] in WM_CLASS_CLOSEEXIT:
     1286                if class_instance and class_instance[1] in WM_CLASS_CLOSEEXIT:
    12841287                    log.info("window-close event on %s window, disconnecting", class_instance[0])
    12851288                    self.quit(0)
     
    17421745        #the server will have a handle on the mmap file by now, safe to delete:
    17431746        self.clean_mmap()
    1744         server_auto_refresh_delay = c.intget("auto_refresh_delay", 0)/1000.0
    1745         if server_auto_refresh_delay==0 and self.auto_refresh_delay>0:
    1746             log.warn("Warning: server does not support auto-refresh!")
     1747        if self.windows_enabled:
     1748            server_auto_refresh_delay = c.intget("auto_refresh_delay", 0)/1000.0
     1749            if server_auto_refresh_delay==0 and self.auto_refresh_delay>0:
     1750                log.warn("Warning: server does not support auto-refresh!")
    17471751        self.server_encodings = c.strlistget("encodings")
    17481752        self.server_core_encodings = c.strlistget("encodings.core", self.server_encodings)
     
    17861790            proxy_version = c.strget("proxy.build.version", proxy_version)
    17871791            proxy_distro = c.strget("linux_distribution")
    1788             msg = "via: %s proxy version %s" % (platform_name(proxy_platform, proxy_distro or proxy_release), std(proxy_version))
     1792            msg = "via: %s proxy version %s" % (platform_name(proxy_platform, proxy_distro or proxy_release), std(proxy_version or "unknown"))
    17891793            if proxy_hostname:
    17901794                msg += " on '%s'" % std(proxy_hostname)
     
    18911895        c = self.server_capabilities
    18921896        if self.client_supports_remote_logging and c.boolget("remote-logging"):
     1897            #check for debug:
     1898            from xpra.log import is_debug_enabled
     1899            for x in ("network", "crypto"):
     1900                if is_debug_enabled(x):
     1901                    log.warn("Warning: cannot enable remote logging as '%s' debug logging is enabled", x)
     1902                    return
    18931903            log.info("enabled remote logging")
    18941904            if not self.log_both:
Note: See TracChangeset for help on using the changeset viewer.