mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't create a new window for a page if there's already an open blank
window. Fixes 334672. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13644 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2006-03-15 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/gnc-main-window.c: Don't create a new window for
|
||||
a page if there's already an open blank window. Fixes 334672.
|
||||
|
||||
2006-03-15 Andreas Köhler <andi5.py@gmx.net>
|
||||
|
||||
* src/gnome/window-reconcile.c: Add a call to gnc_tm_set_day_end
|
||||
|
||||
@@ -1949,6 +1949,7 @@ gnc_main_window_open_page (GncMainWindow *window,
|
||||
const gchar *icon;
|
||||
GtkWidget *image;
|
||||
gboolean immutable = FALSE;
|
||||
GList *tmp;
|
||||
|
||||
if (window)
|
||||
g_return_if_fail (GNC_IS_MAIN_WINDOW (window));
|
||||
@@ -1960,8 +1961,18 @@ gnc_main_window_open_page (GncMainWindow *window,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Does the page want to be in a new window? */
|
||||
if (gnc_plugin_page_get_use_new_window(page)) {
|
||||
window = gnc_main_window_new ();
|
||||
/* See if there's a blank window. If so, use that. */
|
||||
for (tmp = active_windows; tmp; tmp = g_list_next(tmp)) {
|
||||
window = GNC_MAIN_WINDOW(tmp->data);
|
||||
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
|
||||
if (priv->installed_pages == NULL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (tmp == NULL)
|
||||
window = gnc_main_window_new ();
|
||||
gtk_widget_show(GTK_WIDGET(window));
|
||||
} else if ((window == NULL) && active_windows) {
|
||||
window = active_windows->data;
|
||||
|
||||
Reference in New Issue
Block a user