2004-11-13 [paul] 0.9.12cvs146.6
authorPaul Mangan <paul@claws-mail.org>
Sat, 13 Nov 2004 08:14:41 +0000 (08:14 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 13 Nov 2004 08:14:41 +0000 (08:14 +0000)
* src/compose.c
* src/imap.c
* src/matcher_parser.h
* src/matcher_parser_parse.y
* src/prefs_filtering.c
* src/prefs_filtering_action.c
* src/prefs_themes.c
* src/prefs_toolbar.c
* src/common/utils.c
various small fixes/cleanups

12 files changed:
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/common/utils.c
src/compose.c
src/imap.c
src/matcher_parser.h
src/matcher_parser_parse.y
src/prefs_filtering.c
src/prefs_filtering_action.c
src/prefs_themes.c
src/prefs_toolbar.c

index dc7626a..cb029bb 100644 (file)
@@ -1,3 +1,16 @@
+2004-11-13 [paul]      0.9.12cvs146.6
+
+       * src/compose.c
+       * src/imap.c
+       * src/matcher_parser.h
+       * src/matcher_parser_parse.y
+       * src/prefs_filtering.c
+       * src/prefs_filtering_action.c
+       * src/prefs_themes.c
+       * src/prefs_toolbar.c
+       * src/common/utils.c
+               various small fixes/cleanups
+
 2004-11-12 [colin]     0.9.12cvs146.5
 
        * src/textview.c
index 82a152c..b793fe3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.96.2.32 -r 1.96.2.33 src/textview.c; ) > 0.9.12cvs146.3.patchset
 ( cvs diff -u -r 1.5.2.2 -r 1.5.2.3 src/exporthtml.c; cvs diff -u -r 1.1.4.2 -r 1.1.4.3 src/exportldif.c; cvs diff -u -r 1.179.2.11 -r 1.179.2.12 src/imap.c; cvs diff -u -r 1.79.2.4 -r 1.79.2.5 src/mh.c; cvs diff -u -r 1.83.2.23 -r 1.83.2.24 src/mimeview.c; cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/prefs_spelling.c; cvs diff -u -r 1.3.2.8 -r 1.3.2.9 src/prefs_themes.c; ) > 0.9.12cvs146.4.patchset
 ( cvs diff -u -r 1.96.2.33 -r 1.96.2.34 src/textview.c; ) > 0.9.12cvs146.5.patchset
+( cvs diff -u -r 1.382.2.62 -r 1.382.2.63 src/compose.c; cvs diff -u -r 1.179.2.12 -r 1.179.2.13 src/imap.c; cvs diff -u -r 1.4.2.2 -r 1.4.2.3 src/matcher_parser.h; cvs diff -u -r 1.25.2.5 -r 1.25.2.6 src/matcher_parser_parse.y; cvs diff -u -r 1.59.2.8 -r 1.59.2.9 src/prefs_filtering.c; cvs diff -u -r 1.1.4.7 -r 1.1.4.8 src/prefs_filtering_action.c; cvs diff -u -r 1.3.2.9 -r 1.3.2.10 src/prefs_themes.c; cvs diff -u -r 1.30.2.5 -r 1.30.2.6 src/prefs_toolbar.c; cvs diff -u -r 1.36.2.14 -r 1.36.2.15 src/common/utils.c; ) > 0.9.12cvs146.6.patchset
index 0b2d476..ae8a1b4 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=146
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.5
+EXTRA_GTK2_VERSION=.6
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 419f8c7..801a455 100644 (file)
@@ -1470,21 +1470,6 @@ GList *uri_list_extract_filenames(const gchar *uri_list)
        return result;
 }
 
-#define HEX_TO_INT(val, hex) \
-{ \
-       gchar c = hex; \
- \
-       if ('0' <= c && c <= '9') { \
-               val = c - '0'; \
-       } else if ('a' <= c && c <= 'f') { \
-               val = c - 'a' + 10; \
-       } else if ('A' <= c && c <= 'F') { \
-               val = c - 'A' + 10; \
-       } else { \
-               val = 0; \
-       } \
-}
-
 /* Converts two-digit hexadecimal to decimal.  Used for unescaping escaped 
  * characters
  */
index 73e6d09..ecdf0ee 100644 (file)
@@ -4109,7 +4109,7 @@ static gchar *compose_get_header(Compose *compose)
        compose_add_headerfield_from_headerlist(compose, header, "Bcc", ", ");
 
        /* Subject */
-       str = gtk_entry_get_text(GTK_ENTRY(compose->subject_entry));
+       str = (gpointer)gtk_entry_get_text(GTK_ENTRY(compose->subject_entry));
        if (*str != '\0' && !IS_IN_CUSTOM_HEADER("Subject")) {
                gchar *tmpstr;
 
@@ -4259,7 +4259,7 @@ static gchar *compose_get_header(Compose *compose)
                g_free(tmp);
                
                entry_str = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
-               Xstrdup_a(headervalue, entry_str, return -1);
+               Xstrdup_a(headervalue, entry_str, return FALSE);
                subst_char(headervalue, '\r', ' ');
                subst_char(headervalue, '\n', ' ');
                string = std_headers;
index 43d022f..f2bea38 100644 (file)
@@ -1368,7 +1368,7 @@ static gint imap_scan_tree_recursive(IMAPSession *session, FolderItem *item)
                        new_item->stype = F_INBOX;
                        folder->inbox = new_item;
                } else if (!folder_item_parent(item) || item->stype == F_INBOX) {
-                       gchar *base;
+                       const gchar *base;
 
                        base = g_basename(new_item->path);
 
index 9b749df..7032870 100644 (file)
@@ -30,9 +30,9 @@ extern int matcher_parserlineno;
 void matcher_parser_start_parsing      (FILE *f);
 int matcher_parserparse                        (void);
 
-MatcherList *matcher_parser_get_cond   (const gchar *str);
-MatcherProp *matcher_parser_get_prop   (const gchar *str);
-FilteringProp *matcher_parser_get_filtering    (const gchar *str);
-GSList *matcher_parser_get_action_list(const gchar *str);
+MatcherList *matcher_parser_get_cond   (gchar *str);
+MatcherProp *matcher_parser_get_prop   (gchar *str);
+FilteringProp *matcher_parser_get_filtering    (gchar *str);
+GSList *matcher_parser_get_action_list(gchar *str);
 
 #endif
index ff42305..7cfa758 100644 (file)
@@ -73,7 +73,7 @@ void matcher_parser_start_parsing(FILE *f)
  
 void * matcher_parser_scan_string(const char * str);
  
-FilteringProp *matcher_parser_get_filtering(const gchar *str)
+FilteringProp *matcher_parser_get_filtering(gchar *str)
 {
        void *bufstate;
 
@@ -111,7 +111,7 @@ static gboolean check_quote_symetry(gchar *str)
        return !(ret % 2);
 }
 
-MatcherList *matcher_parser_get_cond(const gchar *str)
+MatcherList *matcher_parser_get_cond(gchar *str)
 {
        void *bufstate;
 
@@ -133,7 +133,7 @@ MatcherList *matcher_parser_get_cond(const gchar *str)
        return cond;
 }
 
-GSList *matcher_parser_get_action_list(const gchar *str)
+GSList *matcher_parser_get_action_list(gchar *str)
 {
        void *bufstate;
 
@@ -155,7 +155,7 @@ GSList *matcher_parser_get_action_list(const gchar *str)
        return action_list;
 }
 
-MatcherProp *matcher_parser_get_prop(const gchar *str)
+MatcherProp *matcher_parser_get_prop(gchar *str)
 {
        MatcherList *list;
        MatcherProp *prop;
index d28a354..9bf8e01 100644 (file)
@@ -705,10 +705,10 @@ static void prefs_filtering_condition_define_done(MatcherList * matchers)
 
 static void prefs_filtering_condition_define(void)
 {
-       const gchar * cond_str;
+       gchar * cond_str;
        MatcherList * matchers = NULL;
 
-       cond_str = gtk_entry_get_text(GTK_ENTRY(filtering.cond_entry));
+       cond_str = (gpointer)gtk_entry_get_text(GTK_ENTRY(filtering.cond_entry));
 
        if (*cond_str != '\0') {
                matchers = matcher_parser_get_cond(cond_str);
@@ -739,10 +739,10 @@ static void prefs_filtering_action_define_done(GSList * action_list)
 
 static void prefs_filtering_action_define(void)
 {
-       const gchar * action_str;
+       gchar * action_str;
        GSList * action_list = NULL;
 
-       action_str = gtk_entry_get_text(GTK_ENTRY(filtering.action_entry));
+       action_str = (gpointer)gtk_entry_get_text(GTK_ENTRY(filtering.action_entry));
 
        if (*action_str != '\0') {
                action_list = matcher_parser_get_action_list(action_str);
@@ -768,31 +768,31 @@ static void prefs_filtering_action_define(void)
 static FilteringProp * prefs_filtering_dialog_to_filtering(gboolean alert)
 {
        MatcherList * cond;
-       const gchar * cond_str;
-       const gchar * action_str;
+       gchar * cond_str;
+       gchar * action_str;
        FilteringProp * prop;
        GSList * action_list;
 
-       cond_str = gtk_entry_get_text(GTK_ENTRY(filtering.cond_entry));
+       cond_str = (gpointer)gtk_entry_get_text(GTK_ENTRY(filtering.cond_entry));
        if (*cond_str == '\0') {
                if(alert == TRUE) alertpanel_error(_("Condition string is empty."));
                return NULL;
        }
 
-       action_str = gtk_entry_get_text(GTK_ENTRY(filtering.action_entry));
+       action_str = (gpointer)gtk_entry_get_text(GTK_ENTRY(filtering.action_entry));
        if (*action_str == '\0') {
                if(alert == TRUE) alertpanel_error(_("Action string is empty."));
                return NULL;
        }
 
-       cond = matcher_parser_get_cond(cond_str);
+       cond = (gpointer)matcher_parser_get_cond(cond_str);
 
        if (cond == NULL) {
                if(alert == TRUE) alertpanel_error(_("Condition string is not valid."));
                return NULL;
        }
         
-        action_list = matcher_parser_get_action_list(action_str);
+        action_list = (gpointer)matcher_parser_get_action_list(action_str);
 
        if (action_list == NULL) {
                if(alert == TRUE) alertpanel_error(_("Action string is not valid."));
index 54e2c64..2557114 100644 (file)
@@ -737,7 +737,7 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
        gint action_type;
        gint list_id;
        gint account_id;
-       const gchar * destination;
+       gchar * destination;
        gint labelcolor = 0;
         FilteringAction * action;
         gchar * score_str;
@@ -754,7 +754,8 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
        case ACTION_MOVE:
        case ACTION_COPY:
        case ACTION_EXECUTE:
-               destination = gtk_entry_get_text(GTK_ENTRY(filtering_action.dest_entry));
+               destination = (gpointer)gtk_entry_get_text(
+                               GTK_ENTRY(filtering_action.dest_entry));
                if (*destination == '\0') {
                        if (alert)
                                 alertpanel_error(action_id == ACTION_EXECUTE 
@@ -766,7 +767,8 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
        case ACTION_FORWARD:
        case ACTION_FORWARD_AS_ATTACHMENT:
        case ACTION_REDIRECT:
-               destination = gtk_entry_get_text(GTK_ENTRY(filtering_action.dest_entry));
+               destination = (gpointer)gtk_entry_get_text(
+                               GTK_ENTRY(filtering_action.dest_entry));
                if (*destination == '\0') {
                        if (alert)
                                 alertpanel_error(_("Recipient is not set."));
@@ -780,7 +782,7 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
                break;
         case ACTION_CHANGE_SCORE:
         case ACTION_SET_SCORE:
-               score_str = gtk_entry_get_text(GTK_ENTRY(filtering_action.dest_entry));
+               score_str = (gpointer)gtk_entry_get_text(GTK_ENTRY(filtering_action.dest_entry));
                if (*score_str == '\0') {
                        if (alert)
                                 alertpanel_error(_("Score is not set"));
index de6204c..c2198b5 100644 (file)
@@ -178,7 +178,7 @@ static void prefs_themes_file_stats(const gchar *filename, gpointer data)
 static void prefs_themes_file_remove(const gchar *filename, gpointer data)
 {
        gchar **status = (gchar **)data;
-       gchar *name;
+       const gchar *name;
        
        if ((*status) != NULL)
                return;
@@ -196,7 +196,7 @@ static void prefs_themes_file_remove(const gchar *filename, gpointer data)
 static void prefs_themes_file_install(const gchar *filename, gpointer data)
 {
        CopyInfo *ci = (CopyInfo *)data;
-       gchar *name;
+       const gchar *name;
        
        if (ci->status != NULL)
                return;
@@ -307,7 +307,7 @@ static void prefs_themes_get_themes_and_names(ThemesData *tdata)
        tpaths = tdata->themes;
        while (tpaths != NULL) {
                ThemeName *name = g_new0(ThemeName, 1);
-               gchar     *sname = g_basename((gchar *)(tpaths->data));
+               const gchar *sname = g_basename((gchar *)(tpaths->data));
                
                if (IS_INTERNAL_THEME(sname))
                        name->name = g_strdup(_("Default internal theme"));
@@ -453,7 +453,8 @@ static void prefs_themes_btn_remove_clicked_cb(GtkWidget *widget, gpointer data)
 static void prefs_themes_btn_install_clicked_cb(GtkWidget *widget, gpointer data)
 {
        gchar      *filename, *source;
-       gchar      *themeinfo, *themename;
+       gchar      *themeinfo;
+       const gchar *themename;
        gchar      *alert_title = NULL;
        CopyInfo   *cinfo;
        AlertValue  val = 0;
index 5a70710..8969135 100644 (file)
@@ -398,7 +398,7 @@ static void prefs_toolbar_register(GtkButton *button, ToolbarPage *prefs_toolbar
 
                if (g_utf8_collate(item[3], syl_act) == 0) {
 
-                       const gchar *entry = gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_syl_entry));
+                       gchar *entry = (gpointer)gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_syl_entry));
                        get_action_name(entry, &item[2]);
                }
                else {
@@ -469,7 +469,7 @@ static void prefs_toolbar_substitute(GtkButton *button, ToolbarPage *prefs_toolb
 
                if (g_utf8_collate(item[3], syl_act) == 0) {
 
-                       const gchar *entry = gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_syl_entry));
+                       gchar *entry = (gpointer)gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->combo_syl_entry));
                        get_action_name(entry, &item[2]);
                } else {
                        item[2] = g_strdup(gtk_entry_get_text(GTK_ENTRY(prefs_toolbar->entry_icon_text)));