Author: cazfi
Date: Tue Nov  1 06:41:40 2016
New Revision: 34303

URL: http://svn.gna.org/viewcvs/freeciv?rev=34303&view=rev
Log:
Replaced deprecated gtk_widget_set_margin_...() usages with modern solutions in 
gtk3.22-client

See patch #6732

Modified:
    branches/S2_6/client/gui-gtk-3.22/citydlg.c
    branches/S2_6/client/gui-gtk-3.22/dialogs.c
    branches/S2_6/client/gui-gtk-3.22/gui_main.c
    branches/S2_6/client/gui-gtk-3.22/gui_stuff.c
    branches/S2_6/client/gui-gtk-3.22/happiness.c
    branches/S2_6/client/gui-gtk-3.22/pages.c
    branches/S2_6/client/gui-gtk-3.22/repodlgs.c
    branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.c
    branches/S2_6/m4/gtk3.22-client.m4

Modified: branches/S2_6/client/gui-gtk-3.22/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/citydlg.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/citydlg.c (original)
+++ branches/S2_6/client/gui-gtk-3.22/citydlg.c Tue Nov  1 06:41:40 2016
@@ -698,8 +698,8 @@
 
     label = gtk_label_new(buf);
     gtk_widget_set_name(label, "city_info_label");
-    gtk_widget_set_margin_left(label, 4);
-    gtk_widget_set_margin_right(label, 4);
+    gtk_widget_set_margin_start(label, 4);
+    gtk_widget_set_margin_end(label, 4);
     gtk_widget_set_margin_top(label, 4);
     gtk_widget_set_margin_bottom(label, 4);
     gtk_container_add(GTK_CONTAINER(frame), label);
@@ -764,7 +764,7 @@
       default:
         break;
     }
-    gtk_widget_set_margin_right(label, 5);
+    gtk_widget_set_margin_end(label, 5);
     gtk_widget_set_name(label, "city_label");  /* for font style? */
     gtk_widget_set_halign(label, GTK_ALIGN_START);
     gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
@@ -1561,8 +1561,8 @@
   g_object_unref(pb);
 
   gtk_widget_add_events(pdialog->citizen_images, GDK_BUTTON_PRESS_MASK);
-  gtk_widget_set_margin_left(pdialog->citizen_images, 2);
-  gtk_widget_set_margin_right(pdialog->citizen_images, 2);
+  gtk_widget_set_margin_start(pdialog->citizen_images, 2);
+  gtk_widget_set_margin_end(pdialog->citizen_images, 2);
   gtk_widget_set_margin_top(pdialog->citizen_images, 2);
   gtk_widget_set_margin_bottom(pdialog->citizen_images, 2);
   gtk_widget_set_halign(pdialog->citizen_images, GTK_ALIGN_START);

Modified: branches/S2_6/client/gui-gtk-3.22/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/dialogs.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/dialogs.c (original)
+++ branches/S2_6/client/gui-gtk-3.22/dialogs.c Tue Nov  1 06:41:40 2016
@@ -1066,7 +1066,7 @@
       "yalign", 0.5,
       NULL);
   gtk_widget_set_margin_bottom(label, 6);
-  gtk_widget_set_margin_right(label, 12);
+  gtk_widget_set_margin_end(label, 12);
   gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 2);
   gtk_grid_attach(GTK_GRID(table), combo, 1, 0, 2, 1);
 
@@ -1111,7 +1111,7 @@
       "yalign", 0.5,
       NULL);
   gtk_widget_set_margin_top(label, 6);
-  gtk_widget_set_margin_right(label, 12);
+  gtk_widget_set_margin_end(label, 12);
   gtk_grid_attach(GTK_GRID(table), label, 0, 2, 1, 1);
 
   render = gtk_cell_renderer_pixbuf_new();

Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_main.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/gui_main.c        (original)
+++ branches/S2_6/client/gui-gtk-3.22/gui_main.c        Tue Nov  1 06:41:40 2016
@@ -1269,8 +1269,8 @@
   label = gtk_label_new(NULL);
   gtk_widget_set_halign(label, GTK_ALIGN_START);
   gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
-  gtk_widget_set_margin_left(label, 2);
-  gtk_widget_set_margin_right(label, 2);
+  gtk_widget_set_margin_start(label, 2);
+  gtk_widget_set_margin_end(label, 2);
   gtk_widget_set_margin_top(label, 2);
   gtk_widget_set_margin_bottom(label, 2);
   gtk_container_add(GTK_CONTAINER(ebox), label);
@@ -1352,8 +1352,8 @@
 
     gtk_widget_set_halign(w, GTK_ALIGN_START);
     gtk_widget_set_valign(w, GTK_ALIGN_START);
-    gtk_widget_set_margin_left(w, 0);
-    gtk_widget_set_margin_right(w, 0);
+    gtk_widget_set_margin_start(w, 0);
+    gtk_widget_set_margin_end(w, 0);
     gtk_widget_set_margin_top(w, 0);
     gtk_widget_set_margin_bottom(w, 0);
     gtk_container_add(GTK_CONTAINER(ebox), w);
@@ -1407,8 +1407,8 @@
   gtk_widget_set_hexpand(label, TRUE);
   gtk_widget_set_halign(label, GTK_ALIGN_START);
   gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
-  gtk_widget_set_margin_left(label, 2);
-  gtk_widget_set_margin_right(label, 2);
+  gtk_widget_set_margin_start(label, 2);
+  gtk_widget_set_margin_end(label, 2);
   gtk_widget_set_margin_top(label, 2);
   gtk_widget_set_margin_bottom(label, 2);
   gtk_container_add(GTK_CONTAINER(sw), label);

Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_stuff.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/gui_stuff.c       (original)
+++ branches/S2_6/client/gui-gtk-3.22/gui_stuff.c       Tue Nov  1 06:41:40 2016
@@ -586,8 +586,8 @@
       label = gtk_label_new(NULL);
       gtk_widget_set_halign(label, GTK_ALIGN_START);
       gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
-      gtk_widget_set_margin_left(label, 4);
-      gtk_widget_set_margin_right(label, 4);
+      gtk_widget_set_margin_start(label, 4);
+      gtk_widget_set_margin_end(label, 4);
       gtk_widget_set_margin_top(label, 0);
       gtk_widget_set_margin_bottom(label, 0);
       gtk_container_add(GTK_CONTAINER(hbox), label);
@@ -602,8 +602,8 @@
       g_free(buf);
 
       image = gtk_image_new_from_icon_name("window-close", GTK_ICON_SIZE_MENU);
-      gtk_widget_set_margin_left(image, 0);
-      gtk_widget_set_margin_right(image, 0);
+      gtk_widget_set_margin_start(image, 0);
+      gtk_widget_set_margin_end(image, 0);
       gtk_widget_set_margin_top(image, 0);
       gtk_widget_set_margin_bottom(image, 0);
       gtk_button_set_image(GTK_BUTTON(button), image);

Modified: branches/S2_6/client/gui-gtk-3.22/happiness.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/happiness.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/happiness.c       (original)
+++ branches/S2_6/client/gui-gtk-3.22/happiness.c       Tue Nov  1 06:41:40 2016
@@ -156,8 +156,8 @@
 
     label = gtk_label_new(buf);
     gtk_widget_set_name(label, "city_happiness_label");
-    gtk_widget_set_margin_left(label, 4);
-    gtk_widget_set_margin_right(label, 4);
+    gtk_widget_set_margin_start(label, 4);
+    gtk_widget_set_margin_end(label, 4);
     gtk_widget_set_margin_top(label, 4);
     gtk_widget_set_margin_bottom(label, 4);
     gtk_container_add(GTK_CONTAINER(frame), label);
@@ -244,7 +244,7 @@
 
     /* list of citizens */
     ebox = gtk_event_box_new();
-    gtk_widget_set_margin_left(ebox, 5);
+    gtk_widget_set_margin_start(ebox, 5);
     gtk_event_box_set_visible_window(GTK_EVENT_BOX(ebox), FALSE);
     g_object_set_data(G_OBJECT(ebox), "pdialog", pdialog);
     g_signal_connect(ebox, "button_press_event",

Modified: branches/S2_6/client/gui-gtk-3.22/pages.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/pages.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/pages.c   (original)
+++ branches/S2_6/client/gui-gtk-3.22/pages.c   Tue Nov  1 06:41:40 2016
@@ -899,8 +899,8 @@
   gtk_frame_set_shadow_type(GTK_FRAME(statusbar_frame), GTK_SHADOW_IN);
 
   statusbar = gtk_label_new("");
-  gtk_widget_set_margin_left(statusbar, 2);
-  gtk_widget_set_margin_right(statusbar, 2);
+  gtk_widget_set_margin_start(statusbar, 2);
+  gtk_widget_set_margin_end(statusbar, 2);
   gtk_widget_set_margin_top(statusbar, 2);
   gtk_widget_set_margin_bottom(statusbar, 2);
   gtk_container_add(GTK_CONTAINER(statusbar_frame), statusbar);

Modified: branches/S2_6/client/gui-gtk-3.22/repodlgs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/repodlgs.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/repodlgs.c        (original)
+++ branches/S2_6/client/gui-gtk-3.22/repodlgs.c        Tue Nov  1 06:41:40 2016
@@ -1147,8 +1147,8 @@
 
   label = gtk_label_new(NULL);
   gtk_container_add(vbox, label);
-  gtk_widget_set_margin_left(label, 5);
-  gtk_widget_set_margin_right(label, 5);
+  gtk_widget_set_margin_start(label, 5);
+  gtk_widget_set_margin_end(label, 5);
   gtk_widget_set_margin_top(label, 5);
   gtk_widget_set_margin_bottom(label, 5);
   preport->label = GTK_LABEL(label);

Modified: branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.c?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.c    (original)
+++ branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.c    Tue Nov  1 06:41:40 2016
@@ -122,8 +122,8 @@
   gtk_widget_set_hexpand(label, TRUE);
   gtk_widget_set_halign(label, GTK_ALIGN_START);
   gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
-  gtk_widget_set_margin_left(label, 8);
-  gtk_widget_set_margin_right(label, 8);
+  gtk_widget_set_margin_start(label, 8);
+  gtk_widget_set_margin_end(label, 8);
   gtk_widget_set_margin_top(label, 4);
   gtk_widget_set_margin_bottom(label, 4);
   gtk_label_set_max_width_chars(GTK_LABEL(label), 80);
@@ -143,7 +143,7 @@
   }
 
   button = gtk_button_new();
-  gtk_widget_set_margin_right(button, 16);
+  gtk_widget_set_margin_end(button, 16);
   g_signal_connect(button, "clicked",
                    G_CALLBACK(voteinfo_bar_next_callback), NULL);
   gtk_button_set_image(GTK_BUTTON(button), arrow);

Modified: branches/S2_6/m4/gtk3.22-client.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/m4/gtk3.22-client.m4?rev=34303&r1=34302&r2=34303&view=diff
==============================================================================
--- branches/S2_6/m4/gtk3.22-client.m4  (original)
+++ branches/S2_6/m4/gtk3.22-client.m4  Tue Nov  1 06:41:40 2016
@@ -10,7 +10,7 @@
      test "x$client" = "xall" ; then
     PKG_CHECK_MODULES([GTK3_22], [gtk+-3.0 >= 3.22.0],
       [
-        GTK3_22_CFLAGS="$GTK3_22_CFLAGS 
-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_10"
+        GTK3_22_CFLAGS="$GTK3_22_CFLAGS 
-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_12"
         GTK3_22_CFLAGS="$GTK3_22_CFLAGS 
-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44"
         gui_gtk3_22=yes
         if test "x$client" = "xauto" ; then


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to