Mercurial > pidgin.yaz
changeset 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 | 759a81390b36 |
children | b3744996da0d |
files | src/win32/win32dep.c src/win32/win32dep.h |
diffstat | 2 files changed, 23 insertions(+), 0 deletions(-) [+] |
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;
--- a/src/win32/win32dep.h Tue Aug 12 01:30:08 2003 +0000 +++ b/src/win32/win32dep.h Tue Aug 12 01:32:02 2003 +0000 @@ -39,6 +39,7 @@ /* Windows helper functions */ HINSTANCE wgaim_hinstance(void); FARPROC wgaim_find_and_loadproc(char*, char*); +gboolean wgaim_read_reg_string(HKEY key, char* sub_key, char* val_name, LPBYTE data, LPDWORD data_len); /* Determine Gaim paths */ extern char* wgaim_install_dir(void); extern char* wgaim_lib_dir(void); @@ -46,6 +47,7 @@ extern char* wgaim_escape_dirsep(char*); /* UI related */ extern void wgaim_im_blink(GtkWidget*); +extern void wgaim_im_blink_state(gboolean val); extern void wgaim_gtk_window_move(GtkWindow *window, gint x, gint y); /* Utility */ extern int wgaim_gz_decompress(const char* in, const char* out);