2004-11-15 [colin] 0.9.12cvs146.11
authorColin Leroy <colin@colino.net>
Mon, 15 Nov 2004 10:05:03 +0000 (10:05 +0000)
committerColin Leroy <colin@colino.net>
Mon, 15 Nov 2004 10:05:03 +0000 (10:05 +0000)
* src/summaryview.c
* src/prefs_themes.c
* src/messageview.c
Fix some leaks

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/messageview.c
src/prefs_themes.c
src/summaryview.c

index b78b872c155dbf3d33b30e6ad0609392f2389ebd..f113f6d6a100548ad80a799fe0db3731495af756 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-15 [colin]     0.9.12cvs146.11
+
+       * src/summaryview.c
+       * src/prefs_themes.c
+       * src/messageview.c
+               Fix some leaks
+
 2004-11-15 [colin]     0.9.12cvs146.10
 
        * src/codeconv.c
index 79488ad7faaeda7e9da77d989cc053dd852873bd..bd065cd2858d2c3d3475c0a3ef8a9fa0966c1a82 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.213.2.21 -r 1.213.2.22 src/folder.c; cvs diff -u -r 1.49.2.20 -r 1.49.2.21 src/procmime.c; ) > 0.9.12cvs146.8.patchset
 ( cvs diff -u -r 1.96.2.34 -r 1.96.2.35 src/textview.c; ) > 0.9.12cvs146.9.patchset
 ( cvs diff -u -r 1.65.2.18 -r 1.65.2.19 src/codeconv.c; ) > 0.9.12cvs146.10.patchset
+( cvs diff -u -r 1.395.2.40 -r 1.395.2.41 src/summaryview.c; cvs diff -u -r 1.3.2.11 -r 1.3.2.12 src/prefs_themes.c; cvs diff -u -r 1.94.2.33 -r 1.94.2.34 src/messageview.c; ) > 0.9.12cvs146.11.patchset
index d2c72da2290123af07b3f3d72624536acdea0315..15b28ecaf5f945d07e407e39468f560b84a42959 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=146
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.10
+EXTRA_GTK2_VERSION=.11
 
 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 c83d02da9f9e08885681f382d8b38e23b323a504..321a4f6ecf924448ac8786a313b0a1b54d56ac42 100644 (file)
@@ -961,7 +961,7 @@ void messageview_save_as(MessageView *messageview)
 {
        gchar *filename = NULL;
        MsgInfo *msginfo;
-       gchar *src, *dest;
+       gchar *src, *dest, *tmp;
 
        if (!messageview->msginfo) return;
        msginfo = messageview->msginfo;
@@ -983,8 +983,9 @@ void messageview_save_as(MessageView *messageview)
 
        src = procmsg_get_message_file(msginfo);
        if (copy_file(src, dest, TRUE) < 0) {
-               alertpanel_error(_("Can't save the file `%s'."),
-                                g_path_get_basename(dest));
+               tmp =  g_path_get_basename(dest);
+               alertpanel_error(_("Can't save the file `%s'."), tmp);
+               g_free(tmp);
        }
        g_free(dest);
        g_free(src);
index d48ef99966ce052f3de37b80e6acaf19eca9a895..06aad40c5c779fab06fa702187472a8072284fea 100644 (file)
@@ -410,21 +410,25 @@ static void prefs_themes_btn_remove_clicked_cb(GtkWidget *widget, gpointer data)
        gchar      *theme_str;
        gchar      *alert_title = NULL;
        AlertValue  val = 0;
+       gchar      *tmp = NULL;
 
        theme_str = tdata->displayed;
        
+       tmp = g_path_get_basename(theme_str);
+
        if (IS_SYSTEM_THEME(theme_str)) {
                if (getuid() != 0) {
                        alertpanel_error(_("Only root can remove system themes"));
                        return;
                }
-               alert_title = g_strdup_printf(_("Remove system theme '%s'"), 
-                                             g_path_get_basename(theme_str));
+               alert_title = g_strdup_printf(_("Remove system theme '%s'"), tmp);
        }
        if (NULL == alert_title) {
-               alert_title = g_strdup_printf(_("Remove theme '%s'"), 
-                                             g_path_get_basename(theme_str));
+               alert_title = g_strdup_printf(_("Remove theme '%s'"), tmp);
        }
+
+       g_free(tmp);
+
        val = alertpanel(alert_title,
                         _("Are you sure you want to remove this theme?"),
                         _("No"), _("Yes"), _("Cancel"));
index 4589031512682e332acfe535a9577a246794da0b..f1ac05f8e5e2318f61915a1a2c061490285aab3a 100644 (file)
@@ -3295,6 +3295,7 @@ void summary_save_as(SummaryView *summaryview)
        MsgInfo *msginfo;
        gchar *filename = NULL;
        gchar *src, *dest;
+       gchar *tmp;
 
        AlertValue aval = 0;
 
@@ -3331,14 +3332,14 @@ void summary_save_as(SummaryView *summaryview)
        }
 
        src = procmsg_get_message_file(msginfo);
+       tmp = g_path_get_basename(dest);
+
        if ( aval==0 ) { /* append */
                if (append_file(src, dest, TRUE) < 0) 
-                       alertpanel_error(_("Can't save the file `%s'."),
-                                        g_path_get_basename(dest));
+                       alertpanel_error(_("Can't save the file `%s'."), tmp);
        } else { /* overwrite */
                if (copy_file(src, dest, TRUE) < 0)
-                       alertpanel_error(_("Can't save the file `%s'."),
-                                        g_path_get_basename(dest));
+                       alertpanel_error(_("Can't save the file `%s'."), tmp);
        }
        g_free(src);
        
@@ -3353,12 +3354,12 @@ void summary_save_as(SummaryView *summaryview)
                        if (!msginfo) break;
                        src = procmsg_get_message_file(msginfo);
                        if (append_file(src, dest, TRUE) < 0)
-                               alertpanel_error(_("Can't save the file `%s'."),
-                                                g_path_get_basename(dest));
+                               alertpanel_error(_("Can't save the file `%s'."), tmp);
                }
                g_free(src);
        }
        g_free(dest);
+       g_free(tmp);
 }
 
 void summary_print(SummaryView *summaryview)