コード例 #1
0
ファイル: win32_tray.py プロジェクト: rudresh2319/Xpra
 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)
コード例 #2
0
ファイル: win32_tray.py プロジェクト: svn2github/Xpra
 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
コード例 #3
0
ファイル: win32_tray.py プロジェクト: rudresh2319/Xpra
	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
コード例 #4
0
ファイル: win32_tray.py プロジェクト: Brainiarc7/xpra
 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())
コード例 #5
0
ファイル: win32_tray.py プロジェクト: rudresh2319/Xpra
 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)
コード例 #6
0
 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())
コード例 #7
0
    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)
コード例 #8
0
ファイル: statusicon_tray.py プロジェクト: Brainiarc7/xpra
 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)
コード例 #9
0
ファイル: osx_tray.py プロジェクト: svn2github/Xpra
    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)
コード例 #10
0
    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)
コード例 #11
0
 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)
コード例 #12
0
ファイル: win32_tray.py プロジェクト: cattaka/Xpra
 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)
コード例 #13
0
ファイル: statusicon_tray.py プロジェクト: rudresh2319/Xpra
 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)
コード例 #14
0
ファイル: osx_tray.py プロジェクト: rudresh2319/Xpra
    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)
コード例 #15
0
ファイル: appindicator_tray.py プロジェクト: svn2github/Xpra
 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)
コード例 #16
0
 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)
コード例 #17
0
 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)
コード例 #18
0
 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)
コード例 #19
0
ファイル: appindicator_tray.py プロジェクト: rudresh2319/Xpra
 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)
コード例 #20
0
ファイル: appindicator_tray.py プロジェクト: gitmirrors2/xpra
 def cleanup(self):
     self.clean_last_tmp_icon()
     TrayBase.cleanup(self)
コード例 #21
0
ファイル: gtkmenu_tray.py プロジェクト: rudresh2319/Xpra
 def __init__(self, client, *args):
     TrayBase.__init__(self, client, *args)
     self.client = client
     self.shown = False
     self.set_global_menu()
コード例 #22
0
ファイル: win32_tray.py プロジェクト: svn2github/Xpra
 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)
コード例 #23
0
ファイル: gtkmenu_tray.py プロジェクト: ljmljz/xpra
 def __init__(self, client, *args):
     TrayBase.__init__(self, client, *args)
     self.client = client
     self.shown = False
     self.set_global_menu()