Replace hildon pannable area with modest scrollable in msg view window
[modest] / src / hildon2 / modest-msg-edit-window.c
index 3f4e514..7eaf6b5 100644 (file)
@@ -914,6 +914,7 @@ init_window (ModestMsgEditWindow *obj)
        priv->subject_field = hildon_entry_new (MODEST_EDITABLE_SIZE);
        gtk_entry_set_max_length (GTK_ENTRY (priv->subject_field) ,SUBJECT_MAX_LENGTH);
        g_object_set (G_OBJECT (priv->subject_field), "truncate-multiline", TRUE, NULL);
+       hildon_entry_set_placeholder ((HildonEntry *) priv->subject_field, _("mail_va_no_subject"));
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->subject_field), 
                                         HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_AUTOCAP);
        gtk_box_pack_start (GTK_BOX (priv->subject_box), priv->subject_field, TRUE, TRUE, 0);
@@ -2701,7 +2702,7 @@ modest_msg_edit_window_remove_attachments (ModestMsgEditWindow *window,
        }
 
        if (tny_list_get_length (att_list) == 0) {
-               hildon_banner_show_information (NULL, NULL, _("TODO: no attachments selected to remove"));
+               modest_platform_system_banner (NULL, NULL, _("TODO: no attachments selected to remove"));
        } else {
                gboolean dialog_response;
                gchar *message = NULL;
@@ -3715,7 +3716,7 @@ subject_field_insert_text (GtkEditable *editable,
        }
 
        if (result_len + old_length > 1000) {
-               hildon_banner_show_information (GTK_WIDGET (window), NULL, 
+               modest_platform_system_banner (GTK_WIDGET (window), NULL, 
                                                _CS("ckdg_ib_maximum_characters_reached"));
        }
        g_string_free (result, TRUE);
@@ -3814,7 +3815,7 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget,
        if (message_is_empty (window)) {
                g_free (priv->last_search);
                priv->last_search = NULL;
-               hildon_banner_show_information (GTK_WIDGET (window), NULL, _("mail_ib_nothing_to_find"));
+               modest_platform_system_banner (GTK_WIDGET (window), NULL, _("mail_ib_nothing_to_find"));
                return;
        }
 
@@ -3824,7 +3825,7 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget,
                g_free (priv->last_search);
                priv->last_search = NULL;
                /* Information banner about empty search */
-               hildon_banner_show_information (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text"));
+               modest_platform_system_banner (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text"));
                return;
        }
 
@@ -3840,14 +3841,14 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget,
                result = gtk_text_iter_forward_search_insensitive (&selection_end, current_search, 
                                                                   &match_start, &match_end);
                if (!result)
-                       hildon_banner_show_information (NULL, NULL, _HL("ckct_ib_find_search_complete"));
+                       modest_platform_system_banner (NULL, NULL, _HL("ckct_ib_find_search_complete"));
        } else {
                GtkTextIter buffer_start;
                gtk_text_buffer_get_start_iter (priv->text_buffer, &buffer_start);
                result = gtk_text_iter_forward_search_insensitive (&buffer_start, current_search, 
                                                                   &match_start, &match_end);
                if (!result)
-                       hildon_banner_show_information (NULL, NULL, _HL("ckct_ib_find_no_matches"));
+                       modest_platform_system_banner (NULL, NULL, _HL("ckct_ib_find_no_matches"));
        }
 
        /* Mark as selected the string found in search */
@@ -4058,6 +4059,8 @@ update_signature (ModestMsgEditWindow *self,
                                                                 &match_start, &match_end, NULL)) {
                                iter = match_start;
                        }
+               } else {
+                       gtk_text_buffer_get_end_iter (priv->text_buffer, &iter);
                }
                g_free (signature);
        }
@@ -4065,7 +4068,9 @@ update_signature (ModestMsgEditWindow *self,
        priv->last_from_account = modest_selector_picker_get_active_id (MODEST_SELECTOR_PICKER (priv->from_field));
        signature = modest_account_mgr_get_signature_from_recipient (mgr, new_account, &has_new_signature);
        if (has_new_signature) {
-               gchar *full_signature = g_strconcat (MODEST_TEXT_UTILS_SIGNATURE_MARKER, "\n",
+
+               gchar *full_signature = g_strconcat ((gtk_text_iter_starts_line (&iter)) ? "" : "\n",
+                                                    MODEST_TEXT_UTILS_SIGNATURE_MARKER, "\n",
                                                     signature, NULL);
                gtk_text_buffer_insert (priv->text_buffer, &iter, full_signature, -1);
                g_free (full_signature);