sync with 0.9.12cvs1
authorPaul Mangan <paul@claws-mail.org>
Fri, 25 Jun 2004 05:20:30 +0000 (05:20 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 25 Jun 2004 05:20:30 +0000 (05:20 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/compose.c
src/compose.h
src/gtk/menu.c
src/gtk/menu.h
src/prefs_common.c

index 67132c6..f10a5a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2004-06-23
+
+       * src/prefs_common.c: made the default of confirm_on_exit FALSE.
+
+2004-06-23
+
+       * src/menu.[ch]: added menu_set_active().
+       * src/compose.c: don't change 'View/Auto wrapping' mode when selecting
+         accounts.
+
+2004-06-23
+
+       * src/compose.[ch]: autowrap can be switchd on/off from the compose
+         window.
+
 2004-06-17
 
        * version 0.9.12
index c948ccf..7966bd5 100644 (file)
@@ -1,3 +1,11 @@
+2004-06-25 [paul]      0.9.11cvs17
+
+       * sync with main 0.9.12cvs1
+               see ChangeLog 2004-06-23
+               
+       * src/gtk/menu.c
+               remove unused menu_toggle_toggle()
+
 2004-06-23 [christoph] 0.9.11cvs16
 
        * src/folder.c
index 91d8da9..c7c74a7 100644 (file)
@@ -1,3 +1,18 @@
+2004-06-23
+
+       * src/prefs_common.c: confirm_on_exit ¤Î¥Ç¥Õ¥©¥ë¥È¤ò FALSE ¤Ë¤·¤¿¡£
+
+2004-06-23
+
+       * src/menu.[ch]: menu_set_active() ¤òÄɲá£
+       * src/compose.c: ¥¢¥«¥¦¥ó¥È¤òÁªÂò¤¹¤ë¤È¤­¤Ë¡Öɽ¼¨/¼«Æ°À°·Á¡×¥â¡¼¥É¤ò
+         ÀÚ¤êÂؤ¨¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+
+2004-06-23
+
+       * src/compose.[ch]: ¥á¥Ã¥»¡¼¥¸ºîÀ®¥¦¥£¥ó¥É¥¦¤«¤é¼«Æ°À°·Á¤òÀÚ¤êÂؤ¨
+         ¤é¤ì¤ë¤è¤¦¤Ë¤·¤¿¡£
+
 2004-06-17
 
        * version 0.9.12
index 886aada..ad5e26d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=16
+EXTRA_VERSION=17
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index e5516ad..3868702 100644 (file)
@@ -388,6 +388,10 @@ static void compose_key_press_cb   (GtkWidget      *widget,
                                         Compose        *compose);
 #endif
 
+static void compose_toggle_autowrap_cb (gpointer        data,
+                                        guint           action,
+                                        GtkWidget      *widget);
+
 #if 0
 static void compose_toggle_to_cb       (gpointer        data,
                                         guint           action,
@@ -610,6 +614,8 @@ static GtkItemFactoryEntry compose_entries[] =
                                        "<control>L", compose_wrap_line, 0, NULL},
        {N_("/_Edit/Wrap all long _lines"),
                                        "<control><alt>L", compose_wrap_line_all, 0, NULL},
+       {N_("/_Edit/Aut_o wrapping"),   "<shift><control>L", compose_toggle_autowrap_cb, 0, "<ToggleItem>"},
+       {N_("/_Edit/---"),              NULL, NULL, 0, "<Separator>"},
        {N_("/_Edit/Edit with e_xternal editor"),
                                        "<shift><control>X", compose_ext_editor_cb, 0, NULL},
 #if USE_ASPELL
@@ -753,7 +759,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
                        compose_entry_mark_default_to(compose, item->prefs->default_to);
                }
                if (item && item->ret_rcpt) {
-                       menu_set_toggle(ifactory, "/Message/Request Return Receipt", TRUE);
+                       menu_set_active(ifactory, "/Message/Request Return Receipt", TRUE);
                }
        } else {
                if (mailto) {
@@ -957,7 +963,7 @@ static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
        compose = compose_create(account, COMPOSE_REPLY);
        ifactory = gtk_item_factory_from_widget(compose->menubar);
 
-       menu_set_toggle(ifactory, "/Message/Remove references", FALSE);
+       menu_set_active(ifactory, "/Message/Remove references", FALSE);
        menu_set_sensitive(ifactory, "/Message/Remove references", TRUE);
 
        compose->replyinfo = procmsg_msginfo_get_full_info(msginfo);
@@ -965,7 +971,7 @@ static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
                compose->replyinfo = procmsg_msginfo_copy(msginfo);
 
        if (msginfo->folder && msginfo->folder->ret_rcpt)
-               menu_set_toggle(ifactory, "/Message/Request Return Receipt", TRUE);
+               menu_set_active(ifactory, "/Message/Request Return Receipt", TRUE);
 
        /* Set save folder */
        if (msginfo->folder && msginfo->folder->prefs && msginfo->folder->prefs->save_copy_to_folder) {
@@ -2124,13 +2130,9 @@ static void compose_attach_append(Compose *compose, const gchar *file,
 #if 0 /* NEW COMPOSE GUI */
        if (!compose->use_attach) {
                GtkItemFactory *ifactory;
-               GtkWidget *menuitem;
 
                ifactory = gtk_item_factory_from_widget(compose->menubar);
-               menuitem = gtk_item_factory_get_item(ifactory,
-                                                    "/View/Attachment");
-               gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
-                                              TRUE);
+               menu_set_active(ifactory, "/View/Attachment", TRUE);
        }
 #endif
        ainfo = g_new0(AttachInfo, 1);
@@ -2944,7 +2946,6 @@ compose_current_mail_account(void)
 static void compose_select_account(Compose *compose, PrefsAccount *account,
                                   gboolean init)
 {
-       GtkWidget *menuitem;
        GtkItemFactory *ifactory;
 
        g_return_if_fail(account != NULL);
@@ -2961,15 +2962,10 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
                gtk_table_set_row_spacing(GTK_TABLE(compose->table), 2, 4);
                compose->use_newsgroups = TRUE;
 
-               menuitem = gtk_item_factory_get_item(ifactory, "/View/To");
-               gtk_check_menu_item_set_active
-                       (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
-               gtk_widget_set_sensitive(menuitem, TRUE);
-               menuitem = gtk_item_factory_get_item(ifactory, "/View/Cc");
-               gtk_check_menu_item_set_active
-                       (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
-               gtk_widget_set_sensitive(menuitem, TRUE);
-
+               menu_set_active(ifactory, "/View/To", FALSE);
+               menu_set_sensitive(ifactory, "/View/To", TRUE);
+               menu_set_active(ifactory, "/View/Cc", FALSE);
+               menu_set_sensitive(ifactory, "/View/Cc", TRUE);
                menu_set_sensitive(ifactory, "/View/Followup to", TRUE);
        } else {
                gtk_widget_hide(compose->newsgroups_hbox);
@@ -2978,19 +2974,12 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
                gtk_widget_queue_resize(compose->table_vbox);
                compose->use_newsgroups = FALSE;
 
-               menuitem = gtk_item_factory_get_item(ifactory, "/View/To");
-               gtk_check_menu_item_set_active
-                       (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
-               gtk_widget_set_sensitive(menuitem, FALSE);
-               menuitem = gtk_item_factory_get_item(ifactory, "/View/Cc");
-               gtk_check_menu_item_set_active
-                       (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
-               gtk_widget_set_sensitive(menuitem, FALSE);
-
-               menuitem = gtk_item_factory_get_item(ifactory, "/View/Followup to");
-               gtk_check_menu_item_set_active
-                       (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
-               gtk_widget_set_sensitive(menuitem, FALSE);
+               menu_set_active(ifactory, "/View/To", TRUE);
+               menu_set_sensitive(ifactory, "/View/To", FALSE);
+               menu_set_active(ifactory, "/View/Cc", TRUE);
+               menu_set_sensitive(ifactory, "/View/Cc", FALSE);
+               menu_set_active(ifactory, "/View/Followup to", FALSE);
+               menu_set_sensitive(ifactory, "/View/Followup to", FALSE);
        }
 
        if (account->set_autocc) {
@@ -3012,18 +3001,13 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
                                          COMPOSE_ENTRY_REPLY_TO);
        }
 
-       menuitem = gtk_item_factory_get_item(ifactory, "/View/Ruler");
-       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
-                                      prefs_common.show_ruler);
 #endif
 
 #if USE_GPGME
-       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Sign");
-       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
-                                      account->default_sign);
-       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Encrypt");
-       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
-                                      account->default_encrypt);
+       if (account->default_sign)
+               menu_set_active(ifactory, "/Message/Sign", TRUE);
+       if (account->default_encrypt)
+               menu_set_active(ifactory, "/Message/Encrypt", TRUE);
                                       
        activate_gnupg_mode(compose, account);          
 #endif /* USE_GPGME */
@@ -5197,6 +5181,8 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
        compose->msgid       = NULL;
        compose->boundary    = NULL;
 
+       compose->autowrap       = prefs_common.autowrap;
+
 #if USE_GPGME
        compose->use_signing    = FALSE;
        compose->use_encryption = FALSE;
@@ -5260,6 +5246,8 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
 
        compose_select_account(compose, account, TRUE);
 
+       menu_set_active(ifactory, "/Edit/Auto wrapping", prefs_common.autowrap);
+       menu_set_active(ifactory, "/View/Ruler", prefs_common.show_ruler);
        if (account->set_autocc && account->auto_cc && mode != COMPOSE_REEDIT)
                compose_entry_append(compose, account->auto_cc, COMPOSE_CC);
 
@@ -6754,6 +6742,16 @@ static void compose_key_press_cb(GtkWidget *widget, GdkEventKey *event,
 }
 #endif
 
+static void compose_toggle_autowrap_cb(gpointer data, guint action,
+                                      GtkWidget *widget)
+{
+       Compose *compose = (Compose *)data;
+
+       compose->autowrap = GTK_CHECK_MENU_ITEM(widget)->active;
+       if (compose->autowrap)
+               compose_wrap_line_all_full(compose, TRUE);
+}
+
 #if 0 /* NEW COMPOSE GUI */
 static void compose_toggle_to_cb(gpointer data, guint action,
                                 GtkWidget *widget)
@@ -7182,7 +7180,7 @@ static void text_inserted(GtkWidget *widget, const gchar *text,
        } else
                gtk_editable_insert_text(editable, text, length, position);
 
-       if (prefs_common.autowrap)
+       if (compose->autowrap)
                compose_wrap_line_all_full(compose, TRUE);
 
        gtk_signal_handler_unblock_by_func(GTK_OBJECT(widget),
index efd6f86..622a0c4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 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
@@ -161,6 +161,8 @@ struct _Compose
        gchar   *msgid;
        gchar   *boundary;
 
+       gboolean autowrap;
+
        gboolean use_to;
        gboolean use_cc;
        gboolean use_bcc;
index 051d281..12b1b29 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 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
@@ -26,8 +26,8 @@
 #include <gtk/gtkwidget.h>
 #include <gtk/gtkmenu.h>
 #include <gtk/gtkmenubar.h>
-#include <gtk/gtkitemfactory.h>
 #include <gtk/gtkcheckmenuitem.h>
+#include <gtk/gtkitemfactory.h>
 #include <gtk/gtkbutton.h>
 
 #include "intl.h"
@@ -200,25 +200,15 @@ void menu_set_sensitive_all(GtkMenuShell *menu_shell, gboolean sensitive)
                gtk_widget_set_sensitive(GTK_WIDGET(cur->data), sensitive);
 }
 
-void menu_set_toggle(GtkItemFactory *ifactory, const gchar *path,
-                       gboolean active)
+void menu_set_active(GtkItemFactory *ifactory, const gchar *path,
+                    gboolean is_active)
 {
        GtkWidget *widget;
 
        g_return_if_fail(ifactory != NULL);
 
        widget = gtk_item_factory_get_item(ifactory, path);
-       gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(widget), active);
-}
-
-void menu_toggle_toggle(GtkItemFactory *ifactory, const gchar *path)
-{
-       GtkWidget *widget;
-       
-       g_return_if_fail(ifactory != NULL);
-       
-       widget = gtk_item_factory_get_item(ifactory, path);
-       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), !((GTK_CHECK_MENU_ITEM(widget))->active));
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), is_active);
 }
 
 void menu_button_position(GtkMenu *menu, gint *x, gint *y, gpointer user_data)
index 2f6377c..d66122e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 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
@@ -68,10 +68,10 @@ void menu_set_sensitive             (GtkItemFactory         *ifactory,
 void menu_set_sensitive_all    (GtkMenuShell           *menu_shell,
                                 gboolean                sensitive);
 
-void menu_set_toggle           (GtkItemFactory         *ifactory,
-                                const gchar            *path,
-                                gboolean                active);
-void menu_toggle_toggle                (GtkItemFactory         *ifactory,
+void menu_set_active           (GtkItemFactory         *ifactory,
+                                const gchar            *path,
+                                gboolean                is_active);
+void menu_toggle_active                (GtkItemFactory         *ifactory,
                                 const gchar            *path);
 void menu_button_position      (GtkMenu                *menu,
                                 gint                   *x,
index 07312a8..20b90c6 100644 (file)
@@ -728,7 +728,7 @@ static PrefParam param[] = {
         P_BOOL, &other.checkbtn_addaddrbyclick,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
-       {"confirm_on_exit", "TRUE", &prefs_common.confirm_on_exit, P_BOOL,
+       {"confirm_on_exit", "FALSE", &prefs_common.confirm_on_exit, P_BOOL,
         &other.checkbtn_confonexit,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"clean_trash_on_exit", "FALSE", &prefs_common.clean_on_exit, P_BOOL,