diff options
author | Tydus <Tydus@Tydus.org> | 2011-11-01 20:52:09 +0800 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-11-03 18:52:54 +0100 |
commit | 095c21789c8210f5e51452b83b8e4b3caa6989dd (patch) | |
tree | 62ecbce74ffaf0f95c8020dfb61d150de83493e0 /plugins | |
parent | 68e5d9028ed55cc2dc4fc8d9274ae74a07a304e4 (diff) |
Implemented Add tab
create a placeholder
append it to tabs
and click on it
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/widgets.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/gtkui/widgets.c b/plugins/gtkui/widgets.c index 26d2524e..9cbed10b 100644 --- a/plugins/gtkui/widgets.c +++ b/plugins/gtkui/widgets.c @@ -694,6 +694,17 @@ on_remove_tab_activate (GtkMenuItem *menuitem, gpointer user_data) { static void on_add_tab_activate (GtkMenuItem *menuitem, gpointer user_data) { + w_tabs_t *w = user_data; + + ddb_gtkui_widget_t *ph; + ph = w_create ("placeholder"); + w_append ((ddb_gtkui_widget_t*)w, ph); + + int i = 0; + for (ddb_gtkui_widget_t *c = w->base.children; c; c = c->next, i++); + w->clicked_page = i-1; + gtk_notebook_set_page (GTK_NOTEBOOK (w->base.widget), w->clicked_page); + } static void |