mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-19 22:34:37 +00:00
applied a patch from Maurits Rijk that enables mnemonics (bug #80804).
2002-05-08 Sven Neumann <sven@gimp.org> * libgimpwidgets/gimpwidgets.c (gimp_scale_entry_new) (gimp_table_attach_aligned): applied a patch from Maurits Rijk that enables mnemonics (bug #80804). * plug-ins/common/apply_lens.c * plug-ins/common/glasstile.c: applied a patch from Maurits Rijk that adds mnemonics (bug #80804). * plug-ins/common/animationplay.c * plug-ins/common/decompose.c * plug-ins/common/film.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/guillotine.c * plug-ins/common/winprint.c * plug-ins/gap/gap_lib.c * plug-ins/imagemap/imap_main.c * plug-ins/imagemap/imap_settings.c * plug-ins/print/gimp_main_window.c * plug-ins/print/print.c * plug-ins/print/print_gimp.h: use new function gimp_image_get_name() where applicable.
This commit is contained in:
parent
182eb5170c
commit
e1b20e1c14
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
||||||
|
2002-05-08 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* libgimpwidgets/gimpwidgets.c (gimp_scale_entry_new)
|
||||||
|
(gimp_table_attach_aligned): applied a patch from Maurits Rijk that
|
||||||
|
enables mnemonics (bug #80804).
|
||||||
|
|
||||||
|
* plug-ins/common/apply_lens.c
|
||||||
|
* plug-ins/common/glasstile.c: applied a patch from Maurits Rijk that
|
||||||
|
adds mnemonics (bug #80804).
|
||||||
|
|
||||||
|
* plug-ins/common/animationplay.c
|
||||||
|
* plug-ins/common/decompose.c
|
||||||
|
* plug-ins/common/film.c
|
||||||
|
* plug-ins/common/gee.c
|
||||||
|
* plug-ins/common/gee_zoom.c
|
||||||
|
* plug-ins/common/guillotine.c
|
||||||
|
* plug-ins/common/winprint.c
|
||||||
|
* plug-ins/gap/gap_lib.c
|
||||||
|
* plug-ins/imagemap/imap_main.c
|
||||||
|
* plug-ins/imagemap/imap_settings.c
|
||||||
|
* plug-ins/print/gimp_main_window.c
|
||||||
|
* plug-ins/print/print.c
|
||||||
|
* plug-ins/print/print_gimp.h: use new function gimp_image_get_name()
|
||||||
|
where applicable.
|
||||||
|
|
||||||
2002-05-07 Manish Singh <yosh@gimp.org>
|
2002-05-07 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* tools/pdbgen/pdb/image.pdb: added image_get_name. Also, no longer
|
* tools/pdbgen/pdb/image.pdb: added image_get_name. Also, no longer
|
||||||
|
|
|
@ -706,7 +706,7 @@ gimp_scale_entry_new (GtkTable *table,
|
||||||
GtkObject *adjustment;
|
GtkObject *adjustment;
|
||||||
GtkObject *return_adj;
|
GtkObject *return_adj;
|
||||||
|
|
||||||
label = gtk_label_new (text);
|
label = gtk_label_new_with_mnemonic (text);
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
||||||
gtk_table_attach (GTK_TABLE (table), label,
|
gtk_table_attach (GTK_TABLE (table), label,
|
||||||
column, column + 1, row, row + 1,
|
column, column + 1, row, row + 1,
|
||||||
|
@ -751,6 +751,8 @@ gimp_scale_entry_new (GtkTable *table,
|
||||||
|
|
||||||
return_adj = adjustment;
|
return_adj = adjustment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
|
||||||
|
|
||||||
if (spinbutton_width > 0)
|
if (spinbutton_width > 0)
|
||||||
gtk_widget_set_size_request (spinbutton, spinbutton_width, -1);
|
gtk_widget_set_size_request (spinbutton, spinbutton_width, -1);
|
||||||
|
@ -1502,7 +1504,7 @@ gimp_table_attach_aligned (GtkTable *table,
|
||||||
|
|
||||||
if (label_text)
|
if (label_text)
|
||||||
{
|
{
|
||||||
label = gtk_label_new (label_text);
|
label = gtk_label_new_with_mnemonic (label_text);
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
|
gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
|
||||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
|
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
|
||||||
gtk_table_attach (table, label,
|
gtk_table_attach (table, label,
|
||||||
|
@ -1510,6 +1512,7 @@ gimp_table_attach_aligned (GtkTable *table,
|
||||||
row, row + 1,
|
row, row + 1,
|
||||||
GTK_FILL, GTK_FILL, 0, 0);
|
GTK_FILL, GTK_FILL, 0, 0);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (left_align)
|
if (left_align)
|
||||||
|
|
|
@ -649,7 +649,7 @@ preview_pressed (GtkWidget *widget,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
build_dialog (GimpImageBaseType basetype,
|
build_dialog (GimpImageBaseType basetype,
|
||||||
char *imagename)
|
gchar *imagename)
|
||||||
{
|
{
|
||||||
gchar* windowname;
|
gchar* windowname;
|
||||||
CursorOffset* icon_pos;
|
CursorOffset* icon_pos;
|
||||||
|
@ -924,9 +924,9 @@ do_playback (void)
|
||||||
|
|
||||||
init_preview_misc();
|
init_preview_misc();
|
||||||
|
|
||||||
build_dialog(gimp_image_base_type(image_id),
|
build_dialog (gimp_image_base_type (image_id),
|
||||||
gimp_image_get_filename(image_id));
|
gimp_image_get_name (image_id));
|
||||||
|
|
||||||
/* Make sure that whole preview is dirtied with pure-alpha */
|
/* Make sure that whole preview is dirtied with pure-alpha */
|
||||||
total_alpha_preview(preview_data);
|
total_alpha_preview(preview_data);
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,6 @@ lens_dialog (GimpDrawable *drawable)
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *spinbutton;
|
GtkWidget *spinbutton;
|
||||||
GtkObject *adj;
|
GtkObject *adj;
|
||||||
GSList *group = NULL;
|
|
||||||
GimpImageType drawtype;
|
GimpImageType drawtype;
|
||||||
|
|
||||||
drawtype = gimp_drawable_type (drawable->drawable_id);
|
drawtype = gimp_drawable_type (drawable->drawable_id);
|
||||||
|
@ -413,9 +412,8 @@ lens_dialog (GimpDrawable *drawable)
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||||
|
|
||||||
toggle = gtk_radio_button_new_with_label (group,
|
toggle = gtk_radio_button_new_with_mnemonic_from_widget
|
||||||
_("Keep Original Surroundings"));
|
(NULL, _("_Keep Original Surroundings"));
|
||||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), lvals.keep_surr);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), lvals.keep_surr);
|
||||||
gtk_widget_show (toggle);
|
gtk_widget_show (toggle);
|
||||||
|
@ -424,13 +422,11 @@ lens_dialog (GimpDrawable *drawable)
|
||||||
G_CALLBACK (gimp_toggle_button_update),
|
G_CALLBACK (gimp_toggle_button_update),
|
||||||
&lvals.keep_surr);
|
&lvals.keep_surr);
|
||||||
|
|
||||||
toggle =
|
toggle = gtk_radio_button_new_with_mnemonic_from_widget
|
||||||
gtk_radio_button_new_with_label (group,
|
(GTK_RADIO_BUTTON (toggle),
|
||||||
drawtype == GIMP_INDEXEDA_IMAGE ||
|
drawtype == GIMP_INDEXEDA_IMAGE || drawtype == GIMP_INDEXED_IMAGE ?
|
||||||
drawtype == GIMP_INDEXED_IMAGE ?
|
_("_Set Surroundings to Index 0") :
|
||||||
_("Set Surroundings to Index 0") :
|
_("_Set Surroundings to Background Color"));
|
||||||
_("Set Surroundings to Background Color"));
|
|
||||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
|
|
||||||
gtk_box_pack_start(GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), lvals.use_bkgr);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), lvals.use_bkgr);
|
||||||
gtk_widget_show (toggle);
|
gtk_widget_show (toggle);
|
||||||
|
@ -440,13 +436,11 @@ lens_dialog (GimpDrawable *drawable)
|
||||||
&lvals.use_bkgr);
|
&lvals.use_bkgr);
|
||||||
|
|
||||||
if ((drawtype == GIMP_INDEXEDA_IMAGE) ||
|
if ((drawtype == GIMP_INDEXEDA_IMAGE) ||
|
||||||
(drawtype == GIMP_GRAYA_IMAGE) ||
|
(drawtype == GIMP_GRAYA_IMAGE) ||
|
||||||
(drawtype == GIMP_RGBA_IMAGE))
|
(drawtype == GIMP_RGBA_IMAGE))
|
||||||
{
|
{
|
||||||
toggle =
|
toggle = gtk_radio_button_new_with_mnemonic_from_widget
|
||||||
gtk_radio_button_new_with_label (group,
|
(GTK_RADIO_BUTTON (toggle), _("_Make Surroundings Transparent"));
|
||||||
_("Make Surroundings Transparent"));
|
|
||||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||||
lvals.set_transparent);
|
lvals.set_transparent);
|
||||||
|
@ -464,7 +458,7 @@ lens_dialog (GimpDrawable *drawable)
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_hbox_new (FALSE, 4);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
label = gtk_label_new (_("Lens Refraction Index:"));
|
label = gtk_label_new_with_mnemonic (_("_Lens Refraction Index:"));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
|
@ -473,6 +467,8 @@ lens_dialog (GimpDrawable *drawable)
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (adj), "value_changed",
|
g_signal_connect (G_OBJECT (adj), "value_changed",
|
||||||
G_CALLBACK (gimp_double_adjustment_update),
|
G_CALLBACK (gimp_double_adjustment_update),
|
||||||
&lvals.refraction);
|
&lvals.refraction);
|
||||||
|
|
|
@ -374,26 +374,37 @@ decompose (gint32 image_ID,
|
||||||
for (j = 0; j < num_images; j++)
|
for (j = 0; j < num_images; j++)
|
||||||
{
|
{
|
||||||
/* Build a filename like <imagename>-<channel>.<extension> */
|
/* Build a filename like <imagename>-<channel>.<extension> */
|
||||||
char *fname = g_strdup (gimp_image_get_filename (image_ID));
|
gchar *fname;
|
||||||
char *extension = fname + strlen (fname) - 1;
|
gchar *extension;
|
||||||
|
|
||||||
while (extension >= fname)
|
fname = gimp_image_get_filename (image_ID);
|
||||||
{
|
|
||||||
if (*extension == '.') break;
|
if (fname)
|
||||||
extension--;
|
{
|
||||||
}
|
extension = fname + strlen (fname) - 1;
|
||||||
if (extension >= fname)
|
|
||||||
{
|
while (extension >= fname)
|
||||||
*(extension++) = '\0';
|
{
|
||||||
filename = g_strdup_printf ("%s-%s.%s", fname,
|
if (*extension == '.') break;
|
||||||
gettext (extract[extract_idx].channel_name[j]),
|
extension--;
|
||||||
extension);
|
}
|
||||||
}
|
if (extension >= fname)
|
||||||
|
{
|
||||||
|
*(extension++) = '\0';
|
||||||
|
filename = g_strdup_printf ("%s-%s.%s", fname,
|
||||||
|
gettext (extract[extract_idx].channel_name[j]),
|
||||||
|
extension);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filename = g_strdup_printf ("%s-%s", fname,
|
||||||
|
gettext (extract[extract_idx].channel_name[j]));
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
filename = g_strdup_printf ("%s-%s", fname,
|
filename = g_strdup (gettext (extract[extract_idx].channel_name[j]));
|
||||||
gettext (extract[extract_idx].channel_name[j]));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
image_ID_dst[j] = create_new_image (filename, width, height, GIMP_GRAY,
|
image_ID_dst[j] = create_new_image (filename, width, height, GIMP_GRAY,
|
||||||
layer_ID_dst+j, drawable_dst+j,
|
layer_ID_dst+j, drawable_dst+j,
|
||||||
|
|
|
@ -1011,25 +1011,18 @@ create_new_image (gchar *filename,
|
||||||
static gchar *
|
static gchar *
|
||||||
compose_image_name (gint32 image_ID)
|
compose_image_name (gint32 image_ID)
|
||||||
{
|
{
|
||||||
static gchar buffer[256];
|
gchar *image_name;
|
||||||
gchar *filename, *basename;
|
gchar *name;
|
||||||
|
|
||||||
filename = gimp_image_get_filename (image_ID);
|
|
||||||
if (filename == NULL)
|
|
||||||
return "";
|
|
||||||
|
|
||||||
/* Compose a name of the basename and the image-ID */
|
/* Compose a name of the basename and the image-ID */
|
||||||
basename = strrchr (filename, '/');
|
|
||||||
if (basename == NULL)
|
|
||||||
basename = filename;
|
|
||||||
else
|
|
||||||
basename++;
|
|
||||||
|
|
||||||
g_snprintf (buffer, sizeof (buffer), "%s-%ld", basename, (long)image_ID);
|
name = gimp_image_get_name (image_ID);
|
||||||
|
|
||||||
g_free (filename);
|
image_name = g_strdup_printf ("%s-%d", name, image_ID);
|
||||||
|
|
||||||
return buffer;
|
g_free (name);
|
||||||
|
|
||||||
|
return image_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1040,7 +1033,6 @@ add_list_item_callback (GtkWidget *widget,
|
||||||
GList *tmp_list;
|
GList *tmp_list;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
GtkWidget *list_item;
|
GtkWidget *list_item;
|
||||||
gint32 image_ID;
|
|
||||||
|
|
||||||
tmp_list = GTK_LIST (list)->selection;
|
tmp_list = GTK_LIST (list)->selection;
|
||||||
|
|
||||||
|
@ -1048,16 +1040,24 @@ add_list_item_callback (GtkWidget *widget,
|
||||||
{
|
{
|
||||||
if ((label = (GtkWidget *) tmp_list->data) != NULL)
|
if ((label = (GtkWidget *) tmp_list->data) != NULL)
|
||||||
{
|
{
|
||||||
image_ID = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (label),
|
gint32 image_ID;
|
||||||
"image"));
|
gchar *name;
|
||||||
list_item =
|
|
||||||
gtk_list_item_new_with_label (compose_image_name (image_ID));
|
|
||||||
|
|
||||||
|
image_ID = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (label),
|
||||||
|
"image"));
|
||||||
|
name = compose_image_name (image_ID);
|
||||||
|
|
||||||
|
list_item = gtk_list_item_new_with_label (name);
|
||||||
g_object_set_data (G_OBJECT (list_item), "image",
|
g_object_set_data (G_OBJECT (list_item), "image",
|
||||||
GINT_TO_POINTER (image_ID));
|
GINT_TO_POINTER (image_ID));
|
||||||
gtk_container_add (GTK_CONTAINER (filmint.image_list_film), list_item);
|
|
||||||
|
g_free (name);
|
||||||
|
|
||||||
|
gtk_container_add (GTK_CONTAINER (filmint.image_list_film),
|
||||||
|
list_item);
|
||||||
gtk_widget_show (list_item);
|
gtk_widget_show (list_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp_list = tmp_list->next;
|
tmp_list = tmp_list->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1126,8 +1126,11 @@ add_image_list (gint add_box_flag,
|
||||||
|
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
list_item =
|
gchar *name = compose_image_name (image_id[i]);
|
||||||
gtk_list_item_new_with_label (compose_image_name (image_id[i]));
|
|
||||||
|
list_item = gtk_list_item_new_with_label (name);
|
||||||
|
|
||||||
|
g_free (name);
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (list_item), "image",
|
g_object_set_data (G_OBJECT (list_item), "image",
|
||||||
GINT_TO_POINTER (image_id[i]));
|
GINT_TO_POINTER (image_id[i]));
|
||||||
|
|
|
@ -166,8 +166,7 @@ run (gchar *name,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
build_dialog (GimpImageBaseType basetype,
|
build_dialog (void)
|
||||||
gchar *imagename)
|
|
||||||
{
|
{
|
||||||
GtkWidget *dlg;
|
GtkWidget *dlg;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
@ -318,8 +317,7 @@ do_fun (void)
|
||||||
gimp_tile_cache_ntiles (1);
|
gimp_tile_cache_ntiles (1);
|
||||||
|
|
||||||
init_preview_misc();
|
init_preview_misc();
|
||||||
build_dialog(gimp_image_base_type(image_id),
|
build_dialog ();
|
||||||
gimp_image_get_filename(image_id));
|
|
||||||
|
|
||||||
gen_llut();
|
gen_llut();
|
||||||
|
|
||||||
|
|
|
@ -183,8 +183,7 @@ run (gchar *name,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
build_dialog (GimpImageBaseType basetype,
|
build_dialog (void)
|
||||||
gchar *imagename)
|
|
||||||
{
|
{
|
||||||
GtkWidget *dlg;
|
GtkWidget *dlg;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
@ -321,9 +320,8 @@ do_fun (void)
|
||||||
/* cache hint */
|
/* cache hint */
|
||||||
gimp_tile_cache_ntiles (1);
|
gimp_tile_cache_ntiles (1);
|
||||||
|
|
||||||
init_preview_misc();
|
init_preview_misc ();
|
||||||
build_dialog(gimp_image_base_type(image_id),
|
build_dialog ();
|
||||||
gimp_image_get_filename(image_id));
|
|
||||||
|
|
||||||
init_lut();
|
init_lut();
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,7 @@ glass_dialog (GimpDrawable *drawable)
|
||||||
|
|
||||||
/* Horizontal scale - Width */
|
/* Horizontal scale - Width */
|
||||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||||
_("Tile Width:"), 150, 0,
|
_("Tile _Width:"), 150, 0,
|
||||||
gtvals.xblock, 10, 50, 2, 10, 0,
|
gtvals.xblock, 10, 50, 2, 10, 0,
|
||||||
TRUE, 0, 0,
|
TRUE, 0, 0,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
@ -329,7 +329,7 @@ glass_dialog (GimpDrawable *drawable)
|
||||||
|
|
||||||
/* Horizontal scale - Height */
|
/* Horizontal scale - Height */
|
||||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||||
_("Tile Height:"), 150, 0,
|
_("Tile _Height:"), 150, 0,
|
||||||
gtvals.yblock, 10, 50, 2, 10, 0,
|
gtvals.yblock, 10, 50, 2, 10, 0,
|
||||||
TRUE, 0, 0,
|
TRUE, 0, 0,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
|
@ -172,6 +172,8 @@ guillotine (gint32 image_ID)
|
||||||
gint x, y;
|
gint x, y;
|
||||||
|
|
||||||
filename = gimp_image_get_filename (image_ID);
|
filename = gimp_image_get_filename (image_ID);
|
||||||
|
if (!filename)
|
||||||
|
filename = g_strdup (_("Untitled"));
|
||||||
|
|
||||||
/* Do the actual dup'ing and cropping... this isn't a too naive a
|
/* Do the actual dup'ing and cropping... this isn't a too naive a
|
||||||
way to do this since we got copy-on-write tiles, either. */
|
way to do this since we got copy-on-write tiles, either. */
|
||||||
|
|
|
@ -360,8 +360,7 @@ run (gchar *name,
|
||||||
|
|
||||||
/* Start print job. */
|
/* Start print job. */
|
||||||
docInfo.cbSize = sizeof (DOCINFO);
|
docInfo.cbSize = sizeof (DOCINFO);
|
||||||
docInfo.lpszDocName =
|
docInfo.lpszDocName = gimp_image_get_name (param[1].data.d_image);
|
||||||
gimp_image_get_filename (param[1].data.d_image);
|
|
||||||
docInfo.lpszOutput = NULL;
|
docInfo.lpszOutput = NULL;
|
||||||
docInfo.lpszDatatype = NULL;
|
docInfo.lpszDatatype = NULL;
|
||||||
docInfo.fwType = 0;
|
docInfo.fwType = 0;
|
||||||
|
|
|
@ -635,9 +635,6 @@ t_anim_info *p_alloc_ainfo(gint32 image_id, GimpRunMode run_mode)
|
||||||
l_ainfo_ptr->old_filename = gimp_image_get_filename(image_id);
|
l_ainfo_ptr->old_filename = gimp_image_get_filename(image_id);
|
||||||
if(l_ainfo_ptr->old_filename == NULL)
|
if(l_ainfo_ptr->old_filename == NULL)
|
||||||
{
|
{
|
||||||
/* note: gimp versions > 1.2 have default filenames for new created images
|
|
||||||
* and we'll probably never step into this place anymore
|
|
||||||
*/
|
|
||||||
l_ainfo_ptr->old_filename = g_strdup("frame_0001.xcf"); /* assign a defaultname */
|
l_ainfo_ptr->old_filename = g_strdup("frame_0001.xcf"); /* assign a defaultname */
|
||||||
gimp_image_set_filename (image_id, l_ainfo_ptr->old_filename);
|
gimp_image_set_filename (image_id, l_ainfo_ptr->old_filename);
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ run(char *name, int n_params, GimpParam *param, int *nreturn_vals,
|
||||||
|
|
||||||
/* Get the specified drawable */
|
/* Get the specified drawable */
|
||||||
drawable = gimp_drawable_get(param[2].data.d_drawable);
|
drawable = gimp_drawable_get(param[2].data.d_drawable);
|
||||||
_image_name = gimp_image_get_filename(param[1].data.d_image);
|
_image_name = gimp_image_get_name(param[1].data.d_image);
|
||||||
_image_width = gimp_image_width(param[1].data.d_image);
|
_image_width = gimp_image_width(param[1].data.d_image);
|
||||||
_image_height = gimp_image_height(param[1].data.d_image);
|
_image_height = gimp_image_height(param[1].data.d_image);
|
||||||
|
|
||||||
|
|
|
@ -159,8 +159,7 @@ do_settings_dialog(void)
|
||||||
if (!dialog)
|
if (!dialog)
|
||||||
dialog = make_settings_dialog();
|
dialog = make_settings_dialog();
|
||||||
|
|
||||||
gtk_label_set_text(GTK_LABEL(dialog->filename),
|
gtk_label_set_text(GTK_LABEL(dialog->filename), filename);
|
||||||
(filename) ? filename : _("<Untitled>"));
|
|
||||||
browse_widget_set_filename(dialog->imagename, info->image_name);
|
browse_widget_set_filename(dialog->imagename, info->image_name);
|
||||||
gtk_entry_set_text(GTK_ENTRY(dialog->title), info->title);
|
gtk_entry_set_text(GTK_ENTRY(dialog->title), info->title);
|
||||||
gtk_entry_set_text(GTK_ENTRY(dialog->author), info->author);
|
gtk_entry_set_text(GTK_ENTRY(dialog->author), info->author);
|
||||||
|
|
|
@ -332,7 +332,7 @@ create_top_level_structure(void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
plug_in_name = g_strdup_printf (_("%s -- Print v%s"),
|
plug_in_name = g_strdup_printf (_("%s -- Print v%s"),
|
||||||
image_filename, PLUG_IN_VERSION);
|
image_name, PLUG_IN_VERSION);
|
||||||
|
|
||||||
print_dialog =
|
print_dialog =
|
||||||
gimp_dialog_new (plug_in_name, "print",
|
gimp_dialog_new (plug_in_name, "print",
|
||||||
|
|
|
@ -83,7 +83,7 @@ int runme = FALSE; /* True if print should proceed */
|
||||||
stp_printer_t current_printer = 0; /* Current printer index */
|
stp_printer_t current_printer = 0; /* Current printer index */
|
||||||
gint32 image_ID; /* image ID */
|
gint32 image_ID; /* image ID */
|
||||||
|
|
||||||
gchar *image_filename;
|
gchar *image_name;
|
||||||
gint image_width;
|
gint image_width;
|
||||||
gint image_height;
|
gint image_height;
|
||||||
|
|
||||||
|
@ -273,10 +273,7 @@ run (gchar *name, /* I - Name of print program. */
|
||||||
image_ID = param[1].data.d_int32;
|
image_ID = param[1].data.d_int32;
|
||||||
drawable_ID = param[2].data.d_int32;
|
drawable_ID = param[2].data.d_int32;
|
||||||
|
|
||||||
image_filename = gimp_image_get_filename (image_ID);
|
image_name = gimp_image_get_name (image_ID);
|
||||||
|
|
||||||
if (strchr (image_filename, '/'))
|
|
||||||
image_filename = strrchr(image_filename, '/') + 1;
|
|
||||||
|
|
||||||
/* eventually export the image */
|
/* eventually export the image */
|
||||||
switch (run_mode)
|
switch (run_mode)
|
||||||
|
|
|
@ -61,7 +61,7 @@ extern gint plist_count; /* Number of system printers */
|
||||||
extern gint plist_current; /* Current system printer */
|
extern gint plist_current; /* Current system printer */
|
||||||
extern gp_plist_t *plist; /* System printers */
|
extern gp_plist_t *plist; /* System printers */
|
||||||
extern gint32 image_ID;
|
extern gint32 image_ID;
|
||||||
extern gchar *image_filename;
|
extern gchar *image_name;
|
||||||
extern gint image_width;
|
extern gint image_width;
|
||||||
extern gint image_height;
|
extern gint image_height;
|
||||||
extern stp_printer_t current_printer;
|
extern stp_printer_t current_printer;
|
||||||
|
|
Loading…
Reference in a new issue