|
From: <kr_...@us...> - 2003-08-31 13:22:36
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv6633/port/src/cbits/GTK
Modified Files:
Notebook.c
Log Message:
Make NotebookPage a member of Activity class
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Notebook.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Notebook.c 31 Aug 2003 12:56:26 -0000 1.3
--- Notebook.c 31 Aug 2003 13:22:32 -0000 1.4
***************
*** 3,6 ****
--- 3,16 ----
#include "Handlers_stub.h"
+ static void notebook_switch_page_handler(GtkNotebook *notebook,GtkNotebookPage *page,gint page_num,gpointer user_data)
+ {
+ // send deactivate message for old
+ gint old_page_num = g_list_index(notebook->children, notebook->cur_page);
+ handleWindowDeactivate(gtk_notebook_get_nth_page(notebook, old_page_num));
+
+ // send activate message for new
+ handleWindowActivate(gtk_notebook_get_nth_page(notebook, page_num));
+ }
+
WindowHandle osCreateNotebook(WindowHandle window)
{
***************
*** 8,11 ****
--- 18,24 ----
notebook = gtk_notebook_new();
+ gtk_signal_connect (GTK_OBJECT(window), "switch-page",
+ GTK_SIGNAL_FUNC(notebook_switch_page_handler),
+ NULL);
gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), gtk_true());
gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook));
|