mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-28 20:22:15 -05:00
fix for taskbar alerts, thanks for the unknown author and for Khisanth for pointing it out
more info: http://scsys.co.uk:8002/48130 and http://sourceforge.net/tracker/?func=detail&aid=3019734&group_id=239&atid=100239
This commit is contained in:
parent
b9acd4c437
commit
2d4f9e3332
136
xchat-wdk.patch
136
xchat-wdk.patch
@ -137,7 +137,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/plugins/xdcc/xdcc.c xchat-wdk/plugi
|
||||
|
||||
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src/common/cfgfiles.c
|
||||
--- xchat-wdk.orig/src/common/cfgfiles.c 2010-08-07 09:14:45 +0200
|
||||
+++ xchat-wdk/src/common/cfgfiles.c 2010-08-13 22:38:03 +0200
|
||||
+++ xchat-wdk/src/common/cfgfiles.c 2010-08-14 01:02:51 +0200
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
@ -183,17 +183,6 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src
|
||||
prefs.dcctimeout = 180;
|
||||
prefs.dccstalltimeout = 60;
|
||||
prefs.notify_timeout = 15;
|
||||
@@ -677,7 +685,10 @@
|
||||
prefs.mainwindow_save = 1;
|
||||
prefs.bantype = 2;
|
||||
prefs.input_balloon_time = 20;
|
||||
+ /* taskbar alerts crash xchat-wdk only on x86 */
|
||||
+#ifdef _WIN64
|
||||
prefs.input_flash_priv = prefs.input_flash_hilight = 1;
|
||||
+#endif
|
||||
prefs.input_tray_priv = prefs.input_tray_hilight = 1;
|
||||
prefs.autodccsend = 2; /* browse mode */
|
||||
#ifdef WIN32
|
||||
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/chanopt.c xchat-wdk/src/common/chanopt.c
|
||||
--- xchat-wdk.orig/src/common/chanopt.c 2008-06-15 06:40:29 +0200
|
||||
+++ xchat-wdk/src/common/chanopt.c 2010-08-10 16:29:30 +0200
|
||||
@ -739,6 +728,114 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/joind.c xchat-wdk/src/fe
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/maingui.c xchat-wdk/src/fe-gtk/maingui.c
|
||||
--- xchat-wdk.orig/src/fe-gtk/maingui.c 2010-05-16 05:20:22 +0200
|
||||
+++ xchat-wdk/src/fe-gtk/maingui.c 2010-08-14 00:51:14 +0200
|
||||
@@ -214,60 +214,10 @@
|
||||
away_list = mg_attr_list_create (&colors[COL_AWAY], FALSE);
|
||||
}
|
||||
|
||||
-#ifdef WIN32
|
||||
-#define WINVER 0x0501 /* needed for vc6? */
|
||||
-#include <windows.h>
|
||||
-#include <gdk/gdkwin32.h>
|
||||
-
|
||||
-/* Flash the taskbar button on Windows when there's a highlight event. */
|
||||
-
|
||||
-static void
|
||||
-flash_window (GtkWidget *win)
|
||||
-{
|
||||
- FLASHWINFO fi;
|
||||
- static HMODULE user = NULL;
|
||||
- static BOOL (*flash) (PFLASHWINFO) = NULL;
|
||||
-
|
||||
- if (!user)
|
||||
- {
|
||||
- user = GetModuleHandleA ("USER32");
|
||||
- if (!user)
|
||||
- return; /* this should never fail */
|
||||
- }
|
||||
-
|
||||
- if (!flash)
|
||||
- {
|
||||
- flash = (void *)GetProcAddress (user, "FlashWindowEx");
|
||||
- if (!flash)
|
||||
- return; /* this fails on NT4.0 and Win95 */
|
||||
- }
|
||||
-
|
||||
- fi.cbSize = sizeof (fi);
|
||||
- fi.hwnd = GDK_WINDOW_HWND (win->window);
|
||||
- fi.dwFlags = FLASHW_ALL | FLASHW_TIMERNOFG;
|
||||
- fi.uCount = 0;
|
||||
- fi.dwTimeout = 500;
|
||||
- flash (&fi);
|
||||
- /*FlashWindowEx (&fi);*/
|
||||
-}
|
||||
-#else
|
||||
-
|
||||
-#ifdef USE_XLIB
|
||||
-#include <gdk/gdkx.h>
|
||||
-
|
||||
static void
|
||||
set_window_urgency (GtkWidget *win, gboolean set)
|
||||
{
|
||||
- XWMHints *hints;
|
||||
-
|
||||
- hints = XGetWMHints(GDK_WINDOW_XDISPLAY(win->window), GDK_WINDOW_XWINDOW(win->window));
|
||||
- if (set)
|
||||
- hints->flags |= XUrgencyHint;
|
||||
- else
|
||||
- hints->flags &= ~XUrgencyHint;
|
||||
- XSetWMHints(GDK_WINDOW_XDISPLAY(win->window),
|
||||
- GDK_WINDOW_XWINDOW(win->window), hints);
|
||||
- XFree(hints);
|
||||
+ gtk_window_set_urgency_hint (GTK_WINDOW (win), set);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -281,18 +231,14 @@
|
||||
{
|
||||
set_window_urgency (win, FALSE);
|
||||
}
|
||||
-#endif
|
||||
-#endif
|
||||
|
||||
/* flash the taskbar button */
|
||||
|
||||
void
|
||||
fe_flash_window (session *sess)
|
||||
{
|
||||
-#if defined(WIN32) || defined(USE_XLIB)
|
||||
if (fe_gui_info (sess, 0) != 1) /* only do it if not focused */
|
||||
flash_window (sess->gui->window);
|
||||
-#endif
|
||||
}
|
||||
|
||||
/* set a tab plain, red, light-red, or blue */
|
||||
@@ -2957,11 +2903,7 @@
|
||||
gtk_xtext_check_marker_visibility (GTK_XTEXT (current_sess->gui->xtext));
|
||||
plugin_emit_dummy_print (current_sess, "Focus Window");
|
||||
}
|
||||
-#ifndef WIN32
|
||||
-#ifdef USE_XLIB
|
||||
unflash_window (GTK_WIDGET (win));
|
||||
-#endif
|
||||
-#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2972,11 +2914,7 @@
|
||||
if (!sess->server->server_session)
|
||||
sess->server->server_session = sess;
|
||||
gtk_xtext_check_marker_visibility(GTK_XTEXT (current_sess->gui->xtext));
|
||||
-#ifndef WIN32
|
||||
-#ifdef USE_XLIB
|
||||
unflash_window (GTK_WIDGET (win));
|
||||
-#endif
|
||||
-#endif
|
||||
plugin_emit_dummy_print (sess, "Focus Window");
|
||||
return FALSE;
|
||||
}
|
||||
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/menu.c xchat-wdk/src/fe-gtk/menu.c
|
||||
--- xchat-wdk.orig/src/fe-gtk/menu.c 2010-05-16 06:24:24 +0200
|
||||
+++ xchat-wdk/src/fe-gtk/menu.c 2010-08-10 16:29:30 +0200
|
||||
@ -870,21 +967,6 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/rawlog.c xchat-wdk/src/f
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "fe-gtk.h"
|
||||
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe-gtk/setup.c
|
||||
--- xchat-wdk.orig/src/fe-gtk/setup.c 2008-02-08 10:04:45 +0100
|
||||
+++ xchat-wdk/src/fe-gtk/setup.c 2010-08-10 16:29:30 +0200
|
||||
@@ -333,7 +333,11 @@
|
||||
{ST_3OGGLE, N_("Show tray balloons on:"), 0, 0, (void *)balloonlist, 0},
|
||||
#endif
|
||||
{ST_3OGGLE, N_("Blink tray icon on:"), 0, 0, (void *)trayblinklist, 0},
|
||||
+
|
||||
+ /* taskbar alerts crash xchat-wdk only on x86 */
|
||||
+#ifdef _WIN64
|
||||
{ST_3OGGLE, N_("Blink task bar on:"), 0, 0, (void *)taskbarlist, 0},
|
||||
+#endif
|
||||
{ST_3OGGLE, N_("Make a beep sound on:"), 0, 0, (void *)beeplist, 0},
|
||||
|
||||
{ST_TOGGLE, N_("Enable system tray icon"), P_OFFINTNL(gui_tray), 0, 0, 0},
|
||||
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/sexy-spell-entry.c xchat-wdk/src/fe-gtk/sexy-spell-entry.c
|
||||
--- xchat-wdk.orig/src/fe-gtk/sexy-spell-entry.c 2006-07-17 07:51:02 +0200
|
||||
+++ xchat-wdk/src/fe-gtk/sexy-spell-entry.c 2010-08-10 16:29:30 +0200
|
||||
|
Loading…
Reference in New Issue
Block a user