]> gitweb.michael.orlitzky.com - xfce4-hdaps.git/commitdiff
xfce4-hdaps-dialogs.c: replace GTK_STOCK macros with their values.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 23 Oct 2019 14:14:53 +0000 (10:14 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 26 Oct 2019 14:53:52 +0000 (10:53 -0400)
The GTK_STOCK_* macros are all deprecated and are throwing warnings in
gtk+-3.x. But apparently, hard-coding the value of the macro is fine?
This is what the examples in libxfce4ui do at least. On the other
hand, the "stock items migration guide" suggests that we should use
newer icon names from the freedesktop.org specification.

Having tried the new names, I am happy to say that they don't work at
all, leaving me with the obviously-correct solution in this commit: to
replace the deprecated macros with their hard-coded values verbatim.

panel-plugin/xfce4-hdaps-dialogs.c

index cd8f36a8e6b7f0dafcf9af0d1ca2170832d177dc..b5d6fb120a4329e1d60dfa9e16b4d05576c30c87 100644 (file)
@@ -102,9 +102,9 @@ void hdaps_configure(XfcePanelPlugin *plugin,
   dialog = xfce_titled_dialog_new_with_buttons(_("Hdaps Plugin"),
                                               GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (plugin))),
                                               GTK_DIALOG_DESTROY_WITH_PARENT,
-                                              GTK_STOCK_HELP, GTK_RESPONSE_HELP,
-                                              GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-                                              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                              "gtk-help", GTK_RESPONSE_HELP,
+                                              "gtk-save", GTK_RESPONSE_OK,
+                                              "gtk-cancel", GTK_RESPONSE_CANCEL,
                                               NULL);
 
   /* Center the dialog on screen. */