gtg-user team mailing list archive
-
gtg-user team
-
Mailing list archive
-
Message #00101
Re: StatusIcon
I think we are making a mistake, I feel very good idea to have as a applet,
but there should be an option for "systray", for example by running in xfce
or even able to make it run on Windows, systray should be an option
--------------------------------------
pienso que están cometiendo un error, me parece muy buena idea tener en
formato applet, pero también debería existir una opción para "systray", para
que corrar por ejemplo en xfce o incluso poder hacerlo correr en windows, el
systray debería es una opción
On Tue, Jul 21, 2009 at 4:33 AM, Bertrand Rousseau <
bertrand.rousseau@xxxxxxxxx> wrote:
> Hi,
>
> Thanks for you contribution, it's certainly nice having people sending
> us patches. However we do not want GTG to use a so-called "tray icon"
> since this is actually a misuse of the notification zone of the
> desktop, we'd be better interested in having an applet for that. As
> such, we cannot accept your patch. See this mailing-list thread for
> more information: https://lists.launchpad.net/gtg-user/msg00089.html
>
> Regards,
>
> Bertrand
>
> On Mon, Jul 20, 2009 at 5:52 PM, Miuler<miuler@xxxxxxxxx> wrote:
> > hi, patch StatusIcon
> > === modified file 'GTG/taskbrowser/browser.py'
> > --- GTG/taskbrowser/browser.py 2009-07-16 16:17:56 +0000
> > +++ GTG/taskbrowser/browser.py 2009-07-18 05:08:15 +0000
> > @@ -85,12 +85,18 @@
> > self.window = self.wTree.get_widget("MainWindow")
> > if (self.window):
> > self.window.connect("destroy", gtk.main_quit)
> > + self.systray = gtk.StatusIcon()
> > + self.systray.connect('activate', self.on_activate)
> > + self._systray = True
> > + self._xy = None
> >
> > icon_dirs = [GTG.DATA_DIR, os.path.join(GTG.DATA_DIR, "icons")]
> >
> > for i in icon_dirs:
> > + print i
> > gtk.icon_theme_get_default().prepend_search_path(i)
> > gtk.window_set_default_icon_name("gtg")
> > + self.systray.set_from_icon_name("gtg")
> >
> > self.tagpopup = self.wTree.get_widget("TagContextMenu")
> > self.taskpopup = self.wTree.get_widget("TaskContextMenu")
> > @@ -405,6 +411,17 @@
> > self.note_toggle.hide()
> > self.new_note_button.hide()
> >
> > + def on_activate(self, status_icon):
> > + #print self.window.is_active()
> > + if self._systray:
> > + self._systray = False
> > + self._xy = self.window.get_position()
> > + self.window.hide()
> > + else:
> > + self._systray = True
> > + self.window.show()
> > + self.window.move(*self._xy)
> > +
> > def on_move(self, widget, data): #pylint: disable-msg=W0613
> > xpos, ypos = self.window.get_position()
> > self.priv["window_xpos"] = xpos
> >
> > https://code.launchpad.net/~miuler/gtg/gtg_miuler
> >
> >
>
References