mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 02:45:43 +02:00
buflist: add command /buflist
This commit is contained in:
+1
-1
@@ -90,7 +90,7 @@ PLUGIN_LIST = {
|
||||
'weechat': 'co',
|
||||
'alias': '',
|
||||
'aspell': 'o',
|
||||
'buflist': 'o',
|
||||
'buflist': 'co',
|
||||
'charset': 'o',
|
||||
'exec': 'o',
|
||||
'fifo': 'o',
|
||||
|
||||
@@ -197,6 +197,7 @@ WeeChat "core" is located in following directories:
|
||||
| buflist/ | Buflist plugin.
|
||||
| buflist.c | Main buflist functions.
|
||||
| buflist-bar-item.c | Buflist bar items.
|
||||
| buflist-command.c | Buflist commands.
|
||||
| buflist-config.c | Buflist config options (file buflist.conf).
|
||||
| charset/ | Charset plugin.
|
||||
| charset.c | Charset functions.
|
||||
|
||||
@@ -199,6 +199,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| buflist/ | Extension Buflist.
|
||||
| buflist.c | Fonctions principales de Buflist.
|
||||
| buflist-bar-item.c | Objets de barre Buflist.
|
||||
| buflist-command.c | Commandes pour Buflist.
|
||||
| buflist-config.c | Options de configuration pour Buflist (fichier buflist.conf).
|
||||
| charset/ | Extension Charset.
|
||||
| charset.c | Fonctions pour Charset.
|
||||
|
||||
@@ -203,6 +203,7 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| buflist/ | buflist プラグイン
|
||||
| buflist.c | buflist の主要関数
|
||||
| buflist-bar-item.c | buflist バー要素
|
||||
| buflist-command.c | buflist コマンド
|
||||
| buflist-config.c | buflist 設定オプション (buflist.conf ファイル)
|
||||
| charset/ | charset プラグイン
|
||||
| charset.c | charset 関数
|
||||
|
||||
@@ -124,6 +124,8 @@
|
||||
./src/plugins/buflist/buflist-bar-item.c
|
||||
./src/plugins/buflist/buflist-bar-item.h
|
||||
./src/plugins/buflist/buflist.c
|
||||
./src/plugins/buflist/buflist-command.c
|
||||
./src/plugins/buflist/buflist-command.h
|
||||
./src/plugins/buflist/buflist-config.c
|
||||
./src/plugins/buflist/buflist-config.h
|
||||
./src/plugins/buflist/buflist.h
|
||||
|
||||
@@ -125,6 +125,8 @@ SET(WEECHAT_SOURCES
|
||||
./src/plugins/buflist/buflist-bar-item.c
|
||||
./src/plugins/buflist/buflist-bar-item.h
|
||||
./src/plugins/buflist/buflist.c
|
||||
./src/plugins/buflist/buflist-command.c
|
||||
./src/plugins/buflist/buflist-command.h
|
||||
./src/plugins/buflist/buflist-config.c
|
||||
./src/plugins/buflist/buflist-config.h
|
||||
./src/plugins/buflist/buflist.h
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
add_library(buflist MODULE
|
||||
buflist.c buflist.h
|
||||
buflist-bar-item.c buflist-bar-item.h
|
||||
buflist-command.c buflist-command.h
|
||||
buflist-config.c buflist-config.h)
|
||||
set_target_properties(buflist PROPERTIES PREFIX "")
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ buflist_la_SOURCES = buflist.c \
|
||||
buflist.h \
|
||||
buflist-bar-item.c \
|
||||
buflist-bar-item.h \
|
||||
buflist-command.c \
|
||||
buflist-command.h \
|
||||
buflist-config.c \
|
||||
buflist-config.h
|
||||
|
||||
|
||||
@@ -144,6 +144,10 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
|
||||
"buffer", ptr_buffer);
|
||||
|
||||
/* set extra variables */
|
||||
weechat_hashtable_set (buflist_hashtable_extra_vars,
|
||||
"format_buffer",
|
||||
weechat_config_string (
|
||||
buflist_config_format_buffer));
|
||||
weechat_hashtable_set (buflist_hashtable_extra_vars,
|
||||
"number", str_number);
|
||||
weechat_hashtable_set (buflist_hashtable_extra_vars,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2017 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
* WeeChat is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* WeeChat is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WEECHAT_BUFLIST_COMMAND_H
|
||||
#define WEECHAT_BUFLIST_COMMAND_H 1
|
||||
|
||||
extern void buflist_command_init ();
|
||||
|
||||
#endif /* WEECHAT_BUFLIST_COMMAND_H */
|
||||
@@ -148,7 +148,8 @@ buflist_config_init ()
|
||||
buflist_config_format_buffer = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"buffer", "string",
|
||||
N_("format of each line with a buffer"),
|
||||
N_("format of each line with a buffer "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:green}${number}.${indent}${color_hotlist}${name}",
|
||||
NULL, 0,
|
||||
@@ -158,7 +159,8 @@ buflist_config_init ()
|
||||
buflist_config_format_buffer_current = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"buffer_current", "string",
|
||||
N_("format for the line with current buffer"),
|
||||
N_("format for the line with current buffer "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}",
|
||||
NULL, 0,
|
||||
@@ -168,7 +170,8 @@ buflist_config_init ()
|
||||
buflist_config_format_hotlist = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"hotlist", "string",
|
||||
N_("format for hotlist"),
|
||||
N_("format for hotlist "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
" ${color:green}(${hotlist}${color:green})",
|
||||
NULL, 0,
|
||||
@@ -178,7 +181,8 @@ buflist_config_init ()
|
||||
buflist_config_format_hotlist_level[0] = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"hotlist_low", "string",
|
||||
N_("format for a buffer with hotlist level \"low\""),
|
||||
N_("format for a buffer with hotlist level \"low\" "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:white}",
|
||||
NULL, 0,
|
||||
@@ -188,7 +192,8 @@ buflist_config_init ()
|
||||
buflist_config_format_hotlist_level[1] = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"hotlist_message", "string",
|
||||
N_("format for a buffer with hotlist level \"message\""),
|
||||
N_("format for a buffer with hotlist level \"message\" "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:brown}",
|
||||
NULL, 0,
|
||||
@@ -198,7 +203,8 @@ buflist_config_init ()
|
||||
buflist_config_format_hotlist_level[2] = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"hotlist_private", "string",
|
||||
N_("format for a buffer with hotlist level \"private\""),
|
||||
N_("format for a buffer with hotlist level \"private\" "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:green}",
|
||||
NULL, 0,
|
||||
@@ -208,7 +214,8 @@ buflist_config_init ()
|
||||
buflist_config_format_hotlist_level[3] = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"hotlist_highlight", "string",
|
||||
N_("format for a buffer with hotlist level \"highlight\""),
|
||||
N_("format for a buffer with hotlist level \"highlight\" "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:magenta}",
|
||||
NULL, 0,
|
||||
@@ -218,7 +225,8 @@ buflist_config_init ()
|
||||
buflist_config_format_hotlist_level_none = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"hotlist_none", "string",
|
||||
N_("format for a buffer not in hotlist"),
|
||||
N_("format for a buffer not in hotlist "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:default}",
|
||||
NULL, 0,
|
||||
@@ -228,7 +236,8 @@ buflist_config_init ()
|
||||
buflist_config_format_hotlist_separator = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"hotlist_separator", "string",
|
||||
N_("separator for counts in hotlist"),
|
||||
N_("separator for counts in hotlist "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
"${color:default},",
|
||||
NULL, 0,
|
||||
@@ -238,7 +247,8 @@ buflist_config_init ()
|
||||
buflist_config_format_lag = weechat_config_new_option (
|
||||
buflist_config_file, ptr_section,
|
||||
"lag", "string",
|
||||
N_("format for lag on an irc server buffer"),
|
||||
N_("format for lag on an irc server buffer "
|
||||
"(note: content is evaluated, see /help buflist)"),
|
||||
NULL, 0, 0,
|
||||
" ${color:green}[${color:brown}${lag}${color:green}]",
|
||||
NULL, 0,
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "../weechat-plugin.h"
|
||||
#include "buflist.h"
|
||||
#include "buflist-bar-item.h"
|
||||
#include "buflist-command.h"
|
||||
#include "buflist-config.h"
|
||||
|
||||
|
||||
@@ -272,6 +273,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
if (!buflist_bar_item_init ())
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
buflist_command_init ();
|
||||
|
||||
/* hook some signals */
|
||||
for (i = 0; signals_buffers[i]; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user