updates.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 10 Feb 2002 14:41:38 +0000 (14:41 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 10 Feb 2002 14:41:38 +0000 (14:41 +0000)
apps/irssi/silc.conf
apps/irssi/src/common.h
apps/irssi/src/core/core.c
apps/irssi/src/core/settings.c
apps/irssi/src/fe-text/gui-printtext.c
apps/irssi/src/fe-text/term-terminfo.c
apps/irssi/src/fe-text/textbuffer-view.c
apps/irssi/src/perl/Makefile.am
apps/irssi/src/silc/core/silc-core.c

index e99332a6c36f80279e3babfc0a10cd37ce7fd27b..1fe433d474a3f403aabe3d414ca5a5d59f85c726 100644 (file)
@@ -2,7 +2,6 @@ servers = (
   { address = "silc.silcnet.org"; chatnet = SILCNet; port = 706; },
   { address = "silc.ytti.fi"; chatnet = SILCNet; port = 706; },
   { address = "silc.peelo.com"; chatnet = SILCNet; port = 706; },
-  { address = "silc.silcnet.org"; chatnet = SILCNet; port = 707; }
 );
 
 chatnets = {
index a4240be50b57525c0997f76ca70f3cef4e10584f..d6cc0421d7f296cb5d18916e707c41f2311c5213 100644 (file)
@@ -7,6 +7,9 @@
 #define IRSSI_DIR_SHORT "~/.silc"
 #define IRSSI_DIR_FULL "%s/.silc" /* %s == g_get_home_dir() */
 
+#define IRSSI_GLOBAL_CONFIG "silc.conf" /* config file name in /etc/ */
+#define IRSSI_HOME_CONFIG "silc.conf" /* config file name in ~/.irssi/ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 2321208eb086c999c7dd21e00d44ef88671eccf0..f39c50d3e258d9e3cb8e7e4dfcee14bce93cf1ba 100644 (file)
@@ -184,7 +184,7 @@ void core_init_paths(int argc, char *argv[])
         if (irssi_dir == NULL)
                irssi_dir = g_strdup_printf(IRSSI_DIR_FULL, g_get_home_dir());
        if (irssi_config_file == NULL)
-               irssi_config_file = g_strdup_printf("%s/config", irssi_dir);
+               irssi_config_file = g_strdup_printf("%s/"IRSSI_HOME_CONFIG, irssi_dir);
 
        session_set_binary(argv[0]);
 }
index 1a98462af1397c273fdd8794649cd0d374c2c8c1..d99757e0a6f0c69ede91359e87b040b0fff1a110 100644 (file)
@@ -467,7 +467,7 @@ static CONFIG_REC *parse_configfile(const char *fname)
        else {
                /* user configuration file not found, use the default one
                   from sysconfdir */
-                path = SYSCONFDIR"/irssi.conf";
+                path = SYSCONFDIR"/"IRSSI_GLOBAL_CONFIG;
                if (stat(path, &statbuf) != 0) {
                        /* no configuration file in sysconfdir ..
                           use the build-in configuration */
index 3bd1de3696557b17dd0f6d0784a767a0edbab2bb..affd2b9f518aa9601a24d20988f791bb0fbd4d92 100644 (file)
@@ -244,8 +244,8 @@ static void sig_gui_print_text(WINDOW_REC *window, void *fgcolor,
        if (window == NULL) {
                 g_return_if_fail(next_xpos != -1);
 
-               attr |= fg > 0 ? fg : ATTR_RESETFG;
-               attr |= bg > 0 ? (bg << 4) : ATTR_RESETBG;
+               attr |= fg >= 0 ? fg : ATTR_RESETFG;
+               attr |= bg >= 0 ? (bg << 4) : ATTR_RESETBG;
                term_set_color(root_window, attr);
 
                term_move(root_window, next_xpos, next_ypos);
index b900e2e9185079ffc96810d13bc7ee509f63324d..acf5430d9c1dc7a718cab5b9f786ceb4b9774098 100644 (file)
@@ -183,7 +183,7 @@ void term_clear(void)
 {
        if (term_detached) return;
 
-        term_set_color(root_window, 0);
+        term_set_color(root_window, ATTR_RESET);
        terminfo_clear();
         term_move_reset(0, 0);
 
index a5d7f2ed1d6b556d2a3351cfb71268d995275f6c..d98fc85c759e38a234dd7e0d5b4bedd754aa3fa2 100644 (file)
@@ -114,7 +114,7 @@ static void update_cmd_color(unsigned char cmd, int *color)
                        if ((cmd & LINE_COLOR_DEFAULT) == 0)
                                *color |= (cmd & 0x0f) << 4;
                        else {
-                               *color |= ATTR_RESETBG;
+                               *color = (*color & FGATTR) | ATTR_RESETBG;
                                 if (cmd & LINE_COLOR_BLINK)
                                        *color |= ATTR_BLINK;
                        }
@@ -124,7 +124,7 @@ static void update_cmd_color(unsigned char cmd, int *color)
                        if ((cmd & LINE_COLOR_DEFAULT) == 0)
                                *color |= cmd & 0x0f;
                        else {
-                               *color |= ATTR_RESETFG;
+                               *color = (*color & BGATTR) | ATTR_RESETFG;
                                 if (cmd & LINE_COLOR_BOLD)
                                        *color |= ATTR_BOLD;
                        }
index 965605a2c7d8449242be3b40872423517dcf0f40..81be9c67042274a08ebbb60b84a6d1ac8fe20975 100644 (file)
@@ -4,6 +4,8 @@ include $(top_srcdir)/Makefile.defines.in
 
 moduledir = $(silc_modulesdir)
 
+perl_dirs = common ui textui
+
 module_LTLIBRARIES = $(perl_module_lib) $(perl_module_fe_lib)
 noinst_LTLIBRARIES = $(perl_static_lib) $(perl_static_fe_lib)
 EXTRA_LTLIBRARIES = \
@@ -120,7 +122,7 @@ EXTRA_DIST = \
        $(textui_sources)
 
 all-local:
-       for dir in common ui textui; do \
+       for dir in $(perl_dirs); do \
          cd $$dir && \
          if [ ! -f Makefile ]; then \
             $(perlpath) Makefile.PL $(PERL_MM_PARAMS); \
@@ -130,16 +132,18 @@ all-local:
        done
 
 install-exec-local:
-       for dir in common ui textui; do \
+       for dir in $(perl_dirs); do \
          cd $$dir && $(MAKE) install && cd ..; \
        done
 
 clean-generic:
-       rm -f common/Makefile ui/Makefile textui/Makefile
+       for dir in $(perl_dirs); do rm -f $$dir/Makefile; done
 
 distclean-generic:
-       -(cd common && $(MAKE) realclean && rm -f Makefile.PL)
-       -(cd ui && $(MAKE) realclean && rm -f Makefile.PL)
-       -(cd textui && $(MAKE) realclean && rm -f Makefile.PL)
+       for dir in $(perl_dirs); do \
+         cd $$dir; \
+         $(MAKE) realclean; rm -f Makefile.PL; \
+         cd ..; \
+       done
 
 libperl_core_la_LIBADD = $(PERL_LDFLAGS)
index 2876a3a6268d0cbdc926fdc668e76ca15a8c75e6..2cb4d9cb428a6471094a642a708a711f3c02352c 100644 (file)
@@ -91,6 +91,11 @@ static SERVER_CONNECT_REC *create_server_connect(void)
   return g_malloc0(sizeof(SILC_SERVER_CONNECT_REC));
 }
 
+static void destroy_server_connect(SERVER_CONNECT_REC *conn)
+{
+
+}
+
 /* Checks user information and saves them to the config file it they
    do not exist there already. */
 
@@ -321,6 +326,7 @@ void silc_core_init_finish(SERVER_REC *server)
   rec->create_server_setup = create_server_setup;
   rec->create_channel_setup = create_channel_setup;
   rec->create_server_connect = create_server_connect;
+  rec->destroy_server_connect = destroy_server_connect;
   rec->server_connect = (SERVER_REC *(*) (SERVER_CONNECT_REC *))
     silc_server_connect; 
   rec->channel_create = (CHANNEL_REC *(*) (SERVER_REC *, const char *, int))