summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Tydus <Tydus@Tydus.org>2011-11-01 20:52:09 +0800
committerGravatar waker <wakeroid@gmail.com>2011-11-03 18:52:54 +0100
commit095c21789c8210f5e51452b83b8e4b3caa6989dd (patch)
tree62ecbce74ffaf0f95c8020dfb61d150de83493e0 /plugins
parent68e5d9028ed55cc2dc4fc8d9274ae74a07a304e4 (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.c11
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