From 75815e3a23353bc4f51b8b993b3b0bb0c2715ab7 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 7 Jun 2006 13:47:55 +0000 Subject: [PATCH] app/actions/error-console-commands.[ch] app/widgets/gimphelp-ids.h added 2006-06-07 Sven Neumann * app/actions/error-console-actions.c: * app/actions/error-console-commands.[ch] * app/widgets/gimphelp-ids.h * menus/error-console-menu.xml: added "select-all" action as suggested in bug #328838. --- ChangeLog | 8 ++++++++ app/actions/error-console-actions.c | 19 +++++++++++++------ app/actions/error-console-commands.c | 12 ++++++++++++ app/actions/error-console-commands.h | 12 +++++++----- app/widgets/gimphelp-ids.h | 1 + menus/error-console-menu.xml | 1 + 6 files changed, 42 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a83f5eaa5..f5869ef636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-06-07 Sven Neumann + + * app/actions/error-console-actions.c: + * app/actions/error-console-commands.[ch] + * app/widgets/gimphelp-ids.h + * menus/error-console-menu.xml: added "select-all" action as + suggested in bug #328838. + 2006-06-07 Sven Neumann * app/core/gimpguide.[ch]: added a setter for "orientation". diff --git a/app/actions/error-console-actions.c b/app/actions/error-console-actions.c index eb7ce59c1b..c1d1075746 100644 --- a/app/actions/error-console-actions.c +++ b/app/actions/error-console-actions.c @@ -41,22 +41,28 @@ static const GimpActionEntry error_console_actions[] = GIMP_HELP_ERRORS_DIALOG }, { "error-console-clear", GTK_STOCK_CLEAR, - N_("_Clear Errors"), "", - N_("Clear errors"), + N_("_Clear"), "", + N_("Clear error console"), G_CALLBACK (error_console_clear_cmd_callback), - GIMP_HELP_ERRORS_CLEAR } + GIMP_HELP_ERRORS_CLEAR }, + + { "error-console-select-all", NULL, + N_("Select _All"), "", + N_("Select all errors"), + G_CALLBACK (error_console_select_all_cmd_callback), + GIMP_HELP_ERRORS_SELECT_ALL } }; static const GimpEnumActionEntry error_console_save_actions[] = { { "error-console-save-all", GTK_STOCK_SAVE_AS, - N_("Save _All Errors to File..."), "", - N_("Save all errors"), + N_("_Save Error Log to File..."), "", + N_("Save error log"), FALSE, FALSE, GIMP_HELP_ERRORS_SAVE }, { "error-console-save-selection", GTK_STOCK_SAVE_AS, - N_("Save _Selection to File..."), "", + N_("Save S_election to File..."), "", N_("Save selection"), TRUE, FALSE, GIMP_HELP_ERRORS_SAVE } @@ -90,6 +96,7 @@ error_console_actions_update (GimpActionGroup *group, gimp_action_group_set_action_sensitive (group, action, (condition) != 0) SET_SENSITIVE ("error-console-clear", TRUE); + SET_SENSITIVE ("error-console-select-all", TRUE); SET_SENSITIVE ("error-console-save-all", TRUE); SET_SENSITIVE ("error-console-save-selection", selection); diff --git a/app/actions/error-console-commands.c b/app/actions/error-console-commands.c index cb8692a75c..71299499fa 100644 --- a/app/actions/error-console-commands.c +++ b/app/actions/error-console-commands.c @@ -55,6 +55,18 @@ error_console_clear_cmd_callback (GtkAction *action, gtk_text_buffer_delete (console->text_buffer, &start_iter, &end_iter); } +void +error_console_select_all_cmd_callback (GtkAction *action, + gpointer data) +{ + GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data); + GtkTextIter start_iter; + GtkTextIter end_iter; + + gtk_text_buffer_get_bounds (console->text_buffer, &start_iter, &end_iter); + gtk_text_buffer_select_range (console->text_buffer, &start_iter, &end_iter); +} + void error_console_save_cmd_callback (GtkAction *action, gint value, diff --git a/app/actions/error-console-commands.h b/app/actions/error-console-commands.h index b370b6c106..6b5c792c0d 100644 --- a/app/actions/error-console-commands.h +++ b/app/actions/error-console-commands.h @@ -20,11 +20,13 @@ #define __ERROR_CONSOLE_COMMANDS_H__ -void error_console_clear_cmd_callback (GtkAction *action, - gpointer data); -void error_console_save_cmd_callback (GtkAction *action, - gint value, - gpointer data); +void error_console_clear_cmd_callback (GtkAction *action, + gpointer data); +void error_console_select_all_cmd_callback (GtkAction *action, + gpointer data); +void error_console_save_cmd_callback (GtkAction *action, + gint value, + gpointer data); #endif /* __ERROR_CONSOLE_COMMANDS_H__ */ diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h index 7c230d1be4..fc03b49b9d 100644 --- a/app/widgets/gimphelp-ids.h +++ b/app/widgets/gimphelp-ids.h @@ -390,6 +390,7 @@ #define GIMP_HELP_ERRORS_DIALOG "gimp-errors-dialog" #define GIMP_HELP_ERRORS_CLEAR "gimp-errors-clear" #define GIMP_HELP_ERRORS_SAVE "gimp-errors-save" +#define GIMP_HELP_ERRORS_SELECT_ALL "gimp-errors-select-all" #define GIMP_HELP_PREFS_DIALOG "gimp-prefs-dialog" #define GIMP_HELP_PREFS_NEW_IMAGE "gimp-prefs-new-image" diff --git a/menus/error-console-menu.xml b/menus/error-console-menu.xml index a4b0a2d639..f4c788d4c2 100644 --- a/menus/error-console-menu.xml +++ b/menus/error-console-menu.xml @@ -4,6 +4,7 @@ +