diff options
Diffstat (limited to 'src/dialogs/swatches.cpp')
| -rw-r--r-- | src/dialogs/swatches.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index ea89be30f..72a85a43b 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -3,8 +3,10 @@ * * Authors: * Jon A. Cruz + * John Bintz * * Copyright (C) 2005 Jon A. Cruz + * Copyright (C) 2008 John Bintz * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -23,6 +25,8 @@ #include <glibmm/i18n.h> #include <gdkmm/pixbuf.h> #include "inkscape.h" +#include "desktop.h" +#include "message-stack.h" #include "document.h" #include "desktop-handles.h" #include "extension/db.h" @@ -236,6 +240,21 @@ static void handleSecondaryClick( GtkWidget* widget, gint arg1, gpointer callbac } } +static void handleEnterNotify( GtkWidget* widget, GdkEventCrossing* event, gpointer callback_data ) { + ColorItem* item = reinterpret_cast<ColorItem*>(callback_data); + if ( item ) { + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + if ( desktop ) { + desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, g_strconcat( + _("Swatch info: <b>"), + item->def.descr.c_str(), + _("</b>"), + NULL + )); + } + } +} + static GtkWidget* popupMenu = 0; static ColorItem* bounceTarget = 0; @@ -585,6 +604,11 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS G_CALLBACK(dragBegin), this ); + g_signal_connect( G_OBJECT(newBlot->gobj()), + "enter-notify-event", + G_CALLBACK(handleEnterNotify), + this); + // g_signal_connect( G_OBJECT(newBlot->gobj()), // "drag-drop", // G_CALLBACK(dragDropColorData), |
