app/Makefile.am removed...
2002-05-05 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gimphelp.[ch]: removed... * app/widgets/Makefile.am * app/widgets/gimphelp.[ch]: ...and added here. * app/widgets/widgets-enums.[ch]: added GimpHelpBrowserType here as registered enum. Added an evil hack with GimpCursorType so app/config/gimpguiconfig.h can include this file. * app/widgets/gimpcursor.c: added an assertion because of the changed GimpCursorType. * app/config/gimpguiconfig.[ch]: added a property for the help browser type. * app/gimprc.c * app/libgimp_glue.c * app/gui/preferences-dialog.c * tools/pdbgen/pdb/help.pdb * app/pdb/help_cmds.c: regenerated. Some nav_window cleanup before chopping: * app/nav_window.[ch]: removed the old preview code and use GimpNavigationPreviews only. Namespaceified all functions. Speak in terms of GimpDisplayShell, not GimpDisplay. Lots of internal cleanup. * app/gui/gui-types.h: removed NadiagtionDialog here... * app/display/display-types.h: ...and added it here. * app/display/gimpdisplayshell-callbacks.[ch]: added a callback for the navigation button and call nav_window_show_popup() from there. * app/display/gimpdisplayshell.c: free shell->nav_dialog unconditionally, connect to the new callback. * app/display/gimpdisplayshell-scale.c * app/display/gimpdisplayshell-scroll.c * app/gui/view-commands.c: changed accordingly. * app/widgets/gimppreview.c (gimp_preview_set_viewable): the assertion introduced recently was too tight, breaking GimpNavigationPreview. Changed it to do an "is a" check, not exact preview type matching. * app/widgets/gimpimagepreview.c: added quick-hack support for xres != yres. * app/widgets/gimpnavigationpreview.[ch]: made gimp_navigation_preview_grab_pointer() public so the nav_window can call it. Unrelated: * app/display/gimpdisplay.c: removed the gui/ dependency from this file by removing info_window stuff. * app/display/gimpdisplayshell.c (gimp_display_shell_flush): update the info_window here. * app/gui/dialogs-constructors.c (dialogs_indexed_palette_new): call gimp_dockable_set_context() like all other constructors. * app/undo.c * app/paint/gimppaintcore.h: some more include cleanup.
This commit is contained in:

committed by
Michael Natterer

parent
3c11b8e85d
commit
c86ca2da6a
72
ChangeLog
72
ChangeLog
@ -1,3 +1,75 @@
|
||||
2002-05-05 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/Makefile.am
|
||||
* app/gimphelp.[ch]: removed...
|
||||
|
||||
* app/widgets/Makefile.am
|
||||
* app/widgets/gimphelp.[ch]: ...and added here.
|
||||
|
||||
* app/widgets/widgets-enums.[ch]: added GimpHelpBrowserType here
|
||||
as registered enum. Added an evil hack with GimpCursorType so
|
||||
app/config/gimpguiconfig.h can include this file.
|
||||
|
||||
* app/widgets/gimpcursor.c: added an assertion because of the
|
||||
changed GimpCursorType.
|
||||
|
||||
* app/config/gimpguiconfig.[ch]: added a property for the help
|
||||
browser type.
|
||||
|
||||
* app/gimprc.c
|
||||
* app/libgimp_glue.c
|
||||
* app/gui/preferences-dialog.c
|
||||
* tools/pdbgen/pdb/help.pdb
|
||||
|
||||
* app/pdb/help_cmds.c: regenerated.
|
||||
|
||||
Some nav_window cleanup before chopping:
|
||||
|
||||
* app/nav_window.[ch]: removed the old preview code and use
|
||||
GimpNavigationPreviews only. Namespaceified all functions. Speak
|
||||
in terms of GimpDisplayShell, not GimpDisplay. Lots of internal
|
||||
cleanup.
|
||||
|
||||
* app/gui/gui-types.h: removed NadiagtionDialog here...
|
||||
|
||||
* app/display/display-types.h: ...and added it here.
|
||||
|
||||
* app/display/gimpdisplayshell-callbacks.[ch]: added a callback
|
||||
for the navigation button and call nav_window_show_popup() from there.
|
||||
|
||||
* app/display/gimpdisplayshell.c: free shell->nav_dialog
|
||||
unconditionally, connect to the new callback.
|
||||
|
||||
* app/display/gimpdisplayshell-scale.c
|
||||
* app/display/gimpdisplayshell-scroll.c
|
||||
* app/gui/view-commands.c: changed accordingly.
|
||||
|
||||
* app/widgets/gimppreview.c (gimp_preview_set_viewable): the
|
||||
assertion introduced recently was too tight, breaking
|
||||
GimpNavigationPreview. Changed it to do an "is a" check, not exact
|
||||
preview type matching.
|
||||
|
||||
* app/widgets/gimpimagepreview.c: added quick-hack support for
|
||||
xres != yres.
|
||||
|
||||
* app/widgets/gimpnavigationpreview.[ch]: made
|
||||
gimp_navigation_preview_grab_pointer() public so the nav_window
|
||||
can call it.
|
||||
|
||||
Unrelated:
|
||||
|
||||
* app/display/gimpdisplay.c: removed the gui/ dependency from this
|
||||
file by removing info_window stuff.
|
||||
|
||||
* app/display/gimpdisplayshell.c (gimp_display_shell_flush): update
|
||||
the info_window here.
|
||||
|
||||
* app/gui/dialogs-constructors.c (dialogs_indexed_palette_new): call
|
||||
gimp_dockable_set_context() like all other constructors.
|
||||
|
||||
* app/undo.c
|
||||
* app/paint/gimppaintcore.h: some more include cleanup.
|
||||
|
||||
2002-05-05 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* NEWS: updated.
|
||||
|
@ -70,8 +70,6 @@ stuff_sources = \
|
||||
batch.h \
|
||||
errors.c \
|
||||
errors.h \
|
||||
gimphelp.c \
|
||||
gimphelp.h \
|
||||
libgimp_glue.c \
|
||||
libgimp_glue.h
|
||||
|
||||
|
@ -139,13 +139,13 @@ view_navigation_window_cmd_callback (GtkWidget *widget,
|
||||
if (gimprc.nav_window_per_display)
|
||||
{
|
||||
if (! shell->nav_dialog)
|
||||
shell->nav_dialog = nav_dialog_create (gdisp);
|
||||
shell->nav_dialog = nav_dialog_create (shell);
|
||||
|
||||
nav_dialog_popup (shell->nav_dialog);
|
||||
nav_dialog_show (shell->nav_dialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
nav_dialog_follow_auto ();
|
||||
nav_dialog_show_auto (gdisp->gimage->gimp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,8 @@ enum
|
||||
PROP_MAX_NEW_IMAGE_SIZE,
|
||||
PROP_THEME_PATH,
|
||||
PROP_THEME,
|
||||
PROP_USE_HELP
|
||||
PROP_USE_HELP,
|
||||
PROP_HELP_BROWSER
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
@ -168,6 +169,10 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_HELP,
|
||||
"use-help",
|
||||
TRUE);
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_HELP_BROWSER,
|
||||
"help-browser",
|
||||
GIMP_TYPE_HELP_BROWSER_TYPE,
|
||||
GIMP_HELP_BROWSER_GIMP);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -254,6 +259,9 @@ gimp_gui_config_set_property (GObject *object,
|
||||
case PROP_USE_HELP:
|
||||
gui_config->use_help = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_HELP_BROWSER:
|
||||
gui_config->help_browser = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
@ -330,6 +338,9 @@ gimp_gui_config_get_property (GObject *object,
|
||||
case PROP_USE_HELP:
|
||||
g_value_set_boolean (value, gui_config->use_help);
|
||||
break;
|
||||
case PROP_HELP_BROWSER:
|
||||
g_value_set_enum (value, gui_config->help_browser);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -22,6 +22,8 @@
|
||||
#ifndef __GIMP_GUI_CONFIG_H__
|
||||
#define __GIMP_GUI_CONFIG_H__
|
||||
|
||||
#include "widgets/widgets-enums.h"
|
||||
|
||||
#include "config/gimpdisplayconfig.h"
|
||||
|
||||
|
||||
@ -58,7 +60,7 @@ struct _GimpGuiConfig
|
||||
gchar *theme_path;
|
||||
gchar *theme;
|
||||
gboolean use_help;
|
||||
gint help_browser; /* FIXME: not yet a property */
|
||||
GimpHelpBrowserType help_browser;
|
||||
};
|
||||
|
||||
struct _GimpGuiConfigClass
|
||||
|
@ -25,8 +25,7 @@
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "libgimptool/gimptooltypes.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
#include "base/pixel-region.h"
|
||||
#include "base/tile-manager.h"
|
||||
@ -52,8 +51,6 @@
|
||||
#include "paint/gimppaintcore.h"
|
||||
|
||||
#include "tools/gimpbycolorselecttool.h"
|
||||
/*#include "tools/gimptool.h"*/
|
||||
#include "tools/gimpdrawtool.h"
|
||||
#include "tools/gimppainttool.h"
|
||||
#include "tools/gimptransformtool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
@ -24,9 +24,6 @@
|
||||
#include "display-types.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
#warning FIXME #include "gui/gui-types.h"
|
||||
#include "gui/gui-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
@ -37,8 +34,6 @@
|
||||
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "gui/info-window.h"
|
||||
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplay-area.h"
|
||||
#include "gimpdisplay-handlers.h"
|
||||
@ -566,9 +561,6 @@ gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||
/* Next the displays... */
|
||||
gimp_display_shell_flush (GIMP_DISPLAY_SHELL (gdisp->shell));
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
info_window_update (gdisp);
|
||||
|
||||
/* ensure the consistency of the tear-off menus */
|
||||
if (! now && gimp_context_get_display (gimp_get_user_context
|
||||
(gdisp->gimage->gimp)) == gdisp)
|
||||
|
@ -784,7 +784,7 @@ dialogs_indexed_palette_new (GimpDialogFactory *factory,
|
||||
NULL,
|
||||
dialogs_set_indexed_palette_context_func);
|
||||
|
||||
dialogs_set_indexed_palette_context_func (GIMP_DOCKABLE (dockable), context);
|
||||
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
||||
|
||||
g_signal_connect (G_OBJECT (view), "selected",
|
||||
G_CALLBACK (dialogs_indexed_palette_selected),
|
||||
|
@ -56,7 +56,6 @@
|
||||
#include "resolution-calibrate-dialog.h"
|
||||
#include "session.h"
|
||||
|
||||
#include "gimphelp.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
@ -127,8 +126,8 @@ static gint old_marching_speed;
|
||||
static gboolean old_resize_windows_on_zoom;
|
||||
static gboolean old_resize_windows_on_resize;
|
||||
static gboolean old_auto_save;
|
||||
static gint old_preview_size;
|
||||
static gint old_nav_preview_size;
|
||||
static GimpPreviewSize old_preview_size;
|
||||
static GimpPreviewSize old_nav_preview_size;
|
||||
static gboolean old_no_cursor_updating;
|
||||
static gboolean old_show_tool_tips;
|
||||
static gboolean old_show_rulers;
|
||||
@ -942,6 +941,7 @@ prefs_cancel_callback (GtkWidget *widget,
|
||||
/* restore variables which need some magic */
|
||||
if (gimprc.preview_size != old_preview_size)
|
||||
{
|
||||
gimprc.preview_size = old_preview_size;
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: update preview size
|
||||
#endif
|
||||
@ -1089,12 +1089,13 @@ static void
|
||||
prefs_preview_size_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_menu_item_update (widget, data);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: update preview size
|
||||
#endif
|
||||
#if 0
|
||||
lc_dialog_rebuild ((long) g_object_get_data (G_OBJECT (widget),
|
||||
"gimp-item-data"));
|
||||
lc_dialog_rebuild (gimprc.preview_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1102,8 +1103,7 @@ static void
|
||||
prefs_nav_preview_size_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gimprc.nav_preview_size =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "gimp-item-data"));
|
||||
gimp_menu_item_update (widget, data);
|
||||
|
||||
gdisplays_nav_preview_resized ();
|
||||
}
|
||||
@ -2074,9 +2074,14 @@ preferences_dialog_create (Gimp *gimp)
|
||||
&gimprc.nav_preview_size,
|
||||
GINT_TO_POINTER (gimprc.nav_preview_size),
|
||||
|
||||
_("Small"), GINT_TO_POINTER (48), NULL,
|
||||
_("Medium"), GINT_TO_POINTER (80), NULL,
|
||||
_("Large"), GINT_TO_POINTER (112), NULL,
|
||||
_("Small"),
|
||||
GINT_TO_POINTER (GIMP_PREVIEW_SIZE_MEDIUM), NULL,
|
||||
|
||||
_("Medium"),
|
||||
GINT_TO_POINTER (GIMP_PREVIEW_SIZE_EXTRA_LARGE), NULL,
|
||||
|
||||
_("Large"),
|
||||
GINT_TO_POINTER (GIMP_PREVIEW_SIZE_HUGE), NULL,
|
||||
|
||||
NULL);
|
||||
|
||||
@ -2156,17 +2161,11 @@ preferences_dialog_create (Gimp *gimp)
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
optionmenu = gimp_option_menu_new2
|
||||
(FALSE,
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
&gimprc.help_browser,
|
||||
GINT_TO_POINTER (gimprc.help_browser),
|
||||
|
||||
_("Internal"), GINT_TO_POINTER (HELP_BROWSER_GIMP), NULL,
|
||||
_("Netscape"), GINT_TO_POINTER (HELP_BROWSER_NETSCAPE), NULL,
|
||||
|
||||
NULL);
|
||||
|
||||
optionmenu = gimp_enum_option_menu_new (GIMP_TYPE_HELP_BROWSER_TYPE,
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
&gimprc.help_browser);
|
||||
gimp_option_menu_set_history (GTK_OPTION_MENU (optionmenu),
|
||||
GINT_TO_POINTER (gimprc.help_browser));
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Help Browser to Use:"), 1.0, 0.5,
|
||||
optionmenu, 1, TRUE);
|
||||
|
@ -31,6 +31,7 @@ typedef struct _GimpDisplayShell GimpDisplayShell;
|
||||
|
||||
typedef struct _GimpStatusbar GimpStatusbar; /*< proxy-skip >*/
|
||||
|
||||
typedef struct _NavigationDialog NavigationDialog;
|
||||
typedef struct _Selection Selection;
|
||||
|
||||
|
||||
|
@ -24,9 +24,6 @@
|
||||
#include "display-types.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
#warning FIXME #include "gui/gui-types.h"
|
||||
#include "gui/gui-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
@ -37,8 +34,6 @@
|
||||
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "gui/info-window.h"
|
||||
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplay-area.h"
|
||||
#include "gimpdisplay-handlers.h"
|
||||
@ -566,9 +561,6 @@ gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||
/* Next the displays... */
|
||||
gimp_display_shell_flush (GIMP_DISPLAY_SHELL (gdisp->shell));
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
info_window_update (gdisp);
|
||||
|
||||
/* ensure the consistency of the tear-off menus */
|
||||
if (! now && gimp_context_get_display (gimp_get_user_context
|
||||
(gdisp->gimage->gimp)) == gdisp)
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "gimpstatusbar.h"
|
||||
|
||||
#include "gimprc.h"
|
||||
#include "nav_window.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
@ -1206,14 +1207,10 @@ gimp_display_shell_color_button_default (gpointer callback_data,
|
||||
|
||||
gboolean
|
||||
gimp_display_shell_qmask_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
GdkEventButton *bevent,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpDisplay *gdisp;
|
||||
|
||||
gdisp = shell->gdisp;
|
||||
|
||||
if ((event->type == GDK_BUTTON_PRESS) && (event->button == 3))
|
||||
if ((bevent->type == GDK_BUTTON_PRESS) && (bevent->button == 3))
|
||||
{
|
||||
GimpItemFactory *factory;
|
||||
|
||||
@ -1237,6 +1234,19 @@ gimp_display_shell_qmask_toggled (GtkWidget *widget,
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_display_shell_nav_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
if ((bevent->type == GDK_BUTTON_PRESS) && (bevent->button == 1))
|
||||
{
|
||||
nav_dialog_create_popup (shell, widget, bevent->x, bevent->y);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
|
@ -75,10 +75,14 @@ void gimp_display_shell_color_button_default (gpointer data,
|
||||
GtkWidget *widget);
|
||||
|
||||
gboolean gimp_display_shell_qmask_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
GdkEventButton *bevent,
|
||||
GimpDisplayShell *shell);
|
||||
void gimp_display_shell_qmask_toggled (GtkWidget *widget,
|
||||
GimpDisplayShell *shell);
|
||||
|
||||
gboolean gimp_display_shell_nav_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpDisplayShell *shell);
|
||||
|
||||
|
||||
#endif /* __GIMP_DISPLAY_SHELL_CALLBACKS_H__ */
|
||||
|
@ -336,15 +336,15 @@ gimp_display_shell_destroy (GtkObject *object)
|
||||
shell->info_dialog = NULL;
|
||||
}
|
||||
|
||||
if (shell->nav_dialog)
|
||||
{
|
||||
nav_dialog_free (shell->gdisp, shell->nav_dialog);
|
||||
shell->nav_dialog = NULL;
|
||||
}
|
||||
/* free the nav_dialog unconditionally because nav_dialog_free(shell,NULL)
|
||||
* acts as notification for the global nav dialog
|
||||
*/
|
||||
nav_dialog_free (shell, shell->nav_dialog);
|
||||
shell->nav_dialog = NULL;
|
||||
|
||||
if (shell->nav_popup)
|
||||
{
|
||||
nav_dialog_free (shell->gdisp, shell->nav_popup);
|
||||
nav_dialog_free (shell, shell->nav_popup);
|
||||
shell->nav_popup = NULL;
|
||||
}
|
||||
|
||||
@ -667,8 +667,8 @@ gimp_display_shell_new (GimpDisplay *gdisp)
|
||||
gtk_widget_show (image);
|
||||
|
||||
g_signal_connect (G_OBJECT (nav_ebox), "button_press_event",
|
||||
G_CALLBACK (nav_popup_click_handler),
|
||||
gdisp);
|
||||
G_CALLBACK (gimp_display_shell_nav_button_press),
|
||||
shell);
|
||||
|
||||
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
|
||||
|
||||
@ -1337,6 +1337,9 @@ gimp_display_shell_flush (GimpDisplayShell *shell)
|
||||
shell->title_dirty = FALSE;
|
||||
}
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
info_window_update (shell->gdisp);
|
||||
|
||||
if (shell->display_areas)
|
||||
{
|
||||
GSList *list;
|
||||
|
@ -150,10 +150,10 @@ gimp_display_shell_scale_setup (GimpDisplayShell *shell)
|
||||
gtk_widget_queue_draw (GTK_WIDGET (hruler));
|
||||
gtk_widget_queue_draw (GTK_WIDGET (vruler));
|
||||
|
||||
nav_dialog_update_window_marker (shell->nav_dialog);
|
||||
nav_dialog_update (shell->nav_dialog);
|
||||
|
||||
if (shell->nav_popup)
|
||||
nav_dialog_update_window_marker (shell->nav_popup);
|
||||
nav_dialog_update (shell->nav_popup);
|
||||
|
||||
#if 0
|
||||
g_print ("offset_x: %d\n"
|
||||
|
@ -127,10 +127,10 @@ gimp_display_shell_scroll (GimpDisplayShell *shell,
|
||||
gimp_display_flush (shell->gdisp);
|
||||
}
|
||||
|
||||
nav_dialog_update_window_marker (shell->nav_dialog);
|
||||
nav_dialog_update (shell->nav_dialog);
|
||||
|
||||
if (shell->nav_popup)
|
||||
nav_dialog_update_window_marker (shell->nav_popup);
|
||||
nav_dialog_update (shell->nav_popup);
|
||||
|
||||
/* Make sure graphics expose events are processed before scrolling
|
||||
* again
|
||||
|
@ -336,15 +336,15 @@ gimp_display_shell_destroy (GtkObject *object)
|
||||
shell->info_dialog = NULL;
|
||||
}
|
||||
|
||||
if (shell->nav_dialog)
|
||||
{
|
||||
nav_dialog_free (shell->gdisp, shell->nav_dialog);
|
||||
shell->nav_dialog = NULL;
|
||||
}
|
||||
/* free the nav_dialog unconditionally because nav_dialog_free(shell,NULL)
|
||||
* acts as notification for the global nav dialog
|
||||
*/
|
||||
nav_dialog_free (shell, shell->nav_dialog);
|
||||
shell->nav_dialog = NULL;
|
||||
|
||||
if (shell->nav_popup)
|
||||
{
|
||||
nav_dialog_free (shell->gdisp, shell->nav_popup);
|
||||
nav_dialog_free (shell, shell->nav_popup);
|
||||
shell->nav_popup = NULL;
|
||||
}
|
||||
|
||||
@ -667,8 +667,8 @@ gimp_display_shell_new (GimpDisplay *gdisp)
|
||||
gtk_widget_show (image);
|
||||
|
||||
g_signal_connect (G_OBJECT (nav_ebox), "button_press_event",
|
||||
G_CALLBACK (nav_popup_click_handler),
|
||||
gdisp);
|
||||
G_CALLBACK (gimp_display_shell_nav_button_press),
|
||||
shell);
|
||||
|
||||
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
|
||||
|
||||
@ -1337,6 +1337,9 @@ gimp_display_shell_flush (GimpDisplayShell *shell)
|
||||
shell->title_dirty = FALSE;
|
||||
}
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
info_window_update (shell->gdisp);
|
||||
|
||||
if (shell->display_areas)
|
||||
{
|
||||
GSList *list;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
299
app/gimphelp.c
299
app/gimphelp.c
@ -1,299 +0,0 @@
|
||||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimphelp.c
|
||||
* Copyright (C) 1999-2000 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include "sys/types.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
#include "plug-in/plug-ins.h"
|
||||
#include "plug-in/plug-in.h"
|
||||
|
||||
#include "gimphelp.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#define DEBUG_HELP
|
||||
#endif
|
||||
|
||||
typedef struct _GimpIdleHelp GimpIdleHelp;
|
||||
|
||||
struct _GimpIdleHelp
|
||||
{
|
||||
Gimp *gimp;
|
||||
gchar *help_path;
|
||||
gchar *help_data;
|
||||
};
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
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);
|
||||
static void gimp_help_netscape (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *current_locale,
|
||||
const gchar *help_data);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
gimp_help (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *help_data)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
if (gimprc.use_help)
|
||||
{
|
||||
GimpIdleHelp *idle_help;
|
||||
|
||||
idle_help = g_new0 (GimpIdleHelp, 1);
|
||||
|
||||
idle_help->gimp = gimp;
|
||||
|
||||
if (help_path && strlen (help_path))
|
||||
idle_help->help_path = g_strdup (help_path);
|
||||
|
||||
if (help_data && strlen (help_data))
|
||||
idle_help->help_data = g_strdup (help_data);
|
||||
|
||||
g_idle_add (gimp_idle_help, idle_help);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static gboolean
|
||||
gimp_idle_help (gpointer data)
|
||||
{
|
||||
GimpIdleHelp *idle_help;
|
||||
static gchar *current_locale = "C";
|
||||
|
||||
idle_help = (GimpIdleHelp *) data;
|
||||
|
||||
if (idle_help->help_data == NULL && gimprc.help_browser != HELP_BROWSER_GIMP)
|
||||
idle_help->help_data = g_strdup ("introduction.html");
|
||||
|
||||
#ifdef DEBUG_HELP
|
||||
if (idle_help->help_path)
|
||||
g_print ("Help Path: %s\n", idle_help->help_path);
|
||||
else
|
||||
g_print ("Help Path: NULL\n");
|
||||
|
||||
if (idle_help->help_data)
|
||||
g_print ("Help Page: %s\n", idle_help->help_data);
|
||||
else
|
||||
g_print ("Help Page: NULL\n");
|
||||
|
||||
g_print ("\n");
|
||||
#endif /* DEBUG_HELP */
|
||||
|
||||
switch (gimprc.help_browser)
|
||||
{
|
||||
case HELP_BROWSER_GIMP:
|
||||
if (gimp_help_internal (idle_help->gimp,
|
||||
idle_help->help_path,
|
||||
current_locale,
|
||||
idle_help->help_data))
|
||||
break;
|
||||
|
||||
case HELP_BROWSER_NETSCAPE:
|
||||
gimp_help_netscape (idle_help->gimp,
|
||||
idle_help->help_path,
|
||||
current_locale,
|
||||
idle_help->help_data);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (idle_help->help_path)
|
||||
g_free (idle_help->help_path);
|
||||
if (idle_help->help_data)
|
||||
g_free (idle_help->help_data);
|
||||
g_free (idle_help);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_help_internal_not_found_callback (GtkWidget *widget,
|
||||
gboolean use_netscape,
|
||||
gpointer data)
|
||||
{
|
||||
GList *update = NULL;
|
||||
GList *remove = NULL;
|
||||
|
||||
if (use_netscape)
|
||||
{
|
||||
gimprc.help_browser = HELP_BROWSER_NETSCAPE;
|
||||
|
||||
update = g_list_append (update, "help-browser");
|
||||
gimprc_save (&update, &remove);
|
||||
}
|
||||
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_help_internal (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *current_locale,
|
||||
const gchar *help_data)
|
||||
{
|
||||
ProcRecord *proc_rec;
|
||||
|
||||
/* Check if a help browser is already running */
|
||||
proc_rec = procedural_db_lookup (gimp, "extension_gimp_help_browser_temp");
|
||||
|
||||
if (proc_rec == NULL)
|
||||
{
|
||||
Argument *args = NULL;
|
||||
|
||||
proc_rec = procedural_db_lookup (gimp, "extension_gimp_help_browser");
|
||||
|
||||
if (proc_rec == NULL)
|
||||
{
|
||||
GtkWidget *not_found =
|
||||
gimp_query_boolean_box (_("Could not find GIMP Help Browser"),
|
||||
NULL, NULL, FALSE,
|
||||
_("Could not find the GIMP Help Browser procedure.\n"
|
||||
"It probably was not compiled because\n"
|
||||
"you don't have GtkXmHTML installed."),
|
||||
_("Use Netscape instead"),
|
||||
GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
gimp_help_internal_not_found_callback,
|
||||
NULL);
|
||||
gtk_widget_show (not_found);
|
||||
gtk_main ();
|
||||
|
||||
return (gimprc.help_browser != HELP_BROWSER_NETSCAPE);
|
||||
}
|
||||
|
||||
args = g_new (Argument, 4);
|
||||
args[0].arg_type = GIMP_PDB_INT32;
|
||||
args[0].value.pdb_int = GIMP_RUN_INTERACTIVE;
|
||||
args[1].arg_type = GIMP_PDB_STRING;
|
||||
args[1].value.pdb_pointer = (gpointer) help_path;
|
||||
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;
|
||||
|
||||
plug_in_run (gimp, proc_rec, args, 4, FALSE, TRUE, 0);
|
||||
|
||||
g_free (args);
|
||||
}
|
||||
else
|
||||
{
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc (gimp,
|
||||
"extension_gimp_help_browser_temp",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, help_path,
|
||||
GIMP_PDB_STRING, current_locale,
|
||||
GIMP_PDB_STRING, help_data,
|
||||
GIMP_PDB_END);
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_help_netscape (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *current_locale,
|
||||
const gchar *help_data)
|
||||
{
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
gchar *url;
|
||||
|
||||
if (help_data[0] == '/') /* _not_ g_path_is_absolute() */
|
||||
{
|
||||
url = g_strconcat ("file:",
|
||||
help_data,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!help_path)
|
||||
{
|
||||
url = g_strconcat ("file:",
|
||||
gimp_data_directory (),
|
||||
"/help/",
|
||||
current_locale, "/",
|
||||
help_data,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
url = g_strconcat ("file:",
|
||||
help_path, "/",
|
||||
current_locale, "/",
|
||||
help_data,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc (gimp,
|
||||
"extension_web_browser",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
|
||||
GIMP_PDB_STRING, url,
|
||||
GIMP_PDB_INT32, FALSE,
|
||||
GIMP_PDB_END);
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
|
||||
g_free (url);
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimphelp.h
|
||||
* Copyright (C) 1999-2000 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_HELP_H__
|
||||
#define __GIMP_HELP_H__
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
HELP_BROWSER_GIMP,
|
||||
HELP_BROWSER_NETSCAPE
|
||||
};
|
||||
|
||||
|
||||
/* the main help function
|
||||
*
|
||||
* there should be no need to use it in the common case
|
||||
*/
|
||||
void gimp_help (Gimp *gimp,
|
||||
const gchar *help_path,
|
||||
const gchar *help_data);
|
||||
|
||||
|
||||
#endif /* __GIMP_HELP_H__ */
|
@ -55,7 +55,6 @@
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "general.h"
|
||||
#include "gimphelp.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
@ -215,7 +214,7 @@ GimpRc gimprc =
|
||||
/* use_help */ TRUE,
|
||||
/* nav_window_per_display */ FALSE,
|
||||
/* info_window_follows_mouse */ TRUE,
|
||||
/* help_browser */ HELP_BROWSER_GIMP,
|
||||
/* help_browser */ GIMP_HELP_BROWSER_GIMP,
|
||||
/* cursor_mode */ GIMP_CURSOR_MODE_TOOL_ICON,
|
||||
/* disable_tearoff_menus */ FALSE,
|
||||
/* theme_path */ NULL,
|
||||
@ -2162,9 +2161,9 @@ parse_help_browser (gpointer val1p,
|
||||
token = get_next_token ();
|
||||
|
||||
if (strcmp (token_sym, "gimp") == 0)
|
||||
*((gint *) val1p) = HELP_BROWSER_GIMP;
|
||||
*((gint *) val1p) = GIMP_HELP_BROWSER_GIMP;
|
||||
else if (strcmp (token_sym, "netscape") == 0)
|
||||
*((gint *) val1p) = HELP_BROWSER_NETSCAPE;
|
||||
*((gint *) val1p) = GIMP_HELP_BROWSER_NETSCAPE;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_RIGHT_PAREN))
|
||||
@ -2497,7 +2496,7 @@ help_browser_to_str (gpointer val1p,
|
||||
|
||||
browser = *((gint *) val1p);
|
||||
|
||||
if (browser == HELP_BROWSER_NETSCAPE)
|
||||
if (browser == GIMP_HELP_BROWSER_NETSCAPE)
|
||||
return g_strdup ("netscape");
|
||||
else
|
||||
return g_strdup ("gimp");
|
||||
|
@ -784,7 +784,7 @@ dialogs_indexed_palette_new (GimpDialogFactory *factory,
|
||||
NULL,
|
||||
dialogs_set_indexed_palette_context_func);
|
||||
|
||||
dialogs_set_indexed_palette_context_func (GIMP_DOCKABLE (dockable), context);
|
||||
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
||||
|
||||
g_signal_connect (G_OBJECT (view), "selected",
|
||||
G_CALLBACK (dialogs_indexed_palette_selected),
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
typedef struct _ColorNotebook ColorNotebook;
|
||||
typedef struct _InfoDialog InfoDialog;
|
||||
typedef struct _NavigationDialog NavigationDialog;
|
||||
|
||||
|
||||
#endif /* __GUI_TYPES_H__ */
|
||||
|
@ -56,7 +56,6 @@
|
||||
#include "resolution-calibrate-dialog.h"
|
||||
#include "session.h"
|
||||
|
||||
#include "gimphelp.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
@ -127,8 +126,8 @@ static gint old_marching_speed;
|
||||
static gboolean old_resize_windows_on_zoom;
|
||||
static gboolean old_resize_windows_on_resize;
|
||||
static gboolean old_auto_save;
|
||||
static gint old_preview_size;
|
||||
static gint old_nav_preview_size;
|
||||
static GimpPreviewSize old_preview_size;
|
||||
static GimpPreviewSize old_nav_preview_size;
|
||||
static gboolean old_no_cursor_updating;
|
||||
static gboolean old_show_tool_tips;
|
||||
static gboolean old_show_rulers;
|
||||
@ -942,6 +941,7 @@ prefs_cancel_callback (GtkWidget *widget,
|
||||
/* restore variables which need some magic */
|
||||
if (gimprc.preview_size != old_preview_size)
|
||||
{
|
||||
gimprc.preview_size = old_preview_size;
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: update preview size
|
||||
#endif
|
||||
@ -1089,12 +1089,13 @@ static void
|
||||
prefs_preview_size_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_menu_item_update (widget, data);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: update preview size
|
||||
#endif
|
||||
#if 0
|
||||
lc_dialog_rebuild ((long) g_object_get_data (G_OBJECT (widget),
|
||||
"gimp-item-data"));
|
||||
lc_dialog_rebuild (gimprc.preview_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1102,8 +1103,7 @@ static void
|
||||
prefs_nav_preview_size_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gimprc.nav_preview_size =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "gimp-item-data"));
|
||||
gimp_menu_item_update (widget, data);
|
||||
|
||||
gdisplays_nav_preview_resized ();
|
||||
}
|
||||
@ -2074,9 +2074,14 @@ preferences_dialog_create (Gimp *gimp)
|
||||
&gimprc.nav_preview_size,
|
||||
GINT_TO_POINTER (gimprc.nav_preview_size),
|
||||
|
||||
_("Small"), GINT_TO_POINTER (48), NULL,
|
||||
_("Medium"), GINT_TO_POINTER (80), NULL,
|
||||
_("Large"), GINT_TO_POINTER (112), NULL,
|
||||
_("Small"),
|
||||
GINT_TO_POINTER (GIMP_PREVIEW_SIZE_MEDIUM), NULL,
|
||||
|
||||
_("Medium"),
|
||||
GINT_TO_POINTER (GIMP_PREVIEW_SIZE_EXTRA_LARGE), NULL,
|
||||
|
||||
_("Large"),
|
||||
GINT_TO_POINTER (GIMP_PREVIEW_SIZE_HUGE), NULL,
|
||||
|
||||
NULL);
|
||||
|
||||
@ -2156,17 +2161,11 @@ preferences_dialog_create (Gimp *gimp)
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
optionmenu = gimp_option_menu_new2
|
||||
(FALSE,
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
&gimprc.help_browser,
|
||||
GINT_TO_POINTER (gimprc.help_browser),
|
||||
|
||||
_("Internal"), GINT_TO_POINTER (HELP_BROWSER_GIMP), NULL,
|
||||
_("Netscape"), GINT_TO_POINTER (HELP_BROWSER_NETSCAPE), NULL,
|
||||
|
||||
NULL);
|
||||
|
||||
optionmenu = gimp_enum_option_menu_new (GIMP_TYPE_HELP_BROWSER_TYPE,
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
&gimprc.help_browser);
|
||||
gimp_option_menu_set_history (GTK_OPTION_MENU (optionmenu),
|
||||
GINT_TO_POINTER (gimprc.help_browser));
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Help Browser to Use:"), 1.0, 0.5,
|
||||
optionmenu, 1, TRUE);
|
||||
|
@ -139,13 +139,13 @@ view_navigation_window_cmd_callback (GtkWidget *widget,
|
||||
if (gimprc.nav_window_per_display)
|
||||
{
|
||||
if (! shell->nav_dialog)
|
||||
shell->nav_dialog = nav_dialog_create (gdisp);
|
||||
shell->nav_dialog = nav_dialog_create (shell);
|
||||
|
||||
nav_dialog_popup (shell->nav_dialog);
|
||||
nav_dialog_show (shell->nav_dialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
nav_dialog_follow_auto ();
|
||||
nav_dialog_show_auto (gdisp->gimage->gimp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,14 +22,15 @@
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "widgets/widgets-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpunit.h"
|
||||
|
||||
#include "widgets/gimphelp.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimphelp.h"
|
||||
|
||||
#define __LIBGIMP_GLUE_C__
|
||||
#include "libgimp_glue.h"
|
||||
|
2101
app/nav_window.c
2101
app/nav_window.c
File diff suppressed because it is too large
Load Diff
@ -21,19 +21,19 @@
|
||||
#define __NAV_WINDOW_H__
|
||||
|
||||
|
||||
NavigationDialog * nav_dialog_create (GimpDisplay *gdisp);
|
||||
void nav_dialog_free (GimpDisplay *gdisp,
|
||||
NavigationDialog *nav_dialog);
|
||||
NavigationDialog * nav_dialog_create (GimpDisplayShell *shell);
|
||||
void nav_dialog_create_popup (GimpDisplayShell *shell,
|
||||
GtkWidget *widget,
|
||||
gint button_x,
|
||||
gint button_y);
|
||||
void nav_dialog_free (GimpDisplayShell *del_shell,
|
||||
NavigationDialog *nav_dialog);
|
||||
|
||||
void nav_dialog_popup (NavigationDialog *nav_dialog);
|
||||
void nav_dialog_follow_auto (void);
|
||||
void nav_dialog_show (NavigationDialog *nav_dialog);
|
||||
void nav_dialog_show_auto (Gimp *gimp);
|
||||
|
||||
void nav_dialog_update_window_marker (NavigationDialog *nav_dialog);
|
||||
void nav_dialog_preview_resized (NavigationDialog *nav_dialog);
|
||||
|
||||
void nav_popup_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data);
|
||||
void nav_dialog_update (NavigationDialog *nav_dialog);
|
||||
void nav_dialog_preview_resized (NavigationDialog *nav_dialog);
|
||||
|
||||
|
||||
#endif /* __NAV_WINDOW_H__ */
|
||||
|
@ -22,9 +22,6 @@
|
||||
|
||||
#include "core/gimpobject.h"
|
||||
|
||||
#include "tools/tools-types.h" /* temp hack */
|
||||
#include "tools/paint_options.h" /* temp hack */
|
||||
|
||||
|
||||
#define PAINT_CORE_SUBSAMPLE 4
|
||||
|
||||
|
@ -29,8 +29,8 @@
|
||||
#include "pdb-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "gimphelp.h"
|
||||
#include "plug-in/plug-ins.h"
|
||||
#include "widgets/gimphelp.h"
|
||||
|
||||
static ProcRecord help_proc;
|
||||
|
||||
|
@ -25,8 +25,7 @@
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "libgimptool/gimptooltypes.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
#include "base/pixel-region.h"
|
||||
#include "base/tile-manager.h"
|
||||
@ -52,8 +51,6 @@
|
||||
#include "paint/gimppaintcore.h"
|
||||
|
||||
#include "tools/gimpbycolorselecttool.h"
|
||||
/*#include "tools/gimptool.h"*/
|
||||
#include "tools/gimpdrawtool.h"
|
||||
#include "tools/gimppainttool.h"
|
||||
#include "tools/gimptransformtool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
@ -95,6 +95,8 @@ libappwidgets_a_sources = @STRIP_BEGIN@ \
|
||||
gimpgradienteditor.h \
|
||||
gimpgradientpreview.c \
|
||||
gimpgradientpreview.h \
|
||||
gimphelp.c \
|
||||
gimphelp.h \
|
||||
gimphistogramview.c \
|
||||
gimphistogramview.h \
|
||||
gimpimagedock.c \
|
||||
|
@ -472,6 +472,8 @@ gimp_cursor_new (GimpCursorType cursor_type,
|
||||
return gdk_cursor_new (cursor_type);
|
||||
}
|
||||
|
||||
g_return_val_if_fail (cursor_type >= GIMP_MOUSE_CURSOR, NULL);
|
||||
|
||||
/* allow the small tool cursor only with the standard mouse,
|
||||
* the small crosshair and the bad cursor
|
||||
*/
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "widgets-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
#include "plug-in/plug-in.h"
|
||||
|
||||
#include "gimphelp.h"
|
||||
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
@ -112,7 +113,8 @@ gimp_idle_help (gpointer data)
|
||||
|
||||
idle_help = (GimpIdleHelp *) data;
|
||||
|
||||
if (idle_help->help_data == NULL && gimprc.help_browser != HELP_BROWSER_GIMP)
|
||||
if (idle_help->help_data == NULL &&
|
||||
gimprc.help_browser != GIMP_HELP_BROWSER_GIMP)
|
||||
idle_help->help_data = g_strdup ("introduction.html");
|
||||
|
||||
#ifdef DEBUG_HELP
|
||||
@ -131,14 +133,14 @@ gimp_idle_help (gpointer data)
|
||||
|
||||
switch (gimprc.help_browser)
|
||||
{
|
||||
case HELP_BROWSER_GIMP:
|
||||
case GIMP_HELP_BROWSER_GIMP:
|
||||
if (gimp_help_internal (idle_help->gimp,
|
||||
idle_help->help_path,
|
||||
current_locale,
|
||||
idle_help->help_data))
|
||||
break;
|
||||
|
||||
case HELP_BROWSER_NETSCAPE:
|
||||
case GIMP_HELP_BROWSER_NETSCAPE:
|
||||
gimp_help_netscape (idle_help->gimp,
|
||||
idle_help->help_path,
|
||||
current_locale,
|
||||
@ -168,7 +170,7 @@ gimp_help_internal_not_found_callback (GtkWidget *widget,
|
||||
|
||||
if (use_netscape)
|
||||
{
|
||||
gimprc.help_browser = HELP_BROWSER_NETSCAPE;
|
||||
gimprc.help_browser = GIMP_HELP_BROWSER_NETSCAPE;
|
||||
|
||||
update = g_list_append (update, "help-browser");
|
||||
gimprc_save (&update, &remove);
|
||||
@ -210,7 +212,7 @@ gimp_help_internal (Gimp *gimp,
|
||||
gtk_widget_show (not_found);
|
||||
gtk_main ();
|
||||
|
||||
return (gimprc.help_browser != HELP_BROWSER_NETSCAPE);
|
||||
return (gimprc.help_browser != GIMP_HELP_BROWSER_NETSCAPE);
|
||||
}
|
||||
|
||||
args = g_new (Argument, 4);
|
||||
|
@ -23,13 +23,6 @@
|
||||
#define __GIMP_HELP_H__
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
HELP_BROWSER_GIMP,
|
||||
HELP_BROWSER_NETSCAPE
|
||||
};
|
||||
|
||||
|
||||
/* the main help function
|
||||
*
|
||||
* there should be no need to use it in the common case
|
||||
|
@ -162,6 +162,17 @@ gimp_image_preview_render (GimpPreview *preview)
|
||||
preview_height);
|
||||
}
|
||||
|
||||
/* xresolution != yresolution */
|
||||
if (preview_width > width || preview_height > height)
|
||||
{
|
||||
TempBuf *temp_buf;
|
||||
|
||||
temp_buf = temp_buf_scale (render_buf, width, height);
|
||||
|
||||
temp_buf_free (render_buf);
|
||||
render_buf = temp_buf;
|
||||
}
|
||||
|
||||
if (preview_width < width) render_buf->x = (width - preview_width) / 2;
|
||||
if (preview_height < height) render_buf->y = (height - preview_height) / 2;
|
||||
|
||||
|
@ -274,7 +274,7 @@ gimp_navigation_preview_move_to (GimpNavigationPreview *nav_preview,
|
||||
x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gimp_navigation_preview_grab_pointer (GimpNavigationPreview *nav_preview)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
@ -532,7 +532,6 @@ gimp_navigation_preview_new (GimpImage *gimage,
|
||||
{
|
||||
GimpPreview *preview;
|
||||
|
||||
g_return_val_if_fail (gimage != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (size > 0 && size <= 256, NULL);
|
||||
|
||||
@ -558,7 +557,6 @@ gimp_navigation_preview_set_marker (GimpNavigationPreview *nav_preview,
|
||||
GimpImage *gimage;
|
||||
gdouble ratiox, ratioy;
|
||||
|
||||
g_return_if_fail (nav_preview != NULL);
|
||||
g_return_if_fail (GIMP_IS_NAVIGATION_PREVIEW (nav_preview));
|
||||
|
||||
preview = GIMP_PREVIEW (nav_preview);
|
||||
|
@ -72,15 +72,16 @@ struct _GimpNavigationPreviewClass
|
||||
};
|
||||
|
||||
|
||||
GType gimp_navigation_preview_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_navigation_preview_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gimp_navigation_preview_new (GimpImage *gimage,
|
||||
gint size);
|
||||
void gimp_navigation_preview_set_marker (GimpNavigationPreview *preview,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GtkWidget * gimp_navigation_preview_new (GimpImage *gimage,
|
||||
gint size);
|
||||
void gimp_navigation_preview_set_marker (GimpNavigationPreview *preview,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gimp_navigation_preview_grab_pointer (GimpNavigationPreview *preview);
|
||||
|
||||
|
||||
#endif /* __GIMP_NAVIGATION_PREVIEW_H__ */
|
||||
|
@ -274,7 +274,7 @@ gimp_navigation_preview_move_to (GimpNavigationPreview *nav_preview,
|
||||
x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gimp_navigation_preview_grab_pointer (GimpNavigationPreview *nav_preview)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
@ -532,7 +532,6 @@ gimp_navigation_preview_new (GimpImage *gimage,
|
||||
{
|
||||
GimpPreview *preview;
|
||||
|
||||
g_return_val_if_fail (gimage != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (size > 0 && size <= 256, NULL);
|
||||
|
||||
@ -558,7 +557,6 @@ gimp_navigation_preview_set_marker (GimpNavigationPreview *nav_preview,
|
||||
GimpImage *gimage;
|
||||
gdouble ratiox, ratioy;
|
||||
|
||||
g_return_if_fail (nav_preview != NULL);
|
||||
g_return_if_fail (GIMP_IS_NAVIGATION_PREVIEW (nav_preview));
|
||||
|
||||
preview = GIMP_PREVIEW (nav_preview);
|
||||
|
@ -72,15 +72,16 @@ struct _GimpNavigationPreviewClass
|
||||
};
|
||||
|
||||
|
||||
GType gimp_navigation_preview_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_navigation_preview_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gimp_navigation_preview_new (GimpImage *gimage,
|
||||
gint size);
|
||||
void gimp_navigation_preview_set_marker (GimpNavigationPreview *preview,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GtkWidget * gimp_navigation_preview_new (GimpImage *gimage,
|
||||
gint size);
|
||||
void gimp_navigation_preview_set_marker (GimpNavigationPreview *preview,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gimp_navigation_preview_grab_pointer (GimpNavigationPreview *preview);
|
||||
|
||||
|
||||
#endif /* __GIMP_NAVIGATION_PREVIEW_H__ */
|
||||
|
@ -545,8 +545,9 @@ gimp_preview_set_viewable (GimpPreview *preview,
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PREVIEW (preview));
|
||||
g_return_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable));
|
||||
g_return_if_fail (! viewable || (gimp_preview_type_from_viewable (viewable) ==
|
||||
G_TYPE_FROM_INSTANCE (preview)));
|
||||
g_return_if_fail (! viewable ||
|
||||
g_type_is_a (G_TYPE_FROM_INSTANCE (preview),
|
||||
gimp_preview_type_from_viewable (viewable)));
|
||||
|
||||
if (preview->viewable)
|
||||
{
|
||||
|
@ -545,8 +545,9 @@ gimp_preview_set_viewable (GimpPreview *preview,
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PREVIEW (preview));
|
||||
g_return_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable));
|
||||
g_return_if_fail (! viewable || (gimp_preview_type_from_viewable (viewable) ==
|
||||
G_TYPE_FROM_INSTANCE (preview)));
|
||||
g_return_if_fail (! viewable ||
|
||||
g_type_is_a (G_TYPE_FROM_INSTANCE (preview),
|
||||
gimp_preview_type_from_viewable (viewable)));
|
||||
|
||||
if (preview->viewable)
|
||||
{
|
||||
|
@ -162,6 +162,17 @@ gimp_image_preview_render (GimpPreview *preview)
|
||||
preview_height);
|
||||
}
|
||||
|
||||
/* xresolution != yresolution */
|
||||
if (preview_width > width || preview_height > height)
|
||||
{
|
||||
TempBuf *temp_buf;
|
||||
|
||||
temp_buf = temp_buf_scale (render_buf, width, height);
|
||||
|
||||
temp_buf_free (render_buf);
|
||||
render_buf = temp_buf;
|
||||
}
|
||||
|
||||
if (preview_width < width) render_buf->x = (width - preview_width) / 2;
|
||||
if (preview_height < height) render_buf->y = (height - preview_height) / 2;
|
||||
|
||||
|
@ -545,8 +545,9 @@ gimp_preview_set_viewable (GimpPreview *preview,
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PREVIEW (preview));
|
||||
g_return_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable));
|
||||
g_return_if_fail (! viewable || (gimp_preview_type_from_viewable (viewable) ==
|
||||
G_TYPE_FROM_INSTANCE (preview)));
|
||||
g_return_if_fail (! viewable ||
|
||||
g_type_is_a (G_TYPE_FROM_INSTANCE (preview),
|
||||
gimp_preview_type_from_viewable (viewable)));
|
||||
|
||||
if (preview->viewable)
|
||||
{
|
||||
|
@ -545,8 +545,9 @@ gimp_preview_set_viewable (GimpPreview *preview,
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PREVIEW (preview));
|
||||
g_return_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable));
|
||||
g_return_if_fail (! viewable || (gimp_preview_type_from_viewable (viewable) ==
|
||||
G_TYPE_FROM_INSTANCE (preview)));
|
||||
g_return_if_fail (! viewable ||
|
||||
g_type_is_a (G_TYPE_FROM_INSTANCE (preview),
|
||||
gimp_preview_type_from_viewable (viewable)));
|
||||
|
||||
if (preview->viewable)
|
||||
{
|
||||
|
@ -162,6 +162,17 @@ gimp_image_preview_render (GimpPreview *preview)
|
||||
preview_height);
|
||||
}
|
||||
|
||||
/* xresolution != yresolution */
|
||||
if (preview_width > width || preview_height > height)
|
||||
{
|
||||
TempBuf *temp_buf;
|
||||
|
||||
temp_buf = temp_buf_scale (render_buf, width, height);
|
||||
|
||||
temp_buf_free (render_buf);
|
||||
render_buf = temp_buf;
|
||||
}
|
||||
|
||||
if (preview_width < width) render_buf->x = (width - preview_width) / 2;
|
||||
if (preview_height < height) render_buf->y = (height - preview_height) / 2;
|
||||
|
||||
|
@ -8,6 +8,25 @@
|
||||
|
||||
/* enumerations from "./widgets-enums.h" */
|
||||
|
||||
static const GEnumValue gimp_help_browser_type_enum_values[] =
|
||||
{
|
||||
{ GIMP_HELP_BROWSER_GIMP, N_("Internal"), "gimp" },
|
||||
{ GIMP_HELP_BROWSER_NETSCAPE, N_("Netscape"), "netscape" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_help_browser_type_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpHelpBrowserType", gimp_help_browser_type_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_zoom_type_enum_values[] =
|
||||
{
|
||||
{ GIMP_ZOOM_IN, N_("Zoom in"), "in" },
|
||||
|
@ -26,6 +26,17 @@
|
||||
* these enums that are registered with the type system
|
||||
*/
|
||||
|
||||
#define GIMP_TYPE_HELP_BROWSER_TYPE (gimp_help_browser_type_get_type ())
|
||||
|
||||
GType gimp_help_browser_type_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_HELP_BROWSER_GIMP, /*< desc="Internal" >*/
|
||||
GIMP_HELP_BROWSER_NETSCAPE /*< desc="Netscape" >*/
|
||||
} GimpHelpBrowserType;
|
||||
|
||||
|
||||
#define GIMP_TYPE_ZOOM_TYPE (gimp_zoom_type_get_type ())
|
||||
|
||||
GType gimp_zoom_type_get_type (void) G_GNUC_CONST;
|
||||
@ -56,7 +67,7 @@ typedef enum /*< skip >*/
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_MOUSE_CURSOR = (GDK_LAST_CURSOR + 2),
|
||||
GIMP_MOUSE_CURSOR = 1024 /* (GDK_LAST_CURSOR + 2) yes, this is insane */,
|
||||
GIMP_CROSSHAIR_CURSOR,
|
||||
GIMP_CROSSHAIR_SMALL_CURSOR,
|
||||
GIMP_BAD_CURSOR,
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-05 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* POTFILES.in: app/gimphelp.c -> app/widgets/gimphelp.c
|
||||
|
||||
2002-04-30 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation and converted to UTF-8.
|
||||
|
@ -2,7 +2,6 @@
|
||||
# marked to allow runtime translation of messages
|
||||
|
||||
app/app_procs.c
|
||||
app/gimphelp.c
|
||||
app/gimprc.c
|
||||
app/main.c
|
||||
app/nav_window.c
|
||||
@ -177,6 +176,7 @@ app/widgets/gimpdocumentview.c
|
||||
app/widgets/gimpdrawablelistview.c
|
||||
app/widgets/gimpfontselection-dialog.c
|
||||
app/widgets/gimpgradienteditor.c
|
||||
app/widgets/gimphelp.c
|
||||
app/widgets/gimpimagedock.c
|
||||
app/widgets/gimpitemfactory.c
|
||||
app/widgets/gimpitemlistview.c
|
||||
|
@ -50,7 +50,7 @@ HELP
|
||||
);
|
||||
}
|
||||
|
||||
@headers = qw(<sys/types.h> "plug-in/plug-ins.h" "gimphelp.h");
|
||||
@headers = qw(<sys/types.h> "plug-in/plug-ins.h" "widgets/gimphelp.h");
|
||||
|
||||
@procs = qw(help);
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
Reference in New Issue
Block a user