mirror of https://github.com/GNOME/gimp.git
app: gimp_get_image_window_iter() -> gimp_get_image_windows()
Rename gimp_get_image_window_iter() to gimp_get_image_windows() and make it return a copy of the list of windows. Typically we will kill or create new windows when we use this function which is why we do a copy.
This commit is contained in:
parent
39ee4ffa43
commit
ca5fbf45d4
|
@ -1020,11 +1020,11 @@ gimp_get_display_iter (Gimp *gimp)
|
|||
}
|
||||
|
||||
GList *
|
||||
gimp_get_image_window_iter (Gimp *gimp)
|
||||
gimp_get_image_windows (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
return gimp->image_windows;
|
||||
return g_list_copy (gimp->image_windows);
|
||||
}
|
||||
|
||||
GList *
|
||||
|
|
|
@ -171,7 +171,7 @@ void gimp_exit (Gimp *gimp,
|
|||
|
||||
GList * gimp_get_image_iter (Gimp *gimp);
|
||||
GList * gimp_get_display_iter (Gimp *gimp);
|
||||
GList * gimp_get_image_window_iter(Gimp *gimp);
|
||||
GList * gimp_get_image_windows (Gimp *gimp);
|
||||
GList * gimp_get_tool_info_iter (Gimp *gimp);
|
||||
|
||||
void gimp_set_global_buffer (Gimp *gimp,
|
||||
|
|
|
@ -183,12 +183,11 @@ static void
|
|||
gimp_ui_configurer_configure_for_single_window (GimpUIConfigurer *ui_configurer)
|
||||
{
|
||||
Gimp *gimp = GIMP (ui_configurer->p->gimp);
|
||||
GList *windows = gimp_get_image_windows (gimp);
|
||||
GList *iter = NULL;
|
||||
gboolean docks_moved = FALSE;
|
||||
|
||||
for (iter = gimp_get_image_window_iter (gimp);
|
||||
iter;
|
||||
iter = g_list_next (iter))
|
||||
for (iter = windows; iter; iter = g_list_next (iter))
|
||||
{
|
||||
GimpImageWindow *image_window = GIMP_IMAGE_WINDOW (iter->data);
|
||||
|
||||
|
@ -219,23 +218,26 @@ gimp_ui_configurer_configure_for_single_window (GimpUIConfigurer *ui_configurer)
|
|||
/* FIXME: Move all displays to a single window */
|
||||
gimp_image_window_set_show_docks (image_window, TRUE);
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_ui_configurer_configure_for_multi_window (GimpUIConfigurer *ui_configurer)
|
||||
{
|
||||
Gimp *gimp = GIMP (ui_configurer->p->gimp);
|
||||
GList *iter = NULL;
|
||||
Gimp *gimp = GIMP (ui_configurer->p->gimp);
|
||||
GList *windows = gimp_get_image_windows (gimp);
|
||||
GList *iter = NULL;
|
||||
|
||||
for (iter = gimp_get_image_window_iter (gimp);
|
||||
iter;
|
||||
iter = g_list_next (iter))
|
||||
for (iter = windows; iter; iter = g_list_next (iter))
|
||||
{
|
||||
GimpImageWindow *image_window = GIMP_IMAGE_WINDOW (iter->data);
|
||||
|
||||
/* FIXME: Move all displays to a multiple windows */
|
||||
gimp_image_window_set_show_docks (image_window, FALSE);
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue