mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
0e36f7217e
commit
96b347a0b8
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2005-09-24 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/actions/view-actions.c
|
* app/actions/view-actions.c
|
||||||
|
|
|
@ -54,6 +54,9 @@ static void file_actions_last_opened_reorder (GimpContainer *container,
|
||||||
GimpImagefile *unused1,
|
GimpImagefile *unused1,
|
||||||
gint unused2,
|
gint unused2,
|
||||||
GimpActionGroup *group);
|
GimpActionGroup *group);
|
||||||
|
static void file_actions_close_all_update (GimpContainer *container,
|
||||||
|
GimpObject *unused,
|
||||||
|
GimpActionGroup *group);
|
||||||
|
|
||||||
|
|
||||||
static GimpActionEntry file_actions[] =
|
static GimpActionEntry file_actions[] =
|
||||||
|
@ -184,6 +187,15 @@ file_actions_setup (GimpActionGroup *group)
|
||||||
group, 0);
|
group, 0);
|
||||||
|
|
||||||
file_actions_last_opened_update (group->gimp->documents, NULL, group);
|
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
|
void
|
||||||
|
@ -282,3 +294,14 @@ file_actions_last_opened_reorder (GimpContainer *container,
|
||||||
{
|
{
|
||||||
file_actions_last_opened_update (container, unused1, group);
|
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);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue