2007-06-07 [wwp] 2.9.2cvs45
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 7 Jun 2007 15:12:42 +0000 (15:12 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 7 Jun 2007 15:12:42 +0000 (15:12 +0000)
* src/prefs_common.c
Fix some useless warnings, thanks to Colin.

ChangeLog
PATCHSETS
configure.ac
src/prefs_common.c

index 0e10b25ec95fdf34e00c9f1f605f2d28e0b5d77e..449c02557e91b4b5214f9be2bec8b2b4dc6b0440 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-07 [wwp]       2.9.2cvs45
+
+       * src/prefs_common.c
+               Fix some useless warnings, thanks to Colin.
+
 2007-06-06 [colin]     2.9.2cvs44
 
        * src/ldapupdate.c
 2007-06-06 [colin]     2.9.2cvs44
 
        * src/ldapupdate.c
index d7554371217941dd72e8d3e0036efeac35a47a14..465b188fadecd317273f1b6149bf52c04fa931c9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.105.2.100 -r 1.105.2.101 src/prefs_account.c;  cvs diff -u -r 1.52.2.39 -r 1.52.2.40 src/prefs_folder_item.c;  cvs diff -u -r 1.1.2.21 -r 1.1.2.22 src/prefs_quote.c;  cvs diff -u -r 1.8.2.18 -r 1.8.2.19 src/quote_fmt.c;  cvs diff -u -r 1.5.12.10 -r 1.5.12.11 src/quote_fmt.h;  ) > 2.9.2cvs42.patchset
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/ldapupdate.c;  ) > 2.9.2cvs43.patchset
 ( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/ldapupdate.c;  ) > 2.9.2cvs44.patchset
 ( cvs diff -u -r 1.105.2.100 -r 1.105.2.101 src/prefs_account.c;  cvs diff -u -r 1.52.2.39 -r 1.52.2.40 src/prefs_folder_item.c;  cvs diff -u -r 1.1.2.21 -r 1.1.2.22 src/prefs_quote.c;  cvs diff -u -r 1.8.2.18 -r 1.8.2.19 src/quote_fmt.c;  cvs diff -u -r 1.5.12.10 -r 1.5.12.11 src/quote_fmt.h;  ) > 2.9.2cvs42.patchset
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/ldapupdate.c;  ) > 2.9.2cvs43.patchset
 ( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/ldapupdate.c;  ) > 2.9.2cvs44.patchset
+( cvs diff -u -r 1.204.2.135 -r 1.204.2.136 src/prefs_common.c;  ) > 2.9.2cvs45.patchset
index 70dca11237fccbaeae25d4cf660aeb2b5ba584d5..a6e47b376785a8df4ae6bbb532f88bb092415ee5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=44
+EXTRA_VERSION=45
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index bde6eda22b0c040173630d5734f1fc20cb67f57a..d9c7016da38a768f5145d56372e603ec462cc9e5 100644 (file)
@@ -1235,16 +1235,20 @@ void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt)
        GtkTextBuffer *buffer;
        gchar *out = NULL;
 
        GtkTextBuffer *buffer;
        gchar *out = NULL;
 
-       g_return_if_fail( txt != NULL );
        g_return_if_fail( textview != NULL );
 
        buffer = gtk_text_view_get_buffer(textview);
        g_return_if_fail( textview != NULL );
 
        buffer = gtk_text_view_get_buffer(textview);
-       out = malloc(strlen(txt)+1);
 
 
-       pref_get_unescaped_pref(out, txt);
+       if (!txt) {
+               gtk_text_buffer_set_text(buffer, "", -1);
+       } else {
+               out = malloc(strlen(txt)+1);
 
 
-       gtk_text_buffer_set_text(buffer, out?out:"", -1);
-       g_free(out);
+               pref_get_unescaped_pref(out, txt);
+
+               gtk_text_buffer_set_text(buffer, out?out:"", -1);
+               g_free(out);
+       }
 }
 
 /* set the contents of a gtkentry widget from the internal \-escaped
 }
 
 /* set the contents of a gtkentry widget from the internal \-escaped
@@ -1253,15 +1257,17 @@ void pref_set_entry_from_pref(GtkEntry *entry, const gchar *txt)
 {
        gchar *out = NULL;
 
 {
        gchar *out = NULL;
 
-       g_return_if_fail( txt != NULL );
        g_return_if_fail( entry != NULL );
        g_return_if_fail( entry != NULL );
+       if (!txt) {
+               gtk_entry_set_text(entry, "");
+       } else {
+               out = malloc(strlen(txt)+1);
 
 
-       out = malloc(strlen(txt)+1);
+               pref_get_unescaped_pref(out, txt);
 
 
-       pref_get_unescaped_pref(out, txt);
-
-       gtk_entry_set_text(entry, out?out:"");
-       g_free(out);
+               gtk_entry_set_text(entry, out?out:"");
+               g_free(out);
+       }
 }
 
 /* get the \-escaped internal representation of a pref from the contents of
 }
 
 /* get the \-escaped internal representation of a pref from the contents of