[gimp] Bug 752071 - less tool preset defaults checked
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 752071 - less tool preset defaults checked
- Date: Thu, 11 Feb 2016 23:14:08 +0000 (UTC)
commit bd5d851364d2fc5654611cd566283732d64c2388
Author: Michael Natterer <mitch gimp org>
Date: Fri Feb 12 00:12:00 2016 +0100
Bug 752071 - less tool preset defaults checked
Don't check palette and gradient, but special case the blend tool for
gradient. The idea is that we check everything except colors.
app/core/gimptoolpreset.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimptoolpreset.c b/app/core/gimptoolpreset.c
index 952c703..ee016d3 100644
--- a/app/core/gimptoolpreset.c
+++ b/app/core/gimptoolpreset.c
@@ -35,13 +35,17 @@
#include "gimp-intl.h"
+/* The defaults are "everything except color", which is problematic
+ * with gradients, which is why we special case the blend tool in
+ * gimp_tool_preset_set_options().
+ */
#define DEFAULT_USE_FG_BG FALSE
#define DEFAULT_USE_BRUSH TRUE
#define DEFAULT_USE_DYNAMICS TRUE
#define DEFAULT_USE_MYBRUSH TRUE
-#define DEFAULT_USE_GRADIENT TRUE
+#define DEFAULT_USE_GRADIENT FALSE
#define DEFAULT_USE_PATTERN TRUE
-#define DEFAULT_USE_PALETTE TRUE
+#define DEFAULT_USE_PALETTE FALSE
#define DEFAULT_USE_FONT TRUE
enum
@@ -536,6 +540,11 @@ gimp_tool_preset_set_options (GimpToolPreset *preset,
if (! (serialize_props & GIMP_CONTEXT_PROP_MASK_FONT))
g_object_set (preset, "use-font", FALSE, NULL);
+ /* see comment above the DEFAULT defines at the top of the file */
+ if (! g_strcmp0 ("gimp-blend-tool",
+ gimp_object_get_name (preset->tool_options->tool_info)))
+ g_object_set (preset, "use-gradient", TRUE, NULL);
+
g_signal_connect (preset->tool_options, "notify",
G_CALLBACK (gimp_tool_preset_options_notify),
preset);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]