marked missing strings for localization (bug #136713).

2004-03-10  Sven Neumann  <sven@gimp.org>

	* plug-ins/imagemap/imap_object_popup.c: marked missing strings
	for localization (bug #136713).

	* plug-ins/imagemap/imap_stock.c (imap_stock_items): fixed bogus
	translation domain for stock item (bug #136713).
This commit is contained in:
Sven Neumann 2004-03-10 12:20:14 +00:00 committed by Sven Neumann
parent 991465bdaf
commit a240fed5cc
7 changed files with 94 additions and 53 deletions

View File

@ -1,3 +1,11 @@
2004-03-10 Sven Neumann <sven@gimp.org>
* plug-ins/imagemap/imap_object_popup.c: marked missing strings
for localization (bug #136713).
* plug-ins/imagemap/imap_stock.c (imap_stock_items): fixed bogus
translation domain for stock item (bug #136713).
2004-03-10 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/edit.pdb (edit_cut, edit_copy): added boolean

View File

@ -29,6 +29,9 @@
#include "imap_main.h"
#include "imap_object_popup.h"
#include "libgimp/stdplugins-intl.h"
/* Current object with popup menu */
static Object_t *_current_obj;
@ -58,7 +61,7 @@ popup_delete_area(GtkWidget *widget, gpointer data)
static void
popup_move_up(GtkWidget *widget, gpointer data)
{
Command_t *command = object_up_command_new(_current_obj->list,
Command_t *command = object_up_command_new(_current_obj->list,
_current_obj);
command_execute(command);
}
@ -92,23 +95,28 @@ popup_copy(GtkWidget *widget, gpointer data)
ObjectPopup_t*
make_object_popup(void)
{
ObjectPopup_t *popup = g_new(ObjectPopup_t, 1);
GtkWidget *menu;
ObjectPopup_t *popup = g_new (ObjectPopup_t, 1);
GtkWidget *menu;
popup->menu = menu = gtk_menu_new();
make_item_with_label(menu, "Edit Area Info...", popup_edit_area_info, NULL);
make_item_with_label(menu, "Delete Area", popup_delete_area, NULL);
popup->up = make_item_with_label(menu, "Move Up", popup_move_up, NULL);
popup->down = make_item_with_label(menu, "Move Down", popup_move_down,
NULL);
make_item_with_label(menu, "Cut", popup_cut, NULL);
make_item_with_label(menu, "Copy", popup_copy, NULL);
popup->menu = menu = gtk_menu_new ();
make_item_with_label (menu,
_("Edit Area Info..."), popup_edit_area_info, NULL);
make_item_with_label (menu,
_("Delete Area"), popup_delete_area, NULL);
popup->up = make_item_with_label (menu,
_("Move Up"), popup_move_up, NULL);
popup->down = make_item_with_label (menu,
_("Move Down"), popup_move_down, NULL);
make_item_with_label (menu,
_("Cut"), popup_cut, NULL);
make_item_with_label (menu,
_("Copy"), popup_copy, NULL);
return popup;
}
GtkWidget*
object_popup_prepend_menu(ObjectPopup_t *popup, gchar *label,
object_popup_prepend_menu(ObjectPopup_t *popup, gchar *label,
MenuCallback activate, gpointer data)
{
return prepend_item_with_label(popup->menu, label, activate, data);
@ -121,15 +129,15 @@ object_handle_popup(ObjectPopup_t *popup, Object_t *obj, GdkEventButton *event)
_current_obj = popup->obj = obj;
gtk_widget_set_sensitive(popup->up, (position > 1) ? TRUE : FALSE);
gtk_widget_set_sensitive(popup->down,
(position < g_list_length(obj->list->list))
gtk_widget_set_sensitive(popup->down,
(position < g_list_length(obj->list->list))
? TRUE : FALSE);
gtk_menu_popup(GTK_MENU(popup->menu), NULL, NULL, NULL, NULL,
event->button, event->time);
}
void
void
object_do_popup(Object_t *obj, GdkEventButton *event)
{
static ObjectPopup_t *popup;

View File

@ -124,29 +124,29 @@ create_main_popup_menu(void)
GtkWidget *popup_menu, *sub_menu;
GtkWidget *paste;
GSList *group;
_popup.main = popup_menu = gtk_menu_new();
make_item_with_image(popup_menu, IMAP_STOCK_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"));
_popup.arrow = make_radio_item(sub_menu, NULL, _("Arrow"), popup_arrow,
_popup.arrow = make_radio_item(sub_menu, NULL, _("Arrow"), popup_arrow,
NULL);
group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(_popup.arrow));
_popup.rectangle = make_radio_item(sub_menu, group, _("Rectangle"),
_popup.rectangle = make_radio_item(sub_menu, group, _("Rectangle"),
popup_rectangle, NULL);
group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(_popup.rectangle));
_popup.circle = make_radio_item(sub_menu, group, _("Circle"),
_popup.circle = make_radio_item(sub_menu, group, _("Circle"),
popup_circle, NULL);
group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(_popup.circle));
_popup.polygon = make_radio_item(sub_menu, group, _("Polygon"),
_popup.polygon = make_radio_item(sub_menu, group, _("Polygon"),
popup_polygon, NULL);
sub_menu = make_sub_menu(popup_menu, _("Zoom"));
_popup.zoom_in = make_item_with_image(sub_menu, GTK_STOCK_ZOOM_IN,
_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,
_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);
@ -155,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_image(popup_menu, GTK_STOCK_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);

View File

@ -41,42 +41,56 @@
#include "libgimp/stdplugins-intl.h"
static GtkStockItem imap_stock_items[] = {
{IMAP_STOCK_MAP_INFO, N_("Edit Map Info..."), 0, 0, "imap"},
static GtkStockItem imap_stock_items[] =
{
{ IMAP_STOCK_MAP_INFO,
N_("Edit Map Info..."), 0, 0, GETTEXT_PACKAGE "-std-plug-ins" },
};
static void
add_stock_icon(GtkIconFactory *factory, const gchar *stock_id,
const char **xpm_data)
add_stock_icon (GtkIconFactory *factory,
const gchar *stock_id,
const gchar **xpm_data)
{
GtkIconSet *icon_set;
GdkPixbuf *pixbuf;
pixbuf = gdk_pixbuf_new_from_xpm_data(xpm_data);
icon_set = gtk_icon_set_new_from_pixbuf(pixbuf);
gtk_icon_factory_add(factory, stock_id, icon_set);
g_object_unref(pixbuf);
gtk_icon_set_unref(icon_set);
pixbuf = gdk_pixbuf_new_from_xpm_data (xpm_data);
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
gtk_icon_factory_add (factory, stock_id, icon_set);
g_object_unref (pixbuf);
gtk_icon_set_unref (icon_set);
}
void
init_stock_icons(void)
init_stock_icons (void)
{
GtkIconFactory *factory = gtk_icon_factory_new();
GtkIconFactory *factory = gtk_icon_factory_new ();
add_stock_icon(factory, IMAP_STOCK_ARROW, (const char**) arrow_xpm);
add_stock_icon(factory, IMAP_STOCK_CIRCLE, (const char**) circle_xpm);
add_stock_icon(factory, IMAP_STOCK_COORD, (const char**) coord_xpm);
add_stock_icon(factory, IMAP_STOCK_DIMENSION, (const char**) dimension_xpm);
add_stock_icon(factory, IMAP_STOCK_JAVA, (const char**) java_xpm);
add_stock_icon(factory, IMAP_STOCK_LINK, (const char**) link_xpm);
add_stock_icon(factory, IMAP_STOCK_MAP_INFO, (const char**) map_info_xpm);
add_stock_icon(factory, IMAP_STOCK_POLYGON, (const char**) polygon_xpm);
add_stock_icon(factory, IMAP_STOCK_RECTANGLE, (const char**) rectangle_xpm);
add_stock_icon(factory, IMAP_STOCK_TO_BACK, (const char**) to_back_xpm);
add_stock_icon(factory, IMAP_STOCK_TO_FRONT, (const char**) to_front_xpm);
add_stock_icon (factory,
IMAP_STOCK_ARROW, (const gchar**) arrow_xpm);
add_stock_icon (factory,
IMAP_STOCK_CIRCLE, (const gchar**) circle_xpm);
add_stock_icon (factory,
IMAP_STOCK_COORD, (const gchar**) coord_xpm);
add_stock_icon (factory,
IMAP_STOCK_DIMENSION, (const gchar**) dimension_xpm);
add_stock_icon (factory,
IMAP_STOCK_JAVA, (const gchar**) java_xpm);
add_stock_icon (factory,
IMAP_STOCK_LINK, (const gchar**) link_xpm);
add_stock_icon (factory,
IMAP_STOCK_MAP_INFO, (const gchar**) map_info_xpm);
add_stock_icon (factory,
IMAP_STOCK_POLYGON, (const gchar**) polygon_xpm);
add_stock_icon (factory,
IMAP_STOCK_RECTANGLE, (const gchar**) rectangle_xpm);
add_stock_icon (factory,
IMAP_STOCK_TO_BACK, (const gchar**) to_back_xpm);
add_stock_icon (factory,
IMAP_STOCK_TO_FRONT, (const gchar**) to_front_xpm);
gtk_icon_factory_add_default(factory);
gtk_stock_add_static(imap_stock_items, G_N_ELEMENTS(imap_stock_items));
gtk_stock_add_static (imap_stock_items, G_N_ELEMENTS (imap_stock_items));
}

View File

@ -1,5 +1,7 @@
2004-03-10 Sven Neumann <sven@gimp.org>
* POTFILES.in: added missing file (bug #136713).
* de.po: minor updates.
2004-03-09 Sven Neumann <sven@gimp.org>

View File

@ -222,6 +222,7 @@ plug-ins/imagemap/imap_file.c
plug-ins/imagemap/imap_grid.c
plug-ins/imagemap/imap_main.c
plug-ins/imagemap/imap_menu.c
plug-ins/imagemap/imap_object_popup.c
plug-ins/imagemap/imap_polygon.c
plug-ins/imagemap/imap_popup.c
plug-ins/imagemap/imap_preferences.c

View File

@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: GIMP 1.3.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-03-10 12:38+0100\n"
"PO-Revision-Date: 2004-03-10 12:21+0100\n"
"POT-Creation-Date: 2004-03-10 12:55+0100\n"
"PO-Revision-Date: 2004-03-10 12:56+0100\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <gnome-de@gnome.org>\n"
"MIME-Version: 1.0\n"
@ -8479,6 +8479,7 @@ msgstr "Vordergrund"
#: plug-ins/gfig/gfig.c:2078 plug-ins/imagemap/imap_cmd_copy.c:54
#: plug-ins/imagemap/imap_cmd_copy_object.c:55
#: plug-ins/imagemap/imap_object_popup.c:113
#: plug-ins/imagemap/imap_toolbar.c:127
msgid "Copy"
msgstr "Kopieren"
@ -10149,6 +10150,7 @@ msgstr "Erzeugen"
#: plug-ins/imagemap/imap_cmd_cut.c:55
#: plug-ins/imagemap/imap_cmd_cut_object.c:51
#: plug-ins/imagemap/imap_object_popup.c:111
#: plug-ins/imagemap/imap_toolbar.c:124
msgid "Cut"
msgstr "Ausschneiden"
@ -10272,6 +10274,7 @@ msgstr "Punkt hinzufügen"
#: plug-ins/imagemap/imap_cmd_move_down.c:53
#: plug-ins/imagemap/imap_cmd_object_down.c:55
#: plug-ins/imagemap/imap_object_popup.c:109
#: plug-ins/imagemap/imap_selection.c:169
msgid "Move Down"
msgstr "Runter"
@ -10292,6 +10295,7 @@ msgstr "Nach vorne bringen"
#: plug-ins/imagemap/imap_cmd_move_up.c:53
#: plug-ins/imagemap/imap_cmd_object_up.c:55
#: plug-ins/imagemap/imap_object_popup.c:107
#: plug-ins/imagemap/imap_selection.c:165
msgid "Move Up"
msgstr "Rauf"
@ -10548,7 +10552,7 @@ msgstr "_Bearbeiten"
msgid "Deselect _All"
msgstr "_Alles abwählen"
#: plug-ins/imagemap/imap_menu.c:278
#: plug-ins/imagemap/imap_menu.c:278 plug-ins/imagemap/imap_object_popup.c:103
msgid "Edit Area Info..."
msgstr "Bereichs-Information bearbeiten..."
@ -10608,6 +10612,10 @@ msgstr "_Hilfe"
msgid "About ImageMap..."
msgstr "Info zu ImageMap..."
#: plug-ins/imagemap/imap_object_popup.c:105
msgid "Delete Area"
msgstr "Bereich löschen"
#: plug-ins/imagemap/imap_polygon.c:71
msgid "_Polygon"
msgstr "_Polygon"
@ -10776,7 +10784,7 @@ msgstr "Map-Datei Format"
msgid "View Source"
msgstr "Zeige Quelle"
#: plug-ins/imagemap/imap_stock.c:45
#: plug-ins/imagemap/imap_stock.c:47
msgid "Edit Map Info..."
msgstr "Bearbeite Map-Info..."