deprecated-declarations.patch 891 B

12345678910111213141516171819202122232425
  1. Description: Fix -Wdeprecated-declarations compiler warning.
  2. In particular, the following warning:
  3. gui.c: In function 'show_message':
  4. gui.c:444:2: warning: 'gtk_misc_set_padding' is deprecated
  5. (declared at /usr/include/gtk-3.0/gtk/deprecated/gtkmisc.h:80) [-Wdeprecated-declarations]
  6. gtk_misc_set_padding(&GTK_LABEL(label)->misc, 10, 10);
  7. ^
  8. Author: Doug Torrance <dtorrance@piedmont.edu>
  9. Last-Update: 2014-11-23
  10. --- a/gui.c
  11. +++ b/gui.c
  12. @@ -441,7 +441,10 @@
  13. }
  14. /* add the label, and show everything we've added to the dialog. */
  15. - gtk_misc_set_padding(&GTK_LABEL(label)->misc, 10, 10);
  16. + gtk_widget_set_margin_start(label, 10);
  17. + gtk_widget_set_margin_end(label, 10);
  18. + gtk_widget_set_margin_top(label, 10);
  19. + gtk_widget_set_margin_bottom(label, 10);
  20. gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label);
  21. gtk_widget_show_all(dialog);