2000-02-26 11:41:06 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimpquerybox.c
|
|
|
|
* Copyright (C) 1999-2000 Michael Natterer <mitch@gimp.org>
|
2000-02-11 05:54:12 +08:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2000-02-26 11:41:06 +08:00
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
2000-02-11 05:54:12 +08:00
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
2000-02-26 11:41:06 +08:00
|
|
|
*/
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-05-31 07:38:46 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2001-05-21 21:58:46 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
|
|
|
|
#include "gimpwidgetstypes.h"
|
2000-12-29 23:22:01 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
#include "gimpdialog.h"
|
2000-02-18 23:43:22 +08:00
|
|
|
#include "gimppixmap.h"
|
2000-05-31 07:38:46 +08:00
|
|
|
#include "gimpquerybox.h"
|
2000-02-11 05:54:12 +08:00
|
|
|
#include "gimpsizeentry.h"
|
|
|
|
#include "gimpwidgets.h"
|
|
|
|
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimp/libgimp-intl.h"
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-05-31 07:38:46 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
/*
|
|
|
|
* String, integer, double and size query boxes
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct _QueryBox QueryBox;
|
|
|
|
|
|
|
|
struct _QueryBox
|
|
|
|
{
|
|
|
|
GtkWidget *qbox;
|
|
|
|
GtkWidget *vbox;
|
|
|
|
GtkWidget *entry;
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object;
|
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
|
|
|
GCallback callback;
|
2001-07-31 01:17:36 +08:00
|
|
|
gpointer callback_data;
|
2000-02-11 05:54:12 +08:00
|
|
|
};
|
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
|
|
|
|
static QueryBox * create_query_box (const gchar *title,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpHelpFunc help_func,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *help_data,
|
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
|
|
|
GCallback ok_callback,
|
|
|
|
GCallback cancel_callback,
|
2002-01-14 04:59:56 +08:00
|
|
|
const gchar *stock_id,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *message,
|
|
|
|
const gchar *ok_button,
|
|
|
|
const gchar *cancel_button,
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *signal,
|
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
|
|
|
GCallback callback,
|
2001-07-31 01:17:36 +08:00
|
|
|
gpointer callback_data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
static QueryBox * query_box_disconnect (gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
static void string_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void int_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void double_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void size_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
static void boolean_query_box_true_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void boolean_query_box_false_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
static void query_box_cancel_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* create a generic query box without any entry widget
|
|
|
|
*/
|
2000-02-11 05:54:12 +08:00
|
|
|
static QueryBox *
|
2000-11-18 08:25:42 +08:00
|
|
|
create_query_box (const gchar *title,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpHelpFunc help_func,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *help_data,
|
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
|
|
|
GCallback ok_callback,
|
|
|
|
GCallback cancel_callback,
|
2002-01-14 04:59:56 +08:00
|
|
|
const gchar *stock_id,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *message,
|
|
|
|
const gchar *ok_button,
|
|
|
|
const gchar *cancel_button,
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *signal,
|
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
|
|
|
GCallback callback,
|
2001-07-31 01:17:36 +08:00
|
|
|
gpointer callback_data)
|
2000-02-11 05:54:12 +08:00
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
2002-01-14 04:59:56 +08:00
|
|
|
GtkWidget *hbox = NULL;
|
2000-02-11 05:54:12 +08:00
|
|
|
GtkWidget *label;
|
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
/* make sure the object / signal passed are valid
|
|
|
|
*/
|
2001-07-31 01:17:36 +08:00
|
|
|
g_return_val_if_fail (object == NULL || G_IS_OBJECT (object), NULL);
|
2000-11-18 08:25:42 +08:00
|
|
|
g_return_val_if_fail (object == NULL || signal != NULL, NULL);
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
query_box = g_new (QueryBox, 1);
|
|
|
|
|
2001-08-04 22:10:58 +08:00
|
|
|
query_box->qbox = gimp_dialog_new (title, "query_box",
|
|
|
|
help_func, help_data,
|
|
|
|
GTK_WIN_POS_MOUSE,
|
|
|
|
FALSE, TRUE, FALSE,
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2001-08-04 22:10:58 +08:00
|
|
|
cancel_button, cancel_callback,
|
|
|
|
query_box, NULL, NULL, FALSE, TRUE,
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2001-11-24 07:04:49 +08:00
|
|
|
ok_button, ok_callback,
|
|
|
|
query_box, NULL, NULL, TRUE, FALSE,
|
|
|
|
|
2001-08-04 22:10:58 +08:00
|
|
|
NULL);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2001-08-04 22:10:58 +08:00
|
|
|
g_signal_connect (G_OBJECT (query_box->qbox), "destroy",
|
2001-07-31 01:17:36 +08:00
|
|
|
G_CALLBACK (gtk_widget_destroyed),
|
|
|
|
&query_box->qbox);
|
2000-11-18 08:25:42 +08:00
|
|
|
|
|
|
|
/* if we are associated with an object, connect to the provided signal
|
|
|
|
*/
|
|
|
|
if (object)
|
|
|
|
{
|
2001-07-31 01:17:36 +08:00
|
|
|
GClosure *closure;
|
2000-11-18 08:25:42 +08:00
|
|
|
|
2001-07-31 01:17:36 +08:00
|
|
|
closure = g_cclosure_new (G_CALLBACK (query_box_cancel_callback),
|
|
|
|
query_box, NULL);
|
|
|
|
g_object_watch_closure (G_OBJECT (query_box->qbox), closure);
|
|
|
|
|
|
|
|
g_signal_connect_closure (G_OBJECT (object), signal, closure, FALSE);
|
2000-11-18 08:25:42 +08:00
|
|
|
}
|
2002-01-14 04:59:56 +08:00
|
|
|
|
|
|
|
if (stock_id)
|
2000-11-18 08:25:42 +08:00
|
|
|
{
|
2002-01-14 04:59:56 +08:00
|
|
|
GtkWidget *image;
|
|
|
|
|
|
|
|
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
|
|
|
|
|
|
|
|
if (image)
|
|
|
|
{
|
|
|
|
hbox = gtk_hbox_new (FALSE, 10);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
|
|
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (query_box->qbox)->vbox),
|
|
|
|
hbox);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (image);
|
|
|
|
}
|
2000-11-18 08:25:42 +08:00
|
|
|
}
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2002-01-14 04:59:56 +08:00
|
|
|
query_box->vbox = gtk_vbox_new (FALSE, 4);
|
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT (query_box->qbox), "gimp-query-box-vbox",
|
|
|
|
query_box->vbox);
|
|
|
|
|
|
|
|
if (hbox)
|
|
|
|
{
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), query_box->vbox, FALSE, FALSE, 0);
|
|
|
|
}
|
|
|
|
else
|
2000-02-11 07:47:56 +08:00
|
|
|
{
|
2002-01-14 04:59:56 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (query_box->vbox), 10);
|
2001-08-04 22:10:58 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (query_box->qbox)->vbox),
|
2002-01-14 04:59:56 +08:00
|
|
|
query_box->vbox);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_show (query_box->vbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2002-01-14 04:59:56 +08:00
|
|
|
if (message)
|
|
|
|
{
|
2000-02-11 07:47:56 +08:00
|
|
|
label = gtk_label_new (message);
|
2001-08-04 22:10:58 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), label, FALSE, FALSE, 0);
|
2000-02-11 07:47:56 +08:00
|
|
|
gtk_widget_show (label);
|
|
|
|
}
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2001-07-31 01:17:36 +08:00
|
|
|
query_box->entry = NULL;
|
|
|
|
query_box->object = object;
|
|
|
|
query_box->callback = callback;
|
|
|
|
query_box->callback_data = callback_data;
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
return query_box;
|
|
|
|
}
|
|
|
|
|
2000-02-12 21:07:59 +08:00
|
|
|
/**
|
|
|
|
* gimp_query_string_box:
|
2001-07-31 01:17:36 +08:00
|
|
|
* @title: The query box dialog's title.
|
2000-02-12 21:07:59 +08:00
|
|
|
* @help_func: The help function to show this dialog's help page.
|
|
|
|
* @help_data: A string pointing to this dialog's html help page.
|
2001-07-31 01:17:36 +08:00
|
|
|
* @message: A string which will be shown above the dialog's entry widget.
|
|
|
|
* @initial: The initial value.
|
|
|
|
* @object: The object this query box is associated with.
|
|
|
|
* @signal: The object's signal which will cause the query box to be closed.
|
|
|
|
* @callback: The function which will be called when the user selects "OK".
|
|
|
|
* @data: The callback's user data.
|
2000-02-12 21:07:59 +08:00
|
|
|
*
|
|
|
|
* Returns: A pointer to the new #GtkDialog.
|
2000-11-18 08:25:42 +08:00
|
|
|
**/
|
2000-02-11 05:54:12 +08:00
|
|
|
GtkWidget *
|
2000-11-18 08:25:42 +08:00
|
|
|
gimp_query_string_box (const gchar *title,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpHelpFunc help_func,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *help_data,
|
|
|
|
const gchar *message,
|
|
|
|
const gchar *initial,
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *signal,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpQueryStringCallback callback,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
GtkWidget *entry;
|
|
|
|
|
|
|
|
query_box = create_query_box (title, help_func, help_data,
|
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_CALLBACK (string_query_box_ok_callback),
|
|
|
|
G_CALLBACK (query_box_cancel_callback),
|
2002-01-14 04:59:56 +08:00
|
|
|
GTK_STOCK_DIALOG_QUESTION,
|
2000-02-11 05:54:12 +08:00
|
|
|
message,
|
2001-07-31 01:17:36 +08:00
|
|
|
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
2000-02-11 05:54:12 +08:00
|
|
|
object, signal,
|
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_CALLBACK (callback), data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
if (! query_box)
|
|
|
|
return NULL;
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
entry = gtk_entry_new ();
|
|
|
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, FALSE, FALSE, 0);
|
|
|
|
if (initial)
|
|
|
|
gtk_entry_set_text (GTK_ENTRY (entry), initial);
|
|
|
|
gtk_widget_grab_focus (entry);
|
|
|
|
gtk_widget_show (entry);
|
|
|
|
|
|
|
|
query_box->entry = entry;
|
|
|
|
|
|
|
|
return query_box->qbox;
|
|
|
|
}
|
|
|
|
|
2000-02-12 21:07:59 +08:00
|
|
|
/**
|
|
|
|
* gimp_query_int_box:
|
2001-07-31 01:17:36 +08:00
|
|
|
* @title: The query box dialog's title.
|
2000-02-12 21:07:59 +08:00
|
|
|
* @help_func: The help function to show this dialog's help page.
|
|
|
|
* @help_data: A string pointing to this dialog's html help page.
|
2001-07-31 01:17:36 +08:00
|
|
|
* @message: A string which will be shown above the dialog's entry widget.
|
|
|
|
* @initial: The initial value.
|
|
|
|
* @lower: The lower boundary of the range of possible values.
|
|
|
|
* @upper: The upper boundray of the range of possible values.
|
|
|
|
* @object: The object this query box is associated with.
|
|
|
|
* @signal: The object's signal which will cause the query box to be closed.
|
|
|
|
* @callback: The function which will be called when the user selects "OK".
|
|
|
|
* @data: The callback's user data.
|
2000-02-12 21:07:59 +08:00
|
|
|
*
|
|
|
|
* Returns: A pointer to the new #GtkDialog.
|
2000-11-18 08:25:42 +08:00
|
|
|
**/
|
2000-02-11 05:54:12 +08:00
|
|
|
GtkWidget *
|
2000-11-18 08:25:42 +08:00
|
|
|
gimp_query_int_box (const gchar *title,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpHelpFunc help_func,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *help_data,
|
|
|
|
const gchar *message,
|
2000-02-11 05:54:12 +08:00
|
|
|
gint initial,
|
|
|
|
gint lower,
|
|
|
|
gint upper,
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *signal,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpQueryIntCallback callback,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
GtkWidget *spinbutton;
|
|
|
|
GtkObject *adjustment;
|
|
|
|
|
|
|
|
query_box = create_query_box (title, help_func, help_data,
|
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_CALLBACK (int_query_box_ok_callback),
|
|
|
|
G_CALLBACK (query_box_cancel_callback),
|
2002-01-14 04:59:56 +08:00
|
|
|
GTK_STOCK_DIALOG_QUESTION,
|
2000-02-11 05:54:12 +08:00
|
|
|
message,
|
2001-07-31 01:17:36 +08:00
|
|
|
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
2000-02-11 05:54:12 +08:00
|
|
|
object, signal,
|
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_CALLBACK (callback), data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
if (! query_box)
|
|
|
|
return NULL;
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
spinbutton = gimp_spin_button_new (&adjustment,
|
|
|
|
initial, lower, upper, 1, 10, 0,
|
|
|
|
1, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_grab_focus (spinbutton);
|
|
|
|
gtk_widget_show (spinbutton);
|
|
|
|
|
|
|
|
query_box->entry = spinbutton;
|
|
|
|
|
|
|
|
return query_box->qbox;
|
|
|
|
}
|
|
|
|
|
2000-02-12 21:07:59 +08:00
|
|
|
/**
|
|
|
|
* gimp_query_double_box:
|
2001-07-31 01:17:36 +08:00
|
|
|
* @title: The query box dialog's title.
|
2000-02-12 21:07:59 +08:00
|
|
|
* @help_func: The help function to show this dialog's help page.
|
|
|
|
* @help_data: A string pointing to this dialog's html help page.
|
2001-07-31 01:17:36 +08:00
|
|
|
* @message: A string which will be shown above the dialog's entry widget.
|
|
|
|
* @initial: The initial value.
|
|
|
|
* @lower: The lower boundary of the range of possible values.
|
|
|
|
* @upper: The upper boundray of the range of possible values.
|
|
|
|
* @digits: The number of decimal digits the #GtkSpinButton will provide.
|
|
|
|
* @object: The object this query box is associated with.
|
|
|
|
* @signal: The object's signal which will cause the query box to be closed.
|
|
|
|
* @callback: The function which will be called when the user selects "OK".
|
|
|
|
* @data: The callback's user data.
|
2000-02-12 21:07:59 +08:00
|
|
|
*
|
|
|
|
* Returns: A pointer to the new #GtkDialog.
|
2000-11-18 08:25:42 +08:00
|
|
|
**/
|
2000-02-11 05:54:12 +08:00
|
|
|
GtkWidget *
|
2000-11-18 08:25:42 +08:00
|
|
|
gimp_query_double_box (const gchar *title,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpHelpFunc help_func,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *help_data,
|
|
|
|
const gchar *message,
|
2000-02-11 05:54:12 +08:00
|
|
|
gdouble initial,
|
|
|
|
gdouble lower,
|
|
|
|
gdouble upper,
|
|
|
|
gint digits,
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *signal,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpQueryDoubleCallback callback,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
GtkWidget *spinbutton;
|
|
|
|
GtkObject *adjustment;
|
|
|
|
|
|
|
|
query_box = create_query_box (title, help_func, help_data,
|
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_CALLBACK (double_query_box_ok_callback),
|
|
|
|
G_CALLBACK (query_box_cancel_callback),
|
2002-01-14 04:59:56 +08:00
|
|
|
GTK_STOCK_DIALOG_QUESTION,
|
2000-02-11 05:54:12 +08:00
|
|
|
message,
|
2001-07-31 01:17:36 +08:00
|
|
|
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
2000-02-11 05:54:12 +08:00
|
|
|
object, signal,
|
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_CALLBACK (callback), data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
if (! query_box)
|
|
|
|
return NULL;
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
spinbutton = gimp_spin_button_new (&adjustment,
|
|
|
|
initial, lower, upper, 1, 10, 0,
|
|
|
|
1, digits);
|
|
|
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_grab_focus (spinbutton);
|
|
|
|
gtk_widget_show (spinbutton);
|
|
|
|
|
|
|
|
query_box->entry = spinbutton;
|
|
|
|
|
|
|
|
return query_box->qbox;
|
|
|
|
}
|
|
|
|
|
2000-02-12 21:07:59 +08:00
|
|
|
/**
|
|
|
|
* gimp_query_size_box:
|
2001-07-31 01:17:36 +08:00
|
|
|
* @title: The query box dialog's title.
|
|
|
|
* @help_func: The help function to show this dialog's help page.
|
|
|
|
* @help_data: A string pointing to this dialog's html help page.
|
|
|
|
* @message: A string which will be shown above the dialog's entry widget.
|
|
|
|
* @initial: The initial value.
|
|
|
|
* @lower: The lower boundary of the range of possible values.
|
|
|
|
* @upper: The upper boundray of the range of possible values.
|
|
|
|
* @digits: The number of decimal digits the #GimpSizeEntry provide in
|
|
|
|
* "pixel" mode.
|
|
|
|
* @unit: The unit initially shown by the #GimpUnitMenu.
|
|
|
|
* @resolution: The resolution (in dpi) which will be used for pixel/unit
|
|
|
|
* calculations.
|
2000-02-12 21:07:59 +08:00
|
|
|
* @dot_for_dot: #TRUE if the #GimpUnitMenu's initial unit should be "pixels".
|
2001-07-31 01:17:36 +08:00
|
|
|
* @object: The object this query box is associated with.
|
|
|
|
* @signal: The object's signal which will cause the query box
|
|
|
|
* to be closed.
|
|
|
|
* @callback: The function which will be called when the user selects "OK".
|
|
|
|
* @data: The callback's user data.
|
2000-02-12 21:07:59 +08:00
|
|
|
*
|
|
|
|
* Returns: A pointer to the new #GtkDialog.
|
2000-11-18 08:25:42 +08:00
|
|
|
**/
|
2000-02-11 05:54:12 +08:00
|
|
|
GtkWidget *
|
2000-11-18 08:25:42 +08:00
|
|
|
gimp_query_size_box (const gchar *title,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpHelpFunc help_func,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *help_data,
|
|
|
|
const gchar *message,
|
2000-02-11 05:54:12 +08:00
|
|
|
gdouble initial,
|
|
|
|
gdouble lower,
|
|
|
|
gdouble upper,
|
|
|
|
gint digits,
|
|
|
|
GimpUnit unit,
|
|
|
|
gdouble resolution,
|
|
|
|
gboolean dot_for_dot,
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *signal,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpQuerySizeCallback callback,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
GtkWidget *sizeentry;
|
|
|
|
|
|
|
|
query_box = create_query_box (title, help_func, help_data,
|
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_CALLBACK (size_query_box_ok_callback),
|
|
|
|
G_CALLBACK (query_box_cancel_callback),
|
2002-01-14 04:59:56 +08:00
|
|
|
GTK_STOCK_DIALOG_QUESTION,
|
2000-02-11 05:54:12 +08:00
|
|
|
message,
|
2001-07-31 01:17:36 +08:00
|
|
|
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
2000-02-11 05:54:12 +08:00
|
|
|
object, signal,
|
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_CALLBACK (callback), data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
if (! query_box)
|
|
|
|
return NULL;
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
sizeentry = gimp_size_entry_new (1, unit, "%p", TRUE, FALSE, FALSE, 100,
|
|
|
|
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
|
|
|
if (dot_for_dot)
|
|
|
|
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (sizeentry), GIMP_UNIT_PIXEL);
|
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (sizeentry), 0,
|
|
|
|
resolution, FALSE);
|
|
|
|
gimp_size_entry_set_refval_digits (GIMP_SIZE_ENTRY (sizeentry), 0, digits);
|
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (sizeentry), 0,
|
|
|
|
lower, upper);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial);
|
|
|
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, FALSE, FALSE, 0);
|
|
|
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (sizeentry));
|
|
|
|
gtk_widget_show (sizeentry);
|
|
|
|
|
|
|
|
query_box->entry = sizeentry;
|
|
|
|
|
|
|
|
return query_box->qbox;
|
|
|
|
}
|
|
|
|
|
2000-02-12 21:07:59 +08:00
|
|
|
/**
|
|
|
|
* gimp_query_boolean_box:
|
2001-07-31 01:17:36 +08:00
|
|
|
* @title: The query box dialog's title.
|
|
|
|
* @help_func: The help function to show this dialog's help page.
|
|
|
|
* @help_data: A string pointing to this dialog's html help page.
|
2002-01-10 04:39:49 +08:00
|
|
|
* @stock_id: A stock_id to specify an icon to appear on the left
|
|
|
|
* on the dialog's message.
|
2001-07-31 01:17:36 +08:00
|
|
|
* @message: A string which will be shown in the query box.
|
|
|
|
* @true_button: The string to be shown in the dialog's left button.
|
2000-02-12 21:07:59 +08:00
|
|
|
* @false_button: The string to be shown in the dialog's right button.
|
2001-07-31 01:17:36 +08:00
|
|
|
* @object: The object this query box is associated with.
|
|
|
|
* @signal: The object's signal which will cause the query box
|
|
|
|
* to be closed.
|
|
|
|
* @callback: The function which will be called when the user clicks one
|
|
|
|
* of the buttons.
|
|
|
|
* @data: The callback's user data.
|
2000-02-12 21:07:59 +08:00
|
|
|
*
|
|
|
|
* Returns: A pointer to the new #GtkDialog.
|
2000-11-18 08:25:42 +08:00
|
|
|
**/
|
2000-02-11 05:54:12 +08:00
|
|
|
GtkWidget *
|
2000-11-18 08:25:42 +08:00
|
|
|
gimp_query_boolean_box (const gchar *title,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpHelpFunc help_func,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *help_data,
|
2002-01-10 04:39:49 +08:00
|
|
|
const gchar *stock_id,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *message,
|
|
|
|
const gchar *true_button,
|
|
|
|
const gchar *false_button,
|
2001-07-31 01:17:36 +08:00
|
|
|
GObject *object,
|
2000-11-18 08:25:42 +08:00
|
|
|
const gchar *signal,
|
2000-02-11 05:54:12 +08:00
|
|
|
GimpQueryBooleanCallback callback,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
2002-01-10 04:39:49 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
query_box = create_query_box (title, help_func, help_data,
|
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_CALLBACK (boolean_query_box_true_callback),
|
|
|
|
G_CALLBACK (boolean_query_box_false_callback),
|
2002-01-14 04:59:56 +08:00
|
|
|
stock_id,
|
|
|
|
message,
|
2000-02-11 05:54:12 +08:00
|
|
|
true_button, false_button,
|
|
|
|
object, signal,
|
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_CALLBACK (callback), data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
if (! query_box)
|
|
|
|
return NULL;
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
return query_box->qbox;
|
|
|
|
}
|
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* private functions
|
|
|
|
*/
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
static QueryBox *
|
|
|
|
query_box_disconnect (gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
|
|
|
|
query_box = (QueryBox *) data;
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive (query_box->qbox, FALSE);
|
|
|
|
|
|
|
|
/* disconnect, if we are connected to some signal */
|
|
|
|
if (query_box->object)
|
2001-07-31 01:17:36 +08:00
|
|
|
{
|
|
|
|
g_signal_handlers_disconnect_by_func (query_box->object,
|
|
|
|
query_box_cancel_callback,
|
|
|
|
query_box);
|
|
|
|
}
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
return query_box;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
string_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
gchar *string;
|
|
|
|
|
|
|
|
query_box = query_box_disconnect (data);
|
|
|
|
|
|
|
|
/* Get the entry data */
|
|
|
|
string = g_strdup (gtk_entry_get_text (GTK_ENTRY (query_box->entry)));
|
|
|
|
|
|
|
|
/* Call the user defined callback */
|
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
|
|
|
(* (GimpQueryStringCallback) query_box->callback) (query_box->qbox,
|
|
|
|
string,
|
2001-07-31 01:17:36 +08:00
|
|
|
query_box->callback_data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
/* Destroy the box */
|
2000-11-18 08:25:42 +08:00
|
|
|
if (query_box->qbox)
|
|
|
|
gtk_widget_destroy (query_box->qbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
g_free (query_box);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
int_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
gint value;
|
|
|
|
|
|
|
|
query_box = query_box_disconnect (data);
|
|
|
|
|
|
|
|
/* Get the spinbutton data */
|
2001-07-31 01:17:36 +08:00
|
|
|
value = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (query_box->entry));
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
/* Call the user defined callback */
|
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
|
|
|
(* (GimpQueryIntCallback) query_box->callback) (query_box->qbox,
|
|
|
|
value,
|
2001-07-31 01:17:36 +08:00
|
|
|
query_box->callback_data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
/* Destroy the box */
|
2000-11-18 08:25:42 +08:00
|
|
|
if (query_box->qbox)
|
|
|
|
gtk_widget_destroy (query_box->qbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
g_free (query_box);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
double_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
gdouble value;
|
|
|
|
|
|
|
|
query_box = query_box_disconnect (data);
|
|
|
|
|
|
|
|
/* Get the spinbutton data */
|
2001-12-29 21:26:29 +08:00
|
|
|
value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (query_box->entry));
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
/* Call the user defined callback */
|
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
|
|
|
(* (GimpQueryDoubleCallback) query_box->callback) (query_box->qbox,
|
|
|
|
value,
|
2001-07-31 01:17:36 +08:00
|
|
|
query_box->callback_data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
/* Destroy the box */
|
2000-11-18 08:25:42 +08:00
|
|
|
if (query_box->qbox)
|
|
|
|
gtk_widget_destroy (query_box->qbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
g_free (query_box);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
size_query_box_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
gdouble size;
|
|
|
|
GimpUnit unit;
|
|
|
|
|
|
|
|
query_box = query_box_disconnect (data);
|
|
|
|
|
|
|
|
/* Get the sizeentry data */
|
|
|
|
size = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (query_box->entry), 0);
|
|
|
|
unit = gimp_size_entry_get_unit (GIMP_SIZE_ENTRY (query_box->entry));
|
|
|
|
|
|
|
|
/* Call the user defined callback */
|
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
|
|
|
(* (GimpQuerySizeCallback) query_box->callback) (query_box->qbox,
|
|
|
|
size,
|
|
|
|
unit,
|
2001-07-31 01:17:36 +08:00
|
|
|
query_box->callback_data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
/* Destroy the box */
|
2000-11-18 08:25:42 +08:00
|
|
|
if (query_box->qbox)
|
|
|
|
gtk_widget_destroy (query_box->qbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
g_free (query_box);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2000-11-18 08:25:42 +08:00
|
|
|
boolean_query_box_true_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
2000-02-11 05:54:12 +08:00
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
|
|
|
|
query_box = query_box_disconnect (data);
|
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
/* Call the user defined callback */
|
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
|
|
|
(* (GimpQueryBooleanCallback) query_box->callback) (query_box->qbox,
|
|
|
|
TRUE,
|
2001-07-31 01:17:36 +08:00
|
|
|
query_box->callback_data);
|
2000-11-18 08:25:42 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
/* Destroy the box */
|
2000-11-18 08:25:42 +08:00
|
|
|
if (query_box->qbox)
|
|
|
|
gtk_widget_destroy (query_box->qbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
g_free (query_box);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2000-11-18 08:25:42 +08:00
|
|
|
boolean_query_box_false_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
2000-02-11 05:54:12 +08:00
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
|
|
|
|
query_box = query_box_disconnect (data);
|
|
|
|
|
|
|
|
/* Call the user defined callback */
|
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
|
|
|
(* (GimpQueryBooleanCallback) query_box->callback) (query_box->qbox,
|
|
|
|
FALSE,
|
2001-07-31 01:17:36 +08:00
|
|
|
query_box->callback_data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
/* Destroy the box */
|
2000-11-18 08:25:42 +08:00
|
|
|
if (query_box->qbox)
|
|
|
|
gtk_widget_destroy (query_box->qbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
g_free (query_box);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2000-11-18 08:25:42 +08:00
|
|
|
query_box_cancel_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
2000-02-11 05:54:12 +08:00
|
|
|
{
|
|
|
|
QueryBox *query_box;
|
|
|
|
|
|
|
|
query_box = query_box_disconnect (data);
|
|
|
|
|
|
|
|
/* Destroy the box */
|
2000-11-18 08:25:42 +08:00
|
|
|
if (query_box->qbox)
|
|
|
|
gtk_widget_destroy (query_box->qbox);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
g_free (query_box);
|
|
|
|
}
|