Merge lp:~kalikiana/midori/duplicatebrowser into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6192
Merged at revision: 6194
Proposed branch: lp:~kalikiana/midori/duplicatebrowser
Merge into: lp:midori
Diff against target: 24 lines (+1/-2)
1 file modified
extensions/apps.vala (+1/-2)
To merge this branch: bzr merge lp:~kalikiana/midori/duplicatebrowser
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+167140@code.launchpad.net

Commit message

Avoid declaring browser twice within the same function

Description of the change

Avoid declaring browser twice within the same function

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/apps.vala'
2--- extensions/apps.vala 2013-05-31 11:58:17 +0000
3+++ extensions/apps.vala 2013-06-03 20:46:27 +0000
4@@ -38,11 +38,11 @@
5 Categories=Network;
6 """.printf (name, exec, PACKAGE_NAME, icon_name);
7 var file = folder.get_child (filename);
8+ var browser = proxy.get_toplevel () as Midori.Browser;
9 try {
10 var stream = yield file.replace_async (null, false, GLib.FileCreateFlags.NONE);
11 yield stream.write_async (contents.data);
12
13- var browser = proxy.get_toplevel () as Midori.Browser;
14 browser.send_notification (_("Launcher created"),
15 _("You can now run <b>%s</b> from your launcher or menu").printf (name));
16 /* TODO: Use infobar; currently hits gtk_widget_get_realized: assertion `GTK_IS_WIDGET (widget)' failed
17@@ -50,7 +50,6 @@
18 _("You can now run <b>%s</b> from your launcher or menu").printf (name), null, null, null); */
19 }
20 catch (Error error) {
21- var browser = proxy.get_toplevel () as Midori.Browser;
22 browser.send_notification (_("Error creating launcher"),
23 _("Failed to create new launcher: %s").printf (error.message));
24 }

Subscribers

People subscribed via source and target branches

to all changes: