Merge lp:~midori/midori/appz into lp:midori

Proposed by Paweł Forysiuk
Status: Work in progress
Proposed branch: lp:~midori/midori/appz
Merge into: lp:midori
Diff against target: 59 lines (+10/-13)
1 file modified
extensions/apps.vala (+10/-13)
To merge this branch: bzr merge lp:~midori/midori/appz
Reviewer Review Type Date Requested Status
Midori Devs Pending
Review via email: mp+203504@code.launchpad.net

Commit message

Enhance webapps handling

Description of the change

DONE:
Re-enable profiles on win

TODO:
- renaming of profiles/webapps

- non utf8 names
    leaves us with brorken desktop files - example russian articles on wikipedia, youtube "playing" char

- escaping
   we should escape backslashes in paths and percents in url (backslashes could be refactored from win32 code)

- allow to have multiple "profiles" of webapp from the same host
   for example different acconunts on webmail

- use favicons in lnk files on win32
   (there was a problem of missing api on win xp iirc, we can conditionally enable it in the worst case)

To post a comment you must log in.
lp:~midori/midori/appz updated
6552. By Paweł Forysiuk

Escape backslash for exec field unconditionally

Unmerged revisions

6552. By Paweł Forysiuk

Escape backslash for exec field unconditionally

6551. By Paweł Forysiuk

Re-enable profiles on win after porting to GApp

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 2014-01-25 21:34:30 +0000
3+++ extensions/apps.vala 2014-01-28 13:28:53 +0000
4@@ -49,16 +49,19 @@
5 return icon_name;
6 }
7
8+ internal static string desktop_file_sanitize_uri (string uri)
9+ {
10+ string escaped_backslash_uri = uri.replace ("\\", "\\\\");
11+
12+ return GLib.Shell.quote (escaped_backslash_uri);
13+ }
14+
15 internal static string prepare_desktop_file (string prefix, string name, string uri, string title, string icon_name)
16 {
17 string exec;
18-#if HAVE_WIN32
19- string doubleslash_uri = uri.replace ("\\", "\\\\");
20- string quoted_uri = GLib.Shell.quote (doubleslash_uri);
21- exec = prefix + quoted_uri;
22-#else
23- exec = prefix + uri;
24-#endif
25+ string sanitized_uri = desktop_file_sanitize_uri (uri);
26+ exec = prefix + sanitized_uri;
27+
28 var keyfile = new GLib.KeyFile ();
29 string entry = "Desktop Entry";
30
31@@ -195,8 +198,6 @@
32 if (toolbar == null) {
33 toolbar = new Gtk.Toolbar ();
34
35-#if !HAVE_WIN32
36- /* FIXME: Profiles are broken on win32 because of no multi instance support */
37 var profile = new Gtk.ToolButton.from_stock (Gtk.STOCK_ADD);
38 profile.label = _("New _Profile");
39 profile.tooltip_text = _("Creates a new, independant profile and a launcher");
40@@ -207,7 +208,6 @@
41 Launcher.create_profile.begin (this);
42 });
43 toolbar.insert (profile, -1);
44-#endif
45
46 var app = new Gtk.ToolButton.from_stock (Gtk.STOCK_ADD);
47 app.label = _("New _App");
48@@ -468,11 +468,8 @@
49 monitors = new GLib.List<GLib.FileMonitor> ();
50 app_folder = Launcher.get_app_folder ();
51 populate_apps.begin (app_folder);
52- /* FIXME: Profiles are broken on win32 because of no multi instance support */
53 profile_folder = Launcher.get_profile_folder ();
54-#if !HAVE_WIN32
55 populate_apps.begin (profile_folder);
56-#endif
57 widgets = new GLib.List<Gtk.Widget> ();
58 foreach (var browser in app.get_browsers ())
59 browser_added (browser);

Subscribers

People subscribed via source and target branches

to all changes: