#include "pluginwindow.h"
#include "hooks.h"
#include "progressindicator.h"
+#include "localfolder.h"
#define AC_LABEL_WIDTH 240
static void new_folder_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
-static void add_mbox_cb (MainWindow *mainwin,
- guint action,
- GtkWidget *widget);
static void rename_folder_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
NULL, update_folderview_cb, 0, NULL},
{N_("/_File/_Add mailbox"), NULL, NULL, 0, "<Branch>"},
{N_("/_File/_Add mailbox/MH..."), NULL, add_mailbox_cb, 0, NULL},
- {N_("/_File/_Add mailbox/mbox..."), NULL, add_mbox_cb, 0, NULL},
{N_("/_File/_Import mbox file..."), NULL, import_mbox_cb, 0, NULL},
{N_("/_File/_Export to mbox file..."), NULL, export_mbox_cb, 0, NULL},
{N_("/_File/Empty _trash"), "<shift>D", empty_trash_cb, 0, NULL},
folderview_set(mainwin->folderview);
}
-void main_window_add_mbox(MainWindow *mainwin)
-{
- gchar *path;
- Folder *folder;
-
- path = input_dialog(_("Add mbox mailbox"),
- _("Input the location of mailbox."),
- "mail");
-
- if (!path) return;
-
- if (folder_find_from_path(path)) {
- alertpanel_error(_("The mailbox `%s' already exists."), path);
- g_free(path);
- return;
- }
-
- folder = folder_new(folder_get_class_from_string("mbox"),
- g_basename(path), path);
- g_free(path);
-
- if (folder->klass->create_tree(folder) < 0) {
- alertpanel_error(_("Creation of the mailbox failed."));
- folder_destroy(folder);
- return;
- }
-
- folder_add(folder);
-
- folderview_set(mainwin->folderview);
-}
-
SensitiveCond main_window_get_current_state(MainWindow *mainwin)
{
SensitiveCond state = 0;
{"/File/Add mailbox" , M_UNLOCKED},
{"/File/Add mailbox/MH..." , M_UNLOCKED},
- {"/File/Add mailbox/mbox..." , M_UNLOCKED},
{"/File/Export to mbox file..." , M_UNLOCKED},
{"/File/Empty trash" , M_UNLOCKED},
{"/File/Work offline" , M_UNLOCKED},
break;
case SEPARATE_BOTH:
+ messageview_add_toolbar(mainwin->messageview, messagewin);
+ msgview_ifactory = gtk_item_factory_from_widget(mainwin->messageview->menubar);
+ menu_set_sensitive(msgview_ifactory, "/File/Close", FALSE);
+
gtk_box_pack_start(GTK_BOX(vbox_body),
GTK_WIDGET_PTR(mainwin->summaryview),
TRUE, TRUE, 0);
-
+
mainwin->win.sep_both.folderwin = folderwin;
mainwin->win.sep_both.messagewin = messagewin;
+
+ gtk_widget_realize(messagewin);
+ gtk_widget_show_all(GTK_WIDGET_PTR(mainwin->messageview));
+ gtk_widget_show_all(messagewin);
+ toolbar_set_style(mainwin->messageview->toolbar->toolbar,
+ mainwin->messageview->handlebox,
+ prefs_common.toolbar_style);
break;
}
main_window_add_mailbox(mainwin);
}
-static void add_mbox_cb(MainWindow *mainwin, guint action,
- GtkWidget *widget)
-{
- main_window_add_mbox(mainwin);
-}
-
static void update_folderview_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{