Added testhtml
This commit is contained in:
parent
3745da7930
commit
b168742345
@ -1,4 +1,4 @@
|
||||
EXTRA_PROGRAMS += medit mterm markup termbuffer testfileview testpaned testpanedfileview miniglade langparser testobject testfold ms
|
||||
EXTRA_PROGRAMS += testhtml medit mterm markup termbuffer testfileview testpaned testpanedfileview miniglade langparser testobject testfold ms
|
||||
bin_PROGRAMS =
|
||||
|
||||
|
||||
@ -85,9 +85,6 @@ nodist_testfold_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
|
||||
endif
|
||||
|
||||
|
||||
##############################################################################
|
||||
## langparser
|
||||
##
|
||||
langparser_LDFLAGS = $(ldflags)
|
||||
langparser_LDADD = $(ldadd)
|
||||
langparser_SOURCES = tests/testparser.c
|
||||
@ -95,10 +92,6 @@ if !MOO_BUILD_LIB
|
||||
nodist_langparser_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
|
||||
endif
|
||||
|
||||
|
||||
##############################################################################
|
||||
## ms
|
||||
##
|
||||
ms_LDFLAGS = $(ldflags)
|
||||
ms_LDADD = $(ldadd) -lreadline
|
||||
ms_SOURCES = tests/mscript.c
|
||||
@ -106,19 +99,25 @@ if !MOO_BUILD_LIB
|
||||
nodist_ms_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
|
||||
endif
|
||||
|
||||
testhtml_LDFLAGS = $(ldflags)
|
||||
testhtml_LDADD = $(ldadd)
|
||||
testhtml_SOURCES = tests/testhtml.c
|
||||
if !MOO_BUILD_LIB
|
||||
nodist_testhtml_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
|
||||
endif
|
||||
|
||||
|
||||
##############################################################################
|
||||
## mterm
|
||||
##
|
||||
mterm_LDFLAGS = $(ldflags)
|
||||
mterm_LDADD = $(ldadd)
|
||||
termbuffer_LDFLAGS = $(ldflags)
|
||||
termbuffer_LDADD = $(ldadd)
|
||||
|
||||
mterm_SOURCES = tests/mterm.c
|
||||
termbuffer_SOURCES = tests/termbuffer.c
|
||||
if !MOO_BUILD_LIB
|
||||
nodist_mterm_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
|
||||
endif
|
||||
|
||||
termbuffer_LDFLAGS = $(ldflags)
|
||||
termbuffer_LDADD = $(ldadd)
|
||||
termbuffer_SOURCES = tests/termbuffer.c
|
||||
if !MOO_BUILD_LIB
|
||||
nodist_termbuffer_SOURCES = $(libmoo_sources) $(nodist_libmoo_sources)
|
||||
endif
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "moohtml.h"
|
||||
#include "mooapp/moohtml.h"
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
static void
|
||||
@ -47,7 +48,7 @@ int main (int argc, char *argv[])
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (html), 6);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (html), 6);
|
||||
gtk_container_add (GTK_CONTAINER (swin), html);
|
||||
// moo_html_set_font (MOO_HTML (html), "Tahoma 12");
|
||||
moo_html_set_font (MOO_HTML (html), "Tahoma 12");
|
||||
|
||||
statusbar = gtk_statusbar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), statusbar, FALSE, FALSE, 0);
|
||||
@ -58,10 +59,15 @@ int main (int argc, char *argv[])
|
||||
G_CALLBACK (hover_link), statusbar);
|
||||
|
||||
if (!argv[1])
|
||||
g_error ("usage: %s <file.html>", argv[0]);
|
||||
{
|
||||
g_print ("usage: %s <file.html>\n", argv[0]);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (!moo_html_load_file (MOO_HTML (html), argv[1], NULL))
|
||||
{
|
||||
g_error ("ERROR");
|
||||
}
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
gtk_main ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user