[zenity/gtk4-port: 6/25] Make zenity run with gtk4 (very unstable).




commit bfdbe341d4970a9269c52b47fa8fb749a325a69b
Author: Logan Rathbone <poprocks gmail com>
Date:   Thu Feb 11 22:03:47 2021 -0500

    Make zenity run with gtk4 (very unstable).

 src/main.c    |  59 +++++++++++-----
 src/util.c    |  75 +++++++++------------
 src/util.h    |  20 +++---
 src/zenity.ui | 211 ++++------------------------------------------------------
 4 files changed, 96 insertions(+), 269 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index a211e15f..d4281cff 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,26 +33,20 @@
 
 #include <config.h>
 
+typedef struct {
+       int argc;
+       char **argv;
+} ZenityArgs;
 
-int
-main (int argc, char *argv[])
+static void
+activate_cb (GtkApplication *app, gpointer user_data)
 {
+       ZenityArgs *args = user_data;
        ZenityParsingOptions *results;
        int retval;
 
-       /* boilerplate i18n stuff */                                                
-       setlocale (LC_ALL, "");
-       bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-                                                                                
-       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-       textdomain (GETTEXT_PACKAGE);
-       /* </i18n> */
-
-       // FIXME - may not be needed at all with the way I've factored util.c.
-       // But may need to replace this with gapplication here instead, depending.
-//     gtk_init (&argc, &argv);
-
-       results = zenity_option_parse (argc, argv);
+       results = zenity_option_parse (args->argc, args->argv);
+       g_free (args);
 
        switch (results->mode)
        {
@@ -61,7 +55,7 @@ main (int argc, char *argv[])
                        break;
 
                case MODE_ENTRY:
-                       results->entry_data->data = (const char **) argv + 1;
+                       results->entry_data->data = (const char **) args->argv + 1;
                        zenity_entry (results->data, results->entry_data);
                        break;
 
@@ -81,7 +75,7 @@ main (int argc, char *argv[])
                        break;
 
                case MODE_LIST:
-                       results->tree_data->data = (const char **) argv + 1;
+                       results->tree_data->data = (const char **) args->argv + 1;
                        zenity_tree (results->data, results->tree_data);
                        break;
                        
@@ -135,5 +129,34 @@ main (int argc, char *argv[])
 
        zenity_option_free ();
 
-       exit (retval);
+       // FIXME - pass retval to gapplication properly.
+//     exit (retval);
+}
+
+int
+main (int argc, char *argv[])
+{
+       ZenityArgs *args;
+       GtkApplication *app;
+       int status;
+
+       /* boilerplate i18n stuff */                                                
+       setlocale (LC_ALL, "");
+       bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+                                                                                
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+       textdomain (GETTEXT_PACKAGE);
+       /* </i18n> */
+
+       args = g_new (ZenityArgs, 1);
+       args->argc = argc;
+       args->argv = argv;
+
+       app = gtk_application_new ("org.gnome.Zenity", G_APPLICATION_FLAGS_NONE);
+       g_signal_connect (app, "activate",
+                       G_CALLBACK(activate_cb), args);
+       status = g_application_run (G_APPLICATION(app), 0, NULL);
+       g_object_unref (app);
+
+       return status;
 }
diff --git a/src/util.c b/src/util.c
index 0e90201b..0c351442 100644
--- a/src/util.c
+++ b/src/util.c
@@ -49,7 +49,8 @@
 #define ZENITY_EXTRA_DEFAULT 127
 
 GtkBuilder *
-zenity_util_load_ui_file (const gchar *root_widget, ...) {
+zenity_util_load_ui_file (const char *root_widget, ...)
+{
        va_list args;
        char *arg = NULL;
        GPtrArray *ptrarray;
@@ -67,11 +68,11 @@ zenity_util_load_ui_file (const gchar *root_widget, ...) {
 
        va_start (args, root_widget);
 
-       arg = va_arg (args, gchar *);
+       arg = va_arg (args, char *);
 
        while (arg) {
                g_ptr_array_add (ptrarray, g_strdup (arg));
-               arg = va_arg (args, gchar *);
+               arg = va_arg (args, char *);
        }
        va_end (args);
 
@@ -81,13 +82,13 @@ zenity_util_load_ui_file (const gchar *root_widget, ...) {
 
        if (g_file_test (ZENITY_UI_FILE_RELATIVEPATH, G_FILE_TEST_EXISTS)) {
                /* Try current dir, for debugging */
-               result = gtk_builder_add_objects_from_file (
-                       builder, ZENITY_UI_FILE_RELATIVEPATH, (const char **)objects, NULL);
+               result = gtk_builder_add_objects_from_file (builder,
+                               ZENITY_UI_FILE_RELATIVEPATH, (const char **)objects, NULL);
        }
 
        if (result == 0)
-               result = gtk_builder_add_objects_from_file (
-                       builder, ZENITY_UI_FILE_FULLPATH, (const char **)objects, &error);
+               result = gtk_builder_add_objects_from_file (builder,
+                               ZENITY_UI_FILE_FULLPATH, (const char **)objects, &error);
 
        g_strfreev (objects);
 
@@ -102,8 +103,9 @@ zenity_util_load_ui_file (const gchar *root_widget, ...) {
 
        return builder;
 }
-gchar *
-zenity_util_strip_newline (gchar *string) {
+
+char *
+zenity_util_strip_newline (char *string) {
        gsize len;
 
        g_return_val_if_fail (string != NULL, NULL);
@@ -120,11 +122,11 @@ zenity_util_strip_newline (gchar *string) {
 }
 
 gboolean
-zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const gchar *filename) {
+zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const char *filename) {
        GtkTextIter iter, end;
        FILE *f;
-       gchar buf[2048];
-       gint remaining = 0;
+       char buf[2048];
+       int remaining = 0;
 
        if (filename == NULL)
                return FALSE;
@@ -139,7 +141,7 @@ zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const gchar *filename) {
        gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
 
        while (!feof (f)) {
-               gint count;
+               int count;
                const char *leftover;
                int to_read = 2047 - remaining;
 
@@ -176,8 +178,8 @@ zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const gchar *filename) {
        return TRUE;
 }
 
-const gchar *
-zenity_util_icon_name_from_filename (const gchar *filename) {
+const char *
+zenity_util_icon_name_from_filename (const char *filename) {
        if (!filename || !filename[0])
                return "dialog-warning"; /* default */
 
@@ -194,8 +196,8 @@ zenity_util_icon_name_from_filename (const gchar *filename) {
 
 void
 zenity_util_set_window_icon_from_file (
-       GtkWidget *widget, const gchar *filename) {
-       const gchar *icon_name;
+       GtkWidget *widget, const char *filename) {
+       const char *icon_name;
 
        icon_name = zenity_util_icon_name_from_filename (filename);
        if (icon_name) {
@@ -208,7 +210,7 @@ zenity_util_set_window_icon_from_file (
 
 void
 zenity_util_set_window_icon (GtkWidget *widget,
-               const gchar *filename, const gchar *default_file)
+               const char *filename, const char *default_file)
 {
        if (filename != NULL) {
                zenity_util_set_window_icon_from_file (widget, filename);
@@ -220,7 +222,7 @@ zenity_util_set_window_icon (GtkWidget *widget,
 
 void
 zenity_util_set_window_icon_from_icon_name (
-       GtkWidget *widget, const gchar *filename, const gchar *default_icon_name) {
+       GtkWidget *widget, const char *filename, const char *default_icon_name) {
        if (filename != NULL)
                zenity_util_set_window_icon_from_file (widget, filename);
        else
@@ -229,7 +231,7 @@ zenity_util_set_window_icon_from_icon_name (
 
 void
 zenity_util_show_help (GError **error) {
-       gchar *tmp;
+       char *tmp;
        tmp = g_find_program_in_path ("yelp");
 
        if (tmp) {
@@ -238,11 +240,11 @@ zenity_util_show_help (GError **error) {
        }
 }
 
-gint
+int
 zenity_util_return_exit_code (ZenityExitCode value) {
 
-       const gchar *env_var = NULL;
-       gint retval;
+       const char *env_var = NULL;
+       int retval;
 
        switch (value) {
 
@@ -400,8 +402,9 @@ zenity_util_timeout_handle (gpointer data)
 {
        GtkDialog *dialog = GTK_DIALOG (data);
        
-       if (dialog != NULL)
+       if (dialog != NULL) {
                gtk_dialog_response (dialog, ZENITY_TIMEOUT);
+       }
        else {
                zenity_util_gapp_quit (GTK_WINDOW(dialog));
                exit (ZENITY_TIMEOUT);
@@ -409,29 +412,15 @@ zenity_util_timeout_handle (gpointer data)
        return FALSE;
 }
 
-/* zenity_util_gapp_main Helper */
-
-static void
-activate_cb (GtkApplication *app, gpointer user_data) {
-       GtkWindow *window = GTK_WINDOW(user_data);
-
-       gtk_application_add_window (app, window);
-}
-
-int
-zenity_util_gapp_main (GtkWindow *window) {
+void
+zenity_util_gapp_main (GtkWindow *window)
+{
        GtkApplication *app;
-       int status;
 
        g_assert (GTK_IS_WINDOW (window));
 
-       app = gtk_application_new ("org.gnome.Zenity", G_APPLICATION_FLAGS_NONE);
-       g_signal_connect (app, "activate",
-                       G_CALLBACK(activate_cb), window);
-       status = g_application_run (G_APPLICATION(app), 0, NULL);
-       g_object_unref (app);
-
-       return status;
+       app = GTK_APPLICATION(g_application_get_default ());
+       gtk_application_add_window (app, window);
 }
 
 void
diff --git a/src/util.h b/src/util.h
index 99ce0e81..c1b2c343 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,4 +1,4 @@
-/* vim: colorcolumn=80 ts=4 sw=t
+/* vim: colorcolumn=80 ts=4 sw=4
  */
 /*
  * util.h
@@ -46,24 +46,24 @@ G_BEGIN_DECLS
 
 #define ZENITY_IMAGE_FULLPATH(filename) (ZENITY_DATADIR "/" filename)
 
-GtkBuilder *zenity_util_load_ui_file (const gchar *widget_root,
+GtkBuilder *zenity_util_load_ui_file (const char *widget_root,
                ...) G_GNUC_NULL_TERMINATED;
-gchar *zenity_util_strip_newline (gchar *string);
+char *zenity_util_strip_newline (char *string);
 gboolean zenity_util_fill_file_buffer (GtkTextBuffer *buffer,
-               const gchar *filename);
-const gchar *zenity_util_icon_name_from_filename (const gchar *filename);
+               const char *filename);
+const char *zenity_util_icon_name_from_filename (const char *filename);
 void zenity_util_set_window_icon (GtkWidget *widget,
-               const gchar *filename, const gchar *default_file);
+               const char *filename, const char *default_file);
 void zenity_util_set_window_icon_from_icon_name (GtkWidget *widget,
-               const gchar *filename, const gchar *default_icon_name);
+               const char *filename, const char *default_icon_name);
 void zenity_util_set_window_icon_from_file (GtkWidget *widget,
-               const gchar *filename);
+               const char *filename);
 void zenity_util_show_help (GError **error);
-gint zenity_util_return_exit_code (ZenityExitCode value);
+int zenity_util_return_exit_code (ZenityExitCode value);
 void zenity_util_exit_code_with_data (ZenityExitCode value, ZenityData *data);
 void zenity_util_show_dialog (GtkWidget *widget);
 gboolean zenity_util_timeout_handle (gpointer data);
-int zenity_util_gapp_main (GtkWindow *window);
+void zenity_util_gapp_main (GtkWindow *window);
 void zenity_util_gapp_quit (GtkWindow *window);
 
 G_END_DECLS
diff --git a/src/zenity.ui b/src/zenity.ui
index 41ec10cc..25e8db90 100644
--- a/src/zenity.ui
+++ b/src/zenity.ui
@@ -9,26 +9,21 @@
   <object class="GtkDialog" id="zenity_scale_dialog">
     <property name="visible">1</property>
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Adjust the scale value</property>
     <property name="default_width">300</property>
     <property name="default_height">100</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox11">
         <property name="can_focus">0</property>
         <child>
           <object class="GtkBox" id="vbox13">
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkLabel" id="zenity_scale_text">
                 <property name="valign">center</property>
                 <property name="can_focus">0</property>
-                <property name="ypad">4</property>
                 <property name="label" translatable="yes">Adjust the scale value</property>
                 <property name="xalign">0</property>
               </object>
@@ -51,31 +46,18 @@
       <action-widget response="-5">zenity_scale_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area11">
+      <object class="GtkBox" id="dialog-action_area11">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_scale_cancel_button">
             <property name="label" translatable="yes">Cancel</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="zenity_scale_ok_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
@@ -83,13 +65,9 @@
   <object class="GtkTextBuffer" id="textbuffer1"/>
   <object class="GtkDialog" id="zenity_text_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Text View</property>
-    <property name="window_position">center</property>
     <property name="default_width">300</property>
     <property name="default_height">200</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox5">
         <property name="can_focus">0</property>
@@ -98,12 +76,10 @@
           <object class="GtkBox" id="vbox5">
             <property name="hexpand">1</property>
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="orientation">vertical</property>
             <child>
               <object class="GtkScrolledWindow" id="zenity_text_scrolled_window">
                 <property name="vexpand">1</property>
-                <property name="shadow_type">etched-in</property>
                 <property name="child">
                   <object class="GtkTextView" id="zenity_text_view">
                     <property name="pixels_above_lines">2</property>
@@ -121,7 +97,6 @@
               <object class="GtkCheckButton" id="zenity_text_checkbox">
                 <property name="valign">center</property>
                 <property name="visible">0</property>
-                <property name="xalign">0.5</property>
               </object>
             </child>
           </object>
@@ -133,44 +108,26 @@
       <action-widget response="-7">zenity_text_close_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area5">
+      <object class="GtkBox" id="dialog-action_area5">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_text_cancel_button">
             <property name="label" translatable="yes">Cancel</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="zenity_text_close_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="can_default">True</property>
             <property name="receives_default">1</property>
-            <property name="image_position">right</property>
-            <accelerator key="Return" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_calendar_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Calendar selection</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox2">
         <property name="can_focus">0</property>
@@ -178,7 +135,6 @@
         <child>
           <object class="GtkBox" id="vbox1">
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
@@ -206,7 +162,8 @@
                 <property name="mnemonic_widget">zenity_calendar</property>
                 <property name="xalign">0</property>
                 <accessibility>
-                  <relation type="label-for" target="zenity_calendar"/>
+                 <property name="label" translatable="yes">Calendar</property>
+                 <relation name="labelled-by">zenity_calendar</relation>
                 </accessibility>
               </object>
             </child>
@@ -224,43 +181,25 @@
       <action-widget response="-5">zenity_calendar_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area2">
+      <object class="GtkBox" id="dialog-action_area2">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_calendar_cancel_button">
             <property name="label" translatable="yes">Cancel</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="zenity_calendar_ok_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="has_focus">1</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_entry_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Add a new entry</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox4">
         <property name="can_focus">0</property>
@@ -269,7 +208,6 @@
         <child>
           <object class="GtkBox" id="vbox3">
             <property name="can_focus">0</property>
-            <property name="border_width">6</property>
             <child>
               <object class="GtkBox" id="vbox4">
                 <property name="hexpand">1</property>
@@ -299,43 +237,25 @@
       <action-widget response="-5">zenity_entry_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area4">
+      <object class="GtkBox" id="dialog-action_area4">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_entry_cancel_button">
             <property name="label" translatable="yes">Cancel</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="zenity_entry_ok_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="can_default">True</property>
-            <property name="has_default">1</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_error_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Error</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox7">
         <property name="can_focus">0</property>
@@ -343,20 +263,16 @@
         <child>
           <object class="GtkBox" id="vbox8">
             <property name="can_focus">0</property>
-            <property name="border_width">6</property>
             <child>
               <object class="GtkBox" id="hbox3">
                 <property name="hexpand">1</property>
                 <property name="can_focus">0</property>
-                <property name="border_width">5</property>
                 <property name="spacing">12</property>
                 <child>
                   <object class="GtkImage" id="zenity_error_image">
                     <property name="halign">center</property>
                     <property name="can_focus">0</property>
-                    <property name="yalign">0</property>
                     <property name="icon_name">dialog-error</property>
-                    <property name="icon_size">6</property>
                   </object>
                 </child>
                 <child>
@@ -378,29 +294,18 @@
       <action-widget response="-5">zenity_error_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area7">
-        <property name="visible">True</property>
+      <object class="GtkBox" id="dialog-action_area7">
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_error_ok_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_forms_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">normal</property>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox12">
         <property name="can_focus">0</property>
@@ -464,42 +369,27 @@
       <action-widget response="-5">zenity_forms_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area12">
+      <object class="GtkBox" id="dialog-action_area12">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_forms_cancel_button">
             <property name="label" translatable="yes">Cancel</property>
             <property name="receives_default">1</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="zenity_forms_ok_button">
             <property name="label" translatable="yes">OK</property>
             <property name="receives_default">1</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_info_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Information</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox9">
         <property name="can_focus">0</property>
@@ -507,15 +397,12 @@
         <child>
           <object class="GtkBox" id="hbox4">
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkImage" id="zenity_info_image">
                 <property name="halign">center</property>
                 <property name="can_focus">0</property>
-                <property name="yalign">0</property>
                 <property name="icon_name">dialog-information</property>
-                <property name="icon_size">6</property>
               </object>
             </child>
             <child>
@@ -535,31 +422,20 @@
       <action-widget response="-5">zenity_info_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area3">
+      <object class="GtkBox" id="dialog-action_area3">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_info_ok_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_progress_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Progress</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox6">
         <property name="can_focus">0</property>
@@ -568,7 +444,6 @@
           <object class="GtkBox" id="vbox7">
             <property name="halign">center</property>
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
@@ -603,44 +478,26 @@
       <action-widget response="-5">zenity_progress_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area6">
+      <object class="GtkBox" id="dialog-action_area6">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_progress_cancel_button">
             <property name="label" translatable="yes">Cancel</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="zenity_progress_ok_button">
             <property name="label" translatable="yes">OK</property>
             <property name="sensitive">0</property>
-            <property name="has_focus">1</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_question_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Question</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox3">
         <property name="can_focus">0</property>
@@ -648,15 +505,11 @@
         <child>
           <object class="GtkBox" id="hbox1">
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkImage" id="zenity_question_image">
                 <property name="can_focus">0</property>
-                <property name="xalign">0</property>
-                <property name="yalign">0</property>
                 <property name="icon_name">dialog-question</property>
-                <property name="icon_size">6</property>
               </object>
             </child>
             <child>
@@ -673,29 +526,23 @@
       </object>
     </child>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="zenity_question_button_box">
+      <object class="GtkBox" id="zenity_question_button_box">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_tree_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Select items from the list</property>
-    <property name="window_position">center</property>
     <property name="default_width">300</property>
     <property name="default_height">196</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox8">
         <property name="can_focus">0</property>
         <child>
           <object class="GtkBox" id="vbox10">
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
@@ -708,12 +555,10 @@
             </child>
             <child>
               <object class="GtkScrolledWindow" id="zenity_tree_window">
-                <property name="shadow_type">in</property>
                 <property name="hexpand">1</property>
                 <property name="vexpand">1</property>
                 <property name="child">
                   <object class="GtkTreeView" id="zenity_tree_view">
-                    <property name="has_focus">1</property>
                     <child internal-child="selection">
                       <object class="GtkTreeSelection" id="treeview-selection1"/>
                     </child>
@@ -730,42 +575,24 @@
       <action-widget response="-5">zenity_tree_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area8">
-        <property name="visible">True</property>
+      <object class="GtkBox" id="dialog-action_area8">
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_tree_cancel_button">
             <property name="label" translatable="yes">Cancel</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="zenity_tree_ok_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
   </object>
   <object class="GtkDialog" id="zenity_warning_dialog">
     <property name="can_focus">0</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Warning</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">0</property>
@@ -773,15 +600,11 @@
         <child>
           <object class="GtkBox" id="hbox2">
             <property name="can_focus">0</property>
-            <property name="border_width">5</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkImage" id="zenity_warning_image">
                 <property name="can_focus">0</property>
-                <property name="xalign">0</property>
-                <property name="yalign">0</property>
                 <property name="icon_name">dialog-warning</property>
-                <property name="icon_size">6</property>
               </object>
             </child>
             <child>
@@ -801,21 +624,13 @@
       <action-widget response="-5">zenity_warning_ok_button</action-widget>
     </action-widgets>
     <child internal-child="action_area">
-      <object class="GtkButtonBox" id="dialog-action_area1">
+      <object class="GtkBox" id="dialog-action_area1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="layout_style">end</property>
         <child>
           <object class="GtkButton" id="zenity_warning_ok_button">
             <property name="label" translatable="yes">OK</property>
-            <property name="has_focus">1</property>
-            <property name="can_default">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
       </object>
     </child>


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