diff options
author | Berke Viktor <bviktor@hexchat.org> | 2013-04-02 11:55:54 -0700 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2013-04-02 11:56:08 -0700 |
commit | 5e59578e28408b4fcf85de19fd301a5b02d96dec (patch) | |
tree | f382448bccf99bc932a1e07dbbdbe60f9625327a /src/common | |
parent | 7317535c28fe516b42b5fc73221e81c4ceee8b56 (diff) |
Remove most of HexTray and one instance
You can still build HexTray manually if you want to try fixing it
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/hexchat.c | 76 | ||||
-rw-r--r-- | src/common/plugin.c | 1 | ||||
-rw-r--r-- | src/common/util.c | 17 | ||||
-rw-r--r-- | src/common/util.h | 1 |
4 files changed, 0 insertions, 95 deletions
diff --git a/src/common/hexchat.c b/src/common/hexchat.c index 57e3fc86..9bd4985b 100644 --- a/src/common/hexchat.c +++ b/src/common/hexchat.c @@ -1008,46 +1008,6 @@ hexchat_execv (char * const argv[]) #endif } -#if 0 /* def WIN32 */ -static void -xchat_restore_window (HWND hexchat_window) -{ - /* ShowWindow (hexchat_window, SW_RESTORE); another way, but works worse */ - SendMessage (hexchat_window, WM_SYSCOMMAND, SC_RESTORE, 0); - SetForegroundWindow (hexchat_window); -} - -BOOL CALLBACK -enum_windows_impl (HWND current_window, LPARAM lParam) -{ - TCHAR window_name[8]; - TCHAR module_path[1024]; - ZeroMemory (&window_name, sizeof (window_name)); - - if (!current_window) - { - return TRUE; - } - - GetWindowText (current_window, window_name, 8); /* name length + 1 */ - if (strcmp (window_name, "HexChat") == 0) - { - /* use a separate if block, this way we don't have to call GetWindowModuleFileName() for each hit */ - ZeroMemory (&module_path, sizeof (module_path)); - GetWindowModuleFileName (current_window, module_path, sizeof (module_path)); - - if (strstr (module_path, "hexchat.exe")) /* We've found it, stop */ - { - xchat_restore_window (current_window); - return FALSE; - } - } - - return TRUE; /* Keep searching */ - -} -#endif - int main (int argc, char *argv[]) { @@ -1056,7 +1016,6 @@ main (int argc, char *argv[]) #ifdef WIN32 char hexchat_lang[13]; /* LC_ALL= plus 5 chars of hex_gui_lang and trailing \0 */ - /* HANDLE mutex; */ #endif srand (time (0)); /* CL: do this only once! */ @@ -1257,33 +1216,6 @@ main (int argc, char *argv[]) } putenv (hexchat_lang); - -#if 0 - if (prefs.hex_gui_single && !portable_mode ()) - { - DWORD error; - - mutex = CreateMutex (NULL, TRUE, "Local\\hexchat"); - error = GetLastError (); - - if (error == ERROR_ALREADY_EXISTS || mutex == NULL) - { - /* Restoring the HexChat window from the tray via the taskbar icon. - * Only works correctly when HexTray is used. - */ - if (hextray_mode ()) - { - /* FindWindow() doesn't support wildcards so we check all the open windows */ - EnumWindows (enum_windows_impl, (LPARAM) NULL); - return 0; - } - else - { - return 1; - } - } - } -#endif #endif #ifdef SOCKS @@ -1323,14 +1255,6 @@ main (int argc, char *argv[]) #ifdef WIN32 WSACleanup (); - -#if 0 - if (prefs.hex_gui_single && !portable_mode ()) - { - ReleaseMutex (mutex); - CloseHandle (mutex); - } -#endif #endif return 0; diff --git a/src/common/plugin.c b/src/common/plugin.c index fe58ba69..479994c8 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -471,7 +471,6 @@ plugin_auto_load (session *sess) for_files (".\\plugins", "hcdoat.dll", plugin_auto_load_cb); for_files (".\\plugins", "hcexec.dll", plugin_auto_load_cb); for_files (".\\plugins", "hcfishlim.dll", plugin_auto_load_cb); - /* for_files (".\\plugins", "hchextray.dll", plugin_auto_load_cb); don't load HexTray until it's fixed */ for_files (".\\plugins", "hcmpcinfo.dll", plugin_auto_load_cb); for_files (".\\plugins", "hcperl.dll", plugin_auto_load_cb); for_files (".\\plugins", "hcpython.dll", plugin_auto_load_cb); diff --git a/src/common/util.c b/src/common/util.c index 0f04d9ca..b9c69a44 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1861,23 +1861,6 @@ portable_mode () } int -hextray_mode () -{ -#ifdef WIN32 - if ((_access( "plugins/hchextray.dll", 0 )) != -1) - { - return 1; - } - else - { - return 0; - } -#else - return 0; -#endif -} - -int unity_mode () { #ifdef G_OS_UNIX diff --git a/src/common/util.h b/src/common/util.h index 81e227fb..b375abb1 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -78,7 +78,6 @@ guint32 str_ihash (const unsigned char *key); void safe_strcpy (char *dest, const char *src, int bytes_left); void canonalize_key (char *key); int portable_mode (); -int hextray_mode (); int unity_mode (); GSList *get_subdirs (const char *path); char *encode_sasl_pass (char *user, char *pass); |