readed = tny_stream_read (TNY_STREAM (stream), (char *) read_buffer, 128);
size += readed;
if (!gdk_pixbuf_loader_write (loader, read_buffer, readed, &error)) {
+ if (error)
+ g_free (error);
break;
}
}
text_buffer_refresh_attributes (WP_TEXT_BUFFER (priv->text_buffer), self);
+ g_free (buffer_format);
g_free (current_format);
+ /* Check dimming rules */
+ modest_ui_actions_check_toolbar_dimming_rules (MODEST_WINDOW (self));
+ modest_ui_actions_check_menu_dimming_rules (MODEST_WINDOW (self));
}
static void
modest_maemo_utils_setup_images_filechooser (GTK_FILE_CHOOSER (dialog));
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
+ GTK_WINDOW (dialog),
+ GTK_WINDOW (window));
+
response = gtk_dialog_run (GTK_DIALOG (dialog));
switch (response) {
case GTK_RESPONSE_OK:
if (stream == NULL) {
- modest_platform_information_banner (NULL, NULL, dgettext("hildon-fm", "sfil_ib_opening_not_allowed"));
+ modest_platform_information_banner (NULL, NULL,
+ _FM("sfil_ib_opening_not_allowed"));
g_object_unref (mime_part);
gnome_vfs_file_info_unref (info);
dialog = hildon_file_chooser_dialog_new (GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_window_set_title (GTK_WINDOW (dialog), _("mcen_ti_select_attachment_title"));
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE);
- modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog));
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog), GTK_WINDOW (window));
response = gtk_dialog_run (GTK_DIALOG (dialog));
switch (response) {
size = info->size;
if (size > allowed_size) {
modest_platform_information_banner (NULL, NULL,
- dgettext("hildon-fm", "sfil_ib_opening_not_allowed"));
+ _FM("sfil_ib_opening_not_allowed"));
return 0;
}
} else
if (stream == NULL) {
- modest_platform_information_banner (NULL, NULL, dgettext("hildon-fm", "sfil_ib_opening_not_allowed"));
+ modest_platform_information_banner (NULL, NULL, _FM("sfil_ib_opening_not_allowed"));
g_object_unref (mime_part);
gnome_vfs_file_info_unref (info);
if (tny_list_get_length (att_list) == 0) {
hildon_banner_show_information (NULL, NULL, _("TODO: no attachments selected to remove"));
} else {
- GtkWidget *confirmation_dialog = NULL;
gboolean dialog_response;
gchar *message = NULL;
gchar *filename = NULL;
message = g_strdup_printf (ngettext("emev_nc_delete_attachment", "emev_nc_delete_attachments",
tny_list_get_length (att_list)), filename);
g_free (filename);
- confirmation_dialog = hildon_note_new_confirmation (GTK_WINDOW (window), message);
+
+ dialog_response = modest_platform_run_confirmation_dialog (GTK_WINDOW (window), message);
g_free (message);
- dialog_response = (gtk_dialog_run (GTK_DIALOG (confirmation_dialog))==GTK_RESPONSE_OK);
- gtk_widget_destroy (confirmation_dialog);
- if (!dialog_response) {
+
+ if (dialog_response != GTK_RESPONSE_OK) {
g_object_unref (att_list);
return;
}
break;
}
modest_ui_actions_check_toolbar_dimming_rules (MODEST_WINDOW (window));
+ modest_ui_actions_check_menu_dimming_rules (MODEST_WINDOW (window));
text_buffer_refresh_attributes (WP_TEXT_BUFFER (priv->text_buffer), window);
}
}
dialog = hildon_font_selection_dialog_new (GTK_WINDOW (window), NULL);
modest_window_mgr_set_modal (modest_runtime_get_window_mgr(),
- GTK_WINDOW(dialog));
+ GTK_WINDOW(dialog), GTK_WINDOW (window));
/* First we get the currently selected font information */
wp_text_buffer_get_attributes (WP_TEXT_BUFFER (priv->text_buffer), &oldfmt, TRUE);
"family-set", !oldfmt.cs.font,
NULL);
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
+ GTK_WINDOW (dialog), GTK_WINDOW (window));
gtk_widget_show_all (dialog);
priv->font_dialog = dialog;
response = gtk_dialog_run (GTK_DIALOG (dialog));
modest_ui_actions_check_toolbar_dimming_rules (MODEST_WINDOW (window));
modest_ui_actions_check_menu_dimming_rules (MODEST_WINDOW (window));
-
}
void
if (result_len + old_length > 1000) {
hildon_banner_show_information (GTK_WIDGET (window), NULL,
- dgettext("hildon-common-strings",
- "ckdg_ib_maximum_characters_reached"));
+ _CS("ckdg_ib_maximum_characters_reached"));
}
g_string_free (result, TRUE);
g_free (priv->last_search);
priv->last_search = NULL;
/* Information banner about empty search */
- hildon_banner_show_information (NULL, NULL, dgettext ("hildon-common-strings", "ecdg_ib_find_rep_enter_text"));
+ hildon_banner_show_information (NULL, NULL,
+ _CS ("ecdg_ib_find_rep_enter_text"));
return;
}
result = gtk_text_iter_forward_search_insensitive (&selection_end, current_search,
&match_start, &match_end);
if (!result)
- hildon_banner_show_information (NULL, NULL, dgettext ("hildon-libs", "ckct_ib_find_search_complete"));
+ hildon_banner_show_information (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, dgettext ("hildon-libs", "ckct_ib_find_no_matches"));
+ hildon_banner_show_information (NULL, NULL,
+ _HL ("ckct_ib_find_no_matches"));
}
/* Mark as selected the string found in search */
}
priv->msg_uid = modest_tny_folder_get_header_unique_id (header);
if (GTK_WIDGET_REALIZED (window))
- modest_window_mgr_register_window (mgr, MODEST_WINDOW (window));
+ modest_window_mgr_register_window (mgr, MODEST_WINDOW (window), NULL);
}
priv->draft_msg = draft;
ModestMsgEditWindowPrivate *priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (userdata);
gchar *tag_name;
- if (tag == NULL+13) return;
+ if (tag == NULL) return;
g_object_get (G_OBJECT (tag), "name", &tag_name, NULL);
if ((tag_name != NULL) && (g_str_has_prefix (tag_name, "image-tag-replace-"))) {
replace_with_images (window, priv->images);
{
g_return_val_if_fail (MODEST_IS_MSG_EDIT_WINDOW (window), FALSE);
- hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_cannot_zoom_here"));
+ hildon_banner_show_information (NULL, NULL,
+ _CS("ckct_ib_cannot_zoom_here"));
return FALSE;
}