mirror of https://github.com/GNOME/gimp.git
app/Makefile.am removed, chopped...
2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
This commit is contained in:
parent
d4829df4d3
commit
bcd208d9f4
49
ChangeLog
49
ChangeLog
|
@ -1,3 +1,52 @@
|
|||
2001-12-07 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/Makefile.am
|
||||
* app/devices.[ch]: removed, chopped...
|
||||
|
||||
* app/widgets/Makefile.am
|
||||
* app/widgets/widgets-types.h
|
||||
* app/gui/Makefile.am
|
||||
|
||||
* app/widgets/gimpdeviceinfo.[ch]
|
||||
* app/widgets/gimpdevices.[ch]
|
||||
* app/gui/device-status-dialog.[ch]
|
||||
* app/gui/input-dialog.[ch]: ...and added here.
|
||||
|
||||
Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager
|
||||
struct in gimpdevices.c and attach it to the Gimp instance.
|
||||
|
||||
* app/core/gimp.[ch]: removed gimp_create_context(). It was a bad
|
||||
idea in the first place beause it prevented GimpContext subclasses
|
||||
from being be properly registered with their Gimp instance.
|
||||
|
||||
* app/core/gimpcontext.c: moved the stuff which used to be in
|
||||
gimp_create_context() back here. Added a "gimp" property which
|
||||
must be set on construction. Added a "dispose" implementation
|
||||
which removes the context from it's Gimp's context_list.
|
||||
|
||||
* app/gimprc.c
|
||||
* app/core/gimptoolinfo.[ch]
|
||||
* app/display/gimpdisplayshell-callbacks.c
|
||||
* app/gui/brush-select.c
|
||||
* app/gui/dialogs-constructors.c
|
||||
* app/gui/gradient-editor.c
|
||||
* app/gui/gradient-select.c
|
||||
* app/gui/gui.c
|
||||
* app/gui/menus.c
|
||||
* app/gui/palette-editor.c
|
||||
* app/gui/palette-select.c
|
||||
* app/gui/pattern-select.c
|
||||
* app/gui/toolbox.c
|
||||
* app/tools/gimppainttool.c
|
||||
* app/tools/tool_manager.c
|
||||
* app/widgets/gimpimagedock.c: changed accordingly.
|
||||
|
||||
* app/gui/tools-commands.[ch]: made all callback signatures
|
||||
the same.
|
||||
|
||||
* app/gui/preferences-dialog.c: cleaned up the
|
||||
display_format_string GtkCombo code.
|
||||
|
||||
2001-12-07 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpmarshal.[ch]: removed from CVS, they are generated.
|
||||
|
|
|
@ -22,8 +22,6 @@ bin_PROGRAMS = gimp-1.3
|
|||
## gui stuff for gui/, display/ or widgets/
|
||||
##
|
||||
gui_sources = \
|
||||
devices.c \
|
||||
devices.h \
|
||||
nav_window.c \
|
||||
nav_window.h \
|
||||
undo_history.c \
|
||||
|
|
|
@ -35,21 +35,24 @@
|
|||
|
||||
void
|
||||
tools_default_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
gimp_context_set_default_colors (gimp_get_user_context (GIMP (data)));
|
||||
}
|
||||
|
||||
void
|
||||
tools_swap_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
gimp_context_swap_colors (gimp_get_user_context (GIMP (data)));
|
||||
}
|
||||
|
||||
void
|
||||
tools_swap_contexts_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
static GimpContext *swap_context = NULL;
|
||||
static GimpContext *temp_context = NULL;
|
||||
|
@ -60,12 +63,10 @@ tools_swap_contexts_cmd_callback (GtkWidget *widget,
|
|||
|
||||
if (! swap_context)
|
||||
{
|
||||
swap_context = gimp_create_context (gimp,
|
||||
"Swap Context",
|
||||
gimp_get_user_context (gimp));
|
||||
temp_context = gimp_create_context (gimp,
|
||||
"Temp Context",
|
||||
NULL);
|
||||
swap_context = gimp_context_new (gimp, "Swap Context",
|
||||
gimp_get_user_context (gimp));
|
||||
temp_context = gimp_context_new (gimp, "Temp Context",
|
||||
NULL);
|
||||
}
|
||||
|
||||
gimp_context_copy_properties (gimp_get_user_context (gimp),
|
||||
|
|
|
@ -21,11 +21,14 @@
|
|||
|
||||
|
||||
void tools_default_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
gpointer data,
|
||||
guint action);
|
||||
void tools_swap_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
gpointer data,
|
||||
guint action);
|
||||
void tools_swap_contexts_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
gpointer data,
|
||||
guint action);
|
||||
void tools_select_cmd_callback (GtkWidget *widget,
|
||||
gpointer data,
|
||||
guint action);
|
||||
|
|
|
@ -58,14 +58,11 @@
|
|||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
static void gimp_class_init (GimpClass *klass);
|
||||
static void gimp_init (Gimp *gimp);
|
||||
static void gimp_class_init (GimpClass *klass);
|
||||
static void gimp_init (Gimp *gimp);
|
||||
|
||||
static void gimp_dispose (GObject *object);
|
||||
static void gimp_finalize (GObject *object);
|
||||
|
||||
static void gimp_context_disconnect_callback (GimpContext *context,
|
||||
Gimp *gimp);
|
||||
static void gimp_dispose (GObject *object);
|
||||
static void gimp_finalize (GObject *object);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
@ -408,19 +405,19 @@ gimp_initialize (Gimp *gimp,
|
|||
|
||||
gimp_image_new_init (gimp);
|
||||
|
||||
gimp->standard_context = gimp_create_context (gimp, "Standard", NULL);
|
||||
gimp->standard_context = gimp_context_new (gimp, "Standard", NULL);
|
||||
|
||||
/* the default context contains the user's saved preferences
|
||||
*
|
||||
* TODO: load from disk
|
||||
*/
|
||||
context = gimp_create_context (gimp, "Default", NULL);
|
||||
context = gimp_context_new (gimp, "Default", NULL);
|
||||
gimp_set_default_context (gimp, context);
|
||||
g_object_unref (G_OBJECT (context));
|
||||
|
||||
/* the initial user_context is a straight copy of the default context
|
||||
*/
|
||||
context = gimp_create_context (gimp, "User", context);
|
||||
context = gimp_context_new (gimp, "User", context);
|
||||
gimp_set_user_context (gimp, context);
|
||||
g_object_unref (G_OBJECT (context));
|
||||
|
||||
|
@ -700,39 +697,6 @@ gimp_open_file (Gimp *gimp,
|
|||
}
|
||||
#endif
|
||||
|
||||
GimpContext *
|
||||
gimp_create_context (Gimp *gimp,
|
||||
const gchar *name,
|
||||
GimpContext *template)
|
||||
{
|
||||
GimpContext *context;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (! template || GIMP_IS_CONTEXT (template), NULL);
|
||||
|
||||
/* FIXME: need unique names here */
|
||||
if (! name)
|
||||
name = "Unnamed";
|
||||
|
||||
context = gimp_context_new (gimp, name, template);
|
||||
|
||||
gimp->context_list = g_list_prepend (gimp->context_list, context);
|
||||
|
||||
g_signal_connect_object (G_OBJECT (context), "disconnect",
|
||||
G_CALLBACK (gimp_context_disconnect_callback),
|
||||
G_OBJECT (gimp),
|
||||
0);
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_context_disconnect_callback (GimpContext *context,
|
||||
Gimp *gimp)
|
||||
{
|
||||
gimp->context_list = g_list_remove (gimp->context_list, context);
|
||||
}
|
||||
|
||||
GimpContext *
|
||||
gimp_get_standard_context (Gimp *gimp)
|
||||
{
|
||||
|
|
|
@ -170,10 +170,6 @@ void gimp_open_file (Gimp *gimp,
|
|||
gboolean with_display);
|
||||
*/
|
||||
|
||||
GimpContext * gimp_create_context (Gimp *gimp,
|
||||
const gchar *name,
|
||||
GimpContext *template);
|
||||
|
||||
GimpContext * gimp_get_standard_context (Gimp *gimp);
|
||||
|
||||
void gimp_set_default_context (Gimp *gimp,
|
||||
|
|
|
@ -61,6 +61,7 @@ typedef void (* GimpContextCopyPropFunc) (GimpContext *src,
|
|||
static void gimp_context_class_init (GimpContextClass *klass);
|
||||
static void gimp_context_init (GimpContext *context);
|
||||
|
||||
static void gimp_context_dispose (GObject *object);
|
||||
static void gimp_context_finalize (GObject *object);
|
||||
|
||||
static void gimp_context_set_property (GObject *object,
|
||||
|
@ -208,6 +209,7 @@ static void gimp_context_copy_imagefile (GimpContext *src,
|
|||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_GIMP,
|
||||
PROP_IMAGE,
|
||||
PROP_DISPLAY,
|
||||
PROP_TOOL,
|
||||
|
@ -501,6 +503,7 @@ gimp_context_class_init (GimpContextClass *klass)
|
|||
|
||||
object_class->set_property = gimp_context_set_property;
|
||||
object_class->get_property = gimp_context_get_property;
|
||||
object_class->dispose = gimp_context_dispose;
|
||||
object_class->finalize = gimp_context_finalize;
|
||||
|
||||
klass->image_changed = NULL;
|
||||
|
@ -515,7 +518,7 @@ gimp_context_class_init (GimpContextClass *klass)
|
|||
klass->gradient_changed = NULL;
|
||||
klass->palette_changed = NULL;
|
||||
klass->buffer_changed = NULL;
|
||||
klass->imagefile_changed = NULL;
|
||||
klass->imagefile_changed = NULL;
|
||||
|
||||
gimp_context_prop_types[GIMP_CONTEXT_PROP_IMAGE] = GIMP_TYPE_IMAGE;
|
||||
gimp_context_prop_types[GIMP_CONTEXT_PROP_TOOL] = GIMP_TYPE_TOOL_INFO;
|
||||
|
@ -526,6 +529,14 @@ gimp_context_class_init (GimpContextClass *klass)
|
|||
gimp_context_prop_types[GIMP_CONTEXT_PROP_BUFFER] = GIMP_TYPE_BUFFER;
|
||||
gimp_context_prop_types[GIMP_CONTEXT_PROP_IMAGEFILE] = GIMP_TYPE_IMAGEFILE;
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GIMP,
|
||||
g_param_spec_object ("gimp",
|
||||
NULL, NULL,
|
||||
GIMP_TYPE_GIMP,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_IMAGE,
|
||||
g_param_spec_object (gimp_context_prop_names[IMAGE_CHANGED],
|
||||
|
@ -656,6 +667,23 @@ gimp_context_init (GimpContext *context)
|
|||
context->imagefile = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_context_dispose (GObject *object)
|
||||
{
|
||||
GimpContext *context;
|
||||
|
||||
context = GIMP_CONTEXT (object);
|
||||
|
||||
if (context->gimp)
|
||||
{
|
||||
context->gimp->context_list = g_list_remove (context->gimp->context_list,
|
||||
context);
|
||||
context->gimp = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_context_finalize (GObject *object)
|
||||
{
|
||||
|
@ -751,6 +779,11 @@ gimp_context_set_property (GObject *object,
|
|||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_GIMP:
|
||||
context->gimp = g_value_get_object (value);
|
||||
context->gimp->context_list = g_list_prepend (context->gimp->context_list,
|
||||
context);
|
||||
break;
|
||||
case PROP_IMAGE:
|
||||
gimp_context_set_image (context, g_value_get_object (value));
|
||||
break;
|
||||
|
@ -808,6 +841,9 @@ gimp_context_get_property (GObject *object,
|
|||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_GIMP:
|
||||
g_value_set_object (value, context->gimp);
|
||||
break;
|
||||
case PROP_IMAGE:
|
||||
g_value_set_object (value, gimp_context_get_image (context));
|
||||
break;
|
||||
|
@ -867,11 +903,10 @@ gimp_context_new (Gimp *gimp,
|
|||
g_return_val_if_fail (name != NULL, NULL);
|
||||
g_return_val_if_fail (! template || GIMP_IS_CONTEXT (template), NULL);
|
||||
|
||||
context = g_object_new (GIMP_TYPE_CONTEXT, NULL);
|
||||
|
||||
context->gimp = gimp;
|
||||
|
||||
gimp_object_set_name (GIMP_OBJECT (context), name);
|
||||
context = g_object_new (GIMP_TYPE_CONTEXT,
|
||||
"name", name,
|
||||
"gimp", gimp,
|
||||
NULL);
|
||||
|
||||
g_signal_connect_object (G_OBJECT (gimp->images), "remove",
|
||||
G_CALLBACK (gimp_context_image_removed),
|
||||
|
@ -1340,22 +1375,16 @@ gimp_context_real_set_display (GimpContext *context,
|
|||
context);
|
||||
}
|
||||
|
||||
if (display)
|
||||
context->display = display;
|
||||
|
||||
if (context->display)
|
||||
{
|
||||
eek_wrapper = (EEKWrapper *) display;
|
||||
eek_wrapper = (EEKWrapper *) context->display;
|
||||
|
||||
g_signal_connect_object (G_OBJECT (eek_wrapper->shell), "destroy",
|
||||
G_CALLBACK (gimp_context_display_destroy),
|
||||
G_OBJECT (context),
|
||||
0);
|
||||
}
|
||||
|
||||
context->display = display;
|
||||
|
||||
/* set the image _before_ emitting the display_changed signal */
|
||||
if (display)
|
||||
{
|
||||
eek_wrapper = (EEKWrapper *) display;
|
||||
|
||||
gimp_context_real_set_image (context, eek_wrapper->gimage);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ gimp_tool_info_finalize (GObject *object)
|
|||
{
|
||||
GimpToolInfo *tool_info;
|
||||
|
||||
tool_info = (GimpToolInfo *) object;
|
||||
tool_info = GIMP_TOOL_INFO (object);
|
||||
|
||||
if (tool_info->blurb)
|
||||
{
|
||||
|
@ -250,7 +250,7 @@ gimp_tool_info_new (Gimp *gimp,
|
|||
GimpToolInfo *tool_info;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (! context || GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (identifier != NULL, NULL);
|
||||
g_return_val_if_fail (blurb != NULL, NULL);
|
||||
g_return_val_if_fail (help != NULL, NULL);
|
||||
|
@ -264,9 +264,9 @@ gimp_tool_info_new (Gimp *gimp,
|
|||
|
||||
if (tool_context)
|
||||
{
|
||||
tool_info->context = gimp_create_context (context->gimp,
|
||||
identifier,
|
||||
context);
|
||||
tool_info->context = gimp_context_new (gimp,
|
||||
identifier,
|
||||
context);
|
||||
}
|
||||
|
||||
tool_info->gimp = gimp;
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
|
||||
typedef struct _GimpToolInfoClass GimpToolInfoClass;
|
||||
|
||||
|
||||
struct _GimpToolInfo
|
||||
{
|
||||
GimpData parent_instance;
|
||||
|
|
1246
app/devices.c
1246
app/devices.c
File diff suppressed because it is too large
Load Diff
|
@ -1,80 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DEVICES_H__
|
||||
#define __DEVICES_H__
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DEVICE_MODE = 1 << 0,
|
||||
DEVICE_AXES = 1 << 1,
|
||||
DEVICE_KEYS = 1 << 2,
|
||||
DEVICE_TOOL = 1 << 3,
|
||||
DEVICE_FOREGROUND = 1 << 4,
|
||||
DEVICE_BACKGROUND = 1 << 5,
|
||||
DEVICE_BRUSH = 1 << 6,
|
||||
DEVICE_PATTERN = 1 << 7,
|
||||
DEVICE_GRADIENT = 1 << 8
|
||||
} DeviceValues;
|
||||
|
||||
|
||||
/* Initialize the input devices */
|
||||
void devices_init (Gimp *gimp);
|
||||
|
||||
/* Restores device settings from rc file */
|
||||
void devices_restore (Gimp *gimp);
|
||||
|
||||
GdkDevice * devices_get_current (Gimp *gimp);
|
||||
|
||||
/* Returns TRUE, and makes necessary global changes
|
||||
* if event is not for current_device
|
||||
*/
|
||||
gboolean devices_check_change (Gimp *gimp,
|
||||
GdkEvent *event);
|
||||
|
||||
/* Loads stored device settings (tool, cursor, ...) */
|
||||
void devices_select_device (Gimp *gimp,
|
||||
GdkDevice *device);
|
||||
|
||||
/* The device info dialog */
|
||||
GtkWidget * input_dialog_create (Gimp *gimp);
|
||||
void input_dialog_free (Gimp *gimp);
|
||||
|
||||
/* The device status dialog */
|
||||
GtkWidget * device_status_create (Gimp *gimp);
|
||||
void device_status_free (Gimp *gimp);
|
||||
|
||||
/* Add information about one tool from rc file */
|
||||
void devices_rc_update (Gimp *gimp,
|
||||
gchar *name,
|
||||
DeviceValues values,
|
||||
GdkInputMode mode,
|
||||
gint num_axes,
|
||||
GdkAxisUse *axes,
|
||||
gint num_keys,
|
||||
GdkDeviceKey *keys,
|
||||
const gchar *tool_name,
|
||||
GimpRGB *foreground,
|
||||
GimpRGB *background,
|
||||
const gchar *brush_name,
|
||||
const gchar *pattern_name,
|
||||
const gchar *gradient_name);
|
||||
|
||||
|
||||
#endif /* __DEVICES_H__ */
|
|
@ -57,6 +57,7 @@
|
|||
#include "channels-commands.h"
|
||||
#include "color-area.h"
|
||||
#include "colormap-dialog.h"
|
||||
#include "device-status-dialog.h"
|
||||
#include "dialogs.h"
|
||||
#include "dialogs-constructors.h"
|
||||
#include "documents-commands.h"
|
||||
|
@ -64,6 +65,7 @@
|
|||
#include "gradient-editor.h"
|
||||
#include "gradient-select.h"
|
||||
#include "gradients-commands.h"
|
||||
#include "input-dialog.h"
|
||||
#include "layers-commands.h"
|
||||
#include "menus.h"
|
||||
#include "module-browser.h"
|
||||
|
@ -78,7 +80,6 @@
|
|||
#include "tool-options-dialog.h"
|
||||
#include "toolbox.h"
|
||||
|
||||
#include "devices.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo_history.h"
|
||||
|
||||
|
@ -177,7 +178,7 @@ dialogs_device_status_get (GimpDialogFactory *factory,
|
|||
GimpContext *context,
|
||||
gint preview_size)
|
||||
{
|
||||
return device_status_create (context->gimp);
|
||||
return device_status_dialog_create (context->gimp);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
|
|
@ -371,7 +371,7 @@ prefs_check_settings (Gimp *gimp)
|
|||
|
||||
static void
|
||||
prefs_restart_notification_save_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data)
|
||||
{
|
||||
prefs_save_callback (widget, prefs_dialog);
|
||||
gtk_widget_destroy (GTK_WIDGET (data));
|
||||
|
@ -1355,6 +1355,7 @@ prefs_notebook_append_page (GtkNotebook *notebook,
|
|||
GtkWidget *label;
|
||||
|
||||
event_box = gtk_event_box_new ();
|
||||
gtk_notebook_append_page (notebook, event_box, NULL);
|
||||
gtk_widget_show (event_box);
|
||||
|
||||
gimp_help_set_help_data (event_box, NULL, help_data);
|
||||
|
@ -1382,8 +1383,6 @@ prefs_notebook_append_page (GtkNotebook *notebook,
|
|||
gtk_tree_store_append (tree, iter, parent);
|
||||
gtk_tree_store_set (tree, iter, 0, tree_label, 1, page_index, -1);
|
||||
|
||||
gtk_notebook_append_page (notebook, event_box, NULL);
|
||||
|
||||
return vbox;
|
||||
}
|
||||
|
||||
|
@ -1465,8 +1464,6 @@ preferences_dialog_create (Gimp *gimp)
|
|||
GtkWidget *fileselection;
|
||||
GtkWidget *patheditor;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *comboitem;
|
||||
GtkWidget *optionmenu;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
|
@ -1779,7 +1776,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
|
@ -1982,19 +1979,19 @@ preferences_dialog_create (Gimp *gimp)
|
|||
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* Don't show the Auto-save button until we really
|
||||
have auto-saving in the gimp.
|
||||
#if 0
|
||||
/* Don't show the Auto-save button until we really
|
||||
* have auto-saving in the gimp.
|
||||
*/
|
||||
button = gtk_check_button_new_with_label(_("Auto Save"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), auto_save);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_check_button_new_with_label(_("Auto save"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
auto_save);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
auto_save);
|
||||
*/
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
&auto_save);
|
||||
#endif
|
||||
|
||||
optionmenu =
|
||||
gimp_option_menu_new2 (FALSE,
|
||||
|
@ -2241,45 +2238,53 @@ preferences_dialog_create (Gimp *gimp)
|
|||
&gimprc.marching_speed);
|
||||
|
||||
/* The title format string */
|
||||
combo = gtk_combo_new ();
|
||||
gtk_combo_set_use_arrows (GTK_COMBO (combo), FALSE);
|
||||
gtk_combo_set_value_in_list (GTK_COMBO (combo), FALSE, FALSE);
|
||||
/* Set the currently used string as "Custom" */
|
||||
comboitem = gtk_list_item_new_with_label (_("Custom"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
gimprc.image_title_format);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
/* set some commonly used format strings */
|
||||
comboitem = gtk_list_item_new_with_label (_("Standard"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t)");
|
||||
gtk_container_add(GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
comboitem = gtk_list_item_new_with_label (_("Show zoom percentage"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t) %z%%");
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
comboitem = gtk_list_item_new_with_label (_("Show zoom ratio"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t) %d:%s");
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
comboitem = gtk_list_item_new_with_label (_("Show reversed zoom ratio"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t) %s:%d");
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
{
|
||||
GtkWidget *combo;
|
||||
GtkWidget *comboitem;
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Image Title Format:"), 1.0, 0.5,
|
||||
combo, 1, FALSE);
|
||||
const gchar *format_strings[] =
|
||||
{
|
||||
NULL,
|
||||
"%f-%p.%i (%t)",
|
||||
"%f-%p.%i (%t) %z%%",
|
||||
"%f-%p.%i (%t) %d:%s",
|
||||
"%f-%p.%i (%t) %s:%d"
|
||||
};
|
||||
|
||||
g_signal_connect (G_OBJECT (GTK_COMBO (combo)->entry), "changed",
|
||||
G_CALLBACK (prefs_string_callback),
|
||||
&gimprc.image_title_format);
|
||||
/* End of the title format string */
|
||||
const gchar *combo_strings[] =
|
||||
{
|
||||
N_("Custom"),
|
||||
N_("Standard"),
|
||||
N_("Show zoom percentage"),
|
||||
N_("Show zoom ratio"),
|
||||
N_("Show reversed zoom ratio")
|
||||
};
|
||||
|
||||
g_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (combo_strings));
|
||||
|
||||
format_strings[0] = gimprc.image_title_format;
|
||||
|
||||
combo = gtk_combo_new ();
|
||||
gtk_combo_set_use_arrows (GTK_COMBO (combo), FALSE);
|
||||
gtk_combo_set_value_in_list (GTK_COMBO (combo), FALSE, FALSE);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (combo_strings); i++)
|
||||
{
|
||||
comboitem = gtk_list_item_new_with_label (gettext (combo_strings[i]));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
format_strings[i]);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
}
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Image Title Format:"), 1.0, 0.5,
|
||||
combo, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (GTK_COMBO (combo)->entry), "changed",
|
||||
G_CALLBACK (prefs_string_callback),
|
||||
&gimprc.image_title_format);
|
||||
}
|
||||
|
||||
vbox2 = prefs_frame_new (_("Pointer Movement Feedback"), GTK_BOX (vbox));
|
||||
|
||||
|
@ -2674,7 +2679,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
|
||||
group = NULL;
|
||||
button = gtk_radio_button_new_with_label (group, _("From windowing system"));
|
||||
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (prefs_res_source_callback),
|
||||
NULL);
|
||||
|
@ -2696,16 +2701,16 @@ preferences_dialog_create (Gimp *gimp)
|
|||
gtk_widget_show (separator);
|
||||
|
||||
button = gtk_radio_button_new_with_label (group, _("Manually:"));
|
||||
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), abox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (abox);
|
||||
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
||||
if (! gimprc.using_xserver_resolution)
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
|
||||
|
@ -2720,7 +2725,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
page_index);
|
||||
gtk_widget_show (vbox);
|
||||
page_index++;
|
||||
|
||||
|
||||
{
|
||||
static const struct
|
||||
{
|
||||
|
@ -2733,21 +2738,20 @@ preferences_dialog_create (Gimp *gimp)
|
|||
{ N_("Temp Dir:"), N_("Select Temp Dir"), &edit_temp_path },
|
||||
{ N_("Swap Dir:"), N_("Select Swap Dir"), &edit_swap_path },
|
||||
};
|
||||
static gint ndirs = sizeof (dirs) / sizeof (dirs[0]);
|
||||
|
||||
table = gtk_table_new (ndirs + 1, 2, FALSE);
|
||||
|
||||
table = gtk_table_new (G_N_ELEMENTS (dirs) + 1, 2, FALSE);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
for (i = 0; i < ndirs; i++)
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (dirs); i++)
|
||||
{
|
||||
fileselection = gimp_file_selection_new (gettext(dirs[i].fs_label),
|
||||
fileselection = gimp_file_selection_new (gettext (dirs[i].fs_label),
|
||||
*(dirs[i].mdir),
|
||||
TRUE, TRUE);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, i,
|
||||
gettext(dirs[i].label), 1.0, 0.5,
|
||||
gettext (dirs[i].label), 1.0, 0.5,
|
||||
fileselection, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (fileselection), "filename_changed",
|
||||
|
@ -2797,9 +2801,8 @@ preferences_dialog_create (Gimp *gimp)
|
|||
N_("Select Themes Dir"),
|
||||
&edit_theme_path }
|
||||
};
|
||||
static gint npaths = sizeof (paths) / sizeof (paths[0]);
|
||||
|
||||
for (i = 0; i < npaths; i++)
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (paths); i++)
|
||||
{
|
||||
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
gettext (paths[i].label),
|
||||
|
@ -2812,7 +2815,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
gtk_widget_show (vbox);
|
||||
page_index++;
|
||||
|
||||
patheditor = gimp_path_editor_new (gettext(paths[i].fs_label),
|
||||
patheditor = gimp_path_editor_new (gettext (paths[i].fs_label),
|
||||
*(paths[i].mpath));
|
||||
gtk_container_add (GTK_CONTAINER (vbox), patheditor);
|
||||
gtk_widget_show (patheditor);
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "widgets/gimpcursor.h"
|
||||
#include "widgets/gimpdevices.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
|
@ -56,7 +57,6 @@
|
|||
#include "gimpdisplayshell-scroll.h"
|
||||
#include "gimpdisplayshell-selection.h"
|
||||
|
||||
#include "devices.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -269,21 +269,11 @@ gimp_display_shell_canvas_focus_out (GtkWidget *widget,
|
|||
static void
|
||||
gimp_display_shell_check_device_cursor (GimpDisplayShell *shell)
|
||||
{
|
||||
GList *list;
|
||||
GdkDevice *current_device;
|
||||
|
||||
/* gdk_devices_list() returns an internal list, so we shouldn't
|
||||
* free it afterwards
|
||||
*/
|
||||
for (list = gdk_devices_list (); list; list = g_list_next (list))
|
||||
{
|
||||
GdkDevice *device = (GdkDevice *) list->data;
|
||||
current_device = gimp_devices_get_current (shell->gdisp->gimage->gimp);
|
||||
|
||||
if (device == devices_get_current (shell->gdisp->gimage->gimp))
|
||||
{
|
||||
shell->draw_cursor = ! device->has_cursor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
shell->draw_cursor = ! current_device->has_cursor;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -317,16 +307,16 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
|||
gimage = gdisp->gimage;
|
||||
|
||||
/* Find out what device the event occurred upon */
|
||||
if (! gimage->gimp->busy && devices_check_change (gimage->gimp, event))
|
||||
if (! gimage->gimp->busy && gimp_devices_check_change (gimage->gimp, event))
|
||||
{
|
||||
gimp_display_shell_check_device_cursor (shell);
|
||||
}
|
||||
|
||||
gimp_display_shell_get_coords (shell, event,
|
||||
devices_get_current (gimage->gimp),
|
||||
gimp_devices_get_current (gimage->gimp),
|
||||
&display_coords);
|
||||
gimp_display_shell_get_state (shell, event,
|
||||
devices_get_current (gimage->gimp),
|
||||
gimp_devices_get_current (gimage->gimp),
|
||||
&state);
|
||||
time = gdk_event_get_time (event);
|
||||
|
||||
|
|
45
app/gimprc.c
45
app/gimprc.c
|
@ -49,6 +49,7 @@
|
|||
|
||||
#include "plug-in/plug-in.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
|
||||
#include "tools/gimptool.h"
|
||||
|
@ -57,7 +58,6 @@
|
|||
#include "gui/menus.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "general.h"
|
||||
#include "gimphelp.h"
|
||||
#include "gimprc.h"
|
||||
|
@ -2126,9 +2126,9 @@ static gint
|
|||
parse_device (gpointer val1p,
|
||||
gpointer val2p)
|
||||
{
|
||||
DeviceValues values = 0;
|
||||
gint i;
|
||||
gint token;
|
||||
GimpDeviceValues values = 0;
|
||||
gint i;
|
||||
gint token;
|
||||
|
||||
/* The initialized values here are meaningless */
|
||||
gchar *name = NULL;
|
||||
|
@ -2165,7 +2165,7 @@ parse_device (gpointer val1p,
|
|||
|
||||
if (!strcmp ("mode", token_sym))
|
||||
{
|
||||
values |= DEVICE_MODE;
|
||||
values |= GIMP_DEVICE_VALUE_MODE;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_SYMBOL))
|
||||
|
@ -2183,7 +2183,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("axes", token_sym))
|
||||
{
|
||||
values |= DEVICE_AXES;
|
||||
values |= GIMP_DEVICE_VALUE_AXES;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_NUMBER))
|
||||
|
@ -2218,7 +2218,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("keys", token_sym))
|
||||
{
|
||||
values |= DEVICE_KEYS;
|
||||
values |= GIMP_DEVICE_VALUE_KEYS;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_NUMBER))
|
||||
|
@ -2240,7 +2240,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("tool", token_sym))
|
||||
{
|
||||
values |= DEVICE_TOOL;
|
||||
values |= GIMP_DEVICE_VALUE_TOOL;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_STRING))
|
||||
|
@ -2251,7 +2251,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("foreground", token_sym))
|
||||
{
|
||||
values |= DEVICE_FOREGROUND;
|
||||
values |= GIMP_DEVICE_VALUE_FOREGROUND;
|
||||
|
||||
if (parse_color (&foreground) == ERROR)
|
||||
goto error;
|
||||
|
@ -2260,7 +2260,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("background", token_sym))
|
||||
{
|
||||
values |= DEVICE_BACKGROUND;
|
||||
values |= GIMP_DEVICE_VALUE_BACKGROUND;
|
||||
|
||||
if (parse_color (&background) == ERROR)
|
||||
goto error;
|
||||
|
@ -2269,7 +2269,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("brush", token_sym))
|
||||
{
|
||||
values |= DEVICE_BRUSH;
|
||||
values |= GIMP_DEVICE_VALUE_BRUSH;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_STRING))
|
||||
|
@ -2280,7 +2280,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("pattern", token_sym))
|
||||
{
|
||||
values |= DEVICE_PATTERN;
|
||||
values |= GIMP_DEVICE_VALUE_PATTERN;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_STRING))
|
||||
|
@ -2291,7 +2291,7 @@ parse_device (gpointer val1p,
|
|||
}
|
||||
else if (!strcmp ("gradient", token_sym))
|
||||
{
|
||||
values |= DEVICE_GRADIENT;
|
||||
values |= GIMP_DEVICE_VALUE_GRADIENT;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_STRING))
|
||||
|
@ -2313,14 +2313,17 @@ parse_device (gpointer val1p,
|
|||
goto error;
|
||||
token = get_next_token ();
|
||||
|
||||
devices_rc_update (the_gimp,
|
||||
name, values, mode, num_axes, axes, num_keys, keys,
|
||||
tool_name,
|
||||
&foreground,
|
||||
&background,
|
||||
brush_name,
|
||||
pattern_name,
|
||||
gradient_name);
|
||||
gimp_devices_rc_update (the_gimp,
|
||||
name,
|
||||
values,
|
||||
mode,
|
||||
num_axes, axes,
|
||||
num_keys, keys,
|
||||
tool_name,
|
||||
&foreground, &background,
|
||||
brush_name,
|
||||
pattern_name,
|
||||
gradient_name);
|
||||
|
||||
g_free (tool_name);
|
||||
g_free (brush_name);
|
||||
|
|
|
@ -30,6 +30,8 @@ libappgui_a_SOURCES = @STRIP_BEGIN@ \
|
|||
convert-dialog.h \
|
||||
data-commands.c \
|
||||
data-commands.h \
|
||||
device-status-dialog.c \
|
||||
device-status-dialog.h \
|
||||
dialogs.c \
|
||||
dialogs.h \
|
||||
dialogs-commands.c \
|
||||
|
@ -71,6 +73,8 @@ libappgui_a_SOURCES = @STRIP_BEGIN@ \
|
|||
info-dialog.h \
|
||||
info-window.c \
|
||||
info-window.h \
|
||||
input-dialog.c \
|
||||
input-dialog.h \
|
||||
layers-commands.c \
|
||||
layers-commands.h \
|
||||
menus.c \
|
||||
|
|
|
@ -157,7 +157,7 @@ brush_select_new (Gimp *gimp,
|
|||
|
||||
if (title)
|
||||
{
|
||||
bsp->context = gimp_create_context (gimp, title, NULL);
|
||||
bsp->context = gimp_context_new (gimp, title, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,28 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DEVICE_STATUS_DIALOG_H__
|
||||
#define __DEVICE_STATUS_DIALOG_H__
|
||||
|
||||
|
||||
GtkWidget * device_status_dialog_create (Gimp *gimp);
|
||||
|
||||
void device_status_dialog_update_current (Gimp *gimp);
|
||||
|
||||
|
||||
#endif /* __DEVICE_STATUS_DIALOG_H__ */
|
|
@ -57,6 +57,7 @@
|
|||
#include "channels-commands.h"
|
||||
#include "color-area.h"
|
||||
#include "colormap-dialog.h"
|
||||
#include "device-status-dialog.h"
|
||||
#include "dialogs.h"
|
||||
#include "dialogs-constructors.h"
|
||||
#include "documents-commands.h"
|
||||
|
@ -64,6 +65,7 @@
|
|||
#include "gradient-editor.h"
|
||||
#include "gradient-select.h"
|
||||
#include "gradients-commands.h"
|
||||
#include "input-dialog.h"
|
||||
#include "layers-commands.h"
|
||||
#include "menus.h"
|
||||
#include "module-browser.h"
|
||||
|
@ -78,7 +80,6 @@
|
|||
#include "tool-options-dialog.h"
|
||||
#include "toolbox.h"
|
||||
|
||||
#include "devices.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo_history.h"
|
||||
|
||||
|
@ -177,7 +178,7 @@ dialogs_device_status_get (GimpDialogFactory *factory,
|
|||
GimpContext *context,
|
||||
gint preview_size)
|
||||
{
|
||||
return device_status_create (context->gimp);
|
||||
return device_status_dialog_create (context->gimp);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
|
|
@ -256,7 +256,7 @@ gradient_editor_new (Gimp *gimp)
|
|||
|
||||
editor = g_new (GradientEditor, 1);
|
||||
|
||||
editor->context = gimp_create_context (gimp, NULL, NULL);
|
||||
editor->context = gimp_context_new (gimp, "Gradient Editor", NULL);
|
||||
|
||||
g_signal_connect (G_OBJECT (editor->context), "gradient_changed",
|
||||
G_CALLBACK (gradient_editor_gradient_changed),
|
||||
|
|
|
@ -123,7 +123,7 @@ gradient_select_new (Gimp *gimp,
|
|||
|
||||
if (title)
|
||||
{
|
||||
gsp->context = gimp_create_context (gimp, title, NULL);
|
||||
gsp->context = gimp_context_new (gimp, title, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,13 +39,14 @@
|
|||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpdisplayshell-render.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "brush-select.h"
|
||||
#include "color-select.h"
|
||||
#include "devices.h"
|
||||
#include "device-status-dialog.h"
|
||||
#include "dialogs.h"
|
||||
#include "error-console-dialog.h"
|
||||
#include "file-open-dialog.h"
|
||||
|
@ -257,7 +258,7 @@ gui_init (Gimp *gimp)
|
|||
|
||||
dialogs_init (gimp);
|
||||
|
||||
devices_init (gimp);
|
||||
gimp_devices_init (gimp, device_status_dialog_update_current);
|
||||
session_init (gimp);
|
||||
}
|
||||
|
||||
|
@ -279,7 +280,7 @@ gui_restore (Gimp *gimp,
|
|||
|
||||
color_select_init ();
|
||||
|
||||
devices_restore (gimp);
|
||||
gimp_devices_restore (gimp);
|
||||
|
||||
if (gimprc.always_restore_session || restore_session)
|
||||
session_restore (gimp);
|
||||
|
@ -305,7 +306,9 @@ gui_shutdown (Gimp *gimp)
|
|||
gimp->message_handler = GIMP_CONSOLE;
|
||||
|
||||
session_save (gimp);
|
||||
device_status_free (gimp);
|
||||
|
||||
if (gimprc.save_device_status)
|
||||
gimp_devices_save (gimp);
|
||||
|
||||
brush_dialog_free ();
|
||||
pattern_dialog_free ();
|
||||
|
@ -324,6 +327,7 @@ gui_exit (Gimp *gimp)
|
|||
render_free ();
|
||||
|
||||
dialogs_exit (gimp);
|
||||
gimp_devices_exit (gimp);
|
||||
|
||||
/* handle this in the dialog factory: */
|
||||
tool_options_dialog_free (gimp);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,27 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __INPUT_DIALOG_H__
|
||||
#define __INPUT_DIALOG_H__
|
||||
|
||||
|
||||
GtkWidget * input_dialog_create (Gimp *gimp);
|
||||
void input_dialog_free (Gimp *gimp);
|
||||
|
||||
|
||||
#endif /* __INPUT_DIALOG_H__ */
|
|
@ -500,7 +500,7 @@ static GimpItemFactoryEntry image_entries[] =
|
|||
"<StockItem>", GTK_STOCK_ZOOM_OUT },
|
||||
NULL,
|
||||
"view/zoom.html", NULL },
|
||||
{ { N_("/View/Zoom to Fit Window"), NULL,
|
||||
{ { N_("/View/Zoom to Fit Window"), "<control><shift>E",
|
||||
view_zoom_fit_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_ZOOM_FIT },
|
||||
NULL,
|
||||
|
|
|
@ -244,7 +244,7 @@ palette_editor_new (Gimp *gimp)
|
|||
|
||||
palette_editor = g_new0 (PaletteEditor, 1);
|
||||
|
||||
palette_editor->context = gimp_create_context (gimp, NULL, NULL);
|
||||
palette_editor->context = gimp_context_new (gimp, "Palette Editor", NULL);
|
||||
|
||||
palette_editor->zoom_factor = 1.0;
|
||||
palette_editor->columns = COLUMNS;
|
||||
|
|
|
@ -124,7 +124,7 @@ palette_select_new (Gimp *gimp,
|
|||
|
||||
if (title)
|
||||
{
|
||||
psp->context = gimp_create_context (gimp, title, NULL);
|
||||
psp->context = gimp_context_new (gimp, title, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ pattern_select_new (Gimp *gimp,
|
|||
|
||||
if (title)
|
||||
{
|
||||
psp->context = gimp_create_context (gimp, title, NULL);
|
||||
psp->context = gimp_context_new (gimp, title, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -371,7 +371,7 @@ prefs_check_settings (Gimp *gimp)
|
|||
|
||||
static void
|
||||
prefs_restart_notification_save_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data)
|
||||
{
|
||||
prefs_save_callback (widget, prefs_dialog);
|
||||
gtk_widget_destroy (GTK_WIDGET (data));
|
||||
|
@ -1355,6 +1355,7 @@ prefs_notebook_append_page (GtkNotebook *notebook,
|
|||
GtkWidget *label;
|
||||
|
||||
event_box = gtk_event_box_new ();
|
||||
gtk_notebook_append_page (notebook, event_box, NULL);
|
||||
gtk_widget_show (event_box);
|
||||
|
||||
gimp_help_set_help_data (event_box, NULL, help_data);
|
||||
|
@ -1382,8 +1383,6 @@ prefs_notebook_append_page (GtkNotebook *notebook,
|
|||
gtk_tree_store_append (tree, iter, parent);
|
||||
gtk_tree_store_set (tree, iter, 0, tree_label, 1, page_index, -1);
|
||||
|
||||
gtk_notebook_append_page (notebook, event_box, NULL);
|
||||
|
||||
return vbox;
|
||||
}
|
||||
|
||||
|
@ -1465,8 +1464,6 @@ preferences_dialog_create (Gimp *gimp)
|
|||
GtkWidget *fileselection;
|
||||
GtkWidget *patheditor;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *comboitem;
|
||||
GtkWidget *optionmenu;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
|
@ -1779,7 +1776,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
|
@ -1982,19 +1979,19 @@ preferences_dialog_create (Gimp *gimp)
|
|||
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* Don't show the Auto-save button until we really
|
||||
have auto-saving in the gimp.
|
||||
#if 0
|
||||
/* Don't show the Auto-save button until we really
|
||||
* have auto-saving in the gimp.
|
||||
*/
|
||||
button = gtk_check_button_new_with_label(_("Auto Save"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), auto_save);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_check_button_new_with_label(_("Auto save"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
auto_save);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
auto_save);
|
||||
*/
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (prefs_toggle_callback),
|
||||
&auto_save);
|
||||
#endif
|
||||
|
||||
optionmenu =
|
||||
gimp_option_menu_new2 (FALSE,
|
||||
|
@ -2241,45 +2238,53 @@ preferences_dialog_create (Gimp *gimp)
|
|||
&gimprc.marching_speed);
|
||||
|
||||
/* The title format string */
|
||||
combo = gtk_combo_new ();
|
||||
gtk_combo_set_use_arrows (GTK_COMBO (combo), FALSE);
|
||||
gtk_combo_set_value_in_list (GTK_COMBO (combo), FALSE, FALSE);
|
||||
/* Set the currently used string as "Custom" */
|
||||
comboitem = gtk_list_item_new_with_label (_("Custom"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
gimprc.image_title_format);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
/* set some commonly used format strings */
|
||||
comboitem = gtk_list_item_new_with_label (_("Standard"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t)");
|
||||
gtk_container_add(GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
comboitem = gtk_list_item_new_with_label (_("Show zoom percentage"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t) %z%%");
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
comboitem = gtk_list_item_new_with_label (_("Show zoom ratio"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t) %d:%s");
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
comboitem = gtk_list_item_new_with_label (_("Show reversed zoom ratio"));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
"%f-%p.%i (%t) %s:%d");
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
{
|
||||
GtkWidget *combo;
|
||||
GtkWidget *comboitem;
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Image Title Format:"), 1.0, 0.5,
|
||||
combo, 1, FALSE);
|
||||
const gchar *format_strings[] =
|
||||
{
|
||||
NULL,
|
||||
"%f-%p.%i (%t)",
|
||||
"%f-%p.%i (%t) %z%%",
|
||||
"%f-%p.%i (%t) %d:%s",
|
||||
"%f-%p.%i (%t) %s:%d"
|
||||
};
|
||||
|
||||
g_signal_connect (G_OBJECT (GTK_COMBO (combo)->entry), "changed",
|
||||
G_CALLBACK (prefs_string_callback),
|
||||
&gimprc.image_title_format);
|
||||
/* End of the title format string */
|
||||
const gchar *combo_strings[] =
|
||||
{
|
||||
N_("Custom"),
|
||||
N_("Standard"),
|
||||
N_("Show zoom percentage"),
|
||||
N_("Show zoom ratio"),
|
||||
N_("Show reversed zoom ratio")
|
||||
};
|
||||
|
||||
g_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (combo_strings));
|
||||
|
||||
format_strings[0] = gimprc.image_title_format;
|
||||
|
||||
combo = gtk_combo_new ();
|
||||
gtk_combo_set_use_arrows (GTK_COMBO (combo), FALSE);
|
||||
gtk_combo_set_value_in_list (GTK_COMBO (combo), FALSE, FALSE);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (combo_strings); i++)
|
||||
{
|
||||
comboitem = gtk_list_item_new_with_label (gettext (combo_strings[i]));
|
||||
gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (comboitem),
|
||||
format_strings[i]);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
|
||||
gtk_widget_show (comboitem);
|
||||
}
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Image Title Format:"), 1.0, 0.5,
|
||||
combo, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (GTK_COMBO (combo)->entry), "changed",
|
||||
G_CALLBACK (prefs_string_callback),
|
||||
&gimprc.image_title_format);
|
||||
}
|
||||
|
||||
vbox2 = prefs_frame_new (_("Pointer Movement Feedback"), GTK_BOX (vbox));
|
||||
|
||||
|
@ -2674,7 +2679,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
|
||||
group = NULL;
|
||||
button = gtk_radio_button_new_with_label (group, _("From windowing system"));
|
||||
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (prefs_res_source_callback),
|
||||
NULL);
|
||||
|
@ -2696,16 +2701,16 @@ preferences_dialog_create (Gimp *gimp)
|
|||
gtk_widget_show (separator);
|
||||
|
||||
button = gtk_radio_button_new_with_label (group, _("Manually:"));
|
||||
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), abox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (abox);
|
||||
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
||||
if (! gimprc.using_xserver_resolution)
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
|
||||
|
@ -2720,7 +2725,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
page_index);
|
||||
gtk_widget_show (vbox);
|
||||
page_index++;
|
||||
|
||||
|
||||
{
|
||||
static const struct
|
||||
{
|
||||
|
@ -2733,21 +2738,20 @@ preferences_dialog_create (Gimp *gimp)
|
|||
{ N_("Temp Dir:"), N_("Select Temp Dir"), &edit_temp_path },
|
||||
{ N_("Swap Dir:"), N_("Select Swap Dir"), &edit_swap_path },
|
||||
};
|
||||
static gint ndirs = sizeof (dirs) / sizeof (dirs[0]);
|
||||
|
||||
table = gtk_table_new (ndirs + 1, 2, FALSE);
|
||||
|
||||
table = gtk_table_new (G_N_ELEMENTS (dirs) + 1, 2, FALSE);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
for (i = 0; i < ndirs; i++)
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (dirs); i++)
|
||||
{
|
||||
fileselection = gimp_file_selection_new (gettext(dirs[i].fs_label),
|
||||
fileselection = gimp_file_selection_new (gettext (dirs[i].fs_label),
|
||||
*(dirs[i].mdir),
|
||||
TRUE, TRUE);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, i,
|
||||
gettext(dirs[i].label), 1.0, 0.5,
|
||||
gettext (dirs[i].label), 1.0, 0.5,
|
||||
fileselection, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (fileselection), "filename_changed",
|
||||
|
@ -2797,9 +2801,8 @@ preferences_dialog_create (Gimp *gimp)
|
|||
N_("Select Themes Dir"),
|
||||
&edit_theme_path }
|
||||
};
|
||||
static gint npaths = sizeof (paths) / sizeof (paths[0]);
|
||||
|
||||
for (i = 0; i < npaths; i++)
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (paths); i++)
|
||||
{
|
||||
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
gettext (paths[i].label),
|
||||
|
@ -2812,7 +2815,7 @@ preferences_dialog_create (Gimp *gimp)
|
|||
gtk_widget_show (vbox);
|
||||
page_index++;
|
||||
|
||||
patheditor = gimp_path_editor_new (gettext(paths[i].fs_label),
|
||||
patheditor = gimp_path_editor_new (gettext (paths[i].fs_label),
|
||||
*(paths[i].mpath));
|
||||
gtk_container_add (GTK_CONTAINER (vbox), patheditor);
|
||||
gtk_widget_show (patheditor);
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "core/gimplist.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpdnd.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
@ -48,7 +49,6 @@
|
|||
#include "widgets/gtkhwrapbox.h"
|
||||
|
||||
#include "color-area.h"
|
||||
#include "devices.h"
|
||||
#include "dialogs.h"
|
||||
#include "indicator-area.h"
|
||||
|
||||
|
@ -150,7 +150,7 @@ toolbox_check_device (GtkWidget *widget,
|
|||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
devices_check_change (GIMP (data), event);
|
||||
gimp_devices_check_change (GIMP (data), event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -35,21 +35,24 @@
|
|||
|
||||
void
|
||||
tools_default_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
gimp_context_set_default_colors (gimp_get_user_context (GIMP (data)));
|
||||
}
|
||||
|
||||
void
|
||||
tools_swap_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
gimp_context_swap_colors (gimp_get_user_context (GIMP (data)));
|
||||
}
|
||||
|
||||
void
|
||||
tools_swap_contexts_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data,
|
||||
guint action)
|
||||
{
|
||||
static GimpContext *swap_context = NULL;
|
||||
static GimpContext *temp_context = NULL;
|
||||
|
@ -60,12 +63,10 @@ tools_swap_contexts_cmd_callback (GtkWidget *widget,
|
|||
|
||||
if (! swap_context)
|
||||
{
|
||||
swap_context = gimp_create_context (gimp,
|
||||
"Swap Context",
|
||||
gimp_get_user_context (gimp));
|
||||
temp_context = gimp_create_context (gimp,
|
||||
"Temp Context",
|
||||
NULL);
|
||||
swap_context = gimp_context_new (gimp, "Swap Context",
|
||||
gimp_get_user_context (gimp));
|
||||
temp_context = gimp_context_new (gimp, "Temp Context",
|
||||
NULL);
|
||||
}
|
||||
|
||||
gimp_context_copy_properties (gimp_get_user_context (gimp),
|
||||
|
|
|
@ -21,11 +21,14 @@
|
|||
|
||||
|
||||
void tools_default_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
gpointer data,
|
||||
guint action);
|
||||
void tools_swap_colors_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
gpointer data,
|
||||
guint action);
|
||||
void tools_swap_contexts_cmd_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
gpointer data,
|
||||
guint action);
|
||||
void tools_select_cmd_callback (GtkWidget *widget,
|
||||
gpointer data,
|
||||
guint action);
|
||||
|
|
|
@ -500,7 +500,7 @@ static GimpItemFactoryEntry image_entries[] =
|
|||
"<StockItem>", GTK_STOCK_ZOOM_OUT },
|
||||
NULL,
|
||||
"view/zoom.html", NULL },
|
||||
{ { N_("/View/Zoom to Fit Window"), NULL,
|
||||
{ { N_("/View/Zoom to Fit Window"), "<control><shift>E",
|
||||
view_zoom_fit_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_ZOOM_FIT },
|
||||
NULL,
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
@ -58,7 +60,6 @@
|
|||
#include "gimppainttool.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo.h"
|
||||
|
||||
|
@ -1128,7 +1129,7 @@ gimp_paint_tool_get_paint_area (GimpPaintTool *paint_tool,
|
|||
gimp_drawable_bytes (drawable) : gimp_drawable_bytes (drawable) + 1;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (paint_tool->brush->mask, scale,
|
||||
&bwidth, &bheight);
|
||||
&bwidth, &bheight);
|
||||
|
||||
/* adjust the x and y coordinates to the upper left corner of the brush */
|
||||
x = (gint) floor (paint_tool->cur_coords.x) - (bwidth >> 1);
|
||||
|
@ -1298,7 +1299,7 @@ gimp_paint_tool_calculate_brush_size (MaskBuf *mask,
|
|||
{
|
||||
scale = CLAMP (scale, 0.0, 1.0);
|
||||
|
||||
if (devices_get_current (the_gimp) == gdk_device_get_core_pointer ())
|
||||
if (gimp_devices_get_current (the_gimp) == gdk_device_get_core_pointer ())
|
||||
{
|
||||
*width = mask->width;
|
||||
*height = mask->height;
|
||||
|
@ -1554,7 +1555,7 @@ gimp_paint_tool_scale_mask (MaskBuf *brush_mask,
|
|||
return brush_mask;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (brush_mask, scale,
|
||||
&dest_width, &dest_height);
|
||||
&dest_width, &dest_height);
|
||||
|
||||
if (brush_mask == last_brush && !cache_invalid &&
|
||||
dest_width == last_width && dest_height == last_height)
|
||||
|
@ -1592,7 +1593,7 @@ gimp_paint_tool_scale_pixmap (MaskBuf *brush_mask,
|
|||
return brush_mask;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (brush_mask, scale,
|
||||
&dest_width, &dest_height);
|
||||
&dest_width, &dest_height);
|
||||
|
||||
if (brush_mask == last_brush && !cache_invalid &&
|
||||
dest_width == last_width && dest_height == last_height)
|
||||
|
@ -1621,10 +1622,15 @@ gimp_paint_tool_get_brush_mask (GimpPaintTool *paint_tool,
|
|||
|
||||
tool = GIMP_TOOL (paint_tool);
|
||||
|
||||
if (devices_get_current (tool->tool_info->gimp) == gdk_device_get_core_pointer ())
|
||||
mask = paint_tool->brush->mask;
|
||||
if (gimp_devices_get_current (tool->tool_info->gimp) ==
|
||||
gdk_device_get_core_pointer ())
|
||||
{
|
||||
mask = paint_tool->brush->mask;
|
||||
}
|
||||
else
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
{
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
}
|
||||
|
||||
switch (brush_hardness)
|
||||
{
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
@ -58,7 +60,6 @@
|
|||
#include "gimppainttool.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo.h"
|
||||
|
||||
|
@ -1128,7 +1129,7 @@ gimp_paint_tool_get_paint_area (GimpPaintTool *paint_tool,
|
|||
gimp_drawable_bytes (drawable) : gimp_drawable_bytes (drawable) + 1;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (paint_tool->brush->mask, scale,
|
||||
&bwidth, &bheight);
|
||||
&bwidth, &bheight);
|
||||
|
||||
/* adjust the x and y coordinates to the upper left corner of the brush */
|
||||
x = (gint) floor (paint_tool->cur_coords.x) - (bwidth >> 1);
|
||||
|
@ -1298,7 +1299,7 @@ gimp_paint_tool_calculate_brush_size (MaskBuf *mask,
|
|||
{
|
||||
scale = CLAMP (scale, 0.0, 1.0);
|
||||
|
||||
if (devices_get_current (the_gimp) == gdk_device_get_core_pointer ())
|
||||
if (gimp_devices_get_current (the_gimp) == gdk_device_get_core_pointer ())
|
||||
{
|
||||
*width = mask->width;
|
||||
*height = mask->height;
|
||||
|
@ -1554,7 +1555,7 @@ gimp_paint_tool_scale_mask (MaskBuf *brush_mask,
|
|||
return brush_mask;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (brush_mask, scale,
|
||||
&dest_width, &dest_height);
|
||||
&dest_width, &dest_height);
|
||||
|
||||
if (brush_mask == last_brush && !cache_invalid &&
|
||||
dest_width == last_width && dest_height == last_height)
|
||||
|
@ -1592,7 +1593,7 @@ gimp_paint_tool_scale_pixmap (MaskBuf *brush_mask,
|
|||
return brush_mask;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (brush_mask, scale,
|
||||
&dest_width, &dest_height);
|
||||
&dest_width, &dest_height);
|
||||
|
||||
if (brush_mask == last_brush && !cache_invalid &&
|
||||
dest_width == last_width && dest_height == last_height)
|
||||
|
@ -1621,10 +1622,15 @@ gimp_paint_tool_get_brush_mask (GimpPaintTool *paint_tool,
|
|||
|
||||
tool = GIMP_TOOL (paint_tool);
|
||||
|
||||
if (devices_get_current (tool->tool_info->gimp) == gdk_device_get_core_pointer ())
|
||||
mask = paint_tool->brush->mask;
|
||||
if (gimp_devices_get_current (tool->tool_info->gimp) ==
|
||||
gdk_device_get_core_pointer ())
|
||||
{
|
||||
mask = paint_tool->brush->mask;
|
||||
}
|
||||
else
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
{
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
}
|
||||
|
||||
switch (brush_hardness)
|
||||
{
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
@ -58,7 +60,6 @@
|
|||
#include "gimppainttool.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo.h"
|
||||
|
||||
|
@ -1128,7 +1129,7 @@ gimp_paint_tool_get_paint_area (GimpPaintTool *paint_tool,
|
|||
gimp_drawable_bytes (drawable) : gimp_drawable_bytes (drawable) + 1;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (paint_tool->brush->mask, scale,
|
||||
&bwidth, &bheight);
|
||||
&bwidth, &bheight);
|
||||
|
||||
/* adjust the x and y coordinates to the upper left corner of the brush */
|
||||
x = (gint) floor (paint_tool->cur_coords.x) - (bwidth >> 1);
|
||||
|
@ -1298,7 +1299,7 @@ gimp_paint_tool_calculate_brush_size (MaskBuf *mask,
|
|||
{
|
||||
scale = CLAMP (scale, 0.0, 1.0);
|
||||
|
||||
if (devices_get_current (the_gimp) == gdk_device_get_core_pointer ())
|
||||
if (gimp_devices_get_current (the_gimp) == gdk_device_get_core_pointer ())
|
||||
{
|
||||
*width = mask->width;
|
||||
*height = mask->height;
|
||||
|
@ -1554,7 +1555,7 @@ gimp_paint_tool_scale_mask (MaskBuf *brush_mask,
|
|||
return brush_mask;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (brush_mask, scale,
|
||||
&dest_width, &dest_height);
|
||||
&dest_width, &dest_height);
|
||||
|
||||
if (brush_mask == last_brush && !cache_invalid &&
|
||||
dest_width == last_width && dest_height == last_height)
|
||||
|
@ -1592,7 +1593,7 @@ gimp_paint_tool_scale_pixmap (MaskBuf *brush_mask,
|
|||
return brush_mask;
|
||||
|
||||
gimp_paint_tool_calculate_brush_size (brush_mask, scale,
|
||||
&dest_width, &dest_height);
|
||||
&dest_width, &dest_height);
|
||||
|
||||
if (brush_mask == last_brush && !cache_invalid &&
|
||||
dest_width == last_width && dest_height == last_height)
|
||||
|
@ -1621,10 +1622,15 @@ gimp_paint_tool_get_brush_mask (GimpPaintTool *paint_tool,
|
|||
|
||||
tool = GIMP_TOOL (paint_tool);
|
||||
|
||||
if (devices_get_current (tool->tool_info->gimp) == gdk_device_get_core_pointer ())
|
||||
mask = paint_tool->brush->mask;
|
||||
if (gimp_devices_get_current (tool->tool_info->gimp) ==
|
||||
gdk_device_get_core_pointer ())
|
||||
{
|
||||
mask = paint_tool->brush->mask;
|
||||
}
|
||||
else
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
{
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
}
|
||||
|
||||
switch (brush_hardness)
|
||||
{
|
||||
|
|
|
@ -120,9 +120,9 @@ tool_manager_init (Gimp *gimp)
|
|||
/* Create a context to store the paint options of the
|
||||
* global paint options mode
|
||||
*/
|
||||
tool_manager->global_tool_context = gimp_create_context (gimp,
|
||||
"Global Tool Context",
|
||||
user_context);
|
||||
tool_manager->global_tool_context = gimp_context_new (gimp,
|
||||
"Global Tool Context",
|
||||
user_context);
|
||||
|
||||
/* TODO: add foreground, background, brush, pattern, gradient */
|
||||
gimp_context_define_properties (tool_manager->global_tool_context,
|
||||
|
@ -594,7 +594,6 @@ tool_manager_register_tool (Gimp *gimp,
|
|||
#ifdef __GNUC__
|
||||
#warning FIXME: remove gtk_widget_get_default_style()
|
||||
#endif
|
||||
|
||||
style = gtk_widget_get_default_style ();
|
||||
|
||||
pixbuf = gtk_icon_set_render_icon (icon_set,
|
||||
|
|
|
@ -38,6 +38,10 @@ libappwidgets_a_SOURCES = @STRIP_BEGIN@ \
|
|||
gimpcursor.h \
|
||||
gimpdatafactoryview.c \
|
||||
gimpdatafactoryview.h \
|
||||
gimpdeviceinfo.c \
|
||||
gimpdeviceinfo.h \
|
||||
gimpdevices.c \
|
||||
gimpdevices.h \
|
||||
gimpdialogfactory.c \
|
||||
gimpdialogfactory.h \
|
||||
gimpdnd.c \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,103 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_DEVICE_INFO_H__
|
||||
#define __GIMP_DEVICE_INFO_H__
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define GIMP_DEVICE_INFO_CONTEXT_MASK (GIMP_CONTEXT_TOOL_MASK | \
|
||||
GIMP_CONTEXT_FOREGROUND_MASK | \
|
||||
GIMP_CONTEXT_BACKGROUND_MASK | \
|
||||
GIMP_CONTEXT_BRUSH_MASK | \
|
||||
GIMP_CONTEXT_PATTERN_MASK | \
|
||||
GIMP_CONTEXT_GRADIENT_MASK)
|
||||
|
||||
|
||||
#define GIMP_TYPE_DEVICE_INFO (gimp_device_info_get_type ())
|
||||
#define GIMP_DEVICE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DEVICE_INFO, GimpDeviceInfo))
|
||||
#define GIMP_DEVICE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DEVICE_INFO, GimpDeviceInfoClass))
|
||||
#define GIMP_IS_DEVICE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DEVICE_INFO))
|
||||
#define GIMP_IS_DEVICE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DEVICE_INFO))
|
||||
#define GIMP_DEVICE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DEVICE_INFO, GimpDeviceInfoClass))
|
||||
|
||||
|
||||
typedef struct _GimpDeviceInfoClass GimpDeviceInfoClass;
|
||||
|
||||
struct _GimpDeviceInfo
|
||||
{
|
||||
GimpContext parent_instance;
|
||||
|
||||
GdkDevice *device;
|
||||
|
||||
/* either "device" or the options below are set */
|
||||
|
||||
GdkInputMode mode;
|
||||
gint num_axes;
|
||||
GdkAxisUse *axes;
|
||||
gint num_keys;
|
||||
GdkDeviceKey *keys;
|
||||
};
|
||||
|
||||
struct _GimpDeviceInfoClass
|
||||
{
|
||||
GimpContextClass parent_class;
|
||||
|
||||
void (* changed) (GimpDeviceInfo *device_info);
|
||||
};
|
||||
|
||||
|
||||
GType gimp_device_info_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpDeviceInfo * gimp_device_info_new (Gimp *gimp,
|
||||
const gchar *name);
|
||||
|
||||
GimpDeviceInfo * gimp_device_info_set_from_device (GimpDeviceInfo *device_info,
|
||||
GdkDevice *device);
|
||||
GimpDeviceInfo * gimp_device_info_set_from_rc (GimpDeviceInfo *device_info,
|
||||
GimpDeviceValues values,
|
||||
GdkInputMode mode,
|
||||
gint num_axes,
|
||||
const GdkAxisUse *axes,
|
||||
gint num_keys,
|
||||
const GdkDeviceKey *keys,
|
||||
const gchar *tool_name,
|
||||
const GimpRGB *foreground,
|
||||
const GimpRGB *background,
|
||||
const gchar *brush_name,
|
||||
const gchar *pattern_name,
|
||||
const gchar *gradient_name);
|
||||
|
||||
void gimp_device_info_changed (GimpDeviceInfo *device_info);
|
||||
void gimp_device_info_save (GimpDeviceInfo *device_info,
|
||||
FILE *fp);
|
||||
|
||||
GimpDeviceInfo * gimp_device_info_get_by_device (GdkDevice *device);
|
||||
void gimp_device_info_changed_by_device (GdkDevice *device);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_DEVICE_INFO_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -16,65 +16,41 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DEVICES_H__
|
||||
#define __DEVICES_H__
|
||||
#ifndef __GIMP_DEVICES_H__
|
||||
#define __GIMP_DEVICES_H__
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DEVICE_MODE = 1 << 0,
|
||||
DEVICE_AXES = 1 << 1,
|
||||
DEVICE_KEYS = 1 << 2,
|
||||
DEVICE_TOOL = 1 << 3,
|
||||
DEVICE_FOREGROUND = 1 << 4,
|
||||
DEVICE_BACKGROUND = 1 << 5,
|
||||
DEVICE_BRUSH = 1 << 6,
|
||||
DEVICE_PATTERN = 1 << 7,
|
||||
DEVICE_GRADIENT = 1 << 8
|
||||
} DeviceValues;
|
||||
typedef void (* GimpDeviceChangeNotify) (Gimp *gimp);
|
||||
|
||||
|
||||
/* Initialize the input devices */
|
||||
void devices_init (Gimp *gimp);
|
||||
void gimp_devices_init (Gimp *gimp,
|
||||
GimpDeviceChangeNotify change_notify);
|
||||
void gimp_devices_exit (Gimp *gimp);
|
||||
|
||||
/* Restores device settings from rc file */
|
||||
void devices_restore (Gimp *gimp);
|
||||
void gimp_devices_restore (Gimp *gimp);
|
||||
void gimp_devices_save (Gimp *gimp);
|
||||
|
||||
GdkDevice * devices_get_current (Gimp *gimp);
|
||||
GdkDevice * gimp_devices_get_current (Gimp *gimp);
|
||||
|
||||
/* Returns TRUE, and makes necessary global changes
|
||||
* if event is not for current_device
|
||||
*/
|
||||
gboolean devices_check_change (Gimp *gimp,
|
||||
GdkEvent *event);
|
||||
gboolean gimp_devices_check_change (Gimp *gimp,
|
||||
GdkEvent *event);
|
||||
void gimp_devices_select_device (Gimp *gimp,
|
||||
GdkDevice *device);
|
||||
|
||||
/* Loads stored device settings (tool, cursor, ...) */
|
||||
void devices_select_device (Gimp *gimp,
|
||||
GdkDevice *device);
|
||||
|
||||
/* The device info dialog */
|
||||
GtkWidget * input_dialog_create (Gimp *gimp);
|
||||
void input_dialog_free (Gimp *gimp);
|
||||
|
||||
/* The device status dialog */
|
||||
GtkWidget * device_status_create (Gimp *gimp);
|
||||
void device_status_free (Gimp *gimp);
|
||||
|
||||
/* Add information about one tool from rc file */
|
||||
void devices_rc_update (Gimp *gimp,
|
||||
gchar *name,
|
||||
DeviceValues values,
|
||||
GdkInputMode mode,
|
||||
gint num_axes,
|
||||
GdkAxisUse *axes,
|
||||
gint num_keys,
|
||||
GdkDeviceKey *keys,
|
||||
const gchar *tool_name,
|
||||
GimpRGB *foreground,
|
||||
GimpRGB *background,
|
||||
const gchar *brush_name,
|
||||
const gchar *pattern_name,
|
||||
const gchar *gradient_name);
|
||||
void gimp_devices_rc_update (Gimp *gimp,
|
||||
const gchar *name,
|
||||
GimpDeviceValues values,
|
||||
GdkInputMode mode,
|
||||
gint num_axes,
|
||||
const GdkAxisUse *axes,
|
||||
gint num_keys,
|
||||
const GdkDeviceKey *keys,
|
||||
const gchar *tool_name,
|
||||
const GimpRGB *foreground,
|
||||
const GimpRGB *background,
|
||||
const gchar *brush_name,
|
||||
const gchar *pattern_name,
|
||||
const gchar *gradient_name);
|
||||
|
||||
|
||||
#endif /* __DEVICES_H__ */
|
||||
#endif /* __GIMP_DEVICES_H__ */
|
||||
|
|
|
@ -256,7 +256,7 @@ gradient_editor_new (Gimp *gimp)
|
|||
|
||||
editor = g_new (GradientEditor, 1);
|
||||
|
||||
editor->context = gimp_create_context (gimp, NULL, NULL);
|
||||
editor->context = gimp_context_new (gimp, "Gradient Editor", NULL);
|
||||
|
||||
g_signal_connect (G_OBJECT (editor->context), "gradient_changed",
|
||||
G_CALLBACK (gradient_editor_gradient_changed),
|
||||
|
|
|
@ -182,8 +182,8 @@ gimp_image_dock_new (GimpDialogFactory *factory,
|
|||
|
||||
dock->factory = factory;
|
||||
|
||||
dock->context = gimp_create_context (factory->context->gimp,
|
||||
"Dock Context", NULL);
|
||||
dock->context = gimp_context_new (factory->context->gimp,
|
||||
"Dock Context", NULL);
|
||||
gimp_context_define_properties (dock->context,
|
||||
GIMP_CONTEXT_ALL_PROPS_MASK &
|
||||
~(GIMP_CONTEXT_IMAGE_MASK |
|
||||
|
|
|
@ -182,8 +182,8 @@ gimp_image_dock_new (GimpDialogFactory *factory,
|
|||
|
||||
dock->factory = factory;
|
||||
|
||||
dock->context = gimp_create_context (factory->context->gimp,
|
||||
"Dock Context", NULL);
|
||||
dock->context = gimp_context_new (factory->context->gimp,
|
||||
"Dock Context", NULL);
|
||||
gimp_context_define_properties (dock->context,
|
||||
GIMP_CONTEXT_ALL_PROPS_MASK &
|
||||
~(GIMP_CONTEXT_IMAGE_MASK |
|
||||
|
|
|
@ -244,7 +244,7 @@ palette_editor_new (Gimp *gimp)
|
|||
|
||||
palette_editor = g_new0 (PaletteEditor, 1);
|
||||
|
||||
palette_editor->context = gimp_create_context (gimp, NULL, NULL);
|
||||
palette_editor->context = gimp_context_new (gimp, "Palette Editor", NULL);
|
||||
|
||||
palette_editor->zoom_factor = 1.0;
|
||||
palette_editor->columns = COLUMNS;
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "core/gimplist.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpdnd.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
|
@ -48,7 +49,6 @@
|
|||
#include "widgets/gtkhwrapbox.h"
|
||||
|
||||
#include "color-area.h"
|
||||
#include "devices.h"
|
||||
#include "dialogs.h"
|
||||
#include "indicator-area.h"
|
||||
|
||||
|
@ -150,7 +150,7 @@ toolbox_check_device (GtkWidget *widget,
|
|||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
devices_check_change (GIMP (data), event);
|
||||
gimp_devices_check_change (GIMP (data), event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -112,9 +112,23 @@ typedef enum
|
|||
GIMP_LAST_CURSOR_MODIFIER_ENTRY
|
||||
} GimpCursorModifier;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_DEVICE_VALUE_MODE = 1 << 0,
|
||||
GIMP_DEVICE_VALUE_AXES = 1 << 1,
|
||||
GIMP_DEVICE_VALUE_KEYS = 1 << 2,
|
||||
GIMP_DEVICE_VALUE_TOOL = 1 << 3,
|
||||
GIMP_DEVICE_VALUE_FOREGROUND = 1 << 4,
|
||||
GIMP_DEVICE_VALUE_BACKGROUND = 1 << 5,
|
||||
GIMP_DEVICE_VALUE_BRUSH = 1 << 6,
|
||||
GIMP_DEVICE_VALUE_PATTERN = 1 << 7,
|
||||
GIMP_DEVICE_VALUE_GRADIENT = 1 << 8
|
||||
} GimpDeviceValues;
|
||||
|
||||
|
||||
/* non-widget objects */
|
||||
|
||||
typedef struct _GimpDeviceInfo GimpDeviceInfo;
|
||||
typedef struct _GimpDialogFactory GimpDialogFactory;
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2001-12-07 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* POTFILES.in: app/devices.c -> app/gui/devie-status-dialog.
|
||||
|
||||
2001-11-30 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* POTFILES.in: app/plug_in.c -> app/plug-in/plug-in.c
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# marked to allow runtime translation of messages
|
||||
|
||||
app/app_procs.c
|
||||
app/devices.c
|
||||
app/floating_sel.c
|
||||
app/gimphelp.c
|
||||
app/gimpprogress.c
|
||||
|
@ -48,6 +47,7 @@ app/gui/color-notebook.c
|
|||
app/gui/color-select.c
|
||||
app/gui/colormap-dialog.c
|
||||
app/gui/convert-dialog.c
|
||||
app/gui/device-status-dialog.c
|
||||
app/gui/dialogs-constructors.c
|
||||
app/gui/edit-commands.c
|
||||
app/gui/file-commands.c
|
||||
|
|
Loading…
Reference in New Issue