diff options
| author | John Bintz <me@johnbintz.com> | 2008-04-22 23:09:01 +0000 |
|---|---|---|
| committer | johncoswell <johncoswell@users.sourceforge.net> | 2008-04-22 23:09:01 +0000 |
| commit | 9e97c60a21f1851a404a54f437db2223400ca7a6 (patch) | |
| tree | 6cb904fce7f80e36dc8297d291c61b20849681f4 /src | |
| parent | r19083@shi: ted | 2008-04-21 16:09:24 -0700 (diff) | |
| download | inkscape-9e97c60a21f1851a404a54f437db2223400ca7a6.tar.gz inkscape-9e97c60a21f1851a404a54f437db2223400ca7a6.zip | |
Keep swatch status messages visible while hovering
(bzr r5491)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dialogs/swatches.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index 3b62f0186..667149916 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -26,7 +26,7 @@ #include <gdkmm/pixbuf.h> #include "inkscape.h" #include "desktop.h" -#include "message-stack.h" +#include "message-context.h" #include "document.h" #include "desktop-handles.h" #include "extension/db.h" @@ -245,10 +245,12 @@ static gboolean handleEnterNotify( GtkWidget* widget, GdkEventCrossing* event, g if ( item ) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; if ( desktop ) { - desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, g_strconcat( + desktop->tipsMessageContext()->set(Inkscape::INFORMATION_MESSAGE, g_strconcat( _("Swatch info: <b>"), item->def.descr.c_str(), _("</b>"), + _(" - "), + _("<b>Click</b> to set fill, <b>Shift+click</b> to set stroke"), NULL )); } @@ -256,6 +258,17 @@ static gboolean handleEnterNotify( GtkWidget* widget, GdkEventCrossing* event, g return FALSE; } +static gboolean handleLeaveNotify( GtkWidget* widget, GdkEventCrossing* event, gpointer callback_data ) { + ColorItem* item = reinterpret_cast<ColorItem*>(callback_data); + if ( item ) { + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + if ( desktop ) { + desktop->tipsMessageContext()->clear(); + } + } + return FALSE; +} + static GtkWidget* popupMenu = 0; static ColorItem* bounceTarget = 0; @@ -610,6 +623,11 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS G_CALLBACK(handleEnterNotify), this); + g_signal_connect( G_OBJECT(newBlot->gobj()), + "leave-notify-event", + G_CALLBACK(handleLeaveNotify), + this); + // g_signal_connect( G_OBJECT(newBlot->gobj()), // "drag-drop", // G_CALLBACK(dragDropColorData), |
