diff options
author | Timo Sirainen <cras@irssi.org> | 2000-05-15 08:25:45 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-05-15 08:25:45 +0000 |
commit | cbdaf7d06d021a1072363f1a80ff73c7423c7bd8 (patch) | |
tree | 067c27c2823ed2825e7fb432b35318659e63e806 /src/fe-common/irc/notifylist | |
parent | 969cfe8abcdff1047696c22e13c79c1f4c239137 (diff) | |
download | irssi-cbdaf7d06d021a1072363f1a80ff73c7423c7bd8.zip |
Lots of changes again. Biggest ones:
- window's text buffer should work better
- themes are almost working, you can change the text formats with /format
- automatically try to rejoin the channel after 5 minutes if the join there
failed because it was "temporarily unavailable" (netsplits)
- generally cleaning code..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@216 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/notifylist')
-rw-r--r-- | src/fe-common/irc/notifylist/Makefile.am | 3 | ||||
-rw-r--r-- | src/fe-common/irc/notifylist/fe-notifylist.c | 6 | ||||
-rw-r--r-- | src/fe-common/irc/notifylist/module-formats.c | 28 | ||||
-rw-r--r-- | src/fe-common/irc/notifylist/module-formats.h | 3 | ||||
-rw-r--r-- | src/fe-common/irc/notifylist/module.h | 3 |
5 files changed, 26 insertions, 17 deletions
diff --git a/src/fe-common/irc/notifylist/Makefile.am b/src/fe-common/irc/notifylist/Makefile.am index c44da278..53dd7374 100644 --- a/src/fe-common/irc/notifylist/Makefile.am +++ b/src/fe-common/irc/notifylist/Makefile.am @@ -13,5 +13,6 @@ libfe_common_irc_notifylist_la_SOURCES = \ fe-notifylist.c \ module-formats.c -noinst_headers = \ +noinst_HEADERS = \ + module.h \ module-formats.h diff --git a/src/fe-common/irc/notifylist/fe-notifylist.c b/src/fe-common/irc/notifylist/fe-notifylist.c index 7520cdb8..3a799de3 100644 --- a/src/fe-common/irc/notifylist/fe-notifylist.c +++ b/src/fe-common/irc/notifylist/fe-notifylist.c @@ -31,6 +31,8 @@ #include "ircnet-setup.h" #include "irc/notifylist/notifylist.h" +#include "themes.h" + /* add the nick of a hostmask to list if it isn't there already */ static GSList *mask_add_once(GSList *list, const char *mask) { @@ -224,6 +226,8 @@ static void notifylist_unidle(IRC_SERVER_REC *server, const char *nick, void fe_notifylist_init(void) { + theme_register(fecommon_irc_notifylist_formats); + command_bind("notify", NULL, (SIGNAL_FUNC) cmd_notify); signal_add("notifylist joined", (SIGNAL_FUNC) notifylist_joined); signal_add("notifylist left", (SIGNAL_FUNC) notifylist_left); @@ -233,6 +237,8 @@ void fe_notifylist_init(void) void fe_notifylist_deinit(void) { + theme_unregister(); + command_unbind("notify", (SIGNAL_FUNC) cmd_notify); signal_remove("notifylist joined", (SIGNAL_FUNC) notifylist_joined); signal_remove("notifylist left", (SIGNAL_FUNC) notifylist_left); diff --git a/src/fe-common/irc/notifylist/module-formats.c b/src/fe-common/irc/notifylist/module-formats.c index 7a673457..e369d52c 100644 --- a/src/fe-common/irc/notifylist/module-formats.c +++ b/src/fe-common/irc/notifylist/module-formats.c @@ -23,17 +23,19 @@ FORMAT_REC fecommon_irc_notifylist_formats[] = { - { MODULE_NAME, "Notifylist", 0 }, - - /* ---- */ - { NULL, "Notifylist", 0 }, - - { "notify_join", "%_$0%_ %K[%n$1@$2%K] [%n%_$3%_%K]%n has joined to $4", 5, { 0, 0, 0, 0, 0 } }, - { "notify_part", "%_$0%_ has left $4", 5, { 0, 0, 0, 0, 0 } }, - { "notify_away", "%_$0%_ %K[%n$5%K]%n %K[%n$1@$2%K] [%n%_$3%_%K]%n is now away: $4", 6, { 0, 0, 0, 0, 0, 0 } }, - { "notify_unaway", "%_$0%_ %K[%n$4%K]%n %K[%n$1@$2%K] [%n%_$3%_%K]%n is now unaway", 5, { 0, 0, 0, 0, 0 } }, - { "notify_unidle", "%_$0%_ %K[%n$5%K]%n %K[%n$1@$2%K] [%n%_$3%_%K]%n just stopped idling", 6, { 0, 0, 0, 0, 0, 0 } }, - { "notify_online", "On $0: %_$1%_", 2, { 0, 0 } }, - { "notify_offline", "Offline: $0", 1, { 0 } }, - { "notify_list", "$0: $1 $2 $3", 4, { 0, 0, 0, 0 } } + { MODULE_NAME, "Notifylist", 0 }, + + /* ---- */ + { NULL, "Notifylist", 0 }, + + { "notify_join", "%_$0%_ %K[%n$1@$2%K] [%n%_$3%_%K]%n has joined to $4", 5, { 0, 0, 0, 0, 0 } }, + { "notify_part", "%_$0%_ has left $4", 5, { 0, 0, 0, 0, 0 } }, + { "notify_away", "%_$0%_ %K[%n$5%K]%n %K[%n$1@$2%K] [%n%_$3%_%K]%n is now away: $4", 6, { 0, 0, 0, 0, 0, 0 } }, + { "notify_unaway", "%_$0%_ %K[%n$4%K]%n %K[%n$1@$2%K] [%n%_$3%_%K]%n is now unaway", 5, { 0, 0, 0, 0, 0 } }, + { "notify_unidle", "%_$0%_ %K[%n$5%K]%n %K[%n$1@$2%K] [%n%_$3%_%K]%n just stopped idling", 6, { 0, 0, 0, 0, 0, 0 } }, + { "notify_online", "On $0: %_$1%_", 2, { 0, 0 } }, + { "notify_offline", "Offline: $0", 1, { 0 } }, + { "notify_list", "$0: $1 $2 $3", 4, { 0, 0, 0, 0 } }, + + { NULL, NULL, 0 }, }; diff --git a/src/fe-common/irc/notifylist/module-formats.h b/src/fe-common/irc/notifylist/module-formats.h index f5f855dc..e37045f1 100644 --- a/src/fe-common/irc/notifylist/module-formats.h +++ b/src/fe-common/irc/notifylist/module-formats.h @@ -16,6 +16,3 @@ enum { }; extern FORMAT_REC fecommon_irc_notifylist_formats[]; -#define MODULE_FORMATS fecommon_irc_notifylist_formats - -#include "printformat.h" diff --git a/src/fe-common/irc/notifylist/module.h b/src/fe-common/irc/notifylist/module.h new file mode 100644 index 00000000..00aa01e3 --- /dev/null +++ b/src/fe-common/irc/notifylist/module.h @@ -0,0 +1,3 @@ +#include "common.h" + +#define MODULE_NAME "fe-common/irc/notifylist" |