summaryrefslogtreecommitdiff
path: root/src/actions/uriAction.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/uriAction.vala')
-rw-r--r--src/actions/uriAction.vala18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/actions/uriAction.vala b/src/actions/uriAction.vala
index 25d5c75..f407f6c 100644
--- a/src/actions/uriAction.vala
+++ b/src/actions/uriAction.vala
@@ -29,10 +29,14 @@ public class UriAction : Action {
/// used in the pies.conf file for this kind of Actions.
/////////////////////////////////////////////////////////////////////
- public static void register(out string name, out bool icon_name_editable, out string settings_name) {
- name = _("Open URI");
- icon_name_editable = true;
- settings_name = "uri";
+ public static ActionRegistry.TypeDescription register() {
+ var description = new ActionRegistry.TypeDescription();
+ description.name = _("Open URI");
+ description.icon = "web-browser";
+ description.description = _("Opens a given location. You may use URL's or files paths.");
+ description.icon_name_editable = true;
+ description.id = "uri";
+ return description;
}
/////////////////////////////////////////////////////////////////////
@@ -51,8 +55,10 @@ public class UriAction : Action {
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
- public UriAction(string name, string icon, string command, bool is_quick_action = false) {
- GLib.Object(name : name, icon : icon, real_command : command, is_quick_action : is_quick_action);
+ public UriAction(string name, string icon, string command, bool is_quickaction = false) {
+ GLib.Object(name : name, icon : icon,
+ real_command : command.has_prefix("www") ? "http://" + command : command,
+ is_quickaction : is_quickaction);
}
/////////////////////////////////////////////////////////////////////