Branch: refs/heads/1.22_release Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 08 Jul 2012 11:19:47 Commit: 7dde896b0f8fde07c2ecaf73473b468f246f37e4 https://github.com/geany/geany-plugins/commit/7dde896b0f8fde07c2ecaf73473b46...
Log Message: ----------- GeanyPG: Don't mix declarations and code
Modified Paths: -------------- geanypg/src/decrypt_cb.c geanypg/src/encrypt_cb.c geanypg/src/geanypg.c geanypg/src/key_selection_dialog.c geanypg/src/sign_cb.c geanypg/src/verify_aux.c geanypg/src/verify_cb.c
Modified: geanypg/src/decrypt_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -64,8 +64,9 @@ static void geanypg_decrypt_verify(encrypt_data * ed) void geanypg_decrypt_cb(GtkMenuItem * menuitem, gpointer user_data) { encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_protocol(ed.ctx, GPGME_PROTOCOL_OpenPGP);
Modified: geanypg/src/encrypt_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -60,8 +60,9 @@ void geanypg_encrypt_cb(GtkMenuItem * menuitem, gpointer user_data) { int sign; encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_armor(ed.ctx, 1);
Modified: geanypg/src/geanypg.c 16 files changed, 11 insertions(+), 5 deletions(-) =================================================================== @@ -64,6 +64,12 @@ gpgme_error_t geanypg_show_err_msg(gpgme_error_t err)
void plugin_init(GeanyData *data) { + GtkWidget * submenu; + GtkWidget * encrypt; + GtkWidget * sign; + GtkWidget * decrypt; + GtkWidget * verify; + gpgme_error_t err = geanypg_init_gpgme(); if (err) { @@ -74,12 +80,12 @@ void plugin_init(GeanyData *data) main_menu_item = gtk_menu_item_new_with_mnemonic("GeanyPG"); gtk_widget_show(main_menu_item);
- GtkWidget * submenu = gtk_menu_new(); + submenu = gtk_menu_new(); gtk_widget_show(submenu); - GtkWidget * encrypt = gtk_menu_item_new_with_mnemonic(_("Encrypt")); - GtkWidget * sign = gtk_menu_item_new_with_mnemonic(_("Sign")); - GtkWidget * decrypt = gtk_menu_item_new_with_mnemonic(_("Decrypt / Verify")); - GtkWidget * verify = gtk_menu_item_new_with_mnemonic(_("Verify detached signature")); + encrypt = gtk_menu_item_new_with_mnemonic(_("Encrypt")); + sign = gtk_menu_item_new_with_mnemonic(_("Sign")); + decrypt = gtk_menu_item_new_with_mnemonic(_("Decrypt / Verify")); + verify = gtk_menu_item_new_with_mnemonic(_("Verify detached signature"));
gtk_widget_show(encrypt); gtk_widget_show(sign);
Modified: geanypg/src/key_selection_dialog.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -135,10 +135,11 @@ int geanypg_encrypt_selection_dialog(encrypt_data * ed, gpgme_key_t ** selected, GtkTreeIter iter; listdata data; gboolean active; + GtkListStore * list;
*sign = 0;
- GtkListStore * list = geanypg_makelist(ed->key_array, ed->nkeys, 0); + list = geanypg_makelist(ed->key_array, ed->nkeys, 0); listview = geanypg_listview(list, &data); scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollwin),
Modified: geanypg/src/sign_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -56,8 +56,9 @@ static void geanypg_sign(encrypt_data * ed) void geanypg_sign_cb(GtkMenuItem * menuitem, gpointer user_data) { encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; ed.key_array = NULL;
Modified: geanypg/src/verify_aux.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -162,11 +162,12 @@ void geanypg_check_sig(encrypt_data * ed, gpgme_signature_t sig) GtkWidget * dialog; gpgme_sigsum_t summary; char buffer[512]; + char * result; strncpy(buffer, sig->fpr, 40); buffer[40] = 0; geanypg_get_keys_with_fp(ed, buffer); summary = sig->summary; - char * result = geanypg_result(sig); + result = geanypg_result(sig);
dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
Modified: geanypg/src/verify_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -62,8 +62,9 @@ void geanypg_verify_cb(GtkMenuItem * menuitem, gpointer user_data) { char * sigfile = NULL; encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_protocol(ed.ctx, GPGME_PROTOCOL_OpenPGP);
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org