diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2006-03-29 15:20:21 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-03-29 15:20:21 +0000 |
commit | 3c29d067a171a7f035751361a4eb14a7e50f3dc6 (patch) | |
tree | 79713400a7d5f6cef0f5169305ef4a60f3553da9 | |
parent | a560c6ba97a0a8dfde9ad8e1fb3931c4a94ce8a7 (diff) | |
download | gtk+-3c29d067a171a7f035751361a4eb14a7e50f3dc6.tar.gz |
Emit page-added before switch-page
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 5 | ||||
-rw-r--r-- | gtk/gtknotebook.c | 30 |
3 files changed, 25 insertions, 15 deletions
@@ -1,5 +1,10 @@ 2006-03-29 Matthias Clasen <mclasen@redhat.com> + * gtk/gtknotebook.c (gtk_notebook_real_insert_page): Emit + page-added before switch-page. (#335691, Christian Persch) + +2006-03-29 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkfilechooserdefault.c (queue_edited_idle): Handle double queuing, rather than asserting that it does not happen. (#330617) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e98872f38f..75cc8c3695 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,10 @@ 2006-03-29 Matthias Clasen <mclasen@redhat.com> + * gtk/gtknotebook.c (gtk_notebook_real_insert_page): Emit + page-added before switch-page. (#335691, Christian Persch) + +2006-03-29 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkfilechooserdefault.c (queue_edited_idle): Handle double queuing, rather than asserting that it does not happen. (#330617) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 54bef0845f..27fef2a95c 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3662,25 +3662,31 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook, gtk_widget_show (tab_label); else gtk_widget_hide (tab_label); + + page->mnemonic_activate_signal = + g_signal_connect (tab_label, + "mnemonic_activate", + G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page), + notebook); } + page->notify_visible_handler = g_signal_connect (child, "notify::visible", + G_CALLBACK (page_visible_cb), notebook); + + g_signal_emit (notebook, + notebook_signals[PAGE_ADDED], + 0, + child, + position); + if (!notebook->cur_page) { gtk_notebook_switch_page (notebook, page, 0); gtk_notebook_switch_focus_tab (notebook, NULL); } - page->notify_visible_handler = g_signal_connect (G_OBJECT (child), "notify::visible", - G_CALLBACK (page_visible_cb), notebook); gtk_notebook_update_tab_states (notebook); - if (tab_label) - page->mnemonic_activate_signal = - g_signal_connect (tab_label, - "mnemonic_activate", - G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page), - notebook); - gtk_widget_child_notify (child, "tab-expand"); gtk_widget_child_notify (child, "tab-fill"); gtk_widget_child_notify (child, "tab-pack"); @@ -3689,12 +3695,6 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook, gtk_widget_child_notify (child, "position"); gtk_widget_thaw_child_notify (child); - g_signal_emit (notebook, - notebook_signals[PAGE_ADDED], - 0, - child, - position); - return position; } |