fixed urls contained '%' char
This commit is contained in:
parent
dd46541d66
commit
8af950cd3f
3 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ namespace Webpin {
|
|||
|
||||
public DesktopFile (string name, string url, string icon) {
|
||||
this.name = name;
|
||||
this.url = url;
|
||||
this.url = url.replace ("%", "%%");
|
||||
this.icon = icon;
|
||||
|
||||
file = new GLib.KeyFile();
|
||||
|
@ -153,7 +153,7 @@ namespace Webpin {
|
|||
|
||||
var desktop_app = new GLib.DesktopAppInfo(app.get_id ());
|
||||
|
||||
var exec = desktop_app.get_string ("Exec");
|
||||
var exec = desktop_app.get_string ("Exec").replace ("%%", "%");
|
||||
|
||||
if (exec != null && exec.contains (url)) {
|
||||
return desktop_app;
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace Webpin {
|
|||
if ((child as Gtk.FlowBoxChild).get_child () is ApplicationIcon) {
|
||||
var app_icon = (child as Gtk.FlowBoxChild).get_child () as ApplicationIcon;
|
||||
try {
|
||||
Process.spawn_command_line_async ("com.github.artemanufrij.webpin " + app_icon.desktop_file.url);
|
||||
Process.spawn_command_line_async ("com.github.artemanufrij.webpin " + app_icon.desktop_file.url.replace("%%", "%"));
|
||||
} catch (SpawnError e) {
|
||||
debug ("Error: %s\n", e.message);
|
||||
}
|
||||
|
|
|
@ -298,7 +298,7 @@ namespace Webpin {
|
|||
|
||||
string icon = icon_name_entry.get_text ();
|
||||
string name = app_name_entry.get_text ();
|
||||
string url = app_url_entry.get_text ();
|
||||
string url = app_url_entry.get_text ().replace ("%", "%%");
|
||||
|
||||
if (icon == "")
|
||||
icon = default_app_icon;
|
||||
|
@ -320,7 +320,7 @@ namespace Webpin {
|
|||
mode = assistant_mode.edit_app;
|
||||
app_name_entry.text = desktop_file.name;
|
||||
app_name_entry.set_sensitive (false);
|
||||
app_url_entry.text = desktop_file.url;
|
||||
app_url_entry.text = desktop_file.url.replace ("%%", "%");
|
||||
icon_name_entry.text = desktop_file.icon;
|
||||
update_app_icon ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue