[glade] GladeWindow: startup cleanup



commit 8d4a9a32149f7a2cc1e2d5948a20b97943ff7b73
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Mon Jun 15 18:56:29 2020 -0300

    GladeWindow: startup cleanup
    
    Clean up initialization of glade
    Deleted unused macros

 src/glade-window.c | 24 ++++++------------------
 src/main.c         |  2 ++
 2 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/src/glade-window.c b/src/glade-window.c
index a2fa889a..888dd40e 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -47,10 +47,6 @@
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 
-#define ACTION_GROUP_STATIC             "GladeStatic"
-#define ACTION_GROUP_PROJECT            "GladeProject"
-#define ACTION_GROUP_PROJECTS_LIST_MENU "GladeProjectsList"
-
 #define READONLY_INDICATOR (_("[Read Only]"))
 
 #define URL_DEVELOPER_MANUAL "http://library.gnome.org/devel/gladeui/";
@@ -64,11 +60,6 @@
 #define CONFIG_KEY_HEIGHT           "height"
 #define CONFIG_KEY_MAXIMIZED        "maximized"
 
-#define CONFIG_GROUP_LOAD_SAVE      "Load and Save"
-#define CONFIG_KEY_BACKUP           "backup"
-#define CONFIG_KEY_AUTOSAVE         "autosave"
-#define CONFIG_KEY_AUTOSAVE_SECONDS "autosave-seconds"
-
 #define CONFIG_INTRO_GROUP          "Intro"
 #define CONFIG_INTRO_DONE           "intro-done"
 
@@ -2115,11 +2106,12 @@ glade_window_init (GladeWindow *window)
 
   priv->default_path = NULL;
 
+  /* This will load extra catalog paths */
   priv->settings = glade_settings_new ();
   glade_settings_load (priv->settings, glade_app_get_config ());
 
-  /* We need this for the icons to be available */
-  glade_init ();
+  /* Create GladeApp singleton, this will load all catalogs and load icons */
+  priv->app = glade_app_new ();
 
   gtk_widget_init_template (GTK_WIDGET (window));
 
@@ -2412,15 +2404,11 @@ glade_window_constructed (GObject *object)
   g_signal_connect (G_OBJECT (window), "key-press-event",
                     G_CALLBACK (glade_utils_hijack_key_press), window);
 
-  /* Load configuration, we need the list of extra catalog paths before creating
-   * the GladeApp
-   */
-  glade_window_config_load (window);
-
-  /* Create GladeApp singleton, this will load all catalogs */
-  priv->app = glade_app_new ();
   glade_app_set_window (GTK_WIDGET (window));
 
+  /* Load configuration */
+  glade_window_config_load (window);
+
   /* Clipboard signals */
   g_signal_connect (G_OBJECT (glade_app_get_clipboard ()),
                     "notify::has-selection",
diff --git a/src/main.c b/src/main.c
index 8a81771f..1107d8a3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -161,6 +161,8 @@ main (int argc, char *argv[])
       return -1;
     }
 
+  gtk_init (&argc, &argv);
+
   app = gtk_application_new ("org.gnome.Glade", G_APPLICATION_HANDLES_OPEN);
 
   g_application_set_option_context_summary (G_APPLICATION (app),


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