[gtranslator: 1/2] The gtr_application_init should not use GTK+ functions. I moved css loader and load_accels() at gtr_
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 1/2] The gtr_application_init should not use GTK+ functions. I moved css loader and load_accels() at gtr_
- Date: Tue, 5 Nov 2019 09:16:50 +0000 (UTC)
commit 5ac6d8b6dfb6084c1a801e79c15f93dc3809600d
Author: Izabela Bakollari <izabela bakollari gmail com>
Date: Tue Nov 5 09:16:28 2019 +0000
The gtr_application_init should not use GTK+ functions. I moved css loader and load_accels() at
gtr_application_startup where gtk_init is called. This commit tries to solve the critical at start
"gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed"
src/gtr-application.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/gtr-application.c b/src/gtr-application.c
index 929b1a1f..2ea21f0b 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -183,12 +183,6 @@ gtr_application_init (GtrApplication *application)
if (!g_file_test (profiles_file, G_FILE_TEST_EXISTS))
priv->first_run = TRUE;
g_free (profiles_file);
-
- /* Custom css */
- priv->provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_resource (priv->provider, "/org/gnome/translator/styles.css");
-
- load_accels ();
}
static void
@@ -601,6 +595,13 @@ gtr_application_startup (GApplication *application)
g_set_application_name (_("Translation Editor"));
gtk_window_set_default_icon_name (PACKAGE_APPID);
+
+ /* Custom css */
+ priv->provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_resource (priv->provider, "/org/gnome/translator/styles.css");
+
+ load_accels ();
+
/* We set the default icon dir */
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
gtr_dirs_get_gtr_pixmaps_dir ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]