mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const
2003-08-23 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const gchar *help_id". - added "gpointer help_data". * libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to gimp_help_connect(). Removed all fiddling with html links and treat all help IDs as opaque identifiers. * app/core/gimptoolinfo.[ch]: changed "help_data" member to "help_id". * app/widgets/gimpitemfactory.[ch]: removed the "help_path" parameter from gimp_item_factory_new() since we don't fiddle with html file paths any more. Simplifies menu item help a lot. Renamed "help_data" member of struct GimpItemFactoryEntry to "help_id". * app/gui/plug-in-menus.c: changed accordingly. 3rd party plug-ins' menu item help IDs are now encoded as "help_path:help_id". * app/gui/file-open-menu.c * app/gui/file-save-menu.c: when constructing the <Load> and <Save> menus, take the resp. procedures' locale_domain and help_path into account. Fixes translation of 3rd party menu items. Also do the right thing for load/save procs which are implemented as temporary procedures (they are impossible to implement currently but it's nice to do the right thing anyway...). * app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier. * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimp/gimpui.c * app/display/gimpdisplayshell.c * app/gui/gui.c * app/gui/about-dialog.c * app/gui/color-notebook.c * app/gui/dialogs-constructors.c * app/gui/file-dialog-utils.[ch] * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/image-menu.c * app/gui/menus.c * app/gui/preferences-dialog.c * app/gui/tips-dialog.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimperrorconsole.c * app/widgets/gimphelp.[ch] * app/widgets/gimpmenufactory.[ch] * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * plug-ins/common/CEL.c * plug-ins/common/CML_explorer.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/gqbist.c * plug-ins/common/spheredesigner.c * plug-ins/flame/flame.c * plug-ins/fp/fp_gtk.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/imap_main.c: changed accordingly. Removed trailing whitespace all over the place.
This commit is contained in:
parent
9a52f49904
commit
ba70ce9a10
72 changed files with 898 additions and 839 deletions
75
ChangeLog
75
ChangeLog
|
@ -1,3 +1,78 @@
|
|||
2003-08-23 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef:
|
||||
- renamed "const gchar *help_data" to "const gchar *help_id".
|
||||
- added "gpointer help_data".
|
||||
|
||||
* libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to
|
||||
gimp_help_connect(). Removed all fiddling with html links and
|
||||
treat all help IDs as opaque identifiers.
|
||||
|
||||
* app/core/gimptoolinfo.[ch]: changed "help_data" member to
|
||||
"help_id".
|
||||
|
||||
* app/widgets/gimpitemfactory.[ch]: removed the "help_path"
|
||||
parameter from gimp_item_factory_new() since we don't fiddle with
|
||||
html file paths any more. Simplifies menu item help a lot.
|
||||
Renamed "help_data" member of struct GimpItemFactoryEntry to
|
||||
"help_id".
|
||||
|
||||
* app/gui/plug-in-menus.c: changed accordingly. 3rd party
|
||||
plug-ins' menu item help IDs are now encoded as
|
||||
"help_path:help_id".
|
||||
|
||||
* app/gui/file-open-menu.c
|
||||
* app/gui/file-save-menu.c: when constructing the <Load> and
|
||||
<Save> menus, take the resp. procedures' locale_domain and
|
||||
help_path into account. Fixes translation of 3rd party menu items.
|
||||
Also do the right thing for load/save procs which are implemented
|
||||
as temporary procedures (they are impossible to implement
|
||||
currently but it's nice to do the right thing anyway...).
|
||||
|
||||
* app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier.
|
||||
|
||||
* libgimpwidgets/gimpdialog.[ch]
|
||||
* libgimpwidgets/gimpwidgets.[ch]
|
||||
* libgimp/gimpui.c
|
||||
* app/display/gimpdisplayshell.c
|
||||
* app/gui/gui.c
|
||||
* app/gui/about-dialog.c
|
||||
* app/gui/color-notebook.c
|
||||
* app/gui/dialogs-constructors.c
|
||||
* app/gui/file-dialog-utils.[ch]
|
||||
* app/gui/gradients-commands.c
|
||||
* app/gui/help-commands.c
|
||||
* app/gui/image-menu.c
|
||||
* app/gui/menus.c
|
||||
* app/gui/preferences-dialog.c
|
||||
* app/gui/tips-dialog.c
|
||||
* app/tools/gimpcolorpickertool.c
|
||||
* app/tools/gimpcroptool.c
|
||||
* app/tools/gimpcurvestool.c
|
||||
* app/tools/gimphistogramtool.c
|
||||
* app/tools/gimpimagemaptool.c
|
||||
* app/tools/gimplevelstool.c
|
||||
* app/tools/gimpmeasuretool.c
|
||||
* app/tools/gimptransformtool.c
|
||||
* app/widgets/gimperrorconsole.c
|
||||
* app/widgets/gimphelp.[ch]
|
||||
* app/widgets/gimpmenufactory.[ch]
|
||||
* app/widgets/gimptexteditor.c
|
||||
* app/widgets/gimptoolbox.c
|
||||
* app/widgets/gimpviewabledialog.[ch]
|
||||
* plug-ins/common/CEL.c
|
||||
* plug-ins/common/CML_explorer.c
|
||||
* plug-ins/common/gee.c
|
||||
* plug-ins/common/gee_zoom.c
|
||||
* plug-ins/common/gqbist.c
|
||||
* plug-ins/common/spheredesigner.c
|
||||
* plug-ins/flame/flame.c
|
||||
* plug-ins/fp/fp_gtk.c
|
||||
* plug-ins/helpbrowser/helpbrowser.c
|
||||
* plug-ins/ifscompose/ifscompose.c
|
||||
* plug-ins/imagemap/imap_main.c: changed accordingly. Removed
|
||||
trailing whitespace all over the place.
|
||||
|
||||
2003-06-22 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: disallow libgimpprint >= 4.3.0, addresses bug #120162.
|
||||
|
|
|
@ -104,7 +104,7 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
|
|||
G_CONNECT_SWAPPED);
|
||||
|
||||
gimp_help_connect (GTK_WIDGET (filesel), gimp_standard_help_func,
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV);
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV, NULL);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (filesel));
|
||||
}
|
||||
|
|
|
@ -24,10 +24,6 @@
|
|||
|
||||
#include "gui-types.h"
|
||||
|
||||
#include "core/gimpobject.h"
|
||||
|
||||
#include "plug-in/plug-in.h"
|
||||
|
||||
#include "help-commands.h"
|
||||
|
||||
|
||||
|
@ -36,7 +32,7 @@ help_help_cmd_callback (GtkWidget *widget,
|
|||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
gimp_standard_help_func (NULL);
|
||||
gimp_standard_help_func (NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -104,7 +104,7 @@ gimp_tool_info_init (GimpToolInfo *tool_info)
|
|||
tool_info->menu_accel = NULL;
|
||||
|
||||
tool_info->help_domain = NULL;
|
||||
tool_info->help_data = NULL;
|
||||
tool_info->help_id = NULL;
|
||||
|
||||
tool_info->in_toolbox = TRUE;
|
||||
tool_info->tool_options = NULL;
|
||||
|
@ -145,10 +145,10 @@ gimp_tool_info_finalize (GObject *object)
|
|||
g_free (tool_info->help_domain);
|
||||
tool_info->help_domain = NULL;
|
||||
}
|
||||
if (tool_info->help_data)
|
||||
if (tool_info->help_id)
|
||||
{
|
||||
g_free (tool_info->help_data);
|
||||
tool_info->help_data = NULL;
|
||||
g_free (tool_info->help_id);
|
||||
tool_info->help_id = NULL;
|
||||
}
|
||||
|
||||
if (tool_info->tool_options)
|
||||
|
@ -185,7 +185,7 @@ gimp_tool_info_new (Gimp *gimp,
|
|||
const gchar *menu_path,
|
||||
const gchar *menu_accel,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
const gchar *paint_core_name,
|
||||
const gchar *stock_id)
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ gimp_tool_info_new (Gimp *gimp,
|
|||
tool_info->menu_accel = g_strdup (menu_accel);
|
||||
|
||||
tool_info->help_domain = g_strdup (help_domain);
|
||||
tool_info->help_data = g_strdup (help_data);
|
||||
tool_info->help_id = g_strdup (help_id);
|
||||
|
||||
gimp_viewable_set_stock_id (viewable, stock_id);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ struct _GimpToolInfo
|
|||
gchar *menu_accel;
|
||||
|
||||
gchar *help_domain;
|
||||
gchar *help_data;
|
||||
gchar *help_id;
|
||||
|
||||
gboolean in_toolbox;
|
||||
GimpToolOptions *tool_options;
|
||||
|
@ -75,7 +75,7 @@ GimpToolInfo * gimp_tool_info_new (Gimp *gimp,
|
|||
const gchar *menu_path,
|
||||
const gchar *menu_accel,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
const gchar *paint_core_name,
|
||||
const gchar *stock_id);
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ about_dialog_create (void)
|
|||
gtk_window_set_resizable (GTK_WINDOW (about_dialog), FALSE);
|
||||
|
||||
gimp_help_connect (about_dialog, gimp_standard_help_func,
|
||||
GIMP_HELP_ABOUT_DIALOG);
|
||||
GIMP_HELP_ABOUT_DIALOG, NULL);
|
||||
|
||||
g_signal_connect (about_dialog, "destroy",
|
||||
G_CALLBACK (about_dialog_destroy),
|
||||
|
|
|
@ -95,7 +95,8 @@ static ColorNotebook *
|
|||
gboolean wants_updates,
|
||||
gboolean show_alpha);
|
||||
|
||||
static void color_notebook_help_func (const gchar *help_data);
|
||||
static void color_notebook_help_func (const gchar *help_id,
|
||||
gpointer help_data);
|
||||
|
||||
static void color_notebook_ok_callback (GtkWidget *widget,
|
||||
ColorNotebook *cnp);
|
||||
|
@ -322,22 +323,22 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||
cnp->shell = gimp_viewable_dialog_new (viewable,
|
||||
title, wmclass_name,
|
||||
stock_id, desc,
|
||||
color_notebook_help_func,
|
||||
(const gchar *) cnp,
|
||||
color_notebook_help_func, NULL,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (cnp->shell), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
cnp->shell = gimp_dialog_new (title, wmclass_name,
|
||||
color_notebook_help_func,
|
||||
(const gchar *) cnp,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
NULL);
|
||||
cnp->shell = gimp_dialog_new (title, wmclass_name,
|
||||
color_notebook_help_func, NULL,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
g_object_set_data (G_OBJECT (cnp->shell), "color-notebook", cnp);
|
||||
|
||||
gimp_dialog_create_action_area (GIMP_DIALOG (cnp->shell),
|
||||
|
||||
GTK_STOCK_CANCEL,
|
||||
|
@ -535,21 +536,19 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||
}
|
||||
|
||||
static void
|
||||
color_notebook_help_func (const gchar *data)
|
||||
color_notebook_help_func (const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
ColorNotebook *cnp;
|
||||
GimpColorNotebook *notebook;
|
||||
gchar *help_path;
|
||||
|
||||
cnp = (ColorNotebook *) data;
|
||||
cnp = g_object_get_data (G_OBJECT (help_data), "color-notebook");
|
||||
|
||||
notebook = GIMP_COLOR_NOTEBOOK (cnp->notebook);
|
||||
|
||||
help_path = g_strconcat ("dialogs/color_selectors/",
|
||||
GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page,
|
||||
NULL);
|
||||
gimp_standard_help_func (help_path);
|
||||
g_free (help_path);
|
||||
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page;
|
||||
|
||||
gimp_standard_help_func (help_id, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1110,8 +1110,7 @@ dialogs_tool_options_tool_changed (GimpContext *context,
|
|||
gtk_label_set_text (label, tool_info->blurb);
|
||||
|
||||
gimp_help_set_help_data (GTK_WIDGET (label)->parent->parent,
|
||||
tool_info->help,
|
||||
tool_info->help_data);
|
||||
tool_info->help, tool_info->help_id);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
|
|
|
@ -48,7 +48,7 @@ file_dialog_new (Gimp *gimp,
|
|||
const gchar *menu_identifier,
|
||||
const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GCallback ok_callback)
|
||||
{
|
||||
GtkWidget *filesel;
|
||||
|
@ -61,7 +61,7 @@ file_dialog_new (Gimp *gimp,
|
|||
g_return_val_if_fail (menu_identifier != NULL, NULL);
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
g_return_val_if_fail (wmclass_name != NULL, NULL);
|
||||
g_return_val_if_fail (help_data != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
g_return_val_if_fail (ok_callback != NULL, NULL);
|
||||
|
||||
filesel = gtk_file_selection_new (title);
|
||||
|
@ -73,7 +73,7 @@ file_dialog_new (Gimp *gimp,
|
|||
gtk_window_set_position (GTK_WINDOW (filesel), GTK_WIN_POS_MOUSE);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (filesel), wmclass_name, "Gimp");
|
||||
|
||||
gimp_help_connect (filesel, gimp_standard_help_func, help_data);
|
||||
gimp_help_connect (filesel, gimp_standard_help_func, help_id, NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (fs->button_area), 2);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (filesel), 2);
|
||||
|
|
|
@ -27,7 +27,7 @@ GtkWidget * file_dialog_new (Gimp *gimp,
|
|||
const gchar *menu_identifier,
|
||||
const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GCallback ok_callback);
|
||||
|
||||
void file_dialog_show (GtkWidget *filesel);
|
||||
|
|
|
@ -464,7 +464,7 @@ prefs_notebook_append_page (Gimp *gimp,
|
|||
const gchar *notebook_icon,
|
||||
GtkTreeStore *tree,
|
||||
const gchar *tree_label,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GtkTreeIter *parent,
|
||||
GtkTreeIter *iter,
|
||||
gint page_index)
|
||||
|
@ -478,7 +478,7 @@ prefs_notebook_append_page (Gimp *gimp,
|
|||
gtk_notebook_append_page (notebook, event_box, NULL);
|
||||
gtk_widget_show (event_box);
|
||||
|
||||
gimp_help_set_help_data (event_box, NULL, help_data);
|
||||
gimp_help_set_help_data (event_box, NULL, help_id);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
|
@ -824,21 +824,19 @@ prefs_memsize_entry_add (GObject *config,
|
|||
}
|
||||
|
||||
static void
|
||||
prefs_help_func (const gchar *help_data)
|
||||
prefs_help_func (const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
if (prefs_dialog)
|
||||
{
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *event_box;
|
||||
gint page_num;
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *event_box;
|
||||
gint page_num;
|
||||
|
||||
notebook = g_object_get_data (G_OBJECT (prefs_dialog), "notebook");
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
|
||||
event_box = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page_num);
|
||||
notebook = g_object_get_data (G_OBJECT (help_data), "notebook");
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
|
||||
event_box = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page_num);
|
||||
|
||||
help_data = g_object_get_data (G_OBJECT (event_box), "gimp_help_data");
|
||||
gimp_standard_help_func (help_data);
|
||||
}
|
||||
help_id = g_object_get_data (G_OBJECT (event_box), "gimp-help-id");
|
||||
gimp_standard_help_func (help_id, NULL);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
|
|
|
@ -217,9 +217,8 @@ tips_dialog_create (Gimp *gimp)
|
|||
G_CALLBACK (tips_show_next),
|
||||
NULL);
|
||||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect (tips_dialog, gimp_standard_help_func,
|
||||
GIMP_HELP_TIPS_DIALOG);
|
||||
GIMP_HELP_TIPS_DIALOG, NULL);
|
||||
|
||||
tips_set_labels (current_tip->data);
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ about_dialog_create (void)
|
|||
gtk_window_set_resizable (GTK_WINDOW (about_dialog), FALSE);
|
||||
|
||||
gimp_help_connect (about_dialog, gimp_standard_help_func,
|
||||
GIMP_HELP_ABOUT_DIALOG);
|
||||
GIMP_HELP_ABOUT_DIALOG, NULL);
|
||||
|
||||
g_signal_connect (about_dialog, "destroy",
|
||||
G_CALLBACK (about_dialog_destroy),
|
||||
|
|
|
@ -95,7 +95,8 @@ static ColorNotebook *
|
|||
gboolean wants_updates,
|
||||
gboolean show_alpha);
|
||||
|
||||
static void color_notebook_help_func (const gchar *help_data);
|
||||
static void color_notebook_help_func (const gchar *help_id,
|
||||
gpointer help_data);
|
||||
|
||||
static void color_notebook_ok_callback (GtkWidget *widget,
|
||||
ColorNotebook *cnp);
|
||||
|
@ -322,22 +323,22 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||
cnp->shell = gimp_viewable_dialog_new (viewable,
|
||||
title, wmclass_name,
|
||||
stock_id, desc,
|
||||
color_notebook_help_func,
|
||||
(const gchar *) cnp,
|
||||
color_notebook_help_func, NULL,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (cnp->shell), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
cnp->shell = gimp_dialog_new (title, wmclass_name,
|
||||
color_notebook_help_func,
|
||||
(const gchar *) cnp,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
NULL);
|
||||
cnp->shell = gimp_dialog_new (title, wmclass_name,
|
||||
color_notebook_help_func, NULL,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
g_object_set_data (G_OBJECT (cnp->shell), "color-notebook", cnp);
|
||||
|
||||
gimp_dialog_create_action_area (GIMP_DIALOG (cnp->shell),
|
||||
|
||||
GTK_STOCK_CANCEL,
|
||||
|
@ -535,21 +536,19 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||
}
|
||||
|
||||
static void
|
||||
color_notebook_help_func (const gchar *data)
|
||||
color_notebook_help_func (const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
ColorNotebook *cnp;
|
||||
GimpColorNotebook *notebook;
|
||||
gchar *help_path;
|
||||
|
||||
cnp = (ColorNotebook *) data;
|
||||
cnp = g_object_get_data (G_OBJECT (help_data), "color-notebook");
|
||||
|
||||
notebook = GIMP_COLOR_NOTEBOOK (cnp->notebook);
|
||||
|
||||
help_path = g_strconcat ("dialogs/color_selectors/",
|
||||
GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page,
|
||||
NULL);
|
||||
gimp_standard_help_func (help_path);
|
||||
g_free (help_path);
|
||||
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page;
|
||||
|
||||
gimp_standard_help_func (help_id, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1110,8 +1110,7 @@ dialogs_tool_options_tool_changed (GimpContext *context,
|
|||
gtk_label_set_text (label, tool_info->blurb);
|
||||
|
||||
gimp_help_set_help_data (GTK_WIDGET (label)->parent->parent,
|
||||
tool_info->help,
|
||||
tool_info->help_data);
|
||||
tool_info->help, tool_info->help_id);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
|
|
|
@ -48,7 +48,7 @@ file_dialog_new (Gimp *gimp,
|
|||
const gchar *menu_identifier,
|
||||
const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GCallback ok_callback)
|
||||
{
|
||||
GtkWidget *filesel;
|
||||
|
@ -61,7 +61,7 @@ file_dialog_new (Gimp *gimp,
|
|||
g_return_val_if_fail (menu_identifier != NULL, NULL);
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
g_return_val_if_fail (wmclass_name != NULL, NULL);
|
||||
g_return_val_if_fail (help_data != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
g_return_val_if_fail (ok_callback != NULL, NULL);
|
||||
|
||||
filesel = gtk_file_selection_new (title);
|
||||
|
@ -73,7 +73,7 @@ file_dialog_new (Gimp *gimp,
|
|||
gtk_window_set_position (GTK_WINDOW (filesel), GTK_WIN_POS_MOUSE);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (filesel), wmclass_name, "Gimp");
|
||||
|
||||
gimp_help_connect (filesel, gimp_standard_help_func, help_data);
|
||||
gimp_help_connect (filesel, gimp_standard_help_func, help_id, NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (fs->button_area), 2);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (filesel), 2);
|
||||
|
|
|
@ -27,7 +27,7 @@ GtkWidget * file_dialog_new (Gimp *gimp,
|
|||
const gchar *menu_identifier,
|
||||
const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GCallback ok_callback);
|
||||
|
||||
void file_dialog_show (GtkWidget *filesel);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "core/gimp.h"
|
||||
|
||||
#include "plug-in/plug-in-proc.h"
|
||||
#include "plug-in/plug-ins.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
@ -56,31 +57,48 @@ gint n_file_open_menu_entries = G_N_ELEMENTS (file_open_menu_entries);
|
|||
void
|
||||
file_open_menu_setup (GimpItemFactory *factory)
|
||||
{
|
||||
GimpItemFactoryEntry entry;
|
||||
PlugInProcDef *file_proc;
|
||||
GSList *list;
|
||||
GSList *list;
|
||||
|
||||
for (list = factory->gimp->load_procs; list; list = g_slist_next (list))
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
gchar *help_page;
|
||||
PlugInProcDef *file_proc;
|
||||
const gchar *progname;
|
||||
const gchar *locale_domain;
|
||||
const gchar *help_path;
|
||||
GimpItemFactoryEntry entry;
|
||||
gchar *help_id;
|
||||
gchar *help_page;
|
||||
|
||||
file_proc = (PlugInProcDef *) list->data;
|
||||
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
progname = plug_in_proc_def_get_progname (file_proc);
|
||||
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
locale_domain = plug_ins_locale_domain (factory->gimp,
|
||||
progname, NULL);
|
||||
help_path = plug_ins_help_path (factory->gimp,
|
||||
progname);
|
||||
|
||||
g_free (basename);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: fix plug-in menu item help
|
||||
#endif
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
|
||||
/* NOT g_build_filename() because this is a relative URI */
|
||||
help_page = g_strconcat ("filters/",
|
||||
lowercase_basename,
|
||||
".html",
|
||||
NULL);
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
help_id = g_strconcat (lowercase_basename, ".html", NULL);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
}
|
||||
|
||||
if (help_path)
|
||||
help_page = g_strconcat (help_path, ":", help_id, NULL);
|
||||
else
|
||||
help_page = g_strconcat ("filters/", help_id, NULL);
|
||||
|
||||
g_free (help_id);
|
||||
|
||||
entry.entry.path = strstr (file_proc->menu_path, "/");
|
||||
entry.entry.accelerator = NULL;
|
||||
|
@ -88,12 +106,12 @@ file_open_menu_setup (GimpItemFactory *factory)
|
|||
entry.entry.callback_action = 0;
|
||||
entry.entry.item_type = NULL;
|
||||
entry.quark_string = NULL;
|
||||
entry.help_page = help_page;
|
||||
entry.help_id = help_page;
|
||||
entry.description = NULL;
|
||||
|
||||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
NULL,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
|
||||
#include "plug-in/plug-in-proc.h"
|
||||
#include "plug-in/plug-ins.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
@ -57,31 +58,48 @@ gint n_file_save_menu_entries = G_N_ELEMENTS (file_save_menu_entries);
|
|||
void
|
||||
file_save_menu_setup (GimpItemFactory *factory)
|
||||
{
|
||||
GimpItemFactoryEntry entry;
|
||||
PlugInProcDef *file_proc;
|
||||
GSList *list;
|
||||
GSList *list;
|
||||
|
||||
for (list = factory->gimp->save_procs; list; list = g_slist_next (list))
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
gchar *help_page;
|
||||
PlugInProcDef *file_proc;
|
||||
const gchar *progname;
|
||||
const gchar *locale_domain;
|
||||
const gchar *help_path;
|
||||
GimpItemFactoryEntry entry;
|
||||
gchar *help_id;
|
||||
gchar *help_page;
|
||||
|
||||
file_proc = (PlugInProcDef *) list->data;
|
||||
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
progname = plug_in_proc_def_get_progname (file_proc);
|
||||
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
locale_domain = plug_ins_locale_domain (factory->gimp,
|
||||
progname, NULL);
|
||||
help_path = plug_ins_help_path (factory->gimp,
|
||||
progname);
|
||||
|
||||
g_free (basename);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: fix plug-in menu item help
|
||||
#endif
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
|
||||
/* NOT g_build_filename() because this is a relative URI */
|
||||
help_page = g_strconcat ("filters/",
|
||||
lowercase_basename,
|
||||
".html",
|
||||
NULL);
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
help_id = g_strconcat (lowercase_basename, ".html", NULL);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
}
|
||||
|
||||
if (help_path)
|
||||
help_page = g_strconcat (help_path, ":", help_id, NULL);
|
||||
else
|
||||
help_page = g_strconcat ("filters/", help_id, NULL);
|
||||
|
||||
g_free (help_id);
|
||||
|
||||
entry.entry.path = strstr (file_proc->menu_path, "/");
|
||||
entry.entry.accelerator = NULL;
|
||||
|
@ -89,12 +107,12 @@ file_save_menu_setup (GimpItemFactory *factory)
|
|||
entry.entry.callback_action = 0;
|
||||
entry.entry.item_type = NULL;
|
||||
entry.quark_string = NULL;
|
||||
entry.help_page = help_page;
|
||||
entry.help_id = help_page;
|
||||
entry.description = NULL;
|
||||
|
||||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
NULL,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
|
|||
G_CONNECT_SWAPPED);
|
||||
|
||||
gimp_help_connect (GTK_WIDGET (filesel), gimp_standard_help_func,
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV);
|
||||
GIMP_HELP_GRADIENT_SAVE_AS_POV, NULL);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (filesel));
|
||||
}
|
||||
|
|
|
@ -66,7 +66,8 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gui_help_func (const gchar *help_data);
|
||||
static void gui_help_func (const gchar *help_id,
|
||||
gpointer help_data);
|
||||
static gboolean gui_get_background_func (GimpRGB *color);
|
||||
static gboolean gui_get_foreground_func (GimpRGB *color);
|
||||
|
||||
|
@ -367,9 +368,10 @@ gui_post_init (Gimp *gimp)
|
|||
/* private functions */
|
||||
|
||||
static void
|
||||
gui_help_func (const gchar *help_data)
|
||||
gui_help_func (const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
gimp_help (the_gimp, NULL, help_data);
|
||||
gimp_help (the_gimp, NULL, help_id);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -24,10 +24,6 @@
|
|||
|
||||
#include "gui-types.h"
|
||||
|
||||
#include "core/gimpobject.h"
|
||||
|
||||
#include "plug-in/plug-in.h"
|
||||
|
||||
#include "help-commands.h"
|
||||
|
||||
|
||||
|
@ -36,7 +32,7 @@ help_help_cmd_callback (GtkWidget *widget,
|
|||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
gimp_standard_help_func (NULL);
|
||||
gimp_standard_help_func (NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1116,7 +1116,7 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
const gchar *stock_id;
|
||||
const gchar *identifier;
|
||||
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
||||
identifier = gimp_object_get_name (GIMP_OBJECT (tool_info));
|
||||
|
||||
entry.entry.path = tool_info->menu_path;
|
||||
|
@ -1126,7 +1126,7 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
entry.entry.item_type = "<StockItem>";
|
||||
entry.entry.extra_data = stock_id;
|
||||
entry.quark_string = identifier;
|
||||
entry.help_page = tool_info->help_data;
|
||||
entry.help_id = tool_info->help_id;
|
||||
entry.description = NULL;
|
||||
|
||||
gimp_item_factory_create_item (factory,
|
||||
|
|
|
@ -107,129 +107,108 @@ menus_init (Gimp *gimp)
|
|||
|
||||
global_menu_factory = gimp_menu_factory_new (gimp);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Toolbox>", "toolbox",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Toolbox>",
|
||||
toolbox_menu_setup, NULL, FALSE,
|
||||
n_toolbox_menu_entries,
|
||||
toolbox_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Image>", "image",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Image>",
|
||||
image_menu_setup, image_menu_update, FALSE,
|
||||
n_image_menu_entries,
|
||||
image_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Load>", "open",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Load>",
|
||||
file_open_menu_setup, NULL, FALSE,
|
||||
n_file_open_menu_entries,
|
||||
file_open_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Save>", "save",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Save>",
|
||||
file_save_menu_setup,
|
||||
file_save_menu_update, FALSE,
|
||||
n_file_save_menu_entries,
|
||||
file_save_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Layers>", "layers",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Layers>",
|
||||
NULL, layers_menu_update, TRUE,
|
||||
n_layers_menu_entries,
|
||||
layers_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Channels>", "channels",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Channels>",
|
||||
NULL, channels_menu_update, TRUE,
|
||||
n_channels_menu_entries,
|
||||
channels_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Vectors>", "vectors",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Vectors>",
|
||||
NULL, vectors_menu_update, TRUE,
|
||||
n_vectors_menu_entries,
|
||||
vectors_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Dialogs>", "dialogs",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Dialogs>",
|
||||
NULL, dialogs_menu_update, TRUE,
|
||||
n_dialogs_menu_entries,
|
||||
dialogs_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Brushes>", "brushes",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Brushes>",
|
||||
NULL, brushes_menu_update, TRUE,
|
||||
n_brushes_menu_entries,
|
||||
brushes_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Patterns>", "patterns",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Patterns>",
|
||||
NULL, patterns_menu_update, TRUE,
|
||||
n_patterns_menu_entries,
|
||||
patterns_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Gradients>", "gradients",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Gradients>",
|
||||
NULL, gradients_menu_update, TRUE,
|
||||
n_gradients_menu_entries,
|
||||
gradients_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Palettes>", "palettes",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Palettes>",
|
||||
NULL, palettes_menu_update, TRUE,
|
||||
n_palettes_menu_entries,
|
||||
palettes_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Buffers>", "buffers",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Buffers>",
|
||||
NULL, buffers_menu_update, TRUE,
|
||||
n_buffers_menu_entries,
|
||||
buffers_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Documents>", "documents",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Documents>",
|
||||
NULL, documents_menu_update, TRUE,
|
||||
n_documents_menu_entries,
|
||||
documents_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Templates>", "templates",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Templates>",
|
||||
NULL, templates_menu_update, TRUE,
|
||||
n_templates_menu_entries,
|
||||
templates_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Images>", "images",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Images>",
|
||||
NULL, images_menu_update, TRUE,
|
||||
n_images_menu_entries,
|
||||
images_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<GradientEditor>", "gradient_editor",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<GradientEditor>",
|
||||
NULL, gradient_editor_menu_update, TRUE,
|
||||
n_gradient_editor_menu_entries,
|
||||
gradient_editor_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<PaletteEditor>", "palette_editor",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<PaletteEditor>",
|
||||
NULL, palette_editor_menu_update, TRUE,
|
||||
n_palette_editor_menu_entries,
|
||||
palette_editor_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<ColormapEditor>", "colormap_editor",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<ColormapEditor>",
|
||||
NULL, colormap_editor_menu_update, TRUE,
|
||||
n_colormap_editor_menu_entries,
|
||||
colormap_editor_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<QMask>", "qmask",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<QMask>",
|
||||
NULL, qmask_menu_update, TRUE,
|
||||
n_qmask_menu_entries,
|
||||
qmask_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<ErrorConsole>", "error_console",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<ErrorConsole>",
|
||||
NULL, error_console_menu_update, TRUE,
|
||||
n_error_console_menu_entries,
|
||||
error_console_menu_entries);
|
||||
|
@ -312,7 +291,7 @@ menus_last_opened_add (GimpItemFactory *item_factory,
|
|||
last_opened_entries[i].entry.item_type = "<StockItem>";
|
||||
last_opened_entries[i].entry.extra_data = GTK_STOCK_OPEN;
|
||||
last_opened_entries[i].quark_string = NULL;
|
||||
last_opened_entries[i].help_page = GIMP_HELP_FILE_OPEN_RECENT;
|
||||
last_opened_entries[i].help_id = GIMP_HELP_FILE_OPEN_RECENT;
|
||||
last_opened_entries[i].description = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef struct _PlugInMenuEntry PlugInMenuEntry;
|
|||
struct _PlugInMenuEntry
|
||||
{
|
||||
PlugInProcDef *proc_def;
|
||||
const gchar *domain;
|
||||
const gchar *locale_domain;
|
||||
const gchar *help_path;
|
||||
};
|
||||
|
||||
|
@ -149,9 +149,9 @@ plug_in_menus_create (GimpItemFactory *item_factory,
|
|||
|
||||
menu_entry = g_new0 (PlugInMenuEntry, 1);
|
||||
|
||||
menu_entry->proc_def = proc_def;
|
||||
menu_entry->domain = locale_domain;
|
||||
menu_entry->help_path = help_path;
|
||||
menu_entry->proc_def = proc_def;
|
||||
menu_entry->locale_domain = locale_domain;
|
||||
menu_entry->help_path = help_path;
|
||||
|
||||
g_tree_insert (menu_entries,
|
||||
dgettext (locale_domain, proc_def->menu_path),
|
||||
|
@ -172,36 +172,33 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
const gchar *help_path)
|
||||
{
|
||||
GimpItemFactoryEntry entry;
|
||||
gchar *help_id;
|
||||
gchar *help_page;
|
||||
gchar *basename;
|
||||
gchar *lowercase_page;
|
||||
|
||||
g_return_if_fail (item_factory == NULL ||
|
||||
GIMP_IS_ITEM_FACTORY (item_factory));
|
||||
|
||||
basename = g_path_get_basename (proc_def->prog);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: fix plug-in menu item help
|
||||
#endif
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
|
||||
basename = g_path_get_basename (proc_def->prog);
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
|
||||
help_id = g_strconcat (lowercase_basename, ".html", NULL);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
}
|
||||
|
||||
if (help_path)
|
||||
{
|
||||
help_page = g_strconcat (help_path,
|
||||
"@", /* HACK: locale subdir */
|
||||
basename,
|
||||
".html",
|
||||
NULL);
|
||||
}
|
||||
help_page = g_strconcat (help_path, ":", help_id, NULL);
|
||||
else
|
||||
{
|
||||
help_page = g_strconcat ("filters/", /* _not_ G_DIR_SEPARATOR_S */
|
||||
basename,
|
||||
".html",
|
||||
NULL);
|
||||
}
|
||||
help_page = g_strconcat ("filters/", help_id, NULL);
|
||||
|
||||
g_free (basename);
|
||||
|
||||
lowercase_page = g_ascii_strdown (help_page, -1);
|
||||
|
||||
g_free (help_page);
|
||||
g_free (help_id);
|
||||
|
||||
entry.entry.path = strstr (proc_def->menu_path, "/");
|
||||
entry.entry.accelerator = proc_def->accelerator;
|
||||
|
@ -209,7 +206,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
entry.entry.callback_action = 0;
|
||||
entry.entry.item_type = NULL;
|
||||
entry.quark_string = NULL;
|
||||
entry.help_page = lowercase_page;
|
||||
entry.help_id = help_page;
|
||||
entry.description = NULL;
|
||||
|
||||
if (item_factory)
|
||||
|
@ -246,7 +243,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
}
|
||||
}
|
||||
|
||||
g_free (lowercase_page);
|
||||
g_free (help_page);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -413,7 +410,7 @@ plug_in_menu_tree_traverse_func (gpointer foo,
|
|||
{
|
||||
plug_in_menus_create_entry (item_factory,
|
||||
menu_entry->proc_def,
|
||||
menu_entry->domain,
|
||||
menu_entry->locale_domain,
|
||||
menu_entry->help_path);
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -464,7 +464,7 @@ prefs_notebook_append_page (Gimp *gimp,
|
|||
const gchar *notebook_icon,
|
||||
GtkTreeStore *tree,
|
||||
const gchar *tree_label,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GtkTreeIter *parent,
|
||||
GtkTreeIter *iter,
|
||||
gint page_index)
|
||||
|
@ -478,7 +478,7 @@ prefs_notebook_append_page (Gimp *gimp,
|
|||
gtk_notebook_append_page (notebook, event_box, NULL);
|
||||
gtk_widget_show (event_box);
|
||||
|
||||
gimp_help_set_help_data (event_box, NULL, help_data);
|
||||
gimp_help_set_help_data (event_box, NULL, help_id);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
|
@ -824,21 +824,19 @@ prefs_memsize_entry_add (GObject *config,
|
|||
}
|
||||
|
||||
static void
|
||||
prefs_help_func (const gchar *help_data)
|
||||
prefs_help_func (const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
if (prefs_dialog)
|
||||
{
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *event_box;
|
||||
gint page_num;
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *event_box;
|
||||
gint page_num;
|
||||
|
||||
notebook = g_object_get_data (G_OBJECT (prefs_dialog), "notebook");
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
|
||||
event_box = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page_num);
|
||||
notebook = g_object_get_data (G_OBJECT (help_data), "notebook");
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
|
||||
event_box = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page_num);
|
||||
|
||||
help_data = g_object_get_data (G_OBJECT (event_box), "gimp_help_data");
|
||||
gimp_standard_help_func (help_data);
|
||||
}
|
||||
help_id = g_object_get_data (G_OBJECT (event_box), "gimp-help-id");
|
||||
gimp_standard_help_func (help_id, NULL);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
|
|
|
@ -217,9 +217,8 @@ tips_dialog_create (Gimp *gimp)
|
|||
G_CALLBACK (tips_show_next),
|
||||
NULL);
|
||||
|
||||
/* Connect the "F1" help key */
|
||||
gimp_help_connect (tips_dialog, gimp_standard_help_func,
|
||||
GIMP_HELP_TIPS_DIALOG);
|
||||
GIMP_HELP_TIPS_DIALOG, NULL);
|
||||
|
||||
tips_set_labels (current_tip->data);
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "core/gimp.h"
|
||||
|
||||
#include "plug-in/plug-in-proc.h"
|
||||
#include "plug-in/plug-ins.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
@ -56,31 +57,48 @@ gint n_file_open_menu_entries = G_N_ELEMENTS (file_open_menu_entries);
|
|||
void
|
||||
file_open_menu_setup (GimpItemFactory *factory)
|
||||
{
|
||||
GimpItemFactoryEntry entry;
|
||||
PlugInProcDef *file_proc;
|
||||
GSList *list;
|
||||
GSList *list;
|
||||
|
||||
for (list = factory->gimp->load_procs; list; list = g_slist_next (list))
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
gchar *help_page;
|
||||
PlugInProcDef *file_proc;
|
||||
const gchar *progname;
|
||||
const gchar *locale_domain;
|
||||
const gchar *help_path;
|
||||
GimpItemFactoryEntry entry;
|
||||
gchar *help_id;
|
||||
gchar *help_page;
|
||||
|
||||
file_proc = (PlugInProcDef *) list->data;
|
||||
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
progname = plug_in_proc_def_get_progname (file_proc);
|
||||
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
locale_domain = plug_ins_locale_domain (factory->gimp,
|
||||
progname, NULL);
|
||||
help_path = plug_ins_help_path (factory->gimp,
|
||||
progname);
|
||||
|
||||
g_free (basename);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: fix plug-in menu item help
|
||||
#endif
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
|
||||
/* NOT g_build_filename() because this is a relative URI */
|
||||
help_page = g_strconcat ("filters/",
|
||||
lowercase_basename,
|
||||
".html",
|
||||
NULL);
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
help_id = g_strconcat (lowercase_basename, ".html", NULL);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
}
|
||||
|
||||
if (help_path)
|
||||
help_page = g_strconcat (help_path, ":", help_id, NULL);
|
||||
else
|
||||
help_page = g_strconcat ("filters/", help_id, NULL);
|
||||
|
||||
g_free (help_id);
|
||||
|
||||
entry.entry.path = strstr (file_proc->menu_path, "/");
|
||||
entry.entry.accelerator = NULL;
|
||||
|
@ -88,12 +106,12 @@ file_open_menu_setup (GimpItemFactory *factory)
|
|||
entry.entry.callback_action = 0;
|
||||
entry.entry.item_type = NULL;
|
||||
entry.quark_string = NULL;
|
||||
entry.help_page = help_page;
|
||||
entry.help_id = help_page;
|
||||
entry.description = NULL;
|
||||
|
||||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
NULL,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
|
||||
#include "plug-in/plug-in-proc.h"
|
||||
#include "plug-in/plug-ins.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
@ -57,31 +58,48 @@ gint n_file_save_menu_entries = G_N_ELEMENTS (file_save_menu_entries);
|
|||
void
|
||||
file_save_menu_setup (GimpItemFactory *factory)
|
||||
{
|
||||
GimpItemFactoryEntry entry;
|
||||
PlugInProcDef *file_proc;
|
||||
GSList *list;
|
||||
GSList *list;
|
||||
|
||||
for (list = factory->gimp->save_procs; list; list = g_slist_next (list))
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
gchar *help_page;
|
||||
PlugInProcDef *file_proc;
|
||||
const gchar *progname;
|
||||
const gchar *locale_domain;
|
||||
const gchar *help_path;
|
||||
GimpItemFactoryEntry entry;
|
||||
gchar *help_id;
|
||||
gchar *help_page;
|
||||
|
||||
file_proc = (PlugInProcDef *) list->data;
|
||||
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
progname = plug_in_proc_def_get_progname (file_proc);
|
||||
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
locale_domain = plug_ins_locale_domain (factory->gimp,
|
||||
progname, NULL);
|
||||
help_path = plug_ins_help_path (factory->gimp,
|
||||
progname);
|
||||
|
||||
g_free (basename);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: fix plug-in menu item help
|
||||
#endif
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
|
||||
/* NOT g_build_filename() because this is a relative URI */
|
||||
help_page = g_strconcat ("filters/",
|
||||
lowercase_basename,
|
||||
".html",
|
||||
NULL);
|
||||
basename = g_path_get_basename (file_proc->prog);
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
help_id = g_strconcat (lowercase_basename, ".html", NULL);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
}
|
||||
|
||||
if (help_path)
|
||||
help_page = g_strconcat (help_path, ":", help_id, NULL);
|
||||
else
|
||||
help_page = g_strconcat ("filters/", help_id, NULL);
|
||||
|
||||
g_free (help_id);
|
||||
|
||||
entry.entry.path = strstr (file_proc->menu_path, "/");
|
||||
entry.entry.accelerator = NULL;
|
||||
|
@ -89,12 +107,12 @@ file_save_menu_setup (GimpItemFactory *factory)
|
|||
entry.entry.callback_action = 0;
|
||||
entry.entry.item_type = NULL;
|
||||
entry.quark_string = NULL;
|
||||
entry.help_page = help_page;
|
||||
entry.help_id = help_page;
|
||||
entry.description = NULL;
|
||||
|
||||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
NULL,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
|
||||
|
|
|
@ -1116,7 +1116,7 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
const gchar *stock_id;
|
||||
const gchar *identifier;
|
||||
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
||||
identifier = gimp_object_get_name (GIMP_OBJECT (tool_info));
|
||||
|
||||
entry.entry.path = tool_info->menu_path;
|
||||
|
@ -1126,7 +1126,7 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
entry.entry.item_type = "<StockItem>";
|
||||
entry.entry.extra_data = stock_id;
|
||||
entry.quark_string = identifier;
|
||||
entry.help_page = tool_info->help_data;
|
||||
entry.help_id = tool_info->help_id;
|
||||
entry.description = NULL;
|
||||
|
||||
gimp_item_factory_create_item (factory,
|
||||
|
|
|
@ -107,129 +107,108 @@ menus_init (Gimp *gimp)
|
|||
|
||||
global_menu_factory = gimp_menu_factory_new (gimp);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Toolbox>", "toolbox",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Toolbox>",
|
||||
toolbox_menu_setup, NULL, FALSE,
|
||||
n_toolbox_menu_entries,
|
||||
toolbox_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Image>", "image",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Image>",
|
||||
image_menu_setup, image_menu_update, FALSE,
|
||||
n_image_menu_entries,
|
||||
image_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Load>", "open",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Load>",
|
||||
file_open_menu_setup, NULL, FALSE,
|
||||
n_file_open_menu_entries,
|
||||
file_open_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Save>", "save",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Save>",
|
||||
file_save_menu_setup,
|
||||
file_save_menu_update, FALSE,
|
||||
n_file_save_menu_entries,
|
||||
file_save_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Layers>", "layers",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Layers>",
|
||||
NULL, layers_menu_update, TRUE,
|
||||
n_layers_menu_entries,
|
||||
layers_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Channels>", "channels",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Channels>",
|
||||
NULL, channels_menu_update, TRUE,
|
||||
n_channels_menu_entries,
|
||||
channels_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Vectors>", "vectors",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Vectors>",
|
||||
NULL, vectors_menu_update, TRUE,
|
||||
n_vectors_menu_entries,
|
||||
vectors_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Dialogs>", "dialogs",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Dialogs>",
|
||||
NULL, dialogs_menu_update, TRUE,
|
||||
n_dialogs_menu_entries,
|
||||
dialogs_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Brushes>", "brushes",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Brushes>",
|
||||
NULL, brushes_menu_update, TRUE,
|
||||
n_brushes_menu_entries,
|
||||
brushes_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Patterns>", "patterns",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Patterns>",
|
||||
NULL, patterns_menu_update, TRUE,
|
||||
n_patterns_menu_entries,
|
||||
patterns_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Gradients>", "gradients",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Gradients>",
|
||||
NULL, gradients_menu_update, TRUE,
|
||||
n_gradients_menu_entries,
|
||||
gradients_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Palettes>", "palettes",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Palettes>",
|
||||
NULL, palettes_menu_update, TRUE,
|
||||
n_palettes_menu_entries,
|
||||
palettes_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Buffers>", "buffers",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Buffers>",
|
||||
NULL, buffers_menu_update, TRUE,
|
||||
n_buffers_menu_entries,
|
||||
buffers_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Documents>", "documents",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Documents>",
|
||||
NULL, documents_menu_update, TRUE,
|
||||
n_documents_menu_entries,
|
||||
documents_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Templates>", "templates",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Templates>",
|
||||
NULL, templates_menu_update, TRUE,
|
||||
n_templates_menu_entries,
|
||||
templates_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<Images>", "images",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<Images>",
|
||||
NULL, images_menu_update, TRUE,
|
||||
n_images_menu_entries,
|
||||
images_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<GradientEditor>", "gradient_editor",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<GradientEditor>",
|
||||
NULL, gradient_editor_menu_update, TRUE,
|
||||
n_gradient_editor_menu_entries,
|
||||
gradient_editor_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<PaletteEditor>", "palette_editor",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<PaletteEditor>",
|
||||
NULL, palette_editor_menu_update, TRUE,
|
||||
n_palette_editor_menu_entries,
|
||||
palette_editor_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<ColormapEditor>", "colormap_editor",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<ColormapEditor>",
|
||||
NULL, colormap_editor_menu_update, TRUE,
|
||||
n_colormap_editor_menu_entries,
|
||||
colormap_editor_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<QMask>", "qmask",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<QMask>",
|
||||
NULL, qmask_menu_update, TRUE,
|
||||
n_qmask_menu_entries,
|
||||
qmask_menu_entries);
|
||||
|
||||
gimp_menu_factory_menu_register (global_menu_factory,
|
||||
"<ErrorConsole>", "error_console",
|
||||
gimp_menu_factory_menu_register (global_menu_factory, "<ErrorConsole>",
|
||||
NULL, error_console_menu_update, TRUE,
|
||||
n_error_console_menu_entries,
|
||||
error_console_menu_entries);
|
||||
|
@ -312,7 +291,7 @@ menus_last_opened_add (GimpItemFactory *item_factory,
|
|||
last_opened_entries[i].entry.item_type = "<StockItem>";
|
||||
last_opened_entries[i].entry.extra_data = GTK_STOCK_OPEN;
|
||||
last_opened_entries[i].quark_string = NULL;
|
||||
last_opened_entries[i].help_page = GIMP_HELP_FILE_OPEN_RECENT;
|
||||
last_opened_entries[i].help_id = GIMP_HELP_FILE_OPEN_RECENT;
|
||||
last_opened_entries[i].description = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef struct _PlugInMenuEntry PlugInMenuEntry;
|
|||
struct _PlugInMenuEntry
|
||||
{
|
||||
PlugInProcDef *proc_def;
|
||||
const gchar *domain;
|
||||
const gchar *locale_domain;
|
||||
const gchar *help_path;
|
||||
};
|
||||
|
||||
|
@ -149,9 +149,9 @@ plug_in_menus_create (GimpItemFactory *item_factory,
|
|||
|
||||
menu_entry = g_new0 (PlugInMenuEntry, 1);
|
||||
|
||||
menu_entry->proc_def = proc_def;
|
||||
menu_entry->domain = locale_domain;
|
||||
menu_entry->help_path = help_path;
|
||||
menu_entry->proc_def = proc_def;
|
||||
menu_entry->locale_domain = locale_domain;
|
||||
menu_entry->help_path = help_path;
|
||||
|
||||
g_tree_insert (menu_entries,
|
||||
dgettext (locale_domain, proc_def->menu_path),
|
||||
|
@ -172,36 +172,33 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
const gchar *help_path)
|
||||
{
|
||||
GimpItemFactoryEntry entry;
|
||||
gchar *help_id;
|
||||
gchar *help_page;
|
||||
gchar *basename;
|
||||
gchar *lowercase_page;
|
||||
|
||||
g_return_if_fail (item_factory == NULL ||
|
||||
GIMP_IS_ITEM_FACTORY (item_factory));
|
||||
|
||||
basename = g_path_get_basename (proc_def->prog);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: fix plug-in menu item help
|
||||
#endif
|
||||
{
|
||||
gchar *basename;
|
||||
gchar *lowercase_basename;
|
||||
|
||||
basename = g_path_get_basename (proc_def->prog);
|
||||
lowercase_basename = g_ascii_strdown (basename, -1);
|
||||
|
||||
help_id = g_strconcat (lowercase_basename, ".html", NULL);
|
||||
|
||||
g_free (lowercase_basename);
|
||||
}
|
||||
|
||||
if (help_path)
|
||||
{
|
||||
help_page = g_strconcat (help_path,
|
||||
"@", /* HACK: locale subdir */
|
||||
basename,
|
||||
".html",
|
||||
NULL);
|
||||
}
|
||||
help_page = g_strconcat (help_path, ":", help_id, NULL);
|
||||
else
|
||||
{
|
||||
help_page = g_strconcat ("filters/", /* _not_ G_DIR_SEPARATOR_S */
|
||||
basename,
|
||||
".html",
|
||||
NULL);
|
||||
}
|
||||
help_page = g_strconcat ("filters/", help_id, NULL);
|
||||
|
||||
g_free (basename);
|
||||
|
||||
lowercase_page = g_ascii_strdown (help_page, -1);
|
||||
|
||||
g_free (help_page);
|
||||
g_free (help_id);
|
||||
|
||||
entry.entry.path = strstr (proc_def->menu_path, "/");
|
||||
entry.entry.accelerator = proc_def->accelerator;
|
||||
|
@ -209,7 +206,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
entry.entry.callback_action = 0;
|
||||
entry.entry.item_type = NULL;
|
||||
entry.quark_string = NULL;
|
||||
entry.help_page = lowercase_page;
|
||||
entry.help_id = help_page;
|
||||
entry.description = NULL;
|
||||
|
||||
if (item_factory)
|
||||
|
@ -246,7 +243,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
}
|
||||
}
|
||||
|
||||
g_free (lowercase_page);
|
||||
g_free (help_page);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -413,7 +410,7 @@ plug_in_menu_tree_traverse_func (gpointer foo,
|
|||
{
|
||||
plug_in_menus_create_entry (item_factory,
|
||||
menu_entry->proc_def,
|
||||
menu_entry->domain,
|
||||
menu_entry->locale_domain,
|
||||
menu_entry->help_path);
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -263,7 +263,7 @@ gimp_color_picker_tool_info_create (GimpTool *tool)
|
|||
GIMP_STOCK_TOOL_COLOR_PICKER,
|
||||
_("Color Picker Information"),
|
||||
gimp_standard_help_func,
|
||||
tool->tool_info->help_data);
|
||||
tool->tool_info->help_id);
|
||||
|
||||
gimp_dialog_create_action_area (GIMP_DIALOG (info_dialog->shell),
|
||||
|
||||
|
|
|
@ -988,7 +988,7 @@ crop_info_create (GimpCropTool *crop)
|
|||
stock_id,
|
||||
_("Crop & Resize Information"),
|
||||
gimp_standard_help_func,
|
||||
tool->tool_info->help_data);
|
||||
tool->tool_info->help_id);
|
||||
|
||||
gimp_dialog_create_action_area (GIMP_DIALOG (crop->crop_info->shell),
|
||||
|
||||
|
|
|
@ -1273,7 +1273,7 @@ file_dialog_create (GimpCurvesTool *c_tool)
|
|||
g_free (temp);
|
||||
|
||||
gimp_help_connect (c_tool->file_dialog, gimp_standard_help_func,
|
||||
GIMP_TOOL (c_tool)->tool_info->help_data);
|
||||
GIMP_TOOL (c_tool)->tool_info->help_id, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -349,7 +349,7 @@ histogram_tool_dialog_new (GimpToolInfo *tool_info)
|
|||
GIMP_OBJECT (tool_info)->name,
|
||||
stock_id,
|
||||
_("View Image Histogram"),
|
||||
gimp_standard_help_func, tool_info->help_data,
|
||||
gimp_standard_help_func, tool_info->help_id,
|
||||
|
||||
GTK_STOCK_CLOSE, histogram_tool_close_callback,
|
||||
htd, NULL, NULL, TRUE, TRUE,
|
||||
|
|
|
@ -223,7 +223,7 @@ gimp_image_map_tool_initialize (GimpTool *tool,
|
|||
stock_id,
|
||||
image_map_tool->shell_desc,
|
||||
gimp_standard_help_func,
|
||||
tool_info->help_data,
|
||||
tool_info->help_id,
|
||||
|
||||
GIMP_STOCK_RESET,
|
||||
gimp_image_map_tool_reset_clicked,
|
||||
|
|
|
@ -1471,7 +1471,7 @@ file_dialog_create (GimpLevelsTool *l_tool)
|
|||
g_free (temp);
|
||||
|
||||
gimp_help_connect (l_tool->file_dialog, gimp_standard_help_func,
|
||||
GIMP_TOOL (l_tool)->tool_info->help_data);
|
||||
GIMP_TOOL (l_tool)->tool_info->help_id, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -386,7 +386,7 @@ gimp_measure_tool_button_press (GimpTool *tool,
|
|||
stock_id,
|
||||
_("Measure Distances and Angles"),
|
||||
gimp_standard_help_func,
|
||||
tool->tool_info->help_data);
|
||||
tool->tool_info->help_id);
|
||||
info_dialog_add_label (measure_tool_info, _("Distance:"), distance_buf);
|
||||
info_dialog_add_label (measure_tool_info, _("Angle:"), angle_buf);
|
||||
|
||||
|
|
|
@ -1239,7 +1239,7 @@ gimp_transform_tool_dialog (GimpTransformTool *tr_tool)
|
|||
GIMP_OBJECT (tool_info)->name,
|
||||
stock_id,
|
||||
tr_tool->shell_desc,
|
||||
gimp_standard_help_func, tool_info->help_data);
|
||||
gimp_standard_help_func, tool_info->help_id);
|
||||
|
||||
gimp_dialog_create_action_area (GIMP_DIALOG (tr_tool->info_dialog->shell),
|
||||
|
||||
|
|
|
@ -95,7 +95,8 @@ static ColorNotebook *
|
|||
gboolean wants_updates,
|
||||
gboolean show_alpha);
|
||||
|
||||
static void color_notebook_help_func (const gchar *help_data);
|
||||
static void color_notebook_help_func (const gchar *help_id,
|
||||
gpointer help_data);
|
||||
|
||||
static void color_notebook_ok_callback (GtkWidget *widget,
|
||||
ColorNotebook *cnp);
|
||||
|
@ -322,22 +323,22 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||
cnp->shell = gimp_viewable_dialog_new (viewable,
|
||||
title, wmclass_name,
|
||||
stock_id, desc,
|
||||
color_notebook_help_func,
|
||||
(const gchar *) cnp,
|
||||
color_notebook_help_func, NULL,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (cnp->shell), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
cnp->shell = gimp_dialog_new (title, wmclass_name,
|
||||
color_notebook_help_func,
|
||||
(const gchar *) cnp,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
NULL);
|
||||
cnp->shell = gimp_dialog_new (title, wmclass_name,
|
||||
color_notebook_help_func, NULL,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
g_object_set_data (G_OBJECT (cnp->shell), "color-notebook", cnp);
|
||||
|
||||
gimp_dialog_create_action_area (GIMP_DIALOG (cnp->shell),
|
||||
|
||||
GTK_STOCK_CANCEL,
|
||||
|
@ -535,21 +536,19 @@ color_notebook_new_internal (GimpViewable *viewable,
|
|||
}
|
||||
|
||||
static void
|
||||
color_notebook_help_func (const gchar *data)
|
||||
color_notebook_help_func (const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
ColorNotebook *cnp;
|
||||
GimpColorNotebook *notebook;
|
||||
gchar *help_path;
|
||||
|
||||
cnp = (ColorNotebook *) data;
|
||||
cnp = g_object_get_data (G_OBJECT (help_data), "color-notebook");
|
||||
|
||||
notebook = GIMP_COLOR_NOTEBOOK (cnp->notebook);
|
||||
|
||||
help_path = g_strconcat ("dialogs/color_selectors/",
|
||||
GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page,
|
||||
NULL);
|
||||
gimp_standard_help_func (help_path);
|
||||
g_free (help_path);
|
||||
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page;
|
||||
|
||||
gimp_standard_help_func (help_id, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -370,7 +370,7 @@ gimp_error_console_save_ext_clicked (GtkWidget *button,
|
|||
console);
|
||||
|
||||
gimp_help_connect (GTK_WIDGET (filesel), gimp_standard_help_func,
|
||||
GIMP_HELP_ERROR_DIALOG);
|
||||
GIMP_HELP_ERROR_DIALOG, NULL);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (filesel));
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#define __GIMP_HELP_IDS_H__
|
||||
|
||||
|
||||
#define GIMP_HELP_MAIN "index.html"
|
||||
|
||||
#define GIMP_HELP_FILE_NEW "dialogs/file_new.html"
|
||||
#define GIMP_HELP_FILE_NEW_CONFIRM "dialogs/file_new.html#confirm_dialog"
|
||||
#define GIMP_HELP_FILE_OPEN "dialogs/file_open.html"
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "plug-in/plug-in-run.h"
|
||||
|
||||
#include "gimphelp.h"
|
||||
#include "gimphelp-ids.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
@ -58,7 +59,7 @@ struct _GimpIdleHelp
|
|||
Gimp *gimp;
|
||||
gchar *help_path;
|
||||
gchar *help_locale;
|
||||
gchar *help_data;
|
||||
gchar *help_id;
|
||||
};
|
||||
|
||||
|
||||
|
@ -68,11 +69,11 @@ static gint gimp_idle_help (gpointer data);
|
|||
static gboolean gimp_help_internal (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *current_locale,
|
||||
const gchar *help_data);
|
||||
const gchar *help_id);
|
||||
static void gimp_help_netscape (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *current_locale,
|
||||
const gchar *help_data);
|
||||
const gchar *help_id);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
@ -80,7 +81,7 @@ static void gimp_help_netscape (Gimp *gimp,
|
|||
void
|
||||
gimp_help (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
|
@ -97,8 +98,8 @@ gimp_help (Gimp *gimp,
|
|||
|
||||
idle_help->help_locale = g_strdup ("C");
|
||||
|
||||
if (help_data && strlen (help_data))
|
||||
idle_help->help_data = g_strdup (help_data);
|
||||
if (help_id && strlen (help_id))
|
||||
idle_help->help_id = g_strdup (help_id);
|
||||
|
||||
g_idle_add (gimp_idle_help, idle_help);
|
||||
}
|
||||
|
@ -123,10 +124,10 @@ gimp_idle_help (gpointer data)
|
|||
else
|
||||
g_print ("Help Path: NULL\n");
|
||||
|
||||
if (idle_help->help_data)
|
||||
g_print ("Help Page: %s\n", idle_help->help_data);
|
||||
if (idle_help->help_id)
|
||||
g_print ("Help ID: %s\n", idle_help->help_id);
|
||||
else
|
||||
g_print ("Help Page: NULL\n");
|
||||
g_print ("Help ID: NULL\n");
|
||||
|
||||
g_print ("\n");
|
||||
#endif /* DEBUG_HELP */
|
||||
|
@ -137,14 +138,14 @@ gimp_idle_help (gpointer data)
|
|||
if (gimp_help_internal (idle_help->gimp,
|
||||
idle_help->help_path,
|
||||
idle_help->help_locale,
|
||||
idle_help->help_data))
|
||||
idle_help->help_id))
|
||||
break;
|
||||
|
||||
case GIMP_HELP_BROWSER_NETSCAPE:
|
||||
gimp_help_netscape (idle_help->gimp,
|
||||
idle_help->help_path,
|
||||
idle_help->help_locale,
|
||||
idle_help->help_data);
|
||||
idle_help->help_id);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -153,7 +154,7 @@ gimp_idle_help (gpointer data)
|
|||
|
||||
g_free (idle_help->help_path);
|
||||
g_free (idle_help->help_locale);
|
||||
g_free (idle_help->help_data);
|
||||
g_free (idle_help->help_id);
|
||||
g_free (idle_help);
|
||||
|
||||
return FALSE;
|
||||
|
@ -178,7 +179,7 @@ static gboolean
|
|||
gimp_help_internal (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *current_locale,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id)
|
||||
{
|
||||
ProcRecord *proc_rec;
|
||||
|
||||
|
@ -228,7 +229,7 @@ gimp_help_internal (Gimp *gimp,
|
|||
args[2].arg_type = GIMP_PDB_STRING;
|
||||
args[2].value.pdb_pointer = (gpointer) current_locale;
|
||||
args[3].arg_type = GIMP_PDB_STRING;
|
||||
args[3].value.pdb_pointer = (gpointer) help_data;
|
||||
args[3].value.pdb_pointer = (gpointer) help_id;
|
||||
|
||||
plug_in_run (gimp, proc_rec, args, 4, FALSE, TRUE, -1);
|
||||
|
||||
|
@ -245,7 +246,7 @@ gimp_help_internal (Gimp *gimp,
|
|||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, help_path,
|
||||
GIMP_PDB_STRING, current_locale,
|
||||
GIMP_PDB_STRING, help_data,
|
||||
GIMP_PDB_STRING, help_id,
|
||||
GIMP_PDB_END);
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
|
@ -260,18 +261,18 @@ static void
|
|||
gimp_help_netscape (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *current_locale,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id)
|
||||
{
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
gchar *url;
|
||||
|
||||
if (!help_data)
|
||||
help_data = "introduction.html";
|
||||
if (! help_id)
|
||||
help_id = GIMP_HELP_MAIN;
|
||||
|
||||
if (help_data[0] == '/') /* _not_ g_path_is_absolute() */
|
||||
if (help_id[0] == '/') /* _not_ g_path_is_absolute() */
|
||||
{
|
||||
url = g_strconcat ("file:", help_data, NULL);
|
||||
url = g_strconcat ("file:", help_id, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -281,7 +282,7 @@ gimp_help_netscape (Gimp *gimp,
|
|||
gimp_data_directory (),
|
||||
"/help/",
|
||||
current_locale, "/",
|
||||
help_data,
|
||||
help_id,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
|
@ -289,7 +290,7 @@ gimp_help_netscape (Gimp *gimp,
|
|||
url = g_strconcat ("file:",
|
||||
help_path, "/",
|
||||
current_locale, "/",
|
||||
help_data,
|
||||
help_id,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
void gimp_help (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *help_data);
|
||||
const gchar *help_id);
|
||||
|
||||
|
||||
#endif /* __GIMP_HELP_H__ */
|
||||
|
|
|
@ -156,7 +156,6 @@ GimpItemFactory *
|
|||
gimp_item_factory_new (Gimp *gimp,
|
||||
GType container_type,
|
||||
const gchar *factory_path,
|
||||
const gchar *help_path,
|
||||
GimpItemFactoryUpdateFunc update_func,
|
||||
gboolean update_on_popup,
|
||||
guint n_entries,
|
||||
|
@ -170,7 +169,6 @@ gimp_item_factory_new (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (factory_path != NULL, NULL);
|
||||
g_return_val_if_fail (help_path != NULL, NULL);
|
||||
g_return_val_if_fail (factory_path[0] == '<', NULL);
|
||||
g_return_val_if_fail (factory_path[strlen (factory_path) - 1] == '>', NULL);
|
||||
|
||||
|
@ -200,11 +198,6 @@ gimp_item_factory_new (Gimp *gimp,
|
|||
g_strdup (factory_path),
|
||||
list);
|
||||
|
||||
/* this will go away <mitch> */
|
||||
g_object_set_data_full (G_OBJECT (factory), "help_path",
|
||||
g_strdup (help_path),
|
||||
(GDestroyNotify) g_free);
|
||||
|
||||
gimp_item_factory_create_items (factory,
|
||||
n_entries,
|
||||
entries,
|
||||
|
@ -326,14 +319,14 @@ gimp_item_factory_create_item (GimpItemFactory *item_factory,
|
|||
G_CALLBACK (gimp_item_factory_item_realize),
|
||||
item_factory);
|
||||
|
||||
if (entry->help_page)
|
||||
if (entry->help_id)
|
||||
{
|
||||
if (static_entry)
|
||||
g_object_set_data (G_OBJECT (menu_item), "help_page",
|
||||
(gpointer) entry->help_page);
|
||||
g_object_set_data (G_OBJECT (menu_item), "gimp-help-id",
|
||||
(gpointer) entry->help_id);
|
||||
else
|
||||
g_object_set_data_full (G_OBJECT (menu_item), "help_page",
|
||||
g_strdup (entry->help_page),
|
||||
g_object_set_data_full (G_OBJECT (menu_item), "gimp-help-id",
|
||||
g_strdup (entry->help_id),
|
||||
g_free);
|
||||
}
|
||||
}
|
||||
|
@ -881,9 +874,7 @@ gimp_item_factory_item_key_press (GtkWidget *widget,
|
|||
GimpItemFactory *item_factory)
|
||||
{
|
||||
GtkWidget *active_menu_item;
|
||||
gchar *factory_help_path = NULL;
|
||||
gchar *help_path = NULL;
|
||||
gchar *help_page = NULL;
|
||||
gchar *help_id = NULL;
|
||||
|
||||
active_menu_item = GTK_MENU_SHELL (widget)->active_menu_item;
|
||||
|
||||
|
@ -891,10 +882,10 @@ gimp_item_factory_item_key_press (GtkWidget *widget,
|
|||
*/
|
||||
if (active_menu_item)
|
||||
{
|
||||
help_page = g_object_get_data (G_OBJECT (active_menu_item), "help_page");
|
||||
help_id = g_object_get_data (G_OBJECT (active_menu_item), "gimp-help-id");
|
||||
|
||||
if (help_page && ! *help_page)
|
||||
help_page = NULL;
|
||||
if (help_id && ! strlen (help_id))
|
||||
help_id = NULL;
|
||||
}
|
||||
|
||||
/* For any valid accelerator key except F1, continue with the
|
||||
|
@ -903,55 +894,49 @@ gimp_item_factory_item_key_press (GtkWidget *widget,
|
|||
*/
|
||||
if (kevent->keyval != GDK_F1)
|
||||
{
|
||||
if (help_page &&
|
||||
if (help_id &&
|
||||
gtk_accelerator_valid (kevent->keyval, 0) &&
|
||||
(strcmp (help_page, GIMP_HELP_HELP) == 0 ||
|
||||
strcmp (help_page, GIMP_HELP_HELP_CONTEXT) == 0))
|
||||
(strcmp (help_id, GIMP_HELP_HELP) == 0 ||
|
||||
strcmp (help_id, GIMP_HELP_HELP_CONTEXT) == 0))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* ...finally, if F1 was pressed over any menu, show it's help page... */
|
||||
|
||||
factory_help_path = g_object_get_data (G_OBJECT (item_factory), "help_path");
|
||||
if (! help_id)
|
||||
help_id = GIMP_HELP_MAIN;
|
||||
|
||||
if (! help_page)
|
||||
help_page = "index.html";
|
||||
{
|
||||
gchar *help_path = NULL;
|
||||
gchar *help_string = NULL;
|
||||
gchar *path_separator;
|
||||
|
||||
if (factory_help_path && help_page)
|
||||
{
|
||||
gchar *help_string;
|
||||
gchar *at;
|
||||
help_id = g_strdup (help_id);
|
||||
|
||||
help_page = g_strdup (help_page);
|
||||
path_separator = strchr (help_id, ':');
|
||||
|
||||
at = strchr (help_page, '@'); /* HACK: locale subdir */
|
||||
if (path_separator)
|
||||
{
|
||||
*path_separator = '\0';
|
||||
|
||||
if (at)
|
||||
{
|
||||
*at = '\0';
|
||||
help_path = g_strdup (help_page);
|
||||
help_string = g_strdup (at + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
help_string = g_strdup_printf ("%s/%s", factory_help_path, help_page);
|
||||
}
|
||||
help_path = g_strdup (help_id);
|
||||
help_string = g_strdup (path_separator + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
help_string = g_strdup (help_id);
|
||||
}
|
||||
|
||||
gimp_help (item_factory->gimp, help_path, help_string);
|
||||
gimp_help (item_factory->gimp, help_path, help_string);
|
||||
|
||||
g_free (help_string);
|
||||
g_free (help_page);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_standard_help_func (NULL);
|
||||
}
|
||||
g_free (help_path);
|
||||
g_free (help_string);
|
||||
g_free (help_id);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ struct _GimpItemFactoryEntry
|
|||
|
||||
const gchar *quark_string;
|
||||
|
||||
const gchar *help_page;
|
||||
const gchar *help_id;
|
||||
const gchar *description;
|
||||
};
|
||||
|
||||
|
@ -65,7 +65,6 @@ GType gimp_item_factory_get_type (void) G_GNUC_CONST;
|
|||
GimpItemFactory * gimp_item_factory_new (Gimp *gimp,
|
||||
GType container_type,
|
||||
const gchar *factory_path,
|
||||
const gchar *help_path,
|
||||
GimpItemFactoryUpdateFunc update_func,
|
||||
gboolean update_on_popup,
|
||||
guint n_entries,
|
||||
|
|
|
@ -106,7 +106,6 @@ gimp_menu_factory_finalize (GObject *object)
|
|||
entry = (GimpMenuFactoryEntry *) list->data;
|
||||
|
||||
g_free (entry->identifier);
|
||||
g_free (entry->help_path);
|
||||
g_free (entry);
|
||||
}
|
||||
|
||||
|
@ -133,7 +132,6 @@ gimp_menu_factory_new (Gimp *gimp)
|
|||
void
|
||||
gimp_menu_factory_menu_register (GimpMenuFactory *factory,
|
||||
const gchar *identifier,
|
||||
const gchar *help_path,
|
||||
GimpItemFactorySetupFunc setup_func,
|
||||
GimpItemFactoryUpdateFunc update_func,
|
||||
gboolean update_on_popup,
|
||||
|
@ -144,14 +142,12 @@ gimp_menu_factory_menu_register (GimpMenuFactory *factory,
|
|||
|
||||
g_return_if_fail (GIMP_IS_MENU_FACTORY (factory));
|
||||
g_return_if_fail (identifier != NULL);
|
||||
g_return_if_fail (help_path != NULL);
|
||||
g_return_if_fail (n_entries > 0);
|
||||
g_return_if_fail (entries != NULL);
|
||||
|
||||
entry = g_new0 (GimpMenuFactoryEntry, 1);
|
||||
|
||||
entry->identifier = g_strdup (identifier);
|
||||
entry->help_path = g_strdup (help_path);
|
||||
entry->setup_func = setup_func;
|
||||
entry->update_func = update_func;
|
||||
entry->update_on_popup = update_on_popup ? TRUE : FALSE;
|
||||
|
@ -184,7 +180,6 @@ gimp_menu_factory_menu_new (GimpMenuFactory *factory,
|
|||
item_factory = gimp_item_factory_new (factory->gimp,
|
||||
container_type,
|
||||
entry->identifier,
|
||||
entry->help_path,
|
||||
entry->update_func,
|
||||
entry->update_on_popup,
|
||||
entry->n_entries,
|
||||
|
|
|
@ -31,7 +31,6 @@ typedef struct _GimpMenuFactoryEntry GimpMenuFactoryEntry;
|
|||
struct _GimpMenuFactoryEntry
|
||||
{
|
||||
gchar *identifier;
|
||||
gchar *help_path;
|
||||
GimpItemFactorySetupFunc setup_func;
|
||||
GimpItemFactoryUpdateFunc update_func;
|
||||
gboolean update_on_popup;
|
||||
|
@ -70,7 +69,6 @@ GimpMenuFactory * gimp_menu_factory_new (Gimp *gimp);
|
|||
|
||||
void gimp_menu_factory_menu_register (GimpMenuFactory *factory,
|
||||
const gchar *identifier,
|
||||
const gchar *help_path,
|
||||
GimpItemFactorySetupFunc setup_func,
|
||||
GimpItemFactoryUpdateFunc update_func,
|
||||
gboolean update_on_popup,
|
||||
|
|
|
@ -172,8 +172,8 @@ gimp_text_editor_new (const gchar *title,
|
|||
NULL);
|
||||
|
||||
gtk_window_set_wmclass (GTK_WINDOW (editor), "text_editor", "Gimp");
|
||||
gimp_help_connect (GTK_WIDGET (editor),
|
||||
gimp_standard_help_func, "dialogs/text_editor.html");
|
||||
gimp_help_connect (GTK_WIDGET (editor), gimp_standard_help_func,
|
||||
"dialogs/text_editor.html", NULL);
|
||||
|
||||
gimp_dialog_create_action_area (GIMP_DIALOG (editor),
|
||||
GTK_STOCK_CLOSE, gtk_widget_destroy,
|
||||
|
|
|
@ -190,7 +190,7 @@ gimp_toolbox_init (GimpToolbox *toolbox)
|
|||
GTK_ITEM_FACTORY (toolbox_factory)->accel_group);
|
||||
|
||||
gimp_help_connect (GTK_WIDGET (toolbox), gimp_standard_help_func,
|
||||
GIMP_HELP_TOOLBOX);
|
||||
GIMP_HELP_TOOLBOX, NULL);
|
||||
|
||||
toolbox->wbox = gtk_hwrap_box_new (FALSE);
|
||||
gtk_wrap_box_set_justify (GTK_WRAP_BOX (toolbox->wbox), GTK_JUSTIFY_TOP);
|
||||
|
@ -595,9 +595,7 @@ gimp_toolbox_button_accel_changed (GtkAccelGroup *accel_group,
|
|||
tooltip = g_strdup (tool_info->help);
|
||||
}
|
||||
|
||||
gimp_help_set_help_data (tool_button,
|
||||
tooltip,
|
||||
tool_info->help_data);
|
||||
gimp_help_set_help_data (tool_button, tooltip, tool_info->help_id);
|
||||
|
||||
g_free (tooltip);
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ gimp_viewable_dialog_new (GimpViewable *viewable,
|
|||
const gchar *stock_id,
|
||||
const gchar *desc,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
|
||||
/* specify action area buttons
|
||||
* as va_list:
|
||||
|
@ -189,16 +189,15 @@ gimp_viewable_dialog_new (GimpViewable *viewable,
|
|||
gtk_window_set_wmclass (GTK_WINDOW (dialog), wmclass_name, "Gimp");
|
||||
|
||||
if (help_func)
|
||||
gimp_help_connect (GTK_WIDGET (dialog), help_func, help_data);
|
||||
gimp_help_connect (GTK_WIDGET (dialog), help_func, help_id, dialog);
|
||||
|
||||
va_start (args, help_data);
|
||||
va_start (args, help_id);
|
||||
gimp_dialog_create_action_areav (GIMP_DIALOG (dialog), args);
|
||||
va_end (args);
|
||||
|
||||
gtk_image_set_from_stock (GTK_IMAGE (dialog->icon), stock_id,
|
||||
GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
|
||||
|
||||
attrs = pango_attr_list_new ();
|
||||
|
||||
attr = pango_attr_scale_new (PANGO_SCALE_LARGE);
|
||||
|
|
|
@ -61,7 +61,7 @@ GtkWidget * gimp_viewable_dialog_new (GimpViewable *viewable,
|
|||
const gchar *stock_id,
|
||||
const gchar *desc,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
|
||||
/* specify action area buttons
|
||||
* as va_list:
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_ui_help_func (const gchar *help_data);
|
||||
static void gimp_ui_help_func (const gchar *help_id,
|
||||
gpointer help_data);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
@ -115,7 +116,8 @@ gimp_ui_init (const gchar *prog_name,
|
|||
/* private functions */
|
||||
|
||||
static void
|
||||
gimp_ui_help_func (const gchar *help_data)
|
||||
gimp_ui_help_func (const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
gimp_help (gimp_get_progname (), (gchar *) help_data);
|
||||
gimp_help (gimp_get_progname (), help_id);
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ gimp_dialog_close (GtkDialog *dialog)
|
|||
* gtk_window_set_wmclass(). The @wmclass_class will be
|
||||
* automatically set to "Gimp".
|
||||
* @help_func: The function which will be called if the user presses "F1".
|
||||
* @help_data: The data pointer which will be passed to @help_func.
|
||||
* @help_id: The help_id which will be passed to @help_func.
|
||||
* @position: The dialog's initial position which will be set with
|
||||
* gtk_window_set_position().
|
||||
* @allow_shrink: The dialog's @allow_shrink flag, ...
|
||||
|
@ -158,7 +158,7 @@ GtkWidget *
|
|||
gimp_dialog_new (const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GtkWindowPosition position,
|
||||
gint allow_shrink,
|
||||
gint allow_grow,
|
||||
|
@ -184,7 +184,7 @@ gimp_dialog_new (const gchar *title,
|
|||
dialog = gimp_dialog_newv (title,
|
||||
wmclass_name,
|
||||
help_func,
|
||||
help_data,
|
||||
help_id,
|
||||
position,
|
||||
allow_shrink,
|
||||
allow_grow,
|
||||
|
@ -204,7 +204,7 @@ gimp_dialog_new (const gchar *title,
|
|||
* gtk_window_set_wmclass(). The @wmclass_class will be
|
||||
* automatically set to "Gimp".
|
||||
* @help_func: The function which will be called if the user presses "F1".
|
||||
* @help_data: The data pointer which will be passed to @help_func.
|
||||
* @help_id: The help_id which will be passed to @help_func.
|
||||
* @position: The dialog's initial position which will be set with
|
||||
* gtk_window_set_position().
|
||||
* @allow_shrink: The dialog's @allow_shrink flag, ...
|
||||
|
@ -226,7 +226,7 @@ GtkWidget *
|
|||
gimp_dialog_newv (const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GtkWindowPosition position,
|
||||
gint allow_shrink,
|
||||
gint allow_grow,
|
||||
|
@ -256,7 +256,7 @@ gimp_dialog_newv (const gchar *title,
|
|||
|
||||
/* connect the "F1" help key */
|
||||
if (help_func)
|
||||
gimp_help_connect (dialog, help_func, help_data);
|
||||
gimp_help_connect (dialog, help_func, help_id, dialog);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ GType gimp_dialog_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_dialog_new (const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GtkWindowPosition position,
|
||||
gint allow_shrink,
|
||||
gint allow_grow,
|
||||
|
@ -78,7 +78,7 @@ GtkWidget * gimp_dialog_new (const gchar *title,
|
|||
GtkWidget * gimp_dialog_newv (const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *help_id,
|
||||
GtkWindowPosition position,
|
||||
gint allow_shrink,
|
||||
gint allow_grow,
|
||||
|
|
|
@ -22,9 +22,8 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning GTK_DISABLE_DEPRECATED
|
||||
|
@ -51,7 +50,8 @@ typedef enum
|
|||
/* local function prototypes */
|
||||
|
||||
static const gchar * gimp_help_get_help_data (GtkWidget *widget,
|
||||
GtkWidget **help_widget);
|
||||
GtkWidget **help_widget,
|
||||
gpointer *ret_data);
|
||||
static gboolean gimp_help_callback (GtkWidget *widget,
|
||||
GtkWidgetHelpType help_type,
|
||||
GimpHelpFunc help_func);
|
||||
|
@ -122,7 +122,8 @@ gimp_help_disable_tooltips (void)
|
|||
}
|
||||
|
||||
void
|
||||
gimp_standard_help_func (const gchar *help_data)
|
||||
gimp_standard_help_func (const gchar *help_id,
|
||||
gpointer data)
|
||||
{
|
||||
if (! _gimp_standard_help_func)
|
||||
{
|
||||
|
@ -131,7 +132,7 @@ gimp_standard_help_func (const gchar *help_data)
|
|||
return;
|
||||
}
|
||||
|
||||
(* _gimp_standard_help_func) (help_data);
|
||||
(* _gimp_standard_help_func) (help_id, data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -139,7 +140,8 @@ gimp_standard_help_func (const gchar *help_data)
|
|||
* @widget: The widget you want to connect the help accelerator for. Will
|
||||
* be a #GtkWindow in most cases.
|
||||
* @help_func: The function which will be called if the user presses "F1".
|
||||
* @help_data: The data pointer which will be passed to @help_func.
|
||||
* @help_id: The help_id which will be passed to @help_func.
|
||||
* @help_data: The help_data pointer which will be passed to @help_func.
|
||||
*
|
||||
* Note that this function is automatically called by all libgimp dialog
|
||||
* constructors. You only have to call it for windows/dialogs you created
|
||||
|
@ -148,7 +150,8 @@ gimp_standard_help_func (const gchar *help_data)
|
|||
void
|
||||
gimp_help_connect (GtkWidget *widget,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id,
|
||||
gpointer help_data)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (help_func != NULL);
|
||||
|
@ -189,7 +192,9 @@ gimp_help_connect (GtkWidget *widget,
|
|||
gtk_widget_realize (tips_query);
|
||||
}
|
||||
|
||||
gimp_help_set_help_data (widget, NULL, help_data);
|
||||
gimp_help_set_help_data (widget, NULL, help_id);
|
||||
|
||||
g_object_set_data (G_OBJECT (widget), "gimp-help-data", help_data);
|
||||
|
||||
g_signal_connect (widget, "show_help",
|
||||
G_CALLBACK (gimp_help_callback),
|
||||
|
@ -200,45 +205,29 @@ gimp_help_connect (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_help_set_help_data:
|
||||
* @widget: The #GtkWidget you want to set a @tooltip and/or @help_data for.
|
||||
* @widget: The #GtkWidget you want to set a @tooltip and/or @help_data for.
|
||||
* @tooltip: The text for this widget's tooltip (or %NULL).
|
||||
* @help_data: The @help_data for the #GtkTipsQuery tooltips inspector.
|
||||
* @help_id: The @help_id for the #GtkTipsQuery tooltips inspector.
|
||||
*
|
||||
* The reason why we don't use gtk_tooltips_set_tip() is that it's
|
||||
* impossible to set a @private_tip (aka @help_data) without a visible
|
||||
* impossible to set a @private_tip (aka @help_id) without a visible
|
||||
* @tooltip.
|
||||
*
|
||||
* This function can be called with %NULL for @tooltip. Use this feature
|
||||
* if you want to set a HTML help link for a widget which shouldn't have
|
||||
* if you want to set a help link for a widget which shouldn't have
|
||||
* a visible tooltip.
|
||||
*
|
||||
* You can e.g. set a @help_data string to a complete HTML page for a
|
||||
* container widget (e.g. a #GtkBox). For the widgets inside the box
|
||||
* you can set HTML anchors which point inside the container widget's
|
||||
* help page by setting @help_data strings starting with "#".
|
||||
*
|
||||
* If the tooltips inspector (Shift + "F1") is invoked and the user
|
||||
* clicks on one of the widgets which only contain a "#" link, the
|
||||
* help system will automatically ascend the widget hierarchy until it
|
||||
* finds another widget with @help_data attached and concatenates both
|
||||
* to a complete help path.
|
||||
**/
|
||||
void
|
||||
gimp_help_set_help_data (GtkWidget *widget,
|
||||
const gchar *tooltip,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (tooltip)
|
||||
{
|
||||
gtk_tooltips_set_tip (tool_tips, widget, tooltip, help_data);
|
||||
}
|
||||
else if (help_data)
|
||||
{
|
||||
g_object_set_data (G_OBJECT (widget), "gimp_help_data",
|
||||
(gpointer) help_data);
|
||||
}
|
||||
gtk_tooltips_set_tip (tool_tips, widget, tooltip, help_id);
|
||||
else
|
||||
g_object_set_data (G_OBJECT (widget), "gimp-help-id", (gpointer) help_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -249,10 +238,10 @@ gimp_help_set_help_data (GtkWidget *widget,
|
|||
* The mouse cursor will turn turn into a question mark and the user can
|
||||
* click on any widget of the application which started the inspector.
|
||||
*
|
||||
* If the widget the user clicked on has a @help_data string attached
|
||||
* (see gimp_help_set_help_data()), the corresponding HTML page will
|
||||
* If the widget the user clicked on has a @help_id string attached
|
||||
* (see gimp_help_set_help_data()), the corresponding help page will
|
||||
* be displayed. Otherwise the help system will ascend the widget hierarchy
|
||||
* until it finds an attached @help_data string (which should be the
|
||||
* until it finds an attached @help_id string (which should be the
|
||||
* case at least for every window/dialog).
|
||||
**/
|
||||
void
|
||||
|
@ -267,29 +256,36 @@ gimp_context_help (void)
|
|||
|
||||
static const gchar *
|
||||
gimp_help_get_help_data (GtkWidget *widget,
|
||||
GtkWidget **help_widget)
|
||||
GtkWidget **help_widget,
|
||||
gpointer *ret_data)
|
||||
{
|
||||
GtkTooltipsData *tooltips_data;
|
||||
gchar *help_data = NULL;
|
||||
gchar *help_id = NULL;
|
||||
gpointer help_data = NULL;
|
||||
|
||||
for (; widget; widget = widget->parent)
|
||||
{
|
||||
if ((tooltips_data = gtk_tooltips_data_get (widget)) &&
|
||||
tooltips_data->tip_private)
|
||||
{
|
||||
help_data = tooltips_data->tip_private;
|
||||
help_id = tooltips_data->tip_private;
|
||||
}
|
||||
else
|
||||
{
|
||||
help_data = g_object_get_data (G_OBJECT (widget), "gimp_help_data");
|
||||
help_id = g_object_get_data (G_OBJECT (widget), "gimp-help-id");
|
||||
}
|
||||
|
||||
if (help_data)
|
||||
help_data = g_object_get_data (G_OBJECT (widget), "gimp-help-data");
|
||||
|
||||
if (help_id)
|
||||
{
|
||||
if (help_widget)
|
||||
*help_widget = widget;
|
||||
|
||||
return (const gchar *) help_data;
|
||||
if (ret_data)
|
||||
*ret_data = help_data;
|
||||
|
||||
return (const gchar *) help_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,11 +302,23 @@ gimp_help_callback (GtkWidget *widget,
|
|||
case GIMP_WIDGET_HELP_TYPE_HELP:
|
||||
if (help_func)
|
||||
{
|
||||
gchar *help_data;
|
||||
GtkTooltipsData *tooltips_data;
|
||||
gchar *help_id = NULL;
|
||||
gpointer help_data = NULL;
|
||||
|
||||
help_data = g_object_get_data (G_OBJECT (widget), "gimp_help_data");
|
||||
if ((tooltips_data = gtk_tooltips_data_get (widget)) &&
|
||||
tooltips_data->tip_private)
|
||||
{
|
||||
help_id = tooltips_data->tip_private;
|
||||
}
|
||||
else
|
||||
{
|
||||
help_id = g_object_get_data (G_OBJECT (widget), "gimp-help-id");
|
||||
}
|
||||
|
||||
(* help_func) (help_data);
|
||||
help_data = g_object_get_data (G_OBJECT (widget), "gimp-help-data");
|
||||
|
||||
(* help_func) (help_id, help_data);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
|
@ -337,33 +345,14 @@ static gboolean
|
|||
gimp_help_tips_query_idle_show_help (gpointer data)
|
||||
{
|
||||
GtkWidget *help_widget;
|
||||
const gchar *help_data = NULL;
|
||||
const gchar *help_id = NULL;
|
||||
gpointer help_data = NULL;
|
||||
|
||||
help_data = gimp_help_get_help_data (GTK_WIDGET (data), &help_widget);
|
||||
help_id = gimp_help_get_help_data (GTK_WIDGET (data), &help_widget,
|
||||
&help_data);
|
||||
|
||||
if (help_data)
|
||||
{
|
||||
if (help_data[0] == '#')
|
||||
{
|
||||
const gchar *help_index;
|
||||
|
||||
help_index = help_data;
|
||||
help_data = gimp_help_get_help_data (help_widget->parent, NULL);
|
||||
|
||||
if (help_data)
|
||||
{
|
||||
gchar *help_text;
|
||||
|
||||
help_text = g_strconcat (help_data, help_index, NULL);
|
||||
gimp_standard_help_func (help_text);
|
||||
g_free (help_text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_standard_help_func (help_data);
|
||||
}
|
||||
}
|
||||
if (help_id)
|
||||
gimp_standard_help_func (help_id, help_data);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -35,17 +35,19 @@ void gimp_help_disable_tooltips (void);
|
|||
|
||||
/* the standard gimp help function
|
||||
*/
|
||||
void gimp_standard_help_func (const gchar *help_data);
|
||||
void gimp_standard_help_func (const gchar *help_id,
|
||||
gpointer help_data);
|
||||
|
||||
/* connect the help callback of a window */
|
||||
void gimp_help_connect (GtkWidget *widget,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data);
|
||||
const gchar *help_id,
|
||||
gpointer help_data);
|
||||
|
||||
/* set help data for non-window widgets */
|
||||
void gimp_help_set_help_data (GtkWidget *widget,
|
||||
const gchar *tooltip,
|
||||
const gchar *help_data);
|
||||
const gchar *help_id);
|
||||
|
||||
/* activate the context help inspector */
|
||||
void gimp_context_help (void);
|
||||
|
|
|
@ -658,7 +658,7 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
|||
gdouble unconstrained_lower,
|
||||
gdouble unconstrained_upper,
|
||||
const gchar *tooltip,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id)
|
||||
{
|
||||
GtkWidget *label;
|
||||
GtkWidget *scale;
|
||||
|
@ -749,10 +749,10 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
|||
GTK_SHRINK, GTK_SHRINK, 0, 0);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
if (tooltip || help_data)
|
||||
if (tooltip || help_id)
|
||||
{
|
||||
gimp_help_set_help_data (scale, tooltip, help_data);
|
||||
gimp_help_set_help_data (spinbutton, tooltip, help_data);
|
||||
gimp_help_set_help_data (scale, tooltip, help_id);
|
||||
gimp_help_set_help_data (spinbutton, tooltip, help_id);
|
||||
}
|
||||
|
||||
g_object_set_data (G_OBJECT (return_adj), "label", label);
|
||||
|
@ -784,7 +784,7 @@ gimp_scale_entry_new_internal (gboolean color_scale,
|
|||
* @unconstrained_upper: The spinbutton's upper boundary
|
||||
* if @constrain == %FALSE.
|
||||
* @tooltip: A tooltip message for the scale and the spinbutton.
|
||||
* @help_data: The widgets' help_data (see gimp_help_set_help_data()).
|
||||
* @help_id: The widgets' help_id (see gimp_help_set_help_data()).
|
||||
*
|
||||
* This function creates a #GtkLabel, a #GtkHScale and a #GtkSpinButton and
|
||||
* attaches them to a 3-column #GtkTable.
|
||||
|
@ -808,7 +808,7 @@ gimp_scale_entry_new (GtkTable *table,
|
|||
gdouble unconstrained_lower,
|
||||
gdouble unconstrained_upper,
|
||||
const gchar *tooltip,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id)
|
||||
{
|
||||
return gimp_scale_entry_new_internal (FALSE,
|
||||
table, column, row,
|
||||
|
@ -819,7 +819,7 @@ gimp_scale_entry_new (GtkTable *table,
|
|||
constrain,
|
||||
unconstrained_lower,
|
||||
unconstrained_upper,
|
||||
tooltip, help_data);
|
||||
tooltip, help_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -838,7 +838,7 @@ gimp_scale_entry_new (GtkTable *table,
|
|||
* @page_increment: The page increment.
|
||||
* @digits: The number of decimal digits.
|
||||
* @tooltip: A tooltip message for the scale and the spinbutton.
|
||||
* @help_data: The widgets' help_data (see gimp_help_set_help_data()).
|
||||
* @help_id: The widgets' help_id (see gimp_help_set_help_data()).
|
||||
*
|
||||
* This function creates a #GtkLabel, a #GimpColorScale and a
|
||||
* #GtkSpinButton and attaches them to a 3-column #GtkTable.
|
||||
|
@ -859,7 +859,7 @@ gimp_color_scale_entry_new (GtkTable *table,
|
|||
gdouble page_increment,
|
||||
guint digits,
|
||||
const gchar *tooltip,
|
||||
const gchar *help_data)
|
||||
const gchar *help_id)
|
||||
{
|
||||
return gimp_scale_entry_new_internal (TRUE,
|
||||
table, column, row,
|
||||
|
@ -868,7 +868,7 @@ gimp_color_scale_entry_new (GtkTable *table,
|
|||
step_increment, page_increment,
|
||||
digits,
|
||||
TRUE, 0.0, 0.0,
|
||||
tooltip, help_data);
|
||||
tooltip, help_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -168,7 +168,7 @@ GtkObject * gimp_scale_entry_new (GtkTable *table,
|
|||
gdouble unconstrained_lower,
|
||||
gdouble unconstrained_upper,
|
||||
const gchar *tooltip,
|
||||
const gchar *help_data);
|
||||
const gchar *help_id);
|
||||
|
||||
GtkObject * gimp_color_scale_entry_new (GtkTable *table,
|
||||
gint column,
|
||||
|
@ -183,7 +183,7 @@ GtkObject * gimp_color_scale_entry_new (GtkTable *table,
|
|||
gdouble page_increment,
|
||||
guint digits,
|
||||
const gchar *tooltip,
|
||||
const gchar *help_data);
|
||||
const gchar *help_id);
|
||||
|
||||
void gimp_scale_entry_set_sensitive (GtkObject *adjustment,
|
||||
gboolean sensitive);
|
||||
|
|
|
@ -76,7 +76,8 @@ typedef struct _GimpSizeEntry GimpSizeEntry;
|
|||
typedef struct _GimpUnitMenu GimpUnitMenu;
|
||||
|
||||
|
||||
typedef void (* GimpHelpFunc) (const gchar *help_data);
|
||||
typedef void (* GimpHelpFunc) (const gchar *help_id,
|
||||
gpointer data);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -618,7 +618,7 @@ palette_dialog (const gchar *title)
|
|||
NULL);
|
||||
|
||||
gimp_help_connect (dialog, gimp_standard_help_func,
|
||||
"filters/cel.html");
|
||||
"filters/cel.html", NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
|
|
|
@ -2102,7 +2102,7 @@ CML_save_to_file_callback (GtkWidget *widget,
|
|||
filesel);
|
||||
|
||||
gimp_help_connect (filesel, gimp_standard_help_func,
|
||||
"filters/cml_explorer.html");
|
||||
"filters/cml_explorer.html", NULL);
|
||||
}
|
||||
|
||||
if (strlen (VALS.last_file_name) > 0)
|
||||
|
@ -2310,7 +2310,7 @@ CML_load_from_file_callback (GtkWidget *widget,
|
|||
filesel);
|
||||
|
||||
gimp_help_connect (filesel, gimp_standard_help_func,
|
||||
"filters/cml_explorer.html");
|
||||
"filters/cml_explorer.html", NULL);
|
||||
}
|
||||
|
||||
if ((selective_load_source == 0) || (selective_load_destination == 0))
|
||||
|
|
|
@ -166,7 +166,6 @@ build_dialog (void)
|
|||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *hbox2;
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
gimp_ui_init ("gee", TRUE);
|
||||
|
||||
|
@ -178,7 +177,8 @@ build_dialog (void)
|
|||
G_CALLBACK (window_delete_callback),
|
||||
NULL);
|
||||
|
||||
gimp_help_connect (dlg, gimp_standard_help_func, "filters/geeslime.html");
|
||||
gimp_help_connect (dlg, gimp_standard_help_func,
|
||||
"filters/geeslime.html", NULL);
|
||||
|
||||
/* Action area - 'close' button only. */
|
||||
|
||||
|
@ -193,11 +193,10 @@ build_dialog (void)
|
|||
G_CALLBACK (window_close_callback),
|
||||
dlg);
|
||||
|
||||
tooltips = gtk_tooltips_new ();
|
||||
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), button,
|
||||
_("A less-obsolete creation of Adam D. Moss / adam@gimp.org / adam@foxbox.org / 1998-2000"),
|
||||
NULL);
|
||||
gtk_tooltips_enable (tooltips);
|
||||
gimp_help_set_help_data (button,
|
||||
_("A less-obsolete creation of Adam D. Moss / "
|
||||
"adam@gimp.org / adam@foxbox.org / 1998-2000"),
|
||||
NULL);
|
||||
|
||||
/* The 'fun' half of the dialog */
|
||||
|
||||
|
|
|
@ -196,7 +196,6 @@ build_dialog (void)
|
|||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *hbox2;
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
gimp_ui_init ("gee_zoom", TRUE);
|
||||
|
||||
|
@ -209,7 +208,8 @@ build_dialog (void)
|
|||
G_CALLBACK (window_delete_callback),
|
||||
NULL);
|
||||
|
||||
gimp_help_connect (dlg, gimp_standard_help_func, "filters/gee.html");
|
||||
gimp_help_connect (dlg, gimp_standard_help_func,
|
||||
"filters/gee.html", NULL);
|
||||
|
||||
/* Action area - 'close' button only. */
|
||||
|
||||
|
@ -224,11 +224,10 @@ build_dialog (void)
|
|||
G_CALLBACK (window_close_callback),
|
||||
dlg);
|
||||
|
||||
tooltips = gtk_tooltips_new ();
|
||||
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), button,
|
||||
_("An obsolete creation of Adam D. Moss / adam@gimp.org / adam@foxbox.org / 1998-2000"),
|
||||
NULL);
|
||||
gtk_tooltips_enable (tooltips);
|
||||
gimp_help_set_help_data (button,
|
||||
_("An obsolete creation of Adam D. Moss / "
|
||||
"adam@gimp.org / adam@foxbox.org / 1998-2000"),
|
||||
NULL);
|
||||
|
||||
/* The 'fun' half of the dialog */
|
||||
|
||||
|
|
|
@ -716,7 +716,8 @@ static void
|
|||
file_selection_save (GtkWidget *widget,
|
||||
GtkWidget *file_select)
|
||||
{
|
||||
strcpy (qbist_info.path, gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_select)));
|
||||
strcpy (qbist_info.path,
|
||||
gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_select)));
|
||||
save_data (qbist_info.path);
|
||||
|
||||
gtk_widget_destroy (file_select);
|
||||
|
@ -743,7 +744,7 @@ dialog_load (GtkWidget *widget,
|
|||
file_select = gtk_file_selection_new (_("Load QBE file..."));
|
||||
|
||||
gimp_help_connect (file_select, gimp_standard_help_func,
|
||||
"filters/gqbist.html");
|
||||
"filters/gqbist.html", NULL);
|
||||
|
||||
gtk_file_selection_set_filename (GTK_FILE_SELECTION (file_select),
|
||||
qbist_info.path);
|
||||
|
@ -770,7 +771,7 @@ dialog_save (GtkWidget *widget,
|
|||
gtk_file_selection_new (_("Save (middle transform) as QBE file..."));
|
||||
|
||||
gimp_help_connect (file_select, gimp_standard_help_func,
|
||||
"filters/gqbist.html");
|
||||
"filters/gqbist.html", NULL);
|
||||
|
||||
gtk_file_selection_set_filename (GTK_FILE_SELECTION (file_select),
|
||||
qbist_info.path);
|
||||
|
|
|
@ -2172,7 +2172,7 @@ fileselect (gint action)
|
|||
windows[action]);
|
||||
|
||||
gimp_help_connect (windows[action], gimp_standard_help_func,
|
||||
"filters/spheredesigner.html");
|
||||
"filters/spheredesigner.html", NULL);
|
||||
}
|
||||
gtk_widget_show (windows[action]);
|
||||
}
|
||||
|
|
|
@ -487,7 +487,8 @@ make_file_dlg (void)
|
|||
G_CALLBACK (file_cancel_callback),
|
||||
file_dlg);
|
||||
|
||||
gimp_help_connect (file_dlg, gimp_standard_help_func, "filters/flame.html");
|
||||
gimp_help_connect (file_dlg, gimp_standard_help_func,
|
||||
"filters/flame.html", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -199,7 +199,8 @@ fp_create_circle_palette (void)
|
|||
|
||||
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
gimp_help_connect (win, gimp_standard_help_func, "filters/fp.html");
|
||||
gimp_help_connect (win, gimp_standard_help_func,
|
||||
"filters/fp.html", NULL);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (win), _("Hue Variations"));
|
||||
gtk_container_add (GTK_CONTAINER (win), frame);
|
||||
|
@ -347,7 +348,8 @@ fp_create_lnd (void)
|
|||
|
||||
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
gimp_help_connect (win, gimp_standard_help_func, "filters/fp.html");
|
||||
gimp_help_connect (win, gimp_standard_help_func,
|
||||
"filters/fp.html", NULL);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (win), _("Value Variations"));
|
||||
gtk_container_add (GTK_CONTAINER (win), frame);
|
||||
|
@ -396,7 +398,8 @@ fp_create_msnls (void)
|
|||
|
||||
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
gimp_help_connect (win, gimp_standard_help_func, "filters/fp.html");
|
||||
gimp_help_connect (win, gimp_standard_help_func,
|
||||
"filters/fp.html", NULL);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (win), _("Saturation Variations"));
|
||||
gtk_container_add (GTK_CONTAINER (win), frame);
|
||||
|
@ -1046,7 +1049,7 @@ fp_advanced_dialog (void)
|
|||
AW.window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
gimp_help_connect (AW.window, gimp_standard_help_func,
|
||||
"filters/fp.html");
|
||||
"filters/fp.html", NULL);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (AW.window),
|
||||
_("Advanced Filter Pack Options"));
|
||||
|
|
|
@ -587,13 +587,15 @@ open_browser_dialog (const gchar *help_path,
|
|||
|
||||
/* the dialog window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (close_callback),
|
||||
NULL);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (window), "helpbrowser", "Gimp");
|
||||
gtk_window_set_title (GTK_WINDOW (window), _("GIMP Help Browser"));
|
||||
|
||||
gimp_help_connect (window, gimp_standard_help_func, "dialogs/help.html");
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (close_callback),
|
||||
NULL);
|
||||
|
||||
gimp_help_connect (window, gimp_standard_help_func,
|
||||
"dialogs/help.html", NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
|
|
@ -2738,7 +2738,7 @@ ifs_compose_save_callback (GtkWidget *widget,
|
|||
file_select = gtk_file_selection_new (_("Save as IFS file"));
|
||||
|
||||
gimp_help_connect (file_select, gimp_standard_help_func,
|
||||
"filters/ifscompose.html");
|
||||
"filters/ifscompose.html", NULL);
|
||||
|
||||
g_signal_connect (GTK_FILE_SELECTION (file_select)->ok_button, "clicked",
|
||||
G_CALLBACK (ifsfile_save),
|
||||
|
@ -2763,7 +2763,7 @@ ifs_compose_load_callback (GtkWidget *widget,
|
|||
file_select = gtk_file_selection_new (_("Load IFS file"));
|
||||
|
||||
gimp_help_connect (file_select, gimp_standard_help_func,
|
||||
"filters/ifscompose.html");
|
||||
"filters/ifscompose.html", NULL);
|
||||
|
||||
g_signal_connect (GTK_FILE_SELECTION (file_select)->ok_button, "clicked",
|
||||
G_CALLBACK (ifsfile_load),
|
||||
|
|
|
@ -1415,7 +1415,8 @@ dialog(GimpDrawable *drawable)
|
|||
gtk_window_set_resizable(GTK_WINDOW(dlg), TRUE);
|
||||
|
||||
main_set_title(NULL);
|
||||
gimp_help_connect (dlg, gimp_standard_help_func, "filters/imagemap.html");
|
||||
gimp_help_connect (dlg, gimp_standard_help_func,
|
||||
"filters/imagemap.html", NULL);
|
||||
|
||||
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE);
|
||||
g_signal_connect(dlg, "delete_event",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue