mirror of https://github.com/GNOME/gimp.git
only save the screen number to the sessionrc if the screen is not the
2003-11-13 Sven Neumann <sven@gimp.org> * app/widgets/gimpsessioninfo.c: only save the screen number to the sessionrc if the screen is not the default screen.
This commit is contained in:
parent
6838c48046
commit
4c6d623f4d
|
@ -5,6 +5,11 @@
|
||||||
and "Print Size" to be consistent with the scale dialog.
|
and "Print Size" to be consistent with the scale dialog.
|
||||||
Fixes two issues of bug #86276.
|
Fixes two issues of bug #86276.
|
||||||
|
|
||||||
|
2003-11-13 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/widgets/gimpsessioninfo.c: only save the screen number to
|
||||||
|
the sessionrc if the screen is not the default screen.
|
||||||
|
|
||||||
2003-11-13 Sven Neumann <sven@gimp.org>
|
2003-11-13 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/widgets/gimpsessioninfo.c (gimp_session_info_deserialize):
|
* app/widgets/gimpsessioninfo.c (gimp_session_info_deserialize):
|
||||||
|
|
|
@ -59,6 +59,8 @@ enum
|
||||||
SESSION_INFO_DOCKABLE_AUX
|
SESSION_INFO_DOCKABLE_AUX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_SCREEN -1
|
||||||
|
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
|
@ -201,7 +203,10 @@ gimp_session_info_save (GimpSessionInfo *info,
|
||||||
if (info->open)
|
if (info->open)
|
||||||
{
|
{
|
||||||
gimp_config_writer_open (writer, "open-on-exit");
|
gimp_config_writer_open (writer, "open-on-exit");
|
||||||
gimp_config_writer_printf (writer, "%d", info->screen);
|
|
||||||
|
if (info->screen != DEFAULT_SCREEN)
|
||||||
|
gimp_config_writer_printf (writer, "%d", info->screen);
|
||||||
|
|
||||||
gimp_config_writer_close (writer);
|
gimp_config_writer_close (writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,6 +416,8 @@ gimp_session_info_deserialize (GScanner *scanner,
|
||||||
|
|
||||||
info = g_new0 (GimpSessionInfo, 1);
|
info = g_new0 (GimpSessionInfo, 1);
|
||||||
|
|
||||||
|
info->screen = DEFAULT_SCREEN;
|
||||||
|
|
||||||
if (strcmp (entry_name, "dock"))
|
if (strcmp (entry_name, "dock"))
|
||||||
{
|
{
|
||||||
info->toplevel_entry = gimp_dialog_factory_find_entry (factory,
|
info->toplevel_entry = gimp_dialog_factory_find_entry (factory,
|
||||||
|
@ -540,20 +547,21 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
||||||
GimpDialogFactory *factory)
|
GimpDialogFactory *factory)
|
||||||
{
|
{
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkScreen *screen;
|
GdkScreen *screen = NULL;
|
||||||
|
|
||||||
g_return_if_fail (info != NULL);
|
g_return_if_fail (info != NULL);
|
||||||
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
||||||
|
|
||||||
display = gdk_display_get_default ();
|
display = gdk_display_get_default ();
|
||||||
|
|
||||||
screen = gdk_display_get_screen (display, info->screen);
|
if (info->screen != DEFAULT_SCREEN)
|
||||||
|
screen = gdk_display_get_screen (display, info->screen);
|
||||||
|
|
||||||
if (! screen)
|
if (! screen)
|
||||||
screen = gdk_display_get_default_screen (display);
|
screen = gdk_display_get_default_screen (display);
|
||||||
|
|
||||||
info->open = FALSE;
|
info->open = FALSE;
|
||||||
info->screen = 0;
|
info->screen = DEFAULT_SCREEN;
|
||||||
|
|
||||||
if (info->toplevel_entry)
|
if (info->toplevel_entry)
|
||||||
{
|
{
|
||||||
|
@ -727,14 +735,19 @@ gimp_session_info_get_geometry (GimpSessionInfo *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! info->toplevel_entry || info->toplevel_entry->remember_if_open)
|
if (! info->toplevel_entry || info->toplevel_entry->remember_if_open)
|
||||||
{
|
info->open = GTK_WIDGET_VISIBLE (info->widget);
|
||||||
info->open = GTK_WIDGET_VISIBLE (info->widget);
|
|
||||||
info->screen = gdk_screen_get_number (gtk_widget_get_screen (info->widget));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
|
info->open = FALSE;
|
||||||
|
|
||||||
|
info->screen = DEFAULT_SCREEN;
|
||||||
|
|
||||||
|
if (info->open)
|
||||||
{
|
{
|
||||||
info->open = FALSE;
|
GdkDisplay *display = gtk_widget_get_display (info->widget);
|
||||||
info->screen = 0;
|
GdkScreen *screen = gtk_widget_get_screen (info->widget);
|
||||||
|
|
||||||
|
if (screen != gdk_display_get_default_screen (display))
|
||||||
|
info->screen = gdk_screen_get_number (screen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue