Commit 75815e3a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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.
parent 7c7b6a38
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".
......
......@@ -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);
......
......@@ -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,
......
......@@ -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__ */
......@@ -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"
......
......@@ -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" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment