2005-10-09 [colin] 1.9.15cvs26
[claws.git] / src / mainwindow.c
index 0359db76b54b9bb136e9807ff985737ba47f5b25..929621e5159f66abc307470ce595437d0e4abf1d 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #include "defs.h"
@@ -65,6 +65,7 @@
 #include "prefs_filtering.h"
 #include "prefs_account.h"
 #include "prefs_summary_column.h"
+#include "prefs_folder_column.h"
 #include "prefs_template.h"
 #include "action.h"
 #include "account.h"
@@ -122,8 +123,6 @@ static void toolbar_child_detached          (GtkWidget      *widget,
 static gboolean ac_label_button_pressed                (GtkWidget      *widget,
                                                 GdkEventButton *event,
                                                 gpointer        data);
-static void ac_menu_popup_closed               (GtkMenuShell   *menu_shell,
-                                                gpointer        data);
 
 static gint main_window_close_cb               (GtkWidget      *widget,
                                                 GdkEventAny    *event,
@@ -284,7 +283,10 @@ static void collapse_threads_cb     (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
 
-static void set_display_item_cb         (MainWindow    *mainwin,
+static void set_summary_display_item_cb         (MainWindow    *mainwin,
+                                 guint          action,
+                                 GtkWidget     *widget);
+static void set_folder_display_item_cb  (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
 static void sort_summary_cb     (MainWindow    *mainwin,
@@ -426,6 +428,9 @@ static void addr_harvest_cb  ( MainWindow  *mainwin,
 static void addr_harvest_msg_cb         ( MainWindow  *mainwin,
                                   guint       action,
                                   GtkWidget   *widget );
+static void sync_cb             ( MainWindow *mainwin, 
+                                  guint action, 
+                                  GtkWidget *widget );
 
 static gboolean mainwindow_focus_in_event      (GtkWidget      *widget, 
                                                 GdkEventFocus  *focus,
@@ -456,9 +461,10 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_File/Empty all _Trash folders"), "<shift>D", empty_trash_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/_Save as..."),              "<control>S", save_as_cb, 0, NULL},
-       {N_("/_File/_Print..."),                NULL, print_cb, 0, NULL},
+       {N_("/_File/_Print..."),                "<control>P", print_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/_Work offline"),            "<control>W", toggle_work_offline_cb, 0, "<ToggleItem>"},
+       {N_("/_File/Synchronise folders"),      "<control><shift>S", sync_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        /* {N_("/_File/_Close"),                "<alt>W", app_exit_cb, 0, NULL}, */
        {N_("/_File/E_xit"),                    "<control>Q", app_exit_cb, 0, NULL},
@@ -496,11 +502,11 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Sort"),                    NULL, NULL, 0, "<Branch>"},
        {N_("/_View/_Sort/by _number"),         NULL, sort_summary_cb, SORT_BY_NUMBER, "<RadioItem>"},
-       {N_("/_View/_Sort/by s_ize"),           NULL, sort_summary_cb, SORT_BY_SIZE, "/View/Sort/by number"},
-       {N_("/_View/_Sort/by _date"),           NULL, sort_summary_cb, SORT_BY_DATE, "/View/Sort/by number"},
-       {N_("/_View/_Sort/by _from"),           NULL, sort_summary_cb, SORT_BY_FROM, "/View/Sort/by number"},
-       {N_("/_View/_Sort/by _recipient"),      NULL, sort_summary_cb, SORT_BY_TO, "/View/Sort/by number"},
-       {N_("/_View/_Sort/by _subject"),        NULL, sort_summary_cb, SORT_BY_SUBJECT, "/View/Sort/by number"},
+       {N_("/_View/_Sort/by S_ize"),           NULL, sort_summary_cb, SORT_BY_SIZE, "/View/Sort/by number"},
+       {N_("/_View/_Sort/by _Date"),           NULL, sort_summary_cb, SORT_BY_DATE, "/View/Sort/by number"},
+       {N_("/_View/_Sort/by _From"),           NULL, sort_summary_cb, SORT_BY_FROM, "/View/Sort/by number"},
+       {N_("/_View/_Sort/by _To"),             NULL, sort_summary_cb, SORT_BY_TO, "/View/Sort/by number"},
+       {N_("/_View/_Sort/by S_ubject"),        NULL, sort_summary_cb, SORT_BY_SUBJECT, "/View/Sort/by number"},
        {N_("/_View/_Sort/by _color label"),
                                                NULL, sort_summary_cb, SORT_BY_LABEL, "/View/Sort/by number"},
        {N_("/_View/_Sort/by _mark"),           NULL, sort_summary_cb, SORT_BY_MARK, "/View/Sort/by number"},
@@ -520,7 +526,9 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/E_xpand all threads"),      NULL, expand_threads_cb, 0, NULL},
        {N_("/_View/Co_llapse all threads"),    NULL, collapse_threads_cb, 0, NULL},
        {N_("/_View/_Hide read messages"),      NULL, hide_read_messages, 0, "<ToggleItem>"},
-       {N_("/_View/Set displayed _items..."),  NULL, set_display_item_cb, 0, NULL},
+       {N_("/_View/Set displayed _columns"),   NULL, NULL, 0, "<Branch>"},
+       {N_("/_View/Set displayed _columns/in _Folder list..."),        NULL, set_folder_display_item_cb, 0, NULL},
+       {N_("/_View/Set displayed _columns/in _Message list..."),NULL, set_summary_display_item_cb, 0, NULL},
 
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Go to"),                   NULL, NULL, 0, "<Branch>"},
@@ -683,7 +691,8 @@ static GtkItemFactoryEntry mainwin_entries[] =
                                                "<control>L", main_window_reply_cb, COMPOSE_REPLY_TO_LIST, NULL},
        {N_("/_Message/Follow-up and reply to"),NULL, main_window_reply_cb, COMPOSE_FOLLOWUP_AND_REPLY_TO, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
-       {N_("/_Message/_Forward"),              "<control><alt>F", main_window_reply_cb, COMPOSE_FORWARD, NULL},
+       {N_("/_Message/_Forward"),              "<control><alt>F", main_window_reply_cb, COMPOSE_FORWARD_INLINE, NULL},
+       {N_("/_Message/For_ward as attachment"),        NULL, main_window_reply_cb, COMPOSE_FORWARD_AS_ATTACH, NULL},
        {N_("/_Message/Redirect"),              NULL, main_window_reply_cb, COMPOSE_REDIRECT, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/M_ove..."),              "<control>O", move_to_cb, 0, NULL},
@@ -779,18 +788,16 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Configuration/Plu_gins..."),     NULL, plugins_open_cb, 0, NULL},
 
        {N_("/_Help"),                          NULL, NULL, 0, "<Branch>"},
-       {N_("/_Help/_Manual (Local)"),          NULL, manual_open_cb, MANUAL_MANUAL_LOCAL, NULL},
-       {N_("/_Help/Ma_nual (Sylpheed Doc Homepage)"),
-                                               NULL, manual_open_cb, MANUAL_MANUAL_SYLDOC, NULL},
-       {N_("/_Help/_FAQ (Local)"),             NULL, manual_open_cb, MANUAL_FAQ_LOCAL, NULL},
-       {N_("/_Help/FA_Q (Sylpheed Doc Homepage)"),
-                                               NULL, manual_open_cb, MANUAL_FAQ_SYLDOC, NULL},
-       {N_("/_Help/_Claws FAQ (Claws Documentation)"),
+       {N_("/_Help/_Manual"),                  NULL, manual_open_cb, MANUAL_MANUAL_LOCAL, NULL},
+       {N_("/_Help/_FAQ"),                     NULL, manual_open_cb, MANUAL_FAQ_LOCAL, NULL},
+       {N_("/_Help/_Online User-contributed FAQ"),     
                                                NULL, manual_open_cb, MANUAL_FAQ_CLAWS, NULL},
        {N_("/_Help/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_Help/_About"),                   NULL, about_show, 0, NULL}
 };
 
+static gboolean offline_ask_sync = TRUE;
+
 static gboolean main_window_accel_activate (GtkAccelGroup *accelgroup,
                                             GObject *arg1,
                                             guint value,
@@ -842,7 +849,6 @@ MainWindow *main_window_create(SeparateType type)
        GtkWidget *menuitem;
        gint i;
        guint n_menu_entries;
-       gboolean hide_messageview = FALSE;
 
        static GdkGeometry geometry;
 
@@ -888,17 +894,22 @@ MainWindow *main_window_create(SeparateType type)
        gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
        ifactory = gtk_item_factory_from_widget(menubar);
 
-       menu_set_sensitive(ifactory, "/Help/Manual (Local)", manual_available(MANUAL_MANUAL_LOCAL));
-       menu_set_sensitive(ifactory, "/Help/FAQ (Local)", manual_available(MANUAL_FAQ_LOCAL));
-
-       handlebox = gtk_handle_box_new();
-       gtk_widget_show(handlebox);
-       gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
-       g_signal_connect(G_OBJECT(handlebox), "child_attached",
-                        G_CALLBACK(toolbar_child_attached), mainwin);
-       g_signal_connect(G_OBJECT(handlebox), "child_detached",
-                        G_CALLBACK(toolbar_child_detached), mainwin);
-
+       menu_set_sensitive(ifactory, "/Help/Manual", manual_available(MANUAL_MANUAL_LOCAL));
+       menu_set_sensitive(ifactory, "/Help/FAQ", manual_available(MANUAL_FAQ_LOCAL));
+
+       if (prefs_common.toolbar_detachable) {
+               handlebox = gtk_handle_box_new();
+               gtk_widget_show(handlebox);
+               gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
+               g_signal_connect(G_OBJECT(handlebox), "child_attached",
+                                G_CALLBACK(toolbar_child_attached), mainwin);
+               g_signal_connect(G_OBJECT(handlebox), "child_detached",
+                                G_CALLBACK(toolbar_child_detached), mainwin);
+       } else {
+               handlebox = gtk_hbox_new(FALSE, 0);
+               gtk_widget_show(handlebox);
+               gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
+       }
        /* link window to mainwin->window to avoid gdk warnings */
        mainwin->window       = window;
        
@@ -1028,7 +1039,7 @@ MainWindow *main_window_create(SeparateType type)
        color[2] = folderview->color_new;
        color[3] = folderview->color_op;
 
-       colormap = gdk_window_get_colormap(window->window);
+       colormap = gdk_drawable_get_colormap(window->window);
        gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
        for (i = 0; i < 4; i++) {
                if (success[i] == FALSE)
@@ -1038,8 +1049,7 @@ MainWindow *main_window_create(SeparateType type)
        debug_print("done.\n");
 
        messageview->visible = prefs_common.msgview_visible;
-       hide_messageview = !messageview->visible;
-       
+
        main_window_set_widgets(mainwin, type);
 
        g_signal_connect(G_OBJECT(window), "size_allocate",
@@ -1079,8 +1089,6 @@ MainWindow *main_window_create(SeparateType type)
        /* set account selection menu */
        ac_menu = gtk_item_factory_get_widget
                (ifactory, "/Configuration/Change current account");
-       g_signal_connect(G_OBJECT(ac_menu), "selection_done",
-                        G_CALLBACK(ac_menu_popup_closed), mainwin);
        mainwin->ac_menu = ac_menu;
 
        toolbar_main_set_sensitive(mainwin);
@@ -1135,9 +1143,6 @@ MainWindow *main_window_create(SeparateType type)
        if (prefs_common.work_offline)
                online_switch_clicked (GTK_BUTTON(online_switch), mainwin);
 
-       if (mainwin->type == SEPARATE_NONE && hide_messageview)
-               main_window_toggle_message_view(mainwin);
-
        return mainwin;
 }
 
@@ -1256,9 +1261,9 @@ static gboolean reflect_prefs_timeout_cb(gpointer data)
                        mainwin->offline_pixmap = pixmap;
                }
                
+               headerview_set_font(mainwin->messageview->headerview);
                headerview_set_visibility(mainwin->messageview->headerview,
                                          prefs_common.display_header_pane);
-
                textview_reflect_prefs(mainwin->messageview->mimeview->textview);
                folderview_reflect_prefs();
                summary_reflect_prefs();
@@ -1287,6 +1292,17 @@ void main_window_set_summary_column(void)
        }
 }
 
+void main_window_set_folder_column(void)
+{
+       GList *cur;
+       MainWindow *mainwin;
+
+       for (cur = mainwin_list; cur != NULL; cur = cur->next) {
+               mainwin = (MainWindow *)cur->data;
+               folderview_set_column_order(mainwin->folderview);
+       }
+}
+
 static void main_window_set_account_selector_menu(MainWindow *mainwin,
                                                  GList *account_list)
 {
@@ -1638,21 +1654,9 @@ void main_window_progress_set(MainWindow *mainwin, gint cur, gint total)
 
 void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
 {
-       GList *list;
-       guint has_trash;
-       Folder *folder;
-
-       for (has_trash = 0, list = folder_get_list(); list != NULL; list = list->next) {
-               folder = FOLDER(list->data);
-               if (folder && folder->trash && folder->trash->total_msgs > 0)
-                       has_trash++;
-       }
-
-       if (!has_trash) return;
-       
        if (confirm) {
                if (alertpanel(_("Empty trash"),
-                              _("Empty all messages in trash?"),
+                              _("Delete all messages in trash folders?"),
                               GTK_STOCK_YES, GTK_STOCK_NO, NULL)
                    != G_ALERTDEFAULT)
                        return;
@@ -1696,7 +1700,7 @@ void main_window_add_mailbox(MainWindow *mainwin)
 
        folder_add(folder);
        folder_set_ui_func(folder, scan_tree_func, mainwin);
-       folder_scan_tree(folder);
+       folder_scan_tree(folder, TRUE);
        folder_set_ui_func(folder, NULL, NULL);
 }
 
@@ -1742,8 +1746,9 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
                state |= M_NOT_NEWS;
        if (selection == SUMMARY_SELECTED_SINGLE &&
            (item &&
-            (item->stype == F_OUTBOX || item->stype == F_DRAFT ||
-             item->stype == F_QUEUE)))
+            (folder_has_parent_of_type(item, F_DRAFT) ||
+             folder_has_parent_of_type(item, F_OUTBOX) ||
+             folder_has_parent_of_type(item, F_QUEUE))))
                state |= M_ALLOW_REEDIT;
        if (cur_account)
                state |= M_HAVE_ACCOUNT;
@@ -1758,6 +1763,11 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
        if (inc_is_active())
                state |= M_INC_ACTIVE;
 
+       if (mainwin->summaryview->deleted > 0 ||
+           mainwin->summaryview->moved > 0 ||
+           mainwin->summaryview->copied > 0)
+               state |= M_DELAY_EXEC;
+
        return state;
 }
 
@@ -1823,6 +1833,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/Message/Reply to"              , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
                {"/Message/Follow-up and reply to", M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST|M_NEWS},
                {"/Message/Forward"               , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"/Message/Forward as attachment" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
                {"/Message/Redirect"              , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
                {"/Message/Move..."               , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED},
                {"/Message/Copy..."               , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
@@ -1892,15 +1903,15 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
        case SORT_BY_NUMBER:
                menu_path = "/View/Sort/by number"; break;
        case SORT_BY_SIZE:
-               menu_path = "/View/Sort/by size"; break;
+               menu_path = "/View/Sort/by Size"; break;
        case SORT_BY_DATE:
-               menu_path = "/View/Sort/by date"; break;
+               menu_path = "/View/Sort/by Date"; break;
        case SORT_BY_FROM:
-               menu_path = "/View/Sort/by from"; break;
+               menu_path = "/View/Sort/by From"; break;
        case SORT_BY_TO:
-               menu_path = "/View/Sort/by recipient"; break;
+               menu_path = "/View/Sort/by To"; break;
        case SORT_BY_SUBJECT:
-               menu_path = "/View/Sort/by subject"; break;
+               menu_path = "/View/Sort/by Subject"; break;
        case SORT_BY_LABEL:
                menu_path = "/View/Sort/by color label"; break;
        case SORT_BY_MARK:
@@ -2350,18 +2361,6 @@ static gboolean ac_label_button_pressed(GtkWidget *widget, GdkEventButton *event
        return TRUE;
 }
 
-static void ac_menu_popup_closed(GtkMenuShell *menu_shell, gpointer data)
-{
-       MainWindow *mainwin = (MainWindow *)data;
-       GtkWidget *button;
-
-       button = g_object_get_data(G_OBJECT(menu_shell), "menu_button");
-       if (!button) return;
-       gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
-       g_object_set_data(G_OBJECT(mainwin->ac_menu), "menu_button", NULL);
-       manage_window_focus_in(mainwin->window, NULL, NULL);
-}
-
 static gint main_window_close_cb(GtkWidget *widget, GdkEventAny *event,
                                 gpointer data)
 {
@@ -2506,7 +2505,7 @@ static void search_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 static void mainwindow_quicksearch(MainWindow *mainwin, guint action, GtkWidget *widget)
 {
        prefs_common.show_searchbar = TRUE;
-       quicksearch_show(mainwin->summaryview->quicksearch);
+       summaryview_activate_quicksearch(mainwin->summaryview);
 }
 
 static void toggle_folder_cb(MainWindow *mainwin, guint action,
@@ -2604,17 +2603,45 @@ static void separate_widget_cb(MainWindow *mainwin, guint action,
        prefs_common.sep_msg    = (type & SEPARATE_MESSAGE) != 0;
 }
 
-void main_window_toggle_work_offline (MainWindow *mainwin, gboolean offline)
+void main_window_toggle_work_offline (MainWindow *mainwin, gboolean offline,
+                                       gboolean ask_sync)
 {
+       offline_ask_sync = ask_sync;
        if (offline)
                online_switch_clicked (GTK_BUTTON(mainwin->online_switch), mainwin);
        else
                online_switch_clicked (GTK_BUTTON(mainwin->offline_switch), mainwin);
+       offline_ask_sync = TRUE;
 }
 
 static void toggle_work_offline_cb (MainWindow *mainwin, guint action, GtkWidget *widget)
 {
-       main_window_toggle_work_offline(mainwin, GTK_CHECK_MENU_ITEM(widget)->active);
+       main_window_toggle_work_offline(mainwin, GTK_CHECK_MENU_ITEM(widget)->active, TRUE);
+}
+
+static void mainwindow_check_synchronise(MainWindow *mainwin, gboolean ask)
+{
+       GList *folderlist = folder_get_list();
+       gboolean found = FALSE;
+
+       /* see if there are synchronised folders */
+       for (; folderlist; folderlist = folderlist->next) {
+               Folder *folder = (Folder *)folderlist->data;
+               if (folder_want_synchronise(folder)) {
+                       found = TRUE;
+                       break;
+               }
+       }
+       
+       if (!found)
+               return;
+               
+       if (offline_ask_sync && ask && alertpanel(_("Folder synchronisation"),
+                       _("Do you want to synchronise your folders now?"),
+                       GTK_STOCK_YES, GTK_STOCK_NO, NULL) != G_ALERTDEFAULT)
+               return;
+
+       folder_synchronise(NULL);
 }
 
 static void online_switch_clicked (GtkButton *btn, gpointer data) 
@@ -2633,6 +2660,7 @@ static void online_switch_clicked (GtkButton *btn, gpointer data)
        
        if (btn == GTK_BUTTON(mainwin->online_switch)) {
                /* go offline */
+               mainwindow_check_synchronise(mainwin, TRUE);
                gtk_widget_hide (mainwin->online_switch);
                gtk_widget_show (mainwin->offline_switch);
                menuitem->active = TRUE;
@@ -2815,12 +2843,18 @@ static void collapse_threads_cb(MainWindow *mainwin, guint action,
        summary_collapse_threads(mainwin->summaryview);
 }
 
-static void set_display_item_cb(MainWindow *mainwin, guint action,
+static void set_summary_display_item_cb(MainWindow *mainwin, guint action,
                                GtkWidget *widget)
 {
        prefs_summary_column_open();
 }
 
+static void set_folder_display_item_cb(MainWindow *mainwin, guint action,
+                               GtkWidget *widget)
+{
+       prefs_folder_column_open();
+}
+
 static void sort_summary_cb(MainWindow *mainwin, guint action,
                            GtkWidget *widget)
 {
@@ -3097,8 +3131,24 @@ static void new_account_cb(MainWindow *mainwin, guint action,
 
 static void account_selector_menu_cb(GtkMenuItem *menuitem, gpointer data)
 {
+       FolderItem *item = NULL;
        cur_account = (PrefsAccount *)data;
-       main_window_reflect_prefs_all();
+       
+       if (!mainwindow_get_mainwindow())
+               return;
+       main_window_show_cur_account(mainwindow_get_mainwindow());
+       toolbar_update(TOOLBAR_MAIN, mainwindow_get_mainwindow());
+       main_window_set_menu_sensitive(mainwindow_get_mainwindow());
+       toolbar_main_set_sensitive(mainwindow_get_mainwindow());
+       gtk_button_set_relief(GTK_BUTTON(mainwindow_get_mainwindow()->ac_button), GTK_RELIEF_NONE);
+       item = folderview_get_selected_item(
+                       mainwindow_get_mainwindow()->folderview);
+       if (item) {
+               toolbar_set_compose_button
+                       (mainwindow_get_mainwindow()->toolbar,
+                        FOLDER_TYPE(item->folder) == F_NEWS ? 
+                        COMPOSEBUTTON_NEWS : COMPOSEBUTTON_MAIL);
+       }
 }
 
 static void account_receive_menu_cb(GtkMenuItem *menuitem, gpointer data)
@@ -3252,6 +3302,11 @@ gboolean mainwindow_progressindicator_hook(gpointer source, gpointer userdata)
        return FALSE;
 }
 
+static void sync_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
+{
+       mainwindow_check_synchronise(mainwin, FALSE);
+}
+
 /*
 * End of Source.
 */