Made the actions help text for %p more clear
[claws.git] / src / prefs_actions.c
index d8970a3958b2f49630c17b530b66defceb1c2ab0..a2cf0cb95e60fb107a771b02ae3a9766cec6f871 100644 (file)
@@ -264,7 +264,7 @@ static void prefs_actions_create(MainWindow *mainwin)
 
        gchar *title[1];
 
-       debug_print(_("Creating actions setting window...\n"));
+       debug_print("Creating actions setting window...\n");
 
        window = gtk_window_new (GTK_WINDOW_DIALOG);
 
@@ -339,7 +339,7 @@ static void prefs_actions_create(MainWindow *mainwin)
                   "   & to run command asynchronously\n"
                   " Use %f for message file name\n"
                   "   %F for the list of the file names of selected messages\n"
-                  "   %p for the selected message part."));
+                  "   %p for the selected message MIME part."));
        gtk_misc_set_alignment(GTK_MISC(help_label), 0, 0.5);
        gtk_label_set_justify(GTK_LABEL(help_label), GTK_JUSTIFY_LEFT);
        gtk_widget_show(help_label);
@@ -456,7 +456,7 @@ void prefs_actions_read_config(void)
        gchar buf[PREFSBUFSIZE];
        gchar *act;
 
-       debug_print(_("Reading actions configurations...\n"));
+       debug_print("Reading actions configurations...\n");
 
        rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACTIONS_RC, NULL);
        if ((fp = fopen(rcpath, "rb")) == NULL) {
@@ -491,7 +491,7 @@ void prefs_actions_write_config(void)
        PrefFile *pfile;
        GSList *cur;
 
-       debug_print(_("Writing actions configuration...\n"));
+       debug_print("Writing actions configuration...\n");
 
        rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACTIONS_RC, NULL);
        if ((pfile= prefs_write_open(rcpath)) == NULL) {
@@ -998,6 +998,19 @@ void update_compose_actions_menu(GtkItemFactory *ifactory,
                            compose);
 }
 
+void actions_execute(gpointer data, 
+                    guint action_nb,
+                    GtkWidget *widget,
+                    gint source)
+{
+       if (source == TOOLBAR_MAIN) 
+               mainwin_actions_execute_cb((MainWindow*)data, action_nb, widget);
+
+       else if (source == TOOLBAR_COMPOSE)
+               compose_actions_execute_cb((Compose*)data, action_nb, widget);
+}
+
+
 static void update_actions_menu(GtkItemFactory *ifactory,
                                gchar *branch_path,
                                gpointer callback,
@@ -1160,7 +1173,7 @@ static gboolean execute_actions(gchar *action, GtkWidget *window,
                        cmd = parse_action_cmd(action, msginfo, ctree,
                                               mimeview);
                        if (!cmd) {
-                               debug_print(_("Action command error\n"));
+                               debug_print("Action command error\n");
                                is_ok  = FALSE; /* ERR: incorrect command */
                                break;
                        }
@@ -1252,7 +1265,7 @@ ChildInfo *fork_child(gchar *cmd, gint action_type, GtkWidget *text,
                }
        }
 
-       debug_print(_("Forking child and grandchild.\n"));
+       debug_print("Forking child and grandchild.\n");
 
        pid = fork();
        if (pid == 0) { /* Child */
@@ -1312,9 +1325,9 @@ ChildInfo *fork_child(gchar *cmd, gint action_type, GtkWidget *text,
                                close(chld_status[0]);
                        }
 
-                       debug_print(_("Child: Waiting for grandchild\n"));
+                       debug_print("Child: Waiting for grandchild\n");
                        waitpid(gch_pid, NULL, 0);
-                       debug_print(_("Child: grandchild ended\n"));
+                       debug_print("Child: grandchild ended\n");
                        if (sync) {
                                write(chld_status[1], "0\n", 2);
                                close(chld_status[1]);
@@ -1416,7 +1429,7 @@ static void kill_children_cb(GtkWidget *widget, gpointer data)
 
        for (cur = children->list; cur; cur = cur->next) {
                child_info = (ChildInfo *)(cur->data);
-               debug_print(_("Killing child group id %d\n"), child_info->pid);
+               debug_print("Killing child group id %d\n", child_info->pid);
                if (child_info->pid && kill(-child_info->pid, SIGTERM) < 0)
                        perror("kill");
        }
@@ -1508,7 +1521,7 @@ static void free_children(Children *children)
        GSList *cur;
        ChildInfo *child_info;
 
-       debug_print(_("Freeing children data %p\n"), children);
+       debug_print("Freeing children data %p\n", children);
 
        g_free(children->action);
        for (cur = children->list; cur;) {
@@ -1526,7 +1539,7 @@ static void update_io_dialog(Children *children)
 {
        GSList *cur;
 
-       debug_print(_("Updating actions input/output dialog.\n"));
+       debug_print("Updating actions input/output dialog.\n");
 
        if (!children->nb) {
                gtk_widget_set_sensitive(children->abort_btn, FALSE);
@@ -1677,7 +1690,7 @@ static void catch_status(gpointer data, gint source, GdkInputCondition cond)
        gdk_input_remove(child_info->tag_status);
 
        c = read(source, &buf, 1);
-       debug_print(_("Child returned %c\n"), buf);
+       debug_print("Child returned %c\n", buf);
 
        waitpid(-child_info->pid, NULL, 0);
        childinfo_close_pipes(child_info);
@@ -1693,7 +1706,7 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
        gchar *input;
        gint c;
 
-       debug_print(_("Sending input to grand child.\n"));
+       debug_print("Sending input to grand child.\n");
        if (!(cond && GDK_INPUT_WRITE))
                return;
 
@@ -1710,7 +1723,7 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
 
        gtk_entry_set_text(GTK_ENTRY(children->input_entry), "");
        gtk_widget_set_sensitive(children->input_hbox, TRUE);
-       debug_print(_("Input to grand child sent.\n"));
+       debug_print("Input to grand child sent.\n");
 }
 
 static void catch_output(gpointer data, gint source, GdkInputCondition cond)
@@ -1719,7 +1732,7 @@ static void catch_output(gpointer data, gint source, GdkInputCondition cond)
        gint c, i;
        gchar buf[PREFSBUFSIZE];
 
-       debug_print(_("Catching grand child's output.\n"));
+       debug_print("Catching grand child's output.\n");
        if (child_info->type & ACTION_PIPE_OUT
            && source == child_info->chld_out) {
                gboolean is_selection = FALSE;