Compare commits

..

No commits in common. "e23f917f024b421dfee53a2f49f1280a10403ac3" and "50fc355a0f36b7b033690558e4a273a280eab9b7" have entirely different histories.

3 changed files with 10 additions and 8 deletions

View file

@ -1,3 +1,7 @@
--[[ utility functions ]]--
--
--[[ page module ]]-- --[[ page module ]]--
page = {} page = {}
@ -8,11 +12,11 @@ end
function page.Append(content) function page.Append(content)
for i, v in pairs(content) do for i, v in pairs(content) do
__ext_pageview_append_tag("t", v) __ext_pageview_append_tag("t", v[1] or v)
end end
end end
function page.Commit(content) function page.Commit(content)
page.Set("") page.Set("")
page.Append(content) page.Append(content)
end end

View file

@ -1,5 +1,3 @@
page.Commit{ page.Commit{
"<span foreground='blue' size='x-large'>Blue text</span> is <i>cool</i>!", "yeah"
"\n", }
"so true"
}

4
ui.c
View file

@ -34,9 +34,9 @@ void page_application_show(struct application_state* state) {
void page_application_text_buffer_append_text(struct application_state* state, const char* display_text) { void page_application_text_buffer_append_text(struct application_state* state, const char* display_text) {
GtkTextIter iter; GtkTextIter iter;
gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(state->pageview_buffer), &iter); gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(state->pageview_buffer), &iter);
gtk_text_buffer_insert_markup(GTK_TEXT_BUFFER(state->pageview_buffer), &iter, display_text, -1); gtk_text_buffer_insert(GTK_TEXT_BUFFER(state->pageview_buffer), &iter, display_text, -1);
} }
void page_application_text_buffer_set_text(struct application_state* state, const char* text) { void page_application_text_buffer_set_text(struct application_state* state, const char* text) {
gtk_text_buffer_set_text(state->pageview_buffer, text, -1); gtk_text_buffer_set_text(state->pageview_buffer, text, -1);
} }