svnno****@sourc*****
svnno****@sourc*****
Sat Feb 14 13:19:54 JST 2009
Revision: 3677 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3677 Author: ikezoe Date: 2009-02-14 13:19:54 +0900 (Sat, 14 Feb 2009) Log Message: ----------- * src/kz-notebook.[ch]: added kz_notebook_get_current_embed and kz_notebook_get_nth_embed. * src/kz-window.h: Added KZ_WINDOW_CURRENT_EMBED and KZ_WINDOW_NTH_EMBED. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/kz-notebook.c kazehakase/trunk/src/kz-notebook.h kazehakase/trunk/src/kz-window.h Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2009-02-14 02:03:29 UTC (rev 3676) +++ kazehakase/trunk/ChangeLog 2009-02-14 04:19:54 UTC (rev 3677) @@ -3,6 +3,10 @@ * src/generate-def.mk: Extract all symbols. * src/utils/utils.[ch]: Workaround for exporting kz_win32_base_path. * src/*.c: Use XX_CLASS macros instead of casting directory. + * src/kz-notebook.[ch]: added kz_notebook_get_current_embed and + kz_notebook_get_nth_embed. + * src/kz-window.h: Added KZ_WINDOW_CURRENT_EMBED and + KZ_WINDOW_NTH_EMBED. 2009-02-13 Hiroyuki Ikezoe <poinc****@ikezo*****> Modified: kazehakase/trunk/src/kz-notebook.c =================================================================== --- kazehakase/trunk/src/kz-notebook.c 2009-02-14 02:03:29 UTC (rev 3676) +++ kazehakase/trunk/src/kz-notebook.c 2009-02-14 04:19:54 UTC (rev 3677) @@ -123,7 +123,7 @@ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_type_class_add_private (gobject_class, sizeof(KzNotebookPrivate)); + g_type_class_add_private(gobject_class, sizeof(KzNotebookPrivate)); } static void @@ -787,6 +787,18 @@ return FALSE; } +KzEmbed * +kz_notebook_get_nth_embed (KzNotebook *notebook, gint page_num) +{ + GtkWidget *widget; + + g_return_val_if_fail(KZ_IS_NOTEBOOK(notebook), NULL); + + widget = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page_num); + + return KZ_EMBED(widget); +} + GtkWidget * kz_notebook_get_nth_page (KzNotebook *notebook, gint page_num) { @@ -872,6 +884,12 @@ return KZ_NOTEBOOK_GET_PRIVATE(notebook)->dragged_page; } +KzEmbed * +kz_notebook_get_dragged_embed (KzNotebook *notebook) +{ + return KZ_EMBED(KZ_NOTEBOOK_GET_PRIVATE(notebook)->dragged_page); +} + GNode * kz_notebook_get_tree (KzNotebook *notebook) { Modified: kazehakase/trunk/src/kz-notebook.h =================================================================== --- kazehakase/trunk/src/kz-notebook.h 2009-02-14 02:03:29 UTC (rev 3676) +++ kazehakase/trunk/src/kz-notebook.h 2009-02-14 04:19:54 UTC (rev 3677) @@ -66,6 +66,8 @@ GdkScrollDirection direction); GtkWidget *kz_notebook_get_nth_page (KzNotebook *notebook, gint page_num); +KzEmbed *kz_notebook_get_nth_embed (KzNotebook *notebook, + gint page_num); gint kz_notebook_page_num (KzNotebook *notebook, GtkWidget *child); gint kz_notebook_get_current_page (KzNotebook *notebook); @@ -77,6 +79,7 @@ KzTabLabel *kz_notebook_get_sibling_tab_label (KzNotebook *notebook, KzTabLabel *label); GtkWidget *kz_notebook_get_dragged_page (KzNotebook *notebook); +KzEmbed *kz_notebook_get_dragged_embed (KzNotebook *notebook); GNode *kz_notebook_get_tree (KzNotebook *notebook); void kz_notebook_foreach_page (KzNotebook *notebook, GFunc func, Modified: kazehakase/trunk/src/kz-window.h =================================================================== --- kazehakase/trunk/src/kz-window.h 2009-02-14 02:03:29 UTC (rev 3676) +++ kazehakase/trunk/src/kz-window.h 2009-02-14 04:19:54 UTC (rev 3677) @@ -148,6 +148,11 @@ #define KZ_WINDOW_CURRENT_PAGE(kz) \ (KZ_IS_WINDOW(kz) ? KZ_WINDOW_NTH_PAGE(kz, kz_notebook_get_current_page(KZ_NOTEBOOK(kz->notebook))) : NULL) +#define KZ_WINDOW_NTH_EMBED(kz, n) \ + (KZ_IS_WINDOW(kz) ? kz_notebook_get_nth_embed(KZ_NOTEBOOK(KZ_WINDOW(kz)->notebook),n) : NULL) +#define KZ_WINDOW_CURRENT_EMBED(kz) \ + (KZ_IS_WINDOW(kz) ? KZ_WINDOW_NTH_EMBED(kz, kz_notebook_get_current_page(KZ_NOTEBOOK(kz->notebook))) : NULL) + #define KZ_WINDOW_SET_SENSITIVE(kz, action_name, sensitive) \ { \ if (KZ_IS_WINDOW(kz) && GTK_IS_ACTION_GROUP(kz->actions)) { \