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>
|
|
|
|
#include "gtk/gtk.h"
|
|
|
|
#include "tips_dialog.h"
|
|
|
|
#include "gimprc.h"
|
|
|
|
#include "interface.h"
|
|
|
|
#include "wilber.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
|
|
|
#include "libgimp/gimpintl.h"
|
1999-03-07 20:56:03 +08:00
|
|
|
#include "libgimp/gimpenv.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
|
|
|
|
1999-05-30 00:35:47 +08:00
|
|
|
#define TIPS_DIR_NAME "tips"
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
static int tips_dialog_hide (GtkWidget *widget, gpointer data);
|
|
|
|
static int tips_show_next (GtkWidget *widget, gpointer data);
|
|
|
|
static void tips_toggle_update (GtkWidget *widget, gpointer data);
|
|
|
|
static void read_tips_file(char *filename);
|
|
|
|
|
|
|
|
static GtkWidget *tips_dialog = NULL;
|
|
|
|
static GtkWidget *tips_label;
|
|
|
|
static char ** tips_text = NULL;
|
|
|
|
static int tips_count = 0;
|
|
|
|
static int old_show_tips;
|
|
|
|
|
|
|
|
void
|
|
|
|
tips_dialog_create ()
|
|
|
|
{
|
|
|
|
GtkWidget *vbox;
|
|
|
|
GtkWidget *hbox1;
|
|
|
|
GtkWidget *hbox2;
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
GtkWidget *bbox;
|
|
|
|
GtkWidget *vbox_bbox2;
|
|
|
|
GtkWidget *bbox2;
|
1999-04-20 19:13:33 +08:00
|
|
|
GtkWidget *frame;
|
1997-11-25 06:05:25 +08:00
|
|
|
GtkWidget *preview;
|
|
|
|
GtkWidget *button_close;
|
|
|
|
GtkWidget *button_next;
|
|
|
|
GtkWidget *button_prev;
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
GtkWidget *vbox_check;
|
1997-11-25 06:05:25 +08:00
|
|
|
GtkWidget *button_check;
|
1999-03-07 20:56:03 +08:00
|
|
|
gchar * temp;
|
1999-04-23 14:07:09 +08:00
|
|
|
guchar * utemp;
|
1997-11-25 06:05:25 +08:00
|
|
|
guchar * src;
|
|
|
|
guchar * dest;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
|
|
|
|
if (tips_count == 0)
|
|
|
|
{
|
1999-05-30 00:35:47 +08:00
|
|
|
temp = g_strdup_printf ("%s" G_DIR_SEPARATOR_S TIPS_DIR_NAME
|
|
|
|
G_DIR_SEPARATOR_S "%s",
|
|
|
|
gimp_data_directory (),
|
|
|
|
_("gimp_tips.txt"));
|
1999-03-07 20:56:03 +08:00
|
|
|
read_tips_file (temp);
|
1997-11-25 06:05:25 +08:00
|
|
|
g_free (temp);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (last_tip >= tips_count || last_tip < 0)
|
|
|
|
last_tip = 0;
|
|
|
|
|
|
|
|
if (!tips_dialog)
|
|
|
|
{
|
|
|
|
tips_dialog = gtk_window_new (GTK_WINDOW_DIALOG);
|
1998-01-26 06:13:00 +08:00
|
|
|
gtk_window_set_wmclass (GTK_WINDOW (tips_dialog), "tip_of_the_day", "Gimp");
|
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
|
|
|
gtk_window_set_title (GTK_WINDOW (tips_dialog), _("GIMP Tip of the day"));
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_window_set_position (GTK_WINDOW (tips_dialog), GTK_WIN_POS_CENTER);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (tips_dialog), "delete_event",
|
|
|
|
GTK_SIGNAL_FUNC (tips_dialog_hide), NULL);
|
1998-03-13 06:01:43 +08:00
|
|
|
/* destroy the tips window if the mainlevel gtk_main() function is left */
|
1998-03-15 13:41:01 +08:00
|
|
|
gtk_quit_add_destroy (1, GTK_OBJECT (tips_dialog));
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
vbox = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER (tips_dialog), vbox);
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 5);
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox1), 10);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox1, FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
|
|
|
|
hbox2 = gtk_hbox_new (FALSE, 5);
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox2), 10);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_box_pack_end (GTK_BOX (vbox), hbox2, FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (hbox2);
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
|
|
|
|
bbox = gtk_hbutton_box_new ();
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox2), bbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (bbox);
|
|
|
|
|
|
|
|
vbox_bbox2 = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox2), vbox_bbox2, FALSE, FALSE, 15);
|
|
|
|
gtk_widget_show (vbox_bbox2);
|
|
|
|
|
|
|
|
bbox2 = gtk_hbox_new (TRUE, 5);
|
|
|
|
gtk_box_pack_end (GTK_BOX (vbox_bbox2), bbox2, TRUE, FALSE, 0);
|
|
|
|
gtk_widget_show(bbox2);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
|
|
|
|
gtk_preview_size (GTK_PREVIEW (preview), wilber_width, wilber_height);
|
1999-04-23 14:07:09 +08:00
|
|
|
utemp = g_new (guchar, wilber_width * 3);
|
1998-03-19 06:35:31 +08:00
|
|
|
src = (guchar *)wilber_data;
|
1997-11-25 06:05:25 +08:00
|
|
|
for (y = 0; y < wilber_height; y++)
|
|
|
|
{
|
1999-04-23 14:07:09 +08:00
|
|
|
dest = utemp;
|
1997-11-25 06:05:25 +08:00
|
|
|
for (x = 0; x < wilber_width; x++)
|
|
|
|
{
|
|
|
|
HEADER_PIXEL(src, dest);
|
|
|
|
dest += 3;
|
|
|
|
}
|
1999-04-23 14:07:09 +08:00
|
|
|
gtk_preview_draw_row (GTK_PREVIEW (preview), utemp,
|
1997-11-25 06:05:25 +08:00
|
|
|
0, y, wilber_width);
|
|
|
|
}
|
1999-04-23 14:07:09 +08:00
|
|
|
g_free(utemp);
|
1999-04-20 19:13:33 +08:00
|
|
|
frame = gtk_frame_new (NULL);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox1), frame, FALSE, TRUE, 3);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame), preview);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_widget_show (preview);
|
1999-04-20 19:13:33 +08:00
|
|
|
gtk_widget_show (frame);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
tips_label = gtk_label_new (tips_text[last_tip]);
|
|
|
|
gtk_label_set_justify (GTK_LABEL (tips_label), GTK_JUSTIFY_LEFT);
|
1997-12-08 08:24:32 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), tips_label, TRUE, TRUE, 3);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_widget_show (tips_label);
|
|
|
|
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
button_prev = gtk_button_new_with_label (_("Previous Tip"));
|
|
|
|
GTK_WIDGET_UNSET_FLAGS (button_prev, GTK_RECEIVES_DEFAULT);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (button_prev), "clicked",
|
|
|
|
GTK_SIGNAL_FUNC (tips_show_next),
|
|
|
|
(gpointer) "prev");
|
|
|
|
gtk_container_add (GTK_CONTAINER (bbox2), button_prev);
|
|
|
|
gtk_widget_show (button_prev);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
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
|
|
|
button_next = gtk_button_new_with_label (_("Next Tip"));
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (button_next, GTK_RECEIVES_DEFAULT);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button_next), "clicked",
|
|
|
|
GTK_SIGNAL_FUNC (tips_show_next),
|
|
|
|
(gpointer) "next");
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (bbox2), button_next);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_widget_show (button_next);
|
|
|
|
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
button_close = gtk_button_new_with_label (_("Close"));
|
|
|
|
GTK_WIDGET_SET_FLAGS (button_close, GTK_CAN_DEFAULT);
|
|
|
|
gtk_window_set_default (GTK_WINDOW (tips_dialog), button_close);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (button_close), "clicked",
|
|
|
|
GTK_SIGNAL_FUNC (tips_dialog_hide), NULL);
|
|
|
|
gtk_container_add (GTK_CONTAINER (bbox), button_close);
|
|
|
|
gtk_widget_show (button_close);
|
|
|
|
|
|
|
|
vbox_check = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox2), vbox_check, FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (vbox_check);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
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
|
|
|
button_check = gtk_check_button_new_with_label (_("Show tip next time"));
|
1999-01-16 01:35:04 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_check),
|
|
|
|
show_tips);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button_check), "toggled",
|
|
|
|
GTK_SIGNAL_FUNC (tips_toggle_update),
|
|
|
|
(gpointer) &show_tips);
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox_check), button_check, TRUE, FALSE, 0);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_widget_show (button_check);
|
|
|
|
|
|
|
|
old_show_tips = show_tips;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!GTK_WIDGET_VISIBLE (tips_dialog))
|
|
|
|
{
|
|
|
|
gtk_widget_show (tips_dialog);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gdk_window_raise (tips_dialog->window);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
tips_dialog_hide (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
GList *update = NULL; /* options that should be updated in .gimprc */
|
|
|
|
GList *remove = NULL; /* options that should be commented out */
|
|
|
|
|
|
|
|
gtk_widget_hide (tips_dialog);
|
|
|
|
|
1998-06-24 06:50:16 +08:00
|
|
|
/* the last-shown-tip is now saved in sessionrc */
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
if (show_tips != old_show_tips)
|
|
|
|
{
|
|
|
|
update = g_list_append (update, "show-tips");
|
|
|
|
remove = g_list_append (remove, "dont-show-tips");
|
|
|
|
old_show_tips = show_tips;
|
1998-06-24 06:50:16 +08:00
|
|
|
save_gimprc (&update, &remove);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
g_list_free (update);
|
|
|
|
g_list_free (remove);
|
|
|
|
|
1998-03-13 06:01:43 +08:00
|
|
|
return TRUE;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
tips_show_next (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
if (!strcmp ((char *)data, "prev"))
|
|
|
|
{
|
|
|
|
last_tip--;
|
|
|
|
if (last_tip < 0)
|
|
|
|
last_tip = tips_count - 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
last_tip++;
|
|
|
|
if (last_tip >= tips_count)
|
|
|
|
last_tip = 0;
|
|
|
|
}
|
|
|
|
gtk_label_set (GTK_LABEL (tips_label), tips_text[last_tip]);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
tips_toggle_update (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
int *toggle_val;
|
|
|
|
|
|
|
|
toggle_val = (int *) data;
|
|
|
|
|
|
|
|
if (GTK_TOGGLE_BUTTON (widget)->active)
|
|
|
|
*toggle_val = TRUE;
|
|
|
|
else
|
|
|
|
*toggle_val = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
store_tip (char *str)
|
|
|
|
{
|
|
|
|
tips_count++;
|
|
|
|
tips_text = g_realloc(tips_text, sizeof(char *) * tips_count);
|
|
|
|
tips_text[tips_count - 1] = str;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
read_tips_file (char *filename)
|
|
|
|
{
|
|
|
|
FILE *fp;
|
|
|
|
char *tip = NULL;
|
|
|
|
char *str = NULL;
|
|
|
|
|
1999-08-20 17:24:56 +08:00
|
|
|
fp = fopen (filename, "rt");
|
1997-11-25 06:05:25 +08:00
|
|
|
if (!fp)
|
|
|
|
{
|
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
|
|
|
store_tip (_("Your GIMP tips file appears to be missing!\n"
|
1999-05-30 00:35:47 +08:00
|
|
|
"There should be a file called gimp_tips.txt in the\n"
|
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
|
|
|
"GIMP data directory. Please check your installation."));
|
1997-11-25 06:05:25 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
str = g_new (char, 1024);
|
|
|
|
while (!feof (fp))
|
|
|
|
{
|
|
|
|
if (!fgets (str, 1024, fp))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (str[0] == '#' || str[0] == '\n')
|
|
|
|
{
|
|
|
|
if (tip != NULL)
|
|
|
|
{
|
1998-04-13 19:05:41 +08:00
|
|
|
tip[strlen (tip) - 1] = '\000';
|
1997-11-25 06:05:25 +08:00
|
|
|
store_tip (tip);
|
|
|
|
tip = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (tip == NULL)
|
|
|
|
{
|
|
|
|
tip = g_malloc (strlen (str) + 1);
|
|
|
|
strcpy (tip, str);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
tip = g_realloc (tip, strlen (tip) + strlen (str) + 1);
|
|
|
|
strcat (tip, str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (tip != NULL)
|
|
|
|
store_tip (tip);
|
|
|
|
g_free (str);
|
|
|
|
fclose (fp);
|
|
|
|
}
|