Mercurial > pidgin
diff src/win32/win32dep.c @ 6437:ae4c3abbaac1
[gaim-migrate @ 6945]
wgaim_read_reg_string and wgaim_im_blink_state added
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Tue, 12 Aug 2003 01:32:02 +0000 |
parents | 26b739bc9f1a |
children | 5aeba37b303c |
line wrap: on
line diff
--- a/src/win32/win32dep.c Tue Aug 12 01:30:08 2003 +0000 +++ b/src/win32/win32dep.c Tue Aug 12 01:32:02 2003 +0000 @@ -63,6 +63,7 @@ static char install_dir[MAXPATHLEN]; static char lib_dir[MAXPATHLEN]; static char locale_dir[MAXPATHLEN]; +static gboolean blink_turned_on = TRUE; /* * GLOBALS @@ -209,9 +210,25 @@ /* Miscellaneous */ +gboolean wgaim_read_reg_string(HKEY key, char* sub_key, char* val_name, LPBYTE data, LPDWORD data_len) { + HKEY hkey; + gboolean ret = FALSE; + + if(ERROR_SUCCESS == RegOpenKeyEx(key, + sub_key, + 0, KEY_QUERY_VALUE, &hkey)) { + if(ERROR_SUCCESS == RegQueryValueEx(hkey, val_name, 0, NULL, data, data_len)) + ret = TRUE; + RegCloseKey(key); + } + return ret; +} + /* FlashWindowEx is only supported by Win98+ and WinNT5+. If its not supported we do it our own way */ void wgaim_im_blink(GtkWidget *window) { + if(!blink_turned_on) + return; if(MyFlashWindowEx) { FLASHWINFO info; @@ -234,6 +251,10 @@ } } +void wgaim_im_blink_state(gboolean val) { + blink_turned_on = val; +} + int wgaim_gz_decompress(const char* in, const char* out) { gzFile fin; FILE *fout;