1998-05-03 05:50:29 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
*/
|
2000-07-16 20:49:04 +08:00
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
1999-03-07 20:56:03 +08:00
|
|
|
|
#include <string.h>
|
1997-11-25 06:05:25 +08:00
|
|
|
|
#include <time.h>
|
1998-07-15 10:28:31 +08:00
|
|
|
|
|
1998-05-03 05:50:29 +08:00
|
|
|
|
#include <gtk/gtk.h>
|
2000-08-24 08:33:11 +08:00
|
|
|
|
#include <gdk/gdkkeysyms.h>
|
1998-07-15 10:28:31 +08:00
|
|
|
|
|
2001-01-24 07:56:18 +08:00
|
|
|
|
#include "libgimpmath/gimpmath.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 07:56:18 +08:00
|
|
|
|
|
2001-05-10 06:34:59 +08:00
|
|
|
|
#include "core/core-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
|
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-04-18 05:43:29 +08:00
|
|
|
|
#include "about-dialog.h"
|
2001-06-05 08:22:25 +08:00
|
|
|
|
#include "authors.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
|
|
2000-07-25 06:11:28 +08:00
|
|
|
|
#include "appenv.h"
|
1999-12-18 00:37:34 +08:00
|
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
#include "pixmaps/wilber2.xpm"
|
|
|
|
|
|
1998-05-03 05:50:29 +08:00
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
#define ANIMATION_STEPS 16
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
|
#define ANIMATION_SIZE 2
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
static gboolean about_dialog_load_logo (GtkWidget *window);
|
|
|
|
|
static void about_dialog_destroy (GtkObject *object,
|
|
|
|
|
gpointer data);
|
|
|
|
|
static void about_dialog_unmap (GtkWidget *widget,
|
|
|
|
|
GdkEvent *event,
|
|
|
|
|
gpointer data);
|
|
|
|
|
static gint about_dialog_logo_expose (GtkWidget *widget,
|
|
|
|
|
GdkEventExpose *event,
|
|
|
|
|
gpointer data);
|
|
|
|
|
static gint about_dialog_button (GtkWidget *widget,
|
|
|
|
|
GdkEventButton *event,
|
|
|
|
|
gpointer data);
|
2000-08-24 08:33:11 +08:00
|
|
|
|
static gint about_dialog_key (GtkWidget *widget,
|
|
|
|
|
GdkEventKey *event,
|
|
|
|
|
gpointer data);
|
2000-07-16 20:49:04 +08:00
|
|
|
|
static void about_dialog_tool_drop (GtkWidget *widget,
|
2001-02-21 20:18:09 +08:00
|
|
|
|
GimpViewable *viewable,
|
2000-07-16 20:49:04 +08:00
|
|
|
|
gpointer data);
|
|
|
|
|
static gint about_dialog_timer (gpointer data);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
|
2000-07-25 06:11:28 +08:00
|
|
|
|
static GtkWidget *about_dialog = NULL;
|
|
|
|
|
static GtkWidget *logo_area = NULL;
|
|
|
|
|
static GtkWidget *scroll_area = NULL;
|
|
|
|
|
static GdkPixmap *logo_pixmap = NULL;
|
|
|
|
|
static GdkPixmap *scroll_pixmap = NULL;
|
|
|
|
|
static guchar *dissolve_map = NULL;
|
1999-12-18 00:37:34 +08:00
|
|
|
|
static gint dissolve_width;
|
|
|
|
|
static gint dissolve_height;
|
2000-07-25 06:11:28 +08:00
|
|
|
|
static gint logo_width = 0;
|
|
|
|
|
static gint logo_height = 0;
|
|
|
|
|
static gboolean do_animation = FALSE;
|
|
|
|
|
static gboolean do_scrolling = FALSE;
|
|
|
|
|
static gint scroll_state = 0;
|
|
|
|
|
static gint frame = 0;
|
|
|
|
|
static gint offset = 0;
|
|
|
|
|
static gint timer = 0;
|
2000-08-24 08:33:11 +08:00
|
|
|
|
static gint hadja_state = 0;
|
2000-07-25 06:11:28 +08:00
|
|
|
|
static gchar **scroll_text = authors;
|
|
|
|
|
static gint nscroll_texts = sizeof (authors) / sizeof (authors[0]);
|
|
|
|
|
static gint scroll_text_widths[sizeof (authors) / sizeof (authors[0])];
|
|
|
|
|
static gint cur_scroll_text = 0;
|
|
|
|
|
static gint cur_scroll_index = 0;
|
|
|
|
|
static gint shuffle_array[sizeof (authors) / sizeof (authors[0])];
|
2000-07-16 20:49:04 +08:00
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
2000-07-25 06:11:28 +08:00
|
|
|
|
static gchar *drop_text[] =
|
|
|
|
|
{
|
|
|
|
|
"We are The GIMP." ,
|
|
|
|
|
"Prepare to be manipulated.",
|
|
|
|
|
"Resistance is futile."
|
|
|
|
|
};
|
|
|
|
|
|
2000-08-24 08:33:11 +08:00
|
|
|
|
static gchar *hadja_text[] =
|
|
|
|
|
{
|
|
|
|
|
"Hadjaha!",
|
|
|
|
|
"Nej!",
|
2000-08-25 01:53:43 +08:00
|
|
|
|
#ifndef GDK_USE_UTF8_MBS
|
2000-08-24 08:33:11 +08:00
|
|
|
|
"Tv<EFBFBD>rtom!"
|
2000-08-25 01:53:43 +08:00
|
|
|
|
#else
|
|
|
|
|
"Tvärtom!"
|
|
|
|
|
#endif
|
2000-08-24 08:33:11 +08:00
|
|
|
|
};
|
2000-07-25 06:11:28 +08:00
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
GtkWidget *
|
2000-07-16 20:49:04 +08:00
|
|
|
|
about_dialog_create (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
GtkWidget *vbox;
|
1997-12-08 18:36:19 +08:00
|
|
|
|
GtkWidget *aboutframe;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
GtkWidget *label;
|
|
|
|
|
GtkWidget *alignment;
|
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
|
|
|
|
#if 0
|
2000-07-16 20:49:04 +08:00
|
|
|
|
GtkStyle *style;
|
|
|
|
|
GdkFont *font;
|
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
|
|
|
|
#endif
|
2000-07-16 20:49:04 +08:00
|
|
|
|
gint max_width;
|
|
|
|
|
gint i;
|
|
|
|
|
gchar *label_text;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
if (! about_dialog)
|
1997-11-25 06:05:25 +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
|
|
|
|
about_dialog = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
|
|
|
gtk_window_set_type_hint (GTK_WINDOW (about_dialog),
|
|
|
|
|
GDK_WINDOW_TYPE_HINT_DIALOG);
|
1998-01-26 06:13:00 +08:00
|
|
|
|
gtk_window_set_wmclass (GTK_WINDOW (about_dialog), "about_dialog", "Gimp");
|
1998-08-06 07:46:04 +08:00
|
|
|
|
gtk_window_set_title (GTK_WINDOW (about_dialog), _("About the GIMP"));
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
|
1999-12-18 00:37:34 +08:00
|
|
|
|
gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
|
|
|
|
|
|
1999-12-18 00:37:34 +08:00
|
|
|
|
gimp_help_connect_help_accel (about_dialog, gimp_standard_help_func,
|
|
|
|
|
"dialogs/about.html");
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
|
1999-12-18 00:37:34 +08:00
|
|
|
|
GTK_SIGNAL_FUNC (about_dialog_destroy),
|
|
|
|
|
NULL);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_signal_connect (GTK_OBJECT (about_dialog), "unmap_event",
|
1999-12-18 00:37:34 +08:00
|
|
|
|
GTK_SIGNAL_FUNC (about_dialog_unmap),
|
|
|
|
|
NULL);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_signal_connect (GTK_OBJECT (about_dialog), "button_press_event",
|
1999-12-18 00:37:34 +08:00
|
|
|
|
GTK_SIGNAL_FUNC (about_dialog_button),
|
|
|
|
|
NULL);
|
2000-08-24 08:33:11 +08:00
|
|
|
|
gtk_signal_connect (GTK_OBJECT (about_dialog), "key_press_event",
|
|
|
|
|
GTK_SIGNAL_FUNC (about_dialog_key),
|
|
|
|
|
NULL);
|
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
/* dnd stuff */
|
2001-02-21 20:18:09 +08:00
|
|
|
|
gimp_gtk_drag_dest_set_by_type (about_dialog,
|
|
|
|
|
GTK_DEST_DEFAULT_MOTION |
|
|
|
|
|
GTK_DEST_DEFAULT_DROP,
|
|
|
|
|
GIMP_TYPE_TOOL_INFO,
|
|
|
|
|
GDK_ACTION_COPY);
|
|
|
|
|
gimp_dnd_viewable_dest_set (about_dialog,
|
|
|
|
|
GIMP_TYPE_TOOL_INFO,
|
|
|
|
|
about_dialog_tool_drop, NULL);
|
2000-07-16 20:49:04 +08:00
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_widget_set_events (about_dialog, GDK_BUTTON_PRESS_MASK);
|
|
|
|
|
|
|
|
|
|
if (!about_dialog_load_logo (about_dialog))
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_destroy (about_dialog);
|
|
|
|
|
about_dialog = NULL;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
return NULL;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vbox = gtk_vbox_new (FALSE, 1);
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 1);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_container_add (GTK_CONTAINER (about_dialog), vbox);
|
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
|
|
1997-12-08 18:36:19 +08:00
|
|
|
|
aboutframe = gtk_frame_new (NULL);
|
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (aboutframe), 0);
|
1997-12-08 18:36:19 +08:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), aboutframe, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (aboutframe);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
logo_area = gtk_drawing_area_new ();
|
|
|
|
|
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
|
1999-12-18 00:37:34 +08:00
|
|
|
|
GTK_SIGNAL_FUNC (about_dialog_logo_expose),
|
|
|
|
|
NULL);
|
|
|
|
|
gtk_drawing_area_size (GTK_DRAWING_AREA (logo_area),
|
|
|
|
|
logo_width, logo_height);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_widget_set_events (logo_area, GDK_EXPOSURE_MASK);
|
1997-12-08 18:36:19 +08:00
|
|
|
|
gtk_container_add (GTK_CONTAINER (aboutframe), logo_area);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_widget_show (logo_area);
|
|
|
|
|
|
|
|
|
|
gtk_widget_realize (logo_area);
|
|
|
|
|
gdk_window_set_background (logo_area->window, &logo_area->style->black);
|
|
|
|
|
|
2000-02-14 03:35:24 +08:00
|
|
|
|
/* this is a font, provide only one single font definition */
|
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
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
#warning FIXME: font description
|
|
|
|
|
#endif
|
|
|
|
|
#if 0
|
2000-02-14 03:35:24 +08:00
|
|
|
|
font = gdk_font_load (_("-*-helvetica-medium-r-normal--*-140-*-*-*-*-*-*"));
|
|
|
|
|
if (font)
|
|
|
|
|
{
|
|
|
|
|
style = gtk_style_new ();
|
|
|
|
|
gdk_font_unref (style->font);
|
|
|
|
|
style->font = font;
|
2000-04-06 06:59:44 +08:00
|
|
|
|
gdk_font_ref (style->font);
|
2000-02-14 03:35:24 +08:00
|
|
|
|
gtk_widget_push_style (style);
|
|
|
|
|
gtk_style_unref (style);
|
|
|
|
|
}
|
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
|
|
|
|
#endif
|
1999-11-25 19:35:48 +08:00
|
|
|
|
label_text = g_strdup_printf (_("Version %s brought to you by"),
|
|
|
|
|
GIMP_VERSION);
|
1998-08-06 07:46:04 +08:00
|
|
|
|
label = gtk_label_new (label_text);
|
1999-12-18 00:37:34 +08:00
|
|
|
|
g_free (label_text);
|
|
|
|
|
label_text = NULL;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
1999-09-23 19:49:16 +08:00
|
|
|
|
label = gtk_label_new ("Spencer Kimball & Peter Mattis");
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
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
|
|
|
|
#if 0
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_widget_pop_style ();
|
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
|
|
|
|
#endif
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (alignment);
|
|
|
|
|
|
1997-12-08 18:36:19 +08:00
|
|
|
|
aboutframe = gtk_frame_new (NULL);
|
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (aboutframe), 0);
|
1997-12-08 18:36:19 +08:00
|
|
|
|
gtk_container_add (GTK_CONTAINER (alignment), aboutframe);
|
|
|
|
|
gtk_widget_show (aboutframe);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
max_width = 0;
|
|
|
|
|
for (i = 0; i < nscroll_texts; i++)
|
|
|
|
|
{
|
2000-07-19 16:42:39 +08:00
|
|
|
|
scroll_text_widths[i] = gdk_string_width (aboutframe->style->font,
|
|
|
|
|
scroll_text[i]);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
max_width = MAX (max_width, scroll_text_widths[i]);
|
|
|
|
|
}
|
2000-07-25 06:11:28 +08:00
|
|
|
|
for (i = 0; i < (sizeof (drop_text) / sizeof (drop_text[0])); i++)
|
|
|
|
|
{
|
|
|
|
|
max_width = MAX (max_width,
|
|
|
|
|
gdk_string_width (aboutframe->style->font, drop_text[i]));
|
|
|
|
|
}
|
2000-08-24 08:33:11 +08:00
|
|
|
|
for (i = 0; i < (sizeof (hadja_text) / sizeof (hadja_text[0])); i++)
|
|
|
|
|
{
|
|
|
|
|
max_width = MAX (max_width,
|
|
|
|
|
gdk_string_width (aboutframe->style->font, hadja_text[i]));
|
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
scroll_area = gtk_drawing_area_new ();
|
|
|
|
|
gtk_drawing_area_size (GTK_DRAWING_AREA (scroll_area),
|
|
|
|
|
max_width + 10,
|
1997-12-08 18:36:19 +08:00
|
|
|
|
aboutframe->style->font->ascent +
|
|
|
|
|
aboutframe->style->font->descent);
|
|
|
|
|
gtk_widget_set_events (scroll_area, GDK_BUTTON_PRESS_MASK);
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (aboutframe), scroll_area);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_widget_show (scroll_area);
|
|
|
|
|
|
1998-08-06 07:46:04 +08:00
|
|
|
|
label = gtk_label_new (_("Please visit http://www.gimp.org/ for more info"));
|
1998-03-14 03:41:03 +08:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_widget_realize (scroll_area);
|
2000-07-19 16:42:39 +08:00
|
|
|
|
gdk_window_set_background (scroll_area->window,
|
|
|
|
|
&scroll_area->style->white);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
if (! GTK_WIDGET_VISIBLE (about_dialog))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
gtk_widget_show (about_dialog);
|
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
do_animation = TRUE;
|
|
|
|
|
do_scrolling = FALSE;
|
|
|
|
|
scroll_state = 0;
|
|
|
|
|
frame = 0;
|
|
|
|
|
offset = 0;
|
2000-07-19 16:42:39 +08:00
|
|
|
|
cur_scroll_text = 0;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
if (! double_speed && hadja_state != 7)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
2000-07-19 16:42:39 +08:00
|
|
|
|
for (i = 0; i < nscroll_texts; i++)
|
|
|
|
|
{
|
|
|
|
|
shuffle_array[i] = i;
|
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
2000-07-19 16:42:39 +08:00
|
|
|
|
for (i = 0; i < nscroll_texts; i++)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
2000-07-19 16:42:39 +08:00
|
|
|
|
gint j;
|
|
|
|
|
|
|
|
|
|
j = rand() % nscroll_texts;
|
|
|
|
|
if (i != j)
|
|
|
|
|
{
|
|
|
|
|
gint t;
|
|
|
|
|
|
|
|
|
|
t = shuffle_array[j];
|
|
|
|
|
shuffle_array[j] = shuffle_array[i];
|
|
|
|
|
shuffle_array[i] = t;
|
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
2000-07-19 16:42:39 +08:00
|
|
|
|
cur_scroll_text = rand() % nscroll_texts;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
1999-12-18 00:37:34 +08:00
|
|
|
|
gdk_window_raise (about_dialog->window);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
|
|
|
|
return about_dialog;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
static gboolean
|
1997-11-25 06:05:25 +08:00
|
|
|
|
about_dialog_load_logo (GtkWidget *window)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *preview;
|
2000-07-16 20:49:04 +08:00
|
|
|
|
GdkGC *gc;
|
|
|
|
|
gchar buf[1024];
|
|
|
|
|
gchar *filename;
|
|
|
|
|
guchar *pixelrow;
|
|
|
|
|
FILE *fp;
|
|
|
|
|
gint count;
|
|
|
|
|
gint i, j, k;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
if (logo_pixmap)
|
|
|
|
|
return TRUE;
|
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
filename = g_strconcat (gimp_data_directory (),
|
|
|
|
|
G_DIR_SEPARATOR_S,
|
|
|
|
|
"gimp_logo.ppm",
|
|
|
|
|
NULL);
|
|
|
|
|
fp = fopen (filename, "rb");
|
|
|
|
|
g_free (filename);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
if (!fp)
|
2000-07-16 20:49:04 +08:00
|
|
|
|
return FALSE;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
fgets (buf, 1024, fp);
|
1999-06-03 05:56:36 +08:00
|
|
|
|
|
|
|
|
|
if (strncmp (buf, "P6", 2) != 0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
2000-07-16 20:49:04 +08:00
|
|
|
|
return FALSE;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fgets (buf, 1024, fp);
|
|
|
|
|
fgets (buf, 1024, fp);
|
|
|
|
|
sscanf (buf, "%d %d", &logo_width, &logo_height);
|
|
|
|
|
|
|
|
|
|
fgets (buf, 1024, fp);
|
1999-06-03 05:56:36 +08:00
|
|
|
|
if (strncmp (buf, "255", 3) != 0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
2000-07-16 20:49:04 +08:00
|
|
|
|
return FALSE;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
|
|
|
|
|
gtk_preview_size (GTK_PREVIEW (preview), logo_width, logo_height);
|
|
|
|
|
pixelrow = g_new (guchar, logo_width * 3);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < logo_height; i++)
|
|
|
|
|
{
|
2000-07-16 20:49:04 +08:00
|
|
|
|
count = fread (pixelrow, sizeof (guchar), logo_width * 3, fp);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
if (count != (logo_width * 3))
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_destroy (preview);
|
|
|
|
|
g_free (pixelrow);
|
|
|
|
|
fclose (fp);
|
2000-07-16 20:49:04 +08:00
|
|
|
|
return FALSE;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gtk_preview_draw_row (GTK_PREVIEW (preview), pixelrow, 0, i, logo_width);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gtk_widget_realize (window);
|
1998-02-28 06:09:01 +08:00
|
|
|
|
logo_pixmap = gdk_pixmap_new (window->window, logo_width, logo_height,
|
|
|
|
|
gtk_preview_get_visual ()->depth);
|
|
|
|
|
gc = gdk_gc_new (logo_pixmap);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
gtk_preview_put (GTK_PREVIEW (preview),
|
1998-02-28 06:09:01 +08:00
|
|
|
|
logo_pixmap, gc,
|
1997-11-25 06:05:25 +08:00
|
|
|
|
0, 0, 0, 0, logo_width, logo_height);
|
1998-02-28 06:09:01 +08:00
|
|
|
|
gdk_gc_destroy (gc);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
1998-02-28 06:09:01 +08:00
|
|
|
|
gtk_widget_unref (preview);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
g_free (pixelrow);
|
|
|
|
|
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
1999-12-18 00:37:34 +08:00
|
|
|
|
dissolve_width =
|
|
|
|
|
(logo_width / ANIMATION_SIZE) + (logo_width % ANIMATION_SIZE == 0 ? 0 : 1);
|
|
|
|
|
dissolve_height =
|
|
|
|
|
(logo_height / ANIMATION_SIZE) + (logo_height % ANIMATION_SIZE == 0 ? 0 : 1);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
dissolve_map = g_new (guchar, dissolve_width * dissolve_height);
|
|
|
|
|
|
|
|
|
|
srand (time (NULL));
|
|
|
|
|
|
|
|
|
|
for (i = 0, k = 0; i < dissolve_height; i++)
|
|
|
|
|
for (j = 0; j < dissolve_width; j++, k++)
|
|
|
|
|
dissolve_map[k] = rand () % ANIMATION_STEPS;
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-16 20:49:04 +08:00
|
|
|
|
about_dialog_destroy (GtkObject *object,
|
|
|
|
|
gpointer data)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
about_dialog = NULL;
|
2000-07-16 20:49:04 +08:00
|
|
|
|
about_dialog_unmap (NULL, NULL, NULL);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-16 20:49:04 +08:00
|
|
|
|
about_dialog_unmap (GtkWidget *widget,
|
|
|
|
|
GdkEvent *event,
|
|
|
|
|
gpointer data)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
if (timer)
|
|
|
|
|
{
|
|
|
|
|
gtk_timeout_remove (timer);
|
|
|
|
|
timer = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
|
static gint
|
1997-11-25 06:05:25 +08:00
|
|
|
|
about_dialog_logo_expose (GtkWidget *widget,
|
2000-07-16 20:49:04 +08:00
|
|
|
|
GdkEventExpose *event,
|
|
|
|
|
gpointer data)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
if (do_animation)
|
|
|
|
|
{
|
|
|
|
|
if (!timer)
|
|
|
|
|
{
|
|
|
|
|
about_dialog_timer (widget);
|
|
|
|
|
timer = gtk_timeout_add (75, about_dialog_timer, NULL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* If we draw beyond the boundaries of the pixmap, then X
|
|
|
|
|
will generate an expose area for those areas, starting
|
|
|
|
|
an infinite cycle. We now set allow_grow = FALSE, so
|
|
|
|
|
the drawing area can never be bigger than the preview.
|
|
|
|
|
Otherwise, it would be necessary to intersect event->area
|
|
|
|
|
with the pixmap boundary rectangle. */
|
|
|
|
|
|
|
|
|
|
gdk_draw_pixmap (widget->window,
|
|
|
|
|
widget->style->black_gc,
|
|
|
|
|
logo_pixmap,
|
|
|
|
|
event->area.x, event->area.y,
|
|
|
|
|
event->area.x, event->area.y,
|
|
|
|
|
event->area.width, event->area.height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
|
static gint
|
1997-11-25 06:05:25 +08:00
|
|
|
|
about_dialog_button (GtkWidget *widget,
|
2000-07-16 20:49:04 +08:00
|
|
|
|
GdkEventButton *event,
|
|
|
|
|
gpointer data)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
if (timer)
|
|
|
|
|
gtk_timeout_remove (timer);
|
|
|
|
|
timer = 0;
|
|
|
|
|
frame = 0;
|
|
|
|
|
|
|
|
|
|
gtk_widget_hide (about_dialog);
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
2000-08-24 08:33:11 +08:00
|
|
|
|
static gint
|
|
|
|
|
about_dialog_key (GtkWidget *widget,
|
|
|
|
|
GdkEventKey *event,
|
|
|
|
|
gpointer data)
|
|
|
|
|
{
|
|
|
|
|
gint i;
|
|
|
|
|
|
2000-08-25 03:38:48 +08:00
|
|
|
|
if (hadja_state == 7)
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
2000-08-24 08:33:11 +08:00
|
|
|
|
switch (event->keyval)
|
|
|
|
|
{
|
|
|
|
|
case GDK_h:
|
|
|
|
|
case GDK_H:
|
|
|
|
|
if (hadja_state == 0 || hadja_state == 5)
|
|
|
|
|
hadja_state++;
|
|
|
|
|
else
|
|
|
|
|
hadja_state = 1;
|
|
|
|
|
break;
|
|
|
|
|
case GDK_a:
|
|
|
|
|
case GDK_A:
|
|
|
|
|
if (hadja_state == 1 || hadja_state == 4 || hadja_state == 6)
|
|
|
|
|
hadja_state++;
|
|
|
|
|
else
|
|
|
|
|
hadja_state = 0;
|
|
|
|
|
break;
|
|
|
|
|
case GDK_d:
|
|
|
|
|
case GDK_D:
|
|
|
|
|
if (hadja_state == 2)
|
|
|
|
|
hadja_state++;
|
|
|
|
|
else
|
|
|
|
|
hadja_state = 0;
|
|
|
|
|
break;
|
|
|
|
|
case GDK_j:
|
|
|
|
|
case GDK_J:
|
|
|
|
|
if (hadja_state == 3)
|
|
|
|
|
hadja_state++;
|
|
|
|
|
else
|
|
|
|
|
hadja_state = 0;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
hadja_state = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hadja_state == 7)
|
|
|
|
|
{
|
|
|
|
|
scroll_text = hadja_text;
|
|
|
|
|
nscroll_texts = sizeof (hadja_text) / sizeof (hadja_text[0]);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < nscroll_texts; i++)
|
|
|
|
|
{
|
|
|
|
|
shuffle_array[i] = i;
|
|
|
|
|
scroll_text_widths[i] = gdk_string_width (scroll_area->style->font,
|
2000-08-25 03:38:48 +08:00
|
|
|
|
scroll_text[i]);
|
2000-08-24 08:33:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
scroll_state = 0;
|
2000-08-24 08:33:11 +08:00
|
|
|
|
cur_scroll_index = 0;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
cur_scroll_text = 0;
|
|
|
|
|
offset = 0;
|
2000-08-24 08:33:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
static void
|
2001-02-21 20:18:09 +08:00
|
|
|
|
about_dialog_tool_drop (GtkWidget *widget,
|
|
|
|
|
GimpViewable *viewable,
|
|
|
|
|
gpointer data)
|
2000-07-16 20:49:04 +08:00
|
|
|
|
{
|
|
|
|
|
GdkPixmap *pixmap = NULL;
|
|
|
|
|
GdkBitmap *mask = NULL;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
gint width = 0;
|
|
|
|
|
gint height = 0;
|
|
|
|
|
gint i;
|
2000-07-25 06:11:28 +08:00
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
if (do_animation)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (timer)
|
|
|
|
|
gtk_timeout_remove (timer);
|
|
|
|
|
|
|
|
|
|
timer = gtk_timeout_add (75, about_dialog_timer, NULL);
|
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
frame = 0;
|
2000-07-16 20:49:04 +08:00
|
|
|
|
do_animation = TRUE;
|
|
|
|
|
do_scrolling = FALSE;
|
|
|
|
|
|
|
|
|
|
gdk_draw_rectangle (logo_pixmap,
|
|
|
|
|
logo_area->style->white_gc,
|
|
|
|
|
TRUE,
|
|
|
|
|
0, 0,
|
|
|
|
|
logo_area->allocation.width,
|
|
|
|
|
logo_area->allocation.height);
|
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
pixmap = gdk_pixmap_create_from_xpm_d (widget->window,
|
|
|
|
|
&mask,
|
|
|
|
|
NULL,
|
|
|
|
|
wilber2_xpm);
|
2000-07-16 20:49:04 +08:00
|
|
|
|
|
|
|
|
|
gdk_window_get_size (pixmap, &width, &height);
|
|
|
|
|
|
|
|
|
|
if (logo_area->allocation.width >= width &&
|
|
|
|
|
logo_area->allocation.height >= height)
|
|
|
|
|
{
|
|
|
|
|
gint x, y;
|
|
|
|
|
|
|
|
|
|
x = (logo_area->allocation.width - width) / 2;
|
|
|
|
|
y = (logo_area->allocation.height - height) / 2;
|
|
|
|
|
|
|
|
|
|
gdk_gc_set_clip_mask (logo_area->style->black_gc, mask);
|
|
|
|
|
gdk_gc_set_clip_origin (logo_area->style->black_gc, x, y);
|
|
|
|
|
|
|
|
|
|
gdk_draw_pixmap (logo_pixmap,
|
|
|
|
|
logo_area->style->black_gc,
|
|
|
|
|
pixmap, 0, 0,
|
|
|
|
|
x, y,
|
|
|
|
|
width, height);
|
|
|
|
|
|
|
|
|
|
gdk_gc_set_clip_mask (logo_area->style->black_gc, NULL);
|
|
|
|
|
gdk_gc_set_clip_origin (logo_area->style->black_gc, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
|
2001-07-25 21:21:57 +08:00
|
|
|
|
gdk_drawable_unref (pixmap);
|
|
|
|
|
gdk_drawable_unref (mask);
|
2000-07-16 20:49:04 +08:00
|
|
|
|
|
2000-07-25 06:11:28 +08:00
|
|
|
|
scroll_text = drop_text;
|
|
|
|
|
nscroll_texts = sizeof (drop_text) / sizeof (drop_text[0]);
|
2000-07-19 16:42:39 +08:00
|
|
|
|
|
|
|
|
|
for (i = 0; i < nscroll_texts; i++)
|
|
|
|
|
{
|
|
|
|
|
shuffle_array[i] = i;
|
|
|
|
|
scroll_text_widths[i] = gdk_string_width (scroll_area->style->font,
|
|
|
|
|
scroll_text[i]);
|
|
|
|
|
}
|
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
|
scroll_state = 0;
|
2000-07-19 16:42:39 +08:00
|
|
|
|
cur_scroll_index = 0;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
cur_scroll_text = 0;
|
|
|
|
|
offset = 0;
|
2000-07-19 16:42:39 +08:00
|
|
|
|
|
2000-07-16 20:49:04 +08:00
|
|
|
|
double_speed = TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
|
static gint
|
1997-11-25 06:05:25 +08:00
|
|
|
|
about_dialog_timer (gpointer data)
|
|
|
|
|
{
|
|
|
|
|
gint i, j, k;
|
|
|
|
|
gint return_val;
|
|
|
|
|
|
|
|
|
|
return_val = TRUE;
|
|
|
|
|
|
|
|
|
|
if (do_animation)
|
|
|
|
|
{
|
2000-06-28 05:38:44 +08:00
|
|
|
|
if (logo_area->allocation.width != 1)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
1997-12-08 18:36:19 +08:00
|
|
|
|
for (i = 0, k = 0; i < dissolve_height; i++)
|
|
|
|
|
for (j = 0; j < dissolve_width; j++, k++)
|
1997-12-11 08:57:08 +08:00
|
|
|
|
if (frame == dissolve_map[k])
|
1997-12-08 18:36:19 +08:00
|
|
|
|
{
|
|
|
|
|
gdk_draw_pixmap (logo_area->window,
|
|
|
|
|
logo_area->style->black_gc,
|
|
|
|
|
logo_pixmap,
|
1999-12-18 00:37:34 +08:00
|
|
|
|
j * ANIMATION_SIZE, i * ANIMATION_SIZE,
|
|
|
|
|
j * ANIMATION_SIZE, i * ANIMATION_SIZE,
|
1997-12-08 18:36:19 +08:00
|
|
|
|
ANIMATION_SIZE, ANIMATION_SIZE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
frame += 1;
|
|
|
|
|
|
|
|
|
|
if (frame == ANIMATION_STEPS)
|
|
|
|
|
{
|
|
|
|
|
do_animation = FALSE;
|
|
|
|
|
do_scrolling = TRUE;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
frame = 0;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
1997-12-08 18:36:19 +08:00
|
|
|
|
timer = gtk_timeout_add (75, about_dialog_timer, NULL);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
1997-12-08 18:36:19 +08:00
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (do_scrolling)
|
|
|
|
|
{
|
2001-04-19 00:39:34 +08:00
|
|
|
|
if (! scroll_pixmap)
|
1997-12-08 18:36:19 +08:00
|
|
|
|
scroll_pixmap = gdk_pixmap_new (scroll_area->window,
|
|
|
|
|
scroll_area->allocation.width,
|
|
|
|
|
scroll_area->allocation.height,
|
|
|
|
|
-1);
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
switch (scroll_state)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
scroll_state = 2;
|
|
|
|
|
timer = gtk_timeout_add (700, about_dialog_timer, NULL);
|
|
|
|
|
return_val = FALSE;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
scroll_state = 3;
|
|
|
|
|
timer = gtk_timeout_add (75, about_dialog_timer, NULL);
|
|
|
|
|
return_val = FALSE;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 00:37:34 +08:00
|
|
|
|
if (offset > (scroll_text_widths[cur_scroll_text] +
|
|
|
|
|
scroll_area->allocation.width))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
scroll_state = 0;
|
|
|
|
|
cur_scroll_index += 1;
|
|
|
|
|
if (cur_scroll_index == nscroll_texts)
|
|
|
|
|
cur_scroll_index = 0;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
cur_scroll_text = shuffle_array[cur_scroll_index];
|
|
|
|
|
|
|
|
|
|
offset = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gdk_draw_rectangle (scroll_pixmap,
|
|
|
|
|
scroll_area->style->white_gc,
|
|
|
|
|
TRUE, 0, 0,
|
|
|
|
|
scroll_area->allocation.width,
|
|
|
|
|
scroll_area->allocation.height);
|
|
|
|
|
gdk_draw_string (scroll_pixmap,
|
|
|
|
|
scroll_area->style->font,
|
|
|
|
|
scroll_area->style->black_gc,
|
|
|
|
|
scroll_area->allocation.width - offset,
|
|
|
|
|
scroll_area->style->font->ascent,
|
|
|
|
|
scroll_text[cur_scroll_text]);
|
|
|
|
|
gdk_draw_pixmap (scroll_area->window,
|
|
|
|
|
scroll_area->style->black_gc,
|
|
|
|
|
scroll_pixmap, 0, 0, 0, 0,
|
|
|
|
|
scroll_area->allocation.width,
|
|
|
|
|
scroll_area->allocation.height);
|
|
|
|
|
|
|
|
|
|
offset += 15;
|
|
|
|
|
if (scroll_state == 0)
|
|
|
|
|
{
|
1999-12-18 00:37:34 +08:00
|
|
|
|
if (offset > ((scroll_area->allocation.width +
|
|
|
|
|
scroll_text_widths[cur_scroll_text]) / 2))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
{
|
|
|
|
|
scroll_state = 1;
|
1999-12-18 00:37:34 +08:00
|
|
|
|
offset = (scroll_area->allocation.width +
|
|
|
|
|
scroll_text_widths[cur_scroll_text]) / 2;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return return_val;
|
|
|
|
|
}
|