summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2013-01-16 00:37:04 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2013-01-16 00:37:04 +0000
commit50bf4919dcdf6279d579face174dc2881d593cf3 (patch)
tree7027de8cd95ffbe4073788921dded2f2fcdf3ed3 /src/ui
parentDrop use of deprecated GtkHandleBox widget (remove tear-off toolbar functiona... (diff)
downloadinkscape-50bf4919dcdf6279d579face174dc2881d593cf3.tar.gz
inkscape-50bf4919dcdf6279d579face174dc2881d593cf3.zip
Cleanup EekPreview widget implementation:
* Strip out dead code * Move all properties to private structure * Use modern GObject style in most places * Replace explicit get_type implementation with G_DEFINE_TYPE (bzr r12028)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/color-item.cpp57
1 files changed, 6 insertions, 51 deletions
diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp
index e370a0342..2ff4ed657 100644
--- a/src/ui/dialog/color-item.cpp
+++ b/src/ui/dialog/color-item.cpp
@@ -573,46 +573,21 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS
lbl->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
widget = lbl;
} else {
-// Glib::ustring blank(" ");
-// if ( size == Inkscape::ICON_SIZE_MENU || size == Inkscape::ICON_SIZE_DECORATION ) {
-// blank = " ";
-// }
-
GtkWidget* eekWidget = eek_preview_new();
EekPreview * preview = EEK_PREVIEW(eekWidget);
Gtk::Widget* newBlot = Glib::wrap(eekWidget);
-
_regenPreview(preview);
- eek_preview_set_details( preview, (::PreviewStyle)style, (::ViewType)view, (::PreviewSize)size, ratio, border );
+ eek_preview_set_details( preview,
+ (::ViewType)view,
+ (::PreviewSize)size,
+ ratio,
+ border );
def.addCallback( _colorDefChanged, this );
-
- GValue val = {0, {{0}, {0}}};
- g_value_init( &val, G_TYPE_BOOLEAN );
- g_value_set_boolean( &val, FALSE );
- g_object_set_property( G_OBJECT(preview), "focus-on-click", &val );
-
-/*
- Gtk::Button *btn = new Gtk::Button(blank);
- Gdk::Color color;
- color.set_rgb((_r << 8)|_r, (_g << 8)|_g, (_b << 8)|_b);
- btn->modify_bg(Gtk::STATE_NORMAL, color);
- btn->modify_bg(Gtk::STATE_ACTIVE, color);
- btn->modify_bg(Gtk::STATE_PRELIGHT, color);
- btn->modify_bg(Gtk::STATE_SELECTED, color);
-
- Gtk::Widget* newBlot = btn;
-*/
-
+ eek_preview_set_focus_on_click(preview, FALSE);
newBlot->set_tooltip_text(def.descr);
-/*
- newBlot->signal_clicked().connect( sigc::mem_fun(*this, &ColorItem::buttonClicked) );
-
- sigc::signal<void> type_signal_something;
-*/
-
g_signal_connect( G_OBJECT(newBlot->gobj()),
"clicked",
G_CALLBACK(handleClick),
@@ -674,26 +649,6 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS
G_CALLBACK(handleLeaveNotify),
this);
-// g_signal_connect( G_OBJECT(newBlot->gobj()),
-// "drag-drop",
-// G_CALLBACK(dragDropColorData),
-// this);
-
- if ( def.isEditable() )
- {
-// gtk_drag_dest_set( GTK_WIDGET(newBlot->gobj()),
-// GTK_DEST_DEFAULT_ALL,
-// destColorTargets,
-// G_N_ELEMENTS(destColorTargets),
-// GdkDragAction(GDK_ACTION_COPY | GDK_ACTION_MOVE) );
-
-
-// g_signal_connect( G_OBJECT(newBlot->gobj()),
-// "drag-data-received",
-// G_CALLBACK(_dropDataIn),
-// this );
- }
-
g_signal_connect( G_OBJECT(newBlot->gobj()),
"destroy",
G_CALLBACK(dieDieDie),