summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 26e9b2a)
raw | patch | inline | side by side (parent: 26e9b2a)
author | joncruz <joncruz@users.sourceforge.net> | |
Wed, 21 Mar 2007 23:51:04 +0000 (23:51 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Wed, 21 Mar 2007 23:51:04 +0000 (23:51 +0000) |
src/ege-adjustment-action.cpp | patch | blob | history |
index fe26cd87e4b0e8f89994c3c57e3804faeea9b1d2..abe021cf739b485381928442c22b55ed96e8fafd 100644 (file)
#include <gtk/gtklabel.h>
#include <gtk/gtkmisc.h>
#include <gtk/gtktoolbar.h>
+#include <gtk/gtktooltips.h>
#include <gtk/gtkradiomenuitem.h>
#include "ege-adjustment-action.h"
struct _EgeAdjustmentActionPrivate
{
GtkAdjustment* adj;
+ GtkTooltips* toolTips;
GtkWidget* focusWidget;
gdouble climbRate;
guint digits;
{
action->private_data = EGE_ADJUSTMENT_ACTION_GET_PRIVATE( action );
action->private_data->adj = 0;
+ action->private_data->toolTips = 0;
action->private_data->focusWidget = 0;
action->private_data->climbRate = 0.0;
action->private_data->digits = 2;
const gchar* sss = g_value_get_string( &value );
GtkWidget* lbl = gtk_label_new( sss ? sss : "wwww" );
+ {
+ GValue tooltip;
+ memset( &tooltip, 0, sizeof(tooltip) );
+ g_value_init( &tooltip, G_TYPE_STRING );
+ g_object_get_property( G_OBJECT(action), "tooltip", &tooltip );
+ const gchar* tipstr = g_value_get_string( &tooltip );
+ if ( tipstr && *tipstr ) {
+ if ( !action->private_data->toolTips ) {
+ action->private_data->toolTips = gtk_tooltips_new();
+ }
+ gtk_tooltips_set_tip( action->private_data->toolTips, spinbutton, tipstr, 0 );
+ }
+ }
+
gtk_misc_set_alignment( GTK_MISC(lbl), 1.0, 0.5 );
gtk_box_pack_start( GTK_BOX(hb), lbl, FALSE, FALSE, 0 );