From 7fad909266d49203537a28e6acc5d96b14bf4e7f Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Fri, 3 Oct 2014 14:05:18 +0000 Subject: Imported Upstream version 0.99 --- src/xsane-gamma.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/xsane-gamma.c') diff --git a/src/xsane-gamma.c b/src/xsane-gamma.c index d43eecf..fdae222 100644 --- a/src/xsane-gamma.c +++ b/src/xsane-gamma.c @@ -2157,6 +2157,12 @@ static gint xsane_histogram_win_delete(GtkWidget *widget, gpointer data) { DBG(DBG_proc, "xsane_histogram_win_delete\n"); + if (preferences.show_histogram) + { + xsane_window_get_position(xsane.histogram_dialog, &xsane.histogram_dialog_posx, &xsane.histogram_dialog_posy); + gtk_window_move(GTK_WINDOW(xsane.histogram_dialog), xsane.histogram_dialog_posx, xsane.histogram_dialog_posy); + } + gtk_widget_hide(widget); preferences.show_histogram = FALSE; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(xsane.show_histogram_widget), preferences.show_histogram); @@ -2183,7 +2189,7 @@ void xsane_create_histogram_dialog(const char *devicetext) xsane.histogram_dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_resizable(GTK_WINDOW(xsane.histogram_dialog), FALSE); - gtk_window_move(GTK_WINDOW(xsane.histogram_dialog), XSANE_HISTOGRAM_POS_X, XSANE_HISTOGRAM_POS_Y); + gtk_window_move(GTK_WINDOW(xsane.histogram_dialog), XSANE_HISTOGRAM_DIALOG_POS_X, XSANE_HISTOGRAM_DIALOG_POS_Y); g_signal_connect(GTK_OBJECT(xsane.histogram_dialog), "delete_event", GTK_SIGNAL_FUNC(xsane_histogram_win_delete), NULL); sprintf(windowname, "%s %s", WINDOW_HISTOGRAM, devicetext); gtk_window_set_title(GTK_WINDOW(xsane.histogram_dialog), windowname); -- cgit v1.2.3