summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c13c4d1)
raw | patch | inline | side by side (parent: c13c4d1)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Mon, 21 Apr 2008 22:26:43 +0000 (22:26 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Mon, 21 Apr 2008 22:26:43 +0000 (22:26 +0000) |
src/dialogs/swatches.cpp | patch | blob | history |
index ea89be30f702b1e7ddb5f0aeb5003fc158c8ebfc..72a85a43bace82bc14e50daac58a16e7d8f5b8c1 100644 (file)
--- a/src/dialogs/swatches.cpp
+++ b/src/dialogs/swatches.cpp
*
* 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
*/
#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),