-/* Copyright (c) 2006, y2008 Nokia Corporation
+/* Copyright (c) 2006, 2008 Nokia Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "modest-text-utils.h"
#include "modest-signal-mgr.h"
#include <tny-gtk-folder-store-tree-model.h>
+#include <modest-accounts-window.h>
#define MODEST_MAIN_WINDOW_ACTION_GROUP_ADDITIONS "ModestMainWindowActionAdditions"
static const GtkActionEntry modest_folder_view_action_entries [] = {
/* Folder View CSM actions */
- { "FolderViewCSMNewFolder", NULL, N_("mcen_ti_new_folder"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_new_folder) },
- { "FolderViewCSMRenameFolder", NULL, N_("mcen_me_user_renamefolder"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_rename_folder) },
+ { "FolderViewCSMNewFolder", NULL, N_("ckdg_fi_new_folder_name"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_new_folder) },
+ { "FolderViewCSMRenameFolder", NULL, N_("mcen_me_rename_folder"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_rename_folder) },
{ "FolderViewCSMPasteMsgs", NULL, N_("mcen_me_inbox_paste"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_paste)},
- { "FolderViewCSMDeleteFolder", NULL, N_("mcen_me_inbox_delete"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_delete_folder) },
+ { "FolderViewCSMDeleteFolder", NULL, N_("mcen_me_delete_messages"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_delete_folder) },
};
static const GtkActionEntry modest_header_view_action_entries [] = {
{ "HeaderViewCSMCut", NULL, N_("mcen_me_inbox_cut"), "<CTRL>X", NULL, G_CALLBACK (modest_ui_actions_on_cut) },
{ "HeaderViewCSMCopy", NULL, N_("mcen_me_inbox_copy"), "<CTRL>C", NULL, G_CALLBACK (modest_ui_actions_on_copy) },
{ "HeaderViewCSMPaste", NULL, N_("mcen_me_inbox_paste"), "<CTRL>V", NULL, G_CALLBACK (modest_ui_actions_on_paste) },
- { "HeaderViewCSMDelete", NULL, N_("mcen_me_inbox_delete"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_delete_message) },
+ { "HeaderViewCSMDelete", NULL, N_("mcen_me_delete_messages"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_delete_message) },
{ "HeaderViewCSMCancelSending", NULL, N_("mcen_me_outbox_cancelsend"), NULL, NULL, G_CALLBACK (modest_ui_actions_cancel_send) },
};
G_CALLBACK (on_folder_view_focus_in),
self);
- /* Folder view CSM */
- menu = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/FolderViewCSM");
- gtk_widget_tap_and_hold_setup (GTK_WIDGET (priv->folder_view), menu, NULL, 0);
- priv->sighandlers = modest_signal_mgr_connect (priv->sighandlers, G_OBJECT(priv->folder_view), "tap-and-hold",
- G_CALLBACK(_folder_view_csm_menu_activated),
- self);
-
/* folder view row activated */
priv->sighandlers = modest_signal_mgr_connect (priv->sighandlers, G_OBJECT(priv->folder_view), "row-activated",
G_CALLBACK(on_folder_view_row_activated),
{
ShowHelper *helper = (ShowHelper *) user_data;
ModestMainWindowPrivate *priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-
+
priv->folder_view = MODEST_FOLDER_VIEW (modest_platform_create_folder_view (NULL));
modest_main_window_set_contents_style (MODEST_MAIN_WINDOW (self),
MODEST_MAIN_WINDOW_CONTENTS_STYLE_FOLDERS);
tny_account_store_view_set_account_store (TNY_ACCOUNT_STORE_VIEW (priv->folder_view),
TNY_ACCOUNT_STORE (modest_runtime_get_account_store ()));
- /* Load previous osso state, for instance if we are being restored from
+ /* Load previous osso state, for instance if we are being restored from
* hibernation: */
modest_osso_load_state ();
- /* Restore window & widget settings */
+ /* Restore window & widget settings */
priv->wait_for_settings = TRUE;
restore_settings (MODEST_MAIN_WINDOW(self), TRUE);
priv->wait_for_settings = FALSE;
/* Check if accounts exist and show the account wizard if not */
- gboolean accounts_exist =
+ gboolean accounts_exist =
modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(), TRUE);
if (!accounts_exist) {
- /* This is necessary to have the main window shown behind the dialog
+ /* This is necessary to have the main window shown behind the dialog
It's an ugly hack... jschmid */
gtk_widget_show_all(GTK_WIDGET(self));
modest_ui_actions_on_accounts (NULL, MODEST_WINDOW(self));
gtk_widget_show (GTK_WIDGET (priv->header_view));
break;
case MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS:
- g_message ("This view is not supported in Fremantle style");
+ g_warning ("This view is not supported in Fremantle style");
break;
case MODEST_MAIN_WINDOW_CONTENTS_STYLE_EMPTY:
wrap_in_scrolled_window (priv->contents_widget, GTK_WIDGET (priv->empty_view));
ModestAccountSettings *settings;
ModestServerAccountSettings *store_settings = NULL;
+/* GtkWidget *folder_window; */
+
+/* folder_window = GTK_WIDGET (modest_folder_window_new (NULL)); */
+/* modest_window_mgr_register_window (modest_runtime_get_window_mgr (), */
+/* MODEST_WINDOW (folder_window), */
+/* MODEST_WINDOW (self)); */
+/* gtk_widget_show (folder_window); */
+ GtkWidget *accounts_window;
+
+ accounts_window = GTK_WIDGET (modest_accounts_window_new ());
+ modest_window_mgr_register_window (modest_runtime_get_window_mgr (),
+ MODEST_WINDOW (accounts_window),
+ MODEST_WINDOW (self));
+ gtk_widget_show (accounts_window);
+
/* Get account data */
mgr = modest_runtime_get_account_mgr ();
settings = modest_account_mgr_load_account_settings (mgr, acc_name);
modest_folder_view_select_first_inbox_or_local (priv->folder_view);
modest_window_set_active_account (MODEST_WINDOW (self), account_name);
+/* modest_folder_window_set_account (MODEST_FOLDER_WINDOW (folder_window), acc_name); */
+
action = gtk_action_group_get_action (priv->view_additions_group, account_name);
if (action != NULL) {
if (!gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
g_object_unref (store_settings);
g_object_unref (settings);
}
+
}
/* Make sure that at least one account is "viewed": */
{
g_return_val_if_fail (MODEST_IS_MAIN_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;
}
-1);
if (folder_store && TNY_IS_FOLDER (folder_store)) {
modest_header_view_set_folder (MODEST_HEADER_VIEW (priv->header_view),
- TNY_FOLDER (folder_store), TRUE,
+ TNY_FOLDER (folder_store), TRUE, MODEST_WINDOW (self),
NULL, NULL);
modest_main_window_set_contents_style (MODEST_MAIN_WINDOW (self),
MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS);
g_object_unref (folder_store);
}
- g_message ("FOLDER VIEW CELL ACTIVATED");
+ g_debug ("FOLDER VIEW CELL ACTIVATED");
}