mirror of https://github.com/GNOME/gimp.git
The GIMP Help System part II: press "F1" while browsing a menu to show the
1999-10-03 Michael Natterer <mitch@gimp.org> The GIMP Help System part II: press "F1" while browsing a menu to show the help page for the menu entry you're currently over with the mouse. * app/color_notebook.c: all color selectors have to register with a help page now. * app/color_select.[ch]: register with a help string. Removed the dialog part of the files because it's use was deprecated anyway (use color notebooks instead). * app/colormap_dialog.i.c * app/colormap_dialog.p.h * app/palette.c * app/palette_select.c: use a color notebook instead of a color selector. * app/gimphelp.c * app/gimpui.c: minor changes. * app/gimprc.c: "use help" defaults to TRUE now. * app/lc_dialog.c * app/lc_dialogP.h: a special help function which shows the help for the currently selected notebook page. * app/menus.c: some weird code which catches "key_press_event" in all menu shells and pops up the corresp. help page for the selected item. Embedded the GtkItemFactoryEntry in a new GimpItemFactoryEntry to allow a help path to be stored. Will be partially exported and moved to gimphelp.[ch] later to catch key_press for plug-in menu items (don't try this now ;-) * app/app_procs.c * app/brush_edit.c * app/brush_select.c * app/channel_ops.c * app/channels_dialog.c * app/commands.c * app/convert.c * app/devices.c * app/file_new_dialog.c * app/fileops.c * app/gdisplay.c * app/gdisplay_color.c * app/gdisplay_color_ui.c * app/gdisplay_ops.c * app/global_edit.c * app/gradient.c * app/gradient_select.c * app/interface.c * app/layers_dialog.c * app/module_db.c * app/paths_dialog.c * app/pattern_select.c * app/preferences_dialog.c * app/qmask.c * app/resize.c * app/undo_history.c: changed all dialog constructors to point to the right place in the new help file structure. * configure.in * help/*: the basic new help file structure. * modules/colorsel_gtk.c * modules/colorsel_triangle.c * modules/colorsel_water.c: register a help page. * plug-ins/helpbrowser/helpbrowser.c: load the help files according to the new help file structure.
This commit is contained in:
parent
d28bd8b689
commit
a11f33345d
73
ChangeLog
73
ChangeLog
|
@ -1,3 +1,76 @@
|
|||
1999-10-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
The GIMP Help System part II: press "F1" while browsing a menu
|
||||
to show the help page for the menu entry you're currently over
|
||||
with the mouse.
|
||||
|
||||
* app/color_notebook.c: all color selectors have to register with
|
||||
a help page now.
|
||||
|
||||
* app/color_select.[ch]: register with a help string. Removed
|
||||
the dialog part of the files because it's use was deprecated
|
||||
anyway (use color notebooks instead).
|
||||
|
||||
* app/colormap_dialog.i.c
|
||||
* app/colormap_dialog.p.h
|
||||
* app/palette.c
|
||||
* app/palette_select.c: use a color notebook instead of a color
|
||||
selector.
|
||||
|
||||
* app/gimphelp.c
|
||||
* app/gimpui.c: minor changes.
|
||||
|
||||
* app/gimprc.c: "use help" defaults to TRUE now.
|
||||
|
||||
* app/lc_dialog.c
|
||||
* app/lc_dialogP.h: a special help function which shows the help
|
||||
for the currently selected notebook page.
|
||||
|
||||
* app/menus.c: some weird code which catches "key_press_event"
|
||||
in all menu shells and pops up the corresp. help page for the
|
||||
selected item. Embedded the GtkItemFactoryEntry in a new
|
||||
GimpItemFactoryEntry to allow a help path to be stored.
|
||||
Will be partially exported and moved to gimphelp.[ch] later to
|
||||
catch key_press for plug-in menu items (don't try this now ;-)
|
||||
|
||||
* app/app_procs.c
|
||||
* app/brush_edit.c
|
||||
* app/brush_select.c
|
||||
* app/channel_ops.c
|
||||
* app/channels_dialog.c
|
||||
* app/commands.c
|
||||
* app/convert.c
|
||||
* app/devices.c
|
||||
* app/file_new_dialog.c
|
||||
* app/fileops.c
|
||||
* app/gdisplay.c
|
||||
* app/gdisplay_color.c
|
||||
* app/gdisplay_color_ui.c
|
||||
* app/gdisplay_ops.c
|
||||
* app/global_edit.c
|
||||
* app/gradient.c
|
||||
* app/gradient_select.c
|
||||
* app/interface.c
|
||||
* app/layers_dialog.c
|
||||
* app/module_db.c
|
||||
* app/paths_dialog.c
|
||||
* app/pattern_select.c
|
||||
* app/preferences_dialog.c
|
||||
* app/qmask.c
|
||||
* app/resize.c
|
||||
* app/undo_history.c: changed all dialog constructors to point
|
||||
to the right place in the new help file structure.
|
||||
|
||||
* configure.in
|
||||
* help/*: the basic new help file structure.
|
||||
|
||||
* modules/colorsel_gtk.c
|
||||
* modules/colorsel_triangle.c
|
||||
* modules/colorsel_water.c: register a help page.
|
||||
|
||||
* plug-ins/helpbrowser/helpbrowser.c: load the help files
|
||||
according to the new help file structure.
|
||||
|
||||
1999-10-03 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* app/cursorutil.h app/session.c app/text_tool.c: Change the
|
||||
|
|
|
@ -352,7 +352,7 @@ select_border_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Border Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/border_selection_dialog.html",
|
||||
"dialogs/border_selection.html",
|
||||
_("Border selection by:"),
|
||||
selection_border_radius, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -375,7 +375,7 @@ select_feather_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Feather Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/feather_selection_dialog.html",
|
||||
"dialogs/feather_selection.html",
|
||||
_("Feather selection by:"),
|
||||
selection_feather_radius, 0, 32767, 3,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -398,7 +398,7 @@ select_grow_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Grow Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/grow_selection_dialog.html",
|
||||
"dialogs/grow_selection.html",
|
||||
_("Grow selection by:"),
|
||||
selection_grow_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -423,7 +423,7 @@ select_shrink_cmd_callback (GtkWidget *widget,
|
|||
shrink_dialog =
|
||||
gimp_query_size_box (N_("Shrink Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/shrink_selection_dialog.html",
|
||||
"dialogs/shrink_selection.html",
|
||||
N_("Shrink selection by:"),
|
||||
selection_shrink_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -1195,7 +1195,7 @@ void
|
|||
gimp_help_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
gimp_help ("");
|
||||
gimp_help (NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -248,7 +248,7 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/edit_qmask_attributes_dialog.html",
|
||||
"dialogs/edit_qmask_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/edit_qmask_attributes_dialog.html",
|
||||
"dialogs/edit_qmask_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -728,7 +728,7 @@ really_quit_dialog (void)
|
|||
|
||||
dialog = gimp_dialog_new (_("Really Quit?"), "really_quit",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/really_quit_dialog.html",
|
||||
"dialogs/really_quit.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ brush_edit_generated_new ()
|
|||
|
||||
begw->shell = gimp_dialog_new (_("Brush Editor"), "generated_brush_editor",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/generated_brush_editor_dialog.html",
|
||||
"dialogs/generated_brush_editor.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ brush_select_new (gchar *title,
|
|||
{
|
||||
bsp->shell = gimp_dialog_new (title, "brush_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/brush_selection_dialog.html",
|
||||
"dialogs/brush_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -218,7 +218,7 @@ brush_select_new (gchar *title,
|
|||
{
|
||||
bsp->shell = gimp_dialog_new (_("Brush Selection"), "brush_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/brush_selection_dialog.html",
|
||||
"dialogs/brush_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ channel_ops_offset (GimpImage* gimage)
|
|||
|
||||
off_d->dlg = gimp_dialog_new (_("Offset"), "offset",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/offset_dialog.html",
|
||||
"dialogs/offset.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -2391,7 +2391,7 @@ channels_dialog_new_channel_query (GimpImage* gimage)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("New Channel Options"), "new_channel_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels_dialog.html",
|
||||
"dialogs/channels/dialogs/new_channel.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2565,7 +2565,7 @@ channels_dialog_edit_channel_query (ChannelWidget *channel_widget)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Channel Attributes"), "edit_channel_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels_dialog.html",
|
||||
"dialogs/channels/dialogs/edit_channel_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -37,11 +37,14 @@
|
|||
static void color_notebook_ok_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_cancel_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_update_callback (void *, int, int, int);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *, guint);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *,
|
||||
guint);
|
||||
static void color_notebook_help_func (gpointer data);
|
||||
|
||||
/* information we keep on each registered colour selector */
|
||||
typedef struct _ColorSelectorInfo {
|
||||
char *name; /* label used in notebook tab */
|
||||
char *help_page;
|
||||
GimpColorSelectorMethods m;
|
||||
int refs; /* number of instances around */
|
||||
gboolean active;
|
||||
|
@ -100,8 +103,7 @@ color_notebook_new (int r,
|
|||
|
||||
cnp->shell =
|
||||
gimp_dialog_new (_("Color Selection"), "color_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_notebook_dialog.html",
|
||||
color_notebook_help_func, cnp,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
@ -134,7 +136,7 @@ color_notebook_new (int r,
|
|||
if (info->active)
|
||||
{
|
||||
|
||||
csel = g_malloc (sizeof (ColorSelectorInstance));
|
||||
csel = g_new (ColorSelectorInstance, 1);
|
||||
csel->color_notebook = cnp;
|
||||
csel->info = info;
|
||||
info->refs++;
|
||||
|
@ -336,12 +338,28 @@ color_notebook_page_switch (GtkWidget *widget,
|
|||
TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
color_notebook_help_func (gpointer data)
|
||||
{
|
||||
ColorNotebookP cnp;
|
||||
gchar *help_path;
|
||||
|
||||
cnp = (ColorNotebookP) data;
|
||||
|
||||
help_path = g_strconcat ("dialogs/color_selectors/",
|
||||
cnp->cur_page->info->help_page,
|
||||
NULL);
|
||||
gimp_help (help_path);
|
||||
g_free (help_path);
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
/* Registration functions */
|
||||
|
||||
G_MODULE_EXPORT
|
||||
GimpColorSelectorID
|
||||
gimp_color_selector_register (const char *name,
|
||||
const char *help_page,
|
||||
GimpColorSelectorMethods *methods)
|
||||
{
|
||||
ColorSelectorInfo *info;
|
||||
|
@ -355,9 +373,10 @@ gimp_color_selector_register (const char *name,
|
|||
info = info->next;
|
||||
}
|
||||
|
||||
info = g_malloc (sizeof (ColorSelectorInfo));
|
||||
info = g_new (ColorSelectorInfo, 1);
|
||||
|
||||
info->name = g_strdup (name);
|
||||
info->help_page = g_strdup (help_page);
|
||||
info->m = *methods;
|
||||
info->refs = 0;
|
||||
info->active = TRUE;
|
||||
|
|
|
@ -45,6 +45,13 @@
|
|||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | \
|
||||
GDK_BUTTON1_MOTION_MASK | GDK_ENTER_NOTIFY_MASK
|
||||
|
||||
typedef enum
|
||||
{
|
||||
COLOR_SELECT_OK,
|
||||
COLOR_SELECT_CANCEL,
|
||||
COLOR_SELECT_UPDATE
|
||||
} ColorSelectState;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HUE = 0,
|
||||
|
@ -72,6 +79,33 @@ typedef enum
|
|||
UPDATE_CALLER = 1 << 6
|
||||
} ColorSelectUpdateType;
|
||||
|
||||
typedef void (*ColorSelectCallback) (gint, gint, gint, ColorSelectState, void *);
|
||||
|
||||
typedef struct _ColorSelect ColorSelect, *ColorSelectP;
|
||||
|
||||
struct _ColorSelect
|
||||
{
|
||||
GtkWidget *xy_color;
|
||||
GtkWidget *z_color;
|
||||
GtkWidget *new_color;
|
||||
GtkWidget *orig_color;
|
||||
GtkWidget *toggles[6];
|
||||
GtkWidget *entries[6];
|
||||
GtkWidget *hex_entry;
|
||||
GtkAdjustment *slider_data[6];
|
||||
|
||||
gint pos[3];
|
||||
gint values[6];
|
||||
gint z_color_fill;
|
||||
gint xy_color_fill;
|
||||
gint orig_values[3];
|
||||
gboolean wants_updates;
|
||||
GdkGC *gc;
|
||||
|
||||
ColorSelectCallback callback;
|
||||
void *client_data;
|
||||
};
|
||||
|
||||
typedef struct _ColorSelectFill ColorSelectFill;
|
||||
|
||||
typedef void (*ColorSelectFillUpdateProc) (ColorSelectFill *);
|
||||
|
@ -110,8 +144,6 @@ static void color_select_update_sliders (ColorSelect *, gint);
|
|||
static void color_select_update_entries (ColorSelect *, gint);
|
||||
static void color_select_update_colors (ColorSelect *, gint);
|
||||
|
||||
static void color_select_ok_callback (GtkWidget *, gpointer);
|
||||
static void color_select_cancel_callback (GtkWidget *, gpointer);
|
||||
static gint color_select_xy_expose (GtkWidget *, GdkEventExpose *,
|
||||
ColorSelect *);
|
||||
static gint color_select_xy_events (GtkWidget *, GdkEvent *,
|
||||
|
@ -180,60 +212,22 @@ static GtkTargetEntry color_select_target_table[] =
|
|||
static guint n_color_select_targets = (sizeof (color_select_target_table) /
|
||||
sizeof (color_select_target_table[0]));
|
||||
|
||||
ColorSelect *
|
||||
color_select_new (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorSelectCallback callback,
|
||||
gpointer data,
|
||||
gboolean wants_updates)
|
||||
|
||||
/* Register the GIMP colour selector with the color notebook */
|
||||
void
|
||||
color_select_init (void)
|
||||
{
|
||||
ColorSelect *csp;
|
||||
GtkWidget *main_vbox;
|
||||
GimpColorSelectorMethods methods =
|
||||
{
|
||||
color_select_notebook_new,
|
||||
color_select_notebook_free,
|
||||
color_select_notebook_setcolor
|
||||
};
|
||||
|
||||
csp = g_new (ColorSelect, 1);
|
||||
|
||||
csp->callback = callback;
|
||||
csp->client_data = data;
|
||||
csp->z_color_fill = HUE;
|
||||
csp->xy_color_fill = SATURATION_VALUE;
|
||||
csp->gc = NULL;
|
||||
csp->wants_updates = wants_updates;
|
||||
|
||||
csp->values[RED] = csp->orig_values[0] = r;
|
||||
csp->values[GREEN] = csp->orig_values[1] = g;
|
||||
csp->values[BLUE] = csp->orig_values[2] = b;
|
||||
color_select_update_hsv_values (csp);
|
||||
color_select_update_pos (csp);
|
||||
|
||||
csp->shell =
|
||||
gimp_dialog_new (_("Color Selection"), "color_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_selection_dialog.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
wants_updates ? _("Close") : _("OK"),
|
||||
color_select_ok_callback,
|
||||
csp, NULL, TRUE, FALSE,
|
||||
wants_updates ? _("Revert to Old Color") : _("Cancel"),
|
||||
color_select_cancel_callback,
|
||||
csp, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
main_vbox = color_select_widget_new (csp, r, g, b);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (csp->shell)->vbox), main_vbox);
|
||||
gtk_widget_show (main_vbox);
|
||||
|
||||
color_select_image_fill (csp->z_color, csp->z_color_fill, csp->values);
|
||||
color_select_image_fill (csp->xy_color, csp->xy_color_fill, csp->values);
|
||||
|
||||
gtk_widget_show (csp->shell);
|
||||
|
||||
return csp;
|
||||
gimp_color_selector_register ("GIMP", "built_in.html", &methods);
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
color_select_widget_new (ColorSelect *csp,
|
||||
gint r,
|
||||
|
@ -504,47 +498,7 @@ color_select_drag_old_color (GtkWidget *widget,
|
|||
*b = (guchar) csp->orig_values[2];
|
||||
}
|
||||
|
||||
/* Register the GIMP colour selector with the color notebook */
|
||||
void
|
||||
color_select_init (void)
|
||||
{
|
||||
GimpColorSelectorMethods methods =
|
||||
{
|
||||
color_select_notebook_new,
|
||||
color_select_notebook_free,
|
||||
color_select_notebook_setcolor
|
||||
};
|
||||
|
||||
gimp_color_selector_register ("GIMP", &methods);
|
||||
}
|
||||
|
||||
void
|
||||
color_select_show (ColorSelect *csp)
|
||||
{
|
||||
if (csp)
|
||||
gtk_widget_show (csp->shell);
|
||||
}
|
||||
|
||||
void
|
||||
color_select_hide (ColorSelect *csp)
|
||||
{
|
||||
if (csp)
|
||||
gtk_widget_hide (csp->shell);
|
||||
}
|
||||
|
||||
void
|
||||
color_select_free (ColorSelect *csp)
|
||||
{
|
||||
if (csp)
|
||||
{
|
||||
if (csp->shell)
|
||||
gtk_widget_destroy (csp->shell);
|
||||
gdk_gc_destroy (csp->gc);
|
||||
g_free (csp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
color_select_set_color (ColorSelect *csp,
|
||||
gint r,
|
||||
gint g,
|
||||
|
@ -963,42 +917,6 @@ color_select_update_colors (ColorSelect *csp,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
color_select_ok_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
ColorSelect *csp;
|
||||
|
||||
csp = (ColorSelect *) data;
|
||||
if (csp)
|
||||
{
|
||||
if (csp->callback)
|
||||
(* csp->callback) (csp->values[RED],
|
||||
csp->values[GREEN],
|
||||
csp->values[BLUE],
|
||||
COLOR_SELECT_OK,
|
||||
csp->client_data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
color_select_cancel_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
ColorSelect *csp;
|
||||
|
||||
csp = (ColorSelect *) data;
|
||||
if (csp)
|
||||
{
|
||||
if (csp->callback)
|
||||
(* csp->callback) (csp->orig_values[0],
|
||||
csp->orig_values[1],
|
||||
csp->orig_values[2],
|
||||
COLOR_SELECT_CANCEL,
|
||||
csp->client_data);
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
color_select_xy_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
|
@ -2176,9 +2094,6 @@ color_select_notebook_new (gint r,
|
|||
|
||||
glue->main_vbox = color_select_widget_new (csp, r, g, b);
|
||||
|
||||
/* the shell is provided by the notebook */
|
||||
csp->shell = NULL;
|
||||
|
||||
color_select_image_fill (csp->z_color, csp->z_color_fill, csp->values);
|
||||
color_select_image_fill (csp->xy_color, csp->xy_color_fill, csp->values);
|
||||
|
||||
|
@ -2186,13 +2101,13 @@ color_select_notebook_new (gint r,
|
|||
return glue->main_vbox;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
color_select_notebook_free (void *data)
|
||||
{
|
||||
notebook_glue *glue = data;
|
||||
|
||||
color_select_free (glue->csp);
|
||||
gdk_gc_destroy (glue->csp->gc);
|
||||
g_free (glue->csp);
|
||||
/* don't need to destroy the widget, since it's done by the caller
|
||||
* of this function */
|
||||
g_free (glue);
|
||||
|
|
|
@ -18,53 +18,6 @@
|
|||
#ifndef __COLOR_SELECT_H__
|
||||
#define __COLOR_SELECT_H__
|
||||
|
||||
typedef enum
|
||||
{
|
||||
COLOR_SELECT_OK,
|
||||
COLOR_SELECT_CANCEL,
|
||||
COLOR_SELECT_UPDATE
|
||||
} ColorSelectState;
|
||||
|
||||
typedef void (*ColorSelectCallback) (gint, gint, gint, ColorSelectState, void *);
|
||||
|
||||
typedef struct _ColorSelect ColorSelect, *ColorSelectP;
|
||||
|
||||
struct _ColorSelect
|
||||
{
|
||||
GtkWidget *shell;
|
||||
GtkWidget *xy_color;
|
||||
GtkWidget *z_color;
|
||||
GtkWidget *new_color;
|
||||
GtkWidget *orig_color;
|
||||
GtkWidget *toggles[6];
|
||||
GtkWidget *entries[6];
|
||||
GtkWidget *hex_entry;
|
||||
GtkAdjustment *slider_data[6];
|
||||
|
||||
gint pos[3];
|
||||
gint values[6];
|
||||
gint z_color_fill;
|
||||
gint xy_color_fill;
|
||||
gint orig_values[3];
|
||||
gboolean wants_updates;
|
||||
GdkGC *gc;
|
||||
|
||||
ColorSelectCallback callback;
|
||||
void *client_data;
|
||||
};
|
||||
|
||||
void color_select_init (void);
|
||||
|
||||
ColorSelectP color_select_new (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorSelectCallback callback,
|
||||
gpointer client_data,
|
||||
gboolean wants_update);
|
||||
void color_select_show (ColorSelectP);
|
||||
void color_select_hide (ColorSelectP);
|
||||
void color_select_free (ColorSelectP);
|
||||
void color_select_set_color (ColorSelectP,
|
||||
gint, gint, gint, gint);
|
||||
|
||||
#endif /* __COLOR_SELECT_H__ */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "gdk/gdkkeysyms.h"
|
||||
|
||||
#include "actionarea.h"
|
||||
#include "color_select.h"
|
||||
#include "color_notebook.h"
|
||||
#include "image_render.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "buildmenu.h"
|
||||
|
@ -41,7 +41,7 @@ static void ipal_update_image_list (GimpColormapDialog* ipal);
|
|||
static void ipal_add_callback (GtkWidget *, gpointer);
|
||||
static void ipal_edit_callback (GtkWidget *, gpointer);
|
||||
static void ipal_close_callback (GtkWidget *, gpointer);
|
||||
static void ipal_select_callback (int, int, int, ColorSelectState, void *);
|
||||
static void ipal_select_callback (int, int, int, ColorNotebookState, void *);
|
||||
|
||||
/* event callback */
|
||||
static gint ipal_area_events (GtkWidget *, GdkEvent *, GimpColormapDialog *);
|
||||
|
@ -281,7 +281,7 @@ ipal_create (GimpSet* context)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (GTK_WIDGET (ipal),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/indexed_palette_dialog.html");
|
||||
"dialogs/indexed_palette.html");
|
||||
|
||||
gtk_widget_show_all (vbox);
|
||||
/* gtk_widget_show (ipal); */
|
||||
|
@ -662,8 +662,8 @@ ipal_set_image (GimpColormapDialog* ipal, GimpImage* gimage)
|
|||
ipal_draw (ipal);
|
||||
gtk_container_queue_resize(GTK_CONTAINER(ipal));
|
||||
}else{
|
||||
if(ipal->color_select)
|
||||
color_select_hide(ipal->color_select);
|
||||
if(ipal->color_notebook)
|
||||
color_notebook_hide(ipal->color_notebook);
|
||||
}
|
||||
|
||||
ipal->col_index = 0;
|
||||
|
@ -698,16 +698,16 @@ ipal_edit_callback (GtkWidget *w,
|
|||
r = ipal->image->cmap[ipal->col_index*3];
|
||||
g = ipal->image->cmap[ipal->col_index*3+1];
|
||||
b = ipal->image->cmap[ipal->col_index*3+2];
|
||||
if (! ipal->color_select)
|
||||
if (! ipal->color_notebook)
|
||||
{
|
||||
ipal->color_select
|
||||
= color_select_new (r, g, b,
|
||||
ipal_select_callback, ipal, FALSE);
|
||||
ipal->color_notebook
|
||||
= color_notebook_new (r, g, b,
|
||||
ipal_select_callback, ipal, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
color_select_show (ipal->color_select);
|
||||
color_select_set_color (ipal->color_select, r, g, b, 1);
|
||||
color_notebook_show (ipal->color_notebook);
|
||||
color_notebook_set_color (ipal->color_notebook, r, g, b, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -724,7 +724,7 @@ static void
|
|||
ipal_select_callback (int r,
|
||||
int g,
|
||||
int b,
|
||||
ColorSelectState state,
|
||||
ColorNotebookState state,
|
||||
void *client_data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
|
@ -732,21 +732,21 @@ ipal_select_callback (int r,
|
|||
|
||||
g_return_if_fail (ipal);
|
||||
g_return_if_fail (ipal->image);
|
||||
g_return_if_fail (ipal->color_select);
|
||||
g_return_if_fail (ipal->color_notebook);
|
||||
|
||||
gimage = ipal->image;
|
||||
|
||||
switch (state) {
|
||||
case COLOR_SELECT_UPDATE:
|
||||
case COLOR_NOTEBOOK_UPDATE:
|
||||
break;
|
||||
case COLOR_SELECT_OK:
|
||||
case COLOR_NOTEBOOK_OK:
|
||||
gimage->cmap[ipal->col_index * 3 + 0] = r;
|
||||
gimage->cmap[ipal->col_index * 3 + 1] = g;
|
||||
gimage->cmap[ipal->col_index * 3 + 2] = b;
|
||||
gimp_image_colormap_changed (gimage, ipal->col_index);
|
||||
/* Fall through */
|
||||
case COLOR_SELECT_CANCEL:
|
||||
color_select_hide (ipal->color_select);
|
||||
case COLOR_NOTEBOOK_CANCEL:
|
||||
color_notebook_hide (ipal->color_notebook);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -796,16 +796,16 @@ ipal_area_events (GtkWidget *widget,
|
|||
if (bevent->button == 3)
|
||||
{
|
||||
ipal->col_index = col;
|
||||
if (! ipal->color_select)
|
||||
if (! ipal->color_notebook)
|
||||
{
|
||||
ipal->color_select
|
||||
= color_select_new (r, g, b,
|
||||
ipal_select_callback, ipal, FALSE);
|
||||
ipal->color_notebook
|
||||
= color_notebook_new (r, g, b,
|
||||
ipal_select_callback, ipal, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
color_select_show (ipal->color_select);
|
||||
color_select_set_color (ipal->color_select, r, g, b, 1);
|
||||
color_notebook_show (ipal->color_notebook);
|
||||
color_notebook_set_color (ipal->color_notebook, r, g, b, 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <gtk/gtkoptionmenu.h>
|
||||
#include <gimpset.h>
|
||||
#include <gtk/gtkentry.h>
|
||||
#include <color_select.h>
|
||||
#include <color_notebook.h>
|
||||
|
||||
|
||||
typedef struct _GimpColormapDialogClass GimpColormapDialogClass;
|
||||
|
@ -35,7 +35,7 @@ struct _GimpColormapDialog {
|
|||
GimpSetHandlerId rename_handler;
|
||||
GimpSetHandlerId cmap_changed_handler;
|
||||
GtkWidget* add_item;
|
||||
ColorSelectP color_select;
|
||||
ColorNotebookP color_notebook;
|
||||
};
|
||||
void gimp_colormap_dialog_selected (
|
||||
GimpColormapDialog* colormap_dialog);
|
||||
|
|
|
@ -352,7 +352,7 @@ select_border_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Border Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/border_selection_dialog.html",
|
||||
"dialogs/border_selection.html",
|
||||
_("Border selection by:"),
|
||||
selection_border_radius, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -375,7 +375,7 @@ select_feather_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Feather Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/feather_selection_dialog.html",
|
||||
"dialogs/feather_selection.html",
|
||||
_("Feather selection by:"),
|
||||
selection_feather_radius, 0, 32767, 3,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -398,7 +398,7 @@ select_grow_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Grow Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/grow_selection_dialog.html",
|
||||
"dialogs/grow_selection.html",
|
||||
_("Grow selection by:"),
|
||||
selection_grow_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -423,7 +423,7 @@ select_shrink_cmd_callback (GtkWidget *widget,
|
|||
shrink_dialog =
|
||||
gimp_query_size_box (N_("Shrink Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/shrink_selection_dialog.html",
|
||||
"dialogs/shrink_selection.html",
|
||||
N_("Shrink selection by:"),
|
||||
selection_shrink_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -1195,7 +1195,7 @@ void
|
|||
gimp_help_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
gimp_help ("");
|
||||
gimp_help (NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -490,7 +490,7 @@ convert_to_indexed (GimpImage *gimage)
|
|||
dialog->shell =
|
||||
gimp_dialog_new (_("Indexed Color Conversion"), "indexed_color_conversion",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/indexed_color_conversion_dialog.html",
|
||||
"dialogs/convert_to_indexed.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -703,7 +703,7 @@ paste_named_buffer (GDisplay *gdisp)
|
|||
pn_dlg->shell =
|
||||
gimp_dialog_new (_("Paste Named Buffer"), "paste_named_buffer",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/paste_named_buffer_dialog.html",
|
||||
"dialogs/paste_named.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -806,7 +806,7 @@ named_edit_cut (void *gdisp_ptr)
|
|||
|
||||
qbox = gimp_query_string_box (_("Cut Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/cut_named_dialog.html",
|
||||
"dialogs/cut_named.html",
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
|
@ -843,7 +843,7 @@ named_edit_copy (void *gdisp_ptr)
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/copy_named_dialog.html",
|
||||
"dialogs/copy_named.html",
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
|
|
|
@ -85,7 +85,7 @@ channel_ops_offset (GimpImage* gimage)
|
|||
|
||||
off_d->dlg = gimp_dialog_new (_("Offset"), "offset",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/offset_dialog.html",
|
||||
"dialogs/offset.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -703,7 +703,7 @@ paste_named_buffer (GDisplay *gdisp)
|
|||
pn_dlg->shell =
|
||||
gimp_dialog_new (_("Paste Named Buffer"), "paste_named_buffer",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/paste_named_buffer_dialog.html",
|
||||
"dialogs/paste_named.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -806,7 +806,7 @@ named_edit_cut (void *gdisp_ptr)
|
|||
|
||||
qbox = gimp_query_string_box (_("Cut Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/cut_named_dialog.html",
|
||||
"dialogs/cut_named.html",
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
|
@ -843,7 +843,7 @@ named_edit_copy (void *gdisp_ptr)
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/copy_named_dialog.html",
|
||||
"dialogs/copy_named.html",
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
|
|
|
@ -490,7 +490,7 @@ convert_to_indexed (GimpImage *gimage)
|
|||
dialog->shell =
|
||||
gimp_dialog_new (_("Indexed Color Conversion"), "indexed_color_conversion",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/indexed_color_conversion_dialog.html",
|
||||
"dialogs/convert_to_indexed.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ channel_ops_offset (GimpImage* gimage)
|
|||
|
||||
off_d->dlg = gimp_dialog_new (_("Offset"), "offset",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/offset_dialog.html",
|
||||
"dialogs/offset.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/edit_qmask_attributes_dialog.html",
|
||||
"dialogs/edit_qmask_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/edit_qmask_attributes_dialog.html",
|
||||
"dialogs/edit_qmask_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1670,8 +1670,9 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
|
|||
|
||||
SET_SENSITIVE (N_("/Image"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Colors"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Channel Ops"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Channels"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Alpha"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Transforms"), gdisp);
|
||||
if (gdisp)
|
||||
{
|
||||
SET_SENSITIVE (N_("/Image/RGB"), (base_type != RGB));
|
||||
|
@ -1695,7 +1696,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
|
|||
SET_SENSITIVE (N_("/Image/Alpha/Add Alpha Channel"),
|
||||
!fs && !aux && lp && !lm && !alpha);
|
||||
|
||||
SET_SENSITIVE (N_("/Image/Channel Ops/Offset"), lp);
|
||||
SET_SENSITIVE (N_("/Image/Transforms/Offset"), lp);
|
||||
}
|
||||
|
||||
SET_SENSITIVE (N_("/Layers/Stack"), gdisp);
|
||||
|
|
|
@ -185,7 +185,7 @@ create_input_dialog (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (inputd,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/input_devices_dialog.html");
|
||||
"dialogs/input_devices.html");
|
||||
|
||||
gtk_widget_show (inputd);
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ create_device_status (void)
|
|||
deviceD->shell =
|
||||
gimp_dialog_new (_("Device Status"), "device_status",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/device_status_dialog.html",
|
||||
"dialogs/device_status.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -37,11 +37,14 @@
|
|||
static void color_notebook_ok_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_cancel_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_update_callback (void *, int, int, int);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *, guint);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *,
|
||||
guint);
|
||||
static void color_notebook_help_func (gpointer data);
|
||||
|
||||
/* information we keep on each registered colour selector */
|
||||
typedef struct _ColorSelectorInfo {
|
||||
char *name; /* label used in notebook tab */
|
||||
char *help_page;
|
||||
GimpColorSelectorMethods m;
|
||||
int refs; /* number of instances around */
|
||||
gboolean active;
|
||||
|
@ -100,8 +103,7 @@ color_notebook_new (int r,
|
|||
|
||||
cnp->shell =
|
||||
gimp_dialog_new (_("Color Selection"), "color_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_notebook_dialog.html",
|
||||
color_notebook_help_func, cnp,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
@ -134,7 +136,7 @@ color_notebook_new (int r,
|
|||
if (info->active)
|
||||
{
|
||||
|
||||
csel = g_malloc (sizeof (ColorSelectorInstance));
|
||||
csel = g_new (ColorSelectorInstance, 1);
|
||||
csel->color_notebook = cnp;
|
||||
csel->info = info;
|
||||
info->refs++;
|
||||
|
@ -336,12 +338,28 @@ color_notebook_page_switch (GtkWidget *widget,
|
|||
TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
color_notebook_help_func (gpointer data)
|
||||
{
|
||||
ColorNotebookP cnp;
|
||||
gchar *help_path;
|
||||
|
||||
cnp = (ColorNotebookP) data;
|
||||
|
||||
help_path = g_strconcat ("dialogs/color_selectors/",
|
||||
cnp->cur_page->info->help_page,
|
||||
NULL);
|
||||
gimp_help (help_path);
|
||||
g_free (help_path);
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
/* Registration functions */
|
||||
|
||||
G_MODULE_EXPORT
|
||||
GimpColorSelectorID
|
||||
gimp_color_selector_register (const char *name,
|
||||
const char *help_page,
|
||||
GimpColorSelectorMethods *methods)
|
||||
{
|
||||
ColorSelectorInfo *info;
|
||||
|
@ -355,9 +373,10 @@ gimp_color_selector_register (const char *name,
|
|||
info = info->next;
|
||||
}
|
||||
|
||||
info = g_malloc (sizeof (ColorSelectorInfo));
|
||||
info = g_new (ColorSelectorInfo, 1);
|
||||
|
||||
info->name = g_strdup (name);
|
||||
info->help_page = g_strdup (help_page);
|
||||
info->m = *methods;
|
||||
info->refs = 0;
|
||||
info->active = TRUE;
|
||||
|
|
|
@ -187,7 +187,7 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
info->confirm_dlg =
|
||||
gimp_dialog_new (_("Confirm Image Size"), "confirm_size",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new_dialog.html#confirm_size_dialog",
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
@ -367,7 +367,7 @@ ui_new_image_window_create (const GimpImageNewValues *values_orig)
|
|||
|
||||
info->dlg = gimp_dialog_new (_("New Image"), "new_image",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new_dialog.html",
|
||||
"dialogs/file_new.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ module_db_browser_new (void)
|
|||
|
||||
shell = gimp_dialog_new (_("Module DB"), "module_db_dialog",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/module_db_dialog.html",
|
||||
"dialogs/module_browser.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1164,7 +1164,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
prefs_dlg =
|
||||
gimp_dialog_new (_("Preferences"), "gimp_preferences",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/preferences_dialog.html",
|
||||
"dialogs/preferences.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
|
|
@ -152,13 +152,13 @@ resize_widget_new (ResizeType type,
|
|||
case ResizeLayer:
|
||||
wmclass = "scale_layer";
|
||||
window_title = _("Scale Layer");
|
||||
help_page = "dialogs/scale_layer_dialog.html";
|
||||
help_page = "dialogs/layers/dialogs/scale_layer.html";
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
break;
|
||||
case ResizeImage:
|
||||
wmclass = "image_scale";
|
||||
window_title = _("Image Scale");
|
||||
help_page = "dialogs/scale_image_dialog.html";
|
||||
help_page = "dialogs/scale_image.html";
|
||||
frame = gtk_frame_new (_("Pixel Dimensions"));
|
||||
break;
|
||||
}
|
||||
|
@ -170,12 +170,12 @@ resize_widget_new (ResizeType type,
|
|||
case ResizeLayer:
|
||||
wmclass = "resize_layer";
|
||||
window_title = _("Resize Layer");
|
||||
help_page = "dialogs/resize_layer_dialog.html";
|
||||
help_page = "dialogs/layers/dialogs/resize_layer.html";
|
||||
break;
|
||||
case ResizeImage:
|
||||
wmclass = "image_resize";
|
||||
window_title = _("Image Resize");
|
||||
help_page = "dialogs/resize_image_dialog.html";
|
||||
help_page = "dialogs/resize_image.html";
|
||||
break;
|
||||
}
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
|
|
|
@ -347,7 +347,7 @@ gdisplay_close_warning_dialog (char *image_name,
|
|||
warning_dialog = mbox =
|
||||
gimp_dialog_new (image_name, "really_close",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/really_close_dialog.html",
|
||||
"dialogs/really_close.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1670,8 +1670,9 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
|
|||
|
||||
SET_SENSITIVE (N_("/Image"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Colors"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Channel Ops"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Channels"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Alpha"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Transforms"), gdisp);
|
||||
if (gdisp)
|
||||
{
|
||||
SET_SENSITIVE (N_("/Image/RGB"), (base_type != RGB));
|
||||
|
@ -1695,7 +1696,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
|
|||
SET_SENSITIVE (N_("/Image/Alpha/Add Alpha Channel"),
|
||||
!fs && !aux && lp && !lm && !alpha);
|
||||
|
||||
SET_SENSITIVE (N_("/Image/Channel Ops/Offset"), lp);
|
||||
SET_SENSITIVE (N_("/Image/Transforms/Offset"), lp);
|
||||
}
|
||||
|
||||
SET_SENSITIVE (N_("/Layers/Stack"), gdisp);
|
||||
|
|
|
@ -591,7 +591,7 @@ create_toolbox (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (window,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/toolbox.html");
|
||||
"toolbox/index.html");
|
||||
|
||||
wbox = gtk_vwrap_box_new (FALSE);
|
||||
gtk_wrap_box_set_justify (GTK_WRAP_BOX (wbox), GTK_JUSTIFY_FILL);
|
||||
|
@ -954,7 +954,7 @@ create_display_shell (GDisplay* gdisp,
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (gdisp->shell,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/image_window.html");
|
||||
"image/index.html");
|
||||
|
||||
gtk_widget_show (arrow);
|
||||
gtk_widget_show (gdisp->qmaskon);
|
||||
|
|
|
@ -77,7 +77,7 @@ make_dialog (void)
|
|||
|
||||
cdd.shell = gimp_dialog_new (_("Color Display Filters"), "display_color",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_diaplsy_filters_dialog.html",
|
||||
"dialogs/display_filters.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -412,7 +412,7 @@ gamma_configure (gpointer cd_ID)
|
|||
context->shell =
|
||||
gimp_dialog_new (_("Gamma"), "gamma",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gamma_dialog.html",
|
||||
"dialogs/display_filters/gamma.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/edit_qmask_attributes_dialog.html",
|
||||
"dialogs/edit_qmask_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -591,7 +591,7 @@ create_toolbox (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (window,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/toolbox.html");
|
||||
"toolbox/index.html");
|
||||
|
||||
wbox = gtk_vwrap_box_new (FALSE);
|
||||
gtk_wrap_box_set_justify (GTK_WRAP_BOX (wbox), GTK_JUSTIFY_FILL);
|
||||
|
@ -954,7 +954,7 @@ create_display_shell (GDisplay* gdisp,
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (gdisp->shell,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/image_window.html");
|
||||
"image/index.html");
|
||||
|
||||
gtk_widget_show (arrow);
|
||||
gtk_widget_show (gdisp->qmaskon);
|
||||
|
|
|
@ -187,7 +187,7 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
info->confirm_dlg =
|
||||
gimp_dialog_new (_("Confirm Image Size"), "confirm_size",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new_dialog.html#confirm_size_dialog",
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
@ -367,7 +367,7 @@ ui_new_image_window_create (const GimpImageNewValues *values_orig)
|
|||
|
||||
info->dlg = gimp_dialog_new (_("New Image"), "new_image",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new_dialog.html",
|
||||
"dialogs/file_new.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ file_open_callback (GtkWidget *widget,
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (fileload,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_load_dialog.html");
|
||||
"dialogs/file_open.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -461,7 +461,7 @@ file_save_as_callback (GtkWidget *widget,
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (filesave,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_save_dialog.html");
|
||||
"dialogs/file_save.html");
|
||||
}
|
||||
|
||||
gdisplay = gdisplay_active ();
|
||||
|
@ -1592,7 +1592,7 @@ file_overwrite (char *filename,
|
|||
overwrite_box->obox =
|
||||
gimp_dialog_new (_("File Exists!"), "file_exists",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_exists_dialog.html",
|
||||
"dialogs/file_exists.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1670,8 +1670,9 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
|
|||
|
||||
SET_SENSITIVE (N_("/Image"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Colors"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Channel Ops"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Channels"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Alpha"), gdisp);
|
||||
SET_SENSITIVE (N_("/Image/Transforms"), gdisp);
|
||||
if (gdisp)
|
||||
{
|
||||
SET_SENSITIVE (N_("/Image/RGB"), (base_type != RGB));
|
||||
|
@ -1695,7 +1696,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
|
|||
SET_SENSITIVE (N_("/Image/Alpha/Add Alpha Channel"),
|
||||
!fs && !aux && lp && !lm && !alpha);
|
||||
|
||||
SET_SENSITIVE (N_("/Image/Channel Ops/Offset"), lp);
|
||||
SET_SENSITIVE (N_("/Image/Transforms/Offset"), lp);
|
||||
}
|
||||
|
||||
SET_SENSITIVE (N_("/Layers/Stack"), gdisp);
|
||||
|
|
|
@ -412,7 +412,7 @@ gamma_configure (gpointer cd_ID)
|
|||
context->shell =
|
||||
gimp_dialog_new (_("Gamma"), "gamma",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gamma_dialog.html",
|
||||
"dialogs/display_filters/gamma.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ make_dialog (void)
|
|||
|
||||
cdd.shell = gimp_dialog_new (_("Color Display Filters"), "display_color",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_diaplsy_filters_dialog.html",
|
||||
"dialogs/display_filters.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ gdisplay_close_warning_dialog (char *image_name,
|
|||
warning_dialog = mbox =
|
||||
gimp_dialog_new (image_name, "really_close",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/really_close_dialog.html",
|
||||
"dialogs/really_close.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ channel_ops_offset (GimpImage* gimage)
|
|||
|
||||
off_d->dlg = gimp_dialog_new (_("Offset"), "offset",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/offset_dialog.html",
|
||||
"dialogs/offset.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -61,6 +61,9 @@ gimp_help_connect_help_accel (GtkWidget *widget,
|
|||
GtkAccelGroup *accel_group;
|
||||
static guint help_signal_id = 0;
|
||||
|
||||
if (! help_func)
|
||||
return;
|
||||
|
||||
/* create the help signal if not already done */
|
||||
if (! help_signal_id)
|
||||
{
|
||||
|
@ -86,6 +89,13 @@ gimp_help_connect_help_accel (GtkWidget *widget,
|
|||
|
||||
/* a new accelerator group for this widget */
|
||||
accel_group = gtk_accel_group_new ();
|
||||
|
||||
/* FIXME: does not work for some reason...
|
||||
gtk_widget_add_accelerator (widget, "help", accel_group,
|
||||
GDK_F1, 0, GTK_ACCEL_LOCKED);
|
||||
*/
|
||||
|
||||
/* ...while using this internal stuff works */
|
||||
gtk_accel_group_add (accel_group, GDK_F1, 0, 0,
|
||||
GTK_OBJECT (widget), "help");
|
||||
gtk_accel_group_attach (accel_group, GTK_OBJECT (widget));
|
||||
|
|
|
@ -490,7 +490,7 @@ convert_to_indexed (GimpImage *gimage)
|
|||
dialog->shell =
|
||||
gimp_dialog_new (_("Indexed Color Conversion"), "indexed_color_conversion",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/indexed_color_conversion_dialog.html",
|
||||
"dialogs/convert_to_indexed.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ channel_ops_offset (GimpImage* gimage)
|
|||
|
||||
off_d->dlg = gimp_dialog_new (_("Offset"), "offset",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/offset_dialog.html",
|
||||
"dialogs/offset.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ int show_indicators = TRUE;
|
|||
int max_new_image_size = 33554432; /* 32 MB */
|
||||
int thumbnail_mode = 1;
|
||||
int trust_dirty_flag = FALSE;
|
||||
int use_help = FALSE;
|
||||
int use_help = TRUE;
|
||||
|
||||
extern char * module_db_load_inhibit;
|
||||
|
||||
|
|
16
app/gimpui.c
16
app/gimpui.c
|
@ -51,7 +51,7 @@ gimp_dialog_delete_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
/*
|
||||
#include "/home/mitschel/gimpfiles/wilber.xpm"
|
||||
#include "/home/mitch/gimp.xpm"
|
||||
|
||||
static void
|
||||
gimp_dialog_realize_callback (GtkWidget *widget,
|
||||
|
@ -68,7 +68,7 @@ gimp_dialog_realize_callback (GtkWidget *widget,
|
|||
gdk_pixmap_create_from_xpm_d (widget->window,
|
||||
&wilber_mask,
|
||||
&style->bg[GTK_STATE_NORMAL],
|
||||
wilber_xpm);
|
||||
gimp_xpm);
|
||||
|
||||
gdk_window_set_icon (widget->window, NULL,
|
||||
wilber_pixmap, wilber_mask);
|
||||
|
@ -86,11 +86,12 @@ gimp_dialog_new (const gchar *title,
|
|||
gint auto_shrink,
|
||||
|
||||
/* specify action area buttons as va_list:
|
||||
* gchar *label,
|
||||
* GtkSignalFunc callback,
|
||||
* gpointer data,
|
||||
* gboolean default_action,
|
||||
* gboolean connect_delete,
|
||||
* gchar *label,
|
||||
* GtkSignalFunc callback,
|
||||
* gpointer data,
|
||||
* GtkWidget **widget_ptr,
|
||||
* gboolean default_action,
|
||||
* gboolean connect_delete,
|
||||
*/
|
||||
|
||||
...)
|
||||
|
@ -219,7 +220,6 @@ gimp_dialog_newv (const gchar *title,
|
|||
gtk_signal_connect (GTK_OBJECT (dialog), "realize",
|
||||
(GtkSignalFunc) gimp_dialog_realize_callback,
|
||||
NULL);
|
||||
|
||||
*/
|
||||
|
||||
/* connect the "F1" help key */
|
||||
|
|
|
@ -703,7 +703,7 @@ paste_named_buffer (GDisplay *gdisp)
|
|||
pn_dlg->shell =
|
||||
gimp_dialog_new (_("Paste Named Buffer"), "paste_named_buffer",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/paste_named_buffer_dialog.html",
|
||||
"dialogs/paste_named.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -806,7 +806,7 @@ named_edit_cut (void *gdisp_ptr)
|
|||
|
||||
qbox = gimp_query_string_box (_("Cut Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/cut_named_dialog.html",
|
||||
"dialogs/cut_named.html",
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
|
@ -843,7 +843,7 @@ named_edit_copy (void *gdisp_ptr)
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy Named"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/copy_named_dialog.html",
|
||||
"dialogs/copy_named.html",
|
||||
_("Enter a name for this buffer"),
|
||||
NULL,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
|
|
|
@ -685,7 +685,7 @@ grad_create_gradient_editor_init (gint need_show)
|
|||
/* Shell and main vbox */
|
||||
g_editor->shell = gimp_dialog_new (_("Gradient Editor"), "gradient_editor",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/index.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ ed_new_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("New gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/new_gradient.html",
|
||||
_("Enter a name for the new gradient"),
|
||||
_("untitled"),
|
||||
NULL, NULL,
|
||||
|
@ -1388,7 +1388,7 @@ ed_copy_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/copy_gradient.html",
|
||||
_("Enter a name for the copied gradient"),
|
||||
name,
|
||||
NULL, NULL,
|
||||
|
@ -1474,7 +1474,7 @@ ed_rename_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Rename gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/rename_gradient.html",
|
||||
_("Enter a new name for the gradient"),
|
||||
curr_gradient->name,
|
||||
NULL, NULL,
|
||||
|
@ -1556,7 +1556,7 @@ ed_delete_gradient_callback (GtkWidget *widget,
|
|||
|
||||
dialog = gimp_dialog_new (_("Delete gradient"), "delete_gradient",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/delete_gradient.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ ed_save_pov_callback (GtkWidget *widget,
|
|||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (window, gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html");
|
||||
"dialogs/gradient_editor/dialogs/save_as_pov_ray.html");
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_widget_set_sensitive (g_editor->shell, FALSE);
|
||||
|
@ -4612,7 +4612,7 @@ cpopup_split_uniform_callback (GtkWidget *widget,
|
|||
_("Split segments uniformly"),
|
||||
"gradient_segment_split_uniformly",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/split_segments_uniformly.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -5171,7 +5171,7 @@ cpopup_replicate_callback (GtkWidget *widget,
|
|||
_("Replicate selection"),
|
||||
"gradient_segment_replicate",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/replicate_segment.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ grad_create_gradient_editor_init (gint need_show)
|
|||
/* Shell and main vbox */
|
||||
g_editor->shell = gimp_dialog_new (_("Gradient Editor"), "gradient_editor",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/index.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ ed_new_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("New gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/new_gradient.html",
|
||||
_("Enter a name for the new gradient"),
|
||||
_("untitled"),
|
||||
NULL, NULL,
|
||||
|
@ -1388,7 +1388,7 @@ ed_copy_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/copy_gradient.html",
|
||||
_("Enter a name for the copied gradient"),
|
||||
name,
|
||||
NULL, NULL,
|
||||
|
@ -1474,7 +1474,7 @@ ed_rename_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Rename gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/rename_gradient.html",
|
||||
_("Enter a new name for the gradient"),
|
||||
curr_gradient->name,
|
||||
NULL, NULL,
|
||||
|
@ -1556,7 +1556,7 @@ ed_delete_gradient_callback (GtkWidget *widget,
|
|||
|
||||
dialog = gimp_dialog_new (_("Delete gradient"), "delete_gradient",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/delete_gradient.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ ed_save_pov_callback (GtkWidget *widget,
|
|||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (window, gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html");
|
||||
"dialogs/gradient_editor/dialogs/save_as_pov_ray.html");
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_widget_set_sensitive (g_editor->shell, FALSE);
|
||||
|
@ -4612,7 +4612,7 @@ cpopup_split_uniform_callback (GtkWidget *widget,
|
|||
_("Split segments uniformly"),
|
||||
"gradient_segment_split_uniformly",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/split_segments_uniformly.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -5171,7 +5171,7 @@ cpopup_replicate_callback (GtkWidget *widget,
|
|||
_("Replicate selection"),
|
||||
"gradient_segment_replicate",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/replicate_segment.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -447,7 +447,7 @@ gsel_new_selection (gchar *title,
|
|||
gsp->shell = gimp_dialog_new (title ? title : _("Gradient Selection"),
|
||||
"gradient_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_selection_dialog.html",
|
||||
"dialogs/gradient_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ brush_edit_generated_new ()
|
|||
|
||||
begw->shell = gimp_dialog_new (_("Brush Editor"), "generated_brush_editor",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/generated_brush_editor_dialog.html",
|
||||
"dialogs/generated_brush_editor.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ brush_select_new (gchar *title,
|
|||
{
|
||||
bsp->shell = gimp_dialog_new (title, "brush_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/brush_selection_dialog.html",
|
||||
"dialogs/brush_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -218,7 +218,7 @@ brush_select_new (gchar *title,
|
|||
{
|
||||
bsp->shell = gimp_dialog_new (_("Brush Selection"), "brush_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/brush_selection_dialog.html",
|
||||
"dialogs/brush_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -2391,7 +2391,7 @@ channels_dialog_new_channel_query (GimpImage* gimage)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("New Channel Options"), "new_channel_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels_dialog.html",
|
||||
"dialogs/channels/dialogs/new_channel.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2565,7 +2565,7 @@ channels_dialog_edit_channel_query (ChannelWidget *channel_widget)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Channel Attributes"), "edit_channel_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/channels_dialog.html",
|
||||
"dialogs/channels/dialogs/edit_channel_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -37,11 +37,14 @@
|
|||
static void color_notebook_ok_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_cancel_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_update_callback (void *, int, int, int);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *, guint);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *,
|
||||
guint);
|
||||
static void color_notebook_help_func (gpointer data);
|
||||
|
||||
/* information we keep on each registered colour selector */
|
||||
typedef struct _ColorSelectorInfo {
|
||||
char *name; /* label used in notebook tab */
|
||||
char *help_page;
|
||||
GimpColorSelectorMethods m;
|
||||
int refs; /* number of instances around */
|
||||
gboolean active;
|
||||
|
@ -100,8 +103,7 @@ color_notebook_new (int r,
|
|||
|
||||
cnp->shell =
|
||||
gimp_dialog_new (_("Color Selection"), "color_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_notebook_dialog.html",
|
||||
color_notebook_help_func, cnp,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
@ -134,7 +136,7 @@ color_notebook_new (int r,
|
|||
if (info->active)
|
||||
{
|
||||
|
||||
csel = g_malloc (sizeof (ColorSelectorInstance));
|
||||
csel = g_new (ColorSelectorInstance, 1);
|
||||
csel->color_notebook = cnp;
|
||||
csel->info = info;
|
||||
info->refs++;
|
||||
|
@ -336,12 +338,28 @@ color_notebook_page_switch (GtkWidget *widget,
|
|||
TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
color_notebook_help_func (gpointer data)
|
||||
{
|
||||
ColorNotebookP cnp;
|
||||
gchar *help_path;
|
||||
|
||||
cnp = (ColorNotebookP) data;
|
||||
|
||||
help_path = g_strconcat ("dialogs/color_selectors/",
|
||||
cnp->cur_page->info->help_page,
|
||||
NULL);
|
||||
gimp_help (help_path);
|
||||
g_free (help_path);
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
/* Registration functions */
|
||||
|
||||
G_MODULE_EXPORT
|
||||
GimpColorSelectorID
|
||||
gimp_color_selector_register (const char *name,
|
||||
const char *help_page,
|
||||
GimpColorSelectorMethods *methods)
|
||||
{
|
||||
ColorSelectorInfo *info;
|
||||
|
@ -355,9 +373,10 @@ gimp_color_selector_register (const char *name,
|
|||
info = info->next;
|
||||
}
|
||||
|
||||
info = g_malloc (sizeof (ColorSelectorInfo));
|
||||
info = g_new (ColorSelectorInfo, 1);
|
||||
|
||||
info->name = g_strdup (name);
|
||||
info->help_page = g_strdup (help_page);
|
||||
info->m = *methods;
|
||||
info->refs = 0;
|
||||
info->active = TRUE;
|
||||
|
|
|
@ -45,6 +45,13 @@
|
|||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | \
|
||||
GDK_BUTTON1_MOTION_MASK | GDK_ENTER_NOTIFY_MASK
|
||||
|
||||
typedef enum
|
||||
{
|
||||
COLOR_SELECT_OK,
|
||||
COLOR_SELECT_CANCEL,
|
||||
COLOR_SELECT_UPDATE
|
||||
} ColorSelectState;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HUE = 0,
|
||||
|
@ -72,6 +79,33 @@ typedef enum
|
|||
UPDATE_CALLER = 1 << 6
|
||||
} ColorSelectUpdateType;
|
||||
|
||||
typedef void (*ColorSelectCallback) (gint, gint, gint, ColorSelectState, void *);
|
||||
|
||||
typedef struct _ColorSelect ColorSelect, *ColorSelectP;
|
||||
|
||||
struct _ColorSelect
|
||||
{
|
||||
GtkWidget *xy_color;
|
||||
GtkWidget *z_color;
|
||||
GtkWidget *new_color;
|
||||
GtkWidget *orig_color;
|
||||
GtkWidget *toggles[6];
|
||||
GtkWidget *entries[6];
|
||||
GtkWidget *hex_entry;
|
||||
GtkAdjustment *slider_data[6];
|
||||
|
||||
gint pos[3];
|
||||
gint values[6];
|
||||
gint z_color_fill;
|
||||
gint xy_color_fill;
|
||||
gint orig_values[3];
|
||||
gboolean wants_updates;
|
||||
GdkGC *gc;
|
||||
|
||||
ColorSelectCallback callback;
|
||||
void *client_data;
|
||||
};
|
||||
|
||||
typedef struct _ColorSelectFill ColorSelectFill;
|
||||
|
||||
typedef void (*ColorSelectFillUpdateProc) (ColorSelectFill *);
|
||||
|
@ -110,8 +144,6 @@ static void color_select_update_sliders (ColorSelect *, gint);
|
|||
static void color_select_update_entries (ColorSelect *, gint);
|
||||
static void color_select_update_colors (ColorSelect *, gint);
|
||||
|
||||
static void color_select_ok_callback (GtkWidget *, gpointer);
|
||||
static void color_select_cancel_callback (GtkWidget *, gpointer);
|
||||
static gint color_select_xy_expose (GtkWidget *, GdkEventExpose *,
|
||||
ColorSelect *);
|
||||
static gint color_select_xy_events (GtkWidget *, GdkEvent *,
|
||||
|
@ -180,60 +212,22 @@ static GtkTargetEntry color_select_target_table[] =
|
|||
static guint n_color_select_targets = (sizeof (color_select_target_table) /
|
||||
sizeof (color_select_target_table[0]));
|
||||
|
||||
ColorSelect *
|
||||
color_select_new (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorSelectCallback callback,
|
||||
gpointer data,
|
||||
gboolean wants_updates)
|
||||
|
||||
/* Register the GIMP colour selector with the color notebook */
|
||||
void
|
||||
color_select_init (void)
|
||||
{
|
||||
ColorSelect *csp;
|
||||
GtkWidget *main_vbox;
|
||||
GimpColorSelectorMethods methods =
|
||||
{
|
||||
color_select_notebook_new,
|
||||
color_select_notebook_free,
|
||||
color_select_notebook_setcolor
|
||||
};
|
||||
|
||||
csp = g_new (ColorSelect, 1);
|
||||
|
||||
csp->callback = callback;
|
||||
csp->client_data = data;
|
||||
csp->z_color_fill = HUE;
|
||||
csp->xy_color_fill = SATURATION_VALUE;
|
||||
csp->gc = NULL;
|
||||
csp->wants_updates = wants_updates;
|
||||
|
||||
csp->values[RED] = csp->orig_values[0] = r;
|
||||
csp->values[GREEN] = csp->orig_values[1] = g;
|
||||
csp->values[BLUE] = csp->orig_values[2] = b;
|
||||
color_select_update_hsv_values (csp);
|
||||
color_select_update_pos (csp);
|
||||
|
||||
csp->shell =
|
||||
gimp_dialog_new (_("Color Selection"), "color_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_selection_dialog.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
wants_updates ? _("Close") : _("OK"),
|
||||
color_select_ok_callback,
|
||||
csp, NULL, TRUE, FALSE,
|
||||
wants_updates ? _("Revert to Old Color") : _("Cancel"),
|
||||
color_select_cancel_callback,
|
||||
csp, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
main_vbox = color_select_widget_new (csp, r, g, b);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (csp->shell)->vbox), main_vbox);
|
||||
gtk_widget_show (main_vbox);
|
||||
|
||||
color_select_image_fill (csp->z_color, csp->z_color_fill, csp->values);
|
||||
color_select_image_fill (csp->xy_color, csp->xy_color_fill, csp->values);
|
||||
|
||||
gtk_widget_show (csp->shell);
|
||||
|
||||
return csp;
|
||||
gimp_color_selector_register ("GIMP", "built_in.html", &methods);
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
color_select_widget_new (ColorSelect *csp,
|
||||
gint r,
|
||||
|
@ -504,47 +498,7 @@ color_select_drag_old_color (GtkWidget *widget,
|
|||
*b = (guchar) csp->orig_values[2];
|
||||
}
|
||||
|
||||
/* Register the GIMP colour selector with the color notebook */
|
||||
void
|
||||
color_select_init (void)
|
||||
{
|
||||
GimpColorSelectorMethods methods =
|
||||
{
|
||||
color_select_notebook_new,
|
||||
color_select_notebook_free,
|
||||
color_select_notebook_setcolor
|
||||
};
|
||||
|
||||
gimp_color_selector_register ("GIMP", &methods);
|
||||
}
|
||||
|
||||
void
|
||||
color_select_show (ColorSelect *csp)
|
||||
{
|
||||
if (csp)
|
||||
gtk_widget_show (csp->shell);
|
||||
}
|
||||
|
||||
void
|
||||
color_select_hide (ColorSelect *csp)
|
||||
{
|
||||
if (csp)
|
||||
gtk_widget_hide (csp->shell);
|
||||
}
|
||||
|
||||
void
|
||||
color_select_free (ColorSelect *csp)
|
||||
{
|
||||
if (csp)
|
||||
{
|
||||
if (csp->shell)
|
||||
gtk_widget_destroy (csp->shell);
|
||||
gdk_gc_destroy (csp->gc);
|
||||
g_free (csp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
color_select_set_color (ColorSelect *csp,
|
||||
gint r,
|
||||
gint g,
|
||||
|
@ -963,42 +917,6 @@ color_select_update_colors (ColorSelect *csp,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
color_select_ok_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
ColorSelect *csp;
|
||||
|
||||
csp = (ColorSelect *) data;
|
||||
if (csp)
|
||||
{
|
||||
if (csp->callback)
|
||||
(* csp->callback) (csp->values[RED],
|
||||
csp->values[GREEN],
|
||||
csp->values[BLUE],
|
||||
COLOR_SELECT_OK,
|
||||
csp->client_data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
color_select_cancel_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
ColorSelect *csp;
|
||||
|
||||
csp = (ColorSelect *) data;
|
||||
if (csp)
|
||||
{
|
||||
if (csp->callback)
|
||||
(* csp->callback) (csp->orig_values[0],
|
||||
csp->orig_values[1],
|
||||
csp->orig_values[2],
|
||||
COLOR_SELECT_CANCEL,
|
||||
csp->client_data);
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
color_select_xy_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
|
@ -2176,9 +2094,6 @@ color_select_notebook_new (gint r,
|
|||
|
||||
glue->main_vbox = color_select_widget_new (csp, r, g, b);
|
||||
|
||||
/* the shell is provided by the notebook */
|
||||
csp->shell = NULL;
|
||||
|
||||
color_select_image_fill (csp->z_color, csp->z_color_fill, csp->values);
|
||||
color_select_image_fill (csp->xy_color, csp->xy_color_fill, csp->values);
|
||||
|
||||
|
@ -2186,13 +2101,13 @@ color_select_notebook_new (gint r,
|
|||
return glue->main_vbox;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
color_select_notebook_free (void *data)
|
||||
{
|
||||
notebook_glue *glue = data;
|
||||
|
||||
color_select_free (glue->csp);
|
||||
gdk_gc_destroy (glue->csp->gc);
|
||||
g_free (glue->csp);
|
||||
/* don't need to destroy the widget, since it's done by the caller
|
||||
* of this function */
|
||||
g_free (glue);
|
||||
|
|
|
@ -18,53 +18,6 @@
|
|||
#ifndef __COLOR_SELECT_H__
|
||||
#define __COLOR_SELECT_H__
|
||||
|
||||
typedef enum
|
||||
{
|
||||
COLOR_SELECT_OK,
|
||||
COLOR_SELECT_CANCEL,
|
||||
COLOR_SELECT_UPDATE
|
||||
} ColorSelectState;
|
||||
|
||||
typedef void (*ColorSelectCallback) (gint, gint, gint, ColorSelectState, void *);
|
||||
|
||||
typedef struct _ColorSelect ColorSelect, *ColorSelectP;
|
||||
|
||||
struct _ColorSelect
|
||||
{
|
||||
GtkWidget *shell;
|
||||
GtkWidget *xy_color;
|
||||
GtkWidget *z_color;
|
||||
GtkWidget *new_color;
|
||||
GtkWidget *orig_color;
|
||||
GtkWidget *toggles[6];
|
||||
GtkWidget *entries[6];
|
||||
GtkWidget *hex_entry;
|
||||
GtkAdjustment *slider_data[6];
|
||||
|
||||
gint pos[3];
|
||||
gint values[6];
|
||||
gint z_color_fill;
|
||||
gint xy_color_fill;
|
||||
gint orig_values[3];
|
||||
gboolean wants_updates;
|
||||
GdkGC *gc;
|
||||
|
||||
ColorSelectCallback callback;
|
||||
void *client_data;
|
||||
};
|
||||
|
||||
void color_select_init (void);
|
||||
|
||||
ColorSelectP color_select_new (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorSelectCallback callback,
|
||||
gpointer client_data,
|
||||
gboolean wants_update);
|
||||
void color_select_show (ColorSelectP);
|
||||
void color_select_hide (ColorSelectP);
|
||||
void color_select_free (ColorSelectP);
|
||||
void color_select_set_color (ColorSelectP,
|
||||
gint, gint, gint, gint);
|
||||
|
||||
#endif /* __COLOR_SELECT_H__ */
|
||||
|
|
|
@ -352,7 +352,7 @@ select_border_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Border Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/border_selection_dialog.html",
|
||||
"dialogs/border_selection.html",
|
||||
_("Border selection by:"),
|
||||
selection_border_radius, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -375,7 +375,7 @@ select_feather_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Feather Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/feather_selection_dialog.html",
|
||||
"dialogs/feather_selection.html",
|
||||
_("Feather selection by:"),
|
||||
selection_feather_radius, 0, 32767, 3,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -398,7 +398,7 @@ select_grow_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Grow Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/grow_selection_dialog.html",
|
||||
"dialogs/grow_selection.html",
|
||||
_("Grow selection by:"),
|
||||
selection_grow_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -423,7 +423,7 @@ select_shrink_cmd_callback (GtkWidget *widget,
|
|||
shrink_dialog =
|
||||
gimp_query_size_box (N_("Shrink Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/shrink_selection_dialog.html",
|
||||
"dialogs/shrink_selection.html",
|
||||
N_("Shrink selection by:"),
|
||||
selection_shrink_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -1195,7 +1195,7 @@ void
|
|||
gimp_help_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
gimp_help ("");
|
||||
gimp_help (NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -185,7 +185,7 @@ create_input_dialog (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (inputd,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/input_devices_dialog.html");
|
||||
"dialogs/input_devices.html");
|
||||
|
||||
gtk_widget_show (inputd);
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ create_device_status (void)
|
|||
deviceD->shell =
|
||||
gimp_dialog_new (_("Device Status"), "device_status",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/device_status_dialog.html",
|
||||
"dialogs/device_status.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
info->confirm_dlg =
|
||||
gimp_dialog_new (_("Confirm Image Size"), "confirm_size",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new_dialog.html#confirm_size_dialog",
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
@ -367,7 +367,7 @@ ui_new_image_window_create (const GimpImageNewValues *values_orig)
|
|||
|
||||
info->dlg = gimp_dialog_new (_("New Image"), "new_image",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new_dialog.html",
|
||||
"dialogs/file_new.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ grad_create_gradient_editor_init (gint need_show)
|
|||
/* Shell and main vbox */
|
||||
g_editor->shell = gimp_dialog_new (_("Gradient Editor"), "gradient_editor",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/index.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ ed_new_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("New gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/new_gradient.html",
|
||||
_("Enter a name for the new gradient"),
|
||||
_("untitled"),
|
||||
NULL, NULL,
|
||||
|
@ -1388,7 +1388,7 @@ ed_copy_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/copy_gradient.html",
|
||||
_("Enter a name for the copied gradient"),
|
||||
name,
|
||||
NULL, NULL,
|
||||
|
@ -1474,7 +1474,7 @@ ed_rename_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Rename gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/rename_gradient.html",
|
||||
_("Enter a new name for the gradient"),
|
||||
curr_gradient->name,
|
||||
NULL, NULL,
|
||||
|
@ -1556,7 +1556,7 @@ ed_delete_gradient_callback (GtkWidget *widget,
|
|||
|
||||
dialog = gimp_dialog_new (_("Delete gradient"), "delete_gradient",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/delete_gradient.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ ed_save_pov_callback (GtkWidget *widget,
|
|||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (window, gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html");
|
||||
"dialogs/gradient_editor/dialogs/save_as_pov_ray.html");
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_widget_set_sensitive (g_editor->shell, FALSE);
|
||||
|
@ -4612,7 +4612,7 @@ cpopup_split_uniform_callback (GtkWidget *widget,
|
|||
_("Split segments uniformly"),
|
||||
"gradient_segment_split_uniformly",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/split_segments_uniformly.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -5171,7 +5171,7 @@ cpopup_replicate_callback (GtkWidget *widget,
|
|||
_("Replicate selection"),
|
||||
"gradient_segment_replicate",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/replicate_segment.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -447,7 +447,7 @@ gsel_new_selection (gchar *title,
|
|||
gsp->shell = gimp_dialog_new (title ? title : _("Gradient Selection"),
|
||||
"gradient_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_selection_dialog.html",
|
||||
"dialogs/gradient_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ select_border_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Border Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/border_selection_dialog.html",
|
||||
"dialogs/border_selection.html",
|
||||
_("Border selection by:"),
|
||||
selection_border_radius, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -375,7 +375,7 @@ select_feather_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Feather Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/feather_selection_dialog.html",
|
||||
"dialogs/feather_selection.html",
|
||||
_("Feather selection by:"),
|
||||
selection_feather_radius, 0, 32767, 3,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -398,7 +398,7 @@ select_grow_cmd_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_size_box (_("Grow Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/grow_selection_dialog.html",
|
||||
"dialogs/grow_selection.html",
|
||||
_("Grow selection by:"),
|
||||
selection_grow_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -423,7 +423,7 @@ select_shrink_cmd_callback (GtkWidget *widget,
|
|||
shrink_dialog =
|
||||
gimp_query_size_box (N_("Shrink Selection"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/shrink_selection_dialog.html",
|
||||
"dialogs/shrink_selection.html",
|
||||
N_("Shrink selection by:"),
|
||||
selection_shrink_pixels, 1, 32767, 0,
|
||||
gdisp->gimage->unit,
|
||||
|
@ -1195,7 +1195,7 @@ void
|
|||
gimp_help_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
gimp_help ("");
|
||||
gimp_help (NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -185,7 +185,7 @@ create_input_dialog (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (inputd,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/input_devices_dialog.html");
|
||||
"dialogs/input_devices.html");
|
||||
|
||||
gtk_widget_show (inputd);
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ create_device_status (void)
|
|||
deviceD->shell =
|
||||
gimp_dialog_new (_("Device Status"), "device_status",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/device_status_dialog.html",
|
||||
"dialogs/device_status.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -3302,7 +3302,7 @@ layers_dialog_new_layer_query (GimpImage* gimage)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("New Layer Options"), "new_layer_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/new_layer.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -3508,7 +3508,7 @@ layers_dialog_edit_layer_query (LayerWidget *layer_widget)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Layer Attributes"), "edit_layer_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/edit_layer_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -3633,7 +3633,7 @@ layers_dialog_add_mask_query (Layer *layer)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Add Mask Options"), "add_mask_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/add_mask.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -3745,7 +3745,7 @@ layers_dialog_apply_mask_query (Layer *layer)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Layer Mask Options"), "layer_mask_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/apply_mask.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -4034,7 +4034,7 @@ layers_dialog_layer_merge_query (GImage *gimage,
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Layer Merge Options"), "layer_merge_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/merge_visible_layers.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
852
app/gui/menus.c
852
app/gui/menus.c
File diff suppressed because it is too large
Load Diff
|
@ -261,7 +261,7 @@ module_db_browser_new (void)
|
|||
|
||||
shell = gimp_dialog_new (_("Module DB"), "module_db_dialog",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/module_db_dialog.html",
|
||||
"dialogs/module_browser.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "buildmenu.h"
|
||||
#include "colormaps.h"
|
||||
#include "color_area.h"
|
||||
#include "color_select.h"
|
||||
#include "color_notebook.h"
|
||||
#include "datafiles.h"
|
||||
#include "devices.h"
|
||||
#include "errors.h"
|
||||
|
@ -110,8 +110,8 @@ struct _PaletteDialog
|
|||
GtkWidget *clist;
|
||||
GtkWidget *popup_menu;
|
||||
GtkWidget *popup_small_menu;
|
||||
ColorSelectP color_select;
|
||||
int color_select_active;
|
||||
ColorNotebookP color_notebook;
|
||||
gboolean color_notebook_active;
|
||||
PaletteEntriesP entries;
|
||||
PaletteEntryP color;
|
||||
GdkGC *gc;
|
||||
|
@ -470,8 +470,8 @@ palette_free ()
|
|||
|
||||
gdk_gc_destroy (top_level_edit_palette->gc);
|
||||
|
||||
if (top_level_edit_palette->color_select)
|
||||
color_select_free (top_level_edit_palette->color_select);
|
||||
if (top_level_edit_palette->color_notebook)
|
||||
color_notebook_free (top_level_edit_palette->color_notebook);
|
||||
|
||||
g_free (top_level_edit_palette);
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ palette_new_entries_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("New Palette"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/new_palette.html",
|
||||
_("Enter a name for new palette"),
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
|
@ -1135,10 +1135,10 @@ palette_refresh (PaletteDialog *palette)
|
|||
palette->entries = NULL;
|
||||
|
||||
/* If a color selection dialog is up, hide it */
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
palette_free_palettes (); /* free palettes, don't save any modified versions */
|
||||
palette_init_palettes (FALSE); /* reload palettes */
|
||||
|
@ -1234,11 +1234,11 @@ palette_draw_small_preview(GdkGC *gc,
|
|||
|
||||
|
||||
static void
|
||||
palette_select_callback (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorSelectState state,
|
||||
void *data)
|
||||
palette_select_callback (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorNotebookState state,
|
||||
void *data)
|
||||
{
|
||||
PaletteDialog *palette;
|
||||
guchar *color;
|
||||
|
@ -1252,9 +1252,9 @@ palette_select_callback (gint r,
|
|||
{
|
||||
switch (state)
|
||||
{
|
||||
case COLOR_SELECT_UPDATE:
|
||||
case COLOR_NOTEBOOK_UPDATE:
|
||||
break;
|
||||
case COLOR_SELECT_OK:
|
||||
case COLOR_NOTEBOOK_OK:
|
||||
if (palette->color)
|
||||
{
|
||||
color = palette->color->color;
|
||||
|
@ -1298,9 +1298,9 @@ palette_select_callback (gint r,
|
|||
palette_select2_set_text_all (palette->entries);
|
||||
}
|
||||
/* Fallthrough */
|
||||
case COLOR_SELECT_CANCEL:
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_select_active = 0;
|
||||
case COLOR_NOTEBOOK_CANCEL:
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
palette->color_notebook_active = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1361,10 +1361,10 @@ palette_close_callback (GtkWidget *widget,
|
|||
palette = data;
|
||||
if (palette)
|
||||
{
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
|
||||
if(import_dialog)
|
||||
|
@ -1406,24 +1406,24 @@ palette_edit_callback (GtkWidget *widget,
|
|||
{
|
||||
color = palette->color->color;
|
||||
|
||||
if (!palette->color_select)
|
||||
if (!palette->color_notebook)
|
||||
{
|
||||
palette->color_select =
|
||||
color_select_new (color[0], color[1], color[2],
|
||||
palette_select_callback, palette,
|
||||
FALSE);
|
||||
palette->color_select_active = 1;
|
||||
palette->color_notebook =
|
||||
color_notebook_new (color[0], color[1], color[2],
|
||||
palette_select_callback, palette,
|
||||
FALSE);
|
||||
palette->color_notebook_active = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!palette->color_select_active)
|
||||
if (!palette->color_notebook_active)
|
||||
{
|
||||
color_select_show (palette->color_select);
|
||||
palette->color_select_active = 1;
|
||||
color_notebook_show (palette->color_notebook);
|
||||
palette->color_notebook_active = TRUE;
|
||||
}
|
||||
|
||||
color_select_set_color (palette->color_select,
|
||||
color[0], color[1], color[2], 1);
|
||||
color_notebook_set_color (palette->color_notebook,
|
||||
color[0], color[1], color[2], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1931,15 +1931,15 @@ palette_list_item_update (GtkWidget *widget,
|
|||
|
||||
palette = (PaletteDialog *) data;
|
||||
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
|
||||
if (palette->color_select)
|
||||
color_select_free (palette->color_select);
|
||||
palette->color_select = NULL;
|
||||
if (palette->color_notebook)
|
||||
color_notebook_free (palette->color_notebook);
|
||||
palette->color_notebook = NULL;
|
||||
|
||||
p_entries =
|
||||
(PaletteEntriesP) gtk_clist_get_row_data (GTK_CLIST (palette->clist), row);
|
||||
|
@ -2013,8 +2013,8 @@ create_palette_dialog (gint vert)
|
|||
|
||||
palette->entries = default_palette_entries;
|
||||
palette->color = NULL;
|
||||
palette->color_select = NULL;
|
||||
palette->color_select_active = 0;
|
||||
palette->color_notebook = NULL;
|
||||
palette->color_notebook_active = FALSE;
|
||||
palette->zoom_factor = 1.0;
|
||||
palette->columns = COLUMNS;
|
||||
palette->columns_valid = TRUE;
|
||||
|
@ -2025,7 +2025,7 @@ create_palette_dialog (gint vert)
|
|||
palette->shell =
|
||||
gimp_dialog_new (_("Color Palette Edit"), "color_palette_edit",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/index.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2044,7 +2044,7 @@ create_palette_dialog (gint vert)
|
|||
palette->shell =
|
||||
gimp_dialog_new (_("Color Palette"), "color_palette",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_dialog.html",
|
||||
"dialogs/palette_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2484,7 +2484,7 @@ palette_merge_dialog_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Merge Palette"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/merge_palette.html",
|
||||
_("Enter a name for merged palette"),
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
|
@ -2829,7 +2829,7 @@ palette_import_dialog (PaletteDialog *palette)
|
|||
import_dialog->dialog = dialog =
|
||||
gimp_dialog_new (_("Import Palette"), "import_palette",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/import_palette_dialog.html",
|
||||
"dialogs/palette_editor/import_palette.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -16,25 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "colormaps.h"
|
||||
#include "color_area.h"
|
||||
#include "color_select.h"
|
||||
#include "datafiles.h"
|
||||
#include "errors.h"
|
||||
#include "gimprc.h"
|
||||
#include "gimpui.h"
|
||||
#include "interface.h"
|
||||
#include "palette.h"
|
||||
#include "palette_entries.h"
|
||||
#include "session.h"
|
||||
#include "palette_select.h"
|
||||
|
@ -234,7 +216,7 @@ palette_new_selection (gchar *title,
|
|||
psp->shell = gimp_dialog_new (title ? title : _("Palette Selection"),
|
||||
"palette_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/palette_selection_dialog.html",
|
||||
"dialogs/palette_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1230,7 +1230,7 @@ paths_dialog_edit_path_query (GtkWidget *widget)
|
|||
|
||||
qbox = gimp_query_string_box (_("Rename path"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/paths_dialog.html",
|
||||
"dialogs/paths/rename_path.html",
|
||||
_("Enter a new name for the path"),
|
||||
text,
|
||||
NULL, NULL,
|
||||
|
|
|
@ -95,7 +95,7 @@ pattern_select_new (gchar *title,
|
|||
psp->shell =
|
||||
gimp_dialog_new (title, "pattern_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/pattern_selection_dialog.html",
|
||||
"dialogs/pattern_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -114,7 +114,7 @@ pattern_select_new (gchar *title,
|
|||
psp->shell =
|
||||
gimp_dialog_new (_("Pattern Selection"), "pattern_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/pattern_selection_dialog.html",
|
||||
"dialogs/pattern_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1164,7 +1164,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
prefs_dlg =
|
||||
gimp_dialog_new (_("Preferences"), "gimp_preferences",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/preferences_dialog.html",
|
||||
"dialogs/preferences.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/edit_qmask_attributes_dialog.html",
|
||||
"dialogs/edit_qmask_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -152,13 +152,13 @@ resize_widget_new (ResizeType type,
|
|||
case ResizeLayer:
|
||||
wmclass = "scale_layer";
|
||||
window_title = _("Scale Layer");
|
||||
help_page = "dialogs/scale_layer_dialog.html";
|
||||
help_page = "dialogs/layers/dialogs/scale_layer.html";
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
break;
|
||||
case ResizeImage:
|
||||
wmclass = "image_scale";
|
||||
window_title = _("Image Scale");
|
||||
help_page = "dialogs/scale_image_dialog.html";
|
||||
help_page = "dialogs/scale_image.html";
|
||||
frame = gtk_frame_new (_("Pixel Dimensions"));
|
||||
break;
|
||||
}
|
||||
|
@ -170,12 +170,12 @@ resize_widget_new (ResizeType type,
|
|||
case ResizeLayer:
|
||||
wmclass = "resize_layer";
|
||||
window_title = _("Resize Layer");
|
||||
help_page = "dialogs/resize_layer_dialog.html";
|
||||
help_page = "dialogs/layers/dialogs/resize_layer.html";
|
||||
break;
|
||||
case ResizeImage:
|
||||
wmclass = "image_resize";
|
||||
window_title = _("Image Resize");
|
||||
help_page = "dialogs/resize_image_dialog.html";
|
||||
help_page = "dialogs/resize_image.html";
|
||||
break;
|
||||
}
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
|
|
|
@ -591,7 +591,7 @@ create_toolbox (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (window,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/toolbox.html");
|
||||
"toolbox/index.html");
|
||||
|
||||
wbox = gtk_vwrap_box_new (FALSE);
|
||||
gtk_wrap_box_set_justify (GTK_WRAP_BOX (wbox), GTK_JUSTIFY_FILL);
|
||||
|
@ -954,7 +954,7 @@ create_display_shell (GDisplay* gdisp,
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (gdisp->shell,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/image_window.html");
|
||||
"image/index.html");
|
||||
|
||||
gtk_widget_show (arrow);
|
||||
gtk_widget_show (gdisp->qmaskon);
|
||||
|
|
|
@ -3302,7 +3302,7 @@ layers_dialog_new_layer_query (GimpImage* gimage)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("New Layer Options"), "new_layer_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/new_layer.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -3508,7 +3508,7 @@ layers_dialog_edit_layer_query (LayerWidget *layer_widget)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Layer Attributes"), "edit_layer_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/edit_layer_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -3633,7 +3633,7 @@ layers_dialog_add_mask_query (Layer *layer)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Add Mask Options"), "add_mask_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/add_mask.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -3745,7 +3745,7 @@ layers_dialog_apply_mask_query (Layer *layer)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Layer Mask Options"), "layer_mask_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/apply_mask.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -4034,7 +4034,7 @@ layers_dialog_layer_merge_query (GImage *gimage,
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Layer Merge Options"), "layer_merge_options",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_dialog.html",
|
||||
"dialogs/layers/merge_visible_layers.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ static void lc_dialog_remove_cb (GimpSet *, GimpImage *, gpointer);
|
|||
static void lc_dialog_destroy_cb (GimpImage *, gpointer);
|
||||
static void lc_dialog_change_image (GimpContext *, GimpImage *,
|
||||
gpointer);
|
||||
static void lc_dialog_help_func (gpointer);
|
||||
static void lc_dialog_image_menu_preview_update_cb (GtkWidget *,gpointer);
|
||||
static void lc_dialog_fill_preview_with_thumb(GtkWidget *,
|
||||
GimpImage *,
|
||||
|
@ -77,7 +78,6 @@ lc_dialog_create (GimpImage* gimage)
|
|||
GtkWidget *auto_button;
|
||||
GtkWidget *button;
|
||||
GtkWidget *label;
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *separator;
|
||||
int default_index;
|
||||
|
||||
|
@ -103,8 +103,7 @@ lc_dialog_create (GimpImage* gimage)
|
|||
lc_dialog = g_new (LCDialog, 1);
|
||||
lc_dialog->shell =
|
||||
gimp_dialog_new (_("Layers & Channels"), "layers_and_channels",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/layers_and_channels_dialog.html",
|
||||
lc_dialog_help_func, NULL,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
NULL);
|
||||
|
@ -165,22 +164,23 @@ lc_dialog_create (GimpImage* gimage)
|
|||
gtk_widget_show (separator);
|
||||
|
||||
/* The notebook widget */
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (notebook), 2);
|
||||
gtk_box_pack_start (GTK_BOX (lc_dialog->subshell), notebook, TRUE, TRUE, 0);
|
||||
lc_dialog->notebook = gtk_notebook_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (lc_dialog->notebook), 2);
|
||||
gtk_box_pack_start (GTK_BOX (lc_dialog->subshell), lc_dialog->notebook,
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new (_("Layers"));
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (lc_dialog->notebook),
|
||||
layers_dialog_create (), label);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new (_("Channels"));
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (lc_dialog->notebook),
|
||||
channels_dialog_create (), label);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new (_("Paths"));
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (lc_dialog->notebook),
|
||||
paths_dialog_create (), label);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -188,7 +188,7 @@ lc_dialog_create (GimpImage* gimage)
|
|||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (auto_button),
|
||||
lc_dialog->auto_follow_active);
|
||||
|
||||
gtk_widget_show (notebook);
|
||||
gtk_widget_show (lc_dialog->notebook);
|
||||
|
||||
/* The action area */
|
||||
gtk_container_set_border_width
|
||||
|
@ -204,8 +204,8 @@ lc_dialog_create (GimpImage* gimage)
|
|||
gtk_widget_show (button);
|
||||
|
||||
/* Make sure the channels page is realized */
|
||||
gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 1);
|
||||
gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 0);
|
||||
gtk_notebook_set_page (GTK_NOTEBOOK (lc_dialog->notebook), 1);
|
||||
gtk_notebook_set_page (GTK_NOTEBOOK (lc_dialog->notebook), 0);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (image_context), "add",
|
||||
GTK_SIGNAL_FUNC (lc_dialog_add_cb), NULL);
|
||||
|
@ -408,10 +408,10 @@ typedef struct
|
|||
} IMCBData;
|
||||
|
||||
static void
|
||||
lc_dialog_fill_preview_with_thumb(GtkWidget *w,
|
||||
GimpImage *gimage,
|
||||
gint width,
|
||||
gint height)
|
||||
lc_dialog_fill_preview_with_thumb (GtkWidget *w,
|
||||
GimpImage *gimage,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
guchar *drawable_data;
|
||||
TempBuf *buf;
|
||||
|
@ -713,3 +713,20 @@ lc_dialog_change_image (GimpContext *context,
|
|||
|
||||
lc_dialog_update_image_list ();
|
||||
}
|
||||
|
||||
static void
|
||||
lc_dialog_help_func (gpointer data)
|
||||
{
|
||||
gchar *help_page;
|
||||
gint page_num;
|
||||
|
||||
page_num =
|
||||
gtk_notebook_get_current_page (GTK_NOTEBOOK (lc_dialog->notebook));
|
||||
|
||||
help_page = g_strconcat ((page_num == 0) ? "layers" :
|
||||
((page_num == 1) ? "channels" : "paths"),
|
||||
"/index.html",
|
||||
NULL);
|
||||
gimp_help (help_page);
|
||||
g_free (help_page);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ struct _LCDialog
|
|||
|
||||
GimpImage *gimage;
|
||||
gboolean auto_follow_active;
|
||||
|
||||
GtkWidget *notebook;
|
||||
};
|
||||
|
||||
GtkWidget * layers_dialog_create (void);
|
||||
|
|
852
app/menus.c
852
app/menus.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -261,7 +261,7 @@ module_db_browser_new (void)
|
|||
|
||||
shell = gimp_dialog_new (_("Module DB"), "module_db_dialog",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/module_db_dialog.html",
|
||||
"dialogs/module_browser.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "buildmenu.h"
|
||||
#include "colormaps.h"
|
||||
#include "color_area.h"
|
||||
#include "color_select.h"
|
||||
#include "color_notebook.h"
|
||||
#include "datafiles.h"
|
||||
#include "devices.h"
|
||||
#include "errors.h"
|
||||
|
@ -110,8 +110,8 @@ struct _PaletteDialog
|
|||
GtkWidget *clist;
|
||||
GtkWidget *popup_menu;
|
||||
GtkWidget *popup_small_menu;
|
||||
ColorSelectP color_select;
|
||||
int color_select_active;
|
||||
ColorNotebookP color_notebook;
|
||||
gboolean color_notebook_active;
|
||||
PaletteEntriesP entries;
|
||||
PaletteEntryP color;
|
||||
GdkGC *gc;
|
||||
|
@ -470,8 +470,8 @@ palette_free ()
|
|||
|
||||
gdk_gc_destroy (top_level_edit_palette->gc);
|
||||
|
||||
if (top_level_edit_palette->color_select)
|
||||
color_select_free (top_level_edit_palette->color_select);
|
||||
if (top_level_edit_palette->color_notebook)
|
||||
color_notebook_free (top_level_edit_palette->color_notebook);
|
||||
|
||||
g_free (top_level_edit_palette);
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ palette_new_entries_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("New Palette"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/new_palette.html",
|
||||
_("Enter a name for new palette"),
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
|
@ -1135,10 +1135,10 @@ palette_refresh (PaletteDialog *palette)
|
|||
palette->entries = NULL;
|
||||
|
||||
/* If a color selection dialog is up, hide it */
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
palette_free_palettes (); /* free palettes, don't save any modified versions */
|
||||
palette_init_palettes (FALSE); /* reload palettes */
|
||||
|
@ -1234,11 +1234,11 @@ palette_draw_small_preview(GdkGC *gc,
|
|||
|
||||
|
||||
static void
|
||||
palette_select_callback (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorSelectState state,
|
||||
void *data)
|
||||
palette_select_callback (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorNotebookState state,
|
||||
void *data)
|
||||
{
|
||||
PaletteDialog *palette;
|
||||
guchar *color;
|
||||
|
@ -1252,9 +1252,9 @@ palette_select_callback (gint r,
|
|||
{
|
||||
switch (state)
|
||||
{
|
||||
case COLOR_SELECT_UPDATE:
|
||||
case COLOR_NOTEBOOK_UPDATE:
|
||||
break;
|
||||
case COLOR_SELECT_OK:
|
||||
case COLOR_NOTEBOOK_OK:
|
||||
if (palette->color)
|
||||
{
|
||||
color = palette->color->color;
|
||||
|
@ -1298,9 +1298,9 @@ palette_select_callback (gint r,
|
|||
palette_select2_set_text_all (palette->entries);
|
||||
}
|
||||
/* Fallthrough */
|
||||
case COLOR_SELECT_CANCEL:
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_select_active = 0;
|
||||
case COLOR_NOTEBOOK_CANCEL:
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
palette->color_notebook_active = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1361,10 +1361,10 @@ palette_close_callback (GtkWidget *widget,
|
|||
palette = data;
|
||||
if (palette)
|
||||
{
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
|
||||
if(import_dialog)
|
||||
|
@ -1406,24 +1406,24 @@ palette_edit_callback (GtkWidget *widget,
|
|||
{
|
||||
color = palette->color->color;
|
||||
|
||||
if (!palette->color_select)
|
||||
if (!palette->color_notebook)
|
||||
{
|
||||
palette->color_select =
|
||||
color_select_new (color[0], color[1], color[2],
|
||||
palette_select_callback, palette,
|
||||
FALSE);
|
||||
palette->color_select_active = 1;
|
||||
palette->color_notebook =
|
||||
color_notebook_new (color[0], color[1], color[2],
|
||||
palette_select_callback, palette,
|
||||
FALSE);
|
||||
palette->color_notebook_active = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!palette->color_select_active)
|
||||
if (!palette->color_notebook_active)
|
||||
{
|
||||
color_select_show (palette->color_select);
|
||||
palette->color_select_active = 1;
|
||||
color_notebook_show (palette->color_notebook);
|
||||
palette->color_notebook_active = TRUE;
|
||||
}
|
||||
|
||||
color_select_set_color (palette->color_select,
|
||||
color[0], color[1], color[2], 1);
|
||||
color_notebook_set_color (palette->color_notebook,
|
||||
color[0], color[1], color[2], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1931,15 +1931,15 @@ palette_list_item_update (GtkWidget *widget,
|
|||
|
||||
palette = (PaletteDialog *) data;
|
||||
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
|
||||
if (palette->color_select)
|
||||
color_select_free (palette->color_select);
|
||||
palette->color_select = NULL;
|
||||
if (palette->color_notebook)
|
||||
color_notebook_free (palette->color_notebook);
|
||||
palette->color_notebook = NULL;
|
||||
|
||||
p_entries =
|
||||
(PaletteEntriesP) gtk_clist_get_row_data (GTK_CLIST (palette->clist), row);
|
||||
|
@ -2013,8 +2013,8 @@ create_palette_dialog (gint vert)
|
|||
|
||||
palette->entries = default_palette_entries;
|
||||
palette->color = NULL;
|
||||
palette->color_select = NULL;
|
||||
palette->color_select_active = 0;
|
||||
palette->color_notebook = NULL;
|
||||
palette->color_notebook_active = FALSE;
|
||||
palette->zoom_factor = 1.0;
|
||||
palette->columns = COLUMNS;
|
||||
palette->columns_valid = TRUE;
|
||||
|
@ -2025,7 +2025,7 @@ create_palette_dialog (gint vert)
|
|||
palette->shell =
|
||||
gimp_dialog_new (_("Color Palette Edit"), "color_palette_edit",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/index.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2044,7 +2044,7 @@ create_palette_dialog (gint vert)
|
|||
palette->shell =
|
||||
gimp_dialog_new (_("Color Palette"), "color_palette",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_dialog.html",
|
||||
"dialogs/palette_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2484,7 +2484,7 @@ palette_merge_dialog_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Merge Palette"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/merge_palette.html",
|
||||
_("Enter a name for merged palette"),
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
|
@ -2829,7 +2829,7 @@ palette_import_dialog (PaletteDialog *palette)
|
|||
import_dialog->dialog = dialog =
|
||||
gimp_dialog_new (_("Import Palette"), "import_palette",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/import_palette_dialog.html",
|
||||
"dialogs/palette_editor/import_palette.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -16,25 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "colormaps.h"
|
||||
#include "color_area.h"
|
||||
#include "color_select.h"
|
||||
#include "datafiles.h"
|
||||
#include "errors.h"
|
||||
#include "gimprc.h"
|
||||
#include "gimpui.h"
|
||||
#include "interface.h"
|
||||
#include "palette.h"
|
||||
#include "palette_entries.h"
|
||||
#include "session.h"
|
||||
#include "palette_select.h"
|
||||
|
@ -234,7 +216,7 @@ palette_new_selection (gchar *title,
|
|||
psp->shell = gimp_dialog_new (title ? title : _("Palette Selection"),
|
||||
"palette_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/palette_selection_dialog.html",
|
||||
"dialogs/palette_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1230,7 +1230,7 @@ paths_dialog_edit_path_query (GtkWidget *widget)
|
|||
|
||||
qbox = gimp_query_string_box (_("Rename path"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/paths_dialog.html",
|
||||
"dialogs/paths/rename_path.html",
|
||||
_("Enter a new name for the path"),
|
||||
text,
|
||||
NULL, NULL,
|
||||
|
|
|
@ -95,7 +95,7 @@ pattern_select_new (gchar *title,
|
|||
psp->shell =
|
||||
gimp_dialog_new (title, "pattern_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/pattern_selection_dialog.html",
|
||||
"dialogs/pattern_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -114,7 +114,7 @@ pattern_select_new (gchar *title,
|
|||
psp->shell =
|
||||
gimp_dialog_new (_("Pattern Selection"), "pattern_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/pattern_selection_dialog.html",
|
||||
"dialogs/pattern_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -1164,7 +1164,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
prefs_dlg =
|
||||
gimp_dialog_new (_("Preferences"), "gimp_preferences",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/preferences_dialog.html",
|
||||
"dialogs/preferences.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
options->query_box =
|
||||
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/edit_qmask_attributes_dialog.html",
|
||||
"dialogs/edit_qmask_attributes.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -152,13 +152,13 @@ resize_widget_new (ResizeType type,
|
|||
case ResizeLayer:
|
||||
wmclass = "scale_layer";
|
||||
window_title = _("Scale Layer");
|
||||
help_page = "dialogs/scale_layer_dialog.html";
|
||||
help_page = "dialogs/layers/dialogs/scale_layer.html";
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
break;
|
||||
case ResizeImage:
|
||||
wmclass = "image_scale";
|
||||
window_title = _("Image Scale");
|
||||
help_page = "dialogs/scale_image_dialog.html";
|
||||
help_page = "dialogs/scale_image.html";
|
||||
frame = gtk_frame_new (_("Pixel Dimensions"));
|
||||
break;
|
||||
}
|
||||
|
@ -170,12 +170,12 @@ resize_widget_new (ResizeType type,
|
|||
case ResizeLayer:
|
||||
wmclass = "resize_layer";
|
||||
window_title = _("Resize Layer");
|
||||
help_page = "dialogs/resize_layer_dialog.html";
|
||||
help_page = "dialogs/layers/dialogs/resize_layer.html";
|
||||
break;
|
||||
case ResizeImage:
|
||||
wmclass = "image_resize";
|
||||
window_title = _("Image Resize");
|
||||
help_page = "dialogs/resize_image_dialog.html";
|
||||
help_page = "dialogs/resize_image.html";
|
||||
break;
|
||||
}
|
||||
frame = gtk_frame_new (_("Size"));
|
||||
|
|
|
@ -427,7 +427,7 @@ undo_history_new (GImage *gimage)
|
|||
g_basename (gimage_filename (gimage)));
|
||||
st->shell = gimp_dialog_new (title, "undo_history",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/undo_histroy_dialog.html",
|
||||
"dialogs/undo_histroy.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ brush_edit_generated_new ()
|
|||
|
||||
begw->shell = gimp_dialog_new (_("Brush Editor"), "generated_brush_editor",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/generated_brush_editor_dialog.html",
|
||||
"dialogs/generated_brush_editor.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -37,11 +37,14 @@
|
|||
static void color_notebook_ok_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_cancel_callback (GtkWidget *, gpointer);
|
||||
static void color_notebook_update_callback (void *, int, int, int);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *, guint);
|
||||
static void color_notebook_page_switch (GtkWidget *, GtkNotebookPage *,
|
||||
guint);
|
||||
static void color_notebook_help_func (gpointer data);
|
||||
|
||||
/* information we keep on each registered colour selector */
|
||||
typedef struct _ColorSelectorInfo {
|
||||
char *name; /* label used in notebook tab */
|
||||
char *help_page;
|
||||
GimpColorSelectorMethods m;
|
||||
int refs; /* number of instances around */
|
||||
gboolean active;
|
||||
|
@ -100,8 +103,7 @@ color_notebook_new (int r,
|
|||
|
||||
cnp->shell =
|
||||
gimp_dialog_new (_("Color Selection"), "color_selection",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_notebook_dialog.html",
|
||||
color_notebook_help_func, cnp,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
|
@ -134,7 +136,7 @@ color_notebook_new (int r,
|
|||
if (info->active)
|
||||
{
|
||||
|
||||
csel = g_malloc (sizeof (ColorSelectorInstance));
|
||||
csel = g_new (ColorSelectorInstance, 1);
|
||||
csel->color_notebook = cnp;
|
||||
csel->info = info;
|
||||
info->refs++;
|
||||
|
@ -336,12 +338,28 @@ color_notebook_page_switch (GtkWidget *widget,
|
|||
TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
color_notebook_help_func (gpointer data)
|
||||
{
|
||||
ColorNotebookP cnp;
|
||||
gchar *help_path;
|
||||
|
||||
cnp = (ColorNotebookP) data;
|
||||
|
||||
help_path = g_strconcat ("dialogs/color_selectors/",
|
||||
cnp->cur_page->info->help_page,
|
||||
NULL);
|
||||
gimp_help (help_path);
|
||||
g_free (help_path);
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
/* Registration functions */
|
||||
|
||||
G_MODULE_EXPORT
|
||||
GimpColorSelectorID
|
||||
gimp_color_selector_register (const char *name,
|
||||
const char *help_page,
|
||||
GimpColorSelectorMethods *methods)
|
||||
{
|
||||
ColorSelectorInfo *info;
|
||||
|
@ -355,9 +373,10 @@ gimp_color_selector_register (const char *name,
|
|||
info = info->next;
|
||||
}
|
||||
|
||||
info = g_malloc (sizeof (ColorSelectorInfo));
|
||||
info = g_new (ColorSelectorInfo, 1);
|
||||
|
||||
info->name = g_strdup (name);
|
||||
info->help_page = g_strdup (help_page);
|
||||
info->m = *methods;
|
||||
info->refs = 0;
|
||||
info->active = TRUE;
|
||||
|
|
|
@ -77,7 +77,7 @@ make_dialog (void)
|
|||
|
||||
cdd.shell = gimp_dialog_new (_("Color Display Filters"), "display_color",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_diaplsy_filters_dialog.html",
|
||||
"dialogs/display_filters.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ create_input_dialog (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (inputd,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/input_devices_dialog.html");
|
||||
"dialogs/input_devices.html");
|
||||
|
||||
gtk_widget_show (inputd);
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ create_device_status (void)
|
|||
deviceD->shell =
|
||||
gimp_dialog_new (_("Device Status"), "device_status",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/device_status_dialog.html",
|
||||
"dialogs/device_status.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ create_input_dialog (void)
|
|||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (inputd,
|
||||
gimp_standard_help_func,
|
||||
"dialogs/input_devices_dialog.html");
|
||||
"dialogs/input_devices.html");
|
||||
|
||||
gtk_widget_show (inputd);
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ create_device_status (void)
|
|||
deviceD->shell =
|
||||
gimp_dialog_new (_("Device Status"), "device_status",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/device_status_dialog.html",
|
||||
"dialogs/device_status.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ grad_create_gradient_editor_init (gint need_show)
|
|||
/* Shell and main vbox */
|
||||
g_editor->shell = gimp_dialog_new (_("Gradient Editor"), "gradient_editor",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/index.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ ed_new_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("New gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/new_gradient.html",
|
||||
_("Enter a name for the new gradient"),
|
||||
_("untitled"),
|
||||
NULL, NULL,
|
||||
|
@ -1388,7 +1388,7 @@ ed_copy_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Copy gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/copy_gradient.html",
|
||||
_("Enter a name for the copied gradient"),
|
||||
name,
|
||||
NULL, NULL,
|
||||
|
@ -1474,7 +1474,7 @@ ed_rename_gradient_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Rename gradient"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/rename_gradient.html",
|
||||
_("Enter a new name for the gradient"),
|
||||
curr_gradient->name,
|
||||
NULL, NULL,
|
||||
|
@ -1556,7 +1556,7 @@ ed_delete_gradient_callback (GtkWidget *widget,
|
|||
|
||||
dialog = gimp_dialog_new (_("Delete gradient"), "delete_gradient",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/delete_gradient.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ ed_save_pov_callback (GtkWidget *widget,
|
|||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect_help_accel (window, gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html");
|
||||
"dialogs/gradient_editor/dialogs/save_as_pov_ray.html");
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_widget_set_sensitive (g_editor->shell, FALSE);
|
||||
|
@ -4612,7 +4612,7 @@ cpopup_split_uniform_callback (GtkWidget *widget,
|
|||
_("Split segments uniformly"),
|
||||
"gradient_segment_split_uniformly",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/split_segments_uniformly.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -5171,7 +5171,7 @@ cpopup_replicate_callback (GtkWidget *widget,
|
|||
_("Replicate selection"),
|
||||
"gradient_segment_replicate",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/gradient_editor_dialog.html",
|
||||
"dialogs/gradient_editor/dialogs/replicate_segment.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
|
@ -61,6 +61,9 @@ gimp_help_connect_help_accel (GtkWidget *widget,
|
|||
GtkAccelGroup *accel_group;
|
||||
static guint help_signal_id = 0;
|
||||
|
||||
if (! help_func)
|
||||
return;
|
||||
|
||||
/* create the help signal if not already done */
|
||||
if (! help_signal_id)
|
||||
{
|
||||
|
@ -86,6 +89,13 @@ gimp_help_connect_help_accel (GtkWidget *widget,
|
|||
|
||||
/* a new accelerator group for this widget */
|
||||
accel_group = gtk_accel_group_new ();
|
||||
|
||||
/* FIXME: does not work for some reason...
|
||||
gtk_widget_add_accelerator (widget, "help", accel_group,
|
||||
GDK_F1, 0, GTK_ACCEL_LOCKED);
|
||||
*/
|
||||
|
||||
/* ...while using this internal stuff works */
|
||||
gtk_accel_group_add (accel_group, GDK_F1, 0, 0,
|
||||
GTK_OBJECT (widget), "help");
|
||||
gtk_accel_group_attach (accel_group, GTK_OBJECT (widget));
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,7 +34,7 @@
|
|||
#include "buildmenu.h"
|
||||
#include "colormaps.h"
|
||||
#include "color_area.h"
|
||||
#include "color_select.h"
|
||||
#include "color_notebook.h"
|
||||
#include "datafiles.h"
|
||||
#include "devices.h"
|
||||
#include "errors.h"
|
||||
|
@ -110,8 +110,8 @@ struct _PaletteDialog
|
|||
GtkWidget *clist;
|
||||
GtkWidget *popup_menu;
|
||||
GtkWidget *popup_small_menu;
|
||||
ColorSelectP color_select;
|
||||
int color_select_active;
|
||||
ColorNotebookP color_notebook;
|
||||
gboolean color_notebook_active;
|
||||
PaletteEntriesP entries;
|
||||
PaletteEntryP color;
|
||||
GdkGC *gc;
|
||||
|
@ -470,8 +470,8 @@ palette_free ()
|
|||
|
||||
gdk_gc_destroy (top_level_edit_palette->gc);
|
||||
|
||||
if (top_level_edit_palette->color_select)
|
||||
color_select_free (top_level_edit_palette->color_select);
|
||||
if (top_level_edit_palette->color_notebook)
|
||||
color_notebook_free (top_level_edit_palette->color_notebook);
|
||||
|
||||
g_free (top_level_edit_palette);
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ palette_new_entries_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("New Palette"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/new_palette.html",
|
||||
_("Enter a name for new palette"),
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
|
@ -1135,10 +1135,10 @@ palette_refresh (PaletteDialog *palette)
|
|||
palette->entries = NULL;
|
||||
|
||||
/* If a color selection dialog is up, hide it */
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
palette_free_palettes (); /* free palettes, don't save any modified versions */
|
||||
palette_init_palettes (FALSE); /* reload palettes */
|
||||
|
@ -1234,11 +1234,11 @@ palette_draw_small_preview(GdkGC *gc,
|
|||
|
||||
|
||||
static void
|
||||
palette_select_callback (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorSelectState state,
|
||||
void *data)
|
||||
palette_select_callback (gint r,
|
||||
gint g,
|
||||
gint b,
|
||||
ColorNotebookState state,
|
||||
void *data)
|
||||
{
|
||||
PaletteDialog *palette;
|
||||
guchar *color;
|
||||
|
@ -1252,9 +1252,9 @@ palette_select_callback (gint r,
|
|||
{
|
||||
switch (state)
|
||||
{
|
||||
case COLOR_SELECT_UPDATE:
|
||||
case COLOR_NOTEBOOK_UPDATE:
|
||||
break;
|
||||
case COLOR_SELECT_OK:
|
||||
case COLOR_NOTEBOOK_OK:
|
||||
if (palette->color)
|
||||
{
|
||||
color = palette->color->color;
|
||||
|
@ -1298,9 +1298,9 @@ palette_select_callback (gint r,
|
|||
palette_select2_set_text_all (palette->entries);
|
||||
}
|
||||
/* Fallthrough */
|
||||
case COLOR_SELECT_CANCEL:
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_select_active = 0;
|
||||
case COLOR_NOTEBOOK_CANCEL:
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
palette->color_notebook_active = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1361,10 +1361,10 @@ palette_close_callback (GtkWidget *widget,
|
|||
palette = data;
|
||||
if (palette)
|
||||
{
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
|
||||
if(import_dialog)
|
||||
|
@ -1406,24 +1406,24 @@ palette_edit_callback (GtkWidget *widget,
|
|||
{
|
||||
color = palette->color->color;
|
||||
|
||||
if (!palette->color_select)
|
||||
if (!palette->color_notebook)
|
||||
{
|
||||
palette->color_select =
|
||||
color_select_new (color[0], color[1], color[2],
|
||||
palette_select_callback, palette,
|
||||
FALSE);
|
||||
palette->color_select_active = 1;
|
||||
palette->color_notebook =
|
||||
color_notebook_new (color[0], color[1], color[2],
|
||||
palette_select_callback, palette,
|
||||
FALSE);
|
||||
palette->color_notebook_active = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!palette->color_select_active)
|
||||
if (!palette->color_notebook_active)
|
||||
{
|
||||
color_select_show (palette->color_select);
|
||||
palette->color_select_active = 1;
|
||||
color_notebook_show (palette->color_notebook);
|
||||
palette->color_notebook_active = TRUE;
|
||||
}
|
||||
|
||||
color_select_set_color (palette->color_select,
|
||||
color[0], color[1], color[2], 1);
|
||||
color_notebook_set_color (palette->color_notebook,
|
||||
color[0], color[1], color[2], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1931,15 +1931,15 @@ palette_list_item_update (GtkWidget *widget,
|
|||
|
||||
palette = (PaletteDialog *) data;
|
||||
|
||||
if (palette->color_select_active)
|
||||
if (palette->color_notebook_active)
|
||||
{
|
||||
palette->color_select_active = 0;
|
||||
color_select_hide (palette->color_select);
|
||||
palette->color_notebook_active = FALSE;
|
||||
color_notebook_hide (palette->color_notebook);
|
||||
}
|
||||
|
||||
if (palette->color_select)
|
||||
color_select_free (palette->color_select);
|
||||
palette->color_select = NULL;
|
||||
if (palette->color_notebook)
|
||||
color_notebook_free (palette->color_notebook);
|
||||
palette->color_notebook = NULL;
|
||||
|
||||
p_entries =
|
||||
(PaletteEntriesP) gtk_clist_get_row_data (GTK_CLIST (palette->clist), row);
|
||||
|
@ -2013,8 +2013,8 @@ create_palette_dialog (gint vert)
|
|||
|
||||
palette->entries = default_palette_entries;
|
||||
palette->color = NULL;
|
||||
palette->color_select = NULL;
|
||||
palette->color_select_active = 0;
|
||||
palette->color_notebook = NULL;
|
||||
palette->color_notebook_active = FALSE;
|
||||
palette->zoom_factor = 1.0;
|
||||
palette->columns = COLUMNS;
|
||||
palette->columns_valid = TRUE;
|
||||
|
@ -2025,7 +2025,7 @@ create_palette_dialog (gint vert)
|
|||
palette->shell =
|
||||
gimp_dialog_new (_("Color Palette Edit"), "color_palette_edit",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/index.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2044,7 +2044,7 @@ create_palette_dialog (gint vert)
|
|||
palette->shell =
|
||||
gimp_dialog_new (_("Color Palette"), "color_palette",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_dialog.html",
|
||||
"dialogs/palette_selection.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
@ -2484,7 +2484,7 @@ palette_merge_dialog_callback (GtkWidget *widget,
|
|||
|
||||
qbox = gimp_query_string_box (_("Merge Palette"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/color_palette_edit_dialog.html",
|
||||
"dialogs/palette_editor/merge_palette.html",
|
||||
_("Enter a name for merged palette"),
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
|
@ -2829,7 +2829,7 @@ palette_import_dialog (PaletteDialog *palette)
|
|||
import_dialog->dialog = dialog =
|
||||
gimp_dialog_new (_("Import Palette"), "import_palette",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/import_palette_dialog.html",
|
||||
"dialogs/palette_editor/import_palette.html",
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue