summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2009-09-20 05:09:12 +0000
committerjoncruz <joncruz@users.sourceforge.net>2009-09-20 05:09:12 +0000
commit4157de25941065e92289248ce5138124a70a4b73 (patch)
tree098e19ce39088aca8ddf839442e80f6c2db9954f /src
parentSanitize profile names for valid XML ids. Modified patch that addresses bug #... (diff)
downloadinkscape-4157de25941065e92289248ce5138124a70a4b73.tar.gz
inkscape-4157de25941065e92289248ce5138124a70a4b73.zip
Conditionally disable per-document "auto" palette
(bzr r8620)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/swatches.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index e273a827c..1f708e3de 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -47,6 +47,8 @@
#include "display/nr-plain-stuff.h"
#include "sp-gradient-reference.h"
+//#define USE_DOCUMENT_PALETTE 1
+
namespace Inkscape {
namespace UI {
namespace Dialogs {
@@ -364,6 +366,7 @@ static void redirSecondaryClick( GtkMenuItem *menuitem, gpointer /*user_data*/ )
}
}
+#if USE_DOCUMENT_PALETTE
static void editGradientImpl( SPGradient* gr )
{
if ( gr ) {
@@ -424,6 +427,7 @@ static void addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ )
}
}
}
+#endif // USE_DOCUMENT_PALETTE
static gboolean handleButtonPress( GtkWidget* /*widget*/, GdkEventButton* event, gpointer user_data)
{
@@ -451,6 +455,7 @@ static gboolean handleButtonPress( GtkWidget* /*widget*/, GdkEventButton* event,
user_data);
gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child);
+#if USE_DOCUMENT_PALETTE
child = gtk_separator_menu_item_new();
gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child);
popupExtras.push_back(child);
@@ -484,6 +489,7 @@ static gboolean handleButtonPress( GtkWidget* /*widget*/, GdkEventButton* event,
gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child);
//popupExtras.push_back(child);
gtk_widget_set_sensitive( child, FALSE );
+#endif // USE_DOCUMENT_PALETTE
gtk_widget_show_all(popupMenu);
}
@@ -1248,6 +1254,7 @@ SwatchesPanel::SwatchesPanel(gchar const* prefsPath) :
_clear->ptr = this;
_remove = new ColorItem( ege::PaintDef::NONE );
_remove->ptr = this;
+#if USE_DOCUMENT_PALETTE
{
JustForNow *docPalette = new JustForNow();
@@ -1256,6 +1263,7 @@ SwatchesPanel::SwatchesPanel(gchar const* prefsPath) :
_ptr = docPalette;
}
+#endif // USE_DOCUMENT_PALETTE
loadEmUp();
if ( !possible.empty() ) {
JustForNow* first = 0;
@@ -1403,6 +1411,7 @@ void SwatchesPanel::handleGradientsChange()
}
}
+#if USE_DOCUMENT_PALETTE
if ( _ptr ) {
JustForNow *docPalette = reinterpret_cast<JustForNow *>(_ptr);
// TODO delete pointed to objects
@@ -1462,10 +1471,12 @@ void SwatchesPanel::handleGradientsChange()
_rebuild();
}
}
+#endif // USE_DOCUMENT_PALETTE
}
void SwatchesPanel::_updateFromSelection()
{
+#if USE_DOCUMENT_PALETTE
if ( _ptr ) {
JustForNow *docPalette = reinterpret_cast<JustForNow *>(_ptr);
@@ -1543,6 +1554,7 @@ void SwatchesPanel::_updateFromSelection()
item->setState( isFill, isStroke );
}
}
+#endif // USE_DOCUMENT_PALETTE
}
void SwatchesPanel::_handleAction( int setId, int itemId )