diff options
author | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-07-31 22:29:07 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-07-31 22:46:58 +0800 |
commit | 860eeba788d7556af2cc2b4e9ae1fa0167f2a950 (patch) | |
tree | 4a8e4b36f822427b2707233b829f69382684f3b3 /lib/ephy-dialog.c | |
parent | e1944188455f159dfa9c9fcc45b0e3887c88ad53 (diff) | |
download | gsoc2013-epiphany-860eeba788d7556af2cc2b4e9ae1fa0167f2a950.tar gsoc2013-epiphany-860eeba788d7556af2cc2b4e9ae1fa0167f2a950.tar.gz gsoc2013-epiphany-860eeba788d7556af2cc2b4e9ae1fa0167f2a950.tar.bz2 gsoc2013-epiphany-860eeba788d7556af2cc2b4e9ae1fa0167f2a950.tar.lz gsoc2013-epiphany-860eeba788d7556af2cc2b4e9ae1fa0167f2a950.tar.xz gsoc2013-epiphany-860eeba788d7556af2cc2b4e9ae1fa0167f2a950.tar.zst gsoc2013-epiphany-860eeba788d7556af2cc2b4e9ae1fa0167f2a950.zip |
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
Diffstat (limited to 'lib/ephy-dialog.c')
-rw-r--r-- | lib/ephy-dialog.c | 14 |
1 files changed, 13 insertions, 1 deletions
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); |