From 860eeba788d7556af2cc2b4e9ae1fa0167f2a950 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Tue, 31 Jul 2012 16:29:07 +0200 Subject: e-dialog: handle old uses of ephy_dialog_construct This is a hack. One that we should remove when we decide what to do with extensions. https://bugzilla.gnome.org/show_bug.cgi?id=680907 --- lib/ephy-dialog.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/ephy-dialog.c') diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c index 3948fb527..32aba87c4 100644 --- a/lib/ephy-dialog.c +++ b/lib/ephy-dialog.c @@ -150,7 +150,19 @@ impl_construct (EphyDialog *dialog, builder = gtk_builder_new (); gtk_builder_set_translation_domain (builder, domain); - gtk_builder_add_from_resource (builder, resource, &error); + + /* Hack to support extensions that use EphyDialog with files and + * not GResource objects. This is far simpler than creating a + * GResource binary for every extension. */ + if (g_file_test (resource, G_FILE_TEST_EXISTS)) + { + gtk_builder_add_from_file (builder, resource, &error); + } + else + { + gtk_builder_add_from_resource (builder, resource, &error); + } + if (error) { g_warning ("Unable to load UI resource %s: %s", resource, error->message); -- cgit v1.2.3