Remove input_balloon_time setting

This setting doesn't work on most platforms
including some notification daemons on linux.

Where it does work I think it is bad behavior
to default overriding their defaults anyway.

It's most valuable use was likely win32
tray balloons which no longer exist.
This commit is contained in:
TingPing
2015-02-11 17:58:44 -05:00
parent 9858784eb6
commit 7063406d6c
9 changed files with 9 additions and 23 deletions

View File

@@ -20,7 +20,7 @@
#define HEXCHAT_PLUGIN_NOTIFICATION_BACKEND_H
int notification_backend_supported (void);
void notification_backend_show (const char *title, const char *text, int timeout);
void notification_backend_show (const char *title, const char *text);
int notification_backend_init (void);
void notification_backend_deinit (void);

View File

@@ -17,7 +17,7 @@
*/
void
notification_backend_show (const char *title, const char *text, int timeout)
notification_backend_show (const char *title, const char *text)
{
}

View File

@@ -23,7 +23,7 @@
static gboolean strip_markup = FALSE;
void
notification_backend_show (const char *title, const char *text, int timeout)
notification_backend_show (const char *title, const char *text)
{
NotifyNotification *notification;
@@ -33,7 +33,6 @@ notification_backend_show (const char *title, const char *text, int timeout)
notification = notify_notification_new (title, text, "hexchat");
notify_notification_set_hint (notification, "desktop-entry", g_variant_new_string ("hexchat"));
notify_notification_set_timeout (notification, timeout);
notify_notification_show (notification, NULL);
g_object_unref (notification);

View File

@@ -20,7 +20,7 @@
#include <gtkosxapplication.h>
void
notification_backend_show (const char *title, const char *text, int timeout)
notification_backend_show (const char *title, const char *text)
{
NSString *str_title = [[NSString alloc] initWithUTF8String:title];
NSString *str_text = [[NSString alloc] initWithUTF8String:text];

View File

@@ -23,20 +23,20 @@
#include <Windows.h>
void (*winrt_notification_backend_show) (const char *title, const char *text, int timeout) = NULL;
void (*winrt_notification_backend_show) (const char *title, const char *text) = NULL;
int (*winrt_notification_backend_init) (void) = NULL;
void (*winrt_notification_backend_deinit) (void) = NULL;
int (*winrt_notification_backend_supported) (void) = NULL;
void
notification_backend_show (const char *title, const char *text, int timeout)
notification_backend_show (const char *title, const char *text)
{
if (winrt_notification_backend_show == NULL)
{
return;
}
winrt_notification_backend_show (title, text, timeout);
winrt_notification_backend_show (title, text);
}
int

View File

@@ -41,7 +41,7 @@ widen(const std::string & to_widen)
extern "C"
{
__declspec (dllexport) void
notification_backend_show (const char *title, const char *text, int timeout)
notification_backend_show (const char *title, const char *text)
{
try
{

View File

@@ -60,16 +60,6 @@ should_alert (void)
return TRUE;
}
/* Returns timeout in ms */
static int
get_timeout (void)
{
int timeout = 0;
hexchat_get_prefs (ph, "input_balloon_time", NULL, &timeout);
return timeout * 1000;
}
static gboolean
is_ignored (char *nick)
{
@@ -91,7 +81,7 @@ show_notification (const char *title, const char *text)
stripped_title = hexchat_strip (ph, title, -1, 7);
stripped_text = hexchat_strip (ph, text, -1, 7);
notification_backend_show (stripped_title, stripped_text, get_timeout ());
notification_backend_show (stripped_title, stripped_text);
hexchat_free (ph, stripped_title);
hexchat_free (ph, stripped_text);