GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit ecfb8a12 authored by Sven Neumann's avatar Sven Neumann

updated the imagemap plug-in


--Sven
parent 88e0cc31
Sun Oct 24 22:53:17 MEST 1999 Sven Neumann <sven@gimp.org>
* plug-ins/imagemap/* updated imagemap to version 1.3
Sun Oct 24 16:49:13 CEST 1999 Marc Lehmann <pcg@goof.com>
* tools/pdbgen/pdb/drawable.pdb, all calls: fixed some improperly
......
Sat Aug 28 16:32:03 1999 Maurits Rijk <maurits@frop.edu>
Thu Oct 21 19:58:39 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* release version 1.3
Sat Oct 9 11:39:14 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_main.c (dialog): removed some obsolete funcs.
Sun Oct 3 20:25:32 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_grid.c: prepare for i8n
* imap_polygon.c (polygon_free_list): added
(polygon_assign): free list before adding new points
Sun Sep 26 13:44:15 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_cmd_select_prev.c: created
* imap_cmd_select_prev.h: created
* imap_cmd_select_next.c: created
* imap_cmd_select_next.h: created
* imap_cmd_object_move.c: created
* imap_cmd_object_move.h: created
Wed Sep 8 19:07:19 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_taglist.h: created
* imap_taglist.c: created
Sat Aug 28 16:32:03 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* release version 1.2
Sun Aug 15 16:54:43 1999 Maurits Rijk <maurits@frop.edu>
Sun Aug 15 16:54:43 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_cmd_select_region.h: created
* imap_cmd_move_sash.c: created
Mon Aug 9 22:33:12 1999 Maurits Rijk <maurits@frop.edu>
Mon Aug 9 22:33:12 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_cmd_cut_object.c: created
* imap_cmd_cut_object.h: created
Sun Aug 8 12:54:44 1999 Maurits Rijk <maurits@frop.edu>
Sun Aug 8 12:54:44 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_cmd_cut.c: created
......@@ -26,26 +61,26 @@ Sun Aug 8 12:54:44 1999 Maurits Rijk <maurits@frop.edu>
* imap_object_popup.h: created
Sat Jul 31 12:34:00 1999 Maurits Rijk <maurits@frop.edu>
Sat Jul 31 12:34:00 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_toolbar.c: Added redo and undo button to toolbar.
Wed Jul 28 22:17:09 1999 Maurits Rijk <maurits@frop.edu>
Wed Jul 28 22:17:09 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_object.c (object_on_button_press): fixed 'round to grid' bug
for polygons.
Tue Jul 27 23:19:00 1999 Maurits Rijk <maurits@frop.edu>
Tue Jul 27 23:19:00 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_edit_area_info.c: use BrowseWidget_t for URL.
Mon Jul 26 22:00:58 1999 Maurits Rijk <maurits@frop.edu>
Mon Jul 26 22:00:58 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_browse.c: created
* imap_object.c (object_list_move_selected_up): fixed move up/down bug.
Mon Jun 28 18:05:24 1999 Maurits Rijk <maurits@frop.edu>
Mon Jun 28 18:05:24 1999 Maurits Rijk <lpeek.mrijk@consunet.nl>
* imap_main.c (dialog): fixed annoying bug
......
......@@ -73,12 +73,16 @@ imagemap_SOURCES = \
imap_cmd_move_down.h \
imap_cmd_move_sash.c \
imap_cmd_move_sash.h \
imap_cmd_move_selected.c \
imap_cmd_move_selected.h \
imap_cmd_move_to_front.c \
imap_cmd_move_to_front.h \
imap_cmd_move_up.c \
imap_cmd_move_up.h \
imap_cmd_object_down.c \
imap_cmd_object_down.h \
imap_cmd_object_move.c \
imap_cmd_object_move.h \
imap_cmd_object_up.c \
imap_cmd_object_up.h \
imap_cmd_paste.c \
......@@ -87,6 +91,10 @@ imagemap_SOURCES = \
imap_cmd_select.h \
imap_cmd_select_all.c \
imap_cmd_select_all.h \
imap_cmd_select_next.c \
imap_cmd_select_next.h \
imap_cmd_select_prev.c \
imap_cmd_select_prev.h \
imap_cmd_select_region.c \
imap_cmd_select_region.h \
imap_cmd_send_to_back.c \
......@@ -147,6 +155,8 @@ imagemap_SOURCES = \
imap_string.h \
imap_table.c \
imap_table.h \
imap_taglist.c \
imap_taglist.h \
imap_toolbar.c \
imap_toolbar.h \
imap_tools.c \
......
What's new in GIMP Imagemap plug-in 1.3
* 'Follow' mode to dynamically update object dimensions.
* Added 'Most recently used' and 'Number of Undo levels' to Preferences menu.
* Movement of objects with cursor keys (left/right/up/down). Select next/prev
object with TAB key.
* Double-click in selection brings up Area dialog.
* Drop links (e.g. from Netscape) into the selection list updates the URL.
* Drop links (e.g. from Netscape) onto an object in the preview window updates
the URL.
* A few bug fixes.
* Lot's of internationalization preparations.
* Grid can be dynamically updated when changing grid parameters.
What's new in GIMP Imagemap plug-in 1.2
* Implemented Undo/Redo
......
This is the GIMP Imagemap plug-in version 1.2. See the INSTALL file for
This is the GIMP Imagemap plug-in version 1.3. See the INSTALL file for
build instructions.
More information can be found on my homepage at
......
Version 1.3
* 'Follow' mode to dynamically update object dimensions.
* Configuration script
* Handle double-click in selection
* Movement/resizing of objects with cursor keys.
* implement dynamically adjustable grid.
* Snap to grid during resize.
Version 1.4
* Snap to grid during resize.
* 'Divider' object.
* Move polygon sides.
* Gimp style guides.
......@@ -16,6 +8,7 @@ Version 1.4
Version 1.5
* Standalone version
* Configuration script
* Warning icon for area's without URL.
* Add HTML 4.0 tags (TABINDEX, ACCESKEY)
* User-definable tags
......@@ -46,5 +39,9 @@ Miscellaneous
* Compare image-name in HTML file with loaded image and issue warning
if different.
* Restrict to screen size for large images.
* Internationalization
* Drag & drop within selection
* Don't redraw complete polygon while moving a sash.
* Compliancy with GIMP 1.1.x:
- Use GIMP's 1.1.x new help system
- Tear-off menu's
- Arrow button with similar action as pop-up in upper left of preview window
- Paner widget in lower right of preview window for fast navigation.
\ No newline at end of file
......@@ -23,21 +23,22 @@
#include "imap_about.h"
#include "imap_default_dialog.h"
#include "libgimp/stdplugins-intl.h"
void
do_about_dialog(void)
{
static DefaultDialog_t *dialog;
if (!dialog) {
dialog = make_default_dialog("About");
dialog = make_default_dialog(_("About"));
default_dialog_hide_cancel_button(dialog);
default_dialog_hide_apply_button(dialog);
default_dialog_set_label(
dialog,
"Imagemap plug-in 1.2\n\n"
"Copyright(c) 1999 by Maurits Rijk\n"
"lpeek.mrijk@consunet.nl \n\n"
" Released under the GNU General Public License ");
_("Imagemap plug-in 1.3\n\n"
"Copyright(c) 1999 by Maurits Rijk\n"
"lpeek.mrijk@consunet.nl \n\n"
" Released under the GNU General Public License "));
}
default_dialog_show(dialog);
}
......@@ -22,7 +22,6 @@
*/
#include "imap_browse.h"
#include "imap_main.h"
#include "open.xpm"
......@@ -88,7 +87,6 @@ browse_widget_new(const gchar *name)
GdkPixmap *icon;
GdkBitmap *mask;
GtkStyle *style;
GtkWidget *top = get_top_widget();
browse->file_selection = NULL;
browse->name = name;
......@@ -107,10 +105,11 @@ browse_widget_new(const gchar *name)
gtk_widget_show(browse->file);
browse->button = button = gtk_button_new();
style = gtk_widget_get_style(top);
icon = gdk_pixmap_create_from_xpm_d(top->window, &mask,
&style->bg[GTK_STATE_NORMAL],
open_xpm);
style = gtk_widget_get_style(button);
icon = gdk_pixmap_colormap_create_from_xpm_d(
button->window, gtk_widget_get_colormap(button), &mask,
&style->bg[GTK_STATE_NORMAL], open_xpm);
iconw = gtk_pixmap_new(icon, mask);
gtk_widget_show(iconw);
gtk_container_add(GTK_CONTAINER(button), iconw);
......
......@@ -216,7 +216,7 @@ static const short yycheck[] = { 3,
0, 15, 12, 10, 0, 14, 12, 15
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/lib/bison.simple"
#line 3 "bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
......@@ -409,7 +409,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
#line 196 "/usr/lib/bison.simple"
#line 196 "bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
......@@ -794,7 +794,7 @@ case 22:
break;}
}
/* the action file gets copied in in place of this dollarsign */
#line 498 "/usr/lib/bison.simple"
#line 498 "bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
......
......@@ -24,6 +24,7 @@
#include <math.h>
#include "imap_circle.h"
#include "libgimp/stdplugins-intl.h"
#include "imap_main.h"
#include "imap_misc.h"
#include "imap_object_popup.h"
......@@ -33,7 +34,7 @@
static gboolean circle_is_valid(Object_t *obj);
static Object_t *circle_clone(Object_t *obj);
static Object_t *circle_assign(Object_t *obj, Object_t *des);
static void circle_assign(Object_t *obj, Object_t *des);
static void circle_draw(Object_t* obj, GdkWindow *window, GdkGC* gc);
static void circle_draw_sashes(Object_t* obj, GdkWindow *window, GdkGC* gc);
static MoveSashFunc_t circle_near_sash(Object_t *obj, gint x, gint y);
......@@ -42,7 +43,7 @@ static void circle_get_dimensions(Object_t *obj, gint *x, gint *y,
gint *width, gint *height);
static void circle_resize(Object_t *obj, gint percentage_x, gint percentage_y);
static void circle_move(Object_t *obj, gint dx, gint dy);
static gpointer circle_create_info_tab(GtkWidget *notebook);
static gpointer circle_create_info_widget(GtkWidget *frame);
static void circle_fill_info_tab(Object_t *obj, gpointer data);
static void circle_set_initial_focus(Object_t *obj, gpointer data);
static void circle_update(Object_t* obj, gpointer data);
......@@ -55,6 +56,7 @@ static void circle_write_ncsa(Object_t* obj, gpointer param,
static char** circle_get_icon_data(void);
static ObjectClass_t circle_class = {
"Circle",
NULL, /* info_dialog */
NULL, /* icon */
NULL, /* mask */
......@@ -71,7 +73,8 @@ static ObjectClass_t circle_class = {
circle_get_dimensions,
circle_resize,
circle_move,
circle_create_info_tab,
circle_create_info_widget,
circle_fill_info_tab, /* circle_update_info_widget */
circle_fill_info_tab,
circle_set_initial_focus,
circle_update,
......@@ -110,7 +113,7 @@ circle_clone(Object_t *obj)
return &clone->obj;
}
static Object_t*
static void
circle_assign(Object_t *obj, Object_t *des)
{
Circle_t *src_circle = ObjectToCircle(obj);
......@@ -118,7 +121,6 @@ circle_assign(Object_t *obj, Object_t *des)
des_circle->x = src_circle->x;
des_circle->y = src_circle->y;
des_circle->r = src_circle->r;
return object_copy(obj, des);
}
static void
......@@ -206,45 +208,73 @@ circle_move(Object_t *obj, gint dx, gint dy)
}
typedef struct {
Object_t *obj;
GtkWidget *x;
GtkWidget *y;
GtkWidget *r;
} CircleProperties_t;
static void
x_changed_cb(GtkWidget *widget, gpointer data)
{
Object_t *obj = ((CircleProperties_t*) data)->obj;
gint x = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
ObjectToCircle(obj)->x = x;
edit_area_info_dialog_emit_geometry_signal(obj->class->info_dialog);
}
static void
y_changed_cb(GtkWidget *widget, gpointer data)
{
Object_t *obj = ((CircleProperties_t*) data)->obj;
gint y = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
ObjectToCircle(obj)->y = y;
edit_area_info_dialog_emit_geometry_signal(obj->class->info_dialog);
}
static void
r_changed_cb(GtkWidget *widget, gpointer data)
{
Object_t *obj = ((CircleProperties_t*) data)->obj;
gint r = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
ObjectToCircle(obj)->r = r;
edit_area_info_dialog_emit_geometry_signal(obj->class->info_dialog);
}
static gpointer
circle_create_info_tab(GtkWidget *notebook)
circle_create_info_widget(GtkWidget *frame)
{
CircleProperties_t *props = g_new(CircleProperties_t, 1);
GtkWidget *vbox, *table, *label;
GtkWidget *table;
gint max_width = get_image_width();
gint max_height = get_image_height();
vbox = gtk_vbox_new(FALSE, 1);
gtk_widget_show(vbox);
table = gtk_table_new(3, 3, FALSE);
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(frame), table);
gtk_container_set_border_width(GTK_CONTAINER(table), 10);
gtk_table_set_row_spacings(GTK_TABLE(table), 10);
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
gtk_widget_show(table);
create_label_in_table(table, 0, 0, "Center x:");
create_label_in_table(table, 0, 0, _("Center x:"));
props->x = create_spin_button_in_table(table, 0, 1, 1, 0, max_width - 1);
create_label_in_table(table, 0, 2, "pixels");
gtk_signal_connect(GTK_OBJECT(props->x), "changed",
(GtkSignalFunc) x_changed_cb, (gpointer) props);
create_label_in_table(table, 0, 2, _("pixels"));
create_label_in_table(table, 1, 0, "Center y:");
create_label_in_table(table, 1, 0, _("Center y:"));
props->y = create_spin_button_in_table(table, 1, 1, 1, 0, max_height - 1);
create_label_in_table(table, 1, 2, "pixels");
gtk_signal_connect(GTK_OBJECT(props->y), "changed",
(GtkSignalFunc) y_changed_cb, (gpointer) props);
create_label_in_table(table, 1, 2, _("pixels"));
create_label_in_table(table, 2, 0, "Radius:");
create_label_in_table(table, 2, 0, _("Radius:"));
props->r = create_spin_button_in_table(table, 2, 1, 1, 1, G_MAXINT);
create_label_in_table(table, 2, 2, "pixels");
gtk_signal_connect(GTK_OBJECT(props->r), "changed",
(GtkSignalFunc) r_changed_cb, (gpointer) props);
create_label_in_table(table, 2, 2, _("pixels"));
label = gtk_label_new("Circle");
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label);
return props;
}
......@@ -254,6 +284,7 @@ circle_fill_info_tab(Object_t *obj, gpointer data)
Circle_t *circle = ObjectToCircle(obj);
CircleProperties_t *props = (CircleProperties_t*) data;
props->obj = obj;
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->x), circle->x);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->y), circle->y);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(props->r), circle->r);
......
......@@ -23,9 +23,10 @@
#include "imap_cmd_clear.h"
#include "imap_cmd_delete.h"
#include "libgimp/stdplugins-intl.h"
#include "imap_main.h"
static gboolean clear_command_execute(Command_t *parent);
static CmdExecuteValue_t clear_command_execute(Command_t *parent);
static void clear_command_undo(Command_t *parent);
static void clear_command_redo(Command_t *parent);
......@@ -46,7 +47,7 @@ clear_command_new(ObjectList_t *list)
{
ClearCommand_t *command = g_new(ClearCommand_t, 1);
command->list = list;
return command_init(&command->parent, "Clear", &clear_command_class);
return command_init(&command->parent, _("Clear"), &clear_command_class);
}
static void
......@@ -57,7 +58,7 @@ remove_one_object(Object_t *obj, gpointer data)
delete_command_new(command->list, obj));
}
static gboolean
static CmdExecuteValue_t
clear_command_execute(Command_t *parent)
{
ClearCommand_t *command = (ClearCommand_t*) parent;
......@@ -68,7 +69,7 @@ clear_command_execute(Command_t *parent)
object_list_remove_remove_cb(command->list, id);
redraw_preview(); /* Fix me! */
return TRUE;
return CMD_APPEND;
}
static void
......
......@@ -21,10 +21,10 @@
*
*/
#include <stdio.h>
#include "imap_cmd_copy.h"
#include "libgimp/stdplugins-intl.h"
static gboolean copy_command_execute(Command_t *parent);
static CmdExecuteValue_t copy_command_execute(Command_t *parent);
static void copy_command_undo(Command_t *parent);
static CommandClass_t copy_command_class = {
......@@ -46,17 +46,17 @@ copy_command_new(ObjectList_t *list)
CopyCommand_t *command = g_new(CopyCommand_t, 1);
command->list = list;
command->paste_buffer = NULL;
return command_init(&command->parent, "Copy", &copy_command_class);
return command_init(&command->parent, _("Copy"), &copy_command_class);
}
static gboolean
static CmdExecuteValue_t
copy_command_execute(Command_t *parent)
{
CopyCommand_t *command = (CopyCommand_t*) parent;
command->paste_buffer = object_list_copy(command->paste_buffer,
get_paste_buffer());
object_list_copy_to_paste_buffer(command->list);
return TRUE;
return CMD_APPEND;
}
static void
......
......@@ -22,9 +22,10 @@
*/
#include "imap_cmd_copy_object.h"
#include "libgimp/stdplugins-intl.h"
static void copy_object_command_destruct(Command_t *parent);
static gboolean copy_object_command_execute(Command_t *parent);
static CmdExecuteValue_t copy_object_command_execute(Command_t *parent);
static void copy_object_command_undo(Command_t *parent);
static CommandClass_t copy_object_command_class = {
......@@ -46,7 +47,8 @@ copy_object_command_new(Object_t *obj)
CopyObjectCommand_t *command = g_new(CopyObjectCommand_t, 1);
command->obj = object_ref(obj);
command->paste_buffer = NULL;
return command_init(&command->parent, "Copy", &copy_object_command_class);
return command_init(&command->parent, _("Copy"),
&copy_object_command_class);
}
static void
......@@ -56,7 +58,7 @@ copy_object_command_destruct(Command_t *parent)
object_unref(command->obj);
}
static gboolean
static CmdExecuteValue_t
copy_object_command_execute(Command_t *parent)
{
CopyObjectCommand_t *command = (CopyObjectCommand_t*) parent;
......@@ -67,7 +69,7 @@ copy_object_command_execute(Command_t *parent)
clear_paste_buffer();
object_list_append(paste_buffer, object_clone(command->obj));
return TRUE;
return CMD_APPEND;
}
static void
......
......@@ -22,9 +22,10 @@
*/
#include "imap_cmd_create.h"
#include "libgimp/stdplugins-intl.h"
#include "imap_main.h"
static gboolean create_command_execute(Command_t *parent);
static CmdExecuteValue_t create_command_execute(Command_t *parent);
static void create_command_destruct(Command_t *parent);
static void create_command_undo(Command_t *parent);
......@@ -48,7 +49,7 @@ create_command_new(ObjectList_t *list, Object_t *obj)
CreateCommand_t *command = g_new(CreateCommand_t, 1);
command->list = list;
command->obj = object_ref(obj);
return command_init(&command->parent, "Create", &create_command_class);
return command_init(&command->parent, _("Create"), &create_command_class);
}
static void
......@@ -58,14 +59,14 @@ create_command_destruct(Command_t *parent)
object_unref(command->obj);
}
static gboolean
static CmdExecuteValue_t
create_command_execute(Command_t *parent)
{
CreateCommand_t *command = (CreateCommand_t*) parent;
command->changed = object_list_get_changed(command->list);
object_list_append(command->list, object_ref(command->obj));
redraw_preview(); /* fix me! */
return TRUE;
return CMD_APPEND;
}
static void
......
......@@ -23,10 +23,11 @@
#include "imap_cmd_delete.h"
#include "imap_cmd_cut.h"
#include "libgimp/stdplugins-intl.h"
#include "imap_main.h"
static void cut_command_destruct(Command_t *parent);
static gboolean cut_command_execute(Command_t *parent);
static CmdExecuteValue_t cut_command_execute(Command_t *parent);
static void cut_command_undo(Command_t *parent);
static void cut_command_redo(Command_t *parent);
......@@ -49,7 +50,7 @@ cut_command_new(ObjectList_t *list)
CutCommand_t *command = g_new(CutCommand_t, 1);
command->list = list;
command->paste_buffer = NULL;
return command_init(&command->parent, "Cut", &cut_command_class);
return command_init(&command->parent, _("Cut"), &cut_command_class);
}
static void
......@@ -67,7 +68,7 @@ remove_one_object(Object_t *obj, gpointer data)
delete_command_new(command->list, obj));
}
static gboolean
static CmdExecuteValue_t
cut_command_execute(Command_t *parent)
{
CutCommand_t *command = (CutCommand_t*) parent;
......@@ -80,7 +81,7 @@ cut_command_execute(Command_t *parent)
object_list_remove_remove_cb(command->list, id);
redraw_preview(); /* Fix me! */
return TRUE;
return CMD_APPEND;
}
static void
......
......@@ -24,9 +24,10 @@
#include "imap_cmd_copy_object.h"
#include "imap_cmd_cut_object.h"
#include "imap_cmd_delete.h"
#include "libgimp/stdplugins-intl.h"
#include "imap_main.h"
static gboolean cut_object_command_execute(Command_t *parent);
static CmdExecuteValue_t cut_object_command_execute(Command_t *parent);
static void cut_object_command_undo(Command_t *parent);
static void cut_object_command_redo(Command_t *parent);
......@@ -47,19 +48,19 @@ cut_object_command_new(Object_t *obj)
CutObjectCommand_t *command = g_new(CutObjectCommand_t, 1);
Command_t *parent;
parent = command_init(&command->parent, "Cut", &cut_object_command_class);
parent = command_init(&command->parent, _("Cut"),
&cut_object_command_class);
command_add_subcommand(parent, copy_object_command_new(obj));
command_add_subcommand(parent, delete_command_new(obj->list, obj));
return parent;
}
static gboolean
static CmdExecuteValue_t
cut_object_command_execute(Command_t *parent)
{
redraw_preview(); /* fix me! */
return TRUE;
return CMD_APPEND;
}
static void
......
......@@ -22,11 +22,11 @@
*/
#include "imap_cmd_delete.h"
#include "libgimp/stdplugins-intl.h"
#include "imap_main.h"