mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-13 09:10:20 +00:00
Implement windows 8.1+ notifications
This splits notifications up into multiple backends currently only libnotify on unix and win8 toasts. The win8 backend was originally written by @leeter though heavily modified.
This commit is contained in:
@@ -178,7 +178,6 @@ typedef enum
|
||||
} feicon;
|
||||
void fe_tray_set_icon (feicon icon);
|
||||
void fe_tray_set_tooltip (const char *text);
|
||||
void fe_tray_set_balloon (const char *title, const char *text);
|
||||
void fe_open_chan_list (server *serv, char *filter, int do_refresh);
|
||||
const char *fe_get_default_font ();
|
||||
|
||||
|
||||
@@ -3470,12 +3470,6 @@ cmd_topic (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||
static int
|
||||
cmd_tray (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||
{
|
||||
if (strcmp (word[2], "-b") == 0)
|
||||
{
|
||||
fe_tray_set_balloon (word[3], word[4][0] ? word[4] : NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (strcmp (word[2], "-t") == 0)
|
||||
{
|
||||
fe_tray_set_tooltip (word[3][0] ? word[3] : NULL);
|
||||
|
||||
@@ -355,15 +355,11 @@ plugin_kill_all (void)
|
||||
|
||||
#ifdef USE_PLUGIN
|
||||
|
||||
/* load a plugin from a filename. Returns: NULL-success or an error string */
|
||||
|
||||
char *
|
||||
plugin_load (session *sess, char *filename, char *arg)
|
||||
GModule *
|
||||
module_load (char *filename)
|
||||
{
|
||||
void *handle;
|
||||
char *filepart;
|
||||
hexchat_init_func *init_func;
|
||||
hexchat_deinit_func *deinit_func;
|
||||
char *pluginpath;
|
||||
|
||||
/* get the filename without path */
|
||||
@@ -383,6 +379,18 @@ plugin_load (session *sess, char *filename, char *arg)
|
||||
handle = g_module_open (filename, 0);
|
||||
}
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
/* load a plugin from a filename. Returns: NULL-success or an error string */
|
||||
|
||||
char *
|
||||
plugin_load (session *sess, char *filename, char *arg)
|
||||
{
|
||||
GModule *handle = module_load (filename);
|
||||
hexchat_init_func *init_func;
|
||||
hexchat_deinit_func *deinit_func;
|
||||
|
||||
if (handle == NULL)
|
||||
return (char *)g_module_error ();
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ struct _hexchat_plugin
|
||||
};
|
||||
#endif
|
||||
|
||||
GModule *module_load (char *filename);
|
||||
char *plugin_load (session *sess, char *filename, char *arg);
|
||||
int plugin_reload (session *sess, char *name, int by_filename);
|
||||
void plugin_add (session *sess, char *filename, void *handle, void *init_func, void *deinit_func, char *arg, int fake);
|
||||
|
||||
Reference in New Issue
Block a user