From dc5da262a3d30dc87a0f991e5b804103188a1ad6 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sun, 7 May 2000 22:04:51 +0000 Subject: [PATCH] in Image/Filters move all entries that are not submenus to the top of the * app/menus.c: in Image/Filters move all entries that are not submenus to the top of the menu. * app/plug_in.c: order all plugin menu-entries alphabetically (in the current locale) before sending them to menus.c. * plug-ins/script-fu/script-fu-scripts.c: order all script-fu menu-entries alphabetically (in the current locale) before registering them. * plug-ins/script-fu/script-fu.c: minor cleanups * plug-ins/bmp/bmpread.c * plug-ins/bmp/bmpwrite.c * plug-ins/xjt/xjt.c: strings used with g_message do not need a trailing newline --Sven --- ChangeLog | 23 + app/actions/plug-in-commands.c | 131 +++-- app/gui/menus.c | 35 +- app/gui/plug-in-commands.c | 131 +++-- app/gui/plug-in-menus.c | 131 +++-- app/menus.c | 35 +- app/menus/menus.c | 35 +- app/menus/plug-in-menus.c | 131 +++-- app/plug-in/gimpplugin-message.c | 131 +++-- app/plug-in/gimpplugin-progress.c | 131 +++-- app/plug-in/gimpplugin.c | 131 +++-- app/plug-in/gimppluginmanager-call.c | 131 +++-- app/plug-in/gimppluginmanager-run.c | 131 +++-- app/plug-in/gimppluginmanager.c | 131 +++-- app/plug-in/gimppluginshm.c | 131 +++-- app/plug-in/plug-in-def.c | 131 +++-- app/plug-in/plug-in-message.c | 131 +++-- app/plug-in/plug-in-params.c | 131 +++-- app/plug-in/plug-in-progress.c | 131 +++-- app/plug-in/plug-in-run.c | 131 +++-- app/plug-in/plug-in-shm.c | 131 +++-- app/plug-in/plug-in.c | 131 +++-- app/plug-in/plug-ins.c | 131 +++-- app/plug_in.c | 131 +++-- app/widgets/gimpitemfactory.c | 35 +- plug-ins/bmp/bmpread.c | 14 +- plug-ins/bmp/bmpwrite.c | 4 +- plug-ins/script-fu/script-fu-interface.c | 154 ++++-- plug-ins/script-fu/script-fu-scripts.c | 154 ++++-- plug-ins/script-fu/script-fu.c | 5 +- plug-ins/xjt/xjt.c | 4 +- po-plug-ins/ChangeLog | 4 + po-plug-ins/de.po | 621 +++++++++++++++-------- po-script-fu/ChangeLog | 4 + po-script-fu/de.po | 6 +- tips/gimp_tips.de.txt | 4 +- 36 files changed, 2415 insertions(+), 1342 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28f98532f8..0f638221ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2000-05-07 Sven Neumann + + * app/menus.c: in Image/Filters move all entries that are not + submenus to the top of the menu. + + * app/plug_in.c: order all plugin menu-entries alphabetically + (in the current locale) before sending them to menus.c. This does + not yet work perfectly since gimp-perl i18n seems to be broken + (at least on my box). This was already the case _before_ this + change and I have checked carefully, that the gimp-perl domain + gets passed through to menus_create_item_...() correctly. + + * plug-ins/script-fu/script-fu-scripts.c: order all script-fu + menu-entries alphabetically (in the current locale) before + registering them. + + * plug-ins/script-fu/script-fu.c: minor cleanups + + * plug-ins/bmp/bmpread.c + * plug-ins/bmp/bmpwrite.c + * plug-ins/xjt/xjt.c: strings used with g_message do not need + a trailing newline + 2000-05-07 Michael Natterer * app/app_procs.c diff --git a/app/actions/plug-in-commands.c b/app/actions/plug-in-commands.c index 0c5a833bd6..1567091246 100644 --- a/app/actions/plug-in-commands.c +++ b/app/actions/plug-in-commands.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/gui/menus.c b/app/gui/menus.c index a5f566fd21..d3bbf33eb6 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -557,8 +557,6 @@ static GimpItemFactoryEntry image_entries[] = NULL, NULL }, { { N_("/Filters/Toys"), NULL, NULL, 0, "" }, NULL, NULL }, - /* /Script-Fu */ - }; static guint n_image_entries = (sizeof (image_entries) / sizeof (image_entries[0])); @@ -1020,11 +1018,31 @@ menus_reorder_plugins (void) } } - /* Move "/Filters/Filter all Layers..." before the separator */ + /* Move all menu items under "/Filters" which are not submenus or + * separators to the top of the menu + */ + pos = 3; menu_item = gtk_item_factory_get_widget (image_factory, "/Filters/Filter all Layers..."); - if (menu_item && menu_item->parent) - gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, 3); + if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent)) + { + menu = menu_item->parent; + + for (list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); list; + list = g_list_next (list)) + { + menu_item = GTK_WIDGET (list->data); + + if (! GTK_MENU_ITEM (menu_item)->submenu && + GTK_IS_LABEL (GTK_BIN (menu_item)->child)) + { + gtk_menu_reorder_child (GTK_MENU (menu_item->parent), + menu_item, pos); + list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); + pos++; + } + } + } /* Reorder Rotate plugin menu entries */ pos = 2; @@ -1145,6 +1163,9 @@ menus_tools_create (ToolInfo *tool_info) { GimpItemFactoryEntry entry; + if (tool_info->menu_path == NULL) + return; + entry.entry.path = tool_info->menu_path; entry.entry.accelerator = tool_info->menu_accel; entry.entry.callback = tools_select_cmd_callback; @@ -1642,9 +1663,7 @@ menus_init (void) for (i = 0; i < num_tools; i++) { - /* FIXME this need to use access functions to check a flag */ - if (tool_info[i].menu_path) - menus_tools_create (&tool_info[i]); + menus_tools_create (&tool_info[i]); } /* reorder /Image/Colors */ diff --git a/app/gui/plug-in-commands.c b/app/gui/plug-in-commands.c index 0c5a833bd6..1567091246 100644 --- a/app/gui/plug-in-commands.c +++ b/app/gui/plug-in-commands.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/gui/plug-in-menus.c b/app/gui/plug-in-menus.c index 0c5a833bd6..1567091246 100644 --- a/app/gui/plug-in-menus.c +++ b/app/gui/plug-in-menus.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/menus.c b/app/menus.c index a5f566fd21..d3bbf33eb6 100644 --- a/app/menus.c +++ b/app/menus.c @@ -557,8 +557,6 @@ static GimpItemFactoryEntry image_entries[] = NULL, NULL }, { { N_("/Filters/Toys"), NULL, NULL, 0, "" }, NULL, NULL }, - /* /Script-Fu */ - }; static guint n_image_entries = (sizeof (image_entries) / sizeof (image_entries[0])); @@ -1020,11 +1018,31 @@ menus_reorder_plugins (void) } } - /* Move "/Filters/Filter all Layers..." before the separator */ + /* Move all menu items under "/Filters" which are not submenus or + * separators to the top of the menu + */ + pos = 3; menu_item = gtk_item_factory_get_widget (image_factory, "/Filters/Filter all Layers..."); - if (menu_item && menu_item->parent) - gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, 3); + if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent)) + { + menu = menu_item->parent; + + for (list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); list; + list = g_list_next (list)) + { + menu_item = GTK_WIDGET (list->data); + + if (! GTK_MENU_ITEM (menu_item)->submenu && + GTK_IS_LABEL (GTK_BIN (menu_item)->child)) + { + gtk_menu_reorder_child (GTK_MENU (menu_item->parent), + menu_item, pos); + list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); + pos++; + } + } + } /* Reorder Rotate plugin menu entries */ pos = 2; @@ -1145,6 +1163,9 @@ menus_tools_create (ToolInfo *tool_info) { GimpItemFactoryEntry entry; + if (tool_info->menu_path == NULL) + return; + entry.entry.path = tool_info->menu_path; entry.entry.accelerator = tool_info->menu_accel; entry.entry.callback = tools_select_cmd_callback; @@ -1642,9 +1663,7 @@ menus_init (void) for (i = 0; i < num_tools; i++) { - /* FIXME this need to use access functions to check a flag */ - if (tool_info[i].menu_path) - menus_tools_create (&tool_info[i]); + menus_tools_create (&tool_info[i]); } /* reorder /Image/Colors */ diff --git a/app/menus/menus.c b/app/menus/menus.c index a5f566fd21..d3bbf33eb6 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -557,8 +557,6 @@ static GimpItemFactoryEntry image_entries[] = NULL, NULL }, { { N_("/Filters/Toys"), NULL, NULL, 0, "" }, NULL, NULL }, - /* /Script-Fu */ - }; static guint n_image_entries = (sizeof (image_entries) / sizeof (image_entries[0])); @@ -1020,11 +1018,31 @@ menus_reorder_plugins (void) } } - /* Move "/Filters/Filter all Layers..." before the separator */ + /* Move all menu items under "/Filters" which are not submenus or + * separators to the top of the menu + */ + pos = 3; menu_item = gtk_item_factory_get_widget (image_factory, "/Filters/Filter all Layers..."); - if (menu_item && menu_item->parent) - gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, 3); + if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent)) + { + menu = menu_item->parent; + + for (list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); list; + list = g_list_next (list)) + { + menu_item = GTK_WIDGET (list->data); + + if (! GTK_MENU_ITEM (menu_item)->submenu && + GTK_IS_LABEL (GTK_BIN (menu_item)->child)) + { + gtk_menu_reorder_child (GTK_MENU (menu_item->parent), + menu_item, pos); + list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); + pos++; + } + } + } /* Reorder Rotate plugin menu entries */ pos = 2; @@ -1145,6 +1163,9 @@ menus_tools_create (ToolInfo *tool_info) { GimpItemFactoryEntry entry; + if (tool_info->menu_path == NULL) + return; + entry.entry.path = tool_info->menu_path; entry.entry.accelerator = tool_info->menu_accel; entry.entry.callback = tools_select_cmd_callback; @@ -1642,9 +1663,7 @@ menus_init (void) for (i = 0; i < num_tools; i++) { - /* FIXME this need to use access functions to check a flag */ - if (tool_info[i].menu_path) - menus_tools_create (&tool_info[i]); + menus_tools_create (&tool_info[i]); } /* reorder /Image/Colors */ diff --git a/app/menus/plug-in-menus.c b/app/menus/plug-in-menus.c index 0c5a833bd6..1567091246 100644 --- a/app/menus/plug-in-menus.c +++ b/app/menus/plug-in-menus.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/gimpplugin-message.c +++ b/app/plug-in/gimpplugin-message.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/gimpplugin-progress.c b/app/plug-in/gimpplugin-progress.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/gimpplugin-progress.c +++ b/app/plug-in/gimpplugin-progress.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/gimpplugin.c +++ b/app/plug-in/gimpplugin.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/gimppluginmanager-call.c +++ b/app/plug-in/gimppluginmanager-call.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/gimppluginmanager-run.c b/app/plug-in/gimppluginmanager-run.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/gimppluginmanager-run.c +++ b/app/plug-in/gimppluginmanager-run.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/gimppluginmanager.c b/app/plug-in/gimppluginmanager.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/gimppluginmanager.c +++ b/app/plug-in/gimppluginmanager.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/gimppluginshm.c b/app/plug-in/gimppluginshm.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/gimppluginshm.c +++ b/app/plug-in/gimppluginshm.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-in-def.c b/app/plug-in/plug-in-def.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-in-def.c +++ b/app/plug-in/plug-in-def.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-in-message.c b/app/plug-in/plug-in-message.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-in-message.c +++ b/app/plug-in/plug-in-message.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-in-params.c +++ b/app/plug-in/plug-in-params.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-in-progress.c b/app/plug-in/plug-in-progress.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-in-progress.c +++ b/app/plug-in/plug-in-progress.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-in-run.c b/app/plug-in/plug-in-run.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-in-run.c +++ b/app/plug-in/plug-in-run.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-in-shm.c b/app/plug-in/plug-in-shm.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-in-shm.c +++ b/app/plug-in/plug-in-shm.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-in.c b/app/plug-in/plug-in.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-in.c +++ b/app/plug-in/plug-in.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug-in/plug-ins.c b/app/plug-in/plug-ins.c index 0c5a833bd6..1567091246 100644 --- a/app/plug-in/plug-ins.c +++ b/app/plug-in/plug-ins.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/plug_in.c b/app/plug_in.c index 0c5a833bd6..1567091246 100644 --- a/app/plug_in.c +++ b/app/plug_in.c @@ -109,6 +109,15 @@ struct _PlugInBlocked }; +typedef struct _PlugInMenuEntry PlugInMenuEntry; + +struct _PlugInMenuEntry +{ + PlugInProcDef *proc_def; + gchar *domain; +}; + + static gboolean plug_in_write (GIOChannel *channel, guint8 *buf, gulong count); @@ -131,6 +140,9 @@ static void plug_in_query (gchar *filename, PlugInDef *plug_in_def); static void plug_in_add_to_db (void); static void plug_in_make_menu (void); +static gint plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar); static void plug_in_callback (GtkWidget *widget, gpointer client_data); static void plug_in_proc_def_insert (PlugInProcDef *proc_def, @@ -1726,8 +1738,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) PlugInDef *plug_in_def = NULL; PlugInProcDef *proc_def; ProcRecord *proc = NULL; + PlugInMenuEntry *menu_entry; GSList *tmp = NULL; - GimpItemFactoryEntry entry; gchar *prog = NULL; gboolean add_proc_def; gint i; @@ -1879,7 +1891,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_def->image_types = g_strdup (proc_install->image_types); proc_def->image_types_val = plug_in_image_types_parse (proc_def->image_types); /* Install temp one use todays time */ - proc_def->mtime = time(NULL); + proc_def->mtime = time (NULL); proc = &proc_def->db_info; @@ -1924,7 +1936,8 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) case PDB_TEMPORARY: if (add_proc_def) - current_plug_in->temp_proc_defs = g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); + current_plug_in->temp_proc_defs = + g_slist_prepend (current_plug_in->temp_proc_defs, proc_def); proc_defs = g_slist_append (proc_defs, proc_def); proc->exec_method.temporary.plug_in = (void *) current_plug_in; @@ -1933,32 +1946,21 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) /* If there is a menu path specified, create a menu entry */ if (proc_install->menu_path) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_install->menu_path; - entry.entry.accelerator = NULL; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; /* Below we use a hack to allow translations of Script-Fu paths. Would be nice if we could solve this properly, but I haven't found a way yet ... (Sven) */ - if (plug_in_def && plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc); + menu_entry->domain = plug_in_def->locale_domain; else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0) - menus_create_item_from_full_path (&entry, "gimp-script-fu", proc); + menu_entry->domain = "gimp-script-fu"; else - menus_create_item_from_full_path (&entry, std_plugins_domain, proc); + menu_entry->domain = std_plugins_domain; + + /* plug_in_make_menu_entry frees the menu_entry for us */ + plug_in_make_menu_entry (NULL, menu_entry, NULL); } break; } @@ -2379,20 +2381,62 @@ plug_in_add_to_db (void) } } +/* + * The following function has to be a GTraverseFunction, + * but is also called directly. Please note that it frees the + * menu_entry strcuture. --Sven + */ +static gint +plug_in_make_menu_entry (gpointer foo, + PlugInMenuEntry *menu_entry, + gpointer bar) +{ + GimpItemFactoryEntry entry; + gchar *help_page; + + help_page = g_strconcat ("filters/", + g_basename (menu_entry->proc_def->prog), + ".html", + NULL); + g_strdown (help_page); + + entry.entry.path = menu_entry->proc_def->menu_path; + entry.entry.accelerator = menu_entry->proc_def->accelerator; + entry.entry.callback = plug_in_callback; + entry.entry.callback_action = 0; + entry.entry.item_type = NULL; + entry.help_page = help_page; + entry.description = NULL; + + menus_create_item_from_full_path (&entry, + menu_entry->domain, + &menu_entry->proc_def->db_info); + g_free (menu_entry); + + return FALSE; +} + static void plug_in_make_menu (void) { - GimpItemFactoryEntry entry; - PlugInDef *plug_in_def; - PlugInProcDef *proc_def; + PlugInDef *plug_in_def; + PlugInProcDef *proc_def; + PlugInMenuEntry *menu_entry; GSList *domains = NULL; GSList *procs; GSList *tmp; + GTree *menu_entries; #ifdef ENABLE_NLS bindtextdomain (std_plugins_domain, LOCALEDIR); domains = g_slist_append (domains, std_plugins_domain); -#endif +#endif + +#ifdef ENABLE_NLS + menu_entries = g_tree_new ((GCompareFunc)strcoll); +#else + menu_entries = g_tree_new ((GCompareFunc)strcmp); +#endif tmp = plug_in_defs; while (tmp) @@ -2440,31 +2484,22 @@ plug_in_make_menu (void) !proc_def->prefixes && !proc_def->magics)) { - gchar *help_page; - - help_page = g_strconcat ("filters/", - g_basename (proc_def->prog), - ".html", - NULL); - g_strdown (help_page); - - entry.entry.path = proc_def->menu_path; - entry.entry.accelerator = proc_def->accelerator; - entry.entry.callback = plug_in_callback; - entry.entry.callback_action = 0; - entry.entry.item_type = NULL; - entry.help_page = help_page; - entry.description = NULL; - - if (plug_in_def->locale_domain) - menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, - &proc_def->db_info); - else - menus_create_item_from_full_path (&entry, std_plugins_domain, - &proc_def->db_info); + menu_entry = g_new (PlugInMenuEntry, 1); + menu_entry->proc_def = proc_def; + menu_entry->domain = plug_in_def->locale_domain ? + plug_in_def->locale_domain : std_plugins_domain; + + g_tree_insert (menu_entries, + dgettext (menu_entry->domain, proc_def->menu_path), + menu_entry); } } } + + g_tree_traverse (menu_entries, + (GTraverseFunc)plug_in_make_menu_entry, G_IN_ORDER, NULL); + g_tree_destroy (menu_entries); + g_slist_free (domains); } diff --git a/app/widgets/gimpitemfactory.c b/app/widgets/gimpitemfactory.c index a5f566fd21..d3bbf33eb6 100644 --- a/app/widgets/gimpitemfactory.c +++ b/app/widgets/gimpitemfactory.c @@ -557,8 +557,6 @@ static GimpItemFactoryEntry image_entries[] = NULL, NULL }, { { N_("/Filters/Toys"), NULL, NULL, 0, "" }, NULL, NULL }, - /* /Script-Fu */ - }; static guint n_image_entries = (sizeof (image_entries) / sizeof (image_entries[0])); @@ -1020,11 +1018,31 @@ menus_reorder_plugins (void) } } - /* Move "/Filters/Filter all Layers..." before the separator */ + /* Move all menu items under "/Filters" which are not submenus or + * separators to the top of the menu + */ + pos = 3; menu_item = gtk_item_factory_get_widget (image_factory, "/Filters/Filter all Layers..."); - if (menu_item && menu_item->parent) - gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, 3); + if (menu_item && menu_item->parent && GTK_IS_MENU (menu_item->parent)) + { + menu = menu_item->parent; + + for (list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); list; + list = g_list_next (list)) + { + menu_item = GTK_WIDGET (list->data); + + if (! GTK_MENU_ITEM (menu_item)->submenu && + GTK_IS_LABEL (GTK_BIN (menu_item)->child)) + { + gtk_menu_reorder_child (GTK_MENU (menu_item->parent), + menu_item, pos); + list = g_list_nth (GTK_MENU_SHELL (menu)->children, pos); + pos++; + } + } + } /* Reorder Rotate plugin menu entries */ pos = 2; @@ -1145,6 +1163,9 @@ menus_tools_create (ToolInfo *tool_info) { GimpItemFactoryEntry entry; + if (tool_info->menu_path == NULL) + return; + entry.entry.path = tool_info->menu_path; entry.entry.accelerator = tool_info->menu_accel; entry.entry.callback = tools_select_cmd_callback; @@ -1642,9 +1663,7 @@ menus_init (void) for (i = 0; i < num_tools; i++) { - /* FIXME this need to use access functions to check a flag */ - if (tool_info[i].menu_path) - menus_tools_create (&tool_info[i]); + menus_tools_create (&tool_info[i]); } /* reorder /Image/Colors */ diff --git a/plug-ins/bmp/bmpread.c b/plug-ins/bmp/bmpread.c index 2e24cbe75a..727aad6603 100644 --- a/plug-ins/bmp/bmpread.c +++ b/plug-ins/bmp/bmpread.c @@ -61,7 +61,7 @@ ReadBMP (gchar *name) if (!fd) { - g_message (_("%s: can't open \"%s\"\n"), prog_name, filename); + g_message (_("%s: can't open \"%s\""), prog_name, filename); return -1; } @@ -69,7 +69,7 @@ ReadBMP (gchar *name) if (!ReadOK(fd, buffer, 18) || (strncmp(buffer,"BM",2))) { - g_message (_("%s: %s is not a valid BMP file\n"), prog_name, filename); + g_message (_("%s: %s is not a valid BMP file"), prog_name, filename); return -1; } @@ -87,7 +87,7 @@ ReadBMP (gchar *name) { if (!ReadOK (fd, buffer, 8)) { - g_message (_("%s: error reading BMP file header\n"), prog_name); + g_message (_("%s: error reading BMP file header"), prog_name); return -1; } @@ -101,7 +101,7 @@ ReadBMP (gchar *name) { if (!ReadOK (fd, buffer, Bitmap_File_Head.biSize - 4)) { - g_message (_("%s: error reading BMP file header\n"), prog_name); + g_message (_("%s: error reading BMP file header"), prog_name); return -1; } Bitmap_Head.biWidth =ToL (&buffer[0x00]); /* 12 */ @@ -121,7 +121,7 @@ ReadBMP (gchar *name) { if (!ReadOK (fd, buffer, Bitmap_File_Head.biSize - 4)) { - g_message (_("%s: error reading BMP file header\n"), prog_name); + g_message (_("%s: error reading BMP file header"), prog_name); return -1; } Bitmap_Head.biWidth =ToL (&buffer[0x00]); /* 12 */ @@ -139,7 +139,7 @@ ReadBMP (gchar *name) } else { - g_message (_("%s: error reading BMP file header\n"), prog_name); + g_message (_("%s: error reading BMP file header"), prog_name); return -1; } @@ -227,7 +227,7 @@ ReadColorMap (FILE *fd, { if (!ReadOK (fd, rgb, size)) { - g_message (_("%s: bad colormap\n"), prog_name); + g_message (_("%s: bad colormap"), prog_name); return -1; } diff --git a/plug-ins/bmp/bmpwrite.c b/plug-ins/bmp/bmpwrite.c index c46a03574c..edb720aca6 100644 --- a/plug-ins/bmp/bmpwrite.c +++ b/plug-ins/bmp/bmpwrite.c @@ -101,7 +101,7 @@ WriteBMP (gchar *filename, case INDEXED_IMAGE: break; default: - g_message(_("bmp: cannot operate on unknown image types or alpha images")); + g_message(_("BMP: cannot operate on unknown image types or alpha images")); return STATUS_EXECUTION_ERROR; break; } @@ -164,7 +164,7 @@ WriteBMP (gchar *filename, outfile = fopen (filename, "wb"); if (!outfile) { - g_message (_("can't open %s\n"), filename); + g_message (_("Can't open %s"), filename); return STATUS_EXECUTION_ERROR; } diff --git a/plug-ins/script-fu/script-fu-interface.c b/plug-ins/script-fu/script-fu-interface.c index 12be40a01e..6ff538b2db 100644 --- a/plug-ins/script-fu/script-fu-interface.c +++ b/plug-ins/script-fu/script-fu-interface.c @@ -147,6 +147,7 @@ typedef struct SFArgValue *arg_defaults; SFArgValue *arg_values; gint32 image_based; + GParamDef *args; /* used only temporary until installed */ } SFScript; typedef struct @@ -164,6 +165,12 @@ extern long nlength (LISP obj); * Local Functions */ +static gint script_fu_install_script (gpointer foo, + SFScript *script, + gpointer bar); +static gint script_fu_remove_script (gpointer foo, + SFScript *script, + gpointer bar); static void script_fu_script_proc (gchar *name, gint nparams, GParam *params, @@ -245,7 +252,7 @@ static gboolean current_command_enabled = FALSE; static gint command_count = 0; static gint consec_command_count = 0; static gchar *last_command = NULL; -static GList *script_list = NULL; +static GTree *script_list = NULL; extern gchar siod_err_msg[]; @@ -273,22 +280,17 @@ script_fu_find_scripts (void) /* Make sure to clear any existing scripts */ if (script_list != NULL) { - GList *list; - SFScript *script; - - list = script_list; - while (list) - { - script = (SFScript *) list->data; - script_fu_free_script (script); - list = list->next; - } - - if (script_list) - g_list_free (script_list); - script_list = NULL; + g_tree_traverse (script_list, + (GTraverseFunc)script_fu_remove_script, G_IN_ORDER, NULL); + g_tree_destroy (script_list); } +#ifdef ENABLE_NLS + script_list = g_tree_new ((GCompareFunc)strcoll); +#else + script_list = g_tree_new ((GCompareFunc)strcmp); +#endif + return_vals = gimp_run_procedure ("gimp_gimprc_query", &nreturn_vals, PARAM_STRING, "script-fu-path", @@ -381,17 +383,21 @@ script_fu_find_scripts (void) token = strtok (NULL, G_SEARCHPATH_SEPARATOR_S); } /* while */ - g_free(local_path); + g_free (local_path); } gimp_destroy_params (return_vals, nreturn_vals); + + /* now that all scripts are read in and sorted, tell gimp about them */ + g_tree_traverse (script_list, + (GTraverseFunc)script_fu_install_script, G_IN_ORDER, NULL); } LISP script_fu_add_script (LISP a) { - SFScript *script; GParamDef *args; + SFScript *script; gchar *val; gint i; guchar color[3]; @@ -400,7 +406,6 @@ script_fu_add_script (LISP a) LISP brush_list; LISP option_list; gchar *s; - gchar *menu_path = NULL; /* Check the length of a */ if (nlength (a) < 7) @@ -428,10 +433,6 @@ script_fu_add_script (LISP a) script->description = g_strdup (val); a = cdr (a); - /* Allow scripts with no menus */ - if (strncmp (val, "", 6) != 0) - menu_path = script->description; - /* Find the script help */ val = get_c_string (car (a)); script->help = g_strdup (val); @@ -475,7 +476,7 @@ script_fu_add_script (LISP a) script->args_widgets = NULL; script->arg_types = g_new (SFArgType, script->num_args); - script->arg_labels = g_new (char *, script->num_args); + script->arg_labels = g_new (gchar *, script->num_args); script->arg_defaults = g_new0 (SFArgValue, script->num_args); script->arg_values = g_new0 (SFArgValue, script->num_args); @@ -682,7 +683,6 @@ script_fu_add_script (LISP a) * in the values area. We could free it later but the * default one must hang around. */ - script->arg_values[i].sfa_brush.name = g_strdup(script->arg_defaults[i].sfa_brush.name); args[i + 1].type = PARAM_STRING; @@ -729,22 +729,8 @@ script_fu_add_script (LISP a) } } - gimp_install_temp_proc (script->pdb_name, - script->description, - script->help, - script->author, - script->copyright, - script->date, - menu_path, - script->img_types, - PROC_TEMPORARY, - script->num_args + 1, 0, - args, NULL, - script_fu_script_proc); - - g_free (args); - - script_list = g_list_append (script_list, script); + script->args = args; + g_tree_insert (script_list, gettext (script->description), script); return NIL; } @@ -780,6 +766,55 @@ script_fu_report_cc (gchar *command) gdk_flush (); } + +/* + * The following function is a GTraverseFunction, Please + * note that it frees the script->args strcuture. --Sven + */ +static gint +script_fu_install_script (gpointer foo, + SFScript *script, + gpointer bar) +{ + gchar *menu_path = NULL; + + /* Allow scripts with no menus */ + if (strncmp (script->description, "", 6) != 0) + menu_path = script->description; + + gimp_install_temp_proc (script->pdb_name, + script->description, + script->help, + script->author, + script->copyright, + script->date, + menu_path, + script->img_types, + PROC_TEMPORARY, + script->num_args + 1, 0, + script->args, NULL, + script_fu_script_proc); + g_free (script->args); + script->args = NULL; + + return FALSE; +} + +/* + * The following function is a GTraverseFunction. + */ +static gint +script_fu_remove_script (gpointer foo, + SFScript *script, + gpointer bar) +{ + script_fu_free_script (script); + + return FALSE; +} + + + static void script_fu_script_proc (gchar *name, gint nparams, @@ -970,23 +1005,34 @@ script_fu_script_proc (gchar *name, values[0].data.d_status = status; } +/* this is a GTraverseFunction */ +static gint +script_fu_lookup_script (gpointer *foo, + SFScript *script, + gchar **name) +{ + if (strcmp (script->pdb_name, *name) == 0) + { + /* store the script in the name pointer and stop the traversal */ + *name = (gchar *)script; + return TRUE; + } + else + return FALSE; +} + static SFScript * script_fu_find_script (gchar *pdb_name) { - GList *list; - SFScript *script; - - list = script_list; - while (list) - { - script = (SFScript *) list->data; - if (! strcmp (script->pdb_name, pdb_name)) - return script; - - list = list->next; - } - - return NULL; + gchar *script; + + script = pdb_name; + g_tree_traverse (script_list, + (GTraverseFunc)script_fu_lookup_script, G_IN_ORDER, &script); + if (script == pdb_name) + return NULL; + else + return (SFScript *)script; } static void diff --git a/plug-ins/script-fu/script-fu-scripts.c b/plug-ins/script-fu/script-fu-scripts.c index 12be40a01e..6ff538b2db 100644 --- a/plug-ins/script-fu/script-fu-scripts.c +++ b/plug-ins/script-fu/script-fu-scripts.c @@ -147,6 +147,7 @@ typedef struct SFArgValue *arg_defaults; SFArgValue *arg_values; gint32 image_based; + GParamDef *args; /* used only temporary until installed */ } SFScript; typedef struct @@ -164,6 +165,12 @@ extern long nlength (LISP obj); * Local Functions */ +static gint script_fu_install_script (gpointer foo, + SFScript *script, + gpointer bar); +static gint script_fu_remove_script (gpointer foo, + SFScript *script, + gpointer bar); static void script_fu_script_proc (gchar *name, gint nparams, GParam *params, @@ -245,7 +252,7 @@ static gboolean current_command_enabled = FALSE; static gint command_count = 0; static gint consec_command_count = 0; static gchar *last_command = NULL; -static GList *script_list = NULL; +static GTree *script_list = NULL; extern gchar siod_err_msg[]; @@ -273,22 +280,17 @@ script_fu_find_scripts (void) /* Make sure to clear any existing scripts */ if (script_list != NULL) { - GList *list; - SFScript *script; - - list = script_list; - while (list) - { - script = (SFScript *) list->data; - script_fu_free_script (script); - list = list->next; - } - - if (script_list) - g_list_free (script_list); - script_list = NULL; + g_tree_traverse (script_list, + (GTraverseFunc)script_fu_remove_script, G_IN_ORDER, NULL); + g_tree_destroy (script_list); } +#ifdef ENABLE_NLS + script_list = g_tree_new ((GCompareFunc)strcoll); +#else + script_list = g_tree_new ((GCompareFunc)strcmp); +#endif + return_vals = gimp_run_procedure ("gimp_gimprc_query", &nreturn_vals, PARAM_STRING, "script-fu-path", @@ -381,17 +383,21 @@ script_fu_find_scripts (void) token = strtok (NULL, G_SEARCHPATH_SEPARATOR_S); } /* while */ - g_free(local_path); + g_free (local_path); } gimp_destroy_params (return_vals, nreturn_vals); + + /* now that all scripts are read in and sorted, tell gimp about them */ + g_tree_traverse (script_list, + (GTraverseFunc)script_fu_install_script, G_IN_ORDER, NULL); } LISP script_fu_add_script (LISP a) { - SFScript *script; GParamDef *args; + SFScript *script; gchar *val; gint i; guchar color[3]; @@ -400,7 +406,6 @@ script_fu_add_script (LISP a) LISP brush_list; LISP option_list; gchar *s; - gchar *menu_path = NULL; /* Check the length of a */ if (nlength (a) < 7) @@ -428,10 +433,6 @@ script_fu_add_script (LISP a) script->description = g_strdup (val); a = cdr (a); - /* Allow scripts with no menus */ - if (strncmp (val, "", 6) != 0) - menu_path = script->description; - /* Find the script help */ val = get_c_string (car (a)); script->help = g_strdup (val); @@ -475,7 +476,7 @@ script_fu_add_script (LISP a) script->args_widgets = NULL; script->arg_types = g_new (SFArgType, script->num_args); - script->arg_labels = g_new (char *, script->num_args); + script->arg_labels = g_new (gchar *, script->num_args); script->arg_defaults = g_new0 (SFArgValue, script->num_args); script->arg_values = g_new0 (SFArgValue, script->num_args); @@ -682,7 +683,6 @@ script_fu_add_script (LISP a) * in the values area. We could free it later but the * default one must hang around. */ - script->arg_values[i].sfa_brush.name = g_strdup(script->arg_defaults[i].sfa_brush.name); args[i + 1].type = PARAM_STRING; @@ -729,22 +729,8 @@ script_fu_add_script (LISP a) } } - gimp_install_temp_proc (script->pdb_name, - script->description, - script->help, - script->author, - script->copyright, - script->date, - menu_path, - script->img_types, - PROC_TEMPORARY, - script->num_args + 1, 0, - args, NULL, - script_fu_script_proc); - - g_free (args); - - script_list = g_list_append (script_list, script); + script->args = args; + g_tree_insert (script_list, gettext (script->description), script); return NIL; } @@ -780,6 +766,55 @@ script_fu_report_cc (gchar *command) gdk_flush (); } + +/* + * The following function is a GTraverseFunction, Please + * note that it frees the script->args strcuture. --Sven + */ +static gint +script_fu_install_script (gpointer foo, + SFScript *script, + gpointer bar) +{ + gchar *menu_path = NULL; + + /* Allow scripts with no menus */ + if (strncmp (script->description, "", 6) != 0) + menu_path = script->description; + + gimp_install_temp_proc (script->pdb_name, + script->description, + script->help, + script->author, + script->copyright, + script->date, + menu_path, + script->img_types, + PROC_TEMPORARY, + script->num_args + 1, 0, + script->args, NULL, + script_fu_script_proc); + g_free (script->args); + script->args = NULL; + + return FALSE; +} + +/* + * The following function is a GTraverseFunction. + */ +static gint +script_fu_remove_script (gpointer foo, + SFScript *script, + gpointer bar) +{ + script_fu_free_script (script); + + return FALSE; +} + + + static void script_fu_script_proc (gchar *name, gint nparams, @@ -970,23 +1005,34 @@ script_fu_script_proc (gchar *name, values[0].data.d_status = status; } +/* this is a GTraverseFunction */ +static gint +script_fu_lookup_script (gpointer *foo, + SFScript *script, + gchar **name) +{ + if (strcmp (script->pdb_name, *name) == 0) + { + /* store the script in the name pointer and stop the traversal */ + *name = (gchar *)script; + return TRUE; + } + else + return FALSE; +} + static SFScript * script_fu_find_script (gchar *pdb_name) { - GList *list; - SFScript *script; - - list = script_list; - while (list) - { - script = (SFScript *) list->data; - if (! strcmp (script->pdb_name, pdb_name)) - return script; - - list = list->next; - } - - return NULL; + gchar *script; + + script = pdb_name; + g_tree_traverse (script_list, + (GTraverseFunc)script_fu_lookup_script, G_IN_ORDER, &script); + if (script == pdb_name) + return NULL; + else + return (SFScript *)script; } static void diff --git a/plug-ins/script-fu/script-fu.c b/plug-ins/script-fu/script-fu.c index a7d41dfe24..eaa169dbe4 100644 --- a/plug-ins/script-fu/script-fu.c +++ b/plug-ins/script-fu/script-fu.c @@ -337,7 +337,6 @@ init_procedures (void) convert_string (proc_name); /* create a new scheme func that calls gimp-proc-db-call */ - for (j = 0; j < nparams; j++) { arg_name = g_strdup (params[j].name); @@ -516,7 +515,9 @@ marshall_proc_db_call (LISP a) /* Make sure there are arguments */ if (a == NIL) - return my_err ("Procedure database argument marshaller was called with no arguments. The procedure to be executed and the arguments it requires (possibly none) must be specified.", NIL); + return my_err ("Procedure database argument marshaller was called with no arguments. " + "The procedure to be executed and the arguments it requires " + "(possibly none) must be specified.", NIL); /* Derive the pdb procedure name from the argument or first argument of a list */ if (TYPEP (a, tc_cons)) diff --git a/plug-ins/xjt/xjt.c b/plug-ins/xjt/xjt.c index 852f10d509..008ab1c79c 100644 --- a/plug-ins/xjt/xjt.c +++ b/plug-ins/xjt/xjt.c @@ -1644,7 +1644,7 @@ save_xjt_image (gchar *filename, l_fp_prp = fopen(l_prop_file, "w"); if(l_fp_prp == NULL) { - g_message (_("Can't open : %s"), l_prop_file); + g_message (_("Can't open: %s"), l_prop_file); goto cleanup; } @@ -3121,7 +3121,7 @@ t_image_props * p_load_prop_file(gchar *prop_filename) } if(l_filesize == 0) { - g_message(_("Error, XJT propertyfile %s is empty"), prop_filename); + g_message(_("Error: XJT propertyfile %s is empty"), prop_filename); goto cleanup; } diff --git a/po-plug-ins/ChangeLog b/po-plug-ins/ChangeLog index 82c3de450b..68313d8c9b 100644 --- a/po-plug-ins/ChangeLog +++ b/po-plug-ins/ChangeLog @@ -1,3 +1,7 @@ +2000-05-07 Sven Neumann + + * de.po: updated german translation + 2000-05-07 Michael Natterer * da.po: made it compile. diff --git a/po-plug-ins/de.po b/po-plug-ins/de.po index 56dea44ae2..7948951290 100644 --- a/po-plug-ins/de.po +++ b/po-plug-ins/de.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: GIMP 1.1.21\n" -"POT-Creation-Date: 2000-05-03 12:33+0200\n" -"PO-Revision-Date: 2000-05-03 12:35+02:00\n" +"POT-Creation-Date: 2000-05-07 23:28+0200\n" +"PO-Revision-Date: 2000-05-07 23:33+02:00\n" "Last-Translator: Sven Neumann \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -44,7 +44,7 @@ msgstr " #: plug-ins/FractalExplorer/FractalExplorer.c:850 #: plug-ins/FractalExplorer/FractalExplorer.c:1476 #: plug-ins/Lighting/lighting_ui.c:1076 plug-ins/MapObject/mapobject_ui.c:1383 -#: plug-ins/bmp/bmpwrite.c:562 plug-ins/common/CML_explorer.c:1174 +#: plug-ins/bmp/bmpwrite.c:564 plug-ins/common/CML_explorer.c:1174 #: plug-ins/common/CML_explorer.c:1932 plug-ins/common/CML_explorer.c:2252 #: plug-ins/common/aa.c:346 plug-ins/common/align_layers.c:425 #: plug-ins/common/apply_lens.c:392 plug-ins/common/blinds.c:323 @@ -97,8 +97,8 @@ msgstr " #: plug-ins/fits/fits.c:987 plug-ins/flame/flame.c:624 #: plug-ins/flame/flame.c:913 plug-ins/fp/fp_gtk.c:895 #: plug-ins/gap/gap_arr_dialog.c:768 plug-ins/gap/gap_arr_dialog.c:1010 -#: plug-ins/gap/gap_decode_xanim.c:177 plug-ins/gap/gap_lib.c:215 -#: plug-ins/gap/gap_mod_layer.c:145 plug-ins/gap/gap_mov_dialog.c:452 +#: plug-ins/gap/gap_decode_xanim.c:177 plug-ins/gap/gap_lib.c:221 +#: plug-ins/gap/gap_mod_layer.c:145 plug-ins/gap/gap_mov_dialog.c:469 #: plug-ins/gap/gap_mpege.c:191 plug-ins/gap/gap_resi_dialog.c:149 #: plug-ins/gdyntext/gdyntext_ui.c:201 plug-ins/gdyntext/gdyntext_ui.c:621 #: plug-ins/gfig/gfig.c:4088 plug-ins/gfig/gfig.c:4433 @@ -126,7 +126,7 @@ msgstr "OK" #: plug-ins/FractalExplorer/FractalExplorer.c:859 #: plug-ins/FractalExplorer/FractalExplorer.c:1478 #: plug-ins/Lighting/lighting_ui.c:1078 plug-ins/MapObject/mapobject_ui.c:1385 -#: plug-ins/bmp/bmpwrite.c:564 plug-ins/common/CML_explorer.c:1176 +#: plug-ins/bmp/bmpwrite.c:566 plug-ins/common/CML_explorer.c:1176 #: plug-ins/common/CML_explorer.c:2254 plug-ins/common/aa.c:348 #: plug-ins/common/align_layers.c:427 plug-ins/common/apply_lens.c:394 #: plug-ins/common/blinds.c:325 plug-ins/common/blur.c:615 @@ -182,16 +182,16 @@ msgstr "OK" #: plug-ins/gap/gap_dbbrowser_utils.c:211 #: plug-ins/gap/gap_decode_mpeg_main.c:336 plug-ins/gap/gap_decode_xanim.c:175 #: plug-ins/gap/gap_decode_xanim.c:340 plug-ins/gap/gap_filter_foreach.c:132 -#: plug-ins/gap/gap_lib.c:1012 plug-ins/gap/gap_mod_layer.c:147 -#: plug-ins/gap/gap_mod_layer.c:261 plug-ins/gap/gap_mov_dialog.c:472 -#: plug-ins/gap/gap_mpege.c:189 plug-ins/gap/gap_mpege.c:240 -#: plug-ins/gap/gap_range_ops.c:1204 plug-ins/gap/gap_resi_dialog.c:158 -#: plug-ins/gfig/gfig.c:3941 plug-ins/gfig/gfig.c:4088 -#: plug-ins/gfig/gfig.c:4435 plug-ins/gfig/gfig.c:4518 -#: plug-ins/gfig/gfig.c:5070 plug-ins/gflare/gflare.c:2467 -#: plug-ins/gflare/gflare.c:3376 plug-ins/gflare/gflare.c:3477 -#: plug-ins/gfli/gfli.c:835 plug-ins/gfli/gfli.c:904 -#: plug-ins/gimpressionist/gimpressionist.c:496 +#: plug-ins/gap/gap_lib.c:1018 plug-ins/gap/gap_mod_layer.c:147 +#: plug-ins/gap/gap_mod_layer.c:261 plug-ins/gap/gap_mov_dialog.c:500 +#: plug-ins/gap/gap_mov_dialog.c:2740 plug-ins/gap/gap_mpege.c:189 +#: plug-ins/gap/gap_mpege.c:240 plug-ins/gap/gap_range_ops.c:1204 +#: plug-ins/gap/gap_resi_dialog.c:158 plug-ins/gfig/gfig.c:3941 +#: plug-ins/gfig/gfig.c:4088 plug-ins/gfig/gfig.c:4435 +#: plug-ins/gfig/gfig.c:4518 plug-ins/gfig/gfig.c:5070 +#: plug-ins/gflare/gflare.c:2467 plug-ins/gflare/gflare.c:3376 +#: plug-ins/gflare/gflare.c:3477 plug-ins/gfli/gfli.c:835 +#: plug-ins/gfli/gfli.c:904 plug-ins/gimpressionist/gimpressionist.c:496 #: plug-ins/gimpressionist/orientmap.c:640 #: plug-ins/gimpressionist/presets.c:400 plug-ins/gimpressionist/sizemap.c:499 #: plug-ins/ifscompose/ifscompose.c:788 @@ -275,7 +275,7 @@ msgstr "Kosinus" #: plug-ins/common/align_layers.c:452 plug-ins/common/align_layers.c:485 #: plug-ins/common/ps.c:2640 plug-ins/common/ps.c:2653 #: plug-ins/common/psp.c:445 plug-ins/common/tiff.c:1501 -#: plug-ins/fits/fits.c:1032 plug-ins/gap/gap_mov_dialog.c:276 +#: plug-ins/fits/fits.c:1032 plug-ins/gap/gap_mov_dialog.c:284 msgid "None" msgstr "Kein" @@ -1097,7 +1097,7 @@ msgstr "Position" #: plug-ins/MapObject/mapobject_ui.c:1084 plug-ins/common/flarefx.c:720 #: plug-ins/common/nova.c:469 plug-ins/common/papertile.c:285 #: plug-ins/flame/flame.c:1182 plug-ins/flame/flame.c:1195 -#: plug-ins/gap/gap_mov_dialog.c:1557 plug-ins/gflare/gflare.c:2874 +#: plug-ins/gap/gap_mov_dialog.c:1855 plug-ins/gflare/gflare.c:2874 #: plug-ins/ifscompose/ifscompose.c:512 msgid "X:" msgstr "X:" @@ -1114,7 +1114,7 @@ msgstr "X-Koordinate der Lichtquelle im XYZ-Raum" #: plug-ins/MapObject/mapobject_ui.c:1093 #: plug-ins/MapObject/mapobject_ui.c:1189 plug-ins/common/flarefx.c:738 #: plug-ins/common/nova.c:487 plug-ins/common/papertile.c:294 -#: plug-ins/common/xbm.c:1219 plug-ins/gap/gap_mov_dialog.c:1575 +#: plug-ins/common/xbm.c:1219 plug-ins/gap/gap_mov_dialog.c:1873 #: plug-ins/gflare/gflare.c:2878 plug-ins/ifscompose/ifscompose.c:526 msgid "Y:" msgstr "Y:" @@ -1253,7 +1253,7 @@ msgstr "Umgebungs-Bild:" #. Options section #: plug-ins/Lighting/lighting_ui.c:1014 plug-ins/MapObject/mapobject_ui.c:1314 #: plug-ins/common/lic.c:1037 plug-ins/common/ripple.c:604 -#: plug-ins/gfig/gfig.c:4018 +#: plug-ins/gap/gap_mov_dialog.c:841 plug-ins/gfig/gfig.c:4018 msgid "Options" msgstr "Einstellungen" @@ -1460,7 +1460,7 @@ msgstr "Zeige/Verberge Vorschau-Drahtgitter" #. memory mapped file data #. must check file size -#: plug-ins/bmp/bmpread.c:54 plug-ins/common/CEL.c:266 +#: plug-ins/bmp/bmpread.c:52 plug-ins/common/CEL.c:266 #: plug-ins/common/gbr.c:281 plug-ins/common/gifload.c:306 #: plug-ins/common/hrz.c:338 plug-ins/common/jpeg.c:745 #: plug-ins/common/pat.c:261 plug-ins/common/pcx.c:301 @@ -1476,35 +1476,30 @@ msgstr "Zeige/Verberge Vorschau-Drahtgitter" msgid "Loading %s:" msgstr "Öffne %s:" -#: plug-ins/bmp/bmpread.c:66 +#: plug-ins/bmp/bmpread.c:64 #, c-format -msgid "%s: can't open \"%s\"\n" -msgstr "%s: kann \"%s\" nicht öffnen\n" +msgid "%s: can't open \"%s\"" +msgstr "%s: kann \"%s\" nicht öffnen" -#: plug-ins/bmp/bmpread.c:74 +#: plug-ins/bmp/bmpread.c:72 #, c-format -msgid "%s: not a valid BMP file %s\n" -msgstr "%s: keine gültige BMP-Datei %s\n" +msgid "%s: %s is not a valid BMP file" +msgstr "%s: %s ist keine gültige BMP-Datei" -#: plug-ins/bmp/bmpread.c:82 plug-ins/bmp/bmpread.c:99 -#: plug-ins/bmp/bmpread.c:109 plug-ins/bmp/bmpread.c:132 +#: plug-ins/bmp/bmpread.c:90 plug-ins/bmp/bmpread.c:104 +#: plug-ins/bmp/bmpread.c:124 plug-ins/bmp/bmpread.c:142 #, c-format -msgid "%s: error reading BMP file header\n" -msgstr "%s: Fehler beim Lesen des BMP-headers\n" +msgid "%s: error reading BMP file header" +msgstr "%s: Fehler beim Lesen des BMP-headers" -#: plug-ins/bmp/bmpread.c:155 +#: plug-ins/bmp/bmpread.c:230 #, c-format -msgid "%s: too many colors: %u\n" -msgstr "%s: zu viele Farben: %u\n" - -#: plug-ins/bmp/bmpread.c:245 -#, c-format -msgid "%s: bad colormap\n" -msgstr "%s: fehlerhafte Palette\n" +msgid "%s: bad colormap" +msgstr "%s: fehlerhafte Palette" #. Create an indexed-alpha layer to hold the image... -#: plug-ins/bmp/bmpread.c:298 plug-ins/bmp/bmpread.c:307 -#: plug-ins/bmp/bmpread.c:314 plug-ins/common/CEL.c:304 +#: plug-ins/bmp/bmpread.c:274 plug-ins/bmp/bmpread.c:281 +#: plug-ins/bmp/bmpread.c:288 plug-ins/common/CEL.c:304 #: plug-ins/common/blinds.c:380 plug-ins/common/compose.c:543 #: plug-ins/common/decompose.c:445 plug-ins/common/film.c:1006 #: plug-ins/common/gbr.c:343 plug-ins/common/gifload.c:850 @@ -1525,13 +1520,13 @@ msgid "Background" msgstr "Hintergrund" #: plug-ins/bmp/bmpwrite.c:104 -msgid "bmp: cannot operate on unknown image types or alpha images" -msgstr "bmp: kann nicht mit unbekannten Bild-typen oder Alpha-Bildern arbeiten" +msgid "BMP: cannot operate on unknown image types or alpha images" +msgstr "BMP: kann nicht mit unbekannten Bild-typen oder Alpha-Bildern arbeiten" #: plug-ins/bmp/bmpwrite.c:167 #, c-format -msgid "can't open %s\n" -msgstr "kann %s nicht öffnen\n" +msgid "Can't open %s" +msgstr "Kann %s nicht öffnen" #. init the progress meter #: plug-ins/bmp/bmpwrite.c:179 plug-ins/common/CEL.c:510 @@ -1551,16 +1546,16 @@ msgstr "kann %s nicht msgid "Saving %s:" msgstr "Sichere %s:" -#: plug-ins/bmp/bmpwrite.c:557 +#: plug-ins/bmp/bmpwrite.c:559 msgid "Save as BMP" msgstr "Als BMP sichern" #. parameter settings -#: plug-ins/bmp/bmpwrite.c:574 +#: plug-ins/bmp/bmpwrite.c:576 msgid "Save Options" msgstr "Sicherungs-Einstellungen" -#: plug-ins/bmp/bmpwrite.c:582 +#: plug-ins/bmp/bmpwrite.c:584 msgid "RLE encoded" msgstr "RLE kodiert (komprimiert)" @@ -1794,7 +1789,7 @@ msgstr "Zufallszahlen von init-Zahl, gemeinsam" #: plug-ins/common/CML_explorer.c:299 plug-ins/common/CML_explorer.c:1280 #: plug-ins/common/decompose.c:122 plug-ins/common/lic.c:1058 #: plug-ins/fp/fp_gtk.c:281 plug-ins/fp/fp_gtk.c:413 -#: plug-ins/gap/gap_mov_dialog.c:249 plug-ins/gimpressionist/orientation.c:188 +#: plug-ins/gap/gap_mov_dialog.c:257 plug-ins/gimpressionist/orientation.c:188 #: plug-ins/gimpressionist/size.c:186 msgid "Hue" msgstr "Farbton" @@ -1802,13 +1797,13 @@ msgstr "Farbton" #: plug-ins/common/CML_explorer.c:300 plug-ins/common/CML_explorer.c:1285 #: plug-ins/common/decompose.c:123 plug-ins/common/lic.c:1059 #: plug-ins/fp/fp_gtk.c:285 plug-ins/fp/fp_gtk.c:417 plug-ins/fp/fp_gtk.c:481 -#: plug-ins/gap/gap_mov_dialog.c:250 plug-ins/rcm/rcm_dialog.c:509 +#: plug-ins/gap/gap_mov_dialog.c:258 plug-ins/rcm/rcm_dialog.c:509 msgid "Saturation" msgstr "Sättigung" #: plug-ins/common/CML_explorer.c:301 plug-ins/common/CML_explorer.c:1290 #: plug-ins/common/decompose.c:124 plug-ins/fp/fp_gtk.c:289 -#: plug-ins/fp/fp_gtk.c:421 plug-ins/gap/gap_mov_dialog.c:252 +#: plug-ins/fp/fp_gtk.c:421 plug-ins/gap/gap_mov_dialog.c:260 #: plug-ins/gimpressionist/orientation.c:131 #: plug-ins/gimpressionist/size.c:130 msgid "Value" @@ -2155,7 +2150,7 @@ msgid "Left Edge" msgstr "Linker Rand" #: plug-ins/common/align_layers.c:473 plug-ins/common/align_layers.c:506 -#: plug-ins/gap/gap_mov_dialog.c:263 plug-ins/gflare/gflare.c:2862 +#: plug-ins/gap/gap_mov_dialog.c:271 plug-ins/gflare/gflare.c:2862 msgid "Center" msgstr "Mitte" @@ -2212,7 +2207,7 @@ msgstr "Animation abspielen: " #: plug-ins/common/sample_colorize.c:1373 plug-ins/common/uniteditor.c:525 #: plug-ins/dbbrowser/dbbrowser_utils.c:158 #: plug-ins/dbbrowser/dbbrowser_utils.c:175 plug-ins/gap/gap_arr_dialog.c:783 -#: plug-ins/gap/gap_navigator_dialog.c:2852 +#: plug-ins/gap/gap_navigator_dialog.c:3158 #: plug-ins/gdyntext/charmap_window.c:143 plug-ins/gdyntext/gdyntext_ui.c:636 #: plug-ins/gfig/gfig.c:1986 plug-ins/gfig/gfig.c:2046 #: plug-ins/helpbrowser/helpbrowser.c:787 @@ -2532,7 +2527,7 @@ msgstr "Einf #: plug-ins/common/colorify.c:338 plug-ins/common/colortoalpha.c:414 #: plug-ins/common/ps.c:2625 plug-ins/common/xpm.c:439 -#: plug-ins/gap/gap_mov_dialog.c:251 plug-ins/gimpressionist/color.c:51 +#: plug-ins/gap/gap_mov_dialog.c:259 plug-ins/gimpressionist/color.c:51 #: plug-ins/gimpressionist/color.c:56 plug-ins/imagemap/imap_menu.c:325 #: plug-ins/print/gimp_main_window.c:425 msgid "Color" @@ -2556,7 +2551,7 @@ msgstr "Farbe zu Transparenz" #: plug-ins/common/colortoalpha.c:425 plug-ins/common/mapcolor.c:648 #: plug-ins/gap/gap_decode_mpeg_main.c:652 plug-ins/gap/gap_decode_xanim.c:223 -#: plug-ins/gap/gap_lib.c:2092 plug-ins/gap/gap_lib.c:2271 +#: plug-ins/gap/gap_lib.c:2103 plug-ins/gap/gap_lib.c:2282 #: plug-ins/gap/gap_range_ops.c:251 plug-ins/gap/gap_range_ops.c:600 #: plug-ins/gfli/gfli.c:859 plug-ins/gfli/gfli.c:928 msgid "From:" @@ -2810,7 +2805,7 @@ msgstr "Speichere Alphakanal (RGBA/RGB)" #. Opacity #. table col, row #: plug-ins/common/csource.c:757 plug-ins/common/sparkle.c:443 -#: plug-ins/common/tileit.c:587 plug-ins/gap/gap_mov_dialog.c:1627 +#: plug-ins/common/tileit.c:587 plug-ins/gap/gap_mov_dialog.c:1925 #: plug-ins/gflare/gflare.c:3602 plug-ins/gflare/gflare.c:3632 #: plug-ins/gflare/gflare.c:3662 msgid "Opacity:" @@ -2871,9 +2866,10 @@ msgstr "" msgid "Curve Bend" msgstr "Kurve" -#: plug-ins/common/curve_bend.c:1365 plug-ins/gfig/gfig.c:2869 -#: plug-ins/gfig/gfig.c:5332 plug-ins/gflare/gflare.c:3099 -#: plug-ins/imagemap/imap_cmd_copy.c:49 +#. menu_item copy +#: plug-ins/common/curve_bend.c:1365 plug-ins/gap/gap_navigator_dialog.c:2920 +#: plug-ins/gfig/gfig.c:2869 plug-ins/gfig/gfig.c:5332 +#: plug-ins/gflare/gflare.c:3099 plug-ins/imagemap/imap_cmd_copy.c:49 #: plug-ins/imagemap/imap_cmd_copy_object.c:50 #: plug-ins/imagemap/imap_menu.c:287 plug-ins/imagemap/imap_toolbar.c:132 msgid "Copy" @@ -3046,7 +3042,7 @@ msgstr "Kan #: plug-ins/common/deinterlace.c:92 msgid "/Filters/Enhance/Deinterlace..." -msgstr "/Filters/Verbessern/Entflackern..." +msgstr "/Filter/Verbessern/Entflackern..." #: plug-ins/common/deinterlace.c:148 msgid "Deinterlace..." @@ -3183,7 +3179,7 @@ msgstr "Histogramm erstellen" #: plug-ins/common/destripe.c:670 plug-ins/common/gtm.c:551 #: plug-ins/common/ps.c:2582 plug-ins/common/ps.c:2757 #: plug-ins/common/smooth_palette.c:429 plug-ins/common/tile.c:421 -#: plug-ins/gap/gap_mov_dialog.c:1593 plug-ins/imagemap/imap_rectangle.c:387 +#: plug-ins/gap/gap_mov_dialog.c:1891 plug-ins/imagemap/imap_rectangle.c:387 msgid "Width:" msgstr "Breite:" @@ -3335,7 +3331,7 @@ msgstr "Beschr #: plug-ins/common/engrave.c:256 plug-ins/common/film.c:1243 #: plug-ins/common/gtm.c:565 plug-ins/common/ps.c:2591 #: plug-ins/common/ps.c:2766 plug-ins/common/smooth_palette.c:438 -#: plug-ins/common/tile.c:425 plug-ins/gap/gap_mov_dialog.c:1610 +#: plug-ins/common/tile.c:425 plug-ins/gap/gap_mov_dialog.c:1908 #: plug-ins/imagemap/imap_rectangle.c:393 msgid "Height:" msgstr "Höhe:" @@ -4111,7 +4107,7 @@ msgstr "Teilung:" #: plug-ins/common/iwarp.c:255 msgid "/Filters/Distorts/IWarp..." -msgstr "/Filter/Verzerrung/IWarp..." +msgstr "/Filter/Verzerren/IWarp..." #: plug-ins/common/iwarp.c:651 msgid "Warping..." @@ -4539,8 +4535,8 @@ msgid "Destination color range" msgstr "Ziel-Farbbereich" #: plug-ins/common/mapcolor.c:648 plug-ins/gap/gap_decode_mpeg_main.c:662 -#: plug-ins/gap/gap_decode_xanim.c:233 plug-ins/gap/gap_lib.c:2100 -#: plug-ins/gap/gap_lib.c:2279 plug-ins/gap/gap_range_ops.c:258 +#: plug-ins/gap/gap_decode_xanim.c:233 plug-ins/gap/gap_lib.c:2111 +#: plug-ins/gap/gap_lib.c:2290 plug-ins/gap/gap_range_ops.c:258 #: plug-ins/gap/gap_range_ops.c:608 plug-ins/gfli/gfli.c:868 #: plug-ins/gfli/gfli.c:937 msgid "To:" @@ -4665,7 +4661,7 @@ msgid "Output LPI:" msgstr "Ausgabe LPI:" #. screen settings -#: plug-ins/common/newsprint.c:1287 plug-ins/gap/gap_mov_dialog.c:242 +#: plug-ins/common/newsprint.c:1287 plug-ins/gap/gap_mov_dialog.c:250 #: plug-ins/gflare/gflare.c:597 msgid "Screen" msgstr "Schirm" @@ -4693,7 +4689,7 @@ msgstr "Oversample:" # TODO #: plug-ins/common/nlfilt.c:153 msgid "/Filters/Enhance/NL Filter..." -msgstr "/Filters/Verbessern/NL Filter..." +msgstr "/Filter/Verbessern/NL Filter..." #: plug-ins/common/nlfilt.c:263 plug-ins/common/nlfilt.c:343 msgid "NL Filter" @@ -5363,7 +5359,7 @@ msgstr "Zufallsanteil (%):" #: plug-ins/common/ripple.c:156 msgid "/Filters/Distorts/Ripple..." -msgstr "/Filter/Verzerrung/Zacken..." +msgstr "/Filter/Verzerren/Zacken..." #: plug-ins/common/ripple.c:236 msgid "Rippling..." @@ -6479,7 +6475,7 @@ msgstr "Mehr Transparenz" #: plug-ins/common/vpropagate.c:217 msgid "/Filters/Distorts/Value Propagate..." -msgstr "/Filter/Verzerrung/Propagierter Wert..." +msgstr "/Filter/Verzerren/Propagierter Wert..." #: plug-ins/common/vpropagate.c:364 msgid "Value propagating..." @@ -7440,7 +7436,7 @@ msgid "Overwrite All" msgstr "Alle Überschreiben" #: plug-ins/gap/gap_decode_mpeg_main.c:342 plug-ins/gap/gap_decode_xanim.c:346 -#: plug-ins/gap/gap_lib.c:1020 plug-ins/gap/gap_range_ops.c:1207 +#: plug-ins/gap/gap_lib.c:1026 plug-ins/gap/gap_range_ops.c:1207 msgid "GAP Question" msgstr "GAP Frage" @@ -7803,7 +7799,7 @@ msgstr "/Video/Video in Frames aufteilen/Von XANIM lesbar..." #: plug-ins/gap/gap_frontends_main.c:139 msgid "/Xtns/Split Video to Frames/Any XANIM readable..." -msgstr "/Video/Video in Frames aufteilen/Von XANIM lesbar..." +msgstr "/Xtns/Video in Frames aufteilen/Von XANIM lesbar..." #: plug-ins/gap/gap_frontends_main.c:151 msgid "/Video/Encode/MPEG1..." @@ -7813,11 +7809,11 @@ msgstr "/Video/Komprimieren/MPEG1..." msgid "/Video/Encode/MPEG2..." msgstr "/Video/Komprimieren/MPEG2..." -#: plug-ins/gap/gap_lib.c:226 +#: plug-ins/gap/gap_lib.c:232 msgid "GAP Message" msgstr "GAP Nachricht" -#: plug-ins/gap/gap_lib.c:889 +#: plug-ins/gap/gap_lib.c:895 msgid "" "OPERATION CANCELLED.\n" "Current frame changed while dialog was open." @@ -7826,7 +7822,7 @@ msgstr "" "Aktueller Frame wurde geändert\n" "während der Dialog geöffnet war." -#: plug-ins/gap/gap_lib.c:911 +#: plug-ins/gap/gap_lib.c:917 msgid "" "OPERATION CANCELLED.\n" "GAP-plugins works only with filenames\n" @@ -7838,7 +7834,7 @@ msgstr "" "deren Namen mit _NNNN.xcf enden (z.B.: ani_0001.xcf)\n" "=> Benennen Sie Ihr Bild um und versuchen Sie es erneut." -#: plug-ins/gap/gap_lib.c:998 +#: plug-ins/gap/gap_lib.c:1004 msgid "" "You are using a file format != xcf\n" "Save Operations may result\n" @@ -7848,73 +7844,73 @@ msgstr "" "Wenn Sie speichern, können\n" "Ebeneninformationen verlorengehen." -#: plug-ins/gap/gap_lib.c:1014 +#: plug-ins/gap/gap_lib.c:1020 msgid "Save Flattened" msgstr "Zusammengefügt sichern" -#: plug-ins/gap/gap_lib.c:1016 +#: plug-ins/gap/gap_lib.c:1022 msgid "Save As Is" msgstr "Sichern, wie es ist" -#: plug-ins/gap/gap_lib.c:1486 plug-ins/gap/gap_lib.c:1603 -#: plug-ins/gap/gap_lib.c:1682 plug-ins/gap/gap_lib.c:1689 -#: plug-ins/gap/gap_lib.c:1696 plug-ins/gap/gap_lib.c:1779 -#: plug-ins/gap/gap_lib.c:1801 +#: plug-ins/gap/gap_lib.c:1497 plug-ins/gap/gap_lib.c:1614 +#: plug-ins/gap/gap_lib.c:1693 plug-ins/gap/gap_lib.c:1700 +#: plug-ins/gap/gap_lib.c:1707 plug-ins/gap/gap_lib.c:1790 +#: plug-ins/gap/gap_lib.c:1812 plug-ins/gap/gap_lib.c:2701 #, c-format msgid "Error: could not rename frame %ld to %ld" msgstr "Fehler: Konnte Frame %ld nicht in %ld umbenennen." -#: plug-ins/gap/gap_lib.c:1591 +#: plug-ins/gap/gap_lib.c:1602 msgid "Duplicating frames..." msgstr "Dupliziere Frames..." -#: plug-ins/gap/gap_lib.c:1767 +#: plug-ins/gap/gap_lib.c:1778 msgid "Renumber Framesequence..." msgstr "Frame-Reihenfolge wird umgestellt..." -#: plug-ins/gap/gap_lib.c:1953 +#: plug-ins/gap/gap_lib.c:1964 #, c-format msgid "Goto Frame (%ld/%ld)" msgstr "Lade Frame (%ld/%ld)" -#: plug-ins/gap/gap_lib.c:1956 +#: plug-ins/gap/gap_lib.c:1967 #, c-format msgid "Destination Frame Number (%ld - %ld)" msgstr "Nummer des Ziel-Frames (%ld - %ld)" -#: plug-ins/gap/gap_lib.c:1960 plug-ins/gap/gap_lib.c:2037 -#: plug-ins/gap/gap_lib.c:2225 +#: plug-ins/gap/gap_lib.c:1971 plug-ins/gap/gap_lib.c:2048 +#: plug-ins/gap/gap_lib.c:2236 msgid "Number:" msgstr "Nummer:" -#: plug-ins/gap/gap_lib.c:2021 +#: plug-ins/gap/gap_lib.c:2032 #, c-format msgid "Delete Frames (%ld/%ld)" msgstr "Entferne Frames (%ld/%ld)" -#: plug-ins/gap/gap_lib.c:2024 +#: plug-ins/gap/gap_lib.c:2035 #, c-format msgid "Delete Frames from %ld to (number)" msgstr "Entferne Frames von %ld bis (Nummer)" -#: plug-ins/gap/gap_lib.c:2087 +#: plug-ins/gap/gap_lib.c:2098 #, c-format msgid "Duplicate Frames (%ld/%ld)" msgstr "Dupliziere Frames (%ld/%ld)" -#: plug-ins/gap/gap_lib.c:2097 +#: plug-ins/gap/gap_lib.c:2108 msgid "Source Range starts at this framenumber" msgstr "Quellbereich fängt bei dieser Framenummer an" -#: plug-ins/gap/gap_lib.c:2105 +#: plug-ins/gap/gap_lib.c:2116 msgid "Source Range ends at this framenumber" msgstr "Quellbereich hört bei dieser Framenummer auf" -#: plug-ins/gap/gap_lib.c:2108 +#: plug-ins/gap/gap_lib.c:2119 msgid "N times:" msgstr "N-mal:" -#: plug-ins/gap/gap_lib.c:2115 +#: plug-ins/gap/gap_lib.c:2126 msgid "" "Copy selected Range n-times \n" "(you may type in Values > 99)" @@ -7922,38 +7918,38 @@ msgstr "" "Kopiere ausgewählten Frame n-mal \n" "(Sie können Werte > 99 eingeben)" -#: plug-ins/gap/gap_lib.c:2117 +#: plug-ins/gap/gap_lib.c:2128 msgid "Duplicate Frame Range" msgstr "Frame-Reichweite duplizieren" -#: plug-ins/gap/gap_lib.c:2220 +#: plug-ins/gap/gap_lib.c:2231 #, c-format msgid "Exchange current Frame (%ld)" msgstr "Vertausche momentanen Frame (%ld)" -#: plug-ins/gap/gap_lib.c:2224 +#: plug-ins/gap/gap_lib.c:2235 msgid "With Frame (number)" msgstr "Mit Frame (Nummer)" -#: plug-ins/gap/gap_lib.c:2266 +#: plug-ins/gap/gap_lib.c:2277 #, c-format msgid "Framesequence Shift (%ld/%ld)" msgstr "Reihenfolge der Frames verschieben (%ld/%ld)" -#: plug-ins/gap/gap_lib.c:2276 +#: plug-ins/gap/gap_lib.c:2287 msgid "Affected Range starts at this framenumber" msgstr "Betroffener Bereich fängt bei dieser Frame-Nummer an" -#: plug-ins/gap/gap_lib.c:2284 +#: plug-ins/gap/gap_lib.c:2295 msgid "Affected Range ends at this framenumber" msgstr "Betroffener Bereich hört bei dieser Frame-Nummer auf" # TODO! -#: plug-ins/gap/gap_lib.c:2287 +#: plug-ins/gap/gap_lib.c:2298 msgid "N-Shift:" msgstr "N-Verschiebung:" -#: plug-ins/gap/gap_lib.c:2292 +#: plug-ins/gap/gap_lib.c:2303 msgid "" "Renumber the affected framesequence \n" "(numbers are shifted in circle by N)" @@ -7961,84 +7957,84 @@ msgstr "" "Stelle die Reihenfolge der Frames um \n" "(Verschiebung um N im Kreis)" -#: plug-ins/gap/gap_lib.c:2294 +#: plug-ins/gap/gap_lib.c:2305 msgid "Framesequence shift" msgstr "Verschiebung der Frame-Reihenfolge" -#: plug-ins/gap/gap_main.c:343 +#: plug-ins/gap/gap_main.c:374 msgid "/Video/Goto/Next Frame" msgstr "/Video/Gehe zu/Nächster Frame" -#: plug-ins/gap/gap_main.c:355 +#: plug-ins/gap/gap_main.c:386 msgid "/Video/Goto/Previous Frame" msgstr "/Video/Gehe zu/Vorheriger Frame" -#: plug-ins/gap/gap_main.c:367 +#: plug-ins/gap/gap_main.c:398 msgid "/Video/Goto/First Frame" msgstr "/Video/Gehe zu/Erster Frame" -#: plug-ins/gap/gap_main.c:379 +#: plug-ins/gap/gap_main.c:410 msgid "/Video/Goto/Last Frame" msgstr "/Video/Gehe zu/Letzter Frame" -#: plug-ins/gap/gap_main.c:391 +#: plug-ins/gap/gap_main.c:422 msgid "/Video/Goto/Any Frame..." msgstr "/Video/Gehe zu/Beliebiger Frame..." -#: plug-ins/gap/gap_main.c:403 +#: plug-ins/gap/gap_main.c:434 msgid "/Video/Delete Frames..." msgstr "/Video/Frames löschen..." -#: plug-ins/gap/gap_main.c:415 +#: plug-ins/gap/gap_main.c:446 msgid "/Video/Duplicate Frames..." msgstr "/Video/Frames duplizieren..." -#: plug-ins/gap/gap_main.c:427 +#: plug-ins/gap/gap_main.c:458 msgid "/Video/Exchange Frame..." msgstr "/Video/Frames austauschen..." -#: plug-ins/gap/gap_main.c:439 +#: plug-ins/gap/gap_main.c:470 msgid "/Video/Move Path..." msgstr "/Video/Bewegungs-Pfad..." # besser ? -#: plug-ins/gap/gap_main.c:451 +#: plug-ins/gap/gap_main.c:482 msgid "/Video/Frames to Image..." msgstr "/Video/Frames zu Bild..." -#: plug-ins/gap/gap_main.c:463 +#: plug-ins/gap/gap_main.c:494 msgid "/Video/Frames Flatten..." msgstr "/Video/Frames zusammenfügen..." -#: plug-ins/gap/gap_main.c:475 +#: plug-ins/gap/gap_main.c:506 msgid "/Video/Frames LayerDel..." msgstr "/Video/Ebene aus Frames entfernen..." -#: plug-ins/gap/gap_main.c:499 +#: plug-ins/gap/gap_main.c:530 msgid "/Video/Frames Convert..." msgstr "/Video/Frames konvertieren..." -#: plug-ins/gap/gap_main.c:511 +#: plug-ins/gap/gap_main.c:542 msgid "/Video/Frames Resize..." msgstr "/Video/Frame-Größe verändern..." -#: plug-ins/gap/gap_main.c:523 +#: plug-ins/gap/gap_main.c:554 msgid "/Video/Frames Crop..." msgstr "/Video/Frames zuschneiden..." -#: plug-ins/gap/gap_main.c:535 +#: plug-ins/gap/gap_main.c:566 msgid "/Video/Frames Scale..." msgstr "/Video/Frames skalieren..." -#: plug-ins/gap/gap_main.c:547 +#: plug-ins/gap/gap_main.c:578 msgid "/Video/Split Image to Frames..." msgstr "/Video/Bild in Frames aufteilen..." -#: plug-ins/gap/gap_main.c:560 +#: plug-ins/gap/gap_main.c:591 msgid "/Video/Framesequence Shift..." msgstr "/Video/Frame-Abfolge verschieben..." -#: plug-ins/gap/gap_main.c:572 +#: plug-ins/gap/gap_main.c:603 msgid "/Video/Frames Modify..." msgstr "/Video/Frames modifizieren..." @@ -8189,7 +8185,7 @@ msgstr "Von Frame:" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mod_layer.c:156 plug-ins/gap/gap_mov_dialog.c:521 +#: plug-ins/gap/gap_mod_layer.c:156 plug-ins/gap/gap_mov_dialog.c:550 #: plug-ins/gap/gap_mpege.c:259 plug-ins/gap/gap_range_ops.c:442 #: plug-ins/gap/gap_range_ops.c:601 msgid "first handled frame" @@ -8207,7 +8203,7 @@ msgstr "Bis Frame:" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mod_layer.c:164 plug-ins/gap/gap_mov_dialog.c:536 +#: plug-ins/gap/gap_mod_layer.c:164 plug-ins/gap/gap_mov_dialog.c:565 #: plug-ins/gap/gap_mpege.c:267 plug-ins/gap/gap_range_ops.c:450 #: plug-ins/gap/gap_range_ops.c:609 msgid "last handled frame" @@ -8306,91 +8302,91 @@ msgstr "Modifiziere Frames/Ebene(n)..." msgid "No selected Layer in start frame" msgstr "Keine Ebene ausgewählt im ersten Frame" -#: plug-ins/gap/gap_mov_dialog.c:239 plug-ins/gfig/gfig.c:3327 +#: plug-ins/gap/gap_mov_dialog.c:247 plug-ins/gfig/gfig.c:3327 #: plug-ins/gflare/gflare.c:594 plug-ins/gimpressionist/orientmap.c:590 msgid "Normal" msgstr "Normal" -#: plug-ins/gap/gap_mov_dialog.c:240 +#: plug-ins/gap/gap_mov_dialog.c:248 msgid "Dissolve" msgstr "Vernichten" -#: plug-ins/gap/gap_mov_dialog.c:241 +#: plug-ins/gap/gap_mov_dialog.c:249 msgid "Multiply" msgstr "Multiplizieren" -#: plug-ins/gap/gap_mov_dialog.c:243 plug-ins/gflare/gflare.c:596 +#: plug-ins/gap/gap_mov_dialog.c:251 plug-ins/gflare/gflare.c:596 #: plug-ins/gimpressionist/paper.c:152 msgid "Overlay" msgstr "Überlagern" -#: plug-ins/gap/gap_mov_dialog.c:244 +#: plug-ins/gap/gap_mov_dialog.c:252 msgid "Difference" msgstr "Unterschied" -#: plug-ins/gap/gap_mov_dialog.c:245 plug-ins/gflare/gflare.c:595 +#: plug-ins/gap/gap_mov_dialog.c:253 plug-ins/gflare/gflare.c:595 msgid "Addition" msgstr "Addieren" -#: plug-ins/gap/gap_mov_dialog.c:246 plug-ins/gfig/gfig.c:3148 +#: plug-ins/gap/gap_mov_dialog.c:254 plug-ins/gfig/gfig.c:3148 msgid "Subtract" msgstr "Subtrahieren" -#: plug-ins/gap/gap_mov_dialog.c:247 +#: plug-ins/gap/gap_mov_dialog.c:255 msgid "Darken Only" msgstr "Nur Abdunkeln" -#: plug-ins/gap/gap_mov_dialog.c:248 +#: plug-ins/gap/gap_mov_dialog.c:256 msgid "Lighten Only" msgstr "Nur Aufhellen" -#: plug-ins/gap/gap_mov_dialog.c:259 +#: plug-ins/gap/gap_mov_dialog.c:267 msgid "Left Top" msgstr "Links Oben" -#: plug-ins/gap/gap_mov_dialog.c:260 +#: plug-ins/gap/gap_mov_dialog.c:268 msgid "Left Bottom" msgstr "Links Unten" -#: plug-ins/gap/gap_mov_dialog.c:261 +#: plug-ins/gap/gap_mov_dialog.c:269 msgid "Right Top" msgstr "Rechts Oben" -#: plug-ins/gap/gap_mov_dialog.c:262 +#: plug-ins/gap/gap_mov_dialog.c:270 msgid "Right Bottom" msgstr "Rechts Unten" # TODO besserer Ausdruck? -#: plug-ins/gap/gap_mov_dialog.c:271 +#: plug-ins/gap/gap_mov_dialog.c:279 msgid "Loop" msgstr "Schleife" -#: plug-ins/gap/gap_mov_dialog.c:272 +#: plug-ins/gap/gap_mov_dialog.c:280 msgid "Loop Reverse" msgstr "Umgekehrte Schleife" -#: plug-ins/gap/gap_mov_dialog.c:273 +#: plug-ins/gap/gap_mov_dialog.c:281 msgid "Once" msgstr "Einmal" -#: plug-ins/gap/gap_mov_dialog.c:274 +#: plug-ins/gap/gap_mov_dialog.c:282 msgid "OnceReverse" msgstr "Einmal umgekehrt" -#: plug-ins/gap/gap_mov_dialog.c:275 +#: plug-ins/gap/gap_mov_dialog.c:283 msgid "PingPong" msgstr "Ping-Pong" # TODO context ? -#: plug-ins/gap/gap_mov_dialog.c:434 +#: plug-ins/gap/gap_mov_dialog.c:451 msgid "Move Path" msgstr "Bewegungs-Pfad" -#: plug-ins/gap/gap_mov_dialog.c:461 +#: plug-ins/gap/gap_mov_dialog.c:478 msgid "Update Preview" msgstr "Vorschau erneuern" -#: plug-ins/gap/gap_mov_dialog.c:468 +#: plug-ins/gap/gap_mov_dialog.c:485 msgid "" "Show PreviewFrame with Selected \n" "SrcLayer at current Controlpoint" @@ -8398,27 +8394,37 @@ msgstr "" "Vorschau-Frame mit ausgewählter Quellebene\n" "am momentanen Kontrollpunkt anzeigen" +#: plug-ins/gap/gap_mov_dialog.c:489 +msgid "Anim Preview" +msgstr "Anim.-Vorschau" + +#: plug-ins/gap/gap_mov_dialog.c:496 +msgid "" +"Generate Animated Preview\n" +"as multilayer image" +msgstr "" + #. parameter settings -#: plug-ins/gap/gap_mov_dialog.c:481 +#: plug-ins/gap/gap_mov_dialog.c:509 msgid "Copy moving source-layer(s) into frames" msgstr "Kopiere bewegte(n) Quellebene(n) in Frames" #. the start frame scale_entry #. table col, row -#: plug-ins/gap/gap_mov_dialog.c:513 +#: plug-ins/gap/gap_mov_dialog.c:542 msgid "Start Frame:" msgstr "Erster Frame:" # TODO ACHTUNG! was wenn Ende exklusiv ist ([Start;End[) ??? #. the end frame scale_entry #. table col, row -#: plug-ins/gap/gap_mov_dialog.c:528 +#: plug-ins/gap/gap_mov_dialog.c:557 msgid "End Frame:" msgstr "Letzter Frame:" #. the Preview Frame scale_entry #. table col, row -#: plug-ins/gap/gap_mov_dialog.c:543 +#: plug-ins/gap/gap_mov_dialog.c:572 msgid "Preview Frame:" msgstr "Vorschau-Frame:" @@ -8430,7 +8436,7 @@ msgstr "Vorschau-Frame:" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:551 +#: plug-ins/gap/gap_mov_dialog.c:580 msgid "" "frame to show when UpdPreview\n" "button is pressed" @@ -8440,7 +8446,7 @@ msgstr "" #. the Layerstack scale_entry #. table col, row -#: plug-ins/gap/gap_mov_dialog.c:559 plug-ins/gap/gap_range_ops.c:265 +#: plug-ins/gap/gap_mov_dialog.c:588 plug-ins/gap/gap_range_ops.c:265 msgid "Layerstack:" msgstr "Ebenenstapel:" @@ -8452,7 +8458,7 @@ msgstr "Ebenenstapel:" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:567 +#: plug-ins/gap/gap_mov_dialog.c:596 msgid "" "How to insert SrcLayer into the\n" "Dst. Frame's Layerstack\n" @@ -8462,18 +8468,27 @@ msgstr "" "Ebenenstapel des Ziel-Frames eingefügt\n" "wird (0 ist ganz oben)" +#. toggle force visibility +#: plug-ins/gap/gap_mov_dialog.c:608 +msgid "Force visibility" +msgstr "Erzwinge Sichtbarkeit" + +#: plug-ins/gap/gap_mov_dialog.c:614 +msgid "Force visibility for all copied Src-Layers" +msgstr "" + #. toggle clip_to_image -#: plug-ins/gap/gap_mov_dialog.c:574 +#: plug-ins/gap/gap_mov_dialog.c:620 msgid "Clip To Frame" msgstr "Am Frame kappen" -#: plug-ins/gap/gap_mov_dialog.c:580 +#: plug-ins/gap/gap_mov_dialog.c:626 msgid "" "Clip all copied Src-Layers\n" "at Frame Boundaries" msgstr "Alle Quellebenen an Frame-Rand kappen" -#: plug-ins/gap/gap_mov_dialog.c:626 +#: plug-ins/gap/gap_mov_dialog.c:674 msgid "" "No Source Image was selected\n" "(Please open a 2nd Image of the same type before opening Move Path)" @@ -8482,52 +8497,103 @@ msgstr "" "(Bitte öffnen Sie eine 2. Bild vom gleichen Typ bevor Sie 'Bewegungs-Pfad' " "aufrufen)" +#: plug-ins/gap/gap_mov_dialog.c:770 +msgid "Object on empty frames" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:771 +msgid "Object on one frame" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:772 +msgid "Exact Object on frames" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:802 +msgid "Anim Preview Mode" +msgstr "Grösse der animierten Vorschau" + +#: plug-ins/gap/gap_mov_dialog.c:810 +msgid "Scale Preview" +msgstr "Vorschau skalieren" + +#: plug-ins/gap/gap_mov_dialog.c:811 +#, c-format +msgid "Scale down size of the generated animated preview in %" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:819 +msgid "Framerate" +msgstr "Frame-Rate" + +#: plug-ins/gap/gap_mov_dialog.c:820 +msgid "Framerate to use in the animated preview in frames/sec" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:834 +msgid "Copy to Video Buffer" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:835 +msgid "" +"Save all single frames of animated preview to video buffer\n" +"(configured in gimprc by video-paste-dir and video-paste-basename)" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:840 +msgid "Move Path Animated Preview" +msgstr "Bewegungs-Pfad animierte Vorschau" + +#: plug-ins/gap/gap_mov_dialog.c:886 +msgid "Generate Animate Preview failed\n" +msgstr "" + #. filesel is already open -#: plug-ins/gap/gap_mov_dialog.c:897 +#: plug-ins/gap/gap_mov_dialog.c:1098 msgid "Load Path Points from file" msgstr "Pfad-Kontrollpunkte aus Datei laden" #. filesel is already open -#: plug-ins/gap/gap_mov_dialog.c:933 +#: plug-ins/gap/gap_mov_dialog.c:1134 msgid "Save Path Points to file" msgstr "Pfad-Kontrollpunkte in Datei speichern" -#: plug-ins/gap/gap_mov_dialog.c:1210 +#: plug-ins/gap/gap_mov_dialog.c:1479 #, c-format msgid "Current Point: [ %3d ] of [ %3d ]" msgstr "Aktueller Punkt: [ %3d ] von [ %3d ]" -#: plug-ins/gap/gap_mov_dialog.c:1373 +#: plug-ins/gap/gap_mov_dialog.c:1670 msgid "Source Select" msgstr "Quelle auswählen" #. Source Layer menu -#: plug-ins/gap/gap_mov_dialog.c:1390 +#: plug-ins/gap/gap_mov_dialog.c:1687 msgid "Source Image/Layer:" msgstr "Quell-Bild/Ebene:" -#: plug-ins/gap/gap_mov_dialog.c:1400 +#: plug-ins/gap/gap_mov_dialog.c:1697 msgid "Source Object to insert into Frame Range" msgstr "Quellobjekt, welches in die Frames eingefügt wird" #. Paintmode menu -#: plug-ins/gap/gap_mov_dialog.c:1415 +#: plug-ins/gap/gap_mov_dialog.c:1712 msgid "Mode:" msgstr "Modus:" # TODO ?? -#: plug-ins/gap/gap_mov_dialog.c:1424 +#: plug-ins/gap/gap_mov_dialog.c:1721 msgid "Paintmode" msgstr "Zeichenmodus" # TODO ??? #. Loop Stepmode menu -#: plug-ins/gap/gap_mov_dialog.c:1439 +#: plug-ins/gap/gap_mov_dialog.c:1736 msgid "Stepmode:" msgstr "Schrittmodus:" # TODO ??? -#: plug-ins/gap/gap_mov_dialog.c:1457 +#: plug-ins/gap/gap_mov_dialog.c:1754 msgid "" "How to fetch the next SrcLayer \n" "at the next handled frame" @@ -8536,11 +8602,11 @@ msgstr "" "ausgewählt wird." #. Source Image Handle menu -#: plug-ins/gap/gap_mov_dialog.c:1463 +#: plug-ins/gap/gap_mov_dialog.c:1760 msgid "Handle:" msgstr "Anker:" -#: plug-ins/gap/gap_mov_dialog.c:1481 +#: plug-ins/gap/gap_mov_dialog.c:1778 msgid "" "How to place the SrcLayer at \n" "Controlpoint Coordinates" @@ -8550,17 +8616,17 @@ msgstr "" #. to avoid side effects while initialization #. the frame -#: plug-ins/gap/gap_mov_dialog.c:1534 +#: plug-ins/gap/gap_mov_dialog.c:1832 msgid "Move Path Preview" msgstr "Bewegungs-Pfad Vorschau" #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:1566 +#: plug-ins/gap/gap_mov_dialog.c:1864 msgid "X Coordinate" msgstr "X Koordinate" #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:1584 +#: plug-ins/gap/gap_mov_dialog.c:1882 msgid "Y Coordinate" msgstr "Y Koordinate" @@ -8572,7 +8638,7 @@ msgstr "Y Koordinate" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:1601 +#: plug-ins/gap/gap_mov_dialog.c:1899 msgid "Scale Source Layer's Width in percent" msgstr "Skaliere die Quellebene horizontal (in %)" @@ -8584,7 +8650,7 @@ msgstr "Skaliere die Quellebene horizontal (in %)" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:1618 +#: plug-ins/gap/gap_mov_dialog.c:1916 msgid "" "Scale SrcLayer's Height\n" "in percent" @@ -8598,7 +8664,7 @@ msgstr "Skaliere die Quellebene vertikal (in %)" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:1635 +#: plug-ins/gap/gap_mov_dialog.c:1933 msgid "" "SrcLayer's Opacity\n" "in percent" @@ -8606,7 +8672,7 @@ msgstr "Deckkraft der Quellebene (in %)" #. Rotation #. table col, row -#: plug-ins/gap/gap_mov_dialog.c:1644 +#: plug-ins/gap/gap_mov_dialog.c:1942 msgid "Rotate:" msgstr "Drehen:" @@ -8618,15 +8684,35 @@ msgstr "Drehen:" #. digits #. constrain #. lower, upper (unconstrained) -#: plug-ins/gap/gap_mov_dialog.c:1652 +#: plug-ins/gap/gap_mov_dialog.c:1950 msgid "Rotate SrcLayer (in degree)" msgstr "Rotiere Quellebene (in Grad)" -#: plug-ins/gap/gap_mov_dialog.c:1725 +#. Keyframe +#. table col, row +#: plug-ins/gap/gap_mov_dialog.c:1961 +msgid "Keyframe:" +msgstr "" + +#. label text +#. scalesize spinsize +#. value +#. lower, upper +#. step, page +#. digits +#. constrain +#. lower, upper (unconstrained) +#: plug-ins/gap/gap_mov_dialog.c:1969 +msgid "" +"Fix Controlpoint to Keyframe number\n" +"(0 == No Keyframe)" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2044 msgid "Add Point" msgstr "Punkt hinzufügen" -#: plug-ins/gap/gap_mov_dialog.c:1733 +#: plug-ins/gap/gap_mov_dialog.c:2052 msgid "" "Add Controlpoint at end \n" "(the last Point is duplicated)" @@ -8636,11 +8722,11 @@ msgstr "" # TODO context ? #. toggle clip_to_image -#: plug-ins/gap/gap_mov_dialog.c:1738 +#: plug-ins/gap/gap_mov_dialog.c:2057 msgid "Show Path" msgstr "Zeige Pfad" -#: plug-ins/gap/gap_mov_dialog.c:1744 +#: plug-ins/gap/gap_mov_dialog.c:2063 msgid "" "Show Path Lines and enable\n" "pick/drag with left button\n" @@ -8650,13 +8736,13 @@ msgstr "" "mit dem linken Button auswählen/ziehen,\n" "und mit dem rechten Button bewegen." -#: plug-ins/gap/gap_mov_dialog.c:1754 +#: plug-ins/gap/gap_mov_dialog.c:2073 #: plug-ins/imagemap/imap_cmd_insert_point.c:57 #: plug-ins/imagemap/imap_polygon.c:683 msgid "Insert Point" msgstr "Punkt hinzufügen" -#: plug-ins/gap/gap_mov_dialog.c:1762 +#: plug-ins/gap/gap_mov_dialog.c:2081 msgid "" "Insert Controlpoint \n" "(the current Point is duplicated)" @@ -8664,53 +8750,53 @@ msgstr "" "Kontrollpunkt einfügen \n" "(der aktuelle Punkt wird dupliziert)" -#: plug-ins/gap/gap_mov_dialog.c:1766 +#: plug-ins/gap/gap_mov_dialog.c:2085 #: plug-ins/imagemap/imap_cmd_delete_point.c:57 #: plug-ins/imagemap/imap_polygon.c:669 msgid "Delete Point" msgstr "Punkt löschen" -#: plug-ins/gap/gap_mov_dialog.c:1774 +#: plug-ins/gap/gap_mov_dialog.c:2093 msgid "Delete current Controlpoint" msgstr "Aktuellen Kontrollpunkt löschen" -#: plug-ins/gap/gap_mov_dialog.c:1780 +#: plug-ins/gap/gap_mov_dialog.c:2099 msgid "Prev Point" msgstr "Vorheriger Punkt" -#: plug-ins/gap/gap_mov_dialog.c:1788 +#: plug-ins/gap/gap_mov_dialog.c:2107 msgid "Show Previous Controlpoint" msgstr "Vorherigen Kontrollpunkt anzeigen" -#: plug-ins/gap/gap_mov_dialog.c:1792 +#: plug-ins/gap/gap_mov_dialog.c:2111 msgid "Next Point" msgstr "Nächster Punkt" -#: plug-ins/gap/gap_mov_dialog.c:1800 +#: plug-ins/gap/gap_mov_dialog.c:2119 msgid "Show Next Controlpoint" msgstr "Nächsten Kontrollpunkt anzeigen" -#: plug-ins/gap/gap_mov_dialog.c:1806 +#: plug-ins/gap/gap_mov_dialog.c:2125 msgid "First Point" msgstr "Erster Punkt" -#: plug-ins/gap/gap_mov_dialog.c:1814 +#: plug-ins/gap/gap_mov_dialog.c:2133 msgid "Show First Controlpoint" msgstr "Ersten Kontrollpunkt anzeigen" -#: plug-ins/gap/gap_mov_dialog.c:1818 +#: plug-ins/gap/gap_mov_dialog.c:2137 msgid "Last Point" msgstr "Letzter Punkt" -#: plug-ins/gap/gap_mov_dialog.c:1826 +#: plug-ins/gap/gap_mov_dialog.c:2145 msgid "Show Last Controlpoint" msgstr "Letzten Kontrollpunkt anzeigen" -#: plug-ins/gap/gap_mov_dialog.c:1832 +#: plug-ins/gap/gap_mov_dialog.c:2151 msgid "Clear Point" msgstr "Punkt zurücksetzen" -#: plug-ins/gap/gap_mov_dialog.c:1840 +#: plug-ins/gap/gap_mov_dialog.c:2159 msgid "" "Reset the current Controlpoint\n" "to default Values" @@ -8718,11 +8804,11 @@ msgstr "" "Den aktuellen Kontrollpunkt auf\n" "Standardwerte zurücksetzen" -#: plug-ins/gap/gap_mov_dialog.c:1844 +#: plug-ins/gap/gap_mov_dialog.c:2163 msgid "Reset Points" msgstr "Punkte zurücksetzen" -#: plug-ins/gap/gap_mov_dialog.c:1852 +#: plug-ins/gap/gap_mov_dialog.c:2171 msgid "" "Reset Controlpoints \n" "to one Defaultpoint" @@ -8730,23 +8816,78 @@ msgstr "" "Punkte werden auf einen \n" "Standardwert zurückgesetzt" -#: plug-ins/gap/gap_mov_dialog.c:1858 +#: plug-ins/gap/gap_mov_dialog.c:2177 msgid "Load Points" msgstr "Lade Punkte" -#: plug-ins/gap/gap_mov_dialog.c:1866 +#: plug-ins/gap/gap_mov_dialog.c:2185 msgid "Load Controlpoints from file" msgstr "Lade Kontrollpunkte aus Datei" -#: plug-ins/gap/gap_mov_dialog.c:1870 +#: plug-ins/gap/gap_mov_dialog.c:2189 msgid "Save Points" msgstr "Speichere Punkte" -#: plug-ins/gap/gap_mov_dialog.c:1878 +#: plug-ins/gap/gap_mov_dialog.c:2197 msgid "Save Controlpoints to file" msgstr "Kontrollpunkte in Datei speichern" -#: plug-ins/gap/gap_mov_exec.c:220 +#: plug-ins/gap/gap_mov_dialog.c:2668 +#, c-format +msgid "" +"\n" +"Error: Keyframe %d at point [%d] higher or equal than last handled frame" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2676 +#, c-format +msgid "" +"\n" +"Error: Keyframe %d at point [%d] leaves not enough space (frames)\n" +"for the previous controlpoints" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2686 +#, c-format +msgid "" +"\n" +"Error: Keyframe %d is not in sequence at point [%d]" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2704 +#, c-format +msgid "" +"\n" +"Error: controlpoint [%d] is out of handled framerange" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2718 +#, c-format +msgid "" +"\n" +"Error: more controlpoints (%d) than handled frames (%d)\n" +"please reduce controlpoints or select more frames" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2731 +msgid "" +"Cant operate with current Controlpoint\n" +"or Keyframe settings" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2738 +msgid "Reset Keyframes" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2743 +msgid "Move Path Controlpointcheck" +msgstr "" + +#: plug-ins/gap/gap_mov_dialog.c:2744 +msgid "Errors:" +msgstr "Fehler:" + +#: plug-ins/gap/gap_mov_exec.c:337 msgid "" "No Source Image was selected.\n" "Please open a 2nd Image of the same type before opening Move Path." @@ -8755,10 +8896,14 @@ msgstr "" "Bitte öffnen Sie ein 2. Bild vom gleichen Typ bevor Sie 'Bewegungs-Pfad' " "aufrufen." -#: plug-ins/gap/gap_mov_exec.c:229 +#: plug-ins/gap/gap_mov_exec.c:348 msgid "Copying Layers into Frames..." msgstr "Kopiere Ebenen in Frames..." +#: plug-ins/gap/gap_mov_exec.c:352 +msgid "Generating Animated Preview..." +msgstr "Erstelle animierte Vorschau..." + #: plug-ins/gap/gap_mpege.c:111 msgid "Conditions to run mpeg_encode 1.5:" msgstr "Vorraussetzungen für mpeg_encode 1.5:" @@ -9052,7 +9197,7 @@ msgstr "" "\n" "FEHLER: Für ein einzelnes Bild aufgerufen, ein AnimFrame wird benötigt!" -#: plug-ins/gap/gap_navigator_dialog.c:353 +#: plug-ins/gap/gap_navigator_dialog.c:367 msgid "" "Playback \n" " optimized" @@ -9060,7 +9205,7 @@ msgstr "" "Wiedergabe \n" " optimiert" -#: plug-ins/gap/gap_navigator_dialog.c:358 +#: plug-ins/gap/gap_navigator_dialog.c:372 msgid "" "Smart Update .xvpics\n" " forced upd" @@ -9068,19 +9213,19 @@ msgstr "" ".xvpics aktualisieren (falls nötig)\n" " Erzwinge Aktualisierung" -#: plug-ins/gap/gap_navigator_dialog.c:363 +#: plug-ins/gap/gap_navigator_dialog.c:377 msgid "Duplicate selected Frames" msgstr "Ausgewählte Frames duplizieren" -#: plug-ins/gap/gap_navigator_dialog.c:367 +#: plug-ins/gap/gap_navigator_dialog.c:381 msgid "Delete selected Frames" msgstr "Ausgewählte Frames löschen" -#: plug-ins/gap/gap_navigator_dialog.c:376 +#: plug-ins/gap/gap_navigator_dialog.c:390 msgid "Goto 1st Frame" msgstr "Gehe zum ersten Frame" -#: plug-ins/gap/gap_navigator_dialog.c:380 +#: plug-ins/gap/gap_navigator_dialog.c:394 msgid "" "Goto prev Frame\n" " use timezoom stepsize" @@ -9088,7 +9233,7 @@ msgstr "" "Gehe zu vorherigem Frame\n" " benutze \"Zeitdehnung\" als Schrittgrösse" -#: plug-ins/gap/gap_navigator_dialog.c:385 +#: plug-ins/gap/gap_navigator_dialog.c:399 msgid "" "Goto next Frame\n" " use timezoom stepsize" @@ -9096,32 +9241,60 @@ msgstr "" "Gehe zum nächsten Frame\n" " benutze \"Zeitdehnung\" als Schrittgrösse" -#: plug-ins/gap/gap_navigator_dialog.c:390 +#: plug-ins/gap/gap_navigator_dialog.c:404 msgid "Goto last Frame" msgstr "Gehe zum letzten Frame" -#: plug-ins/gap/gap_navigator_dialog.c:448 +#: plug-ins/gap/gap_navigator_dialog.c:462 msgid "/Video/VCR Navigator..." msgstr "/Video/VCR-Navigator..." -#: plug-ins/gap/gap_navigator_dialog.c:511 +#: plug-ins/gap/gap_navigator_dialog.c:525 msgid "Cant open two or more Video Navigator Windows." msgstr "Kann nicht mehr als ein Video-Navigator-Fenster öffnen." -#: plug-ins/gap/gap_navigator_dialog.c:2689 +#. menu_item cut +#: plug-ins/gap/gap_navigator_dialog.c:2930 +#: plug-ins/imagemap/imap_cmd_cut.c:53 +#: plug-ins/imagemap/imap_cmd_cut_object.c:51 +#: plug-ins/imagemap/imap_menu.c:284 plug-ins/imagemap/imap_toolbar.c:129 +msgid "Cut" +msgstr "Ausschneiden" + +#. menu_item paste before +#: plug-ins/gap/gap_navigator_dialog.c:2940 +msgid "Paste before" +msgstr "" + +#. menu_item copy +#: plug-ins/gap/gap_navigator_dialog.c:2950 +msgid "Paste after" +msgstr "Danach einfügen" + +#. menu_item copy +#: plug-ins/gap/gap_navigator_dialog.c:2960 +msgid "Paste replace" +msgstr "Einfügen und Ersetyen" + +#. menu_item copy +#: plug-ins/gap/gap_navigator_dialog.c:2970 +msgid "Clear Video Buffer" +msgstr "" + +#: plug-ins/gap/gap_navigator_dialog.c:2995 msgid "Videoframes:" msgstr "Videoframes:" -#: plug-ins/gap/gap_navigator_dialog.c:2704 +#: plug-ins/gap/gap_navigator_dialog.c:3010 msgid "Framerate:" msgstr "Frame-Rate:" -#: plug-ins/gap/gap_navigator_dialog.c:2727 +#: plug-ins/gap/gap_navigator_dialog.c:3033 msgid "Timezoom:" msgstr "Zeitdehnung:" #. The main shell -#: plug-ins/gap/gap_navigator_dialog.c:2821 +#: plug-ins/gap/gap_navigator_dialog.c:3127 msgid "Video Navigator" msgstr "Video Navigator" @@ -11556,12 +11729,6 @@ msgstr "Mitte Y:" msgid "Create" msgstr "Erzeugen" -#: plug-ins/imagemap/imap_cmd_cut.c:53 -#: plug-ins/imagemap/imap_cmd_cut_object.c:51 -#: plug-ins/imagemap/imap_menu.c:284 plug-ins/imagemap/imap_toolbar.c:129 -msgid "Cut" -msgstr "Ausschneiden" - #: plug-ins/imagemap/imap_cmd_edit_object.c:50 msgid "Edit Object" msgstr "Objekt bearbeiten" @@ -12301,7 +12468,7 @@ msgstr "Konnte keinen Kontrollpunkt hinzuf #: plug-ins/pagecurl/pagecurl.c:216 msgid "/Filters/Distorts/Pagecurl..." -msgstr "/Filter/Verzerrung/Seite einrollen..." +msgstr "/Filter/Verzerren/Seite einrollen..." #: plug-ins/pagecurl/pagecurl.c:513 msgid "Pagecurl Effect" @@ -13014,7 +13181,7 @@ msgstr "Kann Arbeitsverzeichnis %s nicht anlegen" #: plug-ins/xjt/xjt.c:1647 #, c-format -msgid "Can't open : %s" +msgid "Can't open: %s" msgstr "Kann %s nicht öffnen" #. stat error (file does not exist) @@ -13030,5 +13197,11 @@ msgstr "Fehler: Kann XJT Eigenschaften-Datei %s nicht lesen" #: plug-ins/xjt/xjt.c:3124 #, c-format -msgid "Error, XJT propertyfile %s is empty" +msgid "Error: XJT propertyfile %s is empty" msgstr "Fehler: XJT Eigenschaften-Datei %s ist leer" + +#~ msgid "can't open %s\n" +#~ msgstr "kann %s nicht öffnen\n" + +#~ msgid "%s: too many colors: %u\n" +#~ msgstr "%s: zu viele Farben: %u\n" diff --git a/po-script-fu/ChangeLog b/po-script-fu/ChangeLog index b94b01a7ae..cb7a70f31c 100644 --- a/po-script-fu/ChangeLog +++ b/po-script-fu/ChangeLog @@ -1,3 +1,7 @@ +2000-05-07 Sven Neumann + + * de.po: fixed german translation + 2000-05-04 Kjartan Maraas * no.po: Updated Norwegian translation. diff --git a/po-script-fu/de.po b/po-script-fu/de.po index 095aec65fe..cb2d5097a9 100644 --- a/po-script-fu/de.po +++ b/po-script-fu/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GIMP 1.1.20\n" "POT-Creation-Date: 2000-04-30 11:43-0700\n" -"PO-Revision-Date: 2000-04-28 01:58+02:00\n" +"PO-Revision-Date: 2000-05-07 23:09+02:00\n" "Last-Translator: Sven Neumann \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -219,7 +219,7 @@ msgstr "/Skript-Fu/Animationen/ #: plug-ins/script-fu/scripts/ripply-anim.scm:0 msgid "/Script-Fu/Animators/Rippling..." -msgstr "/Script-Fu/Animation/Flattern..." +msgstr "/Skript-Fu/Animation/Flattern..." #: plug-ins/gap/sel-to-anim-img.scm:0 msgid "/Script-Fu/Animators/Selection to AnimImage..." @@ -227,7 +227,7 @@ msgstr "/Skript-Fu/Animation/Auswahl zu Animation..." #: plug-ins/script-fu/scripts/spinning_globe.scm:0 msgid "/Script-Fu/Animators/Spinning Globe..." -msgstr "/Script-Fu/Animation/Drehender Globus..." +msgstr "/Skript-Fu/Animation/Drehender Globus..." #: plug-ins/script-fu/scripts/waves-anim.scm:0 msgid "/Script-Fu/Animators/Waves..." diff --git a/tips/gimp_tips.de.txt b/tips/gimp_tips.de.txt index 2de0efe9d1..b333a4dca7 100644 --- a/tips/gimp_tips.de.txt +++ b/tips/gimp_tips.de.txt @@ -6,7 +6,7 @@ # ist. Fühlt Euch frei, diese Datei entsprechend zu ändern ;-) Willkommen bei GIMP ! - + Fast alle Operationen werden durch Drücken der rechten Maustaste in einem Bild ausgeführt. Keine Angst, fast alle Fehler können rückgängig gemacht werden... @@ -92,7 +92,7 @@ Wird beim Erstellen einer Selektion w Shift-Taste gedrückt, so wird die neue Selektion einer bestehenden hinzugefügt. Wird die Ctrl-Taste (bzw. Strg-Taste) gedrückt, so wird die neue Selektion von der bestehenden subtrahiert. - + Durch Drücken der Shift- bzw. der Ctrl-Taste während des Erstellens einer Selektion kann ein Quadrat oder ein Kreis erzeugt werden, beziehungsweise die Selektion auf den Startpunkt zentriert werden.