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) {
|
public DesktopFile (string name, string url, string icon) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.url = url;
|
this.url = url.replace ("%", "%%");
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
|
|
||||||
file = new GLib.KeyFile();
|
file = new GLib.KeyFile();
|
||||||
|
@ -153,7 +153,7 @@ namespace Webpin {
|
||||||
|
|
||||||
var desktop_app = new GLib.DesktopAppInfo(app.get_id ());
|
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)) {
|
if (exec != null && exec.contains (url)) {
|
||||||
return desktop_app;
|
return desktop_app;
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace Webpin {
|
||||||
if ((child as Gtk.FlowBoxChild).get_child () is ApplicationIcon) {
|
if ((child as Gtk.FlowBoxChild).get_child () is ApplicationIcon) {
|
||||||
var app_icon = (child as Gtk.FlowBoxChild).get_child () as ApplicationIcon;
|
var app_icon = (child as Gtk.FlowBoxChild).get_child () as ApplicationIcon;
|
||||||
try {
|
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) {
|
} catch (SpawnError e) {
|
||||||
debug ("Error: %s\n", e.message);
|
debug ("Error: %s\n", e.message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,7 @@ namespace Webpin {
|
||||||
|
|
||||||
string icon = icon_name_entry.get_text ();
|
string icon = icon_name_entry.get_text ();
|
||||||
string name = app_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 == "")
|
if (icon == "")
|
||||||
icon = default_app_icon;
|
icon = default_app_icon;
|
||||||
|
@ -320,7 +320,7 @@ namespace Webpin {
|
||||||
mode = assistant_mode.edit_app;
|
mode = assistant_mode.edit_app;
|
||||||
app_name_entry.text = desktop_file.name;
|
app_name_entry.text = desktop_file.name;
|
||||||
app_name_entry.set_sensitive (false);
|
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;
|
icon_name_entry.text = desktop_file.icon;
|
||||||
update_app_icon ();
|
update_app_icon ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue