add check if gpg is active
authorThorsten Maerz <torte@netztorte.de>
Sun, 3 Nov 2002 20:37:45 +0000 (20:37 +0000)
committerThorsten Maerz <torte@netztorte.de>
Sun, 3 Nov 2002 20:37:45 +0000 (20:37 +0000)
ChangeLog.claws
configure.in
src/main.c
src/mimeview.c
src/rfc2015.h

index e0987ec..f9b57dd 100644 (file)
@@ -1,3 +1,10 @@
+2002-11-03 [thorsten]  0.8.5claws69
+
+       * src/main.c
+         src/mimeview.c
+         src/rfc2015.h
+               add check if gpg is active
+
 2002-11-03 [thorsten]  0.8.5claws68
 
        * src/toolbar.h
index 13f914a..cda7343 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws68
+EXTRA_VERSION=claws69
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 5aaddc1..14f7c57 100644 (file)
@@ -263,6 +263,7 @@ int main(int argc, char *argv[])
        prefs_common_read_config();
 
 #if USE_GPGME
+       gpg_started = FALSE;
        if (gpgme_check_engine()) {  /* Also does some gpgme init */
                rfc2015_disable_all();
                debug_print("gpgme_engine_version:\n%s\n",
@@ -278,7 +279,9 @@ int main(int argc, char *argv[])
                        if (val & G_ALERTDISABLE)
                                prefs_common.gpg_warning = FALSE;
                }
-       }
+       } else
+               gpg_started = TRUE;
+
        gpgme_register_idle(idle_function_for_gpgme);
 #endif
 
index 65b8f70..6116e65 100644 (file)
@@ -305,7 +305,8 @@ void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
 
        procmime_scan_multipart_message(mimeinfo, fp);
 #if USE_GPGME
-       if (prefs_common.auto_check_signatures)
+       if ((prefs_common.auto_check_signatures)
+           && (gpg_started))
                rfc2015_check_signature(mimeinfo, fp);
        else
                set_unchecked_signature(mimeinfo);
@@ -1064,6 +1065,7 @@ void mimeview_check_signature(MimeView *mimeview)
        FILE *fp;
 
        g_return_if_fail (mimeview_is_signed(mimeview));
+       g_return_if_fail (gpg_started);
 
        mimeinfo = gtk_ctree_node_get_row_data
                (GTK_CTREE(mimeview->ctree), mimeview->opened);
index d9def6f..cf6ca4f 100644 (file)
@@ -45,4 +45,5 @@ gint rfc2015_sign                     (const gchar    *file,
 gint rfc2015_clearsign                 (const gchar    *file,
                                         GSList         *key_list);
 
+gboolean gpg_started;
 #endif /* __RFC2015_H__ */