Skip to content

Move away from GtkStatusIcon? #81

@hasufell

Description

@hasufell

Gtk3 is starting to throw deprecation warnings about it. With -Werror I get:

main.c:235:12: error: 'gtk_status_icon_get_size' is deprecated
      [-Werror,-Wdeprecated-declarations]
    return gtk_status_icon_get_size(tray_icon);
           ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:125:23: note: 
      'gtk_status_icon_get_size' has been explicitly marked deprecated here
gint                  gtk_status_icon_get_size           (GtkStatusIco...
                      ^
main.c:262:15: error: 'gtk_status_icon_new' is deprecated
      [-Werror,-Wdeprecated-declarations]
  tray_icon = gtk_status_icon_new();
              ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:84:23: note: 
      'gtk_status_icon_new' has been explicitly marked deprecated here
GtkStatusIcon        *gtk_status_icon_new                (void);
                      ^
main.c:268:3: error: 'gtk_status_icon_set_visible' is deprecated
      [-Werror,-Wdeprecated-declarations]
  gtk_status_icon_set_visible(tray_icon, TRUE);
  ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:151:23: note: 
      'gtk_status_icon_set_visible' has been explicitly marked deprecated here
void                  gtk_status_icon_set_visible        (GtkStatusIco...
                      ^
main.c:328:4: error: 'gtk_status_icon_position_menu' is deprecated
      [-Werror,-Wdeprecated-declarations]
                 gtk_status_icon_position_menu,
                 ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:160:23: note: 
      'gtk_status_icon_position_menu' has been explicitly marked deprecated
      here
void                  gtk_status_icon_position_menu      (GtkMen...
                      ^
main.c:477:7: error: 'gtk_status_icon_set_from_pixbuf' is deprecated
      [-Werror,-Wdeprecated-declarations]
      gtk_status_icon_set_from_pixbuf(tray_icon, icon_copy);
      ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:97:23: note: 
      'gtk_status_icon_set_from_pixbuf' has been explicitly marked deprecated
      here
void                  gtk_status_icon_set_from_pixbuf    (GtkStatusIco...
                      ^
main.c:479:7: error: 'gtk_status_icon_set_from_pixbuf' is deprecated
      [-Werror,-Wdeprecated-declarations]
      gtk_status_icon_set_from_pixbuf(tray_icon, icon);
      ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:97:23: note: 
      'gtk_status_icon_set_from_pixbuf' has been explicitly marked deprecated
      here
void                  gtk_status_icon_set_from_pixbuf    (GtkStatusIco...
                      ^
main.c:483:5: error: 'gtk_status_icon_set_from_pixbuf' is deprecated
      [-Werror,-Wdeprecated-declarations]
    gtk_status_icon_set_from_pixbuf(tray_icon, status_icons[0]);
    ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:97:23: note: 
      'gtk_status_icon_set_from_pixbuf' has been explicitly marked deprecated
      here
void                  gtk_status_icon_set_from_pixbuf    (GtkStatusIco...
                      ^
main.c:486:3: error: 'gtk_status_icon_set_tooltip_text' is deprecated
      [-Werror,-Wdeprecated-declarations]
  gtk_status_icon_set_tooltip_text(tray_icon, tooltip);
  ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:137:23: note: 
      'gtk_status_icon_set_tooltip_text' has been explicitly marked deprecated
      here
void                  gtk_status_icon_set_tooltip_text   (GtkStatusIco...

Also see https://bugzilla.gnome.org/show_bug.cgi?id=734826

Does libnotify allow us to do tray icons? https://developer.gnome.org/libnotify/

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions