app: move the N-Point Deformation tool to the playground
It has to be enabled via Prefs -> Playground. The menu entry is always disabled until it leaves the playground, for reasons worth fixing.
This commit is contained in:
@ -80,6 +80,8 @@ enum
|
||||
PROP_DOCK_WINDOW_HINT,
|
||||
PROP_CURSOR_HANDEDNESS,
|
||||
|
||||
PROP_PLAYGROUND_NPD_TOOL,
|
||||
|
||||
PROP_HIDE_DOCKS,
|
||||
PROP_SINGLE_WINDOW_MODE,
|
||||
PROP_TABS_POSITION,
|
||||
@ -272,6 +274,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
||||
GIMP_HANDEDNESS_RIGHT,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_PLAYGROUND_NPD_TOOL,
|
||||
"playground-npd-tool",
|
||||
PLAYGROUND_NPD_TOOL_BLURB,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS |
|
||||
GIMP_CONFIG_PARAM_RESTART);
|
||||
|
||||
g_object_class_install_property (object_class, PROP_HIDE_DOCKS,
|
||||
g_param_spec_boolean ("hide-docks",
|
||||
NULL,
|
||||
@ -476,6 +485,10 @@ gimp_gui_config_set_property (GObject *object,
|
||||
gui_config->cursor_handedness = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
case PROP_PLAYGROUND_NPD_TOOL:
|
||||
gui_config->playground_npd_tool = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
case PROP_HIDE_DOCKS:
|
||||
gui_config->hide_docks = g_value_get_boolean (value);
|
||||
break;
|
||||
@ -610,6 +623,10 @@ gimp_gui_config_get_property (GObject *object,
|
||||
g_value_set_enum (value, gui_config->cursor_handedness);
|
||||
break;
|
||||
|
||||
case PROP_PLAYGROUND_NPD_TOOL:
|
||||
g_value_set_boolean (value, gui_config->playground_npd_tool);
|
||||
break;
|
||||
|
||||
case PROP_HIDE_DOCKS:
|
||||
g_value_set_boolean (value, gui_config->hide_docks);
|
||||
break;
|
||||
|
@ -63,7 +63,7 @@ struct _GimpGuiConfig
|
||||
gchar *help_locales;
|
||||
GimpHelpBrowserType help_browser;
|
||||
|
||||
/* Action Search preferences. */
|
||||
/* action search preferences */
|
||||
gboolean search_show_unavailable;
|
||||
gint action_history_size;
|
||||
|
||||
@ -73,6 +73,9 @@ struct _GimpGuiConfig
|
||||
GimpWindowHint dock_window_hint;
|
||||
GimpHandedness cursor_handedness;
|
||||
|
||||
/* experimental playground */
|
||||
gboolean playground_npd_tool;
|
||||
|
||||
/* saved in sessionrc */
|
||||
gboolean hide_docks;
|
||||
gboolean single_window_mode;
|
||||
|
@ -374,6 +374,9 @@ _("Use GIMP in a single-window mode.")
|
||||
#define HIDE_DOCKS_BLURB \
|
||||
_("Hide docks and other windows, leaving only image windows.")
|
||||
|
||||
#define PLAYGROUND_NPD_TOOL_BLURB \
|
||||
_("Enable the N-Point Deformation tool.")
|
||||
|
||||
#define SPACE_BAR_ACTION_BLURB \
|
||||
_("What to do when the space bar is pressed in the image window.")
|
||||
|
||||
|
@ -1456,8 +1456,6 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/****************/
|
||||
if (gimp->show_playground)
|
||||
{
|
||||
GtkWidget *label;
|
||||
|
||||
pixbuf = prefs_get_pixbufs (dialog, "playground", &small_pixbuf);
|
||||
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
||||
_("Experimental Playground"),
|
||||
@ -1471,9 +1469,9 @@ prefs_dialog_new (Gimp *gimp,
|
||||
vbox2 = prefs_frame_new (_("Insane Options"),
|
||||
GTK_CONTAINER (vbox), TRUE);
|
||||
|
||||
label = gtk_label_new ("Fuck Yeah!");
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, TRUE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
button = prefs_check_button_add (object, "playground-npd-tool",
|
||||
_("_N-Point Deformation tool"),
|
||||
GTK_BOX (vbox2));
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,6 +31,8 @@
|
||||
|
||||
#include "tools-types.h"
|
||||
|
||||
#include "config/gimpguiconfig.h" /* playground */
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
#include "gegl/gimp-gegl-apply-operation.h"
|
||||
|
||||
@ -144,6 +146,10 @@ void
|
||||
gimp_n_point_deformation_tool_register (GimpToolRegisterCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
/* we should not know that "data" is a Gimp*, but what the heck this
|
||||
* is experimental playground stuff
|
||||
*/
|
||||
if (GIMP_GUI_CONFIG (GIMP (data)->config)->playground_npd_tool)
|
||||
(* callback) (GIMP_TYPE_N_POINT_DEFORMATION_TOOL,
|
||||
GIMP_TYPE_N_POINT_DEFORMATION_OPTIONS,
|
||||
gimp_n_point_deformation_options_gui,
|
||||
|
@ -605,7 +605,9 @@
|
||||
<menuitem action="tools-flip" />
|
||||
<menuitem action="tools-cage" />
|
||||
<menuitem action="tools-warp" />
|
||||
<!-- Enable when the tool leaves the playground
|
||||
<menuitem action="tools-n-point-deformation" />
|
||||
-->
|
||||
</menu>
|
||||
<menu action="tools-color-menu" name="Color Tools">
|
||||
<menuitem action="tools-color-balance" />
|
||||
|
Reference in New Issue
Block a user