summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-06-15 18:56:29 -0300
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-06-16 19:03:36 -0300
commit8d4a9a32149f7a2cc1e2d5948a20b97943ff7b73 (patch)
tree0dcc0ef21b69b579f763f64537a1178c38f43bc8
parent2efa1db235501f0ba978ce6147b56b19c40c9c93 (diff)
downloadglade-8d4a9a32149f7a2cc1e2d5948a20b97943ff7b73.tar.gz
GladeWindow: startup cleanup
Clean up initialization of glade Deleted unused macros
-rw-r--r--src/glade-window.c24
-rw-r--r--src/main.c2
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),