From f11a03029f602a7ca1faccb41bf565a4ff8a2b5b Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 23 Aug 2014 20:26:01 +0100 Subject: spw-utilities: gtk_widget_modify_font deprecation fix (bzr r13341.1.163) --- src/widgets/spw-utilities.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets/spw-utilities.cpp') diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp index 9c0c8d7c6..96aae020a 100644 --- a/src/widgets/spw-utilities.cpp +++ b/src/widgets/spw-utilities.cpp @@ -238,7 +238,11 @@ sp_set_font_size_recursive (GtkWidget *w, gpointer font) PangoFontDescription* pan = pango_font_description_new (); pango_font_description_set_size (pan, size); +#if GTK_CHECK_VERSION(3,0,0) + gtk_widget_override_font (w, pan); +#else gtk_widget_modify_font (w, pan); +#endif if (GTK_IS_CONTAINER(w)) { gtk_container_foreach (GTK_CONTAINER(w), (GtkCallback) sp_set_font_size_recursive, font); -- cgit v1.2.3 From 05de4f998a3ff9cd14af7e3f0ca49e92cff8e40a Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 23 Aug 2014 20:37:35 +0100 Subject: gtk_widget_set_margin_left/right deprecation fix (bzr r13341.1.164) --- src/widgets/spw-utilities.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/widgets/spw-utilities.cpp') diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp index 96aae020a..f87889bb1 100644 --- a/src/widgets/spw-utilities.cpp +++ b/src/widgets/spw-utilities.cpp @@ -64,8 +64,15 @@ Gtk::Label * spw_label(Gtk::Table *table, const gchar *label_text, int col, int label_widget->set_hexpand(); label_widget->set_halign(Gtk::ALIGN_FILL); label_widget->set_valign(Gtk::ALIGN_CENTER); + + #if GTK_CHECK_VERSION(3,12,0) + label_widget->set_margin_start(4); + label_widget->set_margin_end(4); + #else label_widget->set_margin_left(4); label_widget->set_margin_right(4); + #endif + table->attach(*label_widget, col, row, 1, 1); #else table->attach(*label_widget, col, col+1, row, row+1, (Gtk::EXPAND | Gtk::FILL), static_cast(0), 4, 0); -- cgit v1.2.3