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

@ -482,7 +482,6 @@ const struct prefs vars[] =
{"input_balloon_chans", P_OFFINT (hex_input_balloon_chans), TYPE_BOOL}, {"input_balloon_chans", P_OFFINT (hex_input_balloon_chans), TYPE_BOOL},
{"input_balloon_hilight", P_OFFINT (hex_input_balloon_hilight), TYPE_BOOL}, {"input_balloon_hilight", P_OFFINT (hex_input_balloon_hilight), TYPE_BOOL},
{"input_balloon_priv", P_OFFINT (hex_input_balloon_priv), TYPE_BOOL}, {"input_balloon_priv", P_OFFINT (hex_input_balloon_priv), TYPE_BOOL},
{"input_balloon_time", P_OFFINT (hex_input_balloon_time), TYPE_INT},
{"input_beep_chans", P_OFFINT (hex_input_beep_chans), TYPE_BOOL}, {"input_beep_chans", P_OFFINT (hex_input_beep_chans), TYPE_BOOL},
{"input_beep_hilight", P_OFFINT (hex_input_beep_hilight), TYPE_BOOL}, {"input_beep_hilight", P_OFFINT (hex_input_beep_hilight), TYPE_BOOL},
{"input_beep_priv", P_OFFINT (hex_input_beep_priv), TYPE_BOOL}, {"input_beep_priv", P_OFFINT (hex_input_beep_priv), TYPE_BOOL},
@ -828,7 +827,6 @@ load_default_config(void)
prefs.hex_gui_ulist_pos = 3; prefs.hex_gui_ulist_pos = 3;
prefs.hex_gui_win_height = 400; prefs.hex_gui_win_height = 400;
prefs.hex_gui_win_width = 640; prefs.hex_gui_win_width = 640;
prefs.hex_input_balloon_time = 20;
prefs.hex_irc_ban_type = 1; prefs.hex_irc_ban_type = 1;
prefs.hex_irc_join_delay = 5; prefs.hex_irc_join_delay = 5;
prefs.hex_net_reconnect_delay = 10; prefs.hex_net_reconnect_delay = 10;

View File

@ -265,7 +265,6 @@ struct hexchatprefs
int hex_gui_win_top; int hex_gui_win_top;
int hex_gui_win_width; int hex_gui_win_width;
int hex_identd_port; int hex_identd_port;
int hex_input_balloon_time;
int hex_irc_ban_type; int hex_irc_ban_type;
int hex_irc_join_delay; int hex_irc_join_delay;
int hex_irc_notice_pos; int hex_irc_notice_pos;

View File

@ -20,7 +20,7 @@
#define HEXCHAT_PLUGIN_NOTIFICATION_BACKEND_H #define HEXCHAT_PLUGIN_NOTIFICATION_BACKEND_H
int notification_backend_supported (void); 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); int notification_backend_init (void);
void notification_backend_deinit (void); void notification_backend_deinit (void);

View File

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

View File

@ -20,7 +20,7 @@
#include <gtkosxapplication.h> #include <gtkosxapplication.h>
void 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_title = [[NSString alloc] initWithUTF8String:title];
NSString *str_text = [[NSString alloc] initWithUTF8String:text]; NSString *str_text = [[NSString alloc] initWithUTF8String:text];

View File

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

View File

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

View File

@ -60,16 +60,6 @@ should_alert (void)
return TRUE; 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 static gboolean
is_ignored (char *nick) 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_title = hexchat_strip (ph, title, -1, 7);
stripped_text = hexchat_strip (ph, text, -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_title);
hexchat_free (ph, stripped_text); hexchat_free (ph, stripped_text);