fix gpg account default signing/encrypting setting bug
authorPaul Mangan <paul@claws-mail.org>
Thu, 14 Mar 2002 16:29:36 +0000 (16:29 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 14 Mar 2002 16:29:36 +0000 (16:29 +0000)
ChangeLog.claws
configure.in
src/compose.c

index c49d3a4..b64d061 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-14 [paul]      0.7.4claws6
+
+       * src/compose.c
+               fix bug #515655. honour account preferences
+               regarding gpg default signing/encryption when 
+               changing account from the compose window.
+
 2002-03-14 [paul]      0.7.4claws5
 
        * src/folderview.c
index b0e4cfe..1945544 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws5
+EXTRA_VERSION=claws6
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 3c17d04..bdc2cea 100644 (file)
@@ -5695,6 +5695,10 @@ static void toolbar_address_cb(GtkWidget *widget, gpointer data)
 
 static void select_account(Compose * compose, PrefsAccount * ac)
 {
+#if USE_GPGME
+       GtkItemFactory *ifactory;
+       GtkWidget *menuitem;
+#endif /* USE_GPGME */
        compose->account = ac;
        compose_set_title(compose);
 
@@ -5769,6 +5773,39 @@ static void select_account(Compose * compose, PrefsAccount * ac)
                }
                gtk_widget_queue_resize(compose->table_vbox);
 #endif
+#if USE_GPGME
+               if (ac->default_sign) {
+                       ifactory = gtk_item_factory_from_widget(compose->menubar);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/Sign", TRUE);
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Sign");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+               } else {
+                       ifactory = gtk_item_factory_from_widget(compose->menubar);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/Sign", TRUE);
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Sign");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
+               }
+               if (ac->default_encrypt) {
+                       ifactory = gtk_item_factory_from_widget(compose->menubar);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/Encrypt", TRUE);
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Encrypt");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+               } else {
+                       ifactory = gtk_item_factory_from_widget(compose->menubar);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/Encrypt", TRUE);
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Encrypt");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
+               }
+#endif /* USE_GPGME */
+
 }
 
 static void account_activated(GtkMenuItem *menuitem, gpointer data)