diff options
author | Philip Chimento <philip@endlessm.com> | 2015-03-24 21:24:38 -0700 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2015-03-25 17:46:11 -0700 |
commit | ab029d49fa0d40b027bc2a4e29defac176151eff (patch) | |
tree | da55f67fe1651b36483a03771866f85411508cab /endless/eosapplication.c | |
parent | 67c212e47a1db5f3e3dd1abaf552052e46512c93 (diff) |
EosAttribution implements GInitable
Since the first thing we do is load the attribution information from the
file and the object is useless if that fails, then we may as well make
the file a construct property and implement GInitable.
[endlessm/eos-sdk#2934]
Diffstat (limited to 'endless/eosapplication.c')
-rw-r--r-- | endless/eosapplication.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/endless/eosapplication.c b/endless/eosapplication.c index 9ca109b..91dbd73 100644 --- a/endless/eosapplication.c +++ b/endless/eosapplication.c @@ -270,13 +270,11 @@ on_image_credits_activate (GSimpleAction *action, GtkWidget *dialog, *attribution, *content; GError *error = NULL; - attribution = eos_attribution_new (); - if (!eos_attribution_populate_from_json_file (EOS_ATTRIBUTION (attribution), - priv->image_attribution_file, - &error)) + attribution = eos_attribution_new_sync (priv->image_attribution_file, NULL, + &error); + if (attribution == NULL) { g_warning ("Error loading image attribution file: %s", error->message); - gtk_widget_destroy (attribution); return; } gtk_widget_set_hexpand (attribution, TRUE); |