Re: [Ring] gnome-ring systray icon
On Tue, Jun 21, 2016 at 02:39:30PM -0400, Stepan Salenikovich wrote: > On Jun 21, 2016, at 1:12 PM, Baptiste Jonglez bapti...@bitsofnetworks.org > wrote: > > On the other hand, GtkStatusIcon is provided by default with GTK3, > > although it indeed seems deprecated (gtk/deprecated/gtkstatusicon.h). > > > > Is there any alternative to these two implementations? The documentation > > on GtkStatusIcon [2] is a bit vague: > > > >GtkStatusIcon has been deprecated in 3.14. You should consider using > >notifications or more modern platform-specific APIs instead. GLib > >provides the GNotification API which works well with GtkApplication. > > So the GNotification API basically just replaces libnotify (and provides > persistent > notifications) [3][4]. > > However it is not a replacement for a status icon practically speaking, more > of > just an alternative. Because even though you have persistent notifications, > an icon won't show up in the notification area unless there is a notification > (at least last time I tested this on GNOME 3). > > FYI, the reason I used libnotify instead of GNotification for the > notifications > is because I found GNotification to not work very well on older systems > (Ubuntu 14.04), > but we should probably at some point implement it and make it a compile time > option. > > The MessagningMenu is also another interesting option, but again, its more of > another feature rather than a replacement, and I think its also Ubuntu > specific [5]. > > In general, I don't think the GNOME guys wanted to provide an alternative to > an > actualy systray icon, since they got rid of the system tray entirely until > GNOME 3.14 > or something like that. GtkStatusIcon got deprecated in Gtk 3.14, but it is still there in 3.20.6. > Also, the current HIG state that once the last primary window is closed, > the application should quit as well [6]. This behaviour is also built in > to the GtkApplicationWindow (when its destroyed, it automatically > triggers the destruction of the GtkApplication). > > So, at least for now, I thik GtkStatusIcon is the way to go if you don't want > AppIndicator as a dependency. Ok, thanks! We will find a new solution whenever GtkStatusIcon gets dropped from Gtk. Baptiste signature.asc Description: PGP signature ___ Ring mailing list Ring@lists.savoirfairelinux.net https://lists.savoirfairelinux.net/mailman/listinfo/ring
Re: [Ring] gnome-ring systray icon
- On Jun 21, 2016, at 1:12 PM, Baptiste Jonglez bapti...@bitsofnetworks.org wrote: > Hi Stepan, > > Thanks for the notification :) > > On Mon, Jun 20, 2016 at 04:18:47PM -0400, Stepan Salenikovich wrote: >> Hi, >> This was a repeatedly requested feature and it made sense so we finally >> merged >> a patch to add systray icon support to gnome-ring. >> >> I'll copy paste my commit message which explains the implementation since it >> is of interest to package maintainers or anyone compiling from source: >> >> This adds an icon in the notification areas (systray) by default. >> The icon also has a popup menu which allows the user to show or hide >> the main widow and to quit Ring. >> >> It uses 2 systray icon implementations: >> - AppIndicator from Canonical >> - GtkStatusIcon from Gtk, but deprecated > > After some investigation, it turns out that AppIndicator is a pain to > support on Archlinux (it's not in the official repositories [1], and > brings a lot of dependencies). I wonder if the situation is similar for > other non-Ubuntu distros. Its available for Debian and Fedora, not sure about others. > > On the other hand, GtkStatusIcon is provided by default with GTK3, > although it indeed seems deprecated (gtk/deprecated/gtkstatusicon.h). > > Is there any alternative to these two implementations? The documentation > on GtkStatusIcon [2] is a bit vague: > >GtkStatusIcon has been deprecated in 3.14. You should consider using >notifications or more modern platform-specific APIs instead. GLib >provides the GNotification API which works well with GtkApplication. So the GNotification API basically just replaces libnotify (and provides persistent notifications) [3][4]. However it is not a replacement for a status icon practically speaking, more of just an alternative. Because even though you have persistent notifications, an icon won't show up in the notification area unless there is a notification (at least last time I tested this on GNOME 3). FYI, the reason I used libnotify instead of GNotification for the notifications is because I found GNotification to not work very well on older systems (Ubuntu 14.04), but we should probably at some point implement it and make it a compile time option. The MessagningMenu is also another interesting option, but again, its more of another feature rather than a replacement, and I think its also Ubuntu specific [5]. In general, I don't think the GNOME guys wanted to provide an alternative to an actualy systray icon, since they got rid of the system tray entirely until GNOME 3.14 or something like that. Also, the current HIG state that once the last primary window is closed, the application should quit as well [6]. This behaviour is also built in to the GtkApplicationWindow (when its destroyed, it automatically triggers the destruction of the GtkApplication). So, at least for now, I thik GtkStatusIcon is the way to go if you don't want AppIndicator as a dependency. > > Baptiste > > [1] https://aur.archlinux.org/pkgbase/libappindicator/ > [2] https://developer.gnome.org/gtk3/stable/GtkStatusIcon.html -stepan [3] https://developer.gnome.org/libnotify/0.7/index.html [4] https://developer.gnome.org/GNotification [5] https://wiki.ubuntu.com/MessagingMenu [6] https://developer.gnome.org/hig/stable/primary-windows.html.en ___ Ring mailing list Ring@lists.savoirfairelinux.net https://lists.savoirfairelinux.net/mailman/listinfo/ring
Re: [Ring] gnome-ring systray icon
Hi Stepan, Thanks for the notification :) On Mon, Jun 20, 2016 at 04:18:47PM -0400, Stepan Salenikovich wrote: > Hi, > This was a repeatedly requested feature and it made sense so we finally merged > a patch to add systray icon support to gnome-ring. > > I'll copy paste my commit message which explains the implementation since it > is of interest to package maintainers or anyone compiling from source: > > This adds an icon in the notification areas (systray) by default. > The icon also has a popup menu which allows the user to show or hide > the main widow and to quit Ring. > > It uses 2 systray icon implementations: > - AppIndicator from Canonical > - GtkStatusIcon from Gtk, but deprecated After some investigation, it turns out that AppIndicator is a pain to support on Archlinux (it's not in the official repositories [1], and brings a lot of dependencies). I wonder if the situation is similar for other non-Ubuntu distros. On the other hand, GtkStatusIcon is provided by default with GTK3, although it indeed seems deprecated (gtk/deprecated/gtkstatusicon.h). Is there any alternative to these two implementations? The documentation on GtkStatusIcon [2] is a bit vague: GtkStatusIcon has been deprecated in 3.14. You should consider using notifications or more modern platform-specific APIs instead. GLib provides the GNotification API which works well with GtkApplication. Baptiste [1] https://aur.archlinux.org/pkgbase/libappindicator/ [2] https://developer.gnome.org/gtk3/stable/GtkStatusIcon.html signature.asc Description: PGP signature ___ Ring mailing list Ring@lists.savoirfairelinux.net https://lists.savoirfairelinux.net/mailman/listinfo/ring