0.8.8claws61
authorChristoph Hohmann <reboot@gmx.ch>
Mon, 6 Jan 2003 23:16:58 +0000 (23:16 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Mon, 6 Jan 2003 23:16:58 +0000 (23:16 +0000)
* src/prefs_actions.c
        mark strings for gettext
* src/prefs_matcher.c
        use new description window for Execute action and
        match condition in Filtering

patch by Ivan Francolin Martinez (ivanfm@users.sourceforge.net)

ChangeLog.claws
configure.in
src/prefs_actions.c
src/prefs_matcher.c

index 72a844263f0ba0469068a6ebf53ff619f0cfe3f6..a21a60ceb6e2773effc3b7dab9eca1bb6201c118 100644 (file)
@@ -1,3 +1,11 @@
+2003-01-06 [Ivan Francolin Martinez (ivanfm@users.sourceforge.net)]    0.8.8claws61
+
+       * src/prefs_actions.c
+               mark strings for gettext
+       * src/prefs_matcher.c
+               use new description window for Execute action and
+               match condition in Filtering
+
 2003-01-06 [alfons]    0.8.8claws60
 
        keep myself inspired to re-organize matcher part 8; 
index 4dc3c55e5b1ce8ef1e39e445b677d0e49468c304..51e433c0514fa66fa54d847f6cdbf83873ee9c44 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws60
+EXTRA_VERSION=claws61
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index f61c049caed3914f0254e727c64544a74110f749..8679ee0b77955813b997a5d3da4c600cfe3e1183 100644 (file)
@@ -1810,27 +1810,28 @@ static void catch_output(gpointer data, gint source, GdkInputCondition cond)
 /*
  * Strings describing action format strings
  * 
- * When adding new lines, remember to put 2 strings for each line
+ * When adding new lines, remember to put one string for each line
  */
 static gchar *actions_desc_strings[] = {
-       "Menu name:",
-       "   Use / in menu name to make submenus.",
-       "",
-       "Command line:",
-       "   Begin with:",
-       "     | to send message body or selection to command",
-       "     > to send user provided text to command",
-       "     * to send user provided hidden text to command",
-       " End with:",
-       "     | to replace message body or selection with command output",
-       "     > to insert command's output without replacing old text",
-       "     & to run command asynchronously",
-       " Use %f for message file name",
-       "     %F for the list of the file names of selected messages",
-       "     %p for the selected message MIME part.",
+       N_("Menu name:"),
+       N_("   Use / in menu name to make submenus."),
+       N_(""),
+       N_("Command line:"),
+       N_("   Begin with:"),
+       N_("     | to send message body or selection to command"),
+       N_("     > to send user provided text to command"),
+       N_("     * to send user provided hidden text to command"),
+       N_(" End with:"),
+       N_("     | to replace message body or selection with command output"),
+       N_("     > to insert command's output without replacing old text"),
+       N_("     & 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 MIME part."),
        NULL
 };
 
+
 static DescriptionWindow actions_desc_win = { 
         NULL, 
         1,
index 8db804921a5225713aa28659813aa65bab3de78d..e6dcb05042ac7bd609abd97ba338d8af2eace357 100644 (file)
@@ -45,6 +45,7 @@
 #include "gtkutils.h"
 #include "alertpanel.h"
 #include "folder.h"
+#include "description_window.h"
 
 #include "matcher_parser.h"
 #include "colorlabel.h"
@@ -242,7 +243,6 @@ static void prefs_matcher_criteria_select   (GtkList   *list,
                                                 GtkWidget *widget,
                                                 gpointer   user_data);
 static MatcherList *prefs_matcher_get_list     (void);
-static void prefs_matcher_exec_info_create     (void);
 
 
 /*!
@@ -1693,98 +1693,42 @@ static gint prefs_matcher_deleted(GtkWidget *widget, GdkEventAny *event,
        return TRUE;
 }
 
-/*!
- *\brief       Widget displaying information about the Execute action's
- *             format specifiers
+/*
+ * Strings describing exec format strings
+ * 
+ * When adding new lines, remember to put 2 strings for each line
  */
-static GtkWidget *exec_info_win;
+static gchar *exec_desc_strings[] = {
+       "%%",   "%",
+       "%s",   N_("Subject"),
+       "%f",   N_("From"),
+       "%t",   N_("To"),
+       "%c",   N_("Cc"),
+       "%d",   N_("Date"),
+       "%i",   N_("Message-ID"),
+       "%n",   N_("Newsgroups"),
+       "%r",   N_("References"),
+       "%F",   N_("Filename - should not be modified"),
+       "\\n",  N_("new line"),
+       "\\",   N_("escape character for quotes"),
+       "\\\"",N_("quote character"),
+       NULL, NULL
+};
+
+static DescriptionWindow exec_desc_win = { 
+        NULL, 
+        2,
+        N_("Description of symbols"),
+        exec_desc_strings
+};
+
+
 
 /*!
  *\brief       Show Execute action's info
  */
 void prefs_matcher_exec_info(void)
 {
-       if (!exec_info_win)
-               prefs_matcher_exec_info_create();
-
-       gtk_widget_show(exec_info_win);
-       gtk_main();
-       gtk_widget_hide(exec_info_win);
+       description_window_create(&exec_desc_win);
 }
 
-/*!
- *\brief       Create dialog for Execute action's info
- */
-static void prefs_matcher_exec_info_create(void)
-{
-       GtkWidget *vbox;
-       GtkWidget *hbox;
-       GtkWidget *hbbox;
-       GtkWidget *label;
-       GtkWidget *ok_btn;
-
-       exec_info_win = gtk_window_new(GTK_WINDOW_DIALOG);
-       gtk_window_set_title(GTK_WINDOW(exec_info_win),
-                            _("Description of symbols"));
-       gtk_container_set_border_width(GTK_CONTAINER(exec_info_win), 8);
-       gtk_window_set_position(GTK_WINDOW(exec_info_win), GTK_WIN_POS_CENTER);
-       gtk_window_set_modal(GTK_WINDOW(exec_info_win), TRUE);
-       gtk_window_set_policy(GTK_WINDOW(exec_info_win), FALSE, TRUE, FALSE);
-
-       vbox = gtk_vbox_new(FALSE, 8);
-       gtk_container_add(GTK_CONTAINER(exec_info_win), vbox);
-
-       hbox = gtk_hbox_new(FALSE, 4);
-       gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
-
-       label = gtk_label_new
-               ("%%:\n"
-                "%s:\n"
-                "%f:\n"
-                "%t:\n"
-                "%c:\n"
-                "%d:\n"
-                "%i:\n"
-                "%n:\n"
-                "%r:\n"
-                "%F:\n"
-                "\\n:\n"
-                "\\:\n"
-                "\\\":\n"
-                "%%:");
-
-       gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
-       gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
-
-       label = gtk_label_new
-               (_("%\n"
-                  "Subject\n"
-                  "From\n"
-                  "To\n"
-                  "Cc\n"
-                  "Date\n"
-                  "Message-ID\n"
-                  "Newsgroups\n"
-                  "References\n"
-                  "Filename - should not be modified\n"
-                  "new line\n"
-                  "escape character for quotes\n"
-                  "quote character\n"
-                  "%"));
-
-       gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
-       gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
-
-       gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
-                               NULL, NULL, NULL, NULL);
-       gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
-
-       gtk_widget_grab_default(ok_btn);
-       gtk_signal_connect(GTK_OBJECT(ok_btn), "clicked",
-                                 GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
-
-       gtk_signal_connect(GTK_OBJECT(exec_info_win), "delete_event",
-                                         GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
-
-       gtk_widget_show_all(vbox);
-}