emacs-diffs
[Top][All Lists]
Advanced

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

feature/pgtk 7ab1b71 2/2: Coding style fixes


From: Po Lu
Subject: feature/pgtk 7ab1b71 2/2: Coding style fixes
Date: Sat, 18 Dec 2021 02:48:07 -0500 (EST)

branch: feature/pgtk
commit 7ab1b71c0dd878daa6806ce3a01d429dc5af646c
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Coding style fixes
    
    * src/gtkutil.c (xg_frame_set_char_size): Fix coding style.
---
 src/gtkutil.c | 55 ++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 23 deletions(-)

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 0164d87..5271ccf 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1100,15 +1100,18 @@ xg_frame_set_char_size (struct frame *f, int width, int 
height)
   gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                       &gwidth, &gheight);
 #else
-  if (FRAME_GTK_OUTER_WIDGET (f)) {
-    gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
-                        &gwidth, &gheight);
-  } else {
-    GtkAllocation alloc;
-    gtk_widget_get_allocation (FRAME_GTK_WIDGET (f), &alloc);
-    gwidth = alloc.width;
-    gheight = alloc.height;
-  }
+  if (FRAME_GTK_OUTER_WIDGET (f))
+    {
+      gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
+                          &gwidth, &gheight);
+    }
+  else
+    {
+      GtkAllocation alloc;
+      gtk_widget_get_allocation (FRAME_GTK_WIDGET (f), &alloc);
+      gwidth = alloc.width;
+      gheight = alloc.height;
+    }
 #endif
 
   /* Do this before resize, as we don't know yet if we will be resized.  */
@@ -1182,13 +1185,16 @@ xg_frame_set_char_size (struct frame *f, int width, int 
height)
          gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                             outer_width, outer_height);
 #else
-         if (FRAME_GTK_OUTER_WIDGET (f)) {
-           gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
-                              outer_width, outer_height);
-         } else {
-           gtk_widget_set_size_request (FRAME_GTK_WIDGET (f),
-                                        outer_width, outer_height);
-         }
+         if (FRAME_GTK_OUTER_WIDGET (f))
+           {
+             gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
+                                outer_width, outer_height);
+           }
+         else
+           {
+             gtk_widget_set_size_request (FRAME_GTK_WIDGET (f),
+                                          outer_width, outer_height);
+           }
 #endif
 
           if (hide_child_frame)
@@ -1211,13 +1217,16 @@ xg_frame_set_char_size (struct frame *f, int width, int 
height)
       gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                         outer_width, outer_height);
 #else
-      if (FRAME_GTK_OUTER_WIDGET (f)) {
-       gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
-                          outer_width, outer_height);
-      } else {
-       gtk_widget_set_size_request (FRAME_GTK_WIDGET (f),
-                                    outer_width, outer_height);
-      }
+      if (FRAME_GTK_OUTER_WIDGET (f))
+       {
+         gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
+                            outer_width, outer_height);
+       }
+      else
+       {
+         gtk_widget_set_size_request (FRAME_GTK_WIDGET (f),
+                                      outer_width, outer_height);
+       }
 #endif
       fullscreen = Qnil;
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]