* some compile (-Wall -Werror) fixes
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 7 Mar 2007 21:06:51 +0000 (21:06 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 7 Mar 2007 21:06:51 +0000 (21:06 +0000)
* modest-attachment-view should ref the msg argument

pmo-trunk-r893

src/widgets/modest-attachments-view.c
src/widgets/modest-folder-view.c
src/widgets/modest-mail-header-view.c
src/widgets/modest-msg-view.c

index 383093e..659df29 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <config.h>
 
-#include <glib/gi18n-lib.h>
+//#include <glib/gi18n-lib.h>
 
 #include <string.h>
 #include <gtk/gtk.h>
@@ -92,11 +92,13 @@ modest_attachments_view_set_message (ModestAttachmentsView *attachments_view, Tn
        GtkTextIter text_iter;
        gint icon_height;
 
-       if (priv->msg) {
+       if (priv->msg) 
                g_object_unref (priv->msg);
-       }
+       if (msg)
+               g_object_ref (G_OBJECT(msg));
+       
        priv->msg = msg;
-
+       
        buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (attachments_view));
        gtk_text_buffer_set_text (buffer, "", -1);
        gtk_text_buffer_get_end_iter (buffer, &text_iter);
@@ -189,7 +191,8 @@ button_release_event (GtkWidget *widget,
                        gint attachment_index = 0;
 
                        attachment_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "attachment-index"));
-                       g_signal_emit (G_OBJECT (widget), signals[ACTIVATE_SIGNAL], NULL, attachment_index);
+                       g_signal_emit (G_OBJECT (widget), signals[ACTIVATE_SIGNAL], 0,
+                                      attachment_index);
                        break;
                }
                
index ca97905..a496f5a 100644 (file)
@@ -546,7 +546,7 @@ update_model (ModestFolderView *self, ModestTnyAccountStore *account_store)
 
        priv =  MODEST_FOLDER_VIEW_GET_PRIVATE(self);
        
-       /* Notify that there is no folder selected */
+       /* Notify that there is no folder selected*/
        g_signal_emit (G_OBJECT(self), 
                       signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0,
                       NULL, TRUE);
index 2ad2f5a..3740e07 100644 (file)
@@ -28,8 +28,7 @@
  */
 
 #include <config.h>
-
-#include <glib/gi18n-lib.h>
+//#include <glib/gi18n-lib.h>
 
 #include <string.h>
 #include <gtk/gtk.h>
@@ -157,7 +156,7 @@ modest_mail_header_view_update_is_sent (TnyHeaderView *self)
                TnyFolderType folder_type;
                folder_type = tny_folder_get_folder_type (folder);
                if (folder_type == TNY_FOLDER_TYPE_NORMAL || folder_type == TNY_FOLDER_TYPE_UNKNOWN) {
-                       gchar *fname = tny_folder_get_name (folder);
+                       const gchar *fname = tny_folder_get_name (folder);
                        folder_type = modest_tny_folder_guess_folder_type_from_name (fname);
                }
 
index f45b10e..ea0bd23 100644 (file)
@@ -257,7 +257,7 @@ on_recpt_activated (ModestMailHeaderView *header_view,
                    const gchar *address,
                    ModestMsgView * view)
 {
-  g_signal_emit (G_OBJECT (view), signals[RECPT_ACTIVATED_SIGNAL], 0, address);
+       g_signal_emit (G_OBJECT (view), signals[RECPT_ACTIVATED_SIGNAL], 0, address);
 }
 
 static gboolean
@@ -491,7 +491,8 @@ modest_msg_view_set_message (ModestMsgView *self, TnyMsg *msg)
        tny_header_view_set_header (TNY_HEADER_VIEW (priv->mail_header_view), header);
        g_object_unref (header);
 
-       modest_attachments_view_set_message (priv->attachments_view, msg);
+       modest_attachments_view_set_message (MODEST_ATTACHMENTS_VIEW(priv->attachments_view),
+                                            msg);
        
        body = modest_tny_msg_find_body_part (msg,TRUE);
        if (body) {