[pan2] - further improve on status icon - added translation strings that i forgot
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] - further improve on status icon - added translation strings that i forgot
- Date: Thu, 5 Jan 2012 21:28:26 +0000 (UTC)
commit 59e121074d44587fe24f3722946a08b6a11af284
Author: Heinrich MÃller <henmull src gnome org>
Date: Thu Jan 5 20:24:45 2012 +0100
- further improve on status icon
- added translation strings that i forgot
pan/data/data.cc | 1 -
pan/gui/gui.cc | 7 +++++--
pan/gui/pan.cc | 23 ++++++++---------------
pan/tasks/task-xover.cc | 1 +
pan/usenet-utils/ssl-utils.h | 20 +++++---------------
5 files changed, 19 insertions(+), 33 deletions(-)
---
diff --git a/pan/data/data.cc b/pan/data/data.cc
index b5828e1..f81b3a0 100644
--- a/pan/data/data.cc
+++ b/pan/data/data.cc
@@ -83,5 +83,4 @@ Data :: fire_group_entered (const Quark& group, unsigned long unread, unsigned l
for (listeners_t::iterator it(_listeners.begin()), end(_listeners.end()); it!=end; )
(*it++)->on_group_entered (group, unread, total);
- std::cerr<<"fire group entered\n";
}
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index 857b8d1..924fcac 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -1937,8 +1937,11 @@ void GUI :: do_read_selected_group ()
}
// fire group_entered for status icon
- _data.get_group_counts (group, unread, total);
- _data.fire_group_entered (group, unread, total);
+ if (changed)
+ {
+ _data.get_group_counts (group, unread, total);
+ _data.fire_group_entered (group, unread, total);
+ }
}
void GUI :: do_mark_selected_groups_read ()
diff --git a/pan/gui/pan.cc b/pan/gui/pan.cc
index 5fc954d..9b13b41 100644
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@ -345,10 +345,7 @@ namespace
}
/* queue::listener */
- virtual void on_queue_task_active_changed (Queue&, Task&, bool active)
- {
- update_status_tooltip();
- }
+ virtual void on_queue_task_active_changed (Queue&, Task&, bool active) {}
virtual void on_queue_tasks_added (Queue&, int index UNUSED, int count)
{
tasks_total += count;
@@ -366,16 +363,18 @@ namespace
tasks_total = total;
tasks_active = active;
if (tasks_total == 0 || tasks_active == 0)
- {
-
- }
+ update_status_icon(ICON_STATUS_IDLE);
update_status_tooltip();
}
virtual void on_queue_online_changed (Queue&, bool online)
{
is_online = online;
- update_status_icon(ICON_STATUS_IDLE);
+ if (tasks_total)
+ update_status_icon(ICON_STATUS_ACTIVE);
+ else
+ update_status_icon(ICON_STATUS_IDLE);
+
update_status_tooltip();
}
@@ -387,18 +386,12 @@ namespace
notify_of(ICON_STATUS_ERROR, message.str, _("An Error has occurred!"));
}
- virtual void on_queue_size_changed (Queue&, unsigned long, unsigned long)
- {
- if (n()) return;
- notif_shown = true;
- }
+ virtual void on_queue_size_changed (Queue&, unsigned long, unsigned long) {}
/* data::listener */
virtual void on_group_entered (const Quark& group, unsigned long unread, unsigned long total)
{
- std::cerr<<"on group entered "<<unread<<"\n";
-
if (unread)
{
update_status_icon(ICON_STATUS_NEW_ARTICLES);
diff --git a/pan/tasks/task-xover.cc b/pan/tasks/task-xover.cc
index c0f4f8b..2482a25 100644
--- a/pan/tasks/task-xover.cc
+++ b/pan/tasks/task-xover.cc
@@ -131,6 +131,7 @@ TaskXOver :: ~TaskXOver ()
_data.set_xover_high (_group, it->first, it->second);
_data.xover_unref (_group);
}
+ _data.fire_group_entered(_group, 1, 0);
}
void
diff --git a/pan/usenet-utils/ssl-utils.h b/pan/usenet-utils/ssl-utils.h
index 86e925c..885de1e 100644
--- a/pan/usenet-utils/ssl-utils.h
+++ b/pan/usenet-utils/ssl-utils.h
@@ -98,7 +98,7 @@ namespace pan
iss = dn_buf;
delete dn_buf;
- // FIXME : LEAVE this out for now
+// LEAVE this out for now
// gnutls_x509_crt_get_subject_unique_id(cert, NULL, &size);
// dn_buf = new char[size];
// gnutls_x509_crt_get_subject_unique_id(cert, dn_buf, &size);
@@ -114,8 +114,8 @@ namespace pan
tags.insert(quarks_p(cleaned_tags[i++],"Organization"));
tags.insert(quarks_p(cleaned_tags[i++],"State"));
tags.insert(quarks_p(cleaned_tags[i++],"Email Address"));
- tags.insert(quarks_p(cleaned_tags[i],"Email Address"));
- tags.insert(quarks_p(cleaned_tags[i],"serialNumber"));
+ tags.insert(quarks_p(cleaned_tags[i], "Email Address"));
+ tags.insert(quarks_p(cleaned_tags[i], "serialNumber"));
}
void parse(std::vector<quarks_p>& i, std::vector<quarks_p>& s)
@@ -214,31 +214,21 @@ namespace pan
char email1[2048], email2[2048];
char tmp1[2048], tmp2[2048];
- g_snprintf(tmp1,sizeof(tmp1), "The current server <b>'%s'</b> sent this security certificate :\n\n", server.c_str());
- g_snprintf(tmp2,sizeof(tmp2), "Certificate information for server <b>'%s'</b> :\n\n", server.c_str());
- size_t md5_size;
- gnutls_x509_crt_get_fingerprint(c, GNUTLS_DIG_MD5, NULL, &md5_size);
- char * md5_buf = new char[size];
- gnutls_x509_crt_get_fingerprint(c, GNUTLS_DIG_MD5, md5_buf, &md5_size);
+ g_snprintf(tmp1,sizeof(tmp1), _("The current server <b>'%s'</b> sent this security certificate :\n\n"), server.c_str());
+ g_snprintf(tmp2,sizeof(tmp2), _("Certificate information for server <b>'%s'</b> :\n\n"), server.c_str());
g_snprintf(buf,size, _("%s"
"<b>Issuer information:</b>\n"
"%s\n"
- //"<b>Subject information: </b>\n"
- //"%s\n"
"<b>Valid until : </b>%s\n\n"
"<b>Not valid before : </b>%s\n\n"),
- //"<b>Fingerprint (MD5) : </b>\n%s\n\n"),
on_connect ? tmp1 : tmp2,
cp.build_complete(p_issuer).c_str(),
- //cp.build_complete(p_subject).c_str(),
until,
before);
-// md5_buf);
g_free (before);
g_free (until);
- delete md5_buf;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]