app/actions/error-console-commands.[ch] app/widgets/gimphelp-ids.h added

2006-06-07  Sven Neumann  <sven@gimp.org>

	* 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.
This commit is contained in:
Sven Neumann 2006-06-07 13:47:55 +00:00 committed by Sven Neumann
parent 7c7b6a3896
commit 75815e3a23
6 changed files with 42 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2006-06-07 Sven Neumann <sven@gimp.org>
* 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 <sven@gimp.org>
* app/core/gimpguide.[ch]: added a setter for "orientation".

View File

@ -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);

View File

@ -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,

View File

@ -22,6 +22,8 @@
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);

View File

@ -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"

View File

@ -4,6 +4,7 @@
<ui>
<popup action="error-console-popup">
<menuitem action="error-console-clear" />
<menuitem action="error-console-select-all" />
<separator />
<menuitem action="error-console-save-all" />
<menuitem action="error-console-save-selection" />