def __init__(self, *args): TrayBase.__init__(self, *args) self.default_icon_extension = "ico" self.default_icon_name = "xpra.ico" self.calculate_offset() icon_filename = self.get_tray_icon_filename(self.default_icon_filename) self.tray_widget = win32NotifyIcon(self.tooltip, self.move_cb, self.click_cb, self.exit_cb, None, icon_filename) get_win32_event_listener().add_event_callback(win32con.WM_DISPLAYCHANGE, self.calculate_offset)
def __init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb): TrayBase.__init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb) self.default_icon_name = "xpra.ico" icon_filename = self.get_tray_icon_filename(icon_filename) self.tray_widget = win32NotifyIcon(tooltip, click_cb, exit_cb, None, icon_filename) # now let's try to hook the session notification self.detect_win32_session_events(self.getHWND()) self.balloon_click_callback = None
def __init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb): TrayBase.__init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb) self.default_icon_name = "xpra.ico" icon_filename = self.get_tray_icon_filename(icon_filename) self.tray_widget = win32NotifyIcon(tooltip, click_cb, exit_cb, None, icon_filename) #now let's try to hook the session notification self.detect_win32_session_events(self.getHWND()) self.balloon_click_callback = None
def __init__(self, *args): TrayBase.__init__(self, *args) self.default_icon_extension = "ico" self.default_icon_name = "xpra.ico" icon_filename = self.get_tray_icon_filename(self.default_icon_filename) self.tray_widget = win32NotifyIcon(self.tooltip, self.click_cb, self.exit_cb, None, icon_filename) #now let's try to hook the session notification self.detect_win32_session_events(self.getHWND())
def __init__(self, *args): TrayBase.__init__(self, *args) self.default_icon_extension = "ico" self.default_icon_name = "xpra.ico" icon_filename = self.get_tray_icon_filename(self.default_icon_filename) self.tray_widget = win32NotifyIcon(self.tooltip, self.move_cb, self.click_cb, self.exit_cb, None, icon_filename)
def __init__(self, *args): TrayBase.__init__(self, *args) from xpra.platform.darwin.gui import get_OSXApplication self.macapp = get_OSXApplication() self.last_attention_request_id = -1 self.set_global_menu() self.set_dock_menu() self.set_dock_icon() set_exit_cb(self.quit)
def __init__(self, *args): TrayBase.__init__(self, *args) self.tray_widget = gtk.StatusIcon() set_tooltip_text(self.tray_widget, self.tooltip or "Xpra") self.tray_widget.connect('activate', self.activate_menu) self.tray_widget.connect('popup-menu', self.popup_menu) if self.size_changed_cb: self.tray_widget.connect('size-changed', self.size_changed_cb) filename = self.get_tray_icon_filename(self.default_icon_filename) if filename: self.set_icon_from_file(filename)
def __init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb): TrayBase.__init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb) from xpra.platform.darwin.gui import get_OSXApplication self.macapp = get_OSXApplication() self.icon_filename = icon_filename self.last_attention_request_id = -1 self.set_global_menu() self.set_dock_menu() self.set_dock_icon() set_exit_cb(self.quit)
def __init__(self, *args): TrayBase.__init__(self, *args) from xpra.platform.darwin.gui import get_OSXApplication self.macapp = get_OSXApplication() assert self.macapp, "cannot use OSX Tray without the native gtkosx_application bindings" self.last_attention_request_id = -1 self.set_global_menu() self.set_dock_menu() self.set_dock_icon() set_exit_cb(self.quit)
def __init__(self, *args, **kwargs): TrayBase.__init__(self, *args, **kwargs) self.tray_widget = gtk.StatusIcon() self.tray_widget.set_tooltip_text(self.tooltip or "Xpra") self.tray_widget.connect('activate', self.activate_menu) self.tray_widget.connect('popup-menu', self.popup_menu) if self.size_changed_cb: self.tray_widget.connect('size-changed', self.size_changed_cb) if self.default_icon_filename: self.set_icon() self.tray_widget.set_visible(True)
def __init__(self, *args): TrayBase.__init__(self, *args) self.calculate_offset() self.default_icon_extension = "ico" icon_filename = get_icon_filename(self.default_icon_filename, "ico") self.tray_widget = win32NotifyIcon(self.app_id, self.tooltip, self.move_cb, self.click_cb, self.exit_cb, icon_filename) el = get_win32_event_listener() if el: el.add_event_callback(win32con.WM_DISPLAYCHANGE, self.calculate_offset)
def __init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb): TrayBase.__init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb) self.tray_widget = gtk.StatusIcon() set_tooltip_text(self.tray_widget, tooltip or "Xpra") self.tray_widget.connect('activate', self.activate_menu) self.tray_widget.connect('popup-menu', self.popup_menu) if self.size_changed_cb: self.tray_widget.connect('size-changed', self.size_changed_cb) filename = self.get_tray_icon_filename(icon_filename) if filename: self.set_icon_from_file(filename)
def __init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb): TrayBase.__init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb) filename = self.get_tray_icon_filename(icon_filename) self.appindicator = get_appindicator() assert self.appindicator, "appindicator is not available!" self.tray_widget = self.appindicator.Indicator(tooltip, filename, self.appindicator.CATEGORY_APPLICATION_STATUS) if hasattr(self.tray_widget, "set_icon_theme_path"): self.tray_widget.set_icon_theme_path(get_icon_dir()) self.tray_widget.set_attention_icon("xpra.png") if filename: self.tray_widget.set_icon(filename) else: self.tray_widget.set_label("Xpra") if menu: self.tray_widget.set_menu(menu)
def __init__(self, *args, **kwargs): TrayBase.__init__(self, *args, **kwargs) filename = get_icon_filename(self.default_icon_filename) or "xpra.png" self._has_icon = False self.tmp_filename = None self.tray_widget = Indicator(self.tooltip, filename, APPLICATION_STATUS) if hasattr(self.tray_widget, "set_icon_theme_path"): self.tray_widget.set_icon_theme_path(get_icon_dir()) self.tray_widget.set_attention_icon("xpra.png") if filename: self.set_icon_from_file(filename) if not self._has_icon: self.tray_widget.set_label("Xpra") if self.menu: self.tray_widget.set_menu(self.menu)
def __init__(self, *args): TrayBase.__init__(self, *args) filename = self.get_tray_icon_filename(self.default_icon_filename) self.appindicator = get_appindicator() self._has_icon = False assert self.appindicator, "appindicator is not available!" self.tray_widget = self.appindicator.Indicator(self.tooltip, filename, self.appindicator.CATEGORY_APPLICATION_STATUS) if hasattr(self.tray_widget, "set_icon_theme_path"): self.tray_widget.set_icon_theme_path(get_icon_dir()) self.tray_widget.set_attention_icon("xpra.png") if filename: self.set_icon_from_file(filename) if not self._has_icon: self.tray_widget.set_label("Xpra") if self.menu: self.tray_widget.set_menu(self.menu)
def __init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb): TrayBase.__init__(self, menu, tooltip, icon_filename, size_changed_cb, click_cb, mouseover_cb, exit_cb) filename = self.get_tray_icon_filename(icon_filename) self.appindicator = get_appindicator() assert self.appindicator, "appindicator is not available!" self.tray_widget = self.appindicator.Indicator( tooltip, filename, self.appindicator.CATEGORY_APPLICATION_STATUS) if hasattr(self.tray_widget, "set_icon_theme_path"): self.tray_widget.set_icon_theme_path(get_icon_dir()) self.tray_widget.set_attention_icon("xpra.png") if filename: self.tray_widget.set_icon(filename) else: self.tray_widget.set_label("Xpra") if menu: self.tray_widget.set_menu(menu)
def __init__(self, *args, **kwargs): TrayBase.__init__(self, *args, **kwargs) filename = get_icon_filename(self.default_icon_filename) self.appindicator = get_appindicator() self._has_icon = False assert self.appindicator, "appindicator is not available!" category = get_application_category(self.appindicator) assert category is not None, "appindicator category is not available!" if PYTHON2: self.tray_widget = self.appindicator.Indicator(self.tooltip, filename, category) else: self.tray_widget = self.appindicator.Indicator() self.tray_widget.set_property("label", self.tooltip) self.tray_widget.set_property("category", category) if hasattr(self.tray_widget, "set_icon_theme_path"): self.tray_widget.set_icon_theme_path(get_icon_dir()) self.tray_widget.set_attention_icon("xpra.png") if filename: self.set_icon_from_file(filename) if not self._has_icon: self.tray_widget.set_label("Xpra") if self.menu: self.tray_widget.set_menu(self.menu)
def cleanup(self): self.clean_last_tmp_icon() TrayBase.cleanup(self)
def __init__(self, client, *args): TrayBase.__init__(self, client, *args) self.client = client self.shown = False self.set_global_menu()