From: johncoswell Date: Mon, 21 Apr 2008 23:39:46 +0000 (+0000) Subject: Fix swatch enter-notify event propagation X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=69a77e069559a21849e4a6cacb040a62cb4a004f;p=inkscape.git Fix swatch enter-notify event propagation --- diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index f464d548a..3b62f0186 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -240,20 +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(callback_data); -// if ( item ) { -// SPDesktop *desktop = SP_ACTIVE_DESKTOP; -// if ( desktop ) { -// desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, g_strconcat( -// _("Swatch info: "), -// item->def.descr.c_str(), -// _(""), -// NULL -// )); -// } -// } -// } +static gboolean handleEnterNotify( GtkWidget* widget, GdkEventCrossing* event, gpointer callback_data ) { + ColorItem* item = reinterpret_cast(callback_data); + if ( item ) { + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + if ( desktop ) { + desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, g_strconcat( + _("Swatch info: "), + item->def.descr.c_str(), + _(""), + NULL + )); + } + } + return FALSE; +} static GtkWidget* popupMenu = 0; static ColorItem* bounceTarget = 0; @@ -604,15 +605,10 @@ 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()), -// "enter-notify-event", -// G_CALLBACK(handleEnterNotify), -// this); + g_signal_connect( G_OBJECT(newBlot->gobj()), + "enter-notify-event", + G_CALLBACK(handleEnterNotify), + this); // g_signal_connect( G_OBJECT(newBlot->gobj()), // "drag-drop",