--- a/gntentry.c Tue Nov 27 19:30:18 2007 +0000
+++ b/gntentry.c Wed Nov 28 03:51:18 2007 +0000
@@ -575,15 +575,16 @@
next_begin_word(const char *text, const char *end)
+ while (text && text < end && g_unichar_isspace(g_utf8_get_char(text))) + text = g_utf8_find_next_char(text, end); ch = g_utf8_get_char(text);
while ((text = g_utf8_find_next_char(text, end)) != NULL && text <= end) {
gunichar cur = g_utf8_get_char(text);
- while (text && text < end && g_unichar_isspace(g_utf8_get_char(text)))
- text = g_utf8_find_next_char(text, end);
return (text ? text : end);
--- a/gntwm.c Tue Nov 27 19:30:18 2007 +0000
+++ b/gntwm.c Wed Nov 28 03:51:18 2007 +0000
@@ -28,6 +28,7 @@
+#include <glib/gstdio.h> @@ -41,6 +42,7 @@
@@ -663,12 +665,12 @@
-dump_screen(GntBindable *bindable, GList *null)
+dump_file_save(GntFileSel *fs, const char *path, const char *f, gpointer n) - FILE *file = fopen("dump.html", "w");
@@ -690,6 +692,11 @@
+ if ((file = g_fopen(path, "w+")) == NULL) { fprintf(file, "<head>\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\n</head>\n<body>\n");
for (y = 0; y < getmaxy(stdscr); y++) {
@@ -796,6 +803,24 @@
fprintf(file, "</pre>\n</body>");
+ gnt_widget_destroy(GNT_WIDGET(fs)); +dump_file_cancel(GntWidget *w, GntFileSel *fs) + gnt_widget_destroy(GNT_WIDGET(fs)); +dump_screen(GntBindable *b, GList *null) + GntWidget *window = gnt_file_sel_new(); + GntFileSel *sel = GNT_FILE_SEL(window); + gnt_file_sel_set_suggested_filename(sel, "dump.html"); + g_signal_connect(G_OBJECT(sel), "file_selected", G_CALLBACK(dump_file_save), NULL); + g_signal_connect(G_OBJECT(sel->cancel), "activate", G_CALLBACK(dump_file_cancel), sel); + gnt_widget_show(window); @@ -1366,7 +1391,7 @@
gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "window-list", window_list,
gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "dump-screen", dump_screen,
gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "shift-left", shift_left,
gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "shift-right", shift_right,