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

Commit a73614b6 authored by Maurits Rijk's avatar Maurits Rijk

Fix for #102303 + lots of code clean-up

parent cb9d0cc2
2003-01-02 Maurits Rijk <lpeek.mrijk@consunet.nl>
* plug-ins/imagemap/imap_preview.[ch]: fix for #102303
* plug-ins/imagemap/imap_main.c
* plug-ins/imagemap/imap_object.c
* plug-ins/imagemap/imap_object_popup.c
* plug-ins/imagemap/imap_polygon.c
* plug-ins/imagemap/imap_edit_area_info.c
* plug-ins/imagemap/imap_cmd_*.c: code clean-up
* plug-ins/imagemap/imap_cmd_*.h: removed. All prototypes are now
in imap_commands.h
* plug-ins/imagemap/imap_commands.h: new file with command prototypes
* plug-ins/imagemap/Makefile.am: updated accordingly
2003-01-02 Michael Natterer <mitch@gimp.org>
* libgimpmodule/gimpmodule.[ch]: added GIMP_MODULE_ABI_VERSION
......
......@@ -34,67 +34,38 @@ imagemap_SOURCES = \
imap_circle.c \
imap_circle.h \
imap_cmd_clear.c \
imap_cmd_clear.h \
imap_cmd_copy.c \
imap_cmd_copy.h \
imap_cmd_copy_object.c \
imap_cmd_copy_object.h \
imap_cmd_create.c \
imap_cmd_create.h \
imap_cmd_cut.c \
imap_cmd_cut.h \
imap_cmd_cut_object.c \
imap_cmd_cut_object.h \
imap_cmd_delete.c \
imap_cmd_delete.h \
imap_cmd_delete_point.c \
imap_cmd_delete_point.h \
imap_cmd_edit_object.c \
imap_cmd_edit_object.h \
imap_cmd_gimp_guides.c \
imap_cmd_gimp_guides.h \
imap_cmd_guides.c \
imap_cmd_guides.h \
imap_cmd_insert_point.c \
imap_cmd_insert_point.h \
imap_cmd_move.c \
imap_cmd_move.h \
imap_cmd_move_down.c \
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 \
imap_cmd_paste.h \
imap_cmd_select.c \
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 \
imap_cmd_send_to_back.h \
imap_cmd_unselect.c \
imap_cmd_unselect.h \
imap_cmd_unselect_all.c \
imap_cmd_unselect_all.h \
imap_command.c \
imap_command.h \
imap_commands.h \
imap_csim_lex.c \
imap_csim_parse.c \
imap_csim_parse.h \
......
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,21 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_clear.h"
#include "imap_cmd_delete.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
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);
static CommandClass_t clear_command_class = {
NULL, /* clear_command_destruct */
clear_command_execute,
clear_command_undo,
clear_command_redo
NULL, /* clear_command_undo */
NULL /* clear_command_redo */
};
typedef struct {
......@@ -73,18 +69,5 @@ clear_command_execute(Command_t *parent)
object_list_delete_selected(command->list);
object_list_remove_remove_cb(command->list, id);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}
static void
clear_command_undo(Command_t *parent)
{
redraw_preview(); /* Fix me! */
}
static void
clear_command_redo(Command_t *parent)
{
redraw_preview(); /* Fix me! */
}
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CLEAR_H
#define _IMAP_CMD_CLEAR_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *clear_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_CLEAR_H */
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
......
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_COPY_H
#define _IMAP_CMD_COPY_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *copy_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_COPY_H */
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy_object.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
......
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_COPY_OBJECT_H
#define _IMAP_CMD_COPY_OBJECT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *copy_object_command_new(Object_t *obj);
#endif /* _IMAP_CMD_COPY_OBJECT_H */
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_create.h"
#include "imap_commands.h"
#include "imap_main.h"
......@@ -71,7 +71,6 @@ 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 CMD_APPEND;
}
......@@ -81,5 +80,4 @@ create_command_undo(Command_t *parent)
CreateCommand_t *command = (CreateCommand_t*) parent;
object_list_remove(command->list, command->obj);
object_list_set_changed(command->list, command->changed);
redraw_preview(); /* fix me! */
}
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CREATE_H
#define _IMAP_CMD_CREATE_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *create_command_new(ObjectList_t *list, Object_t *obj);
#endif /* _IMAP_CMD_CREATE_H */
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,22 +25,19 @@
#include <gtk/gtk.h>
#include "imap_cmd_delete.h"
#include "imap_cmd_cut.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static void cut_command_destruct(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);
static CommandClass_t cut_command_class = {
cut_command_destruct,
cut_command_execute,
cut_command_undo,
cut_command_redo
NULL /* cut_command_redo */
};
typedef struct {
......@@ -85,7 +82,6 @@ cut_command_execute(Command_t *parent)
object_list_cut(command->list);
object_list_remove_remove_cb(command->list, id);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}
......@@ -94,11 +90,4 @@ cut_command_undo(Command_t *parent)
{
CutCommand_t *command = (CutCommand_t*) parent;
object_list_copy(get_paste_buffer(), command->paste_buffer);
redraw_preview(); /* Fix me! */
}
static void
cut_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CUT_H
#define _IMAP_CMD_CUT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *cut_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_CUT_H */
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,22 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy_object.h"
#include "imap_cmd_cut_object.h"
#include "imap_cmd_delete.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
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);
static CommandClass_t cut_object_command_class = {
NULL, /* cut_object_command_destruct */
cut_object_command_execute,
cut_object_command_undo,
cut_object_command_redo
NULL, /* cut_object_command_undo */
NULL /* cut_object_command_redo */
};
typedef struct {
......@@ -64,18 +59,5 @@ cut_object_command_new(Object_t *obj)
static CmdExecuteValue_t
cut_object_command_execute(Command_t *parent)
{
redraw_preview(); /* fix me! */
return CMD_APPEND;
}
static void
cut_object_command_undo(Command_t *parent)
{
redraw_preview(); /* fix me! */
}
static void
cut_object_command_redo(Command_t *parent)
{
redraw_preview(); /* fix me! */
}
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CUT_OBJECT_H
#define _IMAP_CMD_CUT_OBJECT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *cut_object_command_new(Object_t *obj);
#endif /* _IMAP_CMD_CUT_OBJECT_H */
......@@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_delete.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
......
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_DELETE_H
#define _IMAP_CMD_DELETE_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *delete_command_new(ObjectList_t *list, Object_t *obj);
#endif /* _IMAP_CMD_DELETE_H */
......@@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_delete_point.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "imap_polygon.h"
#include "libgimp/stdplugins-intl.h"
......@@ -72,7 +71,6 @@ delete_point_command_execute(Command_t *parent)
g_free(p->data);
polygon->points = g_list_remove_link(polygon->points, p);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}
......
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_DELETE_POINT_H
#define _IMAP_CMD_DELETE_POINT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *delete_point_command_new(Object_t *obj, GdkPoint *point);
#endif /* _IMAP_CMD_DELETE_POINT_H */
......@@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_edit_object.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
......@@ -72,6 +71,4 @@ edit_object_command_undo(Command_t *parent)
object_assign(command->copy, command->obj);
object_assign(copy, command->copy);
redraw_preview(); /* Fix me! */
}
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_EDIT_OBJECT_H
#define _IMAP_CMD_EDIT_OBJECT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *edit_object_command_new(Object_t *obj);
#endif /* _IMAP_CMD_EDIT_OBJECT_H */
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -29,9 +29,8 @@
#include <libgimp/gimp.h>
#include "imap_cmd_create.h"
#include "imap_commands.h"
#include "imap_default_dialog.h"
#include "imap_cmd_gimp_guides.h"
#include "imap_main.h"
#include "imap_rectangle.h"
#include "imap_table.h"
......
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.