mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 15:53:12 +02:00
Added new plugin "xfer" (used by irc plugin for DCC file and chat) (warning: initial commit, not working yet)
This commit is contained in:
+17
-6
@@ -18,12 +18,23 @@ IF(NOT DISABLE_NCURSES)
|
||||
SUBDIRS( curses )
|
||||
ENDIF(NOT DISABLE_NCURSES)
|
||||
|
||||
SET(LIB_GUI_COMMON_SRC gui-bar.c gui-bar.h gui-bar-item.c gui-bar-item.h
|
||||
gui-buffer.c gui-buffer.h gui-chat.c gui-chat.h gui-color.c gui-color.h
|
||||
gui-filter.c gui-filter.h gui-completion.c gui-completion.h gui-history.c
|
||||
gui-history.h gui-hotlist.c gui-hotlist.h gui-infobar.c gui-infobar.h
|
||||
gui-input.c gui-input.h gui-keyboard.c gui-keyboard.h gui-main.h gui-nicklist.c
|
||||
gui-nicklist.h gui-status.c gui-status.h gui-window.c gui-window.h)
|
||||
SET(LIB_GUI_COMMON_SRC
|
||||
gui-bar.c gui-bar.h
|
||||
gui-bar-item.c gui-bar-item.h
|
||||
gui-buffer.c gui-buffer.h
|
||||
gui-chat.c gui-chat.h
|
||||
gui-color.c gui-color.h
|
||||
gui-filter.c gui-filter.h
|
||||
gui-completion.c gui-completion.h
|
||||
gui-history.c gui-history.h
|
||||
gui-hotlist.c gui-hotlist.h
|
||||
gui-infobar.c gui-infobar.h
|
||||
gui-input.c gui-input.h
|
||||
gui-keyboard.c gui-keyboard.h
|
||||
gui-main.h
|
||||
gui-nicklist.c gui-nicklist.h
|
||||
gui-status.c gui-status.h
|
||||
gui-window.c gui-window.h)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
||||
ADD_LIBRARY(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
|
||||
|
||||
@@ -416,14 +416,6 @@ gui_color_init_weechat ()
|
||||
gui_color[GUI_COLOR_NICKLIST_PREFIX5] = gui_color_build (GUI_COLOR_NICKLIST_PREFIX5, CONFIG_COLOR(config_color_nicklist_prefix5), CONFIG_COLOR(config_color_nicklist_bg));
|
||||
gui_color[GUI_COLOR_NICKLIST_MORE] = gui_color_build (GUI_COLOR_NICKLIST_MORE, CONFIG_COLOR(config_color_nicklist_more), CONFIG_COLOR(config_color_nicklist_bg));
|
||||
gui_color[GUI_COLOR_NICKLIST_SEPARATOR] = gui_color_build (GUI_COLOR_NICKLIST_SEPARATOR, CONFIG_COLOR(config_color_nicklist_separator), CONFIG_COLOR(config_color_nicklist_bg));
|
||||
|
||||
gui_color[GUI_COLOR_INFO] = gui_color_build (GUI_COLOR_INFO, CONFIG_COLOR(config_color_info), CONFIG_COLOR(config_color_info_bg));
|
||||
gui_color[GUI_COLOR_INFO_WAITING] = gui_color_build (GUI_COLOR_INFO_WAITING, CONFIG_COLOR(config_color_info_waiting), CONFIG_COLOR(config_color_info_bg));
|
||||
gui_color[GUI_COLOR_INFO_CONNECTING] = gui_color_build (GUI_COLOR_INFO_CONNECTING, CONFIG_COLOR(config_color_info_connecting), CONFIG_COLOR(config_color_info_bg));
|
||||
gui_color[GUI_COLOR_INFO_ACTIVE] = gui_color_build (GUI_COLOR_INFO_ACTIVE, CONFIG_COLOR(config_color_info_active), CONFIG_COLOR(config_color_info_bg));
|
||||
gui_color[GUI_COLOR_INFO_DONE] = gui_color_build (GUI_COLOR_INFO_DONE, CONFIG_COLOR(config_color_info_done), CONFIG_COLOR(config_color_info_bg));
|
||||
gui_color[GUI_COLOR_INFO_FAILED] = gui_color_build (GUI_COLOR_INFO_FAILED, CONFIG_COLOR(config_color_info_failed), CONFIG_COLOR(config_color_info_bg));
|
||||
gui_color[GUI_COLOR_INFO_ABORTED] = gui_color_build (GUI_COLOR_INFO_ABORTED, CONFIG_COLOR(config_color_info_aborted), CONFIG_COLOR(config_color_info_bg));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+13
-12
@@ -38,14 +38,14 @@
|
||||
#include "gui-window.h"
|
||||
|
||||
|
||||
char *gui_bar_option_str[GUI_BAR_NUM_OPTIONS] =
|
||||
char *gui_bar_option_string[GUI_BAR_NUM_OPTIONS] =
|
||||
{ "priority", "type", "conditions", "position", "filling", "size", "size_max",
|
||||
"color_fg", "color_bg", "separator", "items" };
|
||||
char *gui_bar_type_str[GUI_BAR_NUM_TYPES] =
|
||||
char *gui_bar_type_string[GUI_BAR_NUM_TYPES] =
|
||||
{ "root", "window" };
|
||||
char *gui_bar_position_str[GUI_BAR_NUM_POSITIONS] =
|
||||
char *gui_bar_position_string[GUI_BAR_NUM_POSITIONS] =
|
||||
{ "bottom", "top", "left", "right" };
|
||||
char *gui_bar_filling_str[GUI_BAR_NUM_FILLING] =
|
||||
char *gui_bar_filling_string[GUI_BAR_NUM_FILLING] =
|
||||
{ "horizontal", "vertical" };
|
||||
|
||||
struct t_gui_bar *gui_bars = NULL; /* first bar */
|
||||
@@ -71,7 +71,7 @@ gui_bar_search_option (char *option_name)
|
||||
|
||||
for (i = 0; i < GUI_BAR_NUM_OPTIONS; i++)
|
||||
{
|
||||
if (string_strcasecmp (gui_bar_option_str[i], option_name) == 0)
|
||||
if (string_strcasecmp (gui_bar_option_string[i], option_name) == 0)
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ gui_bar_search_type (char *type)
|
||||
|
||||
for (i = 0; i < GUI_BAR_NUM_TYPES; i++)
|
||||
{
|
||||
if (string_strcasecmp (type, gui_bar_type_str[i]) == 0)
|
||||
if (string_strcasecmp (type, gui_bar_type_string[i]) == 0)
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ gui_bar_search_position (char *position)
|
||||
|
||||
for (i = 0; i < GUI_BAR_NUM_POSITIONS; i++)
|
||||
{
|
||||
if (string_strcasecmp (position, gui_bar_position_str[i]) == 0)
|
||||
if (string_strcasecmp (position, gui_bar_position_string[i]) == 0)
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -868,12 +868,13 @@ gui_bar_create_option (char *bar_name, int index_option, char *value)
|
||||
|
||||
ptr_option = NULL;
|
||||
|
||||
length = strlen (bar_name) + 1 + strlen (gui_bar_option_str[index_option]) + 1;
|
||||
length = strlen (bar_name) + 1 +
|
||||
strlen (gui_bar_option_string[index_option]) + 1;
|
||||
option_name = malloc (length);
|
||||
if (option_name)
|
||||
{
|
||||
snprintf (option_name, length, "%s.%s",
|
||||
bar_name, gui_bar_option_str[index_option]);
|
||||
bar_name, gui_bar_option_string[index_option]);
|
||||
|
||||
switch (index_option)
|
||||
{
|
||||
@@ -1538,16 +1539,16 @@ gui_bar_print_log ()
|
||||
log_printf (" priority . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->priority));
|
||||
log_printf (" type . . . . . . . . . : %d (%s)",
|
||||
CONFIG_INTEGER(ptr_bar->type),
|
||||
gui_bar_type_str[CONFIG_INTEGER(ptr_bar->type)]);
|
||||
gui_bar_type_string[CONFIG_INTEGER(ptr_bar->type)]);
|
||||
log_printf (" conditions . . . . . . : '%s'", CONFIG_STRING(ptr_bar->conditions));
|
||||
log_printf (" conditions_count . . . : %d", ptr_bar->conditions_count);
|
||||
log_printf (" conditions_array . . . : 0x%x", ptr_bar->conditions_array);
|
||||
log_printf (" position . . . . . . . : %d (%s)",
|
||||
CONFIG_INTEGER(ptr_bar->position),
|
||||
gui_bar_position_str[CONFIG_INTEGER(ptr_bar->position)]);
|
||||
gui_bar_position_string[CONFIG_INTEGER(ptr_bar->position)]);
|
||||
log_printf (" filling. . . . . . . . : %d (%s)",
|
||||
CONFIG_INTEGER(ptr_bar->filling),
|
||||
gui_bar_filling_str[CONFIG_INTEGER(ptr_bar->filling)]);
|
||||
gui_bar_filling_string[CONFIG_INTEGER(ptr_bar->filling)]);
|
||||
log_printf (" size . . . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->size));
|
||||
log_printf (" size_max . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->size_max));
|
||||
log_printf (" color_fg . . . . . . . : %d",
|
||||
|
||||
+3
-3
@@ -96,9 +96,9 @@ struct t_gui_bar
|
||||
|
||||
/* variables */
|
||||
|
||||
extern char *gui_bar_type_str[];
|
||||
extern char *gui_bar_position_str[];
|
||||
extern char *gui_bar_filling_str[];
|
||||
extern char *gui_bar_type_string[];
|
||||
extern char *gui_bar_position_string[];
|
||||
extern char *gui_bar_filling_string[];
|
||||
extern struct t_gui_bar *gui_bars;
|
||||
extern struct t_gui_bar *last_gui_bar;
|
||||
extern struct t_gui_bar *gui_temp_bars;
|
||||
|
||||
@@ -94,14 +94,6 @@ enum t_gui_color_enum
|
||||
GUI_COLOR_NICKLIST_MORE,
|
||||
GUI_COLOR_NICKLIST_SEPARATOR,
|
||||
|
||||
GUI_COLOR_INFO,
|
||||
GUI_COLOR_INFO_WAITING,
|
||||
GUI_COLOR_INFO_CONNECTING,
|
||||
GUI_COLOR_INFO_ACTIVE,
|
||||
GUI_COLOR_INFO_DONE,
|
||||
GUI_COLOR_INFO_FAILED,
|
||||
GUI_COLOR_INFO_ABORTED,
|
||||
|
||||
/* number of colors */
|
||||
GUI_COLOR_NUM_COLORS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user