TnyFolderStore **parent)
{
GtkWidget *accept_btn = NULL;
- GtkWidget *dialog, *entry, *label_entry, *label_location, *hbox;
- GtkWidget *account_picker;
+ GtkWidget *dialog, *entry = NULL, *label_entry = NULL, *label_location = NULL, *hbox;
+ GtkWidget *account_picker = NULL;
GList *buttons = NULL;
gint result;
GtkSizeGroup *sizegroup;
ModestFolderView *folder_view;
+ ModestWindow *folder_window;
+ ModestHildon2WindowMgr *window_mgr;
- g_return_val_if_fail (MODEST_IS_FOLDER_WINDOW (parent_window), GTK_RESPONSE_NONE);
+ window_mgr = (ModestHildon2WindowMgr *) modest_runtime_get_window_mgr ();
+ folder_window = modest_hildon2_window_mgr_get_folder_window (window_mgr);
+ g_return_val_if_fail (MODEST_IS_FOLDER_WINDOW (folder_window), GTK_RESPONSE_NONE);
- folder_view = modest_folder_window_get_folder_view (MODEST_FOLDER_WINDOW (parent_window));
+ folder_view = modest_folder_window_get_folder_view (MODEST_FOLDER_WINDOW (folder_window));
/* Ask the user for the folder name */
dialog = gtk_dialog_new_with_buttons (dialog_title,
modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
GTK_WINDOW (dialog), parent_window);
gtk_widget_show_all (GTK_WIDGET(dialog));
-
+
result = gtk_dialog_run (GTK_DIALOG(dialog));
if (result == GTK_RESPONSE_ACCEPT) {
if (show_name)
{
gchar *real_suggested_name = NULL, *tmp = NULL;
gint result;
+ ModestTnyAccountStore *acc_store;
+ TnyAccount *account;
if(suggested_name == NULL)
{
}
/* In hildon 2.2 we always suggest the archive folder as parent */
- suggested_folder = TNY_FOLDER_STORE (
- modest_tny_account_get_special_folder
- (modest_tny_account_store_get_local_folders_account (modest_runtime_get_account_store ()),
- TNY_FOLDER_TYPE_ARCHIVE));
+ acc_store = modest_runtime_get_account_store ();
+ account = modest_tny_account_store_get_mmc_folders_account (acc_store);
+ if (account) {
+ suggested_folder = (TnyFolderStore *)
+ modest_tny_account_get_special_folder (account,
+ TNY_FOLDER_TYPE_ARCHIVE);
+ g_object_unref (account);
+ account = NULL;
+ }
+
+ /* If there is not archive folder then fallback to local folders account */
+ if (!suggested_folder)
+ suggested_folder = (TnyFolderStore *)
+ modest_tny_account_store_get_local_folders_account (acc_store);
tmp = g_strconcat (_("mcen_fi_new_folder_name"), ":", NULL);
result = modest_platform_run_folder_common_dialog (parent_window,
gchar *question = g_strdup_printf (_("mcen_nc_unknown_certificate"),
server_name);
-
+
/* We use GTK_RESPONSE_APPLY because we want the button in the
middle of OK and CANCEL the same as the browser does for
example. With GTK_RESPONSE_HELP the view button is aligned
_HL("wdgt_bd_view"), GTK_RESPONSE_APPLY, /* abusing this... */
_HL("wdgt_bd_no"), GTK_RESPONSE_CANCEL,
NULL, NULL);
-
+
g_signal_connect (G_OBJECT(note), "response",
G_CALLBACK(on_cert_dialog_response),
(gpointer) certificate);