diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-04-16 00:27:34 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-04-16 00:27:34 +0200 |
commit | 5ffe58d92a54ac4286b2e3aeae139e2f88a3b702 (patch) | |
tree | 3db8f68f6b7bb443e7cc38276c6e052e3b465d1d /src/stylesheet_editor.c | |
parent | de1c1c49f6f84afe5f0b0c1d8d445fbd8e89997a (diff) |
Tree store testing
Diffstat (limited to 'src/stylesheet_editor.c')
-rw-r--r-- | src/stylesheet_editor.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/stylesheet_editor.c b/src/stylesheet_editor.c index efff646..5cdd012 100644 --- a/src/stylesheet_editor.c +++ b/src/stylesheet_editor.c @@ -200,6 +200,21 @@ static void set_bg_from_ss(Stylesheet *ss, enum style_element el, static void set_values_from_presentation(StylesheetEditor *se) { + GtkTreeIter iter; + GtkTreeIter iter2; + GValue val = G_VALUE_INIT; + GValue val2 = G_VALUE_INIT; + + gtk_tree_store_append(GTK_TREE_STORE(se->element_tree), &iter, NULL); + g_value_init(&val, G_TYPE_STRING); + g_value_set_static_string(&val, "Slide"); + gtk_tree_store_set_value(GTK_TREE_STORE(se->element_tree), &iter, 0, &val); + + gtk_tree_store_append(GTK_TREE_STORE(se->element_tree), &iter2, &iter); + g_value_init(&val2, G_TYPE_STRING); + g_value_set_static_string(&val2, "Slide title"); + gtk_tree_store_set_value(GTK_TREE_STORE(se->element_tree), &iter2, 0, &val2); + set_geom_from_ss(se->priv->stylesheet, se->priv->el, se->w, se->h, se->x, se->y, se->w_units, se->h_units); @@ -387,6 +402,7 @@ static void dims_sig(GtkSpinButton *widget, StylesheetEditor *se) #endif } + static void font_sig(GtkFontButton *widget, StylesheetEditor *se) { } @@ -396,10 +412,12 @@ static void fgcol_sig(GtkColorButton *widget, StylesheetEditor *se) { } + static void bg_sig(GtkColorButton *widget, StylesheetEditor *se) { } + static void selector_change_sig(GtkComboBoxText *widget, StylesheetEditor *se) { //se->priv->el = gtk_combo_box_get_active_id(GTK_COMBO_BOX(widget)); @@ -458,6 +476,7 @@ void stylesheet_editor_class_init(StylesheetEditorClass *klass) SE_BIND_CHILD(y, dims_sig); SE_BIND_CHILD(w_units, dims_sig); SE_BIND_CHILD(h_units, dims_sig); + gtk_widget_class_bind_template_child(widget_class, StylesheetEditor, element_tree); gtk_widget_class_bind_template_callback(widget_class, revert_sig); |