1998-06-06 12:06:56 +08:00
|
|
|
/* 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.
|
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
#include <stdio.h>
|
1998-06-06 12:06:56 +08:00
|
|
|
#include <string.h>
|
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
#include <gtk/gtk.h>
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-01-24 02:49:44 +08:00
|
|
|
#include "libgimpcolor/gimpcolor.h"
|
2001-05-22 04:30:16 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
2001-01-24 02:49:44 +08:00
|
|
|
|
2001-05-08 11:48:54 +08:00
|
|
|
#include "widgets/widgets-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimpbrush.h"
|
|
|
|
#include "core/gimpcontainer.h"
|
|
|
|
#include "core/gimpdatafactory.h"
|
|
|
|
#include "core/gimpgradient.h"
|
|
|
|
#include "core/gimppattern.h"
|
2001-05-10 06:34:59 +08:00
|
|
|
#include "core/gimptoolinfo.h"
|
2001-02-21 20:18:09 +08:00
|
|
|
|
2001-05-09 03:29:15 +08:00
|
|
|
#include "widgets/gimpdnd.h"
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "widgets/gimpdeviceinfo.h"
|
|
|
|
#include "widgets/gimpdevices.h"
|
2001-04-11 09:13:53 +08:00
|
|
|
#include "widgets/gimppreview.h"
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "device-status-dialog.h"
|
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
#include "gimprc.h"
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
|
1998-08-01 06:44:26 +08:00
|
|
|
#define CELL_SIZE 20 /* The size of the preview cells */
|
1999-10-27 02:27:27 +08:00
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
typedef struct _DeviceStatusDialog DeviceStatusDialog;
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
struct _DeviceStatusDialog
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
gint num_devices;
|
1999-10-27 02:27:27 +08:00
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
GdkDevice *current;
|
|
|
|
GdkDevice **devices;
|
1998-06-06 12:06:56 +08:00
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
GtkWidget *shell;
|
|
|
|
GtkWidget *table;
|
1998-06-06 12:06:56 +08:00
|
|
|
|
|
|
|
GtkWidget **frames;
|
|
|
|
GtkWidget **tools;
|
2001-01-16 06:39:50 +08:00
|
|
|
GtkWidget **foregrounds;
|
|
|
|
GtkWidget **backgrounds;
|
1998-06-06 12:06:56 +08:00
|
|
|
GtkWidget **brushes;
|
1998-08-01 06:44:26 +08:00
|
|
|
GtkWidget **patterns;
|
1999-10-28 23:05:49 +08:00
|
|
|
GtkWidget **gradients;
|
1998-06-06 12:06:56 +08:00
|
|
|
};
|
|
|
|
|
2001-01-08 05:07:14 +08:00
|
|
|
|
1999-10-27 02:27:27 +08:00
|
|
|
/* local functions */
|
2001-02-11 03:35:29 +08:00
|
|
|
|
|
|
|
static void device_status_destroy_callback (void);
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
static void device_status_dialog_update (GimpDeviceInfo *device_info,
|
|
|
|
DeviceStatusDialog *dialog);
|
|
|
|
static void device_status_drop_tool (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data);
|
|
|
|
static void device_status_foreground_changed (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void device_status_background_changed (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void device_status_drop_brush (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data);
|
|
|
|
static void device_status_drop_pattern (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data);
|
|
|
|
static void device_status_drop_gradient (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* local data */
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
static DeviceStatusDialog *deviceD = NULL;
|
1998-06-06 12:06:56 +08:00
|
|
|
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* public functions */
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
GtkWidget *
|
2001-12-08 01:39:51 +08:00
|
|
|
device_status_dialog_create (Gimp *gimp)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceInfo *device_info;
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *label;
|
|
|
|
GimpRGB color;
|
|
|
|
GList *list;
|
|
|
|
gint i;
|
2001-02-12 11:27:28 +08:00
|
|
|
|
2001-12-02 05:02:34 +08:00
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
if (deviceD)
|
2001-04-19 00:39:34 +08:00
|
|
|
return deviceD->shell;
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
deviceD = g_new (DeviceStatusDialog, 1);
|
1999-01-11 07:20:33 +08:00
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
deviceD->shell = gimp_dialog_new (_("Device Status"), "device_status",
|
|
|
|
gimp_standard_help_func,
|
|
|
|
"dialogs/device_status.html",
|
|
|
|
GTK_WIN_POS_NONE,
|
|
|
|
FALSE, FALSE, TRUE,
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
GTK_STOCK_CLOSE, gtk_widget_hide,
|
|
|
|
NULL, 1, NULL, TRUE, TRUE,
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
GTK_STOCK_SAVE, gimp_devices_save,
|
|
|
|
NULL, gimp, NULL, FALSE, FALSE,
|
2001-11-24 07:04:49 +08:00
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
NULL);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
deviceD->num_devices = g_list_length (gdk_devices_list ());
|
2001-04-18 00:00:27 +08:00
|
|
|
|
|
|
|
/* devices table */
|
|
|
|
deviceD->table = gtk_table_new (deviceD->num_devices, 7, FALSE);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (deviceD->table), 3);
|
|
|
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (deviceD->shell)->vbox),
|
|
|
|
deviceD->table);
|
|
|
|
gtk_widget_realize (deviceD->table);
|
|
|
|
gtk_widget_show (deviceD->table);
|
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
deviceD->devices = g_new (GdkDevice *, deviceD->num_devices);
|
2001-04-18 00:00:27 +08:00
|
|
|
deviceD->frames = g_new (GtkWidget *, deviceD->num_devices);
|
|
|
|
deviceD->tools = g_new (GtkWidget *, deviceD->num_devices);
|
|
|
|
deviceD->foregrounds = g_new (GtkWidget *, deviceD->num_devices);
|
|
|
|
deviceD->backgrounds = g_new (GtkWidget *, deviceD->num_devices);
|
|
|
|
deviceD->brushes = g_new (GtkWidget *, deviceD->num_devices);
|
|
|
|
deviceD->patterns = g_new (GtkWidget *, deviceD->num_devices);
|
|
|
|
deviceD->gradients = g_new (GtkWidget *, deviceD->num_devices);
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
for (list = gdk_devices_list (), i = 0;
|
|
|
|
list;
|
|
|
|
list = g_list_next (list), i++)
|
2001-04-18 00:00:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = gimp_device_info_get_by_device (GDK_DEVICE (list->data));
|
|
|
|
|
|
|
|
context = GIMP_CONTEXT (device_info);
|
2001-04-18 00:00:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect (G_OBJECT (device_info), "changed",
|
|
|
|
G_CALLBACK (device_status_dialog_update),
|
|
|
|
deviceD);
|
2001-04-18 00:00:27 +08:00
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
deviceD->devices[i] = device_info->device;
|
2001-04-18 00:00:27 +08:00
|
|
|
|
|
|
|
/* the device name */
|
|
|
|
|
|
|
|
deviceD->frames[i] = gtk_frame_new (NULL);
|
|
|
|
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME(deviceD->frames[i]), GTK_SHADOW_OUT);
|
|
|
|
gtk_table_attach (GTK_TABLE(deviceD->table), deviceD->frames[i],
|
|
|
|
0, 1, i, i+1,
|
|
|
|
GTK_FILL, GTK_FILL, 2, 0);
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
label = gtk_label_new (GIMP_OBJECT (device_info)->name);
|
2001-04-18 00:00:27 +08:00
|
|
|
gtk_misc_set_padding (GTK_MISC(label), 2, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER(deviceD->frames[i]), label);
|
|
|
|
gtk_widget_show(label);
|
|
|
|
|
|
|
|
/* the tool */
|
|
|
|
|
|
|
|
deviceD->tools[i] =
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_tool (context)),
|
2001-04-18 00:00:27 +08:00
|
|
|
CELL_SIZE, CELL_SIZE, 0,
|
|
|
|
FALSE, FALSE, TRUE);
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect_object (G_OBJECT (context), "tool_changed",
|
2001-07-29 22:09:50 +08:00
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (deviceD->tools[i]),
|
|
|
|
G_CONNECT_SWAPPED);
|
2001-04-18 00:00:27 +08:00
|
|
|
gimp_gtk_drag_dest_set_by_type (deviceD->tools[i],
|
|
|
|
GTK_DEST_DEFAULT_ALL,
|
2001-02-21 20:18:09 +08:00
|
|
|
GIMP_TYPE_TOOL_INFO,
|
2001-04-18 00:00:27 +08:00
|
|
|
GDK_ACTION_COPY);
|
|
|
|
gimp_dnd_viewable_dest_set (deviceD->tools[i],
|
|
|
|
GIMP_TYPE_TOOL_INFO,
|
|
|
|
device_status_drop_tool,
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
device_info);
|
2001-04-18 00:00:27 +08:00
|
|
|
gtk_table_attach (GTK_TABLE (deviceD->table), deviceD->tools[i],
|
|
|
|
1, 2, i, i+1,
|
|
|
|
0, 0, 2, 2);
|
|
|
|
|
|
|
|
/* the foreground color */
|
|
|
|
|
|
|
|
deviceD->foregrounds[i] =
|
|
|
|
gimp_color_area_new (&color,
|
|
|
|
GIMP_COLOR_AREA_FLAT,
|
|
|
|
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK);
|
|
|
|
gtk_widget_set_usize (deviceD->foregrounds[i], CELL_SIZE, CELL_SIZE);
|
2001-07-29 22:09:50 +08:00
|
|
|
g_signal_connect (G_OBJECT (deviceD->foregrounds[i]), "color_changed",
|
|
|
|
G_CALLBACK (device_status_foreground_changed),
|
|
|
|
device_info);
|
2001-04-18 00:00:27 +08:00
|
|
|
gtk_table_attach (GTK_TABLE (deviceD->table),
|
|
|
|
deviceD->foregrounds[i],
|
|
|
|
2, 3, i, i+1,
|
|
|
|
0, 0, 2, 2);
|
|
|
|
|
|
|
|
/* the background color */
|
|
|
|
|
|
|
|
deviceD->backgrounds[i] =
|
|
|
|
gimp_color_area_new (&color,
|
|
|
|
GIMP_COLOR_AREA_FLAT,
|
|
|
|
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK);
|
|
|
|
gtk_widget_set_usize (deviceD->backgrounds[i], CELL_SIZE, CELL_SIZE);
|
2001-07-29 22:09:50 +08:00
|
|
|
g_signal_connect (G_OBJECT (deviceD->backgrounds[i]), "color_changed",
|
|
|
|
G_CALLBACK (device_status_background_changed),
|
|
|
|
device_info);
|
2001-04-18 00:00:27 +08:00
|
|
|
gtk_table_attach (GTK_TABLE (deviceD->table),
|
|
|
|
deviceD->backgrounds[i],
|
|
|
|
3, 4, i, i+1,
|
|
|
|
0, 0, 2, 2);
|
|
|
|
|
|
|
|
/* the brush */
|
|
|
|
|
|
|
|
deviceD->brushes[i] =
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_brush (context)),
|
2001-04-18 00:00:27 +08:00
|
|
|
CELL_SIZE, CELL_SIZE, 0,
|
|
|
|
FALSE, FALSE, TRUE);
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect_object (G_OBJECT (context),"brush_changed",
|
2001-07-29 22:09:50 +08:00
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (deviceD->brushes[i]),
|
|
|
|
G_CONNECT_SWAPPED);
|
2001-04-18 00:00:27 +08:00
|
|
|
gimp_gtk_drag_dest_set_by_type (deviceD->brushes[i],
|
|
|
|
GTK_DEST_DEFAULT_ALL,
|
2001-02-12 11:27:28 +08:00
|
|
|
GIMP_TYPE_BRUSH,
|
2001-04-18 00:00:27 +08:00
|
|
|
GDK_ACTION_COPY);
|
|
|
|
gimp_dnd_viewable_dest_set (deviceD->brushes[i],
|
|
|
|
GIMP_TYPE_BRUSH,
|
|
|
|
device_status_drop_brush,
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
device_info);
|
2001-04-18 00:00:27 +08:00
|
|
|
gtk_table_attach (GTK_TABLE (deviceD->table), deviceD->brushes[i],
|
|
|
|
4, 5, i, i+1,
|
|
|
|
0, 0, 2, 2);
|
|
|
|
|
|
|
|
/* the pattern */
|
|
|
|
|
|
|
|
deviceD->patterns[i] =
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_pattern (context)),
|
2001-04-18 00:00:27 +08:00
|
|
|
CELL_SIZE, CELL_SIZE, 0,
|
|
|
|
FALSE, FALSE, TRUE);
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect_object (G_OBJECT (context), "pattern_changed",
|
2001-07-29 22:09:50 +08:00
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (deviceD->patterns[i]),
|
|
|
|
G_CONNECT_SWAPPED);
|
2001-04-18 00:00:27 +08:00
|
|
|
gimp_gtk_drag_dest_set_by_type (deviceD->patterns[i],
|
|
|
|
GTK_DEST_DEFAULT_ALL,
|
2001-02-12 11:27:28 +08:00
|
|
|
GIMP_TYPE_PATTERN,
|
2001-04-18 00:00:27 +08:00
|
|
|
GDK_ACTION_COPY);
|
|
|
|
gimp_dnd_viewable_dest_set (deviceD->patterns[i],
|
|
|
|
GIMP_TYPE_PATTERN,
|
|
|
|
device_status_drop_pattern,
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
device_info);
|
2001-04-18 00:00:27 +08:00
|
|
|
gtk_table_attach (GTK_TABLE(deviceD->table), deviceD->patterns[i],
|
|
|
|
5, 6, i, i+1,
|
|
|
|
0, 0, 2, 2);
|
|
|
|
|
|
|
|
/* the gradient */
|
|
|
|
|
|
|
|
deviceD->gradients[i] =
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_gradient (context)),
|
2001-04-18 00:00:27 +08:00
|
|
|
CELL_SIZE * 2, CELL_SIZE, 0,
|
|
|
|
FALSE, FALSE, TRUE);
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect_object (G_OBJECT (context), "gradient_changed",
|
2001-07-29 22:09:50 +08:00
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (deviceD->gradients[i]),
|
|
|
|
G_CONNECT_SWAPPED);
|
2001-04-18 00:00:27 +08:00
|
|
|
gimp_gtk_drag_dest_set_by_type (deviceD->gradients[i],
|
|
|
|
GTK_DEST_DEFAULT_ALL,
|
2001-02-12 11:27:28 +08:00
|
|
|
GIMP_TYPE_GRADIENT,
|
2001-04-18 00:00:27 +08:00
|
|
|
GDK_ACTION_COPY);
|
|
|
|
gimp_dnd_viewable_dest_set (deviceD->gradients[i],
|
|
|
|
GIMP_TYPE_GRADIENT,
|
|
|
|
device_status_drop_gradient,
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
device_info);
|
2001-04-18 00:00:27 +08:00
|
|
|
gtk_table_attach (GTK_TABLE(deviceD->table), deviceD->gradients[i],
|
|
|
|
6, 7, i, i+1,
|
|
|
|
0, 0, 2, 2);
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_status_dialog_update (device_info, deviceD);
|
2001-04-18 00:00:27 +08:00
|
|
|
}
|
1999-10-28 23:05:49 +08:00
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
deviceD->current = NULL;
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_status_dialog_update_current (gimp);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-07-29 22:09:50 +08:00
|
|
|
g_signal_connect (G_OBJECT (deviceD->shell), "destroy",
|
|
|
|
G_CALLBACK (device_status_destroy_callback),
|
|
|
|
NULL);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
return deviceD->shell;
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
void
|
|
|
|
device_status_dialog_update_current (Gimp *gimp)
|
|
|
|
{
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
|
|
|
|
|
|
|
if (deviceD)
|
|
|
|
{
|
|
|
|
for (i = 0; i < deviceD->num_devices; i++)
|
|
|
|
{
|
|
|
|
if (deviceD->devices[i] == deviceD->current)
|
|
|
|
{
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME(deviceD->frames[i]),
|
|
|
|
GTK_SHADOW_OUT);
|
|
|
|
}
|
|
|
|
else if (deviceD->devices[i] == gimp_devices_get_current (gimp))
|
|
|
|
{
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME(deviceD->frames[i]),
|
|
|
|
GTK_SHADOW_IN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
deviceD->current = gimp_devices_get_current (gimp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* private functions */
|
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
static void
|
|
|
|
device_status_destroy_callback (void)
|
|
|
|
{
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
g_free (deviceD->devices);
|
1999-10-27 02:27:27 +08:00
|
|
|
g_free (deviceD->frames);
|
|
|
|
g_free (deviceD->tools);
|
2001-01-16 06:39:50 +08:00
|
|
|
g_free (deviceD->foregrounds);
|
|
|
|
g_free (deviceD->backgrounds);
|
1999-10-27 02:27:27 +08:00
|
|
|
g_free (deviceD->brushes);
|
|
|
|
g_free (deviceD->patterns);
|
1999-10-28 23:05:49 +08:00
|
|
|
g_free (deviceD->gradients);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
|
|
|
g_free (deviceD);
|
1998-06-06 12:06:56 +08:00
|
|
|
deviceD = NULL;
|
|
|
|
}
|
|
|
|
|
2001-11-23 07:08:56 +08:00
|
|
|
static void
|
2001-12-08 01:39:51 +08:00
|
|
|
device_status_dialog_update (GimpDeviceInfo *device_info,
|
|
|
|
DeviceStatusDialog *dialog)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpContext *context;
|
|
|
|
GimpRGB color;
|
|
|
|
guchar red, green, blue;
|
|
|
|
gchar ttbuf[64];
|
|
|
|
gint i;
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
context = GIMP_CONTEXT (device_info);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
for (i = 0; i < dialog->num_devices; i++)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
if (dialog->devices[i] == device_info->device)
|
1999-10-27 02:27:27 +08:00
|
|
|
break;
|
|
|
|
}
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (i < dialog->num_devices);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device_info->device->mode == GDK_MODE_DISABLED)
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_hide (dialog->frames[i]);
|
|
|
|
gtk_widget_hide (dialog->tools[i]);
|
|
|
|
gtk_widget_hide (dialog->foregrounds[i]);
|
|
|
|
gtk_widget_hide (dialog->backgrounds[i]);
|
|
|
|
gtk_widget_hide (dialog->brushes[i]);
|
|
|
|
gtk_widget_hide (dialog->patterns[i]);
|
|
|
|
gtk_widget_hide (dialog->gradients[i]);
|
1999-10-27 02:27:27 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_show (dialog->frames[i]);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (gimp_context_get_tool (context))
|
2001-02-21 20:18:09 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_show (dialog->tools[i]);
|
2001-02-21 20:18:09 +08:00
|
|
|
}
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-01-16 06:39:50 +08:00
|
|
|
/* foreground color */
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_get_foreground (context, &color);
|
|
|
|
gimp_color_area_set_color (GIMP_COLOR_AREA (dialog->foregrounds[i]),
|
2001-01-16 06:39:50 +08:00
|
|
|
&color);
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_show (dialog->foregrounds[i]);
|
2001-01-16 06:39:50 +08:00
|
|
|
|
2001-01-16 22:53:29 +08:00
|
|
|
/* Set the tip to be the RGB value */
|
|
|
|
gimp_rgb_get_uchar (&color, &red, &green, &blue);
|
|
|
|
g_snprintf (ttbuf, sizeof (ttbuf), _("Foreground: %d, %d, %d"),
|
|
|
|
red, green, blue);
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_add_events (dialog->foregrounds[i],
|
2001-01-16 06:39:50 +08:00
|
|
|
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_help_set_help_data (dialog->foregrounds[i], ttbuf, NULL);
|
2001-01-16 06:39:50 +08:00
|
|
|
|
|
|
|
/* background color */
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_get_background (context, &color);
|
|
|
|
gimp_color_area_set_color (GIMP_COLOR_AREA (dialog->backgrounds[i]),
|
2001-01-16 06:39:50 +08:00
|
|
|
&color);
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_show (dialog->backgrounds[i]);
|
2001-01-16 06:39:50 +08:00
|
|
|
|
2001-01-16 22:53:29 +08:00
|
|
|
/* Set the tip to be the RGB value */
|
|
|
|
gimp_rgb_get_uchar (&color, &red, &green, &blue);
|
|
|
|
g_snprintf (ttbuf, sizeof (ttbuf), _("Background: %d, %d, %d"),
|
|
|
|
red, green, blue);
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_add_events (dialog->backgrounds[i],
|
2001-01-16 06:39:50 +08:00
|
|
|
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_help_set_help_data (dialog->backgrounds[i], ttbuf, NULL);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (gimp_context_get_brush (context))
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_show (dialog->brushes[i]);
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
1999-08-13 01:53:51 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (gimp_context_get_pattern (context))
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_show (dialog->patterns[i]);
|
1999-10-27 02:27:27 +08:00
|
|
|
}
|
1999-10-28 23:05:49 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (gimp_context_get_gradient (context))
|
1999-10-28 23:05:49 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_widget_show (dialog->gradients[i]);
|
1999-10-28 23:05:49 +08:00
|
|
|
}
|
1999-08-13 01:53:51 +08:00
|
|
|
}
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
1999-09-01 08:12:33 +08:00
|
|
|
|
1999-10-28 23:05:49 +08:00
|
|
|
static void
|
2001-02-21 20:18:09 +08:00
|
|
|
device_status_drop_tool (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data)
|
1999-10-28 23:05:49 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceInfo *device_info;
|
1999-10-28 23:05:49 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = (GimpDeviceInfo *) data;
|
1999-10-28 23:05:49 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device_info && device_info->device)
|
1999-10-28 23:05:49 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_set_tool (GIMP_CONTEXT (device_info),
|
|
|
|
GIMP_TOOL_INFO (viewable));
|
1999-10-28 23:05:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-09-04 11:36:54 +08:00
|
|
|
static void
|
2001-01-16 06:39:50 +08:00
|
|
|
device_status_foreground_changed (GtkWidget *widget,
|
|
|
|
gpointer data)
|
1999-09-04 11:36:54 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceInfo *device_info;
|
|
|
|
GimpRGB color;
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = (GimpDeviceInfo *) data;
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device_info && device_info->device)
|
1999-09-04 11:36:54 +08:00
|
|
|
{
|
2001-01-16 06:39:50 +08:00
|
|
|
gimp_color_area_get_color (GIMP_COLOR_AREA (widget), &color);
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_set_foreground (GIMP_CONTEXT (device_info), &color);
|
1999-09-04 11:36:54 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-01-16 06:39:50 +08:00
|
|
|
device_status_background_changed (GtkWidget *widget,
|
|
|
|
gpointer data)
|
1999-09-04 11:36:54 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceInfo *device_info;
|
|
|
|
GimpRGB color;
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = (GimpDeviceInfo *) data;
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device_info && device_info->device)
|
1999-09-04 11:36:54 +08:00
|
|
|
{
|
2001-01-16 06:39:50 +08:00
|
|
|
gimp_color_area_get_color (GIMP_COLOR_AREA (widget), &color);
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_set_background (GIMP_CONTEXT (device_info), &color);
|
1999-09-04 11:36:54 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-09-05 18:45:07 +08:00
|
|
|
static void
|
2001-02-14 03:53:07 +08:00
|
|
|
device_status_drop_brush (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data)
|
1999-09-05 18:45:07 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceInfo *device_info;
|
1999-10-10 04:33:53 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = (GimpDeviceInfo *) data;
|
1999-09-05 18:45:07 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device_info && device_info->device)
|
1999-09-05 18:45:07 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_set_brush (GIMP_CONTEXT (device_info),
|
|
|
|
GIMP_BRUSH (viewable));
|
1999-09-05 18:45:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-02-14 03:53:07 +08:00
|
|
|
device_status_drop_pattern (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data)
|
1999-09-05 18:45:07 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceInfo *device_info;
|
1999-10-28 23:05:49 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = (GimpDeviceInfo *) data;
|
1999-09-05 18:45:07 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device_info && device_info->device)
|
1999-10-28 23:05:49 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_set_pattern (GIMP_CONTEXT (device_info),
|
|
|
|
GIMP_PATTERN (viewable));
|
1999-10-28 23:05:49 +08:00
|
|
|
}
|
|
|
|
}
|
1999-10-27 02:27:27 +08:00
|
|
|
|
1999-10-28 23:05:49 +08:00
|
|
|
static void
|
2001-02-11 03:35:29 +08:00
|
|
|
device_status_drop_gradient (GtkWidget *widget,
|
2001-02-14 03:53:07 +08:00
|
|
|
GimpViewable *viewable,
|
2001-02-11 03:35:29 +08:00
|
|
|
gpointer data)
|
1999-10-28 23:05:49 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceInfo *device_info;
|
1999-10-10 04:33:53 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = (GimpDeviceInfo *) data;
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device_info && device_info->device)
|
1999-09-05 18:45:07 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_set_gradient (GIMP_CONTEXT (device_info),
|
2001-07-29 22:09:50 +08:00
|
|
|
GIMP_GRADIENT (viewable));
|
1999-09-05 18:45:07 +08:00
|
|
|
}
|
|
|
|
}
|