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.
|
|
|
|
*/
|
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>
|
1998-07-15 10:28:31 +08:00
|
|
|
|
|
|
|
#include "libgimp/gimpfeatures.h"
|
|
|
|
|
1998-11-23 22:47:09 +08:00
|
|
|
#include "config.h"
|
1998-08-06 07:46:04 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
1999-03-07 20:56:03 +08:00
|
|
|
#include "libgimp/gimpenv.h"
|
1998-08-06 07:46:04 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "about_dialog.h"
|
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
|
|
|
|
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 about_dialog_load_logo (GtkWidget *window);
|
|
|
|
static void about_dialog_destroy (void);
|
|
|
|
static void about_dialog_unmap (void);
|
|
|
|
static gint about_dialog_logo_expose (GtkWidget *widget, GdkEventExpose *event);
|
|
|
|
static gint about_dialog_button (GtkWidget *widget, GdkEventButton *event);
|
|
|
|
static gint about_dialog_timer (gpointer data);
|
1997-11-25 06:05:25 +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;
|
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 guchar *dissolve_map = NULL;
|
|
|
|
static gint dissolve_width;
|
|
|
|
static gint dissolve_height;
|
|
|
|
static gint logo_width = 0;
|
|
|
|
static gint logo_height = 0;
|
|
|
|
static gint do_animation = 0;
|
|
|
|
static gint do_scrolling = 0;
|
|
|
|
static gint scroll_state = 0;
|
|
|
|
static gint frame = 0;
|
|
|
|
static gint offset = 0;
|
|
|
|
static gint timer = 0;
|
|
|
|
|
|
|
|
static gchar *scroll_text[] =
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
"Lauri Alanko",
|
|
|
|
"Shawn Amundson",
|
|
|
|
"John Beale",
|
|
|
|
"Zach Beane",
|
|
|
|
"Tom Bech",
|
|
|
|
"Marc Bless",
|
1998-01-26 11:14:09 +08:00
|
|
|
"Edward Blevins",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Roberto Boyd",
|
1999-07-01 17:15:32 +08:00
|
|
|
"Simon Budig",
|
1997-12-09 13:54:04 +08:00
|
|
|
"Seth Burgess",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Brent Burton",
|
1998-03-16 12:49:46 +08:00
|
|
|
"Francisco Bustamante",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Ed Connel",
|
1998-10-07 16:59:11 +08:00
|
|
|
"Jay Cox",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Andreas Dilger",
|
1998-10-07 16:59:11 +08:00
|
|
|
"Austin Donnelly",
|
1998-02-26 19:55:07 +08:00
|
|
|
"Misha Dynin",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Larry Ewing",
|
1998-08-31 10:08:15 +08:00
|
|
|
"Nick Fetchak",
|
1997-11-25 06:05:25 +08:00
|
|
|
"David Forsyth",
|
|
|
|
"Jim Geuther",
|
|
|
|
"Scott Goehring",
|
|
|
|
"Heiko Goller",
|
|
|
|
"Michael Hammel",
|
|
|
|
"Christoph Hoegl",
|
1999-07-01 17:15:32 +08:00
|
|
|
"Wolfgang Hofer",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Jan Hubicka",
|
|
|
|
"Simon Janes",
|
|
|
|
"Tim Janik",
|
|
|
|
"Tuomas Kuosmanen",
|
1998-01-26 06:13:00 +08:00
|
|
|
"Peter Kirchgessner",
|
1998-04-30 07:53:00 +08:00
|
|
|
"Nick Lamb",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Karl LaRocca",
|
|
|
|
"Jens Lautenbacher",
|
1998-01-26 11:14:09 +08:00
|
|
|
"Laramie Leavitt",
|
1998-03-14 03:41:03 +08:00
|
|
|
"Elliot Lee",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Raph Levien",
|
|
|
|
"Adrian Likins",
|
|
|
|
"Ingo Luetkebohle",
|
|
|
|
"Josh MacDonald",
|
|
|
|
"Ed Mackey",
|
|
|
|
"Marcelo Malheiros",
|
|
|
|
"Ian Main",
|
|
|
|
"Torsten Martinsen",
|
|
|
|
"Federico Mena",
|
|
|
|
"Adam D. Moss",
|
|
|
|
"Shuji Narazaki",
|
1999-07-01 17:15:32 +08:00
|
|
|
"Michael Natterer",
|
1997-12-09 00:50:54 +08:00
|
|
|
"Sven Neumann",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Stephen Robert Norris",
|
|
|
|
"Erik Nygren",
|
|
|
|
"Miles O'Neal",
|
|
|
|
"Jay Painter",
|
|
|
|
"Mike Phillips",
|
|
|
|
"Raphael Quinet",
|
|
|
|
"James Robinson",
|
|
|
|
"Mike Schaeffer",
|
|
|
|
"Tracy Scott",
|
1997-12-08 18:36:19 +08:00
|
|
|
"Manish Singh",
|
1997-12-09 13:54:04 +08:00
|
|
|
"Nathan Summers",
|
1997-12-09 00:50:54 +08:00
|
|
|
"Mike Sweet",
|
1997-11-25 06:05:25 +08:00
|
|
|
"Eiichi Takamori",
|
|
|
|
"Tristan Tarrant",
|
|
|
|
"Owen Taylor",
|
|
|
|
"Ian Tester",
|
1998-04-15 07:17:58 +08:00
|
|
|
"Andy Thomas",
|
1997-11-25 06:05:25 +08:00
|
|
|
"James Wang",
|
|
|
|
"Kris Wehner",
|
1998-03-15 10:46:15 +08:00
|
|
|
"Matthew Wilson",
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
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 nscroll_texts = sizeof (scroll_text) / sizeof (scroll_text[0]);
|
|
|
|
static gint scroll_text_widths[100] = { 0 };
|
|
|
|
static gint cur_scroll_text = 0;
|
|
|
|
static gint cur_scroll_index = 0;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
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 shuffle_array[ sizeof(scroll_text) / sizeof(scroll_text[0]) ];
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
void
|
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
|
|
|
about_dialog_create (gint timeout)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
GtkStyle *style;
|
|
|
|
GtkWidget *vbox;
|
1997-12-08 18:36:19 +08:00
|
|
|
GtkWidget *aboutframe;
|
1997-11-25 06:05:25 +08:00
|
|
|
GtkWidget *label;
|
|
|
|
GtkWidget *alignment;
|
|
|
|
gint max_width;
|
|
|
|
gint i;
|
1998-08-06 07:46:04 +08:00
|
|
|
gchar *label_text;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
if (!about_dialog)
|
|
|
|
{
|
|
|
|
about_dialog = gtk_window_new (GTK_WINDOW_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);
|
|
|
|
gtk_window_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (about_dialog), "destroy",
|
|
|
|
(GtkSignalFunc) about_dialog_destroy, NULL);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (about_dialog), "unmap_event",
|
|
|
|
(GtkSignalFunc) about_dialog_unmap, NULL);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (about_dialog), "button_press_event",
|
|
|
|
(GtkSignalFunc) about_dialog_button, NULL);
|
|
|
|
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;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
|
|
|
(GtkSignalFunc) about_dialog_logo_expose, NULL);
|
|
|
|
gtk_drawing_area_size (GTK_DRAWING_AREA (logo_area), logo_width, logo_height);
|
|
|
|
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);
|
|
|
|
|
|
|
|
style = gtk_style_new ();
|
1997-12-18 14:30:11 +08:00
|
|
|
gdk_font_unref (style->font);
|
1998-08-06 07:46:04 +08:00
|
|
|
style->font = gdk_font_load (_("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*"));
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_widget_push_style (style);
|
|
|
|
|
1998-08-30 06:33:57 +08:00
|
|
|
label_text = g_strdup_printf("%s%s%s", _("Version "), GIMP_VERSION,
|
|
|
|
_(" brought to you by"));
|
1998-08-06 07:46:04 +08:00
|
|
|
label = gtk_label_new (label_text);
|
|
|
|
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);
|
|
|
|
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
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);
|
|
|
|
|
|
|
|
gtk_widget_pop_style ();
|
|
|
|
|
|
|
|
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++)
|
|
|
|
{
|
1997-12-08 18:36:19 +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]);
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
gdk_window_set_background (scroll_area->window, &scroll_area->style->white);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!GTK_WIDGET_VISIBLE (about_dialog))
|
|
|
|
{
|
|
|
|
gtk_widget_show (about_dialog);
|
|
|
|
|
|
|
|
do_animation = TRUE;
|
|
|
|
do_scrolling = FALSE;
|
|
|
|
scroll_state = 0;
|
|
|
|
frame = 0;
|
|
|
|
offset = 0;
|
|
|
|
|
|
|
|
for (i = 0; i < nscroll_texts; i++)
|
|
|
|
{
|
|
|
|
shuffle_array[i] = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < nscroll_texts; i++)
|
|
|
|
{
|
|
|
|
int j, k;
|
|
|
|
j = rand() % nscroll_texts;
|
|
|
|
k = rand() % nscroll_texts;
|
|
|
|
if (j != k)
|
|
|
|
{
|
|
|
|
int t;
|
|
|
|
t = shuffle_array[j];
|
|
|
|
shuffle_array[j] = shuffle_array[k];
|
|
|
|
shuffle_array[k] = t;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gdk_window_raise(about_dialog->window);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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_load_logo (GtkWidget *window)
|
|
|
|
{
|
|
|
|
GtkWidget *preview;
|
1998-02-28 06:09:01 +08:00
|
|
|
GdkGC *gc;
|
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
|
|
|
gchar buf[1024];
|
|
|
|
guchar *pixelrow;
|
1997-11-25 06:05:25 +08:00
|
|
|
FILE *fp;
|
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
|
|
|
gint count;
|
|
|
|
gint i, j, k;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
if (logo_pixmap)
|
|
|
|
return TRUE;
|
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
g_snprintf (buf, sizeof(buf), "%s" G_DIR_SEPARATOR_S "gimp_logo.ppm",
|
|
|
|
gimp_data_directory ());
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1998-05-30 15:32:37 +08:00
|
|
|
fp = fopen (buf, "rb");
|
1997-11-25 06:05:25 +08:00
|
|
|
if (!fp)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
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);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
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++)
|
|
|
|
{
|
|
|
|
count = fread (pixelrow, sizeof (unsigned char), logo_width * 3, fp);
|
|
|
|
if (count != (logo_width * 3))
|
|
|
|
{
|
|
|
|
gtk_widget_destroy (preview);
|
|
|
|
g_free (pixelrow);
|
|
|
|
fclose (fp);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
1997-12-08 18:36:19 +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
|
1999-09-02 09:41:18 +08:00
|
|
|
about_dialog_destroy (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
about_dialog = NULL;
|
|
|
|
about_dialog_unmap ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
1999-09-02 09:41:18 +08:00
|
|
|
about_dialog_unmap (void)
|
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,
|
|
|
|
GdkEventExpose *event)
|
|
|
|
{
|
|
|
|
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,
|
|
|
|
GdkEventButton *event)
|
|
|
|
{
|
|
|
|
if (timer)
|
|
|
|
gtk_timeout_remove (timer);
|
|
|
|
timer = 0;
|
|
|
|
frame = 0;
|
|
|
|
|
|
|
|
gtk_widget_hide (about_dialog);
|
|
|
|
|
|
|
|
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_timer (gpointer data)
|
|
|
|
{
|
|
|
|
gint i, j, k;
|
|
|
|
gint return_val;
|
|
|
|
|
|
|
|
return_val = TRUE;
|
|
|
|
|
|
|
|
if (do_animation)
|
|
|
|
{
|
1997-12-08 18:36:19 +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,
|
|
|
|
j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE,
|
|
|
|
ANIMATION_SIZE, ANIMATION_SIZE);
|
|
|
|
}
|
|
|
|
|
|
|
|
frame += 1;
|
|
|
|
|
|
|
|
if (frame == ANIMATION_STEPS)
|
|
|
|
{
|
|
|
|
do_animation = FALSE;
|
|
|
|
do_scrolling = TRUE;
|
|
|
|
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)
|
|
|
|
{
|
1997-12-08 18:36:19 +08:00
|
|
|
if (!scroll_pixmap)
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (offset > (scroll_text_widths[cur_scroll_text] + scroll_area->allocation.width))
|
|
|
|
{
|
|
|
|
scroll_state = 0;
|
|
|
|
cur_scroll_index += 1;
|
|
|
|
if (cur_scroll_index == nscroll_texts)
|
|
|
|
cur_scroll_index = 0;
|
|
|
|
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
if (offset > ((scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2))
|
|
|
|
{
|
|
|
|
scroll_state = 1;
|
|
|
|
offset = (scroll_area->allocation.width + scroll_text_widths[cur_scroll_text]) / 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return return_val;
|
|
|
|
}
|