Commit 96b347a0 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

set "Close all" insensitive when there are no displays.

2005-09-24  Michael Natterer  <mitch@gimp.org>

	* app/actions/file-actions.c: set "Close all" insensitive when
	there are no displays.
parent 0e36f721
2005-09-24 Michael Natterer <mitch@gimp.org>
* app/actions/file-actions.c: set "Close all" insensitive when
there are no displays.
2005-09-24 Michael Natterer <mitch@gimp.org>
* app/actions/view-actions.c
......
......@@ -54,6 +54,9 @@ static void file_actions_last_opened_reorder (GimpContainer *container,
GimpImagefile *unused1,
gint unused2,
GimpActionGroup *group);
static void file_actions_close_all_update (GimpContainer *container,
GimpObject *unused,
GimpActionGroup *group);
static GimpActionEntry file_actions[] =
......@@ -184,6 +187,15 @@ file_actions_setup (GimpActionGroup *group)
group, 0);
file_actions_last_opened_update (group->gimp->documents, NULL, group);
g_signal_connect_object (group->gimp->displays, "add",
G_CALLBACK (file_actions_close_all_update),
group, 0);
g_signal_connect_object (group->gimp->displays, "remove",
G_CALLBACK (file_actions_close_all_update),
group, 0);
file_actions_close_all_update (group->gimp->displays, NULL, group);
}
void
......@@ -282,3 +294,14 @@ file_actions_last_opened_reorder (GimpContainer *container,
{
file_actions_last_opened_update (container, unused1, group);
}
static void
file_actions_close_all_update (GimpContainer *container,
GimpObject *unused,
GimpActionGroup *group)
{
gint n_displays = gimp_container_num_children (container);
gimp_action_group_set_action_sensitive (group, "file-close-all",
n_displays > 0);
}
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