1999-12-18 06:34:12 +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-12-17 05:37:03 +08:00
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <string.h>
|
2000-04-28 01:27:28 +08:00
|
|
|
|
2000-12-17 05:37:03 +08:00
|
|
|
#include <gtk/gtk.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"
|
|
|
|
|
2002-05-03 20:45:22 +08:00
|
|
|
#include "gui-types.h"
|
2000-12-29 23:22:01 +08:00
|
|
|
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "tips-dialog.h"
|
2002-02-25 10:52:33 +08:00
|
|
|
#include "tips-parser.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "gimprc.h"
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
|
|
|
|
2002-02-27 00:55:09 +08:00
|
|
|
static void tips_set_labels (GimpTip *tip);
|
2002-02-25 10:52:33 +08:00
|
|
|
static void tips_dialog_destroy (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void tips_show_previous (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void tips_show_next (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void tips_toggle_update (GtkWidget *widget,
|
|
|
|
gpointer data);
|
2001-01-25 06:36:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
static GtkWidget *tips_dialog = NULL;
|
|
|
|
static GtkWidget *welcome_label = NULL;
|
|
|
|
static GtkWidget *thetip_label = NULL;
|
|
|
|
static GList *tips = NULL;
|
|
|
|
static GList *current_tip = NULL;
|
|
|
|
static gint tips_count = 0;
|
|
|
|
static gint old_show_tips = 0;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
GtkWidget *
|
1999-12-18 06:34:12 +08:00
|
|
|
tips_dialog_create (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2002-02-27 00:55:09 +08:00
|
|
|
GtkWidget *vbox;
|
|
|
|
GtkWidget *vbox2;
|
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *bbox;
|
|
|
|
GtkWidget *button;
|
|
|
|
GdkPixbuf *wilber;
|
|
|
|
gchar *filename;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2002-02-25 10:52:33 +08:00
|
|
|
if (!tips)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2002-02-25 10:52:33 +08:00
|
|
|
GError *error = NULL;
|
|
|
|
gchar *filename;
|
|
|
|
|
|
|
|
filename = g_build_filename (gimp_data_directory (), "tips",
|
|
|
|
"gimp-tips.xml", NULL);
|
2002-02-26 00:48:30 +08:00
|
|
|
|
2002-02-26 02:36:03 +08:00
|
|
|
tips = gimp_tips_from_file (filename, &error);
|
2002-02-25 10:52:33 +08:00
|
|
|
g_free (filename);
|
|
|
|
|
|
|
|
if (error)
|
|
|
|
{
|
2002-02-26 05:33:50 +08:00
|
|
|
tips = g_list_prepend (tips,
|
2002-02-27 00:55:09 +08:00
|
|
|
gimp_tip_new (_("<b>The GIMP tips file could not be parsed correctly!</b>"), error->message));
|
2002-02-25 10:52:33 +08:00
|
|
|
g_error_free (error);
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2002-02-25 10:52:33 +08:00
|
|
|
tips_count = g_list_length (tips);
|
|
|
|
|
2001-06-04 04:40:50 +08:00
|
|
|
if (gimprc.last_tip >= tips_count || gimprc.last_tip < 0)
|
|
|
|
gimprc.last_tip = 0;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
current_tip = g_list_nth (tips, gimprc.last_tip);
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
if (tips_dialog)
|
|
|
|
return tips_dialog;
|
|
|
|
|
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
|
|
|
tips_dialog = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
|
|
gtk_window_set_type_hint (GTK_WINDOW (tips_dialog),
|
|
|
|
GDK_WINDOW_TYPE_HINT_DIALOG);
|
2001-04-19 00:39:34 +08:00
|
|
|
gtk_window_set_wmclass (GTK_WINDOW (tips_dialog), "tip_of_the_day", "Gimp");
|
|
|
|
gtk_window_set_title (GTK_WINDOW (tips_dialog), _("GIMP Tip of the Day"));
|
|
|
|
gtk_window_set_position (GTK_WINDOW (tips_dialog), GTK_WIN_POS_CENTER);
|
2002-01-26 02:34:33 +08:00
|
|
|
gtk_window_set_resizable (GTK_WINDOW (tips_dialog), TRUE);
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-08-15 00:33:28 +08:00
|
|
|
g_signal_connect (G_OBJECT (tips_dialog), "delete_event",
|
2002-01-26 02:34:33 +08:00
|
|
|
G_CALLBACK (gtk_widget_destroy),
|
|
|
|
NULL);
|
2001-05-01 21:16:59 +08:00
|
|
|
|
2001-08-15 00:33:28 +08:00
|
|
|
g_signal_connect (G_OBJECT (tips_dialog), "destroy",
|
|
|
|
G_CALLBACK (tips_dialog_destroy),
|
|
|
|
NULL);
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
|
|
vbox = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER (tips_dialog), vbox);
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
2001-04-19 00:39:34 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 6);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
|
2002-02-27 00:55:09 +08:00
|
|
|
welcome_label = gtk_label_new (NULL);
|
2002-02-26 00:48:30 +08:00
|
|
|
gtk_label_set_justify (GTK_LABEL (welcome_label), GTK_JUSTIFY_LEFT);
|
|
|
|
gtk_label_set_line_wrap (GTK_LABEL (welcome_label), TRUE);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (welcome_label), 0.5, 0.5);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), welcome_label, FALSE, FALSE, 0);
|
2002-02-25 10:52:33 +08:00
|
|
|
|
2002-02-27 00:55:09 +08:00
|
|
|
thetip_label = gtk_label_new (NULL);
|
2002-02-26 00:48:30 +08:00
|
|
|
gtk_label_set_justify (GTK_LABEL (thetip_label), GTK_JUSTIFY_LEFT);
|
|
|
|
gtk_label_set_line_wrap (GTK_LABEL (thetip_label), TRUE);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (thetip_label), 0.5, 0.5);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), thetip_label, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (thetip_label);
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
filename = g_build_filename (gimp_data_directory (),
|
2002-02-07 19:50:16 +08:00
|
|
|
"images", "wilber-tips.png", NULL);
|
2001-11-23 07:46:13 +08:00
|
|
|
wilber = gdk_pixbuf_new_from_file (filename, NULL);
|
|
|
|
g_free (filename);
|
|
|
|
|
|
|
|
if (wilber)
|
|
|
|
{
|
|
|
|
GtkWidget *image;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
image = gtk_image_new_from_pixbuf (wilber);
|
|
|
|
g_object_unref (wilber);
|
|
|
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), image, TRUE, FALSE, 0);
|
|
|
|
gtk_widget_show (image);
|
|
|
|
}
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 15);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
|
|
|
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
button =
|
|
|
|
gtk_check_button_new_with_mnemonic (_("Show tip next time GIMP starts"));
|
2001-06-04 04:40:50 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), gimprc.show_tips);
|
2001-04-19 00:39:34 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
2001-08-15 00:33:28 +08:00
|
|
|
g_signal_connect (G_OBJECT (button), "toggled",
|
|
|
|
G_CALLBACK (tips_toggle_update),
|
|
|
|
&gimprc.show_tips);
|
|
|
|
|
2001-06-04 04:40:50 +08:00
|
|
|
old_show_tips = gimprc.show_tips;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
|
|
bbox = gtk_hbutton_box_new ();
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (bbox);
|
|
|
|
|
2001-08-04 03:43:19 +08:00
|
|
|
button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
|
2001-04-19 00:39:34 +08:00
|
|
|
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
|
|
|
gtk_window_set_default (GTK_WINDOW (tips_dialog), button);
|
|
|
|
gtk_container_add (GTK_CONTAINER (bbox), button);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
2001-08-15 00:33:28 +08:00
|
|
|
g_signal_connect_swapped (G_OBJECT (button), "clicked",
|
|
|
|
G_CALLBACK (gtk_widget_destroy),
|
|
|
|
tips_dialog);
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
bbox = gtk_hbutton_box_new ();
|
|
|
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);
|
2001-12-29 21:26:29 +08:00
|
|
|
gtk_box_set_spacing (GTK_BOX (bbox), 5);
|
2001-04-19 00:39:34 +08:00
|
|
|
gtk_box_pack_end (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (bbox);
|
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
button = gtk_button_new_with_mnemonic (_("_Previous Tip"));
|
2001-04-19 00:39:34 +08:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (button, GTK_RECEIVES_DEFAULT);
|
2001-10-23 18:09:17 +08:00
|
|
|
gtk_widget_set_sensitive (button, (tips_count > 1));
|
2001-04-19 00:39:34 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (bbox), button);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
2001-08-15 00:33:28 +08:00
|
|
|
g_signal_connect (G_OBJECT (button), "clicked",
|
|
|
|
G_CALLBACK (tips_show_previous),
|
|
|
|
NULL);
|
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
button = gtk_button_new_with_mnemonic (_("_Next Tip"));
|
2001-04-19 00:39:34 +08:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (button, GTK_RECEIVES_DEFAULT);
|
2001-10-23 18:09:17 +08:00
|
|
|
gtk_widget_set_sensitive (button, (tips_count > 1));
|
2001-04-19 00:39:34 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (bbox), button);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
2001-08-15 00:33:28 +08:00
|
|
|
g_signal_connect (G_OBJECT (button), "clicked",
|
|
|
|
G_CALLBACK (tips_show_next),
|
|
|
|
NULL);
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
/* Connect the "F1" help key */
|
2001-08-01 07:28:56 +08:00
|
|
|
gimp_help_connect (tips_dialog,
|
|
|
|
gimp_standard_help_func,
|
|
|
|
"dialogs/tip_of_the_day.html");
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2002-02-27 00:55:09 +08:00
|
|
|
tips_set_labels (current_tip->data);
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
return tips_dialog;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
1999-12-18 06:34:12 +08:00
|
|
|
static void
|
2000-04-06 06:59:44 +08:00
|
|
|
tips_dialog_destroy (GtkWidget *widget,
|
|
|
|
gpointer data)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
GList *update = NULL; /* options that should be updated in .gimprc */
|
|
|
|
GList *remove = NULL; /* options that should be commented out */
|
|
|
|
|
2001-05-01 21:16:59 +08:00
|
|
|
tips_dialog = NULL;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
current_tip = NULL;
|
2002-02-25 10:52:33 +08:00
|
|
|
gimp_tips_free (tips);
|
|
|
|
tips = NULL;
|
|
|
|
|
1998-06-24 06:50:16 +08:00
|
|
|
/* the last-shown-tip is now saved in sessionrc */
|
2002-02-26 00:48:30 +08:00
|
|
|
gimprc.last_tip = g_list_position (tips, current_tip);
|
1998-06-24 06:50:16 +08:00
|
|
|
|
2001-06-04 04:40:50 +08:00
|
|
|
if (gimprc.show_tips != old_show_tips)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
update = g_list_append (update, "show-tips");
|
|
|
|
remove = g_list_append (remove, "dont-show-tips");
|
2001-06-04 04:40:50 +08:00
|
|
|
old_show_tips = gimprc.show_tips;
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
gimprc_save (&update, &remove);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
g_list_free (update);
|
|
|
|
g_list_free (remove);
|
1999-12-18 06:34:12 +08:00
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-12-18 06:34:12 +08:00
|
|
|
static void
|
2002-02-26 00:48:30 +08:00
|
|
|
tips_set_labels (GimpTip *tip)
|
1999-12-18 06:34:12 +08:00
|
|
|
{
|
2002-02-26 00:48:30 +08:00
|
|
|
g_return_if_fail (tip != NULL);
|
2002-02-25 10:52:33 +08:00
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
if (tip->welcome)
|
|
|
|
gtk_widget_show (welcome_label);
|
|
|
|
else
|
|
|
|
gtk_widget_hide (welcome_label);
|
|
|
|
|
2002-02-27 00:55:09 +08:00
|
|
|
gtk_label_set_markup (GTK_LABEL (welcome_label), tip->welcome);
|
|
|
|
gtk_label_set_markup (GTK_LABEL (thetip_label), tip->thetip);
|
2002-02-26 00:48:30 +08:00
|
|
|
}
|
1999-12-18 06:34:12 +08:00
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
static void
|
|
|
|
tips_show_previous (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
current_tip = current_tip->prev ? current_tip->prev : g_list_last (tips);
|
2002-02-25 10:52:33 +08:00
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
tips_set_labels (current_tip->data);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
1999-12-18 06:34:12 +08:00
|
|
|
static void
|
1997-11-25 06:05:25 +08:00
|
|
|
tips_show_next (GtkWidget *widget,
|
2000-04-06 06:59:44 +08:00
|
|
|
gpointer data)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2002-02-26 00:48:30 +08:00
|
|
|
current_tip = current_tip->next ? current_tip->next : tips;
|
2002-02-25 10:52:33 +08:00
|
|
|
|
2002-02-26 00:48:30 +08:00
|
|
|
tips_set_labels (current_tip->data);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
tips_toggle_update (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
1999-12-18 06:34:12 +08:00
|
|
|
gint *toggle_val;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-12-18 06:34:12 +08:00
|
|
|
toggle_val = (gint *) data;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
if (GTK_TOGGLE_BUTTON (widget)->active)
|
|
|
|
*toggle_val = TRUE;
|
|
|
|
else
|
|
|
|
*toggle_val = FALSE;
|
|
|
|
}
|