2008-08-05 [colin] 3.5.0cvs50
authorColin Leroy <colin@colino.net>
Tue, 5 Aug 2008 16:41:06 +0000 (16:41 +0000)
committerColin Leroy <colin@colino.net>
Tue, 5 Aug 2008 16:41:06 +0000 (16:41 +0000)
* src/action.c
* src/addr_compl.c
* src/addrbook.c
* src/addrcindex.c
* src/addrduplicates.c
* src/addrharvest.c
* src/enriched.c
* src/html.c
* src/ldif.c
* src/main.c
* src/mimeview.c
* src/mutt.c
* src/pine.c
* src/procmime.c
* src/vcard.c
* src/wizard.c
* src/common/socket.c
* src/gtk/gtkutils.c
* src/gtk/gtkutils.h
* src/gtk/menu.c
* src/plugins/spamassassin/spamassassin.c
More undeprecation (Glib)

24 files changed:
ChangeLog
PATCHSETS
configure.ac
src/action.c
src/addr_compl.c
src/addrbook.c
src/addrcindex.c
src/addrduplicates.c
src/addrharvest.c
src/common/socket.c
src/enriched.c
src/gtk/gtkutils.c
src/gtk/gtkutils.h
src/gtk/menu.c
src/html.c
src/ldif.c
src/main.c
src/mimeview.c
src/mutt.c
src/pine.c
src/plugins/spamassassin/spamassassin.c
src/procmime.c
src/vcard.c
src/wizard.c

index b6c6712..d81b993 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2008-08-05 [colin]     3.5.0cvs50
+
+       * src/action.c
+       * src/addr_compl.c
+       * src/addrbook.c
+       * src/addrcindex.c
+       * src/addrduplicates.c
+       * src/addrharvest.c
+       * src/enriched.c
+       * src/html.c
+       * src/ldif.c
+       * src/main.c
+       * src/mimeview.c
+       * src/mutt.c
+       * src/pine.c
+       * src/procmime.c
+       * src/vcard.c
+       * src/wizard.c
+       * src/common/socket.c
+       * src/gtk/gtkutils.c
+       * src/gtk/gtkutils.h
+       * src/gtk/menu.c
+       * src/plugins/spamassassin/spamassassin.c
+               More undeprecation (Glib)
+
 2008-08-05 [colin]     3.5.0cvs49
 
        * src/prefs_account.c
index ae444cb..7c38d63 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.462 -r 1.382.2.463 src/compose.c;  cvs diff -u -r 1.50.2.48 -r 1.50.2.49 src/compose.h;  cvs diff -u -r 1.19.2.27 -r 1.19.2.28 src/toolbar.h;  cvs diff -u -r 1.96.2.203 -r 1.96.2.204 src/textview.c;  cvs diff -u -r 1.25.2.58 -r 1.25.2.59 src/stock_pixmap.c;  cvs diff -u -r 1.5.2.21 -r 1.5.2.22 src/statusbar.c;  cvs diff -u -r 1.3.8.8 -r 1.3.8.9 src/noticeview.h;  cvs diff -u -r 1.20.2.25 -r 1.20.2.26 src/mimeview.h;  cvs diff -u -r 1.274.2.262 -r 1.274.2.263 src/mainwindow.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/image_viewer.c;  cvs diff -u -r 1.9.2.57 -r 1.9.2.58 src/gtk/gtkaspell.c;  cvs diff -u -r 1.5.2.13 -r 1.5.2.14 src/gtk/gtkvscrollbutton.c;  cvs diff -u -r 1.12.2.26 -r 1.12.2.27 src/plugins/dillo_viewer/dillo_viewer.c;  ) > 3.5.0cvs47.patchset
 ( cvs diff -u -r 1.9.2.23 -r 1.9.2.24 src/addressadd.c;  cvs diff -u -r 1.60.2.122 -r 1.60.2.123 src/addressbook.c;  cvs diff -u -r 1.1.2.11 -r 1.1.2.12 src/addressbook_foldersel.c;  cvs diff -u -r 1.5.2.10 -r 1.5.2.11 src/addressitem.h;  cvs diff -u -r 1.5.10.24 -r 1.5.10.25 src/addrgather.c;  cvs diff -u -r 1.2.4.20 -r 1.2.4.21 src/browseldap.c;  cvs diff -u -r 1.382.2.462 -r 1.382.2.463 src/compose.c;  cvs diff -u -r 1.50.2.48 -r 1.50.2.49 src/compose.h;  cvs diff -u -r 1.14.2.51 -r 1.14.2.52 src/editaddress.c;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/editaddress_other_attributes_ldap.c;  cvs diff -u -r 1.11.2.19 -r 1.11.2.20 src/editgroup.c;  cvs diff -u -r 1.10.2.13 -r 1.10.2.14 src/editldap_basedn.c;  cvs diff -u -r 1.207.2.204 -r 1.207.2.205 src/folderview.c;  cvs diff -u -r 1.20.2.23 -r 1.20.2.24 src/folderview.h;  cvs diff -u -r 1.14.2.20 -r 1.14.2.21 src/grouplistdialog.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/image_viewer.c;  cvs diff -u -r 1.1.2.60 -r 1.1.2.61 src/imap_gtk.c;  cvs diff -u -r 1.14.2.18 -r 1.14.2.19 src/importldif.c;  cvs diff -u -r 1.115.2.200 -r 1.115.2.201 src/main.c;  cvs diff -u -r 1.274.2.262 -r 1.274.2.263 src/mainwindow.c;  cvs diff -u -r 1.3.12.30 -r 1.3.12.31 src/message_search.c;  cvs diff -u -r 1.2.2.33 -r 1.2.2.34 src/mh_gtk.c;  cvs diff -u -r 1.83.2.138 -r 1.83.2.139 src/mimeview.c;  cvs diff -u -r 1.20.2.25 -r 1.20.2.26 src/mimeview.h;  cvs diff -u -r 1.2.2.28 -r 1.2.2.29 src/news_gtk.c;  cvs diff -u -r 1.3.8.8 -r 1.3.8.9 src/noticeview.h;  cvs diff -u -r 1.105.2.139 -r 1.105.2.140 src/prefs_account.c;  cvs diff -u -r 1.1.4.53 -r 1.1.4.54 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.73 -r 1.43.2.74 src/prefs_matcher.c;  cvs diff -u -r 1.1.2.37 -r 1.1.2.38 src/prefs_msg_colors.c;  cvs diff -u -r 1.1.2.56 -r 1.1.2.57 src/prefs_summaries.c;  cvs diff -u -r 1.5.2.21 -r 1.5.2.22 src/statusbar.c;  cvs diff -u -r 1.25.2.58 -r 1.25.2.59 src/stock_pixmap.c;  cvs diff -u -r 1.15.2.54 -r 1.15.2.55 src/summary_search.c;  cvs diff -u -r 1.395.2.379 -r 1.395.2.380 src/summaryview.c;  cvs diff -u -r 1.68.2.48 -r 1.68.2.49 src/summaryview.h;  cvs diff -u -r 1.96.2.203 -r 1.96.2.204 src/textview.c;  cvs diff -u -r 1.19.2.27 -r 1.19.2.28 src/toolbar.h;  cvs diff -u -r 1.20.2.16 -r 1.20.2.17 src/gtk/Makefile.am;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/claws-marshal.list;  cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/gtk/colorsel.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/gtk/foldersort.c;  cvs diff -u -r 1.9.2.57 -r 1.9.2.58 src/gtk/gtkaspell.c;  diff -u /dev/null src/gtk/gtkcmclist.c;  diff -u /dev/null src/gtk/gtkcmclist.h;  diff -u /dev/null src/gtk/gtkcmctree.c;  diff -u /dev/null src/gtk/gtkcmctree.h;  cvs diff -u -r 1.1.4.46 -r 1.1.4.47 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.4.13 -r 1.1.4.14 src/gtk/gtksctree.h;  cvs diff -u -r 1.5.2.78 -r 1.5.2.79 src/gtk/gtkutils.c;  cvs diff -u -r 1.4.2.42 -r 1.4.2.43 src/gtk/gtkutils.h;  cvs diff -u -r 1.5.2.13 -r 1.5.2.14 src/gtk/gtkvscrollbutton.c;  cvs diff -u -r 1.5.2.34 -r 1.5.2.35 src/gtk/menu.c;  cvs diff -u -r 1.4.2.19 -r 1.4.2.20 src/gtk/menu.h;  cvs diff -u -r 1.1.2.83 -r 1.1.2.84 src/gtk/quicksearch.c;  cvs diff -u -r 1.12.2.26 -r 1.12.2.27 src/plugins/dillo_viewer/dillo_viewer.c;  cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/plugins/pgpcore/select-keys.c;  ) > 3.5.0cvs48.patchset
 ( cvs diff -u -r 1.105.2.140 -r 1.105.2.141 src/prefs_account.c;  cvs diff -u -r 1.1.4.54 -r 1.1.4.55 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.74 -r 1.43.2.75 src/prefs_matcher.c;  cvs diff -u -r 1.20.2.16 -r 1.20.2.17 src/gtk/Makefile.am;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/claws-marshal.list;  cvs diff -u -r 1.2.2.21 -r 1.2.2.22 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/gtk/colorsel.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/gtk/foldersort.c;  cvs diff -u -r 1.9.2.57 -r 1.9.2.58 src/gtk/gtkaspell.c;  diff -u /dev/null src/gtk/gtkcmclist.c;  diff -u /dev/null src/gtk/gtkcmclist.h;  diff -u /dev/null src/gtk/gtkcmctree.c;  diff -u /dev/null src/gtk/gtkcmctree.h;  diff -u /dev/null src/gtk/gtkcmoptionmenu.c;  diff -u /dev/null src/gtk/gtkcmoptionmenu.h;  cvs diff -u -r 1.1.4.46 -r 1.1.4.47 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.4.13 -r 1.1.4.14 src/gtk/gtksctree.h;  cvs diff -u -r 1.5.2.78 -r 1.5.2.79 src/gtk/gtkutils.c;  cvs diff -u -r 1.4.2.42 -r 1.4.2.43 src/gtk/gtkutils.h;  cvs diff -u -r 1.5.2.13 -r 1.5.2.14 src/gtk/gtkvscrollbutton.c;  cvs diff -u -r 1.5.2.34 -r 1.5.2.35 src/gtk/menu.c;  cvs diff -u -r 1.4.2.19 -r 1.4.2.20 src/gtk/menu.h;  cvs diff -u -r 1.1.2.83 -r 1.1.2.84 src/gtk/quicksearch.c;  cvs diff -u -r 1.12.2.26 -r 1.12.2.27 src/plugins/dillo_viewer/dillo_viewer.c;  cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/plugins/pgpcore/select-keys.c;  ) > 3.5.0cvs49.patchset
+( cvs diff -u -r 1.12.2.53 -r 1.12.2.54 src/action.c;  cvs diff -u -r 1.27.2.41 -r 1.27.2.42 src/addr_compl.c;  cvs diff -u -r 1.22.2.18 -r 1.22.2.19 src/addrbook.c;  cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/addrcindex.c;  cvs diff -u -r 1.1.2.11 -r 1.1.2.12 src/addrduplicates.c;  cvs diff -u -r 1.6.10.16 -r 1.6.10.17 src/addrharvest.c;  cvs diff -u -r 1.3.2.4 -r 1.3.2.5 src/enriched.c;  cvs diff -u -r 1.12.2.23 -r 1.12.2.24 src/html.c;  cvs diff -u -r 1.12.2.16 -r 1.12.2.17 src/ldif.c;  cvs diff -u -r 1.115.2.201 -r 1.115.2.202 src/main.c;  cvs diff -u -r 1.83.2.139 -r 1.83.2.140 src/mimeview.c;  cvs diff -u -r 1.6.10.13 -r 1.6.10.14 src/mutt.c;  cvs diff -u -r 1.6.2.12 -r 1.6.2.13 src/pine.c;  cvs diff -u -r 1.49.2.109 -r 1.49.2.110 src/procmime.c;  cvs diff -u -r 1.14.2.14 -r 1.14.2.15 src/vcard.c;  cvs diff -u -r 1.1.2.71 -r 1.1.2.72 src/wizard.c;  cvs diff -u -r 1.13.2.37 -r 1.13.2.38 src/common/socket.c;  cvs diff -u -r 1.5.2.79 -r 1.5.2.80 src/gtk/gtkutils.c;  cvs diff -u -r 1.4.2.43 -r 1.4.2.44 src/gtk/gtkutils.h;  cvs diff -u -r 1.5.2.35 -r 1.5.2.36 src/gtk/menu.c;  cvs diff -u -r 1.18.2.60 -r 1.18.2.61 src/plugins/spamassassin/spamassassin.c;  ) > 3.5.0cvs50.patchset
index 4e6fc0c..6b34b05 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=49
+EXTRA_VERSION=50
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -144,7 +144,7 @@ fi
 CFLAGS="$CFLAGS -Wall"
 
 if test $USE_MAINTAINER_MODE = yes; then
-       CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
+       CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
 fi
 
 pthread_name=
index d8711eb..262cc9e 100644 (file)
@@ -890,7 +890,7 @@ static gboolean execute_actions(gchar *action, GSList *msg_list,
                        child_info->callback = callback;
                        child_info->data = data;
                        child_info->tag_status = 
-                               gdk_input_add(child_info->chld_status,
+                               claws_input_add(child_info->chld_status,
                                              GDK_INPUT_READ,
                                              catch_status, child_info);
                }
@@ -1051,9 +1051,9 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str,
        child_info->chld_err    = chld_err[0];
        child_info->chld_status = chld_status[0];
        child_info->tag_in      = -1;
-       child_info->tag_out     = gdk_input_add(chld_out[0], GDK_INPUT_READ,
+       child_info->tag_out     = claws_input_add(chld_out[0], GDK_INPUT_READ,
                                                catch_output, child_info);
-       child_info->tag_err     = gdk_input_add(chld_err[0], GDK_INPUT_READ,
+       child_info->tag_err     = claws_input_add(chld_err[0], GDK_INPUT_READ,
                                                catch_output, child_info);
 
        if (!(children->action_type &
@@ -1137,7 +1137,7 @@ static void send_input(GtkWidget *w, gpointer data)
        Children *children = (Children *) data;
        ChildInfo *child_info = (ChildInfo *) children->list->data;
 
-       child_info->tag_in = gdk_input_add(child_info->chld_in,
+       child_info->tag_in = claws_input_add(child_info->chld_in,
                                           GDK_INPUT_WRITE,
                                           catch_input, children);
 }
@@ -1180,11 +1180,11 @@ static void childinfo_close_pipes(ChildInfo *child_info)
         * them if necessary
         */
        if (child_info->tag_in > 0)
-               gdk_input_remove(child_info->tag_in);
+               g_source_remove(child_info->tag_in);
        if (child_info->tag_out > 0)
-               gdk_input_remove(child_info->tag_out);
+               g_source_remove(child_info->tag_out);
        if (child_info->tag_err > 0)
-               gdk_input_remove(child_info->tag_err);
+               g_source_remove(child_info->tag_err);
 
        if (child_info->chld_in >= 0)
                (void)close(child_info->chld_in);
@@ -1430,7 +1430,7 @@ static void catch_status(gpointer data, gint source, GdkInputCondition cond)
        gchar buf;
        gint c;
 
-       gdk_input_remove(child_info->tag_status);
+       g_source_remove(child_info->tag_status);
 
        c = read(source, &buf, 1);
        debug_print("Child returned %c\n", buf);
@@ -1504,7 +1504,7 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
        gtk_widget_set_sensitive(children->input_hbox, FALSE);
        gtk_widget_grab_focus(children->abort_btn);
 
-       gdk_input_remove(child_info->tag_in);
+       g_source_remove(child_info->tag_in);
        child_info->tag_in = -1;
 
        input = gtk_editable_get_chars(GTK_EDITABLE(children->input_entry),
@@ -1603,12 +1603,12 @@ static void catch_output(gpointer data, gint source, GdkInputCondition cond)
        }
        if (c == 0) {
                if (source == child_info->chld_out) {
-                       gdk_input_remove(child_info->tag_out);
+                       g_source_remove(child_info->tag_out);
                        child_info->tag_out = -1;
                        (void)close(child_info->chld_out);
                        child_info->chld_out = -1;
                } else {
-                       gdk_input_remove(child_info->tag_err);
+                       g_source_remove(child_info->tag_err);
                        child_info->tag_err = -1;
                        (void)close(child_info->chld_err);
                        child_info->chld_err = -1;
index de71e4f..63f00e8 100644 (file)
@@ -118,7 +118,7 @@ static GSList          *g_completion_addresses;     /* unique addresses found in the
                                                   completion cache. */
 static gchar      *g_completion_prefix;        /* last prefix. (this is cached here
                                                 * because the prefix passed to g_completion
-                                                * is g_strdown()'ed */
+                                                * is g_utf8_strdown()'ed */
 
 static gchar *completion_folder_path = NULL;
 
@@ -1348,7 +1348,7 @@ static void address_completion_create_completion_window( GtkEntry *entry_ )
                GTK_SHADOW_OUT);
        /* Use entry widget to create initial window */
        gdk_window_get_geometry(entry->window, &x, &y, &width, &height, &depth);
-       gdk_window_get_deskrelative_origin (entry->window, &x, &y);
+       gdk_window_get_origin (entry->window, &x, &y);
        y += height;
        gtk_window_move(GTK_WINDOW(window), x, y);
 
index c70e6bf..60f386c 100644 (file)
@@ -1425,7 +1425,7 @@ void addrbook_update_address_list(AddressBookFile *book, ItemPerson *person,
                        ItemEMail *email = node->data;
                        gchar *addr = g_strdup(email->address);
                        gchar *alias = email->obj.name ;
-                       g_strdown(addr);
+                       g_utf8_strdown(addr, -1);
                        if (!g_hash_table_lookup(hashEMail, addr)) {
                                g_hash_table_insert(hashEMail, addr, email);
                        }
@@ -1454,7 +1454,7 @@ void addrbook_update_address_list(AddressBookFile *book, ItemPerson *person,
                                        ItemEMail *emailNew = NULL;
                                        gchar *addr = g_strdup(emailGrp->address);
                                        gchar *alias = emailGrp->obj.name;
-                                       g_strdown(addr);
+                                       g_utf8_strdown(addr, -1);
                                        emailNew = (ItemEMail *)
                                                g_hash_table_lookup(hashEMail, addr);
                                        g_free( addr );
index 55f2469..49fc1aa 100644 (file)
@@ -129,7 +129,7 @@ void addrcindex_add_entry(
        entry = g_new0( AddrIndexEntry, 1 );
        entry->name = g_strdup( name );
        entry->address = email;
-       g_strdown( entry->name );
+       g_utf8_strdown( entry->name, -1 );
        index->addressList = g_list_append( index->addressList, entry );
 }
 
@@ -357,7 +357,7 @@ GList *addrcindex_search( AddrCacheIndex *index, const gchar *search ) {
 
                /* Perform the search */
                prefix = g_strdup( search );
-               g_strdown( prefix );
+               g_utf8_strdown( prefix, -1 );
                list = g_completion_complete( index->completion, prefix, NULL );
                g_free( prefix );
 
index 0934ac6..1223410 100644 (file)
@@ -279,7 +279,7 @@ static gint collect_emails(ItemPerson *itemperson, AddressDataSource *ds)
                ItemEMail *email = nodeM->data;
 
                addr = g_strdup(email->address);
-               g_strdown(addr);
+               g_utf8_strdown(addr, -1);
                old_val = g_hash_table_lookup(addr_hash, addr);
                if(old_val)
                        new_val = deep_copy_hash_val(old_val);
index 9d23601..890a84f 100644 (file)
@@ -300,7 +300,7 @@ static void addrharvest_insert_cache(
 
        /* Insert address */
        key = g_strdup( address );
-       g_strdown( key );
+       g_utf8_strdown( key, -1 );
        person = g_hash_table_lookup( harvester->dupTable, key );
        if( person ) {
                /* Update existing person to use longest name */
@@ -808,7 +808,7 @@ gint addrharvest_harvest(
                        gchar *p;
 
                        p = g_strdup( entry->header );
-                       g_strdown( p );
+                       g_utf8_strdown( p, -1 );
                        listHdr = g_list_append( listHdr, p );
                }
                node = g_list_next( node );
index adefb2f..3203b1d 100644 (file)
@@ -842,7 +842,10 @@ gint sock_connect_async_cancel(gint id)
                if (conn_data->io_tag > 0)
                        g_source_remove(conn_data->io_tag);
                if (conn_data->channel) {
-                       g_io_channel_close(conn_data->channel);
+                       GError *err = NULL;
+                       g_io_channel_shutdown(conn_data->channel, TRUE, &err);
+                       if (err)
+                               g_error_free(err);
                        g_io_channel_unref(conn_data->channel);
                }
 
@@ -918,21 +921,38 @@ static gboolean sock_get_address_info_async_cb(GIOChannel *source,
        struct sockaddr *addr;
        gchar *canonical_name = NULL;
        gchar len = 0;
-
-       if (g_io_channel_read(source, &len, sizeof(len),
-                             &bytes_read) == G_IO_ERROR_NONE) {
+       GError *err = NULL;
+       
+       g_io_channel_set_encoding(source, NULL, &err);
+       if (err) {
+               g_warning("can unset encoding: %s\n", err->message);
+               g_error_free(err);
+               return FALSE;
+       }
+       g_io_channel_set_buffered(source, FALSE);
+       if (g_io_channel_read_chars(source, &len, sizeof(len),
+                             &bytes_read, &err) == G_IO_STATUS_NORMAL) {
+               if (err != NULL) {
+                       g_warning("g_io_channel_read_chars: %s\n", err->message);
+                       g_error_free(err);
+                       return FALSE;
+               } 
                if (bytes_read == sizeof(len) && len > 0) {
                        gchar *cur = NULL;
                        gint todo = len;
                        canonical_name = g_malloc0(len + 1);
                        cur = canonical_name;
                        while (todo > 0) {
-                               if (g_io_channel_read(source, cur, todo,
-                                     &bytes_read) != G_IO_ERROR_NONE) {
-                                     g_warning("canonical name not read\n");
-                                     g_free(canonical_name);
-                                     canonical_name = NULL;
-                                     break;
+                               if (g_io_channel_read_chars(source, cur, todo,
+                                     &bytes_read, &err) != G_IO_STATUS_NORMAL) {
+                                       if (err) {
+                                             g_warning("canonical name not read %s\n", err->message);
+                                             g_free(canonical_name);
+                                             canonical_name = NULL;
+                                             g_error_free(err);
+                                             err = NULL;
+                                             break;
+                                       }
                                } else {
                                        cur += bytes_read;
                                        todo -= bytes_read;
@@ -947,12 +967,15 @@ static gboolean sock_get_address_info_async_cb(GIOChannel *source,
                }             
        }
        for (;;) {
-               if (g_io_channel_read(source, (gchar *)ai_member,
-                                     sizeof(ai_member), &bytes_read)
-                   != G_IO_ERROR_NONE) {
-                       g_warning("sock_get_address_info_async_cb: "
-                                 "address length read error\n");
-                       break;
+               if (g_io_channel_read_chars(source, (gchar *)ai_member,
+                                     sizeof(ai_member), &bytes_read, &err) 
+                   != G_IO_STATUS_NORMAL) {
+                       if (err != NULL) {
+                               g_warning("g_io_channel_read_chars: addr len %s\n", err->message);
+                               g_error_free(err);
+                               err = NULL;
+                               break;
+                       } 
                }
 
                if (bytes_read == 0 || bytes_read != sizeof(ai_member))
@@ -964,13 +987,16 @@ static gboolean sock_get_address_info_async_cb(GIOChannel *source,
                }
 
                addr = g_malloc(ai_member[3]);
-               if (g_io_channel_read(source, (gchar *)addr, ai_member[3],
-                                     &bytes_read)
-                   != G_IO_ERROR_NONE) {
-                       g_warning("sock_get_address_info_async_cb: "
-                                 "address data read error\n");
-                       g_free(addr);
-                       break;
+               if (g_io_channel_read_chars(source, (gchar *)addr, ai_member[3],
+                                     &bytes_read, &err) 
+                   != G_IO_STATUS_NORMAL) {
+                       if (err != NULL) {
+                               g_warning("g_io_channel_read_chars: addr data read %s\n", err->message);
+                               g_error_free(err);
+                               err = NULL;
+                               g_free(addr);
+                               break;
+                       } 
                }
 
                if (bytes_read != ai_member[3]) {
@@ -990,7 +1016,9 @@ static gboolean sock_get_address_info_async_cb(GIOChannel *source,
                addr_list = g_list_append(addr_list, addr_data);
        }
 
-       g_io_channel_close(source);
+       g_io_channel_shutdown(source, TRUE, &err);
+       if (err)
+               g_error_free(err);
        g_io_channel_unref(source);
 
 #ifdef G_OS_WIN32
@@ -1211,7 +1239,11 @@ static gint sock_get_address_info_async_cancel(SockLookupData *lookup_data)
        if (lookup_data->io_tag > 0)
                g_source_remove(lookup_data->io_tag);
        if (lookup_data->channel) {
-               g_io_channel_close(lookup_data->channel);
+               GError *err = NULL;
+               g_io_channel_shutdown(lookup_data->channel, TRUE, &err);
+               if (err)
+                       g_error_free(err);
+
                g_io_channel_unref(lookup_data->channel);
        }
 
index cbb4bba..4b49ece 100644 (file)
@@ -179,7 +179,7 @@ static ERTFState ertf_parse_tag(ERTFParser *parser)
        parser->state = ERTF_UNKNOWN;
        if (buf[0] == '\0') return parser->state;
 
-       g_strdown (buf);
+       g_utf8_strdown (buf, -1);
 
        if (!strcmp(buf, "nofill")) {
                parser->pre   = TRUE;
index e390fa1..d8cd621 100644 (file)
@@ -1587,3 +1587,82 @@ GtkUIManager *gtkut_ui_manager(void)
        return gui_manager;
 }
 
+#ifdef G_OS_UNIX
+#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
+#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
+#define EXCEPTION_CONDITION (G_IO_PRI)
+typedef struct _ClawsIOClosure ClawsIOClosure;
+
+struct _ClawsIOClosure
+{
+  GdkInputFunction function;
+  GdkInputCondition condition;
+  GdkDestroyNotify notify;
+  gpointer data;
+};
+
+static gboolean  
+claws_io_invoke (GIOChannel   *source,
+              GIOCondition  condition,
+              gpointer      data)
+{
+  ClawsIOClosure *closure = data;
+  GdkInputCondition gdk_cond = 0;
+
+  if (condition & READ_CONDITION)
+    gdk_cond |= GDK_INPUT_READ;
+  if (condition & WRITE_CONDITION)
+    gdk_cond |= GDK_INPUT_WRITE;
+  if (condition & EXCEPTION_CONDITION)
+    gdk_cond |= GDK_INPUT_EXCEPTION;
+
+  if (closure->condition & gdk_cond)
+    closure->function (closure->data, g_io_channel_unix_get_fd (source), gdk_cond);
+
+  return TRUE;
+}
+
+static void
+claws_io_destroy (gpointer data)
+{
+  ClawsIOClosure *closure = data;
+
+  if (closure->notify)
+    closure->notify (closure->data);
+
+  g_free (closure);
+}
+
+gint
+claws_input_add    (gint             source,
+                   GdkInputCondition condition,
+                   GdkInputFunction  function,
+                   gpointer          data)
+{
+  guint result;
+  ClawsIOClosure *closure = g_new (ClawsIOClosure, 1);
+  GIOChannel *channel;
+  GIOCondition cond = 0;
+
+  closure->function = function;
+  closure->condition = condition;
+  closure->notify = NULL;
+  closure->data = data;
+
+  if (condition & GDK_INPUT_READ)
+    cond |= READ_CONDITION;
+  if (condition & GDK_INPUT_WRITE)
+    cond |= WRITE_CONDITION;
+  if (condition & GDK_INPUT_EXCEPTION)
+    cond |= EXCEPTION_CONDITION;
+
+  channel = g_io_channel_unix_new (source);
+  result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond, 
+                               claws_io_invoke,
+                               closure, claws_io_destroy);
+  g_io_channel_unref (channel);
+
+  return result;
+}
+
+#endif
index f3aa732..1c829f5 100644 (file)
@@ -210,6 +210,13 @@ gboolean gtkut_list_view_select_row(GtkWidget *list, gint row);
 GtkUIManager *gtkut_create_ui_manager(void);
 GtkUIManager *gtkut_ui_manager(void);
 
+#ifdef G_OS_UNIX
+gint
+claws_input_add    (gint             source,
+                   GdkInputCondition condition,
+                   GdkInputFunction  function,
+                   gpointer          data);
+#endif
 #if GTK_CHECK_VERSION(2,12,0)
 #define CLAWS_TIP_DECL() {}
 #define CLAWS_SET_TIP(widget,tip) {                                    \
index eb2411d..a5bf937 100644 (file)
@@ -39,8 +39,9 @@
 #include <gtk/gtkmain.h>
 #endif
 
+#if 0 /* FIXME */
 static void connect_accel_change_signals(GtkWidget* widget, GtkWidget *wid2) ;
-
+#endif
 
 GtkActionGroup *cm_menu_create_action_group(const gchar *name, GtkActionEntry *entries,
                                            gint num_entries, gpointer data)
@@ -193,15 +194,15 @@ gint menu_find_option_menu_index(GtkCMOptionMenu *optmenu, gpointer data,
        return -1;
 }
 
+#if 0
 static void connect_accel_change_signals(GtkWidget* widget, GtkWidget *wid2) 
 {
-#if 0
        g_signal_connect_after(G_OBJECT(widget), "add_accelerator", 
                               G_CALLBACK(menu_item_add_accel), wid2);
        g_signal_connect_after(G_OBJECT(widget), "remove_accelerator", 
                               G_CALLBACK(menu_item_remove_accel), wid2);
-#endif
 }
+#endif
 
 void menu_connect_identical_items(void)
 {
index 46f7414..dc9e3ad 100644 (file)
@@ -531,12 +531,12 @@ static SC_HTMLTag *sc_html_get_tag(const gchar *str)
                ;
 
        if (*tmpp == '\0') {
-               g_strdown(tmp);
+               g_utf8_strdown(tmp, -1);
                tag->name = g_strdup(tmp);
                return tag;
        } else {
                *tmpp++ = '\0';
-               g_strdown(tmp);
+               g_utf8_strdown(tmp, -1);
                tag->name = g_strdup(tmp);
        }
 
@@ -585,7 +585,7 @@ static SC_HTMLTag *sc_html_get_tag(const gchar *str)
                        attr_value = "";
 
                g_strchomp(attr_name);
-               g_strdown(attr_name);
+               g_utf8_strdown(attr_name, -1);
                attr = g_new(SC_HTMLAttr, 1);
                attr->name = g_strdup(attr_name);
                attr->value = g_strdup(attr_value);
index b3c45f0..5ec8593 100644 (file)
@@ -314,7 +314,7 @@ static gchar *ldif_get_tagname( char* line, gboolean *flag64 ) {
 
                        tag = g_strndup( line, len+1 );
                        tag[ len ] = '\0';
-                       g_strdown( tag );
+                       g_utf8_strdown( tag, -1 );
                        return tag;
                }
        }
@@ -526,7 +526,7 @@ static void ldif_add_value(
        gchar *nm, *val;
 
        nm = g_strdup( tagName );
-       g_strdown( nm );
+       g_utf8_strdown( nm, -1 );
        if( tagValue ) {
                val = g_strdup( tagValue );
        }
index e6fe315..dbdc4a3 100644 (file)
@@ -1151,7 +1151,6 @@ int main(int argc, char *argv[])
        hildon_program = HILDON_PROGRAM(hildon_program_get_instance());
        static_osso_context = osso_context;
 #endif 
-       gdk_rgb_init();
        gtk_widget_set_default_colormap(gdk_rgb_get_colormap());
 
        gui_manager = gtkut_create_ui_manager();
@@ -1369,7 +1368,7 @@ int main(int argc, char *argv[])
 
        /* register the callback of unix domain socket input */
 #ifdef G_OS_UNIX
-       lock_socket_tag = gdk_input_add(lock_socket,
+       lock_socket_tag = claws_input_add(lock_socket,
                                        GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
                                        lock_socket_input_cb,
                                        mainwin);
@@ -2229,7 +2228,7 @@ static gint lock_socket_remove(void)
        }
 
        if (lock_socket_tag > 0) {
-               gdk_input_remove(lock_socket_tag);
+               g_source_remove(lock_socket_tag);
        }
        fd_close(lock_socket);
        filename = claws_get_socket_name();
index dbafe11..2106525 100644 (file)
@@ -672,7 +672,7 @@ static MimeViewer *get_viewer_for_content_type(MimeView *mimeview, const gchar *
 #ifndef FNM_CASEFOLD
 #define FNM_CASEFOLD 0
        Xstrdup_a(content_type, content_type, return NULL);
-       g_strdown((gchar *)content_type);
+       g_utf8_strdown((gchar *)content_type, -1);
 #endif
        
        for (cur = mimeviewer_factories; cur != NULL; cur = g_slist_next(cur)) {
index 4aa4a2d..4f422bc 100644 (file)
@@ -325,7 +325,7 @@ static ItemEMail *mutt_insert_table(
 
        /* Test whether address already in hash table */
        key = g_strdup( address );
-       g_strdown( key );
+       g_utf8_strdown( key, -1 );
        email = g_hash_table_lookup( muttFile->uniqTable, key );
 
        if( email == NULL ) {
index 8d59d07..e05977b 100644 (file)
@@ -435,7 +435,7 @@ static ItemEMail *pine_insert_table(
 
        /* Test whether address already in hash table */
        key = g_strdup( address );
-       g_strdown( key );
+       g_utf8_strdown( key, -1 );
        email = g_hash_table_lookup( pineFile->uniqTable, key );
 
        if( email == NULL ) {
index 2bde5a9..4c6f564 100644 (file)
@@ -297,11 +297,11 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
                                running &= ~CHILD_RUNNING;
                        } /* ret == 0 continue */
            
-                       g_main_iteration(TRUE);
+                       g_main_context_iteration(NULL, TRUE);
                }
 
                while (running & TIMEOUT_RUNNING)
-                       g_main_iteration(TRUE);
+                       g_main_context_iteration(NULL, TRUE);
        }
 
        fclose(fp);
index 9caa402..ccc3aa6 100644 (file)
@@ -990,7 +990,7 @@ gchar *procmime_get_mime_type(const gchar *filename)
        g_free(base);
        if (!p) return NULL;
 
-       g_strdown(ext);
+       g_utf8_strdown(ext, -1);
        mime_type = g_hash_table_lookup(mime_type_table, ext);
        if (mime_type) {
                gchar *str;
@@ -1049,7 +1049,7 @@ static GHashTable *procmime_get_mime_type_table(void)
                exts = g_strsplit(mime_type->extension, " ", 16);
                for (i = 0; exts[i] != NULL; i++) {
                        /* make the key case insensitive */
-                       g_strdown(exts[i]);
+                       g_utf8_strdown(exts[i], -1);
                        /* use previously dup'd key on overwriting */
                        if (g_hash_table_lookup(table, exts[i]))
                                key = exts[i];
@@ -1608,7 +1608,7 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
                while (value[0] == ' ')
                        value++;
 
-               g_strdown(attribute);
+               g_utf8_strdown(attribute, -1);
 
                len = strlen(attribute);
                if (attribute[len - 1] == '*') {
index 2f15114..4a1efc4 100644 (file)
@@ -288,7 +288,7 @@ static gchar *vcard_get_tagname( char* line, gchar dlm ) {
                        len = lptr - line;
                        tag = g_strndup( line, len+1 );
                        tag[ len ] = '\0';
-                       g_strdown( tag );
+                       g_utf8_strdown( tag, -1 );
                        return tag;
                }
        }
index 8fabff7..8df0d63 100644 (file)
@@ -341,7 +341,7 @@ static gchar *get_name_for_mail(void)
        gchar *name = g_strdup(tmpl.name);
        if (name == NULL)
                return NULL;
-       g_strdown(name);
+       g_utf8_strdown(name, -1);
        while(strstr(name, " "))
                *strstr(name, " ")='.';