Merge lp:~kalikiana/midori/baad-zoomlevel into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: André Stösel
Approved revision: 6281
Merged at revision: 6289
Proposed branch: lp:~kalikiana/midori/baad-zoomlevel
Merge into: lp:midori
Diff against target: 20 lines (+2/-1)
1 file modified
midori/midori-browser.c (+2/-1)
To merge this branch: bzr merge lp:~kalikiana/midori/baad-zoomlevel
Reviewer Review Type Date Requested Status
André Stösel Approve
Review via email: mp+177425@code.launchpad.net

Commit message

Handle double value in _midori_browser_activate_action

Description of the change

The zoom-level setting is double, which _midori_browser_activate_action doesn't handle so "-e zoom-level=1.80" wouldn't work to set the default zoom via command line.

To post a comment you must log in.
Revision history for this message
André Stösel (ivaldi) wrote :
review: Needs Fixing
Revision history for this message
André Stösel (ivaldi) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-browser.c'
2--- midori/midori-browser.c 2013-07-15 23:01:23 +0000
3+++ midori/midori-browser.c 2013-07-30 16:47:22 +0000
4@@ -569,6 +569,7 @@
5 || type == G_TYPE_PARAM_STRING
6 || type == G_TYPE_PARAM_INT
7 || type == G_TYPE_PARAM_FLOAT
8+ || type == G_TYPE_PARAM_DOUBLE
9 || type == G_TYPE_PARAM_ENUM))
10 midori_error (_("Value '%s' is invalid for %s"), parts[1], parts[0]);
11 }
12@@ -617,7 +618,7 @@
13 g_object_set (browser->settings, parts[0], parts[1], NULL);
14 else if (type == G_TYPE_PARAM_INT || type == G_TYPE_PARAM_UINT)
15 g_object_set (browser->settings, parts[0], atoi (parts[1]), NULL);
16- else if (type == G_TYPE_PARAM_FLOAT)
17+ else if (type == G_TYPE_PARAM_FLOAT || type == G_TYPE_PARAM_DOUBLE)
18 g_object_set (browser->settings, parts[0], g_ascii_strtod (parts[1], NULL), NULL);
19 else if (type == G_TYPE_PARAM_ENUM)
20 {

Subscribers

People subscribed via source and target branches

to all changes: