diff options
author | TingPing <tingping@fedoraproject.org> | 2015-02-02 19:35:49 -0500 |
---|---|---|
committer | TingPing <tingping@fedoraproject.org> | 2015-02-04 20:24:53 -0500 |
commit | f4f27e438b0791e1c0708c4f031aa80c59d965b1 (patch) | |
tree | c68f1fb8cbbe88b7878e8fef690fd00c150f66ec /src/common | |
parent | a216ed1df9394325bc573cd3f1693eb467a89938 (diff) |
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.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/fe.h | 1 | ||||
-rw-r--r-- | src/common/outbound.c | 6 | ||||
-rw-r--r-- | src/common/plugin.c | 20 | ||||
-rw-r--r-- | src/common/plugin.h | 1 |
4 files changed, 15 insertions, 13 deletions
diff --git a/src/common/fe.h b/src/common/fe.h index 9d8919ac..a3bd2afa 100644 --- a/src/common/fe.h +++ b/src/common/fe.h @@ -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 (); diff --git a/src/common/outbound.c b/src/common/outbound.c index 8884b41e..ed00aa19 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -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); diff --git a/src/common/plugin.c b/src/common/plugin.c index d2782e01..8d990dc9 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -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 (); diff --git a/src/common/plugin.h b/src/common/plugin.h index db0054cb..5743f39a 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -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); |