[Github-comments] [geany/geany] Use GResource to load GtkBuilder XML UI file (#1703)

Matthew Brush notifications at xxxxx
Sun Dec 3 01:00:38 UTC 2017


codebrainz commented on this pull request.



> @@ -2440,20 +2441,32 @@ void ui_init_builder(void)
 	gtk_builder_set_translation_domain(builder, GETTEXT_PACKAGE);
 
 	error = NULL;
-	interface_file = g_build_filename(app->datadir, "geany.glade", NULL);
-	if (! gtk_builder_add_from_file(builder, interface_file, &error))
+	ui_data = g_resource_lookup_data(geany_get_resource(),
+		"/org/geany/Geany/geany.glade", G_RESOURCE_LOOKUP_FLAGS_NONE, &error);
+	if (ui_data == NULL)

Could do, I just wanted to show two discrete messages (ie. "load" vs "create"). I don't mind merging them, both are super-fatal.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1703#discussion_r154511365
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171202/a5528514/attachment.html>


More information about the Github-comments mailing list