Keep around an "active_display" member in GimpImageWindow
And add gimp_image_window_set_active_display(). Call the new function when creating a shell. Will all be done by the means of a GimpContext later, but is a step to get rid of FIXME hacks.
This commit is contained in:
@ -807,6 +807,10 @@ gimp_display_shell_new (GimpDisplay *display,
|
|||||||
shell->popup_manager = popup_manager;
|
shell->popup_manager = popup_manager;
|
||||||
shell->display_factory = display_factory;
|
shell->display_factory = display_factory;
|
||||||
|
|
||||||
|
/* FIXME image window */
|
||||||
|
gimp_image_window_set_active_display (GIMP_IMAGE_WINDOW (shell),
|
||||||
|
display);
|
||||||
|
|
||||||
if (display->image)
|
if (display->image)
|
||||||
{
|
{
|
||||||
options = shell->options;
|
options = shell->options;
|
||||||
|
@ -348,12 +348,29 @@ gimp_image_window_style_set (GtkWidget *widget,
|
|||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_window_set_active_display (GimpImageWindow *window,
|
||||||
|
GimpDisplay *display)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE_WINDOW (window));
|
||||||
|
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||||
|
|
||||||
|
if (display == window->active_display)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (window->active_display)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
window->active_display = display;
|
||||||
|
}
|
||||||
|
|
||||||
GimpDisplay *
|
GimpDisplay *
|
||||||
gimp_image_window_get_active_display (GimpImageWindow *window)
|
gimp_image_window_get_active_display (GimpImageWindow *window)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_IMAGE_WINDOW (window), NULL);
|
g_return_val_if_fail (GIMP_IS_IMAGE_WINDOW (window), NULL);
|
||||||
|
|
||||||
return GIMP_DISPLAY_SHELL (window)->display;
|
return window->active_display;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -36,6 +36,8 @@ struct _GimpImageWindow
|
|||||||
{
|
{
|
||||||
GimpWindow parent_instance;
|
GimpWindow parent_instance;
|
||||||
|
|
||||||
|
GimpDisplay *active_display;
|
||||||
|
|
||||||
GimpUIManager *menubar_manager;
|
GimpUIManager *menubar_manager;
|
||||||
|
|
||||||
GtkWidget *main_vbox;
|
GtkWidget *main_vbox;
|
||||||
@ -53,6 +55,8 @@ struct _GimpImageWindowClass
|
|||||||
|
|
||||||
GType gimp_image_window_get_type (void) G_GNUC_CONST;
|
GType gimp_image_window_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
void gimp_image_window_set_active_display (GimpImageWindow *window,
|
||||||
|
GimpDisplay *display);
|
||||||
GimpDisplay * gimp_image_window_get_active_display (GimpImageWindow *window);
|
GimpDisplay * gimp_image_window_get_active_display (GimpImageWindow *window);
|
||||||
|
|
||||||
void gimp_image_window_set_fullscreen (GimpImageWindow *window,
|
void gimp_image_window_set_fullscreen (GimpImageWindow *window,
|
||||||
|
Reference in New Issue
Block a user