2004-12-03 [christoph] 0.9.12cvs181
authorChristoph Hohmann <reboot@gmx.ch>
Fri, 3 Dec 2004 16:18:07 +0000 (16:18 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Fri, 3 Dec 2004 16:18:07 +0000 (16:18 +0000)
* src/compose.c
build the Privacy System menu without GtkItemFactory to
allow '/' in Privacy System names

* src/plugins/pgpmime/pgpmime.c
* src/plugins/pgpmime/plugin.c
Update description and change Privacy System name

ChangeLog.claws
PATCHSETS
configure.ac
src/compose.c
src/plugins/pgpmime/pgpmime.c
src/plugins/pgpmime/plugin.c
src/plugins/pgpmime/prefs_gpg.c
src/plugins/pgpmime/prefs_gpg.glade

index a0472f2..c20061f 100644 (file)
@@ -1,3 +1,13 @@
+2004-12-03 [christoph] 0.9.12cvs181
+
+       * src/compose.c
+               build the Privacy System menu without GtkItemFactory to
+               allow '/' in Privacy System names
+
+       * src/plugins/pgpmime/pgpmime.c
+       * src/plugins/pgpmime/plugin.c
+               Update description and change Privacy System name
+
 2004-12-03 [paul]
 
        * src/pixmaps/dir_close.xpm
index e0f1ea0..593dafb 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.458 -r 1.459 src/compose.c; ) > 0.9.12cvs178.patchset
 ( cvs diff -u -r 1.459 -r 1.460 src/compose.c; ) > 0.9.12cvs179.patchset
 ( cvs diff -u -r 1.447 -r 1.448 ChangeLog; cvs diff -u -r 1.442 -r 1.443 ChangeLog.jp; cvs diff -u -r 1.189 -r 1.190 src/Makefile.am; cvs diff -u -r 1.71 -r 1.72 src/pop.c; cvs diff -u -r 1.59 -r 1.60 src/common/utils.c; cvs diff -u -r 1.35 -r 1.36 src/common/utils.h; cvs diff -u -r -1.1.1.1 -r -1.1.1.2 src/pixmaps/folder.xpm; ) > 0.9.12cvs180.patchset
+( cvs diff -u -r 1.460 -r 1.461 src/compose.c; cvs diff -u -r 1.14 -r 1.15 src/plugins/pgpmime/pgpmime.c; cvs diff -u -r 1.7 -r 1.8 src/plugins/pgpmime/plugin.c; cvs diff -u -r 1.3 -r 1.4 src/plugins/pgpmime/prefs_gpg.c; cvs diff -u -r 1.2 -r 1.3 src/plugins/pgpmime/prefs_gpg.glade; ) > 0.9.12cvs181.patchset
index 6f22fad..407dd6d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=180
+EXTRA_VERSION=181
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 13f4e79..b7b025b 100644 (file)
@@ -425,9 +425,8 @@ static void compose_toggle_sign_cb  (gpointer        data,
 static void compose_toggle_encrypt_cb  (gpointer        data,
                                         guint           action,
                                         GtkWidget      *widget);
-static void compose_set_privacy_system_cb(gpointer        data,
-                                        guint           action,
-                                        GtkWidget      *widget);
+static void compose_set_privacy_system_cb(GtkWidget      *widget,
+                                         gpointer        data);
 static void compose_update_privacy_system_menu_item(Compose * compose);
 static void activate_privacy_system     (Compose *compose, 
                                          PrefsAccount *account);
@@ -648,7 +647,7 @@ static GtkItemFactoryEntry compose_entries[] =
 #endif
        {N_("/_Options"),               NULL, NULL, 0, "<Branch>"},
        {N_("/_Options/Privacy System"),                NULL, NULL,   0, "<Branch>"},
-       {N_("/_Options/Privacy System/None"),   NULL, compose_set_privacy_system_cb,   0, "<RadioItem>"},
+       {N_("/_Options/Privacy System/None"),   NULL, NULL,   0, "<RadioItem>"},
        {N_("/_Options/Si_gn"),         NULL, compose_toggle_sign_cb   , 0, "<ToggleItem>"},
        {N_("/_Options/_Encrypt"),      NULL, compose_toggle_encrypt_cb, 0, "<ToggleItem>"},
        {N_("/_Options/---"),           NULL,           NULL,   0, "<Separator>"},
@@ -4980,15 +4979,18 @@ static void compose_update_priority_menu_item(Compose * compose)
        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
 }      
 
-static void compose_set_privacy_system_cb(gpointer data,
-                                         guint action,
-                                         GtkWidget *widget)
+static void compose_set_privacy_system_cb(GtkWidget *widget, gpointer data)
 {
        Compose *compose = (Compose *) data;
        gchar *systemid;
        GtkItemFactory *ifactory;
        gboolean can_sign = FALSE, can_encrypt = FALSE;
 
+       g_return_if_fail(GTK_IS_CHECK_MENU_ITEM(widget));
+
+       if (!GTK_CHECK_MENU_ITEM(widget)->active)
+               return;
+
        systemid = gtk_object_get_data(GTK_OBJECT(widget), "privacy_system");
        g_free(compose->privacy_system);
        compose->privacy_system = NULL;
@@ -4999,6 +5001,8 @@ static void compose_set_privacy_system_cb(gpointer data,
                can_encrypt = privacy_system_can_encrypt(systemid);
        }
 
+       debug_print("activated privacy system: %s\n", systemid != NULL ? systemid : "None");
+
        ifactory = gtk_item_factory_from_widget(compose->menubar);
        menu_set_sensitive(ifactory, "/Options/Sign", can_sign);
        menu_set_sensitive(ifactory, "/Options/Encrypt", can_encrypt);
@@ -5083,18 +5087,18 @@ void compose_update_actions_menu(Compose *compose)
 void compose_update_privacy_systems_menu(Compose *compose)
 {
        static gchar *branch_path = "/Options/Privacy System";
+       static gboolean connected = FALSE;
        GtkItemFactory *ifactory;
        GtkWidget *menuitem;
-       gchar *menu_path;
        GSList *systems, *cur;
        GList *amenu;
-       GtkItemFactoryEntry ifentry = {NULL, NULL, NULL, 0, "<Branch>"};
        GtkWidget *widget;
+       GtkWidget *system_none;
+       GSList *group;
 
        ifactory = gtk_item_factory_from_widget(compose->menubar);
 
        /* remove old entries */
-       ifentry.path = branch_path;
        menuitem = gtk_item_factory_get_widget(ifactory, branch_path);
        g_return_if_fail(menuitem != NULL);
 
@@ -5105,26 +5109,29 @@ void compose_update_privacy_systems_menu(Compose *compose)
                amenu = alist;
        }
 
-       ifentry.accelerator     = NULL;
-       ifentry.callback_action = 0;
-       ifentry.callback        = compose_set_privacy_system_cb;
-       ifentry.item_type       = "/Options/Privacy System/None";
+       system_none = gtk_item_factory_get_widget(ifactory,
+               "/Options/Privacy System/None");
+       if (!connected) {
+               gtk_signal_connect(GTK_OBJECT(system_none), "activate",
+                       GTK_SIGNAL_FUNC(compose_set_privacy_system_cb), compose);
+               connected = TRUE;
+       }
 
        systems = privacy_get_system_ids();
        for (cur = systems; cur != NULL; cur = g_slist_next(cur)) {
                gchar *systemid = cur->data;
 
-               menu_path = g_strdup_printf("%s/%s", branch_path,
-                                           privacy_system_get_name(systemid));
-               ifentry.path = menu_path;
-               gtk_item_factory_create_item(ifactory, &ifentry, compose, 1);
-               widget = gtk_item_factory_get_widget(ifactory, menu_path);
-
+               group = gtk_radio_menu_item_group(GTK_RADIO_MENU_ITEM(system_none));
+               widget = gtk_radio_menu_item_new_with_label(group,
+                       privacy_system_get_name(systemid));
                gtk_object_set_data_full(GTK_OBJECT(widget), "privacy_system",
                                         g_strdup(systemid), g_free);
+               gtk_signal_connect(GTK_OBJECT(widget), "activate",
+                       GTK_SIGNAL_FUNC(compose_set_privacy_system_cb), compose);
 
+               gtk_menu_append(GTK_MENU(system_none->parent), widget);
+               gtk_widget_show(widget);
                g_free(systemid);
-               g_free(menu_path);
        }
        g_slist_free(systems);
 }
index aab97d7..4484bc0 100644 (file)
@@ -590,7 +590,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
 
 static PrivacySystem pgpmime_system = {
        "pgpmime",                      /* id */
-       "PGP Mime",                     /* name */
+       "PGP/MIME",                     /* name */
 
        pgpmime_free_privacydata,       /* free_privacydata */
 
index d63698f..fa18b03 100644 (file)
@@ -64,11 +64,13 @@ const gchar *plugin_name(void)
 
 const gchar *plugin_desc(void)
 {
-       return _("This plugin enables signature verification of "
-                "digitally signed messages, and decryption of "
-                "encrypted messages. \n"
+       return _("This plugin handles PGP/MIME signed and/or encrypted "
+                "mails. You can decrypt mails, verify signatures or "
+                 "sign and encrypt your own mails.\n"
                 "\n"
-                "You don't need it to send signed or encrypted emails.");
+                "The plugin uses the GPGME library as a wrapper for GnuPG.\n"
+                "\n"
+                "GPGME is copyright 2001 by Werner Koch <dd9jn@gnu.org>\n");
 }
 
 const gchar *plugin_type(void)
index aa326ff..6990ec3 100644 (file)
@@ -274,7 +274,7 @@ static void prefs_gpg_account_create_widget_func(PrefsPage *_page,
        frame1 = gtk_frame_new(_("Sign key"));
        gtk_widget_show(frame1);
        gtk_box_pack_start(GTK_BOX(vbox), frame1, FALSE, FALSE, 0);
-       gtk_frame_set_label_align(GTK_FRAME(frame1), 4.84288e-08, 0.5);
+       gtk_frame_set_label_align(GTK_FRAME(frame1), 0.0, 0.5);
 
        table1 = gtk_table_new(4, 3, FALSE);
        gtk_widget_show(table1);
index 6d01bbf..394906f 100644 (file)
       <class>GtkFrame</class>
       <name>frame1</name>
       <label>Sign key</label>
-      <label_xalign>4.84288e-08</label_xalign>
+      <label_xalign>0</label_xalign>
       <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
        <padding>0</padding>