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 <gtk/gtk.h>
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
2001-01-24 02:49:44 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "gui-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2001-02-21 20:18:09 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "widgets/gimpdeviceinfo.h"
|
|
|
|
#include "widgets/gimpdevices.h"
|
2001-04-11 09:13:53 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "device-status-dialog.h"
|
|
|
|
#include "input-dialog.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
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* local function prototypes */
|
2001-02-11 03:35:29 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
static void input_dialog_able_callback (GtkWidget *widget,
|
|
|
|
GdkDevice *device,
|
|
|
|
Gimp *gimp);
|
2001-02-11 03:35:29 +08:00
|
|
|
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* private variables */
|
2001-02-11 03:35:29 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
static GtkWidget *input_dialog = NULL;
|
2001-02-11 03:35:29 +08:00
|
|
|
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* public functions */
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
GtkWidget *
|
2001-12-02 05:02:34 +08:00
|
|
|
input_dialog_create (Gimp *gimp)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-02 05:02:34 +08:00
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (input_dialog)
|
|
|
|
return input_dialog;
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
input_dialog = gtk_input_dialog_new ();
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect_swapped (G_OBJECT (GTK_INPUT_DIALOG (input_dialog)->save_button),
|
|
|
|
"clicked",
|
|
|
|
G_CALLBACK (gimp_devices_save),
|
|
|
|
gimp);
|
|
|
|
g_signal_connect_swapped (G_OBJECT (GTK_INPUT_DIALOG (input_dialog)->close_button),
|
|
|
|
"clicked",
|
|
|
|
G_CALLBACK (gtk_widget_hide),
|
|
|
|
input_dialog);
|
2001-07-29 22:09:50 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect (G_OBJECT (input_dialog), "destroy",
|
2001-07-29 22:09:50 +08:00
|
|
|
G_CALLBACK (gtk_widget_destroyed),
|
2001-12-08 01:39:51 +08:00
|
|
|
&input_dialog);
|
2001-07-29 22:09:50 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_signal_connect (G_OBJECT (input_dialog), "enable_device",
|
2001-07-29 22:09:50 +08:00
|
|
|
G_CALLBACK (input_dialog_able_callback),
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp);
|
|
|
|
g_signal_connect (G_OBJECT (input_dialog), "disable_device",
|
2001-07-29 22:09:50 +08:00
|
|
|
G_CALLBACK (input_dialog_able_callback),
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp);
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
|
|
/* Connect the "F1" help key */
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_help_connect (input_dialog,
|
2001-08-01 07:28:56 +08:00
|
|
|
gimp_standard_help_func,
|
|
|
|
"dialogs/input_devices.html");
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
return input_dialog;
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
2001-12-02 05:02:34 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* private functions */
|
1998-07-21 08:15:24 +08:00
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
static void
|
2001-12-08 01:39:51 +08:00
|
|
|
input_dialog_able_callback (GtkWidget *widget,
|
|
|
|
GdkDevice *device,
|
|
|
|
Gimp *gimp)
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_device_info_changed_by_device (device);
|
1999-10-27 02:27:27 +08:00
|
|
|
}
|