diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-05-14 22:13:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-05-15 03:20:14 +0800 |
commit | fe528d7847b14438dcdb44f6048891b57031d022 (patch) | |
tree | 5c48276ee484f567262be5db3ac91a74c2606844 /e-util | |
parent | 07830ef445b2cc0433f2a871c02b423e38f78f04 (diff) | |
download | gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar.gz gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar.bz2 gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar.lz gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar.xz gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar.zst gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.zip |
Minor e_web_view_install_request_handler() cleanup.
Make reference count handling a bit less awkward.
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-web-view.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c index 1c0d88c66d..3153740eaf 100644 --- a/e-util/e-web-view.c +++ b/e-util/e-web-view.c @@ -2846,22 +2846,19 @@ e_web_view_install_request_handler (EWebView *web_view, { SoupSession *session; SoupSessionFeature *feature; - gboolean new; session = webkit_get_default_session (); feature = soup_session_get_feature (session, SOUP_TYPE_REQUESTER); - new = FALSE; - if (feature == NULL) { + if (feature != NULL) { + g_object_ref (feature); + } else { feature = SOUP_SESSION_FEATURE (soup_requester_new ()); soup_session_add_feature (session, feature); - new = TRUE; } soup_session_feature_add_feature (feature, handler_type); - if (new) { - g_object_unref (feature); - } + g_object_unref (feature); } |