Added online_status flag.
This commit is contained in:
parent
684d869503
commit
fdccf7b7af
@ -8,15 +8,47 @@
|
|||||||
#include "tox-weechat.h"
|
#include "tox-weechat.h"
|
||||||
#include "tox-weechat-utils.h"
|
#include "tox-weechat-utils.h"
|
||||||
|
|
||||||
char *bar_item_input_prompt(void *data,
|
char *
|
||||||
struct t_gui_bar_item *item,
|
bar_item_input_prompt(void *data,
|
||||||
struct t_gui_window *window,
|
struct t_gui_bar_item *item,
|
||||||
struct t_gui_buffer *buffer,
|
struct t_gui_window *window,
|
||||||
struct t_hashtable *extra_info)
|
struct t_gui_buffer *buffer,
|
||||||
|
struct t_hashtable *extra_info)
|
||||||
{
|
{
|
||||||
return tox_weechat_get_self_name_nt();
|
return tox_weechat_get_self_name_nt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
irc_bar_item_buffer_plugin(void *data, struct t_gui_bar_item *item,
|
||||||
|
struct t_gui_window *window,
|
||||||
|
struct t_gui_buffer *buffer,
|
||||||
|
struct t_hashtable *extra_info)
|
||||||
|
{
|
||||||
|
char string[512];
|
||||||
|
|
||||||
|
const char *name = weechat_plugin_get_name(weechat_plugin);
|
||||||
|
|
||||||
|
char *status = "online"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
snprintf(string, sizeof(string), "%s %s%s",
|
||||||
|
name,
|
||||||
|
weechat_color("
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
snprintf (buf, sizeof (buf), "%s", name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
snprintf (buf, sizeof (buf), "%s", name);
|
||||||
|
}
|
||||||
|
return strdup (buf);
|
||||||
|
}
|
||||||
|
|
||||||
void tox_weechat_gui_init()
|
void tox_weechat_gui_init()
|
||||||
{
|
{
|
||||||
weechat_bar_item_new("input_prompt", bar_item_input_prompt, NULL);
|
weechat_bar_item_new("input_prompt", bar_item_input_prompt, NULL);
|
||||||
|
@ -17,6 +17,7 @@ WEECHAT_PLUGIN_LICENSE("MIT");
|
|||||||
|
|
||||||
struct t_weechat_plugin *weechat_plugin = NULL;
|
struct t_weechat_plugin *weechat_plugin = NULL;
|
||||||
struct t_gui_buffer *tox_main_buffer = NULL;
|
struct t_gui_buffer *tox_main_buffer = NULL;
|
||||||
|
int online_status = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
weechat_plugin_init(struct t_weechat_plugin *plugin, int argc, char *argv[])
|
weechat_plugin_init(struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
extern struct t_weechat_plugin *weechat_plugin;
|
extern struct t_weechat_plugin *weechat_plugin;
|
||||||
extern Tox *tox;
|
extern Tox *tox;
|
||||||
|
extern int online_status;
|
||||||
|
|
||||||
extern struct t_gui_buffer *tox_main_buffer;
|
extern struct t_gui_buffer *tox_main_buffer;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user