2008-11-19 [wwp] 3.6.1cvs36
authorTristan Chabredier <wwp@claws-mail.org>
Wed, 19 Nov 2008 17:04:46 +0000 (17:04 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Wed, 19 Nov 2008 17:04:46 +0000 (17:04 +0000)
* src/compose.c
* src/matcher.c
* src/messageview.c
* src/mimeview.c
* src/prefs_actions.c
* src/prefs_filtering_action.c
* src/procmsg.c
* src/summaryview.c
* src/textview.c
* src/common/utils.c
Replace occurrences of "command line" with "command-line" everywhere.
Enforce code style (mostly indentation) in prefs_actions.c.

13 files changed:
ChangeLog
PATCHSETS
configure.ac
src/common/utils.c
src/compose.c
src/matcher.c
src/messageview.c
src/mimeview.c
src/prefs_actions.c
src/prefs_filtering_action.c
src/procmsg.c
src/summaryview.c
src/textview.c

index 356be85..4a08737 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-11-19 [wwp]       3.6.1cvs36
+
+       * src/compose.c
+       * src/matcher.c
+       * src/messageview.c
+       * src/mimeview.c
+       * src/prefs_actions.c
+       * src/prefs_filtering_action.c
+       * src/procmsg.c
+       * src/summaryview.c
+       * src/textview.c
+       * src/common/utils.c
+               Replace occurrences of "command line" with "command-line" everywhere.
+               Enforce code style (mostly indentation) in prefs_actions.c.
+
 2008-11-19 [colin]     3.6.1cvs35
 
        * src/compose.c
index fd9679f..d3f683f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.39.2.53 -r 1.39.2.54 src/mainwindow.h;  ) > 3.6.1cvs33.patchset
 ( cvs diff -u -r 1.207.2.206 -r 1.207.2.207 src/folderview.c;  ) > 3.6.1cvs34.patchset
 ( cvs diff -u -r 1.382.2.484 -r 1.382.2.485 src/compose.c;  cvs diff -u -r 1.204.2.182 -r 1.204.2.183 src/prefs_common.c;  cvs diff -u -r 1.103.2.117 -r 1.103.2.118 src/prefs_common.h;  ) > 3.6.1cvs35.patchset
+( cvs diff -u -r 1.382.2.485 -r 1.382.2.486 src/compose.c;  cvs diff -u -r 1.75.2.61 -r 1.75.2.62 src/matcher.c;  cvs diff -u -r 1.94.2.191 -r 1.94.2.192 src/messageview.c;  cvs diff -u -r 1.83.2.147 -r 1.83.2.148 src/mimeview.c;  cvs diff -u -r 1.60.2.64 -r 1.60.2.65 src/prefs_actions.c;  cvs diff -u -r 1.1.4.57 -r 1.1.4.58 src/prefs_filtering_action.c;  cvs diff -u -r 1.150.2.109 -r 1.150.2.110 src/procmsg.c;  cvs diff -u -r 1.395.2.400 -r 1.395.2.401 src/summaryview.c;  cvs diff -u -r 1.96.2.210 -r 1.96.2.211 src/textview.c;  cvs diff -u -r 1.36.2.154 -r 1.36.2.155 src/common/utils.c;  ) > 3.6.1cvs36.patchset
index a3ac251..7a1426d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=35
+EXTRA_VERSION=36
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 0c1fe73..0b187ce 100644 (file)
@@ -3346,7 +3346,7 @@ gint open_uri(const gchar *uri, const gchar *cmdline)
                g_snprintf(buf, sizeof(buf), cmdline, encoded_uri);
        else {
                if (cmdline)
-                       g_warning("Open URI command line is invalid "
+                       g_warning("Open URI command-line is invalid "
                                  "(there must be only one '%%s'): %s",
                                  cmdline);
                g_snprintf(buf, sizeof(buf), DEFAULT_BROWSER_CMD, encoded_uri);
@@ -3378,7 +3378,7 @@ gint open_txt_editor(const gchar *filepath, const gchar *cmdline)
                g_snprintf(buf, sizeof(buf), cmdline, filepath);
        else {
                if (cmdline)
-                       g_warning("Open Text Editor command line is invalid "
+                       g_warning("Open Text Editor command-line is invalid "
                                  "(there must be only one '%%s'): %s",
                                  cmdline);
                g_snprintf(buf, sizeof(buf), DEFAULT_EDITOR_CMD, filepath);
index 60a1b51..d20fcdb 100644 (file)
@@ -8473,7 +8473,7 @@ static gint compose_exec_ext_editor_real(const gchar *file)
                g_snprintf(buf, sizeof(buf), prefs_common_get_ext_editor_cmd(), file);
        } else {
                if (prefs_common_get_ext_editor_cmd())
-                       g_warning("External editor command line is invalid: '%s'\n",
+                       g_warning("External editor command-line is invalid: '%s'\n",
                                  prefs_common_get_ext_editor_cmd());
                g_snprintf(buf, sizeof(buf), DEFAULT_EDITOR_CMD, file);
        }
index ba8ee45..f4945af 100644 (file)
@@ -2002,9 +2002,9 @@ static void add_str_default(gchar ** dest,
 
 /* matching_build_command() - preferably cmd should be unescaped */
 /*!
- *\brief       Build the command line to execute
+ *\brief       Build the command-line to execute
  *
- *\param       cmd String with command line specifiers
+ *\param       cmd String with command-line specifiers
  *\param       info Message info to use for command
  *
  *\return      gchar * Newly allocated string
index 8fdd824..f0074ed 100644 (file)
@@ -2032,13 +2032,13 @@ static void print_cb(GtkAction *action, gpointer data)
 
 #if !defined(USE_GNOMEPRINT) && !GTK_CHECK_VERSION(2,10,0)
        cmdline = input_dialog(_("Print"),
-                              _("Enter the print command line:\n"
+                              _("Enter the print command-line:\n"
                                 "('%s' will be replaced with file name)"),
                               prefs_common.print_cmd);
        if (!cmdline) return;
        if (!(p = strchr(cmdline, '%')) || *(p + 1) != 's' ||
            strchr(p + 2, '%')) {
-               alertpanel_error(_("Print command line is invalid:\n'%s'"),
+               alertpanel_error(_("Print command-line is invalid:\n'%s'"),
                                 cmdline);
                g_free(cmdline);
                return;
index 83ec514..e8f7d86 100644 (file)
@@ -1954,14 +1954,14 @@ static void mimeview_open_part_with(MimeView *mimeview, MimeInfo *partinfo, gboo
                if (content_type != NULL)
                        cmd = input_dialog_combo_remember
                                (_("Open with"),
-                                _("Enter the command line to open file:\n"
+                                _("Enter the command-line to open file:\n"
                                   "('%s' will be replaced with file name)"),
                                 mime_command ? mime_command : prefs_common.mime_open_cmd,
                                 prefs_common.mime_open_cmd_history, &remember);
                else
                        cmd = input_dialog_combo
                                (_("Open with"),
-                                _("Enter the command line to open file:\n"
+                                _("Enter the command-line to open file:\n"
                                   "('%s' will be replaced with file name)"),
                                 mime_command ? mime_command : prefs_common.mime_open_cmd,
                                 prefs_common.mime_open_cmd_history);
@@ -2004,7 +2004,7 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
                        else
                                g_chmod(filename, S_IRUSR|S_IWUSR);
                } else {
-                       g_warning("MIME viewer command line is invalid: '%s'", cmd);
+                       g_warning("MIME viewer command-line is invalid: '%s'", cmd);
                        mimeview_open_part_with(mimeview, partinfo, FALSE);
                }
                if (execute_command_line(buf, TRUE) != 0) {
index 7c2a6d4..c685cca 100644 (file)
@@ -644,7 +644,7 @@ static gint prefs_actions_clist_set_row(gint row)
        GET_ENTRY(actions.cmd_entry);
 
        if (entry_text[0] == '\0') {
-               alertpanel_error(_("Command line not set."));
+               alertpanel_error(_("Command-line not set."));
                return -1;
        }
 
@@ -864,10 +864,9 @@ static gboolean prefs_actions_key_pressed(GtkWidget *widget, GdkEventKey *event,
                prefs_actions_cancel(widget, data);
        else {
                GtkWidget *focused = gtkut_get_focused_child(
-                                       GTK_CONTAINER(widget));
-               if (focused && GTK_IS_EDITABLE(focused)) {
+                               GTK_CONTAINER(widget));
+               if (focused && GTK_IS_EDITABLE(focused))
                        modified = TRUE;
-               }
        }
        return FALSE;
 }
@@ -881,7 +880,8 @@ static gboolean prefs_actions_search_func_cb (GtkTreeModel *model, gint column,
 
        gtk_tree_model_get (model, iter, column, &store_string, -1);
 
-       if (!store_string || !key) return FALSE;
+       if (!store_string || !key)
+               return FALSE;
 
 
        retval = (strncmp (key, store_string, strlen(key)) != 0);
@@ -972,7 +972,7 @@ static gchar *actions_desc_strings[] = {
        N_("<span weight=\"bold\" underline=\"single\">Menu name:</span>"), NULL,
        N_("Use / in menu name to make submenus."), NULL,
        "", NULL,
-       N_("<span weight=\"bold\" underline=\"single\">Command line:</span>"), NULL,
+       N_("<span weight=\"bold\" underline=\"single\">Command-line:</span>"), NULL,
        N_("<span weight=\"bold\">Begin with:</span>"), NULL,
        "     |",   N_("to send message body or selection to command's standard input"),
        "     &gt;",   N_("to send user provided text to command's standard input"),
@@ -1092,52 +1092,53 @@ static GtkActionEntry prefs_actions_popup_entries[] =
 static gint prefs_actions_list_btn_pressed(GtkWidget *widget, GdkEventButton *event,
                                   GtkTreeView *list_view)
 {
-   if (event) {
-          /* left- or right-button click */
-          if (event->button == 1 || event->button == 3) {
-                  GtkTreePath *path = NULL;
-                  if (gtk_tree_view_get_path_at_pos( list_view, event->x, event->y,
-                                                          &path, NULL, NULL, NULL)) {
-                          prefs_actions_select_row(list_view, path);
-                  }
-                  if (path)
-                          gtk_tree_path_free(path);
-          }
-
-          /* right-button click */
-          if (event->button == 3) {
-                  GtkTreeModel *model = gtk_tree_view_get_model(list_view);
-                  GtkTreeIter iter;
-                  gboolean non_empty;
-                  gint row;
-
-                  if (!prefs_actions_popup_menu) {
-                               prefs_actions_popup_action = cm_menu_create_action_group("PrefsActionsPopup", prefs_actions_popup_entries,
-                                       G_N_ELEMENTS(prefs_actions_popup_entries), (gpointer)list_view);
+       if (event) {
+               /* left- or right-button click */
+               if (event->button == 1 || event->button == 3) {
+                       GtkTreePath *path = NULL;
+                       if (gtk_tree_view_get_path_at_pos( list_view, event->x, event->y,
+                                       &path, NULL, NULL, NULL)) {
+                               prefs_actions_select_row(list_view, path);
+               }
+               if (path)
+                       gtk_tree_path_free(path);
+               }
+
+               /* right-button click */
+               if (event->button == 3) {
+                       GtkTreeModel *model = gtk_tree_view_get_model(list_view);
+                       GtkTreeIter iter;
+                       gboolean non_empty;
+                       gint row;
+
+                       if (!prefs_actions_popup_menu) {
+                               prefs_actions_popup_action = cm_menu_create_action_group("PrefsActionsPopup",
+                                               prefs_actions_popup_entries, G_N_ELEMENTS(prefs_actions_popup_entries),
+                                               (gpointer)list_view);
                                MENUITEM_ADDUI("/Menus", "PrefsActionsPopup", "PrefsActionsPopup", GTK_UI_MANAGER_MENU)
                                MENUITEM_ADDUI("/Menus/PrefsActionsPopup", "Delete", "PrefsActionsPopup/Delete", GTK_UI_MANAGER_MENUITEM)
                                MENUITEM_ADDUI("/Menus/PrefsActionsPopup", "DeleteAll", "PrefsActionsPopup/DeleteAll", GTK_UI_MANAGER_MENUITEM)
                                MENUITEM_ADDUI("/Menus/PrefsActionsPopup", "Duplicate", "PrefsActionsPopup/Duplicate", GTK_UI_MANAGER_MENUITEM)
                                prefs_actions_popup_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(
-                                       gtk_ui_manager_get_widget(gtkut_ui_manager(), "/Menus/PrefsActionsPopup")) );
-                  }
+                                               gtk_ui_manager_get_widget(gtkut_ui_manager(), "/Menus/PrefsActionsPopup")) );
+                       }
 
-                  /* grey out some popup menu items if there is no selected row */
-                  row = gtkut_list_view_get_selected_row(GTK_WIDGET(list_view));
+                       /* grey out some popup menu items if there is no selected row */
+                       row = gtkut_list_view_get_selected_row(GTK_WIDGET(list_view));
                        cm_menu_set_sensitive("PrefsActionsPopup/Delete", (row > 0));
                        cm_menu_set_sensitive("PrefsActionsPopup/Duplicate", (row > 0));
 
-                  /* grey out seom popup menu items if there is no row
-                         (not counting the (New) one at row 0) */
-                  non_empty = gtk_tree_model_get_iter_first(model, &iter);
-                  if (non_empty)
-                          non_empty = gtk_tree_model_iter_next(model, &iter);
+                       /* grey out seom popup menu items if there is no row
+                       (not counting the (New) one at row 0) */
+                       non_empty = gtk_tree_model_get_iter_first(model, &iter);
+                       if (non_empty)
+                               non_empty = gtk_tree_model_iter_next(model, &iter);
                        cm_menu_set_sensitive("PrefsActionsPopup/DeleteAll", non_empty);
 
-                  gtk_menu_popup(GTK_MENU(prefs_actions_popup_menu), 
-                                         NULL, NULL, NULL, NULL, 
-                                         event->button, event->time);
-          }
+                       gtk_menu_popup(GTK_MENU(prefs_actions_popup_menu), 
+                                       NULL, NULL, NULL, NULL, 
+                                       event->button, event->time);
+               }
    }
    return FALSE;
 }
@@ -1245,7 +1246,7 @@ static void prefs_actions_select_row(GtkTreeView *list_view, GtkTreePath *path)
        *cmd = '\0';
        gtk_entry_set_text(GTK_ENTRY(actions.name_entry), buf);
 
-       if(g_str_has_prefix(&cmd[2], "%as{") == TRUE)
+       if (g_str_has_prefix(&cmd[2], "%as{") == TRUE)
                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
                                                actions.filter_radiobtn), TRUE);
        else
@@ -1257,22 +1258,22 @@ static void prefs_actions_select_row(GtkTreeView *list_view, GtkTreePath *path)
 
 static void prefs_action_filter_radiobtn_cb(GtkWidget *widget, gpointer data)
 {
-       if(actions.filter_btn)
+       if (actions.filter_btn)
                gtk_widget_set_sensitive(actions.filter_btn, TRUE);
-       if(actions.cmd_entry)
-               gtk_widget_set_sensitive(actions.cmd_entry,FALSE);
-       if(actions.info_btn)
-               gtk_widget_set_sensitive(actions.info_btn,FALSE);
+       if (actions.cmd_entry)
+               gtk_widget_set_sensitive(actions.cmd_entry, FALSE);
+       if (actions.info_btn)
+               gtk_widget_set_sensitive(actions.info_btn, FALSE);
 }
 
 static void prefs_action_shell_radiobtn_cb(GtkWidget *widget, gpointer data)
 {
-       if(actions.filter_btn)
+       if (actions.filter_btn)
                gtk_widget_set_sensitive(actions.filter_btn, FALSE);
-       if(actions.cmd_entry)
-               gtk_widget_set_sensitive(actions.cmd_entry,TRUE);
-       if(actions.info_btn)
-               gtk_widget_set_sensitive(actions.info_btn,TRUE);
+       if (actions.cmd_entry)
+               gtk_widget_set_sensitive(actions.cmd_entry, TRUE);
+       if (actions.info_btn)
+               gtk_widget_set_sensitive(actions.info_btn, TRUE);
 }
 
 static void prefs_action_filterbtn_cb(GtkWidget *widget, gpointer data)
index 5536c84..7a64352 100644 (file)
@@ -885,7 +885,7 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
                if (*destination == '\0') {
                        if (alert)
                                 alertpanel_error(action_id == ACTION_EXECUTE 
-                                                ? _("Command line not set")
+                                                ? _("Command-line not set")
                                                 : _("Destination is not set."));
                        g_free(destination);
                        return NULL;
index ba53cee..09abdbd 100644 (file)
@@ -1122,7 +1122,7 @@ void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline)
                g_snprintf(buf, sizeof(buf) - 1, cmdline, prtmp);
        else {
                if (cmdline)
-                       g_warning("Print command line is invalid: '%s'\n",
+                       g_warning("Print command-line is invalid: '%s'\n",
                                  cmdline);
                g_snprintf(buf, sizeof(buf) - 1, def_cmd, prtmp);
        }
index 27854e3..d731d99 100644 (file)
@@ -4683,13 +4683,13 @@ void summary_print(SummaryView *summaryview)
        if (clist->selection == NULL) return;
 #if !defined(USE_GNOMEPRINT) && !GTK_CHECK_VERSION(2,10,0)
        cmdline = input_dialog(_("Print"),
-                              _("Enter the print command line:\n"
+                              _("Enter the print command-line:\n"
                                 "('%s' will be replaced with file name)"),
                               prefs_common.print_cmd);
        if (!cmdline) return;
        if (!(p = strchr(cmdline, '%')) || *(p + 1) != 's' ||
            strchr(p + 2, '%')) {
-               alertpanel_error(_("Print command line is invalid:\n'%s'"),
+               alertpanel_error(_("Print command-line is invalid:\n'%s'"),
                                 cmdline);
                g_free(cmdline);
                return;
index 54d65ee..645a308 100644 (file)
@@ -2882,7 +2882,7 @@ static void open_image_cb (GtkAction *action, TextView *textview)
                gboolean remember = FALSE;
                cmd = input_dialog_combo_remember
                        (_("Open with"),
-                        _("Enter the command line to open file:\n"
+                        _("Enter the command-line to open file:\n"
                           "('%s' will be replaced with file name)"),
                         prefs_common.mime_open_cmd,
                         prefs_common.mime_open_cmd_history,
@@ -2895,7 +2895,7 @@ static void open_image_cb (GtkAction *action, TextView *textview)
            !strchr(p + 2, '%'))
                g_snprintf(buf, sizeof(buf), cmd, filename);
        else {
-               g_warning("Image viewer command line is invalid: '%s'", cmd);
+               g_warning("Image viewer command-line is invalid: '%s'", cmd);
                return;
        }