[gtk/expand-margin-cleanup] Small fixups



commit 37a2cae10e365c2bd910cdba502023bfb56b8a42
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Feb 25 20:57:20 2020 -0500

    Small fixups
    
    Trying to get the ci style test to pass.

 gtk/inspector/prop-editor.c           | 2 +-
 gtk/inspector/recorder.c              | 1 -
 gtk/tools/gtk-builder-tool-simplify.c | 8 ++++----
 tests/testadjustsize.c                | 2 +-
 tests/testframe.c                     | 8 ++++----
 tests/testoverlay.c                   | 1 -
 testsuite/gtk/notify.c                | 6 +++---
 7 files changed, 13 insertions(+), 15 deletions(-)
---
diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c
index 438d719948..0fb6ded5b7 100644
--- a/gtk/inspector/prop-editor.c
+++ b/gtk/inspector/prop-editor.c
@@ -1022,7 +1022,7 @@ property_editor (GObject                *object,
                     "vexpand", TRUE,
                     "hscrollbar-policy", GTK_POLICY_NEVER,
                     "vscrollbar-policy", GTK_POLICY_NEVER,
-                      NULL);
+                    NULL);
 
       g_object_get (object, spec->name, &model, NULL);
 
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index cc6b6ae9cc..876ec709e5 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -1138,7 +1138,6 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
   gtk_widget_set_margin_top (widget, 6);
   gtk_widget_set_margin_bottom (widget, 6);
 
-
   return widget;
 }
 
diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c
index 4287c1631a..c6b2d56075 100644
--- a/gtk/tools/gtk-builder-tool-simplify.c
+++ b/gtk/tools/gtk-builder-tool-simplify.c
@@ -727,8 +727,8 @@ maybe_rename_property (Element *element, MyParserData *data)
     const char *alt_names[3];
   } props[] = {
     { "GtkPopover", "modal", GTK_TYPE_POPOVER, PROP_KIND_OBJECT, "autohide", { NULL, NULL, NULL } },
-    { "GtkWidget", "expand", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "hexpand", { "vexpand",  NULL, NULL } },
-    { "GtkWidget", "margin", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "margin-left", { "margin-top",  
"margin-right", "margin-bottom" } },
+    { "GtkWidget", "expand", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "hexpand", { "vexpand", NULL, NULL } },
+    { "GtkWidget", "margin", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "margin-left", { "margin-top", 
"margin-right", "margin-bottom" } },
   };
   int i, k, l;
   PropKind kind;
@@ -772,8 +772,8 @@ maybe_rename_property (Element *element, MyParserData *data)
               elt = g_new0 (Element, 1);
               elt->parent = element->parent;
               elt->element_name = g_strdup (element->element_name);
-              elt->attribute_names = g_strdupv ((char **)element->attribute_names);
-              elt->attribute_values = g_strdupv ((char **)element->attribute_values);
+              elt->attribute_names = g_strdupv ((char **) element->attribute_names);
+              elt->attribute_values = g_strdupv ((char **) element->attribute_values);
               elt->data = g_strdup (element->data);
 
               g_free (elt->attribute_values[prop_name_index]);
diff --git a/tests/testadjustsize.c b/tests/testadjustsize.c
index c286b6e13f..b2e67a2db4 100644
--- a/tests/testadjustsize.c
+++ b/tests/testadjustsize.c
@@ -292,7 +292,7 @@ open_margin_window (void)
 {
   GtkWidget *box;
   int i;
-  const char * margins[] = {
+  const char *margins[] = {
     "margin-start",
     "margin-end",
     "margin-top",
diff --git a/tests/testframe.c b/tests/testframe.c
index e7ea521c40..63f8e6d195 100644
--- a/tests/testframe.c
+++ b/tests/testframe.c
@@ -153,10 +153,10 @@ int main (int argc, char **argv)
   g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
 
   vbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 5));
-  gtk_widget_set_margin_start (vbox, 12);
-  gtk_widget_set_margin_end (vbox, 12);
-  gtk_widget_set_margin_top (vbox, 12);
-  gtk_widget_set_margin_bottom (vbox, 12);
+  gtk_widget_set_margin_start (GTK_WIDGET (vbox), 12);
+  gtk_widget_set_margin_end (GTK_WIDGET (vbox), 12);
+  gtk_widget_set_margin_top (GTK_WIDGET (vbox), 12);
+  gtk_widget_set_margin_bottom (GTK_WIDGET (vbox), 12);
   gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (vbox));
 
   frame = GTK_FRAME (gtk_frame_new ("Test GtkFrame"));
diff --git a/tests/testoverlay.c b/tests/testoverlay.c
index 62823b4122..e4bc2f5318 100644
--- a/tests/testoverlay.c
+++ b/tests/testoverlay.c
@@ -84,7 +84,6 @@ test_nonzerox (void)
   gtk_widget_set_margin_top (child, 3);
   gtk_widget_set_margin_bottom (child, 3);
 
-
   return win;
 }
 
diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c
index d1b1f71bd2..0e5045e0e1 100644
--- a/testsuite/gtk/notify.c
+++ b/testsuite/gtk/notify.c
@@ -492,12 +492,12 @@ test_type (gconstpointer data)
 
       /* These are special */
       if (g_type_is_a (pspec->owner_type, GTK_TYPE_WIDGET) &&
-         (g_str_equal (pspec->name, "has-focus") ||
-          g_str_equal (pspec->name, "has-default") ||
+          (g_str_equal (pspec->name, "has-focus") ||
+           g_str_equal (pspec->name, "has-default") ||
            g_str_equal (pspec->name, "is-focus") ||
            g_str_equal (pspec->name, "hexpand") ||
            g_str_equal (pspec->name, "vexpand")))
-       continue;
+        continue;
 
       if (pspec->owner_type == GTK_TYPE_ENTRY &&
           g_str_equal (pspec->name, "im-module"))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]