sync with sylpheed 0.7.0cvs19
authorPaul Mangan <paul@claws-mail.org>
Mon, 28 Jan 2002 12:46:49 +0000 (12:46 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 28 Jan 2002 12:46:49 +0000 (12:46 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/folderview.c
src/importldif.c
src/mainwindow.c
src/prefs_common.c
src/prefs_common.h
src/summaryview.c

index afc122c..d191c60 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2002-01-28
+
+       * src/mainwindow.c
+         src/prefs_common.c: reorganized the menu shortcuts.
+         Added 'View - Toggle summary view'.
+       * src/summaryview.[ch]: summary_toggle_view(): made it public
+         function.
+       * src/prefs_common.[ch]: swapped the position of 'Shortcut key'
+         and 'On exit'.
+       * src/importldif.c: imp_ldif_delete_event(): fixed segfault when
+         closing the dialog with window manager (in more appropriate way).
+
+2002-01-28
+
+       * src/prefs_common.c: implemented shortcut quick changer.
+       * src/folderview.c: folderview_key_pressed()
+         src/summaryview.c: summary_key_pressed(): removed some hardcoded
+         key binds.
+
 2002-01-25
 
        * src/procmime.c:
index fdae5c3..1bc4417 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-28 [paul]      0.7.0claws36
+
+       * sync with sylpheed 0.7.0cvs19
+               see ChangeLog entries for 2002-01-28
+
 2002-01-28 [hoa]       0.7.0claws35
 
        * src/defs.h
index 375cacf..b0030c4 100644 (file)
@@ -1,3 +1,21 @@
+2002-01-28
+
+       * src/mainwindow.c
+         src/prefs_common.c: ¥á¥Ë¥å¡¼¤Î¥·¥ç¡¼¥È¥«¥Ã¥È¤òºÆ¹½À®¡£
+         ¡Öɽ¼¨ - ¥µ¥Þ¥ê¥Ó¥å¡¼¤òÀÚÂءפòÄɲá£
+       * src/summaryview.[ch]: summary_toggle_view(): public ¤Ê´Ø¿ô¤Ë¤·¤¿¡£
+       * src/prefs_common.[ch]: ¡Ö¥·¥ç¡¼¥È¥«¥Ã¥È¥­¡¼¡×¤È¡Ö½ªÎ»»þ¡×¤Î°ÌÃÖ¤ò
+         ¸ò´¹¡£
+       * src/importldif.c: imp_ldif_delete_event(): ¥À¥¤¥¢¥í¥°¤ò¥¦¥£¥ó¥É¥¦
+         ¥Þ¥Í¡¼¥¸¥ã¤ÇÊĤ¸¤¿¤È¤­¤Î segfault ¤ò½¤Àµ(¤è¤êÀµ¤·¤¤ÊýË¡¤Ç)¡£
+
+2002-01-28
+
+       * src/prefs_common.c: ¥·¥ç¡¼¥È¥«¥Ã¥È´Ê°×Êѹ¹µ¡Ç½¤ò¼ÂÁõ¡£
+       * src/folderview.c: folderview_key_pressed()
+         src/summaryview.c: summary_key_pressed(): ¥Ï¡¼¥É¥³¡¼¥É¤µ¤ì¤¿¥­¡¼
+         ¥Ð¥¤¥ó¥É¤ò¤¤¤¯¤Ä¤«ºï½ü¡£
+
 2002-01-25
 
        * src/procmime.c:
index 34420bb..8086585 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws34
+EXTRA_VERSION=claws36
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index dac1107..d3a3f21 100644 (file)
@@ -1476,9 +1476,6 @@ static void folderview_button_released(GtkWidget *ctree, GdkEventButton *event,
        }
 }
 
-#define BREAK_ON_MODIFIER_KEY() \
-       if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) != 0) break
-
 static void folderview_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                   FolderView *folderview)
 {
@@ -1501,18 +1498,8 @@ static void folderview_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                                       folderview->selected);
                }
                break;
-       case GDK_v:
-       case GDK_V:
-       case GDK_g:
-       case GDK_G:
-       case GDK_x:
-       case GDK_X:
-       case GDK_w:
-       case GDK_D:
-       case GDK_Q:
-               BREAK_ON_MODIFIER_KEY();
-               summary_pass_key_press_event(folderview->summaryview, event);
        default:
+               break;
        }
 }
 
index ddc3a6b..51f29d3 100644 (file)
@@ -462,8 +462,7 @@ static void imp_ldif_file_select( void ) {
 }
 
 static gint imp_ldif_delete_event( GtkWidget *widget, GdkEventAny *event, gpointer data ) {
-       impldif_dlg.cancelled = TRUE;
-       gtk_main_quit();
+       imp_ldif_cancel( widget, data );
        return TRUE;
 }
 
index 42b0899..01a1c46 100644 (file)
@@ -450,8 +450,8 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_File/_Export to mbox file..."),  NULL, export_mbox_cb, 0, NULL},
        {N_("/_File/Empty _trash"),             "<shift>D", empty_trash_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
-       {N_("/_File/_Save as..."),              "y", save_as_cb, 0, NULL},
-       {N_("/_File/_Print..."),                "<control>P", print_cb, 0, NULL},
+       {N_("/_File/_Save as..."),              "<control>S", save_as_cb, 0, NULL},
+       {N_("/_File/_Print..."),                NULL, print_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/E_xit"),                    "<control>Q", app_exit_cb, 0, NULL},
 
@@ -480,7 +480,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/_Sort/Sort by s_ize"),      NULL, sort_summary_cb, SORT_BY_SIZE, NULL},
        {N_("/_View/_Sort/Sort by _date"),      NULL, sort_summary_cb, SORT_BY_DATE, NULL},
        {N_("/_View/_Sort/Sort by _from"),      NULL, sort_summary_cb, SORT_BY_FROM, NULL},
-       {N_("/_View/_Sort/Sort by _subject"),NULL, sort_summary_cb, SORT_BY_SUBJECT, NULL},
+       {N_("/_View/_Sort/Sort by _subject"),   NULL, sort_summary_cb, SORT_BY_SUBJECT, NULL},
        {N_("/_View/_Sort/Sort by _color label"),
                                                NULL, sort_summary_cb, SORT_BY_LABEL, NULL},
        {N_("/_View/_Sort/Sort by _mark"),      NULL, sort_summary_cb, SORT_BY_MARK, NULL},
@@ -576,8 +576,8 @@ static GtkItemFactoryEntry mainwin_entries[] =
 
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Go to"),                   NULL, NULL, 0, "<Branch>"},
-       {N_("/_View/_Go to/_Prev message"),     "p", prev_cb, 0, NULL},
-       {N_("/_View/_Go to/_Next message"),     "n", next_cb, 0, NULL},
+       {N_("/_View/_Go to/_Prev message"),     "P", prev_cb, 0, NULL},
+       {N_("/_View/_Go to/_Next message"),     "N", next_cb, 0, NULL},
        {N_("/_View/_Go to/---"),               NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Go to/P_rev unread message"),
                                                "<shift>P", prev_unread_cb, 0, NULL},
@@ -594,43 +594,43 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/_Go to/Next la_beled message"),
                                                NULL, next_labeled_cb, 0, NULL},
        {N_("/_View/_Go to/---"),               NULL, NULL, 0, "<Separator>"},
-       {N_("/_View/_Go to/Other _folder..."),  "<alt>G", goto_folder_cb, 0, NULL},
+       {N_("/_View/_Go to/Other _folder..."),  "G", goto_folder_cb, 0, NULL},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
-       {N_("/_View/Open in new _window"),      "<shift><control>N", open_msg_cb, 0, NULL},
+       {N_("/_View/Open in new _window"),      "<control><alt>N", open_msg_cb, 0, NULL},
        {N_("/_View/_View source"),             "<control>U", view_source_cb, 0, NULL},
        {N_("/_View/Show all _header"),         "<control>H", header_window_show_cb, 0, NULL},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Update"),                  "<control><alt>U", update_summary_cb,  0, NULL},
 
        {N_("/_Message"),                       NULL, NULL, 0, "<Branch>"},
-       {N_("/_Message/Get new ma_il"), "<control><alt>I",      inc_mail_cb, 0, NULL},
+       {N_("/_Message/Get new ma_il"),         "<control>I",   inc_mail_cb, 0, NULL},
        {N_("/_Message/Get from _all accounts"),
                                                "<shift><control>I", inc_all_account_mail_cb, 0, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/Send queued messa_ges"),
                                                NULL, send_queue_cb, 0, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
-       {N_("/_Message/Compose a_n email message"),     "w", compose_mail_cb, 0, NULL},
+       {N_("/_Message/Compose a_n email message"),     "<shift><control>N", compose_mail_cb, 0, NULL},
        {N_("/_Message/Compose a news message"),        NULL,   compose_news_cb, 0, NULL},
        {N_("/_Message/_Reply"),                "<control>R",   reply_cb, COMPOSE_REPLY, NULL},
        {N_("/_Message/Repl_y to sender"),      "<control><alt>R", reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
        {N_("/_Message/Follow-up and reply to"), NULL, reply_cb, COMPOSE_FOLLOWUP_AND_REPLY_TO, NULL},
-       {N_("/_Message/Reply to a_ll"),         "<control><shift>R", reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
+       {N_("/_Message/Reply to a_ll"),         "<shift><control>R", reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
        {N_("/_Message/_Forward"),              "<control><alt>F", reply_cb, COMPOSE_FORWARD, NULL},
        {N_("/_Message/Bounce"),                NULL, reply_cb, COMPOSE_BOUNCE, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/Re-_edit"),              NULL, reedit_cb, 0, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
-       {N_("/_Message/M_ove..."),              "o", move_to_cb, 0, NULL},
-       {N_("/_Message/_Copy..."),              "<shift>O", copy_to_cb, 0, NULL},
-       {N_("/_Message/_Delete"),               "d", delete_cb,  0, NULL},
+       {N_("/_Message/M_ove..."),              "<control>O", move_to_cb, 0, NULL},
+       {N_("/_Message/_Copy..."),              "<shift><control>O", copy_to_cb, 0, NULL},
+       {N_("/_Message/_Delete"),               "<control>D", delete_cb,  0, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/Delete du_plicated messages"),
                                                NULL, delete_duplicated_cb,   0, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/_Mark"),                 NULL, NULL, 0, "<Branch>"},
        {N_("/_Message/_Mark/_Mark"),           NULL, mark_cb,   0, NULL},
-       {N_("/_Message/_Mark/_Unmark"),         "u", unmark_cb, 0, NULL},
+       {N_("/_Message/_Mark/_Unmark"),         "U", unmark_cb, 0, NULL},
        {N_("/_Message/_Mark/---"),             NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/_Mark/Mark as unr_ead"), NULL, mark_as_unread_cb, 0, NULL},
        {N_("/_Message/_Mark/Mark as rea_d"),
@@ -638,7 +638,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Message/_Mark/Mark all _read"),  NULL, mark_all_read_cb, 0, NULL},
 
        {N_("/_Tool"),                          NULL, NULL, 0, "<Branch>"},
-       {N_("/_Tool/_Address book"),            "<control><alt>A", addressbook_open_cb, 0, NULL},
+       {N_("/_Tool/_Address book"),            "<shift><control>A", addressbook_open_cb, 0, NULL},
        {N_("/_Tool/Add sender to address boo_k"),
                                                NULL, add_address_cb, 0, NULL},
        {N_("/_Tool/---"),                      NULL, NULL, 0, "<Separator>"},
@@ -653,7 +653,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Tool/_Create filter rule/by _Subject"),
                                                NULL, create_filter_cb, FILTER_BY_SUBJECT, NULL},
        {N_("/_Tool/---"),                      NULL, NULL, 0, "<Separator>"},
-       {N_("/_Tool/E_xecute"),                 "x", execute_summary_cb, 0, NULL},
+       {N_("/_Tool/E_xecute"),                 "X", execute_summary_cb, 0, NULL},
        {N_("/_Tool/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_Tool/_Log window"),              "<control>L", log_window_show_cb, 0, NULL},
 
index 8a586d8..fbaf969 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -194,13 +194,10 @@ static struct Interface {
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
-       GtkWidget *checkbtn_confonexit;
-       GtkWidget *checkbtn_cleanonexit;
-       GtkWidget *checkbtn_askonclean;
-       GtkWidget *checkbtn_warnqueued;
        GtkWidget *checkbtn_addaddrbyclick;
        GtkWidget *optmenu_recvdialog;
        GtkWidget *optmenu_nextunreadmsgdialog;
+       GtkWidget *keybind_combo;
 } interface;
 
 static struct Other {
@@ -209,6 +206,10 @@ static struct Other {
        GtkWidget *printcmd_entry;
        GtkWidget *exteditor_combo;
        GtkWidget *exteditor_entry;
+       GtkWidget *checkbtn_confonexit;
+       GtkWidget *checkbtn_cleanonexit;
+       GtkWidget *checkbtn_askonclean;
+       GtkWidget *checkbtn_warnqueued;
 } other;
 
 static struct MessageColorButtons {
@@ -674,32 +675,33 @@ static PrefParam param[] = {
        {"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
         P_BOOL, &interface.checkbtn_addaddrbyclick,
         prefs_set_data_from_toggle, prefs_set_toggle},
+
+       /* Other */
+       {"uri_open_command", "netscape -remote 'openURL(%s,raise)'",
+        &prefs_common.uri_cmd, P_STRING,
+        &other.uri_entry, prefs_set_data_from_entry, prefs_set_entry},
+       {"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING,
+        &other.printcmd_entry, prefs_set_data_from_entry, prefs_set_entry},
+       {"ext_editor_command", "gedit %s",
+        &prefs_common.ext_editor_cmd, P_STRING,
+        &other.exteditor_entry, prefs_set_data_from_entry, prefs_set_entry},
+
        {"confirm_on_exit", "TRUE", &prefs_common.confirm_on_exit, P_BOOL,
-        &interface.checkbtn_confonexit,
+        &other.checkbtn_confonexit,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"send_return_receipt", "TRUE", &prefs_common.return_receipt, P_BOOL,
         &send.checkbtn_returnreceipt,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"clean_trash_on_exit", "FALSE", &prefs_common.clean_on_exit, P_BOOL,
-        &interface.checkbtn_cleanonexit,
+        &other.checkbtn_cleanonexit,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"ask_on_cleaning", "TRUE", &prefs_common.ask_on_clean, P_BOOL,
-        &interface.checkbtn_askonclean,
+        &other.checkbtn_askonclean,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"warn_queued_on_exit", "TRUE", &prefs_common.warn_queued_on_exit,
-        P_BOOL, &interface.checkbtn_warnqueued,
+        P_BOOL, &other.checkbtn_warnqueued,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
-       /* Other */
-       {"uri_open_command", "netscape -remote 'openURL(%s,raise)'",
-        &prefs_common.uri_cmd, P_STRING,
-        &other.uri_entry, prefs_set_data_from_entry, prefs_set_entry},
-       {"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING,
-        &other.printcmd_entry, prefs_set_data_from_entry, prefs_set_entry},
-       {"ext_editor_command", "gedit %s",
-        &prefs_common.ext_editor_cmd, P_STRING,
-        &other.exteditor_entry, prefs_set_data_from_entry, prefs_set_entry},
-
        {"kill_score", "-9999", &prefs_common.kill_score, P_INT,
         NULL, NULL, NULL},
        {"important_score", "1", &prefs_common.important_score, P_INT,
@@ -773,6 +775,7 @@ static void prefs_font_selection_key_pressed        (GtkWidget      *widget,
                                                 GdkEventKey    *event,
                                                 gpointer        data);
 static void prefs_font_selection_ok            (GtkButton      *button, GtkEntry *entry);
+static void prefs_keybind_apply_clicked                (GtkWidget      *widget);
 
 static gint prefs_common_deleted       (GtkWidget      *widget,
                                         GdkEventAny    *event,
@@ -2329,12 +2332,10 @@ static void prefs_interface_create(void)
         GtkWidget *vbox_addr;
        GtkWidget *checkbtn_addaddrbyclick;
 
-       GtkWidget *frame_exit;
-       GtkWidget *vbox_exit;
-       GtkWidget *checkbtn_confonexit;
-       GtkWidget *checkbtn_cleanonexit;
-       GtkWidget *checkbtn_askonclean;
-       GtkWidget *checkbtn_warnqueued;
+       GtkWidget *keybind_frame;
+       GtkWidget *keybind_label;
+       GtkWidget *keybind_combo;
+       GtkWidget *keybind_btn;
 
        GtkWidget *hbox2;
        GtkWidget *optmenu_nextunreadmsgdialog;
@@ -2464,29 +2465,46 @@ static void prefs_interface_create(void)
 
        gtk_option_menu_set_menu (GTK_OPTION_MENU (recvdialog_optmenu), recvdialog_optmenu_menu);     */
 
-       /* On Exit */
-       PACK_FRAME (vbox1, frame_exit, _("On exit"));
+PACK_FRAME(vbox1, keybind_frame, _("Shortcut key"));
 
-       vbox_exit = gtk_vbox_new (FALSE, 0);
-       gtk_widget_show (vbox_exit);
-       gtk_container_add (GTK_CONTAINER (frame_exit), vbox_exit);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox_exit), 8);
-
-       PACK_CHECK_BUTTON (vbox_exit, checkbtn_confonexit,
-                          _("Confirm on exit"));
+       vbox2 = gtk_vbox_new (FALSE, 8);
+       gtk_widget_show (vbox2);
+       gtk_container_add (GTK_CONTAINER (keybind_frame), vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
 
-       hbox1 = gtk_hbox_new (FALSE, 32);
+       hbox1 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox1);
-       gtk_box_pack_start (GTK_BOX (vbox_exit), hbox1, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
 
-       PACK_CHECK_BUTTON (hbox1, checkbtn_cleanonexit,
-                          _("Empty trash on exit"));
-       PACK_CHECK_BUTTON (hbox1, checkbtn_askonclean,
-                          _("Ask before emptying"));
-       SET_TOGGLE_SENSITIVITY (checkbtn_cleanonexit, checkbtn_askonclean);
+       keybind_label = gtk_label_new
+               (_("Select the preset of key bindings.\n"
+                  "You can also modify each menu shortcuts by pressing\n"
+                  "any key when placing mouse pointer on the item."));
+       gtk_widget_show (keybind_label);
+       gtk_box_pack_start (GTK_BOX (hbox1), keybind_label, FALSE, FALSE, 0);
+       gtk_label_set_justify (GTK_LABEL (keybind_label), GTK_JUSTIFY_LEFT);
 
-       PACK_CHECK_BUTTON (vbox_exit, checkbtn_warnqueued,
-                          _("Warn if there are queued messages"));
+       hbox1 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
+
+       keybind_combo = gtk_combo_new ();
+       gtk_widget_show (keybind_combo);
+       gtk_box_pack_start (GTK_BOX (hbox1), keybind_combo, TRUE, TRUE, 0);
+       gtkut_combo_set_items (GTK_COMBO (keybind_combo),
+                              _("Default"),
+                              _("Mew / Wanderlust"),
+                              _("Old Sylpheed"),
+                              NULL);
+       gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (keybind_combo)->entry),
+                               FALSE);
+
+       keybind_btn = gtk_button_new_with_label(_(" Apply "));
+       gtk_widget_show (keybind_btn);
+       gtk_box_pack_end (GTK_BOX (hbox1), keybind_btn, FALSE, TRUE, 0);
+       gtk_signal_connect (GTK_OBJECT (keybind_btn), "clicked",
+                           GTK_SIGNAL_FUNC (prefs_keybind_apply_clicked),
+                           NULL);
 
        /* interface.checkbtn_emacs          = checkbtn_emacs; */
        interface.checkbtn_openunread         = checkbtn_openunread;
@@ -2495,10 +2513,7 @@ static void prefs_interface_create(void)
        interface.optmenu_recvdialog          = optmenu_recvdialog;
        interface.checkbtn_addaddrbyclick     = checkbtn_addaddrbyclick;
        interface.optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
-       interface.checkbtn_confonexit         = checkbtn_confonexit;
-       interface.checkbtn_cleanonexit        = checkbtn_cleanonexit;
-       interface.checkbtn_askonclean         = checkbtn_askonclean;
-       interface.checkbtn_warnqueued         = checkbtn_warnqueued;
+       interface.keybind_combo               = keybind_combo;
 }
 
 static void prefs_other_create(void)
@@ -2520,6 +2535,13 @@ static void prefs_other_create(void)
        GtkWidget *exteditor_combo;
        GtkWidget *exteditor_entry;
 
+       GtkWidget *frame_exit;
+       GtkWidget *vbox_exit;
+       GtkWidget *checkbtn_confonexit;
+       GtkWidget *checkbtn_cleanonexit;
+       GtkWidget *checkbtn_askonclean;
+       GtkWidget *checkbtn_warnqueued;
+
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
@@ -2592,12 +2614,41 @@ static void prefs_other_create(void)
                               NULL);
        exteditor_entry = GTK_COMBO (exteditor_combo)->entry;
 
+       /* On Exit */
+       PACK_FRAME (vbox1, frame_exit, _("On exit"));
+
+       vbox_exit = gtk_vbox_new (FALSE, 0);
+       gtk_widget_show (vbox_exit);
+       gtk_container_add (GTK_CONTAINER (frame_exit), vbox_exit);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_exit), 8);
+
+       PACK_CHECK_BUTTON (vbox_exit, checkbtn_confonexit,
+                          _("Confirm on exit"));
+
+       hbox1 = gtk_hbox_new (FALSE, 32);
+       gtk_widget_show (hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox_exit), hbox1, FALSE, FALSE, 0);
+
+       PACK_CHECK_BUTTON (hbox1, checkbtn_cleanonexit,
+                          _("Empty trash on exit"));
+       PACK_CHECK_BUTTON (hbox1, checkbtn_askonclean,
+                          _("Ask before emptying"));
+       SET_TOGGLE_SENSITIVITY (checkbtn_cleanonexit, checkbtn_askonclean);
+
+       PACK_CHECK_BUTTON (vbox_exit, checkbtn_warnqueued,
+                          _("Warn if there are queued messages"));
+
        other.uri_combo = uri_combo;
        other.uri_entry = uri_entry;
        other.printcmd_entry = printcmd_entry;
 
        other.exteditor_combo = exteditor_combo;
        other.exteditor_entry = exteditor_entry;
+
+       other.checkbtn_confonexit  = checkbtn_confonexit;
+       other.checkbtn_cleanonexit = checkbtn_cleanonexit;
+       other.checkbtn_askonclean  = checkbtn_askonclean;
+       other.checkbtn_warnqueued  = checkbtn_warnqueued;
 }
 
 static void date_format_ok_btn_clicked(GtkButton *button, GtkWidget **widget)
@@ -3393,6 +3444,188 @@ static void prefs_font_selection_ok(GtkButton *button, GtkEntry *entry)
        gtk_widget_hide(font_sel_win);
 }
 
+static void prefs_keybind_apply_clicked(GtkWidget *widget)
+{
+       GtkEntry *entry = GTK_ENTRY(GTK_COMBO(interface.keybind_combo)->entry);
+       gchar *text;
+       gchar *rc_str;
+
+       static gchar *default_menurc =
+               "(menu-path \"<Main>/File/Empty trash\" \"\")\n"
+               "(menu-path \"<Main>/File/Save as...\" \"<control>S\")\n"
+               "(menu-path \"<Main>/File/Print...\" \"\")\n"
+               "(menu-path \"<Main>/File/Exit\" \"<control>Q\")\n"
+
+               "(menu-path \"<Main>/Edit/Copy\" \"<control>C\")\n"
+               "(menu-path \"<Main>/Edit/Select all\" \"<control>A\")\n"
+               "(menu-path \"<Main>/Edit/Find in current message...\" \"<control>F\")\n"
+               "(menu-path \"<Main>/Edit/Search messages...\" \"<shift><control>F\")\n"
+
+               "(menu-path \"<Main>/View/Toggle summary view\" \"V\")\n"
+               "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
+               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
+               "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
+               "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
+               "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
+               "(menu-path \"<Main>/View/Go to/Next unread message\" \"<shift>N\")\n"
+               "(menu-path \"<Main>/View/Go to/Other folder...\" \"G\")\n"
+               "(menu-path \"<Main>/View/Open in new window\" \"<control><alt>N\")\n"
+               "(menu-path \"<Main>/View/View source\" \"<control>U\")\n"
+               "(menu-path \"<Main>/View/Show all header\" \"<control>H\")\n"
+               "(menu-path \"<Main>/View/Update\" \"<control><alt>U\")\n"
+
+               "(menu-path \"<Main>/Message/Get new mail\" \"<control>I\")\n"
+               "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><control>I\")\n"
+               "(menu-path \"<Main>/Message/Compose new message\" \"<shift><control>N\")\n"
+               "(menu-path \"<Main>/Message/Reply\" \"<control>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to all\" \"<shift><control>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Forward\" \"<control><alt>F\")\n"
+               "(menu-path \"<Main>/Message/Forward as attachment\" \"\")\n"
+               "(menu-path \"<Main>/Message/Move...\" \"<control>O\")\n"
+               "(menu-path \"<Main>/Message/Copy...\" \"<shift><control>O\")\n"
+               "(menu-path \"<Main>/Message/Delete\" \"<control>D\")\n"
+               "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+
+               "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
+               "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
+               "(menu-path \"<Main>/Tool/Log window\" \"<control>L\")";
+
+       static gchar *mew_wl_menurc =
+               "(menu-path \"<Main>/File/Empty trash\" \"<shift>D\")\n"
+               "(menu-path \"<Main>/File/Save as...\" \"Y\")\n"
+               "(menu-path \"<Main>/File/Print...\" \"\")\n"
+               "(menu-path \"<Main>/File/Exit\" \"<shift>Q\")\n"
+
+               "(menu-path \"<Main>/Edit/Copy\" \"<control>C\")\n"
+               "(menu-path \"<Main>/Edit/Select all\" \"<control>A\")\n"
+               "(menu-path \"<Main>/Edit/Find in current message...\" \"<control>F\")\n"
+               "(menu-path \"<Main>/Edit/Search messages...\" \"<control>S\")\n"
+
+               "(menu-path \"<Main>/View/Toggle summary view\" \"V\")\n"
+               "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
+               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
+               "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
+               "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
+               "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
+               "(menu-path \"<Main>/View/Go to/Next unread message\" \"<shift>N\")\n"
+               "(menu-path \"<Main>/View/Go to/Other folder...\" \"G\")\n"
+               "(menu-path \"<Main>/View/Open in new window\" \"<control><alt>N\")\n"
+               "(menu-path \"<Main>/View/View source\" \"<control>U\")\n"
+               "(menu-path \"<Main>/View/Show all header\" \"<control>H\")\n"
+               "(menu-path \"<Main>/View/Update\" \"<control><alt>U\")\n"
+
+               "(menu-path \"<Main>/Message/Get new mail\" \"<control>I\")\n"
+               "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><control>I\")\n"
+               "(menu-path \"<Main>/Message/Compose new message\" \"W\")\n"
+               "(menu-path \"<Main>/Message/Reply\" \"<control>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to all\" \"<shift>A\")\n"
+               "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Forward\" \"F\")\n"
+               "(menu-path \"<Main>/Message/Forward as attachment\" \"<shift>F\")\n"
+               "(menu-path \"<Main>/Message/Move...\" \"O\")\n"
+               "(menu-path \"<Main>/Message/Copy...\" \"<shift>O\")\n"
+               "(menu-path \"<Main>/Message/Delete\" \"D\")\n"
+               "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+
+               "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
+               "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
+               "(menu-path \"<Main>/Tool/Log window\" \"<control>L\")";
+
+       static gchar *old_sylpheed_menurc =
+               "(menu-path \"<Main>/File/Empty trash\" \"\")\n"
+               "(menu-path \"<Main>/File/Save as...\" \"\")\n"
+               "(menu-path \"<Main>/File/Print...\" \"<alt>P\")\n"
+               "(menu-path \"<Main>/File/Exit\" \"<alt>Q\")\n"
+
+               "(menu-path \"<Main>/Edit/Copy\" \"<control>C\")\n"
+               "(menu-path \"<Main>/Edit/Select all\" \"<control>A\")\n"
+               "(menu-path \"<Main>/Edit/Find in current message...\" \"<control>F\")\n"
+               "(menu-path \"<Main>/Edit/Search messages...\" \"<control>S\")\n"
+
+               "(menu-path \"<Main>/View/Toggle summary view\" \"V\")\n"
+               "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
+               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
+               "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
+               "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
+               "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
+               "(menu-path \"<Main>/View/Go to/Next unread message\" \"<shift>N\")\n"
+               "(menu-path \"<Main>/View/Go to/Other folder...\" \"<alt>G\")\n"
+               "(menu-path \"<Main>/View/Open in new window\" \"<shift><control>N\")\n"
+               "(menu-path \"<Main>/View/View source\" \"<control>U\")\n"
+               "(menu-path \"<Main>/View/Show all header\" \"<control>H\")\n"
+               "(menu-path \"<Main>/View/Update\" \"<alt>U\")\n"
+
+               "(menu-path \"<Main>/Message/Get new mail\" \"<alt>I\")\n"
+               "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><alt>I\")\n"
+               "(menu-path \"<Main>/Message/Compose new message\" \"<alt>N\")\n"
+               "(menu-path \"<Main>/Message/Reply\" \"<alt>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to all\" \"<shift><alt>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to sender\" \"<control><alt>R\")\n"
+               "(menu-path \"<Main>/Message/Forward\" \"<shift><alt>F\")\n"
+               "(menu-path \"<Main>/Message/Forward as attachment\" \"<shift><control>F\")\n"
+               "(menu-path \"<Main>/Message/Move...\" \"<alt>O\")\n"
+               "(menu-path \"<Main>/Message/Copy...\" \"\")\n"
+               "(menu-path \"<Main>/Message/Delete\" \"<alt>D\")\n"
+               "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+
+               "(menu-path \"<Main>/Tool/Address book\" \"<alt>A\")\n"
+               "(menu-path \"<Main>/Tool/Execute\" \"<alt>X\")\n"
+               "(menu-path \"<Main>/Tool/Log window\" \"<alt>L\")";
+
+       static gchar *empty_menurc =
+               "(menu-path \"<Main>/File/Empty trash\" \"\")\n"
+               "(menu-path \"<Main>/File/Save as...\" \"\")\n"
+               "(menu-path \"<Main>/File/Print...\" \"\")\n"
+               "(menu-path \"<Main>/File/Exit\" \"\")\n"
+
+               "(menu-path \"<Main>/Edit/Copy\" \"\")\n"
+               "(menu-path \"<Main>/Edit/Select all\" \"\")\n"
+               "(menu-path \"<Main>/Edit/Find in current message...\" \"\")\n"
+               "(menu-path \"<Main>/Edit/Search messages...\" \"\")\n"
+
+               "(menu-path \"<Main>/View/Thread view\" \"\")\n"
+               "(menu-path \"<Main>/View/Unthread view\" \"\")\n"
+               "(menu-path \"<Main>/View/Go to/Prev message\" \"\")\n"
+               "(menu-path \"<Main>/View/Go to/Next message\" \"\")\n"
+               "(menu-path \"<Main>/View/Go to/Other folder...\" \"\")\n"
+               "(menu-path \"<Main>/View/Open in new window\" \"\")\n"
+               "(menu-path \"<Main>/View/View source\" \"\")\n"
+               "(menu-path \"<Main>/View/Show all header\" \"\")\n"
+               "(menu-path \"<Main>/View/Update\" \"\")\n"
+
+               "(menu-path \"<Main>/Message/Get new mail\" \"\")\n"
+               "(menu-path \"<Main>/Message/Get from all accounts\" \"\")\n"
+               "(menu-path \"<Main>/Message/Compose new message\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to all\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Forward\" \"\")\n"
+               "(menu-path \"<Main>/Message/Forward as attachment\" \"\")\n"
+               "(menu-path \"<Main>/Message/Move...\" \"\")\n"
+               "(menu-path \"<Main>/Message/Copy...\" \"\")\n"
+               "(menu-path \"<Main>/Message/Delete\" \"\")\n"
+               "(menu-path \"<Main>/Message/Mark/Unmark\" \"\")\n"
+
+               "(menu-path \"<Main>/Tool/Address book\" \"\")\n"
+               "(menu-path \"<Main>/Tool/Execute\" \"\")\n"
+               "(menu-path \"<Main>/Tool/Log window\" \"\")";
+
+       text = gtk_entry_get_text(entry);
+
+       if (!strcmp(text, _("Default")))
+               rc_str = default_menurc;
+       else if (!strcmp(text, _("Mew / Wanderlust")))
+               rc_str = mew_wl_menurc;
+       else if (!strcmp(text, _("Old Sylpheed")))
+               rc_str = old_sylpheed_menurc;
+       else
+               return;
+
+       gtk_item_factory_parse_rc_string(empty_menurc);
+       gtk_item_factory_parse_rc_string(rc_str);
+}
+
 static void prefs_common_charset_set_data_from_optmenu(PrefParam *pparam)
 {
        GtkWidget *menu;
index d268f7d..e9abfd8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -205,16 +205,16 @@ struct _PrefsCommon
        NextUnreadMsgDialogShow next_unread_msg_dialog;
        gboolean add_address_by_click;
 
+       /* Other */
+       gchar *uri_cmd;
+       gchar *print_cmd;
+       gchar *ext_editor_cmd;
+
        gboolean confirm_on_exit;
        gboolean clean_on_exit;
        gboolean ask_on_clean;
        gboolean warn_queued_on_exit;
        gboolean return_receipt;
-
-       /* Other */
-       gchar *uri_cmd;
-       gchar *print_cmd;
-       gchar *ext_editor_cmd;
 };
 
 extern PrefsCommon prefs_common;
index 2b07f57..01a0c86 100644 (file)
@@ -4346,24 +4346,17 @@ void summary_pass_key_press_event(SummaryView *summaryview, GdkEventKey *event)
 #define RETURN_IF_LOCKED() \
        if (summaryview->mainwin->lock_count) return
 
-#define KEY_PRESS_EVENT_STOP() \
-       if (gtk_signal_n_emissions_by_name \
-               (GTK_OBJECT(ctree), "key_press_event") > 0) { \
-               gtk_signal_emit_stop_by_name(GTK_OBJECT(ctree), \
-                                            "key_press_event"); \
-       }
-
 static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                SummaryView *summaryview)
 {
        GtkCTree *ctree = GTK_CTREE(widget);
        GtkCTreeNode *node;
-       FolderItem *to_folder;
 
        if (summary_is_locked(summaryview)) return;
        if (!event) return;
 
        switch (event->keyval) {
+       case GDK_Left:          /* Move focus */
        case GDK_Escape:
                gtk_widget_grab_focus(summaryview->folderview->ctree);
                return;
@@ -4390,6 +4383,9 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                          FALSE))
                        summary_select_next_unread(summaryview);
                break;
+       case GDK_BackSpace:     /* Page up */
+               textview_scroll_page(summaryview->messageview->textview, TRUE);
+               break;
        case GDK_Return:        /* Scroll up/down one line */
                if (summaryview->displayed != summaryview->selected) {
                        summary_display_msg(summaryview,
@@ -4399,29 +4395,22 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                textview_scroll_one_line(summaryview->messageview->textview,
                                         (event->state & GDK_MOD1_MASK) != 0);
                break;
-       case GDK_Delete:
-               RETURN_IF_LOCKED();
-               BREAK_ON_MODIFIER_KEY();
-               summary_delete(summaryview);
-               break;
-       case GDK_asterisk:      /* Mark */
+       case GDK_asterisk:      /* Mark */
                summary_mark(summaryview);
                break;
-       case GDK_exclam:        /* Mark as unread */
+       case GDK_exclam:        /* Mark as unread */
                summary_mark_as_unread(summaryview);
                break;
-       case GDK_BackSpace:     /* Page up */
-               textview_scroll_page(summaryview->messageview->textview, TRUE);
+       case GDK_Delete:
+               RETURN_IF_LOCKED();
+               BREAK_ON_MODIFIER_KEY();
+               summary_delete(summaryview);
                break;
        default:
                break;
        }
 }
 
-#undef BREAK_ON_MODIFIER_KEY
-#undef RETURN_IF_LOCKED
-#undef KEY_PRESS_EVENT_STOP
-
 static void summary_open_row(GtkSCTree *sctree, SummaryView *summaryview)
 {
        if (summaryview->folder_item->stype == F_OUTBOX ||