summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2009-03-20 06:50:37 +0000
committerjoncruz <joncruz@users.sourceforge.net>2009-03-20 06:50:37 +0000
commitdde4ae2586249c04da8277135cc5ea35915474aa (patch)
tree65fbf6a92a0358d192f0e99a1cee53434803f58c /src/ui
parentchange color of LPE helperpaths in nodetool (diff)
downloadinkscape-dde4ae2586249c04da8277135cc5ea35915474aa.tar.gz
inkscape-dde4ae2586249c04da8277135cc5ea35915474aa.zip
Renamed ColorDef to PaintDef to prep for expanded functionality.
(bzr r7528)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/CMakeLists.txt2
-rw-r--r--src/ui/dialog/swatches.cpp16
-rw-r--r--src/ui/dialog/swatches.h6
3 files changed, 13 insertions, 11 deletions
diff --git a/src/ui/dialog/CMakeLists.txt b/src/ui/dialog/CMakeLists.txt
index 1d912cf9f..ea63d6023 100644
--- a/src/ui/dialog/CMakeLists.txt
+++ b/src/ui/dialog/CMakeLists.txt
@@ -16,6 +16,8 @@ dock-behavior.cpp
document-metadata.cpp
document-properties.cpp
extension-editor.cpp
+eek-preview.cpp
+ege-paint-def.cpp
filedialog.cpp
filedialogimpl-gtkmm.cpp
fill-and-stroke.cpp
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index 8fb811e3d..6470b3a5a 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -47,7 +47,7 @@ namespace UI {
namespace Dialogs {
-ColorItem::ColorItem(eek::ColorDef::ColorType type) :
+ColorItem::ColorItem(ege::PaintDef::ColorType type) :
def(type),
_isLive(false),
_linkIsTone(false),
@@ -145,7 +145,7 @@ static void dragBegin( GtkWidget */*widget*/, GdkDragContext* dc, gpointer data
using Inkscape::IO::Resource::ICONS;
using Inkscape::IO::Resource::SYSTEM;
- if (item->def.getType() != eek::ColorDef::RGB){
+ if (item->def.getType() != ege::PaintDef::RGB){
GError *error = NULL;
gsize bytesRead = 0;
gsize bytesWritten = 0;
@@ -444,7 +444,7 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS
Gtk::Widget* newBlot = Glib::wrap(eekWidget);
eek_preview_set_color( preview, (def.getR() << 8) | def.getR(), (def.getG() << 8) | def.getG(), (def.getB() << 8) | def.getB());
- if ( def.getType() != eek::ColorDef::RGB ) {
+ if ( def.getType() != ege::PaintDef::RGB ) {
using Inkscape::IO::Resource::get_path;
using Inkscape::IO::Resource::ICONS;
using Inkscape::IO::Resource::SYSTEM;
@@ -601,18 +601,18 @@ void ColorItem::buttonClicked(bool secondary)
SPCSSAttr *css = sp_repr_css_attr_new();
Glib::ustring descr;
switch (def.getType()) {
- case eek::ColorDef::CLEAR: {
+ case ege::PaintDef::CLEAR: {
// TODO actually make this clear
sp_repr_css_set_property( css, attrName, "none" );
descr = secondary? _("Remove stroke color") : _("Remove fill color");
break;
}
- case eek::ColorDef::NONE: {
+ case ege::PaintDef::NONE: {
sp_repr_css_set_property( css, attrName, "none" );
descr = secondary? _("Set stroke color to none") : _("Set fill color to none");
break;
}
- case eek::ColorDef::RGB: {
+ case ege::PaintDef::RGB: {
gchar c[64];
guint32 rgba = (def.getR() << 24) | (def.getG() << 16) | (def.getB() << 8) | 0xff;
sp_svg_write_color(c, sizeof(c), rgba);
@@ -997,8 +997,8 @@ SwatchesPanel::SwatchesPanel(gchar const* prefsPath) :
{
Gtk::RadioMenuItem* hotItem = 0;
_holder = new PreviewHolder();
- _clear = new ColorItem( eek::ColorDef::CLEAR );
- _remove = new ColorItem( eek::ColorDef::NONE );
+ _clear = new ColorItem( ege::PaintDef::CLEAR );
+ _remove = new ColorItem( ege::PaintDef::NONE );
{
JustForNow *docPalette = new JustForNow();
diff --git a/src/ui/dialog/swatches.h b/src/ui/dialog/swatches.h
index ed311242e..8b83e1450 100644
--- a/src/ui/dialog/swatches.h
+++ b/src/ui/dialog/swatches.h
@@ -15,7 +15,7 @@
#include "ui/widget/panel.h"
#include "ui/previewholder.h"
-#include "widgets/eek-color-def.h"
+#include "widgets/ege-paint-def.h"
namespace Inkscape {
namespace UI {
@@ -31,7 +31,7 @@ class ColorItem : public Inkscape::UI::Previewable
{
friend void _loadPaletteFile( gchar const *filename );
public:
- ColorItem( eek::ColorDef::ColorType type );
+ ColorItem( ege::PaintDef::ColorType type );
ColorItem( unsigned int r, unsigned int g, unsigned int b,
Glib::ustring& name );
virtual ~ColorItem();
@@ -42,7 +42,7 @@ public:
::PreviewSize size,
guint ratio);
void buttonClicked(bool secondary = false);
- eek::ColorDef def;
+ ege::PaintDef def;
private:
static void _dropDataIn( GtkWidget *widget,