[pan2: 236/268] fixes for pgp: wording (gpg->pgp) and some icon show/hide stuff



commit a383e24f1cdc40a4b6a5fbe1d6daa7f008d38f46
Author: Heinrich MÃller <henmull src gnome org>
Date:   Fri Dec 9 16:58:47 2011 +0100

    fixes for pgp: wording (gpg->pgp) and some icon show/hide stuff

 pan/gui/body-pane.cc       |   66 ++++++++++++++++++++++++--------------------
 pan/gui/gui.cc             |    6 ----
 pan/gui/header-pane.h      |    3 +-
 pan/gui/post-ui.cc         |    4 +-
 pan/gui/profiles-dialog.cc |    2 +-
 5 files changed, 40 insertions(+), 41 deletions(-)
---
diff --git a/pan/gui/body-pane.cc b/pan/gui/body-pane.cc
index 9766c40..abbb817 100644
--- a/pan/gui/body-pane.cc
+++ b/pan/gui/body-pane.cc
@@ -50,6 +50,33 @@ extern "C" {
 
 using namespace pan;
 
+/***
+****
+***/
+
+namespace
+{
+
+  enum Icons
+  {
+    ICON_SIG_OK,
+    ICON_SIG_FAIL,
+    NUM_ICONS
+  };
+
+  struct Icon {
+  const guint8 * pixbuf_txt;
+  GdkPixbuf * pixbuf;
+  } icons[NUM_ICONS] = {
+    { icon_sig_ok,          0 },
+    { icon_sig_fail,        0 }
+  };
+}
+
+/***
+****
+***/
+
 /**
 ***  Pixbuf Cache
 **/
@@ -993,6 +1020,7 @@ BodyPane :: append_part (GMimeObject * obj, GtkAllocation * widget_size)
     if (g_mime_content_type_is_type (type, "*", "pgp-signature"))
     {
       bool res = get_gpgsig_from_gmime_part(part);
+      std::cerr<<"1023\n";
       if (res) update_sig_valid(_gpgerr.verify_ok);
     }
 #endif
@@ -1209,6 +1237,7 @@ BodyPane :: set_text_from_message (GMimeMessage * message)
     gtk_text_buffer_get_start_iter  (_buffer, &iter);
     gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW(_text), &iter, 0.0, true, 0.0, 0.0);
   }
+  std::cerr<<"1240\n";
 
 }
 
@@ -1218,33 +1247,6 @@ BodyPane :: refresh ()
   set_text_from_message (_message);
 }
 
-/***
-****
-***/
-
-namespace
-{
-
-  enum Icons
-  {
-    ICON_SIG_OK,
-    ICON_SIG_FAIL,
-    NUM_ICONS
-  };
-
-  struct Icon {
-  const guint8 * pixbuf_txt;
-  GdkPixbuf * pixbuf;
-  } icons[NUM_ICONS] = {
-    { icon_sig_ok,          0 },
-    { icon_sig_fail,        0 }
-  };
-}
-
-/***
-****
-***/
-
 namespace
 {
 
@@ -1306,6 +1308,8 @@ void
 BodyPane :: update_sig_valid(int i)
 {
 
+  std::cerr<<"update sig "<<i<<"\n";
+
   gtk_image_clear(GTK_IMAGE(_sig_icon));
 
   switch (i)
@@ -1346,6 +1350,7 @@ BodyPane :: set_article (const Article& a)
       val = 0;
   }
 #ifdef HAVE_GPGME
+  std::cerr<<"1354\n";
   update_sig_valid(val);
 #endif
   refresh ();
@@ -1360,6 +1365,7 @@ BodyPane :: clear ()
     g_object_unref (_message);
   _message = 0;
   refresh ();
+  update_sig_valid(-1);
 }
 
 void
@@ -1635,9 +1641,6 @@ BodyPane :: BodyPane (Data& data, ArticleCache& cache, Prefs& prefs):
   g_signal_connect (_root, "show", G_CALLBACK(show_cb), this);
 
   gtk_widget_show_all (_root);
-#ifdef HAVE_GPGME
-  update_sig_valid(-1);
-#endif
 }
 
 BodyPane :: ~BodyPane ()
@@ -1649,6 +1652,9 @@ BodyPane :: ~BodyPane ()
 
   if (_message)
     g_object_unref (_message);
+
+  for (int i=0; i<NUM_ICONS; ++i)
+    g_object_unref (icons[i].pixbuf);
 }
 
 
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index ced541b..0ad9389 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -1177,12 +1177,6 @@ GUI :: do_mark_all_flagged()
 }
 
 void
-GUI :: do_mark_all_flagged()
-{
-  _header_pane->mark_all_flagged();
-}
-
-void
 GUI :: step_bookmarks(int step)
 {
   _header_pane->move_to_next_bookmark(step);
diff --git a/pan/gui/header-pane.h b/pan/gui/header-pane.h
index f821845..a516961 100644
--- a/pan/gui/header-pane.h
+++ b/pan/gui/header-pane.h
@@ -106,6 +106,7 @@ namespace pan
       void read_parent_article ();
 
       void mark_all_flagged ();
+      void invert_selection ();
       void move_to_next_bookmark(int);
 
     private:
@@ -123,8 +124,6 @@ namespace pan
       Article* get_first_selected_article ();
       std::set<const Article*> get_full_selection () const;
       std::vector<const Article*> get_full_selection_v () const;
-      void mark_all_flagged ();
-      void invert_selection ();
       const guint get_full_selection_rows_num () const;
       std::set<const Article*> get_nested_selection (bool do_mark_all) const;
       bool set_group (const Quark& group);
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 4c10244..3264685 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -537,8 +537,8 @@ namespace
     { "always-run-editor", 0, N_("Always Run Editor"), 0, 0, G_CALLBACK(do_edit2), false },
     { "remember-charset", 0, N_("Remember Character Encoding for this Group"), 0, 0, G_CALLBACK(on_remember_charset_toggled), true },
     { "master-reply", 0, N_("Thread attached replies"), 0, 0, G_CALLBACK(on_mr_toggled), true },
-    { "gpg-encrypt", 0, N_("GPG-Encrypt the message"), 0, 0, G_CALLBACK(on_enc_toggled), false },
-    { "gpg-sign", 0, N_("GPG-Sign the message"), 0, 0, G_CALLBACK(on_sign_toggled), false },
+    { "gpg-encrypt", 0, N_("PGP-Encrypt the message"), 0, 0, G_CALLBACK(on_enc_toggled), false },
+    { "gpg-sign", 0, N_("PGP-Sign the message"), 0, 0, G_CALLBACK(on_sign_toggled), false },
     { "spellcheck", 0, N_("Check _Spelling"), 0, 0, G_CALLBACK(on_spellcheck_toggled), true }
   };
 
diff --git a/pan/gui/profiles-dialog.cc b/pan/gui/profiles-dialog.cc
index dd31ae5..e6f317d 100644
--- a/pan/gui/profiles-dialog.cc
+++ b/pan/gui/profiles-dialog.cc
@@ -205,7 +205,7 @@ ProfileDialog :: ProfileDialog (const Data         & data,
     gtk_list_store_set (store, &iter, 0, _("Text"),         1, Profile::TEXT, -1);
     gtk_list_store_append (store, &iter);
 #ifdef HAVE_GPGME
-    gtk_list_store_set (store, &iter, 0, _("GPG Signature"),1, Profile::GPGSIG, -1);
+    gtk_list_store_set (store, &iter, 0, _("PGP Signature"),1, Profile::GPGSIG, -1);
     gtk_list_store_append (store, &iter);
 #endif
     gtk_list_store_set (store, &iter, 0, _("Command"),      1, Profile::COMMAND, -1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]