mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Andreas Köhler's patch to fix a problem where switching windows
repeatedly confusing the Windows menu. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13039 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
fc77d038a1
commit
1992088cff
@ -1,7 +1,11 @@
|
||||
2006-01-29 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/gnc-main-window.c: Andreas Köhler's patch to fix
|
||||
a problem where switching windows repeatedly confusing the
|
||||
Windows menu. Fixes #327943.
|
||||
|
||||
* gnc-tree-model-commodity.c: Andreas Köhler's patch to fix
|
||||
commodity editor warnings/crash.
|
||||
commodity editor warnings/crash. Fixes #328788.
|
||||
|
||||
2006-01-29 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
|
@ -1123,12 +1123,12 @@ gnc_main_window_update_radio_button (GncMainWindow *window)
|
||||
* bottom) on the screen */
|
||||
action_list = gtk_radio_action_get_group(GTK_RADIO_ACTION(action));
|
||||
first_action = g_slist_last(action_list)->data;
|
||||
g_signal_handlers_block_by_func(first_action,
|
||||
gnc_main_window_cmd_window_raise, window);
|
||||
g_signal_handlers_block_by_func(G_OBJECT(first_action),
|
||||
G_CALLBACK(gnc_main_window_cmd_window_raise), window);
|
||||
DEBUG("blocked signal on %p, set %p active, window %p", first_action, action, window);
|
||||
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), TRUE);
|
||||
g_signal_handlers_unblock_by_func(first_action,
|
||||
gnc_main_window_cmd_window_raise, window);
|
||||
g_signal_handlers_unblock_by_func(G_OBJECT(first_action),
|
||||
G_CALLBACK(gnc_main_window_cmd_window_raise), window);
|
||||
g_free(action_name);
|
||||
LEAVE(" ");
|
||||
}
|
||||
@ -2775,19 +2775,23 @@ gnc_main_window_cmd_window_move_page (GtkAction *action, GncMainWindow *window)
|
||||
static void
|
||||
gnc_main_window_cmd_window_raise (GtkAction *action,
|
||||
GtkRadioAction *current,
|
||||
GncMainWindow *unused)
|
||||
GncMainWindow *old_window)
|
||||
{
|
||||
GncMainWindow *window;
|
||||
GncMainWindow *new_window;
|
||||
gint value;
|
||||
|
||||
g_return_if_fail(GTK_IS_ACTION(action));
|
||||
g_return_if_fail(GTK_IS_RADIO_ACTION(current));
|
||||
g_return_if_fail(GNC_IS_MAIN_WINDOW(unused));
|
||||
g_return_if_fail(GNC_IS_MAIN_WINDOW(old_window));
|
||||
|
||||
ENTER("action %p, current %p, window %p", action, current, unused);
|
||||
ENTER("action %p, current %p, window %p", action, current, old_window);
|
||||
value = gtk_radio_action_get_current_value(current);
|
||||
window = g_list_nth_data(active_windows, value);
|
||||
gtk_window_present(GTK_WINDOW(window));
|
||||
new_window = g_list_nth_data(active_windows, value);
|
||||
gtk_window_present(GTK_WINDOW(new_window));
|
||||
|
||||
/* revert the change in the radio group
|
||||
* impossible while handling "changed" (G_SIGNAL_NO_RECURSE) */
|
||||
g_idle_add((GSourceFunc)gnc_main_window_update_radio_button, old_window);
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user