changeset 232:9a6ba4b38e63

[/trunk] Changeset 245 by mikael * Fix backspace handling (KEY_BACKSPACE isn't reliable) * UTF-8 locale detection * Display a warning when the locale is UTF-8 * Display log notice when sending a notification request message * Update TODO * Update INSTALL and mcabberrc.example files for better explanations
author mikael
date Wed, 08 Jun 2005 18:33:28 +0000
parents 193c08454aac
children 65c564e957a8
files mcabber/INSTALL mcabber/autogen.sh mcabber/mcabberrc.example mcabber/src/TODO mcabber/src/commands.c mcabber/src/screen.c
diffstat 6 files changed, 35 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/INSTALL	Tue Jun 07 19:46:42 2005 +0000
+++ b/mcabber/INSTALL	Wed Jun 08 18:33:28 2005 +0000
@@ -1,3 +1,22 @@
+This file contains the generic instructions; the short version is:
+$ ./configure
+$ make
+... and if you want to install the software:
+$ make install
+(If you don't want to install it, the "mcabber" binary lies in
+the src/ directory after the build procedure)
+
+MCabber needs ncurses and ncurses development packages to build correctly.
+If you want SSL support, you will need openssl lib & dev packages as well.
+
+Please have a look at the README file before launching mcabber.
+
+Please send me a message (mcabber AT lilotux DOT net) if you have
+questions, suggestions or even patches...
+
+Mikael
+
+
 Installation Instructions
 *************************
 
--- a/mcabber/autogen.sh	Tue Jun 07 19:46:42 2005 +0000
+++ b/mcabber/autogen.sh	Wed Jun 08 18:33:28 2005 +0000
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-libtoolize --force --automake
+libtoolize --force --automake --copy
 aclocal -I macros/
 autoheader
 autoconf
--- a/mcabber/mcabberrc.example	Tue Jun 07 19:46:42 2005 +0000
+++ b/mcabber/mcabberrc.example	Wed Jun 08 18:33:28 2005 +0000
@@ -9,7 +9,8 @@
 #password = yourpassword
 server = your.jabber.server
 #port = 5222
-resource = yourresource
+# If you don't know what a resource is, you can leave "mcabber" here.
+resource = mcabber
 ssl = 0
 
 # Keepalive
--- a/mcabber/src/TODO	Tue Jun 07 19:46:42 2005 +0000
+++ b/mcabber/src/TODO	Wed Jun 08 18:33:28 2005 +0000
@@ -11,6 +11,8 @@
 * Presence notification is always accepted.  We should ask...
 * Unread message queue (/roster next_message & Ctrl-q)
 * Multi-lines messages
+* Resource priority
+* UTF-8 support
 * Display status / chat mode
 * /connect /disconnect ?
 * Key bindings (ex: F5 <-> /group toggle)
--- a/mcabber/src/commands.c	Tue Jun 07 19:46:42 2005 +0000
+++ b/mcabber/src/commands.c	Wed Jun 08 18:33:28 2005 +0000
@@ -287,6 +287,7 @@
   // FIXME check arg =~ jabber id
   // 2nd parameter = optional nickname (XXX NULL for now...)
   jb_addbuddy(arg, NULL);
+  scr_LogPrint("Sent presence notfication request to <%s>", arg);
 }
 
 void do_del(char *arg)
--- a/mcabber/src/screen.c	Tue Jun 07 19:46:42 2005 +0000
+++ b/mcabber/src/screen.c	Wed Jun 08 18:33:28 2005 +0000
@@ -6,6 +6,7 @@
 #include <time.h>
 #include <ctype.h>
 #include <locale.h>
+#include <langinfo.h>
 
 #include "screen.h"
 #include "hbuf.h"
@@ -43,6 +44,7 @@
 
 static int chatmode;
 int update_roster;
+int utf8_mode = 0;
 
 static char       inputLine[INPUTLINE_LENGTH+1];
 static char      *ptr_inputline;
@@ -445,6 +447,7 @@
   ptr_inputline = inputLine;
 
   setlocale(LC_CTYPE, "");
+  utf8_mode = (strcmp(nl_langinfo(CODESET), "UTF-8") == 0);
 
   return;
 }
@@ -512,6 +515,9 @@
     logPanel_border = new_panel(logWnd_border);
     logPanel    = new_panel(logWnd);
     inputPanel  = new_panel(inputWnd);
+
+    if (utf8_mode)
+      scr_LogPrint("WARNING: UTF-8 not yet supported!");
   } else {
     // Update panels
     replace_panel(rosterPanel, rosterWnd);
@@ -1309,6 +1315,8 @@
     check_offset(1);
   } else {
     switch(key) {
+      case 8:     // Ctrl-h
+      case 127:   // Backspace too
       case KEY_BACKSPACE:
           if (ptr_inputline != (char*)&inputLine) {
             char *c = --ptr_inputline;
@@ -1425,6 +1433,8 @@
           break;
       default:
           scr_LogPrint("Unkown key=%d", key);
+          if (utf8_mode)
+            scr_LogPrint("WARNING: UTF-8 not yet supported!");
     }
   }
   if (completion_started && key != 9 && key != KEY_RESIZE)