Skip to content

Replace deprecated gtk_show_uri() method for help window

Compiling GParted on some distros with newer gtk3/gtkmm versions displays warnings similar to the following:

$ make
<-- snip --> In member function ‘void GParted::Win_GParted::show_help(const Glib::ustring&, const Glib::ustring&)’: warning: ‘gboolean gtk_show_uri(GdkScreen*, const gchar*, guint32, GError**)’ is deprecated: Use 'gtk_show_uri_on_window' instead [-Wdeprecated-declarations]
 1789 |         gtk_show_uri(gscreen, uri.c_str(), gtk_get_current_event_time(), &error1);
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtk.h:200,
                 from /usr/include/gtkmm-3.0/gtkmm/enums.h:31,
                 from /usr/include/gtkmm-3.0/gtkmm/widget.h:47,
                 from /usr/include/gtkmm-3.0/gtkmm/misc.h:27,
                 from /usr/include/gtkmm-3.0/gtkmm/label.h:27,
                 from ../include/Utils.h:29,
                 from ../include/Partition.h:26,
                 from ../include/Device.h:21,
                 from ../include/Win_GParted.h:21,
/usr/include/gtk-3.0/gtk/gtkshow.h:33:10: note: declared here
   33 | gboolean gtk_show_uri  (GdkScreen   *screen,
      |          ^~~~~~~~~~~~
<-- snip -->

The gtk_show_uri() [1] method was deprecated as of gtk3 version 3.22 and has been replaced with gtk_show_uri_on_window [2].



This patch set will replace the old method with the new method on newer gtk3/gtkmm.

Edited by Curtis Gedak

Merge request reports