mirror of https://github.com/GNOME/gimp.git
app/devices.c readded the old code here in case the old GDK variable is
2001-09-09 Sven Neumann <sven@gimp.org> * app/devices.c * app/tools/gimppainttool.c: readded the old code here in case the old GDK variable is defined. Since GTK+-1.3.7 is finally out, we want to try to keep GIMP compile against this release as long as possible. * plug-ins/common/gif.c: applied a patch from David Odin <dindinx@wanadoo.fr> that brings the GIF plug-in back to live. * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: build it again.
This commit is contained in:
parent
cae8f71e8a
commit
f586310605
2
AUTHORS
2
AUTHORS
|
@ -129,8 +129,8 @@ Sven Neumann
|
|||
Stephen Robert Norris
|
||||
Tim Newsome
|
||||
Erik Nygren
|
||||
Tomas Ogren
|
||||
Miles O'Neal
|
||||
David Odin
|
||||
Thom van Os
|
||||
Garry R. Osgood
|
||||
Alan Paeth
|
||||
|
|
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2001-09-09 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/devices.c
|
||||
* app/tools/gimppainttool.c: readded the old code here in case the
|
||||
old GDK variable is defined. Since GTK+-1.3.7 is finally out, we want
|
||||
to try to keep GIMP compile against this release as long as possible.
|
||||
|
||||
* plug-ins/common/gif.c: applied a patch from David Odin
|
||||
<dindinx@wanadoo.fr> that brings the GIF plug-in back to live.
|
||||
|
||||
* plug-ins/common/.cvsignore
|
||||
* plug-ins/common/Makefile.am
|
||||
* plug-ins/common/plugin-defs.pl: build it again.
|
||||
|
||||
2001-09-08 Daniel Egger <egger@interearth.com>
|
||||
|
||||
* app/devices.c
|
||||
|
|
|
@ -244,7 +244,12 @@ devices_init (void)
|
|||
DeviceInfo *device_info;
|
||||
GList *list;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
current_device = gdk_core_pointer;
|
||||
#else
|
||||
current_device = gdk_device_get_core_pointer ();
|
||||
#endif
|
||||
|
||||
/* create device info structures for present devices */
|
||||
for (list = gdk_devices_list (); list; list = g_list_next (list))
|
||||
|
|
|
@ -120,8 +120,8 @@ static gchar *authors[] =
|
|||
"Stephen Robert Norris",
|
||||
"Tim Newsome",
|
||||
"Erik Nygren",
|
||||
"Tomas Ögren",
|
||||
"Miles O'Neal",
|
||||
"David Odin ",
|
||||
"Thom van Os",
|
||||
"Garry R. Osgood",
|
||||
"Alan Paeth",
|
||||
|
|
|
@ -120,8 +120,8 @@ static gchar *authors[] =
|
|||
"Stephen Robert Norris",
|
||||
"Tim Newsome",
|
||||
"Erik Nygren",
|
||||
"Tomas Ögren",
|
||||
"Miles O'Neal",
|
||||
"David Odin ",
|
||||
"Thom van Os",
|
||||
"Garry R. Osgood",
|
||||
"Alan Paeth",
|
||||
|
|
|
@ -244,7 +244,12 @@ devices_init (void)
|
|||
DeviceInfo *device_info;
|
||||
GList *list;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
current_device = gdk_core_pointer;
|
||||
#else
|
||||
current_device = gdk_device_get_core_pointer ();
|
||||
#endif
|
||||
|
||||
/* create device info structures for present devices */
|
||||
for (list = gdk_devices_list (); list; list = g_list_next (list))
|
||||
|
|
|
@ -244,7 +244,12 @@ devices_init (void)
|
|||
DeviceInfo *device_info;
|
||||
GList *list;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
current_device = gdk_core_pointer;
|
||||
#else
|
||||
current_device = gdk_device_get_core_pointer ();
|
||||
#endif
|
||||
|
||||
/* create device info structures for present devices */
|
||||
for (list = gdk_devices_list (); list; list = g_list_next (list))
|
||||
|
|
|
@ -1326,7 +1326,12 @@ gimp_paint_tool_calculate_brush_size (MaskBuf *mask,
|
|||
{
|
||||
scale = CLAMP (scale, 0.0, 1.0);
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
if (current_device == gdk_core_pointer)
|
||||
#else
|
||||
if (current_device == gdk_device_get_core_pointer ())
|
||||
#endif
|
||||
{
|
||||
*width = mask->width;
|
||||
*height = mask->height;
|
||||
|
@ -1646,7 +1651,12 @@ gimp_paint_tool_get_brush_mask (GimpPaintTool *paint_tool,
|
|||
{
|
||||
MaskBuf *mask;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
if (current_device == gdk_core_pointer)
|
||||
#else
|
||||
if (current_device == gdk_device_get_core_pointer ())
|
||||
#endif
|
||||
mask = paint_tool->brush->mask;
|
||||
else
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
|
|
|
@ -1326,7 +1326,12 @@ gimp_paint_tool_calculate_brush_size (MaskBuf *mask,
|
|||
{
|
||||
scale = CLAMP (scale, 0.0, 1.0);
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
if (current_device == gdk_core_pointer)
|
||||
#else
|
||||
if (current_device == gdk_device_get_core_pointer ())
|
||||
#endif
|
||||
{
|
||||
*width = mask->width;
|
||||
*height = mask->height;
|
||||
|
@ -1646,7 +1651,12 @@ gimp_paint_tool_get_brush_mask (GimpPaintTool *paint_tool,
|
|||
{
|
||||
MaskBuf *mask;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
if (current_device == gdk_core_pointer)
|
||||
#else
|
||||
if (current_device == gdk_device_get_core_pointer ())
|
||||
#endif
|
||||
mask = paint_tool->brush->mask;
|
||||
else
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
|
|
|
@ -1326,7 +1326,12 @@ gimp_paint_tool_calculate_brush_size (MaskBuf *mask,
|
|||
{
|
||||
scale = CLAMP (scale, 0.0, 1.0);
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
if (current_device == gdk_core_pointer)
|
||||
#else
|
||||
if (current_device == gdk_device_get_core_pointer ())
|
||||
#endif
|
||||
{
|
||||
*width = mask->width;
|
||||
*height = mask->height;
|
||||
|
@ -1646,7 +1651,12 @@ gimp_paint_tool_get_brush_mask (GimpPaintTool *paint_tool,
|
|||
{
|
||||
MaskBuf *mask;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
if (current_device == gdk_core_pointer)
|
||||
#else
|
||||
if (current_device == gdk_device_get_core_pointer ())
|
||||
#endif
|
||||
mask = paint_tool->brush->mask;
|
||||
else
|
||||
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
|
||||
|
|
|
@ -244,7 +244,12 @@ devices_init (void)
|
|||
DeviceInfo *device_info;
|
||||
GList *list;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
current_device = gdk_core_pointer;
|
||||
#else
|
||||
current_device = gdk_device_get_core_pointer ();
|
||||
#endif
|
||||
|
||||
/* create device info structures for present devices */
|
||||
for (list = gdk_devices_list (); list; list = g_list_next (list))
|
||||
|
|
|
@ -244,7 +244,12 @@ devices_init (void)
|
|||
DeviceInfo *device_info;
|
||||
GList *list;
|
||||
|
||||
#warning FIXME: remove this hack when GTK+-1.3.8 is released
|
||||
#ifdef gdk_core_pointer
|
||||
current_device = gdk_core_pointer;
|
||||
#else
|
||||
current_device = gdk_device_get_core_pointer ();
|
||||
#endif
|
||||
|
||||
/* create device info structures for present devices */
|
||||
for (list = gdk_devices_list (); list; list = g_list_next (list))
|
||||
|
|
|
@ -48,6 +48,7 @@ gbr
|
|||
gee
|
||||
gee_zoom
|
||||
gicon
|
||||
gif
|
||||
gifload
|
||||
gih
|
||||
glasstile
|
||||
|
|
|
@ -67,6 +67,7 @@ libexec_PROGRAMS = @STRIP_BEGIN@ \
|
|||
gee \
|
||||
gee_zoom \
|
||||
gicon \
|
||||
gif \
|
||||
gifload \
|
||||
gih \
|
||||
glasstile \
|
||||
|
@ -799,6 +800,20 @@ gicon_LDADD = @STRIP_BEGIN@ \
|
|||
$(INTLLIBS) \
|
||||
@STRIP_END@
|
||||
|
||||
gif_SOURCES = @STRIP_BEGIN@ \
|
||||
gif.c \
|
||||
@STRIP_END@
|
||||
|
||||
gif_LDADD = @STRIP_BEGIN@ \
|
||||
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
|
||||
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
|
||||
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
|
||||
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
|
||||
$(top_builddir)/libgimpbase/libgimpbase-$(LT_RELEASE).la \
|
||||
$(GTK_LIBS) \
|
||||
$(INTLLIBS) \
|
||||
@STRIP_END@
|
||||
|
||||
gifload_SOURCES = @STRIP_BEGIN@ \
|
||||
gifload.c \
|
||||
@STRIP_END@
|
||||
|
|
|
@ -314,28 +314,27 @@ typedef struct
|
|||
/* Declare some local functions.
|
||||
*/
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static gint save_image (gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID,
|
||||
gint32 orig_image_ID);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static gint save_image (gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID,
|
||||
gint32 orig_image_ID);
|
||||
|
||||
static gboolean boundscheck (gint32 image_ID);
|
||||
static gboolean boundscheck (gint32 image_ID);
|
||||
static gboolean badbounds_dialog (void);
|
||||
|
||||
static void cropok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void cropok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
static gint save_dialog (gint32 image_ID);
|
||||
static gint save_dialog (gint32 image_ID);
|
||||
|
||||
static void save_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void comment_entry_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void save_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void comment_entry_callback (GtkTextBuffer *buffer);
|
||||
|
||||
|
||||
static gboolean comment_was_edited = FALSE;
|
||||
|
@ -1198,21 +1197,21 @@ badbounds_dialog (void)
|
|||
static gint
|
||||
save_dialog (gint32 image_ID)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *toggle;
|
||||
GtkWidget *label;
|
||||
GtkWidget *spinbutton;
|
||||
GtkObject *adj;
|
||||
GtkWidget *text;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *disposal_option_menu;
|
||||
GtkWidget *com_table;
|
||||
GtkWidget *vscrollbar;
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *toggle;
|
||||
GtkWidget *label;
|
||||
GtkWidget *spinbutton;
|
||||
GtkObject *adj;
|
||||
GtkWidget *text_view;
|
||||
GtkTextBuffer *text_buffer;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *disposal_option_menu;
|
||||
GtkWidget *scrolled_window;
|
||||
#ifdef FACEHUGGERS
|
||||
GimpParasite* GIF2_CMNT;
|
||||
GimpParasite *GIF2_CMNT;
|
||||
#endif
|
||||
|
||||
gint32 nlayers;
|
||||
|
@ -1268,16 +1267,24 @@ save_dialog (gint32 image_ID)
|
|||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), gsvals.save_comment);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
com_table = gtk_table_new (1, 1, FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), com_table, TRUE, TRUE, 0);
|
||||
/* the comment text_view in a gtk_scrolled_window */
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 4);
|
||||
gtk_box_pack_start_defaults (GTK_BOX (hbox), scrolled_window);
|
||||
gtk_widget_show (scrolled_window);
|
||||
|
||||
text_buffer = gtk_text_buffer_new (NULL);
|
||||
|
||||
text_view = gtk_text_view_new_with_buffer (text_buffer);
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
|
||||
gtk_widget_show (text_view);
|
||||
|
||||
g_object_unref (G_OBJECT (text_buffer));
|
||||
|
||||
text = gtk_text_new (NULL, NULL);
|
||||
gtk_text_set_editable (GTK_TEXT (text), TRUE);
|
||||
gtk_widget_set_usize (text, 80,3);
|
||||
gtk_table_attach (GTK_TABLE (com_table), text, 0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_SHRINK | GTK_FILL,
|
||||
GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
|
||||
if (globalcomment != NULL)
|
||||
{
|
||||
g_free (globalcomment);
|
||||
|
@ -1302,17 +1309,10 @@ save_dialog (gint32 image_ID)
|
|||
#endif
|
||||
|
||||
if (globalcomment)
|
||||
gtk_text_insert (GTK_TEXT (text), NULL, NULL, NULL, globalcomment, -1);
|
||||
gtk_signal_connect (GTK_OBJECT (text), "changed",
|
||||
GTK_SIGNAL_FUNC (comment_entry_callback),
|
||||
NULL);
|
||||
|
||||
vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj);
|
||||
gtk_table_attach (GTK_TABLE (com_table), vscrollbar, 1, 2, 0, 1,
|
||||
GTK_FILL, GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (vscrollbar);
|
||||
gtk_widget_show (text);
|
||||
gtk_widget_show (com_table);
|
||||
gtk_text_buffer_set_text (text_buffer, globalcomment, -1);
|
||||
g_signal_connect (G_OBJECT (text_buffer), "changed",
|
||||
G_CALLBACK (comment_entry_callback),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
@ -2438,31 +2438,33 @@ save_ok_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
comment_entry_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
comment_entry_callback (GtkTextBuffer *buffer)
|
||||
{
|
||||
gint ssize;
|
||||
gchar* str;
|
||||
GtkTextIter start_iter;
|
||||
GtkTextIter end_iter;
|
||||
gchar *text;
|
||||
|
||||
str = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1);
|
||||
ssize = strlen (str);
|
||||
gtk_text_buffer_get_bounds (buffer, &start_iter, &end_iter);
|
||||
gtk_text_iter_backward_char (&end_iter);
|
||||
|
||||
/* Temporary kludge for overlength strings - just return */
|
||||
if (ssize > 240)
|
||||
{
|
||||
g_message (_("GIF save: Your comment string is too long.\n"));
|
||||
g_free (str);
|
||||
return;
|
||||
}
|
||||
text = gtk_text_buffer_get_text (buffer, &start_iter, &end_iter, FALSE);
|
||||
|
||||
if (globalcomment != NULL) g_free (globalcomment);
|
||||
globalcomment = g_malloc (ssize + 1);
|
||||
if (strlen (text) > 240)
|
||||
{
|
||||
g_message (_("The default comment is limited to %d characters."), 240);
|
||||
|
||||
/*strcpy(globalcomment, gtk_entry_get_text (GTK_ENTRY (widget)));*/
|
||||
strcpy (globalcomment, str);
|
||||
g_free (str);
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &start_iter, 240 - 1);
|
||||
gtk_text_buffer_get_end_iter (buffer, &end_iter);
|
||||
|
||||
comment_was_edited = TRUE;
|
||||
/* this calls us recursivaly, but in the else branch
|
||||
*/
|
||||
gtk_text_buffer_delete (buffer, &start_iter, &end_iter);
|
||||
} else
|
||||
{
|
||||
if (globalcomment != NULL) g_free (globalcomment);
|
||||
globalcomment = g_strdup(text);
|
||||
comment_was_edited = TRUE;
|
||||
}
|
||||
|
||||
/*g_print ("COMMENT: %s\n",globalcomment);*/
|
||||
g_free (text);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
'gee' => { libdep => 'gtk', ui => 1 },
|
||||
'gee_zoom' => { libdep => 'gtk', ui => 1 },
|
||||
'gicon' => { libdep => 'gtk', ui => 1 },
|
||||
# 'gif' => { libdep => 'gtk', ui => 1 },
|
||||
'gif' => { libdep => 'gtk', ui => 1 },
|
||||
'gifload' => { libdep => 'gtk' },
|
||||
'gih' => { libdep => 'gtk', ui => 1 },
|
||||
'glasstile' => { libdep => 'gtk', ui => 1 },
|
||||
|
|
|
@ -123,8 +123,8 @@ Sven Neumann
|
|||
Stephen Robert Norris
|
||||
Tim Newsome
|
||||
Erik Nygren
|
||||
Tomas Ogren [Tomas Ögren]
|
||||
Miles O'Neal
|
||||
David Odin
|
||||
Thom van Os
|
||||
Garry R. Osgood
|
||||
Alan Paeth
|
||||
|
|
Loading…
Reference in New Issue