Commit 6c193c2f authored by Maurits Rijk's avatar Maurits Rijk

Further work to port Imagemap plug-in to GTK-2.0: enable mnemonics in dialogs...

Further work to port Imagemap plug-in to GTK-2.0: enable mnemonics in dialogs and menus and use stock icons wherever possible.
parent 4a7cb875
2002-06-02 Maurits Rijk <lpeek.mrijk@consunet.nl>
* plug-ins/imagemap/Makefile: added imap_stock.[ch]
* plug-ins/imagemap/imap_about.c: bumped version number to 2.0
* plug-ins/imagemap/imap_browse.[ch]: use GTK_STOCK_OPEN stock icon
* plug-ins/imagemap/imap_default_dialog.c: added apply stock icon
* plug-ins/imagemap/imap_popup.c
* plug-ins/imagemap/imap_selection.c
* plug-ins/imagemap/imap_menu.c
* plug-ins/imagemap/imap_menu_funcs.c: enable mnemonics in menus and
use stock icons whenever possible.
* plug-ins/imagemap/Makefile.am
* plug-ins/imagemap/copy.xpm
* plug-ins/imagemap/cut.xpm
* plug-ins/imagemap/paste.xpm
* plug-ins/imagemap/delete.xpm
* plug-ins/imagemap/undo.xpm
* plug-ins/imagemap/redo.xpm: removed since we now use stock icons.
2002-06-02 Maurits Rijk <lpeek.mrijk@consunet.nl>
* plug-ins/imagemap/Makefile.am: added imap_stock.[ch]
* plug-ins/imagemap/imap_circle.[ch]
* plug-ins/imagemap/imap_cmd_guides.[ch]
......
......@@ -10,23 +10,17 @@ EXTRA_DIST = @STRIP_BEGIN@ \
arrow_up.xpm \
circle.xpm \
coord.xpm \
copy.xpm \
cut.xpm \
delete.xpm \
dimension.xpm \
edit.xpm \
grid.xpm \
map_info.xpm \
open.xpm \
paste.xpm \
polygon.xpm \
preferences.xpm \
rectangle.xpm \
redo.xpm \
save.xpm \
to_back.xpm \
to_front.xpm \
undo.xpm \
zoom_in.xpm \
zoom_out.xpm \
ChangeLog \
......
/* XPM */
static char * copy_xpm[] = {
"16 16 4 1",
" c black",
". c None",
"X c blue",
"o c white",
" .....X..",
" oooooo ....X..",
" o o .XXXXX",
" oooooooo ...X..",
" o o ...X..",
" ooooo ..",
" o o oooooo .",
" ooooo o o ",
" o o oooooooo ",
" ooooo o o ",
" oooooooo ",
"...... o o ",
"...... oooooooo ",
"...... o o ",
"...... oooooooo ",
"...... "};
/* XPM */
static char * cut_xpm[] = {
"16 16 5 1",
" c None",
". c #808080",
"X c #000080",
"o c #7B0000",
"O c #670000",
" ",
" . . ",
" . . ",
" X X ",
" X. .X ",
" XX XX ",
" .X X. ",
" XXX ",
" .X. ",
" ooo ",
" o ooo ",
" ooo o Oo ",
" oO o o o ",
" o o oO o ",
" o Oo oo ",
" oo "};
/* XPM */
static char * delete_xpm[] = {
"16 16 86 1",
" c None",
". c #9D3E3E",
"+ c #882323",
"@ c #CC2F31",
"# c #642728",
"$ c #F57474",
"% c #F91F1F",
"& c #9F2D2E",
"* c #D76467",
"= c #F66D6D",
"- c #FEA9A9",
"; c #F41212",
"> c #6B3333",
", c #CA3739",
"' c #FE2C2C",
") c #F60203",
"! c #973338",
"~ c #DC3033",
"{ c #FD1111",
"] c #FE0D0D",
"^ c #FC0101",
"/ c #C20405",
"( c #3B1215",
"_ c #C91616",
": c #FE0101",
"< c #E90505",
"[ c #783E40",
"} c #E22627",
"| c #FF0000",
"1 c #FE0000",
"2 c #F30000",
"3 c #8E0004",
"4 c #360B36",
"5 c #CD1111",
"6 c #DD080A",
"7 c #E22020",
"8 c #DF0001",
"9 c #691417",
"0 c #D40405",
"a c #C10003",
"b c #500221",
"c c #760303",
"d c #F50000",
"e c #F40000",
"f c #C30003",
"g c #513740",
"h c #D90610",
"i c #DB000F",
"j c #D1000F",
"k c #CC0014",
"l c #A30A1A",
"m c #CF0017",
"n c #6E0010",
"o c #71323D",
"p c #B30221",
"q c #9F082B",
"r c #732233",
"s c #B7001F",
"t c #720016",
"u c #221E21",
"v c #AB3B7C",
"w c #97002E",
"x c #790A46",
"y c #980B35",
"z c #71021E",
"A c #271C21",
"B c #9A3474",
"C c #770333",
"D c #551530",
"E c #7A002A",
"F c #241218",
"G c #732962",
"H c #510549",
"I c #6C0D37",
"J c #351427",
"K c #2E3030",
"L c #582462",
"M c #73567D",
"N c #331926",
"O c #4E1A41",
"P c #1C1F20",
"Q c #3C0F56",
"R c #59415F",
"S c #524D52",
"T c #261333",
"U c #3A1753",
" ",
" .+ @ ",
" #$%& *=-;> ",
" ,')! ~{]^/( ",
" _:<[ }|1234 ",
" 51671|89 ",
" 0111ab ",
" cdefg ",
" hijk ",
" lmnopq ",
" rstu vwx ",
" yzA BC ",
" DEF GH ",
" IJK LM ",
" NOP Q ",
" RS TU "};
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* 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
......@@ -44,12 +44,12 @@ do_about_dialog(void)
default_dialog_hide_cancel_button(dialog);
default_dialog_hide_apply_button(dialog);
default_dialog_hide_help_button(dialog);
default_dialog_set_label(dialog, _("Imagemap plug-in 2.0"));
default_dialog_set_label(
dialog,
_("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 "));
dialog, _("Copyright(c) 1999 by Maurits Rijk"));
default_dialog_set_label(dialog, _("lpeek.mrijk@consunet.nl"));
default_dialog_set_label(
dialog, _(" Released under the GNU General Public License "));
}
default_dialog_show(dialog);
}
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* 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
......@@ -29,8 +29,7 @@
#include <gtk/gtk.h>
#include "imap_browse.h"
#include "open.xpm"
#include "imap_stock.h"
static GtkTargetEntry target_table[] = {
{"STRING", 0, 1 },
......@@ -69,8 +68,8 @@ browse_cb(GtkWidget *widget, gpointer data)
gtk_signal_connect_object(
GTK_OBJECT(GTK_FILE_SELECTION(dialog)->cancel_button),
"clicked", GTK_SIGNAL_FUNC(gtk_widget_hide), GTK_OBJECT(dialog));
gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dialog)->ok_button),
"clicked", GTK_SIGNAL_FUNC(select_cb), data);
g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(dialog)->ok_button),
"clicked", G_CALLBACK(select_cb), data);
}
gtk_widget_show(browse->file_selection);
}
......@@ -94,10 +93,7 @@ browse_widget_new(const gchar *name)
{
BrowseWidget_t *browse = g_new(BrowseWidget_t, 1);
GtkWidget *button;
GtkWidget *iconw;
GdkPixmap *icon;
GdkBitmap *mask;
GtkStyle *style;
GtkWidget *icon;
browse->file_selection = NULL;
browse->name = name;
......@@ -110,24 +106,19 @@ browse_widget_new(const gchar *name)
gtk_box_pack_start(GTK_BOX(browse->hbox), browse->file, TRUE, TRUE, 0);
gtk_drag_dest_set(browse->file, GTK_DEST_DEFAULT_ALL, target_table,
2, GDK_ACTION_COPY);
gtk_signal_connect(GTK_OBJECT(browse->file), "drag_data_received",
GTK_SIGNAL_FUNC(handle_drop), NULL);
g_signal_connect(G_OBJECT(browse->file), "drag_data_received",
G_CALLBACK(handle_drop), NULL);
gtk_widget_show(browse->file);
browse->button = button = gtk_button_new();
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);
icon = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(button), icon);
gtk_widget_show(icon);
gtk_box_pack_end(GTK_BOX(browse->hbox), button, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(browse_cb), (gpointer) browse);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(browse_cb), (gpointer) browse);
gtk_widget_show(button);
return browse;
......
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* 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
......
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2000 Maurits Rijk lpeek.mrijk@consunet.nl
* 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
......@@ -126,7 +126,7 @@ make_default_dialog(const gchar *title)
gtk_widget_grab_default(data->ok);
gtk_widget_show(data->ok);
data->apply = gtk_button_new_with_label(_("Apply"));
data->apply = gtk_button_new_from_stock(GTK_STOCK_APPLY);
GTK_WIDGET_SET_FLAGS(data->apply, GTK_CAN_DEFAULT);
g_signal_connect(G_OBJECT(data->apply), "clicked",
G_CALLBACK(dialog_apply), (gpointer) data);
......@@ -181,7 +181,7 @@ default_dialog_set_title(DefaultDialog_t *dialog, const gchar *title)
}
void
default_dialog_set_ok_sensitivity(DefaultDialog_t *dialog, gint sensitive)
default_dialog_set_ok_sensitivity(DefaultDialog_t *dialog, gboolean sensitive)
{
gtk_widget_set_sensitive(dialog->ok, sensitive);
}
......@@ -191,6 +191,6 @@ default_dialog_set_label(DefaultDialog_t *dialog, gchar *text)
{
GtkWidget *label = gtk_label_new(text);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog->dialog)->vbox), label,
TRUE, TRUE, 10);
TRUE, TRUE, 5);
gtk_widget_show(label);
}
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* 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
......@@ -44,6 +44,7 @@
#include "imap_preferences.h"
#include "imap_rectangle.h"
#include "imap_settings.h"
#include "imap_stock.h"
#include "imap_source.h"
#include "imap_tools.h"
......@@ -216,39 +217,35 @@ menu_grid(GtkWidget *widget, gpointer data)
static void
make_file_menu(GtkWidget *menu_bar)
{
GtkWidget *file_menu = make_menu_bar_item(menu_bar, _("File"));
GtkWidget *item;
GtkWidget *file_menu = make_menu_bar_item(menu_bar, _("_File"));
_menu.file_menu = file_menu;
item = make_item_with_label(file_menu, _("Open..."), menu_command,
&_menu.cmd_open);
add_accelerator(item, 'O', GDK_CONTROL_MASK);
item = make_item_with_label(file_menu, _("Save"), menu_command,
&_menu.cmd_save);
add_accelerator(item, 'S', GDK_CONTROL_MASK);
make_item_with_label(file_menu, _("Save As..."), menu_command,
make_item_with_image(file_menu, GTK_STOCK_OPEN, menu_command,
&_menu.cmd_open);
make_item_with_image(file_menu, GTK_STOCK_SAVE, menu_command,
&_menu.cmd_save);
make_item_with_image(file_menu, GTK_STOCK_SAVE_AS, menu_command,
&_menu.cmd_save_as);
make_separator(file_menu);
make_item_with_label(file_menu, _("Preferences..."), menu_command,
make_item_with_image(file_menu, GTK_STOCK_PREFERENCES, menu_command,
&_menu.cmd_preferences);
make_separator(file_menu);
item = make_item_with_label(file_menu, GTK_STOCK_CLOSE, menu_command,
&_menu.cmd_close);
add_accelerator(item, 'W', GDK_CONTROL_MASK);
item = make_item_with_label(file_menu, _("Quit"), menu_command,
&_menu.cmd_quit);
add_accelerator(item, 'Q', GDK_CONTROL_MASK);
make_item_with_image(file_menu, GTK_STOCK_CLOSE, menu_command,
&_menu.cmd_close);
make_item_with_image(file_menu, GTK_STOCK_QUIT, menu_command,
&_menu.cmd_quit);
}
static void
command_list_changed(Command_t *command, gpointer data)
{
gchar *scratch;
GtkWidget *icon;
/* Set undo entry */
if (_menu.undo)
gtk_widget_destroy(_menu.undo);
scratch = g_strdup_printf (_("Undo %s"),
scratch = g_strdup_printf (_("_Undo %s"),
command && command->name ? command->name : "");
_menu.undo = insert_item_with_label(_menu.edit_menu, 1, scratch,
menu_command, &_menu.cmd_undo);
......@@ -256,17 +253,25 @@ command_list_changed(Command_t *command, gpointer data)
add_accelerator(_menu.undo, 'Z', GDK_CONTROL_MASK);
gtk_widget_set_sensitive(_menu.undo, (command != NULL));
icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(_menu.undo), icon);
gtk_widget_show(icon);
/* Set redo entry */
command = command_list_get_redo_command();
if (_menu.redo)
gtk_widget_destroy(_menu.redo);
scratch = g_strdup_printf (_("Redo %s"),
scratch = g_strdup_printf (_("_Redo %s"),
command && command->name ? command->name : "");
_menu.redo = insert_item_with_label(_menu.edit_menu, 2, scratch,
menu_command, &_menu.cmd_redo);
g_free (scratch);
add_accelerator(_menu.redo, 'R', GDK_CONTROL_MASK);
gtk_widget_set_sensitive(_menu.redo, (command != NULL));
icon = gtk_image_new_from_stock(GTK_STOCK_REDO, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(_menu.redo), icon);
gtk_widget_show(icon);
}
static void
......@@ -284,28 +289,26 @@ paste_buffer_removed(Object_t *obj, gpointer data)
static void
make_edit_menu(GtkWidget *menu_bar)
{
GtkWidget *edit_menu = make_menu_bar_item(menu_bar, _("Edit"));
GtkWidget *edit_menu = make_menu_bar_item(menu_bar, _("_Edit"));
GtkWidget *item, *paste;
_menu.edit_menu = edit_menu;
command_list_changed(NULL, NULL);
make_separator(edit_menu);
_menu.cut = make_item_with_label(edit_menu, _("Cut"), menu_command,
_menu.cut = make_item_with_image(edit_menu, GTK_STOCK_CUT, menu_command,
&_menu.cmd_cut);
add_accelerator(_menu.cut, 'X', GDK_CONTROL_MASK);
_menu.copy = make_item_with_label(edit_menu, _("Copy"), menu_command,
_menu.copy = make_item_with_image(edit_menu, GTK_STOCK_COPY, menu_command,
&_menu.cmd_copy);
add_accelerator(_menu.copy, 'C', GDK_CONTROL_MASK);
paste = make_item_with_label(edit_menu, _("Paste"), menu_command,
paste = make_item_with_image(edit_menu, GTK_STOCK_PASTE, menu_command,
&_menu.cmd_paste);
add_accelerator(paste, 'V', GDK_CONTROL_MASK);
gtk_widget_set_sensitive(paste, FALSE);
item = make_item_with_label(edit_menu, _("Select All"), menu_command,
item = make_item_with_label(edit_menu, _("Select _All"), menu_command,
&_menu.cmd_select_all);
add_accelerator(item, 'A', GDK_CONTROL_MASK);
make_separator(edit_menu);
_menu.clear = make_item_with_label(edit_menu, _("Clear"), menu_command,
_menu.clear = make_item_with_image(edit_menu, GTK_STOCK_CLEAR, menu_command,
&_menu.cmd_clear);
add_accelerator(_menu.clear, 'K', GDK_CONTROL_MASK);
_menu.edit = make_item_with_label(edit_menu, _("Edit Area Info..."),
......@@ -320,7 +323,7 @@ make_edit_menu(GtkWidget *menu_bar)
static void
make_view_menu(GtkWidget *menu_bar)
{
GtkWidget *view_menu = make_menu_bar_item(menu_bar, _("View"));
GtkWidget *view_menu = make_menu_bar_item(menu_bar, _("_View"));
GtkWidget *zoom_menu, *item;
GSList *group = NULL;
......@@ -348,12 +351,10 @@ make_view_menu(GtkWidget *menu_bar)
make_separator(view_menu);
_menu.zoom_in = make_item_with_label(view_menu, _("Zoom In"), menu_command,
&_menu.cmd_zoom_in);
add_accelerator(_menu.zoom_in, '=', 0);
_menu.zoom_out = make_item_with_label(view_menu, _("Zoom Out"),
_menu.zoom_in = make_item_with_image(view_menu, GTK_STOCK_ZOOM_IN,
menu_command, &_menu.cmd_zoom_in);
_menu.zoom_out = make_item_with_image(view_menu, GTK_STOCK_ZOOM_OUT,
menu_command, &_menu.cmd_zoom_out);
add_accelerator(_menu.zoom_out, '-', 0);
gtk_widget_set_sensitive(_menu.zoom_out, FALSE);
zoom_menu = make_sub_menu(view_menu, _("Zoom To"));
......@@ -386,7 +387,7 @@ make_view_menu(GtkWidget *menu_bar)
static void
make_mapping_menu(GtkWidget *menu_bar)
{
GtkWidget *menu = make_menu_bar_item(menu_bar, _("Mapping"));
GtkWidget *menu = make_menu_bar_item(menu_bar, _("_Mapping"));
GSList *group;
_menu.arrow = make_radio_item(menu, NULL, _("Arrow"), menu_arrow, NULL);
......@@ -399,14 +400,14 @@ make_mapping_menu(GtkWidget *menu_bar)
_menu.polygon = make_radio_item(menu, group, _("Polygon"), menu_polygon,
NULL);
make_separator(menu);
make_item_with_label(menu, _("Edit Map Info..."), menu_command,
make_item_with_image(menu, IMAP_STOCK_MAP_INFO, menu_command,
&_menu.cmd_edit_map_info);
}
static void
make_goodies_menu(GtkWidget *menu_bar)
{
GtkWidget *goodies_menu = make_menu_bar_item(menu_bar, _("Goodies"));
GtkWidget *goodies_menu = make_menu_bar_item(menu_bar, _("_Goodies"));
_menu.grid = make_check_item(goodies_menu, _("Grid"), menu_grid, NULL);
make_item_with_label(goodies_menu, _("Grid Settings..."), menu_command,
&_menu.cmd_grid_settings);
......@@ -417,7 +418,7 @@ make_goodies_menu(GtkWidget *menu_bar)
static void
make_help_menu(GtkWidget *menu_bar)
{
GtkWidget *help_menu = make_menu_bar_item(menu_bar, _("Help"));
GtkWidget *help_menu = make_menu_bar_item(menu_bar, _("_Help"));
gtk_menu_item_right_justify(GTK_MENU_ITEM(gtk_menu_get_attach_widget(
GTK_MENU(help_menu))));
make_item_with_label(help_menu, _("About ImageMap..."), menu_command,
......
......@@ -68,7 +68,7 @@ GtkWidget*
make_item_with_label(GtkWidget *parent, gchar *label, MenuCallback activate,
gpointer data)
{
return append_active_item(parent, gtk_menu_item_new_with_label(label),
return append_active_item(parent, gtk_menu_item_new_with_mnemonic(label),
activate, data);
}
......@@ -86,7 +86,7 @@ GtkWidget*
prepend_item_with_label(GtkWidget *parent, gchar *label,
MenuCallback activate, gpointer data)
{
GtkWidget *item = gtk_menu_item_new_with_label(label);
GtkWidget *item = gtk_menu_item_new_with_mnemonic(label);
gtk_menu_shell_prepend(GTK_MENU_SHELL(parent), item);
g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(activate), data);
gtk_widget_show(item);
......@@ -98,7 +98,7 @@ GtkWidget*
insert_item_with_label(GtkWidget *parent, gint position, gchar *label,
MenuCallback activate, gpointer data)
{
GtkWidget *item = gtk_image_menu_item_new_with_label(label);
GtkWidget *item = gtk_image_menu_item_new_with_mnemonic(label);
gtk_menu_shell_insert(GTK_MENU_SHELL(parent), item, position);
g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(activate), data);
gtk_widget_show(item);
......@@ -110,17 +110,18 @@ GtkWidget*
make_check_item(GtkWidget *parent, gchar *label, MenuCallback activate,
gpointer data)
{
return append_active_item(parent, gtk_check_menu_item_new_with_label(label),
activate, data);
return append_active_item(
parent, gtk_check_menu_item_new_with_mnemonic(label),
activate, data);
}
GtkWidget*
make_radio_item(GtkWidget *parent, GSList *group, gchar *label,
MenuCallback activate, gpointer data)
{
return append_active_item(parent,
gtk_radio_menu_item_new_with_label(group, label),
activate, data);
return append_active_item(
parent, gtk_radio_menu_item_new_with_mnemonic(group, label),
activate, data);
}
void
......@@ -143,7 +144,7 @@ make_sub_menu(GtkWidget *parent, gchar *label)
GtkWidget *sub_menu = gtk_menu_new();
GtkWidget *item;
item = append_item(parent, gtk_menu_item_new_with_label(label));
item = append_item(parent, gtk_menu_item_new_with_mnemonic(label));
gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), sub_menu);
return sub_menu;
......@@ -153,7 +154,7 @@ GtkWidget*
make_menu_bar_item(GtkWidget *menu_bar, gchar *label)
{
GtkWidget *menu = gtk_menu_new();
GtkWidget *item = gtk_menu_item_new_with_label(label);
GtkWidget *item = gtk_menu_item_new_with_mnemonic(label);
GtkWidget *tearoff = gtk_tearoff_menu_item_new();
gtk_menu_shell_insert(GTK_MENU_SHELL(menu), tearoff, 0);
......
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* 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
......@@ -31,6 +31,7 @@
#include "imap_menu.h"
#include "imap_menu_funcs.h"
#include "imap_popup.h"
#include "imap_stock.h"
#include "imap_tools.h"
#include "libgimp/stdplugins-intl.h"
......@@ -125,7 +126,8 @@ create_main_popup_menu(void)
GSList *group;
_popup.main = popup_menu = gtk_menu_new();
make_item_with_label(popup_menu, _("Map Info..."), menu_command,
make_item_with_image(popup_menu, IMAP_STOCK_MAP_INFO, menu_command,
&_popup.cmd_edit_map_info);
sub_menu = make_sub_menu(popup_menu, _("Tools"));
......@@ -142,10 +144,10 @@ create_main_popup_menu(void)
popup_polygon, NULL);
sub_menu = make_sub_menu(popup_menu, _("Zoom"));
_popup.zoom_in = make_item_with_label(sub_menu, _("In"), menu_command,
&_popup.cmd_zoom_in);
_popup.zoom_out = make_item_with_label(sub_menu, _("Out"), menu_command,
&_popup.cmd_zoom_out);
_popup.zoom_in = make_item_with_image(sub_menu, GTK_STOCK_ZOOM_IN,
menu_command, &_popup.cmd_zoom_in);
_popup.zoom_out = make_item_with_image(sub_menu, GTK_STOCK_ZOOM_OUT,
menu_command, &_popup.cmd_zoom_out);
gtk_widget_set_sensitive(_popup.zoom_out, FALSE);
_popup.grid = make_check_item(popup_menu, _("Grid"), popup_grid, NULL);
......@@ -153,7 +155,7 @@ create_main_popup_menu(void)
&_popup.cmd_grid_settings);
make_item_with_label(popup_menu, _("Guides..."), menu_command,
&_popup.cmd_create_guides);
paste = make_item_with_label(popup_menu, _("Paste"), menu_command,
paste = make_item_with_image(popup_menu, GTK_STOCK_PASTE, menu_command,
&_popup.cmd_paste);
gtk_widget_set_sensitive(paste, FALSE);
paste_buffer_add_add_cb(paste_buffer_added, (gpointer) paste);
......
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* 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
......@@ -45,8 +45,6 @@
#include "arrow_up.xpm"
#include "arrow_down.xpm"
#include "delete.xpm"
#include "edit.xpm"
static void
set_buttons(Selection_t *data)
......@@ -177,13 +175,13 @@ make_selection_toolbar(Selection_t *data, GtkWidget *window)
selection_command,
&data->cmd_move_down);
gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
data->edit = make_toolbar_icon(toolbar, window, edit_xpm, "Edit",
_("Edit"), selection_command,
&data->cmd_edit);
data->edit = make_toolbar_stock_icon(toolbar, GTK_STOCK_PROPERTIES,
"Edit", _("Edit"), selection_command,
&data->cmd_edit);
gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
data->remove = make_toolbar_icon(toolbar, window, delete_xpm, "Delete",
_("Delete"), selection_command,
&data->cmd_delete);
data->remove = make_toolbar_stock_icon(toolbar, GTK_STOCK_DELETE, "Delete",
_("Delete"), selection_command,
&data->cmd_delete);
gtk_widget_show(toolbar);
......
/* XPM */
static char * paste_xpm[] = {
"16 16 5 1",
" c None",
". c black",
"X c blue",
"o c white",
"O c #9A9A94949494",
" . XXX ",
" .o. X ",
".....o.o.... X ",
".OO.ooooo.O. X ",
".O........O. XXX",
".OOOOOOOOOO. X ",
".OOOOOOOOOO. ",
".OOOOOO....... ",
".OOOOOO.ooooo.. ",
".OOOOOO.o...o...",
".OOOOOO.ooooooo.",
".OOOOOO.o.....o.",
"........ooooooo.",
" .o.....o.",
" .ooooooo.",
" ........."};
/* XPM */
static char * redo_xpm[] = {
"16 16 2 1",