diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-08-16 08:33:18 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-08-16 08:33:18 +0000 |
commit | 9219a26e184d7b6e4b378fbb2dc621963dff4b72 (patch) | |
tree | dad263b307aaf396654eb87701e6614afd22520b /src | |
parent | 22677ab8f338de7e1a27507a816fe189298a11ec (diff) |
minor optimization for headerview tooltips.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3155 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/headerview.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/headerview.c b/src/headerview.c index 3e4c0f75..efa2f803 100644 --- a/src/headerview.c +++ b/src/headerview.c @@ -25,6 +25,7 @@ #include <glib.h> #include <glib/gi18n.h> +#include <gtk/gtkversion.h> #include <gtk/gtkwidget.h> #include <gtk/gtkstyle.h> #include <gtk/gtkscrolledwindow.h> @@ -221,13 +222,11 @@ void headerview_init(HeaderView *headerview) void headerview_show(HeaderView *headerview, MsgInfo *msginfo) { headerview_clear(headerview); - gtk_tooltips_enable(headerview->tip); gtk_label_set_text(GTK_LABEL(headerview->from_body_label), msginfo->from ? msginfo->from : _("(No From)")); if (msginfo->from) { - gtk_widget_show(headerview->from_body_label); gtk_tooltips_set_tip(headerview->tip, headerview->from_body_label, msginfo->from, NULL); } @@ -259,7 +258,6 @@ void headerview_show(HeaderView *headerview, MsgInfo *msginfo) msginfo->subject ? msginfo->subject : _("(No Subject)")); if (msginfo->subject) { - gtk_widget_show(headerview->subject_body_label); gtk_tooltips_set_tip(headerview->tip, headerview->subject_body_label, msginfo->subject, NULL); } @@ -324,15 +322,17 @@ void headerview_clear(HeaderView *headerview) gtk_label_set_text(GTK_LABEL(headerview->cc_body_label), ""); gtk_label_set_text(GTK_LABEL(headerview->ng_body_label), ""); gtk_label_set_text(GTK_LABEL(headerview->subject_body_label), ""); - gtk_widget_hide(headerview->from_body_label); gtk_widget_hide(headerview->to_header_label); gtk_widget_hide(headerview->to_body_label); gtk_widget_hide(headerview->cc_header_label); gtk_widget_hide(headerview->cc_body_label); gtk_widget_hide(headerview->ng_header_label); gtk_widget_hide(headerview->ng_body_label); - gtk_widget_hide(headerview->subject_body_label); +#if GTK_CHECK_VERSION(2, 12, 0) + gtk_widget_set_tooltip_text(headerview->from_body_label, NULL); + gtk_widget_set_tooltip_text(headerview->subject_body_label, NULL); +#endif gtk_tooltips_disable(headerview->tip); if (headerview->image && GTK_WIDGET_VISIBLE(headerview->image)) { |