new mouse cursor for intersection operations.

* cursors/{mouse1_u,mouse1_umsk}: new mouse cursor for intersection
	operations.

	* app/cursorutil.[ch], app/rect_select.c: use the new cursor.

	* app/gimpimage.c:  Applied layer removal bug fix from
	David Le Corfec, <lecorfec@etudiant.univ-mlv.fr>

	* plug-ins/gdyntext/{font_selection.c, gdyntext.c, gdyntext_ui.c}:
	replaced snprintf with g_snprintf.

	* plug-ins/jpeg/jpeg.c: updated to work with the double precision
	resolutions.
This commit is contained in:
jaycox 1999-05-27 09:10:10 +00:00
parent 8fb9f79459
commit 4faeeaeb9f
28 changed files with 98 additions and 56 deletions

View file

@ -1,3 +1,19 @@
Thu May 27 01:59:35 1999 Jay Cox (jaycox@earthlink.net)
* cursors/{mouse1_u,mouse1_umsk}: new mouse cursor for intersection
operations.
* app/cursorutil.[ch], app/rect_select.c: use the new cursor.
* app/gimpimage.c: Applied layer removal bug fix from
David Le Corfec, <lecorfec@etudiant.univ-mlv.fr>
* plug-ins/gdyntext/{font_selection.c, gdyntext.c, gdyntext_ui.c}:
replaced snprintf with g_snprintf.
* plug-ins/jpeg/jpeg.c: updated to work with the double precision
resolutions.
Wed May 26 21:14:15 BST 1999 Andy Thomas <alt@gimp.org> Wed May 26 21:14:15 BST 1999 Andy Thomas <alt@gimp.org>
* app/bezier_select.c * app/bezier_select.c

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -25,6 +25,8 @@
#include "../cursors/mouse1_pmsk" #include "../cursors/mouse1_pmsk"
#include "../cursors/mouse1_m" #include "../cursors/mouse1_m"
#include "../cursors/mouse1_mmsk" #include "../cursors/mouse1_mmsk"
#include "../cursors/mouse1_u"
#include "../cursors/mouse1_umsk"
#include "../cursors/bigcirc" #include "../cursors/bigcirc"
#include "../cursors/bigcircmsk" #include "../cursors/bigcircmsk"
#include "../cursors/dropper" #include "../cursors/dropper"
@ -59,7 +61,9 @@ static BM_Cursor gimp_cursors[] =
{ mouse1_p_bits, mouse1_pmsk_bits, mouse1_p_width, mouse1_p_height, { mouse1_p_bits, mouse1_pmsk_bits, mouse1_p_width, mouse1_p_height,
mouse1_p_x_hot, mouse1_p_y_hot, NULL}, mouse1_p_x_hot, mouse1_p_y_hot, NULL},
{ mouse1_m_bits, mouse1_mmsk_bits, mouse1_m_width, mouse1_m_height, { mouse1_m_bits, mouse1_mmsk_bits, mouse1_m_width, mouse1_m_height,
mouse1_m_x_hot, mouse1_m_y_hot, NULL}, mouse1_u_x_hot, mouse1_u_y_hot, NULL},
{ mouse1_u_bits, mouse1_umsk_bits, mouse1_u_width, mouse1_u_height,
mouse1_u_x_hot, mouse1_u_y_hot, NULL},
{ bigcirc_bits, bigcircmsk_bits, bigcirc_width, bigcirc_height, { bigcirc_bits, bigcircmsk_bits, bigcirc_width, bigcirc_height,
bigcirc_x_hot, bigcirc_y_hot, NULL}, bigcirc_x_hot, bigcirc_y_hot, NULL},
{ dropper_bits, droppermsk_bits, dropper_width, dropper_height, { dropper_bits, droppermsk_bits, dropper_width, dropper_height,

View file

@ -25,6 +25,7 @@ typedef enum
GIMP_MOUSE1_CURSOR = (GDK_LAST_CURSOR + 2), GIMP_MOUSE1_CURSOR = (GDK_LAST_CURSOR + 2),
GIMP_MOUSE1P_CURSOR, GIMP_MOUSE1P_CURSOR,
GIMP_MOUSE1M_CURSOR, GIMP_MOUSE1M_CURSOR,
GIMP_MOUSE1U_CURSOR,
GIMP_BIGCIRC_CURSOR, GIMP_BIGCIRC_CURSOR,
GIMP_COLOR_PICKER_CURSOR, GIMP_COLOR_PICKER_CURSOR,
GIMP_MOUSE1AP_CURSOR, GIMP_MOUSE1AP_CURSOR,

View file

@ -2682,14 +2682,14 @@ gimp_image_remove_layer (GimpImage *gimage, Layer * layer)
drawable_width (GIMP_DRAWABLE(layer)), drawable_width (GIMP_DRAWABLE(layer)),
drawable_height (GIMP_DRAWABLE(layer))); drawable_height (GIMP_DRAWABLE(layer)));
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* Push the layer undo--It is important it goes here since layer might /* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails * be immediately destroyed if the undo push fails
*/ */
undo_push_layer (gimage, lu); undo_push_layer (gimage, lu);
/* Send out REMOVED signal from layer */
layer_removed (layer, gimage);
/* invalidate the composite preview */ /* invalidate the composite preview */
gimp_image_invalidate_preview (gimage); gimp_image_invalidate_preview (gimage);

View file

@ -496,8 +496,8 @@ rect_select_cursor_update (Tool *tool,
case SELECTION_SUB: case SELECTION_SUB:
gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1M_CURSOR); gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1M_CURSOR);
break; break;
case SELECTION_INTERSECT: /* need a real cursor for this one */ case SELECTION_INTERSECT:
gdisplay_install_tool_cursor (gdisp, GIMP_BIGCIRC_CURSOR); gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1U_CURSOR);
break; break;
case SELECTION_REPLACE: case SELECTION_REPLACE:
gdisplay_install_tool_cursor (gdisp, GDK_TCROSS); gdisplay_install_tool_cursor (gdisp, GDK_TCROSS);

View file

@ -496,8 +496,8 @@ rect_select_cursor_update (Tool *tool,
case SELECTION_SUB: case SELECTION_SUB:
gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1M_CURSOR); gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1M_CURSOR);
break; break;
case SELECTION_INTERSECT: /* need a real cursor for this one */ case SELECTION_INTERSECT:
gdisplay_install_tool_cursor (gdisp, GIMP_BIGCIRC_CURSOR); gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1U_CURSOR);
break; break;
case SELECTION_REPLACE: case SELECTION_REPLACE:
gdisplay_install_tool_cursor (gdisp, GDK_TCROSS); gdisplay_install_tool_cursor (gdisp, GDK_TCROSS);

View file

@ -496,8 +496,8 @@ rect_select_cursor_update (Tool *tool,
case SELECTION_SUB: case SELECTION_SUB:
gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1M_CURSOR); gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1M_CURSOR);
break; break;
case SELECTION_INTERSECT: /* need a real cursor for this one */ case SELECTION_INTERSECT:
gdisplay_install_tool_cursor (gdisp, GIMP_BIGCIRC_CURSOR); gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE1U_CURSOR);
break; break;
case SELECTION_REPLACE: case SELECTION_REPLACE:
gdisplay_install_tool_cursor (gdisp, GDK_TCROSS); gdisplay_install_tool_cursor (gdisp, GDK_TCROSS);

View file

@ -25,6 +25,8 @@
#include "../cursors/mouse1_pmsk" #include "../cursors/mouse1_pmsk"
#include "../cursors/mouse1_m" #include "../cursors/mouse1_m"
#include "../cursors/mouse1_mmsk" #include "../cursors/mouse1_mmsk"
#include "../cursors/mouse1_u"
#include "../cursors/mouse1_umsk"
#include "../cursors/bigcirc" #include "../cursors/bigcirc"
#include "../cursors/bigcircmsk" #include "../cursors/bigcircmsk"
#include "../cursors/dropper" #include "../cursors/dropper"
@ -59,7 +61,9 @@ static BM_Cursor gimp_cursors[] =
{ mouse1_p_bits, mouse1_pmsk_bits, mouse1_p_width, mouse1_p_height, { mouse1_p_bits, mouse1_pmsk_bits, mouse1_p_width, mouse1_p_height,
mouse1_p_x_hot, mouse1_p_y_hot, NULL}, mouse1_p_x_hot, mouse1_p_y_hot, NULL},
{ mouse1_m_bits, mouse1_mmsk_bits, mouse1_m_width, mouse1_m_height, { mouse1_m_bits, mouse1_mmsk_bits, mouse1_m_width, mouse1_m_height,
mouse1_m_x_hot, mouse1_m_y_hot, NULL}, mouse1_u_x_hot, mouse1_u_y_hot, NULL},
{ mouse1_u_bits, mouse1_umsk_bits, mouse1_u_width, mouse1_u_height,
mouse1_u_x_hot, mouse1_u_y_hot, NULL},
{ bigcirc_bits, bigcircmsk_bits, bigcirc_width, bigcirc_height, { bigcirc_bits, bigcircmsk_bits, bigcirc_width, bigcirc_height,
bigcirc_x_hot, bigcirc_y_hot, NULL}, bigcirc_x_hot, bigcirc_y_hot, NULL},
{ dropper_bits, droppermsk_bits, dropper_width, dropper_height, { dropper_bits, droppermsk_bits, dropper_width, dropper_height,

View file

@ -25,6 +25,7 @@ typedef enum
GIMP_MOUSE1_CURSOR = (GDK_LAST_CURSOR + 2), GIMP_MOUSE1_CURSOR = (GDK_LAST_CURSOR + 2),
GIMP_MOUSE1P_CURSOR, GIMP_MOUSE1P_CURSOR,
GIMP_MOUSE1M_CURSOR, GIMP_MOUSE1M_CURSOR,
GIMP_MOUSE1U_CURSOR,
GIMP_BIGCIRC_CURSOR, GIMP_BIGCIRC_CURSOR,
GIMP_COLOR_PICKER_CURSOR, GIMP_COLOR_PICKER_CURSOR,
GIMP_MOUSE1AP_CURSOR, GIMP_MOUSE1AP_CURSOR,

8
cursors/mouse1_u Normal file
View file

@ -0,0 +1,8 @@
#define mouse1_u_width 13
#define mouse1_u_height 17
#define mouse1_u_x_hot 1
#define mouse1_u_y_hot 1
static unsigned char mouse1_u_bits[] = {
0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00,
0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01, 0x3e, 0x00, 0x06, 0x00, 0x02, 0x06,
0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00};

6
cursors/mouse1_umsk Normal file
View file

@ -0,0 +1,6 @@
#define mouse1_umsk_width 13
#define mouse1_umsk_height 17
static unsigned char mouse1_umsk_bits[] = {
0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00,
0xff, 0x00, 0xff, 0x01, 0xff, 0x03, 0xff, 0x01, 0x3f, 0x06, 0x07, 0x0f,
0x83, 0x1f, 0x80, 0x1f, 0x80, 0x1f, 0x80, 0x1f, 0x00, 0x09};

View file

@ -855,8 +855,8 @@ save_image (char *filename,
#ifdef GIMP_HAVE_RESOLUTION_INFO #ifdef GIMP_HAVE_RESOLUTION_INFO
{ {
float xresolution; double xresolution;
float yresolution; double yresolution;
gimp_image_get_resolution (image_ID, &xresolution, &yresolution); gimp_image_get_resolution (image_ID, &xresolution, &yresolution);

View file

@ -138,7 +138,7 @@ static void font_selection_init(FontSelection *fs)
font_info = g_strsplit(xfontnames[i], "-", 20); font_info = g_strsplit(xfontnames[i], "-", 20);
if (g_hash_table_lookup(fs->font_properties, font_info[2]) == NULL) if (g_hash_table_lookup(fs->font_properties, font_info[2]) == NULL)
fs->font_names = g_list_insert_sorted(g_list_first(fs->font_names), g_strdup(font_info[2]), (GCompareFunc)strcmp); fs->font_names = g_list_insert_sorted(g_list_first(fs->font_names), g_strdup(font_info[2]), (GCompareFunc)strcmp);
snprintf(font_style, sizeof(font_style), "%s-%s-%s", font_info[3], font_info[4], font_info[5]); g_snprintf(font_style, sizeof(font_style), "%s-%s-%s", font_info[3], font_info[4], font_info[5]);
l = NULL; l = NULL;
if ((plist = (GList *)g_hash_table_lookup(fs->font_properties, font_info[2]))) { if ((plist = (GList *)g_hash_table_lookup(fs->font_properties, font_info[2]))) {
for (l = g_list_first(plist); l; l = g_list_next(l)) for (l = g_list_first(plist); l; l = g_list_next(l))
@ -242,7 +242,7 @@ void on_font_selection_value_changed(GtkWidget *widget, gpointer data)
gtk_widget_set_sensitive(fs->font_style, FALSE); gtk_widget_set_sensitive(fs->font_style, FALSE);
gtk_widget_set_sensitive(fs->font_size, FALSE); gtk_widget_set_sensitive(fs->font_size, FALSE);
gtk_widget_set_sensitive(fs->font_metric, FALSE); gtk_widget_set_sensitive(fs->font_metric, FALSE);
snprintf(fontname, sizeof(fontname), "%s", g_snprintf(fontname, sizeof(fontname), "%s",
gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_family)->entry))); gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_family)->entry)));
} else { } else {
/* is a '-*' font */ /* is a '-*' font */
@ -252,13 +252,13 @@ void on_font_selection_value_changed(GtkWidget *widget, gpointer data)
/* "-*-(fn)-(wg)-(sl)-(sp)-*-(px)-(po * 10)-*-*-*-*-*-*" */ /* "-*-(fn)-(wg)-(sl)-(sp)-*-(px)-(po * 10)-*-*-*-*-*-*" */
if (strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_metric)->entry)), _("pixels")) == 0) { if (strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_metric)->entry)), _("pixels")) == 0) {
/* pixel size */ /* pixel size */
snprintf(fontname, sizeof(fontname), "-*-%s-%s-*-%d-*-*-*-*-*-*-*", g_snprintf(fontname, sizeof(fontname), "-*-%s-%s-*-%d-*-*-*-*-*-*-*",
gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_family)->entry)), gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_family)->entry)),
gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_style)->entry)), gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_style)->entry)),
gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(fs->font_size))); gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(fs->font_size)));
} else { } else {
/* point size */ /* point size */
snprintf(fontname, sizeof(fontname), "-*-%s-%s-*-*-%d-*-*-*-*-*-*", g_snprintf(fontname, sizeof(fontname), "-*-%s-%s-*-*-%d-*-*-*-*-*-*",
gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_family)->entry)), gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_family)->entry)),
gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_style)->entry)), gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(fs->font_style)->entry)),
gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(fs->font_size)) * 10); gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(fs->font_size)) * 10);

View file

@ -220,10 +220,12 @@ static void gdt_run(char *name, int nparams, GParam *param, int *nreturn_vals,
strncpy(gdtvals.text, param[3].data.d_string, sizeof(gdtvals.text)); strncpy(gdtvals.text, param[3].data.d_string, sizeof(gdtvals.text));
strncpy(gdtvals.font_family, param[4].data.d_string, strncpy(gdtvals.font_family, param[4].data.d_string,
sizeof(gdtvals.font_family)); sizeof(gdtvals.font_family));
snprintf(gdtvals.font_style, sizeof(gdtvals.font_style), "%s-%s-%s", g_snprintf(gdtvals.font_style,
param[5].data.d_string, sizeof(gdtvals.font_style),
param[6].data.d_string, "%s-%s-%s",
param[7].data.d_string); param[5].data.d_string,
param[6].data.d_string,
param[7].data.d_string);
gdtvals.font_size = param[8].data.d_int32; gdtvals.font_size = param[8].data.d_int32;
gdtvals.font_metric = param[9].data.d_int32; gdtvals.font_metric = param[9].data.d_int32;
gdtvals.antialias = param[10].data.d_int32; gdtvals.antialias = param[10].data.d_int32;

View file

@ -916,7 +916,7 @@ void load_text(GtkWidget *widget, gpointer data)
fread(text, MAX_TEXT_SIZE - 1, 1, is); fread(text, MAX_TEXT_SIZE - 1, 1, is);
fclose(is); fclose(is);
if (!stat(file, &sbuf) && sbuf.st_size > MAX_TEXT_SIZE) { if (!stat(file, &sbuf) && sbuf.st_size > MAX_TEXT_SIZE) {
snprintf(msg, sizeof(msg), _("Warning file \"%s\" is larger than the maximum allowed text length (%d).\n"), file, MAX_TEXT_SIZE); g_snprintf(msg, sizeof(msg), _("Warning file \"%s\" is larger than the maximum allowed text length (%d).\n"), file, MAX_TEXT_SIZE);
message_window_append(MESSAGE_WINDOW(message_window), msg); message_window_append(MESSAGE_WINDOW(message_window), msg);
} }
gtk_text_freeze(GTK_TEXT(main_window->textarea)); gtk_text_freeze(GTK_TEXT(main_window->textarea));
@ -924,7 +924,7 @@ void load_text(GtkWidget *widget, gpointer data)
gtk_text_insert(GTK_TEXT(main_window->textarea), NULL, NULL, NULL, text, -1); gtk_text_insert(GTK_TEXT(main_window->textarea), NULL, NULL, NULL, text, -1);
gtk_text_thaw(GTK_TEXT(main_window->textarea)); gtk_text_thaw(GTK_TEXT(main_window->textarea));
} else { } else {
snprintf(msg, sizeof(msg), _("Error opening \"%s\"!\n"), file); g_snprintf(msg, sizeof(msg), _("Error opening \"%s\"!\n"), file);
message_window_append(MESSAGE_WINDOW(message_window), msg); message_window_append(MESSAGE_WINDOW(message_window), msg);
} }
if (MESSAGE_WINDOW(message_window)->contains_messages) if (MESSAGE_WINDOW(message_window)->contains_messages)

View file

@ -855,8 +855,8 @@ save_image (char *filename,
#ifdef GIMP_HAVE_RESOLUTION_INFO #ifdef GIMP_HAVE_RESOLUTION_INFO
{ {
float xresolution; double xresolution;
float yresolution; double yresolution;
gimp_image_get_resolution (image_ID, &xresolution, &yresolution); gimp_image_get_resolution (image_ID, &xresolution, &yresolution);

View file

@ -855,8 +855,8 @@ save_image (char *filename,
#ifdef GIMP_HAVE_RESOLUTION_INFO #ifdef GIMP_HAVE_RESOLUTION_INFO
{ {
float xresolution; double xresolution;
float yresolution; double yresolution;
gimp_image_get_resolution (image_ID, &xresolution, &yresolution); gimp_image_get_resolution (image_ID, &xresolution, &yresolution);

View file

@ -855,8 +855,8 @@ save_image (char *filename,
#ifdef GIMP_HAVE_RESOLUTION_INFO #ifdef GIMP_HAVE_RESOLUTION_INFO
{ {
float xresolution; double xresolution;
float yresolution; double yresolution;
gimp_image_get_resolution (image_ID, &xresolution, &yresolution); gimp_image_get_resolution (image_ID, &xresolution, &yresolution);

View file

@ -855,8 +855,8 @@ save_image (char *filename,
#ifdef GIMP_HAVE_RESOLUTION_INFO #ifdef GIMP_HAVE_RESOLUTION_INFO
{ {
float xresolution; double xresolution;
float yresolution; double yresolution;
gimp_image_get_resolution (image_ID, &xresolution, &yresolution); gimp_image_get_resolution (image_ID, &xresolution, &yresolution);

View file

@ -855,8 +855,8 @@ save_image (char *filename,
#ifdef GIMP_HAVE_RESOLUTION_INFO #ifdef GIMP_HAVE_RESOLUTION_INFO
{ {
float xresolution; double xresolution;
float yresolution; double yresolution;
gimp_image_get_resolution (image_ID, &xresolution, &yresolution); gimp_image_get_resolution (image_ID, &xresolution, &yresolution);

View file

@ -855,8 +855,8 @@ save_image (char *filename,
#ifdef GIMP_HAVE_RESOLUTION_INFO #ifdef GIMP_HAVE_RESOLUTION_INFO
{ {
float xresolution; double xresolution;
float yresolution; double yresolution;
gimp_image_get_resolution (image_ID, &xresolution, &yresolution); gimp_image_get_resolution (image_ID, &xresolution, &yresolution);