mirror of https://github.com/GNOME/gimp.git
only fiddle with GtkRecentManager when "save-document-history" is enabled.
2008-03-25 Sven Neumann <sven@gimp.org> * app/actions/documents-commands.c: only fiddle with GtkRecentManager when "save-document-history" is enabled. * app/config/gimprc-blurbs.h * app/dialogs/preferences-dialog.c: changed description and label for the "save-document-history" option. svn path=/trunk/; revision=25212
This commit is contained in:
parent
244b50a357
commit
cf1e3e4525
|
@ -1,3 +1,12 @@
|
|||
2008-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/actions/documents-commands.c: only fiddle with
|
||||
GtkRecentManager when "save-document-history" is enabled.
|
||||
|
||||
* app/config/gimprc-blurbs.h
|
||||
* app/dialogs/preferences-dialog.c: changed description and label
|
||||
for the "save-document-history" option.
|
||||
|
||||
2008-03-24 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimplanguagestore.[ch]
|
||||
|
|
|
@ -169,16 +169,16 @@ documents_remove_cmd_callback (GtkAction *action,
|
|||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpImagefile *imagefile;
|
||||
const gchar *uri;
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
if (context->gimp->config->save_document_history)
|
||||
{
|
||||
GimpImagefile *imagefile = gimp_context_get_imagefile (context);
|
||||
const gchar *uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
|
||||
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
|
||||
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (),
|
||||
uri, NULL);
|
||||
}
|
||||
|
||||
gimp_container_view_remove_active (editor->view);
|
||||
}
|
||||
|
@ -188,10 +188,12 @@ documents_clear_cmd_callback (GtkAction *action,
|
|||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GtkWidget *dialog;
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
Gimp *gimp = context->gimp;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
if (gimp->config->save_document_history)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gimp_message_dialog_new (_("Clear Document History"),
|
||||
GTK_STOCK_CLEAR,
|
||||
|
@ -219,13 +221,13 @@ documents_clear_cmd_callback (GtkAction *action,
|
|||
_("Clear the Recent Documents list?"));
|
||||
|
||||
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Clearing the document history will permanently "
|
||||
"remove all items from the recent documents "
|
||||
"list in all applications."));
|
||||
_("Clearing the document history will "
|
||||
"permanently remove all items from "
|
||||
"the recent documents list in all "
|
||||
"applications."));
|
||||
|
||||
if (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK)
|
||||
{
|
||||
Gimp *gimp = context->gimp;
|
||||
GError *error = NULL;
|
||||
|
||||
gimp_container_clear (gimp->documents);
|
||||
|
@ -240,6 +242,11 @@ documents_clear_cmd_callback (GtkAction *action,
|
|||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_container_clear (gimp->documents);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -266,7 +266,8 @@ N_("Remember the current tool, pattern, color, and brush across GIMP " \
|
|||
"sessions.")
|
||||
|
||||
#define SAVE_DOCUMENT_HISTORY_BLURB \
|
||||
N_("Add all opened and saved files to the document history on disk.")
|
||||
N_("Keep a permanent record of all opened and saved files in the Recent " \
|
||||
"Documents list.")
|
||||
|
||||
#define SAVE_SESSION_INFO_BLURB \
|
||||
N_("Save the positions and sizes of the main dialogs when GIMP exits.")
|
||||
|
|
|
@ -1604,7 +1604,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
vbox2 = prefs_frame_new (_("Document History"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (object, "save-document-history",
|
||||
_("Save document _history on exit"),
|
||||
_("Keep record of used files in the Recent Documents list"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue