]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
- redraw the screen in certain situations when LANG=ja_JP.eucJP to
authormsw <msw>
Mon, 2 Apr 2001 23:57:47 +0000 (23:57 +0000)
committermsw <msw>
Mon, 2 Apr 2001 23:57:47 +0000 (23:57 +0000)
  prevent corrupting kanji characters

checkboxtree.c
configure.in
form.c
listbox.c
newt.c
newt.spec
newt_pr.h
textbox.c

index e70e54ebfe78d3928167170d6fa60fdcdb4d9706..cf3ff41d7c711cdb7e7e3c96ea5906caefe903f1 100644 (file)
@@ -424,6 +424,9 @@ static void ctDraw(newtComponent co) {
     item = ct->firstItem;
     
     i = 0;
+
+    newtTrashScreen();
+    
     while (*item && i < co->height) {
        newtGotorc(co->top + i, co->left);
        if (*item == *ct->currItem) {
index 1ddaa4a85b05d36636c3a31c454675ec1c0e0f3c..62091cc5f320640f783648da65052ea4947eae33 100644 (file)
@@ -5,7 +5,7 @@ AC_CONFIG_HEADER(config.h)
 
 VERSION=$(awk '/^%define version/ {print $3}' newt.spec)
 
-VERSION=0.50.21
+VERSION=0.50.22
 SONAME=0.50
 AC_SUBST(VERSION)
 AC_SUBST(SONAME)
diff --git a/form.c b/form.c
index 6f68886b19d469c2a17134978351d0bbda8cc85d..952f879475642478e553f4043336d36ed007f160 100644 (file)
--- a/form.c
+++ b/form.c
@@ -590,6 +590,7 @@ void newtDrawForm(newtComponent co) {
 
     SLsmg_set_color(form->background);
     newtClearBox(co->left, co->top, co->width, co->height);
+
     for (i = 0, el = form->elements; i < form->numComps; i++, el++) {
        /* the scrollbar *always* fits somewhere */
        if (el->co == form->vertBar) {
index ef276aeb4c43767d3d50feb10ca28089bedfa94a..e86fb18332bbe5828ce63c23d4e569f68f498ac0 100644 (file)
--- a/listbox.c
+++ b/listbox.c
@@ -486,6 +486,8 @@ static void listboxDraw(newtComponent co)
 
     if (!co->isMapped) return ;
 
+    newtTrashScreen();
+    
     if(li->flags & NEWT_FLAG_BORDER) {
       if(li->isActive)
          SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
diff --git a/newt.c b/newt.c
index 42b0371a457812fb2198c217098d96f80989f7d6..8e208421ced0a14030d66797c957917dbed14f3b 100644 (file)
--- a/newt.c
+++ b/newt.c
@@ -32,6 +32,7 @@ static char ** currentHelpline = NULL;
 static int cursorRow, cursorCol;
 static int needResize;
 static int cursorOn = 1;
+static int trashScreen = 0;
 
 static const char * defaultHelpLine =
 "  <Tab>/<Alt-Tab> between elements   |  <Space> selects   |  <F12> next screen"
@@ -188,7 +189,11 @@ void newtResizeScreen(int redraw) {
 #endif
 
 int newtInit(void) {
-    char * MonoValue, * MonoEnv = "NEWT_MONO";
+    char * MonoValue, * MonoEnv = "NEWT_MONO", * lang;
+
+    lang = getenv ("LANG");
+    if (lang && !strcasecmp (lang, "ja_JP.eucJP"))
+       trashScreen = 1;
 
     /* use the version variable just to be sure it gets included */
     strlen(version);
@@ -411,6 +416,8 @@ int newtOpenWindow(int left, int top, int width, int height,
        n += currentWindow->width + 3;
     }
 
+    newtTrashScreen();
+
     SLsmg_set_color(NEWT_COLORSET_BORDER);
     SLsmg_draw_box(top - 1, left - 1, height + 2, width + 2);
 
@@ -490,6 +497,8 @@ void newtPopWindow(void) {
 
     SLsmg_set_char_set(0);
 
+    newtTrashScreen();
+
     newtRefresh();
 }
 
@@ -686,3 +695,9 @@ void newtCursorOn(void) {
     cursorOn = 1;
     SLtt_set_cursor_visibility (cursorOn);
 }
+
+void newtTrashScreen(void) {
+    if (trashScreen)
+       SLsmg_touch_screen();
+}
+     
index 3be4f457a80cfb86547f89fa35a079eaefbdfd34..30b258e9a469f48b7d99a29f216489b54b84dc13 100644 (file)
--- a/newt.spec
+++ b/newt.spec
@@ -1,6 +1,6 @@
 Summary: A development library for text mode user interfaces.
 Name: newt
-%define version 0.50.21
+%define version 0.50.22
 Version: %{version}
 Release: 1
 Copyright: LGPL
@@ -105,6 +105,17 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Mon Apr  2 2001 Matt Wilson <msw@redhat.com>
+- redraw the screen in certain situations when LANG=ja_JP.eucJP to
+  prevent corrupting kanji characters
+
+* Mon Apr  2 2001 Elloit Lee <sopwith@redhat.com>
+- Allow python scripts to watch file handles
+- Fix 64-bit warnings in snackmodule
+- Misc snack.py cleanups
+- Add NEWT_FD_EXCEPT to allow watching for fd exceptions
+- In newtExitStruct, return the first file descriptor that an event occurred on 
+
 * Fri Mar 30 2001 Matt Wilson <msw@redhat.com>
 - don't blow the stack if we push a help line that is longer than the
   curret number of columns
index 76f5e2f6fda621e1949fae129e906fa1f025c8e1..258322d1eba6badbf8be8ae126311f5575ecc730 100644 (file)
--- a/newt_pr.h
+++ b/newt_pr.h
@@ -26,6 +26,7 @@ void newtDrawBox(int left, int top, int width, int height, int shadow);
 void newtClearBox(int left, int top, int width, int height);
 
 int newtGetKey(void);
+void newtTrashScreen(void);
 
 struct newtComponent_struct {
     /* common data */
index 2578738d71df187133a87ed1c9cb6ba53d49ef6c..ff0a64cd74b00f2e64c45092ce96aca9172377ae 100644 (file)
--- a/textbox.c
+++ b/textbox.c
@@ -329,7 +329,9 @@ static void textboxDraw(newtComponent c) {
     }
 
     SLsmg_set_color(NEWT_COLORSET_TEXTBOX);
-   
+
+    newtTrashScreen();
+
     for (i = 0; (i + tb->topLine) < tb->numLines && i < c->height; i++) {
        newtGotorc(c->top + i, c->left);
        SLsmg_write_string(tb->lines[i + tb->topLine]);