From d03d6e606b40157d910ddf99ab018156abeb8ef0 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Mon, 28 Feb 2011 18:59:32 +0100 Subject: add wdk changes to named branch --- src/common/cfgfiles.c | 37 ++-- src/common/chanopt.c | 1 - src/common/ctcp.c | 3 +- src/common/dcc.c | 6 +- src/common/dirent.c | 199 ++++++++++++++++++ src/common/dirent.h | 28 +++ src/common/ignore.c | 1 - src/common/inbound.c | 1 - src/common/inet.h | 3 +- src/common/makefile.mak | 45 ++++ src/common/msproxy.c | 1 - src/common/network.c | 1 - src/common/notify.c | 1 - src/common/outbound.c | 1 - src/common/plugin-timer.c | 2 +- src/common/plugin.c | 7 +- src/common/proto-irc.c | 1 - src/common/server.c | 38 +--- src/common/servlist.c | 1 - src/common/ssl.c | 2 +- src/common/text.c | 33 +-- src/common/thread.c | 33 +++ src/common/thread.h | 10 + src/common/util.c | 108 ++++++++-- src/common/util.h | 5 + src/common/wdkutil.c | 27 +++ src/common/wdkutil.h | 2 + src/common/xchat.c | 4 +- src/common/xchat.h | 12 +- src/fe-gtk/about.c | 59 ++++-- src/fe-gtk/banlist.c | 1 - src/fe-gtk/chanlist.c | 1 - src/fe-gtk/chanview-tabs.c | 8 +- src/fe-gtk/editlist.c | 1 - src/fe-gtk/fe-gtk.c | 87 +++++++- src/fe-gtk/fe-gtk.h | 2 +- src/fe-gtk/fkeys.c | 1 - src/fe-gtk/gtkutil.c | 248 +++++++++++++++++++++- src/fe-gtk/joind.c | 1 - src/fe-gtk/maingui.c | 67 +----- src/fe-gtk/makefile.mak | 60 ++++++ src/fe-gtk/menu.c | 12 +- src/fe-gtk/palette.c | 1 - src/fe-gtk/plugin-tray.c | 48 +++-- src/fe-gtk/plugingui.c | 6 +- src/fe-gtk/rawlog.c | 1 - src/fe-gtk/search.c | 2 +- src/fe-gtk/setup.c | 54 ++++- src/fe-gtk/sexy-spell-entry.c | 8 +- src/fe-gtk/typedef.h | 11 + src/fe-gtk/xchat.rc | 22 ++ src/fe-gtk/xtext.c | 35 +++- src/fe-gtk/xtext.h | 1 + src/fe-text/fe-text.c | 473 +++++++++++++++++++++++------------------- src/fe-text/fe-text.h | 30 +-- src/fe-text/makefile.mak | 20 ++ src/makefile.mak | 17 ++ src/makeinc.skel.mak | 44 ++++ src/pixmaps/makefile.mak | 18 ++ 59 files changed, 1439 insertions(+), 513 deletions(-) create mode 100644 src/common/dirent.c create mode 100644 src/common/dirent.h create mode 100644 src/common/makefile.mak create mode 100644 src/common/thread.c create mode 100644 src/common/thread.h create mode 100644 src/common/wdkutil.c create mode 100644 src/common/wdkutil.h create mode 100644 src/fe-gtk/makefile.mak create mode 100644 src/fe-gtk/typedef.h create mode 100644 src/fe-gtk/xchat.rc create mode 100644 src/fe-text/makefile.mak create mode 100644 src/makefile.mak create mode 100644 src/makeinc.skel.mak create mode 100644 src/pixmaps/makefile.mak (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 8bb2a61b..d26198ed 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -17,7 +17,6 @@ */ #include -#include #include #include #include @@ -30,10 +29,9 @@ #include "fe.h" #include "text.h" #include "xchatc.h" +#include "wdkutil.h" -#ifdef WIN32 -#define XCHAT_DIR "X-Chat 2" -#else +#ifndef WIN32 #define XCHAT_DIR ".xchat2" #endif #define DEF_FONT "Monospace 9" @@ -308,12 +306,19 @@ get_xdir_fs (void) { if (!xdir_fs) { - char out[256]; + if (portable_mode ()) + { + xdir_fs = ".\\config"; + } + else + { + char out[256]; - if (!get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\" - "Explorer\\Shell Folders", "AppData", out, sizeof (out))) - return "./config"; - xdir_fs = g_strdup_printf ("%s\\" XCHAT_DIR, out); + if (!get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\" + "Explorer\\Shell Folders", "AppData", out, sizeof (out))) + return "./config"; + xdir_fs = g_strdup_printf ("%s\\" "X-Chat 2", out); + } } return xdir_fs; } @@ -393,7 +398,7 @@ const struct prefs vars[] = { {"dcc_blocksize", P_OFFINT (dcc_blocksize), TYPE_INT}, {"dcc_completed_dir", P_OFFSET (dcc_completed_dir), TYPE_STR}, {"dcc_dir", P_OFFSET (dccdir), TYPE_STR}, - {"dcc_fast_send", P_OFFINT (fastdccsend), TYPE_BOOL}, + /* {"dcc_fast_send", P_OFFINT (fastdccsend), TYPE_BOOL}, */ {"dcc_global_max_get_cps", P_OFFINT (dcc_global_max_get_cps), TYPE_INT}, {"dcc_global_max_send_cps", P_OFFINT (dcc_global_max_send_cps), TYPE_INT}, {"dcc_ip", P_OFFSET (dcc_ip_str), TYPE_STR}, @@ -536,6 +541,7 @@ const struct prefs vars[] = { {"tab_chans", P_OFFINT (tabchannels), TYPE_BOOL}, {"tab_dialogs", P_OFFINT (privmsgtab), TYPE_BOOL}, + {"tab_icons", P_OFFINT (tab_icons), TYPE_BOOL}, {"tab_layout", P_OFFINT (tab_layout), TYPE_INT}, {"tab_new_to_front", P_OFFINT (newtabstofront), TYPE_INT}, {"tab_notices", P_OFFINT (notices_tabs), TYPE_BOOL}, @@ -546,9 +552,14 @@ const struct prefs vars[] = { {"tab_sort", P_OFFINT (tab_sort), TYPE_BOOL}, {"tab_trunc", P_OFFINT (truncchans), TYPE_INT}, {"tab_utils", P_OFFINT (windows_as_tabs), TYPE_BOOL}, + {"tab_xp", P_OFFINT (tab_xp), TYPE_BOOL}, + {"text_auto_copy_text", P_OFFINT (autocopy_text), TYPE_BOOL}, + {"text_auto_copy_stamp", P_OFFINT (autocopy_stamp), TYPE_BOOL}, + {"text_auto_copy_color", P_OFFINT (autocopy_color), TYPE_BOOL}, {"text_background", P_OFFSET (background), TYPE_STR}, {"text_color_nicks", P_OFFINT (colorednicks), TYPE_BOOL}, + {"text_emoticons", P_OFFINT (emoticons), TYPE_BOOL}, {"text_font", P_OFFSET (font_normal), TYPE_STR}, {"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL}, {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, @@ -561,7 +572,7 @@ const struct prefs vars[] = { {"text_tint_blue", P_OFFINT (tint_blue), TYPE_INT}, {"text_tint_green", P_OFFINT (tint_green), TYPE_INT}, {"text_tint_red", P_OFFINT (tint_red), TYPE_INT}, - {"text_transparent", P_OFFINT (transparent), TYPE_BOOL}, + /* {"text_transparent", P_OFFINT (transparent), TYPE_BOOL}, */ {"text_wordwrap", P_OFFINT (wordwrap), TYPE_BOOL}, {0, 0, 0}, @@ -624,13 +635,14 @@ load_config (void) prefs.indent_nicks = 1; prefs.thin_separator = 1; prefs._tabs_position = 2; /* 2 = left */ - prefs.fastdccsend = 1; + /* prefs.fastdccsend = 1; */ prefs.wordwrap = 1; prefs.autosave = 1; prefs.autodialog = 1; prefs.gui_input_spell = 1; prefs.autoreconnect = 1; prefs.recon_delay = 10; + prefs.autocopy_text = 1; prefs.text_replay = 1; prefs.tabchannels = 1; prefs.tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */ @@ -648,6 +660,7 @@ load_config (void) prefs.dialog_height = 256; prefs.gui_join_dialog = 1; prefs.gui_quit_dialog = 1; + prefs.slist_skip = 1; prefs.dcctimeout = 180; prefs.dccstalltimeout = 60; prefs.notify_timeout = 15; diff --git a/src/common/chanopt.c b/src/common/chanopt.c index a4fd8faa..ce37157a 100644 --- a/src/common/chanopt.c +++ b/src/common/chanopt.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include diff --git a/src/common/ctcp.c b/src/common/ctcp.c index 574cda79..a1d70049 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -18,7 +18,6 @@ #include #include -#include #include #include "xchat.h" @@ -134,7 +133,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (!strcasecmp (msg, "VERSION") && !prefs.hidever) { - snprintf (outbuf, sizeof (outbuf), "VERSION xchat "PACKAGE_VERSION" %s", + snprintf (outbuf, sizeof (outbuf), "VERSION XChat-WDK "PACKAGE_VERSION" / %s", get_cpu_str ()); serv->p_nctcp (serv, nick, outbuf); } diff --git a/src/common/dcc.c b/src/common/dcc.c index 8f289342..9375095e 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #define WANTSOCKET @@ -57,6 +56,7 @@ #ifdef USE_DCC64 #define BIG_STR_TO_INT(x) strtoull(x,NULL,10) +#define stat _stat64 #else #define BIG_STR_TO_INT(x) strtoul(x,NULL,10) #endif @@ -1983,9 +1983,7 @@ is_same_file (struct DCC *dcc, struct DCC *new_dcc) return TRUE; /* now handle case-insensitive Filesystems: HFS+, FAT */ -#ifdef WIN32 -#warning no win32 implementation - behaviour may be unreliable -#else +#ifndef WIN32 /* this fstat() shouldn't really fail */ if ((dcc->fp == -1 ? stat (dcc->destfile_fs, &st_a) : fstat (dcc->fp, &st_a)) == -1) return FALSE; diff --git a/src/common/dirent.c b/src/common/dirent.c new file mode 100644 index 00000000..a84f1b65 --- /dev/null +++ b/src/common/dirent.c @@ -0,0 +1,199 @@ +/***************************************************************************** + * dirent.h - dirent API for Microsoft Visual Studio + * + * Copyright (C) 2006 Toni Ronkko + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * ``Software''), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Dec 15, 2009, John Cunningham + * Added rewinddir member function + * + * Jan 18, 2008, Toni Ronkko + * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string + * between multi-byte and unicode representations. This makes the + * code simpler and also allows the code to be compiled under MingW. Thanks + * to Azriel Fasten for the suggestion. + * + * Mar 4, 2007, Toni Ronkko + * Bug fix: due to the strncpy_s() function this file only compiled in + * Visual Studio 2005. Using the new string functions only when the + * compiler version allows. + * + * Nov 2, 2006, Toni Ronkko + * Major update: removed support for Watcom C, MS-DOS and Turbo C to + * simplify the file, updated the code to compile cleanly on Visual + * Studio 2005 with both unicode and multi-byte character strings, + * removed rewinddir() as it had a bug. + * + * Aug 20, 2006, Toni Ronkko + * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified + * comments by removing SGML tags. + * + * May 14 2002, Toni Ronkko + * Embedded the function definitions directly to the header so that no + * source modules need to be included in the Visual Studio project. Removed + * all the dependencies to other projects so that this very header can be + * used independently. + * + * May 28 1998, Toni Ronkko + * First version. + *****************************************************************************/ + +#include "dirent.h" + +/* Use the new safe string functions introduced in Visual Studio 2005 */ +#if defined(_MSC_VER) && _MSC_VER >= 1400 +# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) +#else +# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) +#endif + + +/***************************************************************************** + * Open directory stream DIRNAME for read and return a pointer to the + * internal working area that is used to retrieve individual directory + * entries. + */ +DIR *opendir(const char *dirname) +{ + DIR *dirp; + assert (dirname != NULL); + assert (strlen (dirname) < MAX_PATH); + + /* construct new DIR structure */ + dirp = (DIR*) malloc (sizeof (struct DIR)); + if (dirp != NULL) { + char *p; + + /* take directory name... */ + STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); + dirp->patt[MAX_PATH] = '\0'; + + /* ... and append search pattern to it */ + p = strchr (dirp->patt, '\0'); + if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { + *p++ = '\\'; + } + *p++ = '*'; + *p = '\0'; + + /* open stream and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return NULL; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; + } + + return dirp; +} + + +/***************************************************************************** + * Read a directory entry, and return a pointer to a dirent structure + * containing the name of the entry in d_name field. Individual directory + * entries returned by this very function include regular files, + * sub-directories, pseudo-directories "." and "..", but also volume labels, + * hidden files and system files may be returned. + */ +struct dirent *readdir(DIR *dirp) +{ + assert (dirp != NULL); + + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* directory stream was opened/rewound incorrectly or ended normally */ + return NULL; + } + + /* get next directory entry */ + if (dirp->cached != 0) { + /* a valid directory entry already in memory */ + dirp->cached = 0; + } else { + /* read next directory entry from disk */ + if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { + /* the very last file has been processed or an error occured */ + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + return NULL; + } + } + + /* copy as a multibyte character string */ + STRNCPY ( dirp->current.d_name, + dirp->current.data.cFileName, + sizeof(dirp->current.d_name) ); + dirp->current.d_name[MAX_PATH] = '\0'; + + return &dirp->current; +} + + +/***************************************************************************** + * Close directory stream opened by opendir() function. Close of the + * directory stream invalidates the DIR structure as well as any previously + * read directory entry. + */ +int closedir(DIR *dirp) +{ + assert (dirp != NULL); + + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* release directory handle */ + free (dirp); + return 0; +} + + +/***************************************************************************** + * Resets the position of the directory stream to which dirp refers to the + * beginning of the directory. It also causes the directory stream to refer + * to the current state of the corresponding directory, as a call to opendir() + * would have done. If dirp does not refer to a directory stream, the effect + * is undefined. + */ +void rewinddir(DIR* dirp) +{ + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* open new search handle and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; +} diff --git a/src/common/dirent.h b/src/common/dirent.h new file mode 100644 index 00000000..cbb753e6 --- /dev/null +++ b/src/common/dirent.h @@ -0,0 +1,28 @@ +#ifndef DIRENT_H +#define DIRENT_H + +#include +#include +#include + +typedef struct dirent +{ + char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ + WIN32_FIND_DATAA data; /* file attributes */ +} dirent; + +typedef struct DIR +{ + dirent current; /* Current directory entry */ + int cached; /* Indicates un-processed entry in memory */ + HANDLE search_handle; /* File search handle */ + char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ +} DIR; + +/* Forward declarations */ +DIR *opendir (const char *dirname); +struct dirent *readdir (DIR *dirp); +int closedir (DIR *dirp); +void rewinddir(DIR* dirp); + +#endif /*DIRENT_H*/ diff --git a/src/common/ignore.c b/src/common/ignore.c index c3544f30..adb61f37 100644 --- a/src/common/ignore.c +++ b/src/common/ignore.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/common/inbound.c b/src/common/inbound.c index ec7dd9d0..5cd888c9 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #define WANTARPA diff --git a/src/common/inet.h b/src/common/inet.h index b420c9c6..02473fe2 100644 --- a/src/common/inet.h +++ b/src/common/inet.h @@ -24,9 +24,8 @@ #ifdef USE_IPV6 #include #include -#include #else -#include +#include #endif #define set_blocking(sok) { \ diff --git a/src/common/makefile.mak b/src/common/makefile.mak new file mode 100644 index 00000000..424316c0 --- /dev/null +++ b/src/common/makefile.mak @@ -0,0 +1,45 @@ +include "..\makeinc.mak" + +COMMON_OBJECTS = \ +cfgfiles.obj \ +chanopt.obj \ +ctcp.obj \ +dcc.obj \ +dirent.obj \ +history.obj \ +ignore.obj \ +inbound.obj \ +modes.obj \ +network.obj \ +notify.obj \ +outbound.obj \ +plugin.obj \ +plugin-timer.obj \ +proto-irc.obj \ +server.obj \ +servlist.obj \ +ssl.obj \ +text.obj \ +thread.obj \ +tree.obj \ +url.obj \ +userlist.obj \ +util.obj \ +wdkutil.obj \ +xchat.obj + +all: $(COMMON_OBJECTS) xchatcommon.lib dirent.lib + +xchatcommon.lib: $(COMMON_OBJECTS) + lib /nologo /out:xchatcommon.lib $(COMMON_OBJECTS) + +dirent.lib: dirent.obj + lib /nologo /out:dirent.lib dirent.obj + +.c.obj:: + $(CC) $(CFLAGS) $(GLIB) $< + +clean: + @del *.obj + @del xchatcommon.lib + @del dirent.lib diff --git a/src/common/msproxy.c b/src/common/msproxy.c index 9c85394d..8ad37ffc 100644 --- a/src/common/msproxy.c +++ b/src/common/msproxy.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #define WANTSOCKET diff --git a/src/common/network.c b/src/common/network.c index 0c409506..b7d9aa1f 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "../../config.h" /* grab USE_IPV6 and LOOKUPD defines */ diff --git a/src/common/notify.c b/src/common/notify.c index 04795849..4aa5ea17 100644 --- a/src/common/notify.c +++ b/src/common/notify.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "xchat.h" diff --git a/src/common/outbound.c b/src/common/outbound.c index 7c6e5e6a..df8eddbd 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -32,7 +32,6 @@ #include #endif -#include #include #include #include diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c index f09074a8..2524439d 100644 --- a/src/common/plugin-timer.c +++ b/src/common/plugin-timer.c @@ -1,7 +1,7 @@ #include #include #include -#include "xchat-plugin.h" +#include "../../plugins/xchat-plugin.h" #ifdef WIN32 #define strcasecmp stricmp diff --git a/src/common/plugin.c b/src/common/plugin.c index ada4d3be..b40660a1 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -34,7 +34,7 @@ #include "text.h" #define PLUGIN_C typedef struct session xchat_context; -#include "xchat-plugin.h" +#include "../../plugins/xchat-plugin.h" #include "plugin.h" @@ -996,13 +996,16 @@ xchat_get_info (xchat_plugin *ph, const char *id) return XCHATLIBDIR; case 0x14f51cd8: /* version */ - return PACKAGE_VERSION; + return XCHAT_RELEASE; case 0xdd9b1abd: /* xchatdir */ return get_xdir_utf8 (); case 0xe33f6c4a: /* xchatdirfs */ return get_xdir_fs (); + + case 0x3d1e70d7: /* wdk_version */ + return PACKAGE_VERSION; } sess = ph->context; diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index f1df6ccd..3d45e1b0 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -18,7 +18,6 @@ /* IRC RFC1459(+commonly used extensions) protocol implementation */ -#include #include #include #include diff --git a/src/common/server.c b/src/common/server.c index dd43adff..e72dd24d 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -845,33 +844,6 @@ server_flush_queue (server *serv) fe_set_throttle (serv); } -#ifdef WIN32 - -static int -waitline2 (GIOChannel *source, char *buf, int bufsize) -{ - int i = 0; - int len; - - while (1) - { - if (g_io_channel_read (source, &buf[i], 1, &len) != G_IO_ERROR_NONE) - return -1; - if (buf[i] == '\n' || bufsize == i + 1) - { - buf[i] = 0; - return i; - } - i++; - } -} - -#else - -#define waitline2(source,buf,size) waitline(serv->childread,buf,size,0) - -#endif - /* connect() successed */ static void @@ -1395,12 +1367,7 @@ base64_encode (char *to, char *from, unsigned int len) static int http_read_line (int print_fd, int sok, char *buf, int len) { -#ifdef WIN32 - /* make sure waitline() uses recv() or it'll fail on win32 */ - len = waitline (sok, buf, len, FALSE); -#else len = waitline (sok, buf, len, TRUE); -#endif if (len >= 1) { /* print the message out (send it to the parent process) */ @@ -1524,9 +1491,10 @@ server_child (server * serv) if (!serv->dont_use_proxy) /* blocked in serverlist? */ { if (FALSE) + { ; #ifdef USE_LIBPROXY - else if (prefs.proxy_type == 5) + } else if (prefs.proxy_type == 5) { char **proxy_list; char *url, *proxy; @@ -1795,7 +1763,7 @@ server_connect (server *serv, char *hostname, int port, int no_login) } #endif serv->childpid = pid; - serv->iotag = fe_input_add (serv->childread, FIA_READ, server_read_child, + serv->iotag = fe_input_add (serv->childread, FIA_READ|FIA_FD, server_read_child, serv); } diff --git a/src/common/servlist.c b/src/common/servlist.c index 20a156a8..0f8f8048 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "xchat.h" #include diff --git a/src/common/ssl.c b/src/common/ssl.c index a18ad47c..daa7416b 100644 --- a/src/common/ssl.c +++ b/src/common/ssl.c @@ -17,12 +17,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#include "inet.h" /* make it first to avoid macro redefinitions */ #include /* SSL_() */ #include /* ERR_() */ #include /* asctime() */ #include /* strncpy() */ #include "ssl.h" /* struct cert_info */ -#include "inet.h" #include "../../config.h" /* HAVE_SNPRINTF */ #ifndef HAVE_SNPRINTF diff --git a/src/common/text.c b/src/common/text.c index a2198517..fcde5870 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -19,13 +19,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include "xchat.h" #include @@ -271,9 +269,6 @@ scrollback_load (session *sess) char *text; time_t stamp; int lines; - char *map, *end_map; - struct stat statbuf; - const char *begin, *eol; if (sess->text_scrollback == SET_DEFAULT) { @@ -293,32 +288,9 @@ scrollback_load (session *sess) if (fh == -1) return; - if (fstat (fh, &statbuf) < 0) - return; - - map = mmap (NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fh, 0); - if (map == MAP_FAILED) - return; - - end_map = map + statbuf.st_size; - lines = 0; - begin = map; - while (begin < end_map) + while (waitline (fh, buf, sizeof buf, FALSE) != -1) { - int n_bytes; - - eol = memchr (begin, '\n', end_map - begin); - - if (!eol) - eol = end_map; - - n_bytes = MIN (eol - begin, sizeof (buf) - 1); - - strncpy (buf, begin, n_bytes); - - buf[n_bytes] = 0; - if (buf[0] == 'T') { if (sizeof (time_t) == 4) @@ -334,8 +306,6 @@ scrollback_load (session *sess) } lines++; } - - begin = eol + 1; } sess->scrollwritten = lines; @@ -349,7 +319,6 @@ scrollback_load (session *sess) /*EMIT_SIGNAL (XP_TE_GENMSG, sess, "*", buf, NULL, NULL, NULL, 0);*/ } - munmap (map, statbuf.st_size); close (fh); } diff --git a/src/common/thread.c b/src/common/thread.c new file mode 100644 index 00000000..02b17cfb --- /dev/null +++ b/src/common/thread.c @@ -0,0 +1,33 @@ +#include +#include "thread.h" + +thread * +thread_new (void) +{ + thread *th; + + th = calloc (1, sizeof (*th)); + if (!th) + { + return NULL; + } + + if (_pipe (th->pipe_fd, 4096, _O_BINARY) == -1) + { + free (th); + return NULL; + } + + return th; +} + +int +thread_start (thread *th, void *(*start_routine)(void *), void *arg) +{ + DWORD id; + + CloseHandle (CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)start_routine, arg, 0, (DWORD *)&id)); + th->threadid = id; + + return 1; +} diff --git a/src/common/thread.h b/src/common/thread.h new file mode 100644 index 00000000..7ca0f937 --- /dev/null +++ b/src/common/thread.h @@ -0,0 +1,10 @@ +#include + +typedef struct +{ + DWORD threadid; + int pipe_fd[2]; +} thread; + +thread *thread_new (void); +int thread_start (thread *th, void *(*start_routine)(void *), void *arg); diff --git a/src/common/util.c b/src/common/util.c index 49517ec4..67168a5f 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -16,11 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#define WANTSOCKET +#include "inet.h" /* make it first to avoid macro redefinitions */ + #define __APPLE_API_STRICT_CONFORMANCE #define _FILE_OFFSET_BITS 64 #include -#include #include #include #include @@ -35,7 +37,7 @@ #include #endif #include -#include +#include "dirent.h" #include #include "xchat.h" #include "xchatc.h" @@ -44,9 +46,6 @@ #include "util.h" #include "../../config.h" -#define WANTSOCKET -#include "inet.h" - #if defined (USING_FREEBSD) || defined (__APPLE__) #include #endif @@ -54,9 +53,11 @@ #include #endif +#ifndef ENABLE_NLS #ifndef HAVE_SNPRINTF #define snprintf g_snprintf #endif +#endif #ifdef USE_DEBUG @@ -383,6 +384,28 @@ waitline (int sok, char *buf, int bufsize, int use_recv) } } +#ifdef WIN32 +/* waitline2 using win32 file descriptor and glib instead of _read. win32 can't _read() sok! */ +int +waitline2 (GIOChannel *source, char *buf, int bufsize) +{ + int i = 0; + int len; + + while (1) + { + if (g_io_channel_read (source, &buf[i], 1, &len) != G_IO_ERROR_NONE) + return -1; + if (buf[i] == '\n' || bufsize == i + 1) + { + buf[i] = 0; + return i; + } + i++; + } +} +#endif + /* checks for "~" in a file and expands */ char * @@ -628,26 +651,79 @@ char * get_cpu_str (void) { static char verbuf[64]; - OSVERSIONINFO osvi; - SYSTEM_INFO si; + static char winver[20]; + OSVERSIONINFOEX osvi; double mhz; - osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); + osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX); GetVersionEx (&osvi); - GetSystemInfo (&si); + + switch (osvi.dwMajorVersion) + { + case 5: + switch (osvi.dwMinorVersion) + { + case 1: + strcpy (winver, "XP"); + break; + case 2: + if (osvi.wProductType == VER_NT_WORKSTATION) + { + strcpy (winver, "XP x64 Edition"); + } + else + { + if (GetSystemMetrics(SM_SERVERR2) == 0) + { + strcpy (winver, "Server 2003"); + } + else + { + strcpy (winver, "Server 2003 R2"); + } + } + break; + } + break; + case 6: + switch (osvi.dwMinorVersion) + { + case 0: + if (osvi.wProductType == VER_NT_WORKSTATION) + { + strcpy (winver, "Vista"); + } + else + { + strcpy (winver, "Server 2008"); + } + break; + case 1: + if (osvi.wProductType == VER_NT_WORKSTATION) + { + strcpy (winver, "7"); + } + else + { + strcpy (winver, "Server 2008 R2"); + } + break; + } + break; + } mhz = get_mhz (); if (mhz) { double cpuspeed = ( mhz > 1000 ) ? mhz / 1000 : mhz; const char *cpuspeedstr = ( mhz > 1000 ) ? "GHz" : "MHz"; - sprintf (verbuf, "Windows %ld.%ld [i%d86/%.2f%s]", - osvi.dwMajorVersion, osvi.dwMinorVersion, si.wProcessorLevel, - cpuspeed, cpuspeedstr); - } else - sprintf (verbuf, "Windows %ld.%ld [i%d86]", - osvi.dwMajorVersion, osvi.dwMinorVersion, si.wProcessorLevel); - + sprintf (verbuf, "Windows %s [%.2f%s]", winver, cpuspeed, cpuspeedstr); + } + else + { + sprintf (verbuf, "Windows %s", winver); + } + return verbuf; } diff --git a/src/common/util.h b/src/common/util.h index fce45def..cd9e1fff 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -43,6 +43,11 @@ int strip_color2 (const char *src, int len, char *dst, int flags); int strip_hidden_attribute (char *src, char *dst); char *errorstring (int err); int waitline (int sok, char *buf, int bufsize, int); +#ifdef WIN32 +int waitline2 (GIOChannel *source, char *buf, int bufsize); +#else +#define waitline2(source,buf,size) waitline(serv->childread,buf,size,0) +#endif unsigned long make_ping_time (void); void move_file_utf8 (char *src_dir, char *dst_dir, char *fname, int dccpermissions); int mkdir_utf8 (char *dir); diff --git a/src/common/wdkutil.c b/src/common/wdkutil.c new file mode 100644 index 00000000..5bf4f0c0 --- /dev/null +++ b/src/common/wdkutil.c @@ -0,0 +1,27 @@ +#include + +int +portable_mode () +{ + if ((_access( "portable-mode", 0 )) != -1) + { + return 1; + } + else + { + return 0; + } +} + +int +xtray_mode () +{ + if ((_access( "plugins/xtray.dll", 0 )) != -1) + { + return 1; + } + else + { + return 0; + } +} diff --git a/src/common/wdkutil.h b/src/common/wdkutil.h new file mode 100644 index 00000000..2e4c693a --- /dev/null +++ b/src/common/wdkutil.h @@ -0,0 +1,2 @@ +int portable_mode (); +int xtray_mode (); diff --git a/src/common/xchat.c b/src/common/xchat.c index afac9a0e..ba2f5d41 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -22,7 +22,6 @@ #include #include #include -#include #define WANTSOCKET #include "inet.h" @@ -38,7 +37,7 @@ #include "cfgfiles.h" #include "chanopt.h" #include "ignore.h" -#include "xchat-plugin.h" +#include "../../plugins/xchat-plugin.h" #include "plugin.h" #include "plugin-timer.h" #include "notify.h" @@ -590,6 +589,7 @@ static char defaultconf_commands[] = "NAME DMSG\n" "CMD msg =%2 &3\n\n"\ "NAME EXIT\n" "CMD quit\n\n"\ "NAME GREP\n" "CMD lastlog -r &2\n\n"\ + "NAME IGNALL\n" "CMD ignore %2!*@* ALL\n\n"\ "NAME J\n" "CMD join &2\n\n"\ "NAME KILL\n" "CMD quote KILL %2 :&3\n\n"\ "NAME LEAVE\n" "CMD part &2\n\n"\ diff --git a/src/common/xchat.h b/src/common/xchat.h index db7a6c4b..2f695599 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -12,12 +12,14 @@ #include "history.h" +#ifndef ENABLE_NLS #ifndef HAVE_SNPRINTF #define snprintf g_snprintf #endif #ifndef HAVE_VSNPRINTF -#define vsnprintf g_vsnprintf +#define vsnprintf _vsnprintf +#endif #endif #ifdef USE_DEBUG @@ -58,7 +60,7 @@ void *xchat_realloc (char *old, int len, char *file, int line); #ifdef WIN32 /* for win32 */ #define OFLAGS O_BINARY -#define sleep(t) _sleep(t*1000) +#define sleep(t) Sleep(t*1000) #include #define F_OK 0 #define X_OK 1 @@ -209,6 +211,9 @@ struct xchatprefs unsigned int wallops; unsigned int skipmotd; unsigned int autorejoin; + unsigned int autocopy_text; + unsigned int autocopy_stamp; + unsigned int autocopy_color; unsigned int colorednicks; unsigned int chanmodebuttons; unsigned int userlistbuttons; @@ -297,6 +302,9 @@ struct xchatprefs unsigned int confmode; unsigned int utf8_locale; unsigned int identd; + unsigned int emoticons; + unsigned int tab_icons; + unsigned int tab_xp; unsigned int ctcp_number_limit; /*flood */ unsigned int ctcp_time_limit; /*seconds of floods */ diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index 60700aec..453d405c 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -39,6 +39,7 @@ #include "../common/xchat.h" #include "../common/util.h" +#include "../common/wdkutil.h" #include "palette.h" #include "pixmaps.h" #include "gtkutil.h" @@ -87,6 +88,19 @@ menu_about (GtkWidget * wid, gpointer sess) char buf[512]; const char *locale = NULL; extern GtkWindow *parent_window; /* maingui.c */ + SYSTEM_INFO si; + unsigned short int cpu_arch; + + GetSystemInfo (&si); + + if (si.wProcessorArchitecture == 9) + { + cpu_arch = 64; + } + else + { + cpu_arch = 86; + } if (about) { @@ -95,7 +109,7 @@ menu_about (GtkWidget * wid, gpointer sess) } about = gtk_dialog_new (); - gtk_window_set_position (GTK_WINDOW (about), GTK_WIN_POS_CENTER); + gtk_window_set_position (GTK_WINDOW (about), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_resizable (GTK_WINDOW (about), FALSE); gtk_window_set_title (GTK_WINDOW (about), _("About "DISPLAY_NAME)); if (parent_window) @@ -114,35 +128,42 @@ menu_about (GtkWidget * wid, gpointer sess) g_get_charset (&locale); (snprintf) (buf, sizeof (buf), ""DISPLAY_NAME" "PACKAGE_VERSION"\n\n" - "%s\n\n" #ifdef WIN32 - /* leave this message to avoid time wasting bug reports! */ - "This version is unofficial and comes with no support.\n\n" -#endif - "%s\n" + "XChat Release: "XCHAT_RELEASE"\n\n" + "OS: %s\n" "Charset: %s " -#ifdef WIN32 "GTK+: %i.%i.%i\n" + "Compiled: "__DATE__"\n" + "Portable Mode: %s\n" + "Build Type: x%d\n\n" + "This version is unofficial and comes with no support.\n" + "\302\251 1998-2010 Peter \305\275elezn\303\275 <zed@xchat.org>" + /* "\nhttp://code.google.com/p/xchat-wdk/" this is broken in gtk ATM */ + "", + get_cpu_str (), + locale, + gtk_major_version, + gtk_minor_version, + gtk_micro_version, + (portable_mode () ? "Yes" : "No"), + cpu_arch #else + "%s\n\n" + "%s\n" + "Charset: %s " "Renderer: %s\n" -#endif "Compiled: "__DATE__"\n\n" "\302\251 1998-2010 Peter \305\275elezn\303\275 <zed@xchat.org>", - _("A multiplatform IRC Client"), - get_cpu_str(), - locale, -#ifdef WIN32 - gtk_major_version, - gtk_minor_version, - gtk_micro_version -#else + _("A multiplatform IRC Client"), + get_cpu_str (), + locale, #ifdef USE_XFT - "Xft" + "Xft" #else - "Pango" + "Pango" #endif #endif - ); + ); gtk_label_set_markup (GTK_LABEL (label), buf); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER); diff --git a/src/fe-gtk/banlist.c b/src/fe-gtk/banlist.c index afaa7eb4..f587a0c0 100644 --- a/src/fe-gtk/banlist.c +++ b/src/fe-gtk/banlist.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c index 2f65b518..6203083b 100644 --- a/src/fe-gtk/chanlist.c +++ b/src/fe-gtk/chanlist.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/fe-gtk/chanview-tabs.c b/src/fe-gtk/chanview-tabs.c index 8e3da8e6..f99e61f1 100644 --- a/src/fe-gtk/chanview-tabs.c +++ b/src/fe-gtk/chanview-tabs.c @@ -144,8 +144,8 @@ tab_scroll_left_up_clicked (GtkWidget *widget, chanview *cv) for (i = adj->value; ((i > new_value) && (tab_left_is_moving)); i -= 0.1) { gtk_adjustment_set_value (adj, i); - while (g_main_pending ()) - g_main_iteration (TRUE); + while (g_main_context_pending (NULL)) + g_main_context_iteration (NULL, TRUE); } gtk_adjustment_set_value (adj, new_value); @@ -191,8 +191,8 @@ tab_scroll_right_down_clicked (GtkWidget *widget, chanview *cv) for (i = adj->value; ((i < new_value) && (tab_right_is_moving)); i += 0.1) { gtk_adjustment_set_value (adj, i); - while (g_main_pending ()) - g_main_iteration (TRUE); + while (g_main_context_pending (NULL)) + g_main_context_iteration (NULL, TRUE); } gtk_adjustment_set_value (adj, new_value); diff --git a/src/fe-gtk/editlist.c b/src/fe-gtk/editlist.c index 5af67e32..fd2d6810 100644 --- a/src/fe-gtk/editlist.c +++ b/src/fe-gtk/editlist.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index 5efcaeec..3f403f94 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -19,7 +19,6 @@ #include #include #include -#include #include "fe-gtk.h" @@ -32,6 +31,8 @@ #include #include +#include + #include "../common/xchat.h" #include "../common/fe.h" #include "../common/util.h" @@ -39,6 +40,7 @@ #include "../common/cfgfiles.h" #include "../common/xchatc.h" #include "../common/plugin.h" +#include "../common/server.h" #include "gtkutil.h" #include "maingui.h" #include "pixmaps.h" @@ -136,11 +138,26 @@ static const GOptionEntry gopt_entries[] = {NULL} }; +#ifdef WIN32 +static void +create_msg_dialog (gchar *title, gchar *message) +{ + GtkWidget *dialog; + dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, message); + gtk_window_set_title (GTK_WINDOW (dialog), title); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); +} +#endif + int fe_args (int argc, char *argv[]) { GError *error = NULL; GOptionContext *context; +#ifdef WIN32 + char *buffer[2048]; +#endif #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); @@ -149,22 +166,67 @@ fe_args (int argc, char *argv[]) #endif context = g_option_context_new (NULL); +#ifdef WIN32 + g_option_context_set_help_enabled (context, FALSE); /* disable stdout help as stdout is unavailable for subsystem:windows */ +#endif g_option_context_add_main_entries (context, gopt_entries, GETTEXT_PACKAGE); g_option_context_add_group (context, gtk_get_option_group (FALSE)); g_option_context_parse (context, &argc, &argv, &error); +#ifdef WIN32 + if (error) /* workaround for argv not being available when using subsystem:windows */ + { + if (error->message) /* the error message contains argv so search for patterns in that */ + { + if (strstr (error->message, "--help-all") != NULL) + { + if (snprintf (buffer, 2048, g_option_context_get_help (context, FALSE, NULL))) + { + gtk_init (&argc, &argv); + create_msg_dialog ("Long Help", buffer); + } + return 0; + } else if (strstr (error->message, "--help") != NULL || strstr (error->message, "-?") != NULL) + { + if (snprintf (buffer, 2048, g_option_context_get_help (context, TRUE, NULL))) + { + gtk_init (&argc, &argv); + create_msg_dialog ("Help", buffer); + } + return 0; + } else + { + if (snprintf (buffer, 2048, "%s\n", error->message)) + { + gtk_init (&argc, &argv); + create_msg_dialog ("Error", buffer); + } + return 1; + } + } + } +#else if (error) { if (error->message) printf ("%s\n", error->message); return 1; } +#endif g_option_context_free (context); if (arg_show_version) { +#ifdef WIN32 + if (snprintf (buffer, 2048, DISPLAY_NAME" "PACKAGE_VERSION"\n")) + { + gtk_init (&argc, &argv); + create_msg_dialog ("Version Information", buffer); + } +#else printf (PACKAGE_TARNAME" "PACKAGE_VERSION"\n"); +#endif return 0; } @@ -177,7 +239,18 @@ fe_args (int argc, char *argv[]) if (sl) { *sl = 0; - printf ("%s\\plugins\n", exe); + if (snprintf (buffer, 2048, "%s\\plugins\n", exe)) + { + gtk_init (&argc, &argv); + create_msg_dialog ("Plugin Auto-load Directory", buffer); + } + } else + { + if (snprintf (buffer, 2048, ".\\plugins\n")) + { + gtk_init (&argc, &argv); + create_msg_dialog ("Plugin Auto-load Directory", buffer); + } } #else printf ("%s\n", XCHATLIBDIR"/plugins"); @@ -187,7 +260,15 @@ fe_args (int argc, char *argv[]) if (arg_show_config) { +#ifdef WIN32 + if (snprintf (buffer, 2048, "%s\n", get_xdir_fs ())) + { + gtk_init (&argc, &argv); + create_msg_dialog ("User Config Directory", buffer); + } +#else printf ("%s\n", get_xdir_fs ()); +#endif return 0; } @@ -330,7 +411,7 @@ log_handler (const gchar *log_domain, { session *sess; - if (getenv ("XCHAT_WARNING_IGNORE")) + /* if (getenv ("XCHAT_WARNING_IGNORE")) */ return; sess = find_dialog (serv_list->data, "(warnings)"); diff --git a/src/fe-gtk/fe-gtk.h b/src/fe-gtk/fe-gtk.h index 12516259..4183f559 100644 --- a/src/fe-gtk/fe-gtk.h +++ b/src/fe-gtk/fe-gtk.h @@ -4,7 +4,7 @@ /* If you're compiling this for Windows, your release is un-official * and not condoned. Please don't use the XChat name. Make up your * own name! */ -#define DISPLAY_NAME "XChat-Unofficial" +#define DISPLAY_NAME "XChat-WDK" #else #define DISPLAY_NAME "XChat" #endif diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index 014b5cc3..a09c8608 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c index 63ab491b..522b44df 100644 --- a/src/fe-gtk/gtkutil.c +++ b/src/fe-gtk/gtkutil.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "fe-gtk.h" @@ -51,6 +50,10 @@ #include "../common/util.h" #include "gtkutil.h" #include "pixmaps.h" +#ifdef WIN32 +#include "../common/fe.h" +#include "../common/thread.h" +#endif /* gtkutil.c, just some gtk wrappers */ @@ -63,6 +66,13 @@ struct file_req void *userdata; filereqcallback callback; int flags; /* FRF_* flags */ + +#ifdef WIN32 + int multiple; + thread *th; + char *title; /* native locale */ + char *filter; +#endif }; static char last_dir[256] = ""; @@ -164,6 +174,190 @@ gtkutil_file_req_response (GtkWidget *dialog, gint res, struct file_req *freq) } } +#ifdef WIN32 +static int +win32_openfile (char *file_buf, int file_buf_len, char *title_text, char *filter, + int multiple) +{ + OPENFILENAME o; + + memset (&o, 0, sizeof (o)); + + o.lStructSize = sizeof (o); + o.lpstrFilter = filter; + o.lpstrFile = file_buf; + o.nMaxFile = file_buf_len; + o.lpstrTitle = title_text; + o.Flags = 0x02000000 | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | + OFN_NOCHANGEDIR | OFN_EXPLORER | OFN_LONGNAMES | OFN_NONETWORKBUTTON; + if (multiple) + { + o.Flags |= OFN_ALLOWMULTISELECT; + } + + return GetOpenFileName (&o); +} + +static int +win32_savefile (char *file_buf, int file_buf_len, char *title_text, char *filter, + int multiple) +{ + /* we need the filter to get the default filename. it is from fe-gtk.c (fe_confirm); + * but that filter is actually the whole filename, so apply an empty filter and all good. + * in win32_thread2 we copy the filter ( = the filename) after the last dir into our + * LPTSTR file buffer to make it actually work. the docs for this amazingly retard api: + * + * http://msdn.microsoft.com/en-us/library/ms646839%28VS.85%29.aspx + */ + + OPENFILENAME o; + + memset (&o, 0, sizeof (o)); + + o.lStructSize = sizeof (o); + o.lpstrFilter = "All files\0*.*\0\0"; + o.lpstrFile = file_buf; + o.nMaxFile = file_buf_len; + o.lpstrTitle = title_text; + o.Flags = 0x02000000 | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | + OFN_NOCHANGEDIR | OFN_EXPLORER | OFN_LONGNAMES | OFN_NONETWORKBUTTON; + if (multiple) + { + o.Flags |= OFN_ALLOWMULTISELECT; + } + + return GetSaveFileName (&o); +} + +static void * +win32_thread (struct file_req *freq) +{ + char buf[1024 + 32]; + char file[1024]; + + memset (file, 0, sizeof (file)); + safe_strcpy (file, last_dir, sizeof (file)); + + if (win32_openfile (file, sizeof (file), freq->title, freq->filter, freq->multiple)) + { + if (freq->multiple) + { + char *f = file; + + if (f[strlen (f) + 1] == 0) /* only selected one file */ + { + snprintf (buf, sizeof (buf), "1\n%s\n", file); + write (freq->th->pipe_fd[1], buf, strlen (buf)); + } else + { + f += strlen (f) + 1; /* skip first, it's only the dir */ + while (f[0]) + { + snprintf (buf, sizeof (buf), "1\n%s\\%s\n", /*dir!*/file, f); + write (freq->th->pipe_fd[1], buf, strlen (buf)); + f += strlen (f) + 1; + } + } + + } else + { + snprintf (buf, sizeof (buf), "1\n%s\n", file); + write (freq->th->pipe_fd[1], buf, strlen (buf)); + } + } + + write (freq->th->pipe_fd[1], "0\n", 2); + Sleep (2000); + + return NULL; +} + +static void * +win32_thread2 (struct file_req *freq) +{ + char buf[1024 + 32]; + char file[1024]; + + memset (file, 0, sizeof (file)); + safe_strcpy (file, last_dir, sizeof (file)); + safe_strcpy (file, freq->filter, sizeof (file)); + + if (win32_savefile (file, sizeof (file), freq->title, NULL, freq->multiple)) + { + if (freq->multiple) + { + char *f = file; + + if (f[strlen (f) + 1] == 0) /* only selected one file */ + { + snprintf (buf, sizeof (buf), "1\n%s\n", file); + write (freq->th->pipe_fd[1], buf, strlen (buf)); + } else + { + f += strlen (f) + 1; /* skip first, it's only the dir */ + while (f[0]) + { + snprintf (buf, sizeof (buf), "1\n%s\\%s\n", /*dir!*/file, f); + write (freq->th->pipe_fd[1], buf, strlen (buf)); + f += strlen (f) + 1; + } + } + + } else + { + snprintf (buf, sizeof (buf), "1\n%s\n", file); + write (freq->th->pipe_fd[1], buf, strlen (buf)); + } + } + + write (freq->th->pipe_fd[1], "0\n", 2); + Sleep (2000); + + return NULL; +} + +static gboolean +win32_close_pipe (int fd) +{ + close (fd); + return 0; +} + +static gboolean +win32_read_thread (GIOChannel *source, GIOCondition cond, struct file_req *freq) +{ + char buf[512]; + char *file; + + waitline2 (source, buf, sizeof buf); + + switch (buf[0]) + { + case '0': /* filedialog has closed */ + freq->callback (freq->userdata, NULL); + break; + + case '1': /* got a filename! */ + waitline2 (source, buf, sizeof buf); + file = g_filename_to_utf8 (buf, -1, 0, 0, 0); + freq->callback (freq->userdata, file); + g_free (file); + return TRUE; + } + + /* it doesn't work to close them here, because of the weird + way giowin32 works. We must _return_ before closing them */ + g_timeout_add(3000, (GSourceFunc)win32_close_pipe, freq->th->pipe_fd[0]); + g_timeout_add(2000, (GSourceFunc)win32_close_pipe, freq->th->pipe_fd[1]); + + g_free (freq->title); + free (freq->th); + free (freq); + + return FALSE; +} +#endif + void gtkutil_file_req (const char *title, void *callback, void *userdata, char *filter, int flags) @@ -172,6 +366,58 @@ gtkutil_file_req (const char *title, void *callback, void *userdata, char *filte GtkWidget *dialog; extern char *get_xdir_fs (void); +#ifdef WIN32 + if (!(flags & FRF_WRITE)) + { + freq = malloc (sizeof (struct file_req)); + freq->th = thread_new (); + freq->flags = 0; + freq->multiple = (flags & FRF_MULTIPLE); + freq->callback = callback; + freq->userdata = userdata; + freq->title = g_locale_from_utf8 (title, -1, 0, 0, 0); + if (!filter) + { + freq->filter = "All files\0*.*\0" + "Executables\0*.exe\0" + "ZIP files\0*.zip\0\0"; + } + else + { + freq->filter = filter; + } + + thread_start (freq->th, win32_thread, freq); + fe_input_add (freq->th->pipe_fd[0], FIA_FD|FIA_READ, win32_read_thread, freq); + + return; + + } + + else { + freq = malloc (sizeof (struct file_req)); + freq->th = thread_new (); + freq->flags = 0; + freq->multiple = (flags & FRF_MULTIPLE); + freq->callback = callback; + freq->userdata = userdata; + freq->title = g_locale_from_utf8 (title, -1, 0, 0, 0); + if (!filter) + { + freq->filter = "All files\0*.*\0\0"; + } + else + { + freq->filter = filter; + } + + thread_start (freq->th, win32_thread2, freq); + fe_input_add (freq->th->pipe_fd[0], FIA_FD|FIA_READ, win32_read_thread, freq); + + return; + } +#endif + if (flags & FRF_WRITE) { dialog = gtk_file_chooser_dialog_new (title, NULL, diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c index ee5c56d1..6cd812cf 100644 --- a/src/fe-gtk/joind.c +++ b/src/fe-gtk/joind.c @@ -9,7 +9,6 @@ #include #include -#include #include #include diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index ef269f95..27d47731 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -53,6 +53,7 @@ #include "../common/plugin.h" #include "../common/modes.h" #include "../common/url.h" +#include "../common/wdkutil.h" #include "fe-gtk.h" #include "banlist.h" #include "gtkutil.h" @@ -214,60 +215,10 @@ mg_create_tab_colors (void) away_list = mg_attr_list_create (&colors[COL_AWAY], FALSE); } -#ifdef WIN32 -#define WINVER 0x0501 /* needed for vc6? */ -#include -#include - -/* 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 - 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 +232,14 @@ unflash_window (GtkWidget *win) { 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 */ @@ -1334,7 +1281,7 @@ mg_open_quit_dialog (gboolean minimize_button) gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); - if (minimize_button) + if (minimize_button && !xtray_mode ()) { button = gtk_button_new_with_mnemonic (_("_Minimize to Tray")); gtk_widget_show (button); @@ -2972,11 +2919,7 @@ mg_tabwin_focus_cb (GtkWindow * win, GdkEventFocus *event, gpointer userdata) 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; } @@ -2987,11 +2930,7 @@ mg_topwin_focus_cb (GtkWindow * win, GdkEventFocus *event, session *sess) 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 --git a/src/fe-gtk/makefile.mak b/src/fe-gtk/makefile.mak new file mode 100644 index 00000000..f210181a --- /dev/null +++ b/src/fe-gtk/makefile.mak @@ -0,0 +1,60 @@ +include "..\makeinc.mak" + +FEGTK_OBJECTS = \ +about.obj \ +ascii.obj \ +banlist.obj \ +chanlist.obj \ +chanview.obj \ +custom-list.obj \ +dccgui.obj \ +editlist.obj \ +fe-gtk.obj \ +fkeys.obj \ +gtkutil.obj \ +ignoregui.obj \ +joind.obj \ +maingui.obj \ +menu.obj \ +notifygui.obj \ +palette.obj \ +pixmaps.obj \ +plugingui.obj \ +plugin-tray.obj \ +rawlog.obj \ +search.obj \ +servlistgui.obj \ +setup.obj \ +sexy-spell-entry.obj \ +textgui.obj \ +urlgrab.obj \ +userlistgui.obj \ +xtext.obj + +!ifdef X64 +MACHINE_FLAG = /MACHINE:X64 +!else +MACHINE_FLAG = /MACHINE:X86 +!endif + +COMLIB = ..\common\xchatcommon.lib +PROG = xchat.exe + +all: $(PROG) + +.c.obj:: + $(CC) $(CFLAGS) -I..\..\plugins $(GLIB) $(GTK) $< + +$(PROG): $(FEGTK_OBJECTS) $(COMLIB) xchat-icon.obj + $(LINK) /out:$(PROG) /entry:mainCRTStartup $(LDFLAGS) $(LIBS) $(FEGTK_OBJECTS) $(COMLIB) xchat-icon.obj + +xchat.res: xchat.rc ../../xchat.ico + rc /nologo /r xchat.rc + +xchat-icon.obj: xchat.res + cvtres /nologo $(MACHINE_FLAG) /OUT:xchat-icon.obj xchat.res + +clean: + @del *.obj + @del $(PROG) + @del xchat.res diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index d04be222..559211c2 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -20,7 +20,6 @@ #include #include #include -#include #ifdef WIN32 #include @@ -1203,6 +1202,12 @@ menu_resetmarker (GtkWidget * wid, gpointer none) gtk_xtext_reset_marker_pos (GTK_XTEXT (current_sess->gui->xtext)); } +static void +menu_copy_selection (GtkWidget * wid, gpointer none) +{ + gtk_xtext_copy_selection (GTK_XTEXT (current_sess->gui->xtext)); +} + static void menu_flushbuffer (GtkWidget * wid, gpointer none) { @@ -1645,6 +1650,7 @@ static struct mymenu mymenu[] = { {N_("URL Grabber..."), url_opengui, 0, M_MENUITEM, 0, 0, 1}, {0, 0, 0, M_SEP, 0, 0, 0}, {N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_m}, + {N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_C}, {N_("C_lear Text"), menu_flushbuffer, GTK_STOCK_CLEAR, M_MENUSTOCK, 0, 0, 1, GDK_l}, #define SEARCH_OFFSET 67 {N_("Search Text..."), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_f}, @@ -2188,7 +2194,9 @@ normalitem: mymenu[i].key, mymenu[i].key == GDK_F1 ? 0 : mymenu[i].key == GDK_w ? close_mask : - GDK_CONTROL_MASK, + (g_ascii_isupper (mymenu[i].key)) ? + GDK_SHIFT_MASK | GDK_CONTROL_MASK : + GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); if (mymenu[i].callback) g_signal_connect (G_OBJECT (item), "activate", diff --git a/src/fe-gtk/palette.c b/src/fe-gtk/palette.c index ebae92ff..8d2ee062 100644 --- a/src/fe-gtk/palette.c +++ b/src/fe-gtk/palette.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 8603abf4..eeed34fa 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -1,14 +1,14 @@ /* Copyright (C) 2006-2007 Peter Zelezny. */ #include -#include -#include "../common/xchat-plugin.h" +#include "../../plugins/xchat-plugin.h" #include "../common/xchat.h" #include "../common/xchatc.h" #include "../common/inbound.h" #include "../common/server.h" #include "../common/fe.h" #include "../common/util.h" +#include "../common/wdkutil.h" #include "fe-gtk.h" #include "pixmaps.h" #include "maingui.h" @@ -297,10 +297,10 @@ tray_stop_flash (void) nets = tray_count_networks (); chans = tray_count_channels (); if (nets) - tray_set_tipf (_("XChat: Connected to %u networks and %u channels"), + tray_set_tipf (_("XChat-WDK: Connected to %u networks and %u channels"), nets, chans); else - tray_set_tipf ("XChat: %s", _("Not connected.")); + tray_set_tipf ("XChat-WDK: %s", _("Not connected.")); } if (custom_icon1) @@ -450,7 +450,7 @@ tray_toggle_visibility (gboolean force_hide) /* ph may have an invalid context now */ xchat_set_context (ph, xchat_find_context (ph, NULL, NULL)); - win = (GtkWindow *)xchat_get_info (ph, "win_ptr"); + win = xchat_get_info (ph, "gtkwin_ptr"); tray_stop_flash (); tray_reset_counts (); @@ -585,11 +585,12 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata) /*gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));*/ if (tray_get_window_status () == WS_HIDDEN) - tray_make_item (menu, _("_Restore"), tray_menu_restore_cb, NULL); + tray_make_item (menu, _("_Restore Window"), tray_menu_restore_cb, NULL); else - tray_make_item (menu, _("_Hide"), tray_menu_restore_cb, NULL); + tray_make_item (menu, _("_Hide Window"), tray_menu_restore_cb, NULL); tray_make_item (menu, NULL, tray_menu_quit_cb, NULL); +#if 0 submenu = mg_submenu (menu, _("_Blink on")); blink_item (&prefs.input_tray_chans, submenu, _("Channel Message")); blink_item (&prefs.input_tray_priv, submenu, _("Private Message")); @@ -606,6 +607,7 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata) gtk_widget_set_sensitive (item, FALSE); tray_make_item (menu, NULL, tray_menu_quit_cb, NULL); +#endif mg_create_icon_item (_("_Quit"), GTK_STOCK_QUIT, menu, tray_menu_quit_cb, NULL); menu_add_plugin_items (menu, "\x5$TRAY", NULL); @@ -631,8 +633,8 @@ tray_init (void) sticon = gtk_status_icon_new_from_pixbuf (ICON_NORMAL); if (!sticon) return; - g_signal_connect (G_OBJECT (sticon), "popup-menu", - G_CALLBACK (tray_menu_cb), sticon); + /* g_signal_connect (G_OBJECT (sticon), "popup-menu", + G_CALLBACK (tray_menu_cb), sticon); */ g_signal_connect (G_OBJECT (sticon), "activate", G_CALLBACK (tray_menu_restore_cb), NULL); } @@ -650,15 +652,15 @@ tray_hilight_cb (char *word[], void *userdata) /* FIXME: hides any previous private messages */ tray_hilight_count++; if (tray_hilight_count == 1) - tray_set_tipf (_("XChat: Highlighted message from: %s (%s)"), + tray_set_tipf (_("XChat-WDK: Highlighted message from: %s (%s)"), word[1], xchat_get_info (ph, "channel")); else - tray_set_tipf (_("XChat: %u highlighted messages, latest from: %s (%s)"), + tray_set_tipf (_("XChat-WDK: %u highlighted messages, latest from: %s (%s)"), tray_hilight_count, word[1], xchat_get_info (ph, "channel")); } if (prefs.input_balloon_hilight) - tray_set_balloonf (word[2], _("XChat: Highlighted message from: %s (%s)"), + tray_set_balloonf (word[2], _("XChat-WDK: Highlighted message from: %s (%s)"), word[1], xchat_get_info (ph, "channel")); return XCHAT_EAT_NONE; @@ -676,14 +678,14 @@ tray_message_cb (char *word[], void *userdata) tray_pub_count++; if (tray_pub_count == 1) - tray_set_tipf (_("XChat: New public message from: %s (%s)"), + tray_set_tipf (_("XChat-WDK: New public message from: %s (%s)"), word[1], xchat_get_info (ph, "channel")); else - tray_set_tipf (_("XChat: %u new public messages."), tray_pub_count); + tray_set_tipf (_("XChat-WDK: %u new public messages."), tray_pub_count); } if (prefs.input_balloon_chans) - tray_set_balloonf (word[2], _("XChat: New public message from: %s (%s)"), + tray_set_balloonf (word[2], _("XChat-WDK: New public message from: %s (%s)"), word[1], xchat_get_info (ph, "channel")); return XCHAT_EAT_NONE; @@ -705,14 +707,14 @@ tray_priv (char *from, char *text) tray_priv_count++; if (tray_priv_count == 1) - tray_set_tipf (_("XChat: Private message from: %s (%s)"), + tray_set_tipf (_("XChat-WDK: Private message from: %s (%s)"), from, network); else - tray_set_tipf (_("XChat: %u private messages, latest from: %s (%s)"), + tray_set_tipf (_("XChat-WDK: %u private messages, latest from: %s (%s)"), tray_priv_count, from, network); if (prefs.input_balloon_priv) - tray_set_balloonf (text, _("XChat: Private message from: %s (%s)"), + tray_set_balloonf (text, _("XChat-WDK: Private message from: %s (%s)"), from, network); } @@ -758,15 +760,15 @@ tray_dcc_cb (char *word[], void *userdata) tray_file_count++; if (tray_file_count == 1) - tray_set_tipf (_("XChat: File offer from: %s (%s)"), + tray_set_tipf (_("XChat-WDK: File offer from: %s (%s)"), word[1], network); else - tray_set_tipf (_("XChat: %u file offers, latest from: %s (%s)"), + tray_set_tipf (_("XChat-WDK: %u file offers, latest from: %s (%s)"), tray_file_count, word[1], network); } if (prefs.input_balloon_priv) - tray_set_balloonf ("", _("XChat: File offer from: %s (%s)"), + tray_set_balloonf ("", _("XChat-WDK: File offer from: %s (%s)"), word[1], network); return XCHAT_EAT_NONE; @@ -802,7 +804,7 @@ tray_apply_setup (void) } else { - if (prefs.gui_tray) + if (prefs.gui_tray && !xtray_mode ()) tray_init (); } } @@ -834,7 +836,7 @@ tray_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, xchat_hook_print (ph, "Focus Window", -1, tray_focus_cb, NULL); - if (prefs.gui_tray) + if (prefs.gui_tray && !xtray_mode ()) tray_init (); return 1; /* return 1 for success */ diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c index de59e649..0edfc62b 100644 --- a/src/fe-gtk/plugingui.c +++ b/src/fe-gtk/plugingui.c @@ -35,7 +35,7 @@ #include "../common/xchat.h" #define PLUGIN_C typedef struct session xchat_context; -#include "../common/xchat-plugin.h" +#include "../../plugins/xchat-plugin.h" #include "../common/plugin.h" #include "../common/util.h" #include "../common/outbound.h" @@ -147,7 +147,9 @@ void plugingui_load (void) { gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, - current_sess, NULL, FRF_ADDFOLDER); + current_sess, + "Plugins and Scripts\0*.dll;*.lua;*.pl;*.py;*.tcl\0" + "All files\0*.*\0\0", 0); } static void diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c index 56ca0510..a3e1a63b 100644 --- a/src/fe-gtk/rawlog.c +++ b/src/fe-gtk/rawlog.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include "fe-gtk.h" diff --git a/src/fe-gtk/search.c b/src/fe-gtk/search.c index d62e79c7..bbde9c5c 100644 --- a/src/fe-gtk/search.c +++ b/src/fe-gtk/search.c @@ -153,7 +153,7 @@ search_open (session * sess) _("_Find")); g_object_set_data (G_OBJECT (wid), "e", entry); - g_signal_connect (G_OBJECT (win), "key-press-event", G_CALLBACK (search_key_cb), win); + g_signal_connect (G_OBJECT (win), "key_press_event", G_CALLBACK (search_key_cb), win); gtk_widget_show (win); } diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 517e0944..bfa49946 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -109,19 +109,32 @@ static const setting textbox_settings[] = N_("Give each person on IRC a different color"),0,0}, {ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(indent_nicks), N_("Make nick names right-justified"),0,0}, - {ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(transparent),0,0,0}, - {ST_TOGGLR, N_("Show marker line"), P_OFFINTNL(show_marker), + /* {ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(transparent),0,0,0}, */ + {ST_TOGGLE, N_("Show marker line"), P_OFFINTNL(show_marker), N_("Insert a red line after the last read text."),0,0}, - {ST_HEADER, N_("Transparency Settings"), 0,0,0}, + /* {ST_HEADER, N_("Transparency Settings"), 0,0,0}, {ST_HSCALE, N_("Red:"), P_OFFINTNL(tint_red),0,0,0}, {ST_HSCALE, N_("Green:"), P_OFFINTNL(tint_green),0,0,0}, - {ST_HSCALE, N_("Blue:"), P_OFFINTNL(tint_blue),0,0,0}, + {ST_HSCALE, N_("Blue:"), P_OFFINTNL(tint_blue),0,0,0}, */ {ST_HEADER, N_("Time Stamps"),0,0,0}, {ST_TOGGLE, N_("Enable time stamps"), P_OFFINTNL(timestamp),0,0,2}, {ST_ENTRY, N_("Time stamp format:"), P_OFFSETNL(stamp_format), N_("See strftime manpage for details."),0,sizeof prefs.stamp_format}, + {ST_HEADER, N_("Auto-Copy Behavior"),0,0,0}, + {ST_TOGGLE, N_("Automatically copy selected text"), P_OFFINTNL(autocopy_text), + N_("Copy selected text to clipboard when left mouse button is released. " + "Otherwise, CONTROL-SHIFT-C will copy the " + "selected text to the clipboard."), 0, 0}, + {ST_TOGGLE, N_("Automatically include time stamps"), P_OFFINTNL(autocopy_stamp), + N_("Automatically include time stamps in copied lines of text. Otherwise, " + "include time stamps if the SHIFT key is held down while selecting."), 0, 0}, + {ST_TOGGLE, N_("Automatically include color information"), P_OFFINTNL(autocopy_color), + N_("Automatically include color information in copied lines of text. " + "Otherwise, include color information if the CONTROL key is held down " + "while selecting."), 0, 0}, + {ST_END, 0, 0, 0, 0, 0} }; @@ -348,6 +361,24 @@ static const setting alert_settings[] = {ST_END, 0, 0, 0, 0, 0} }; +static const setting alert_settings_xtray[] = +{ + {ST_HEADER, N_("Alerts"),0,0,0}, + + {ST_ALERTHEAD}, + {ST_3OGGLE, N_("Blink task bar on:"), 0, 0, (void *)taskbarlist, 0}, + {ST_3OGGLE, N_("Make a beep sound on:"), 0, 0, (void *)beeplist, 0}, + + {ST_HEADER, N_("Highlighted Messages"),0,0,0}, + {ST_LABEL, N_("Highlighted messages are ones where your nickname is mentioned, but also:"), 0, 0, 0, 1}, + + {ST_ENTRY, N_("Extra words to highlight:"), P_OFFSETNL(irc_extra_hilight), 0, 0, sizeof prefs.irc_extra_hilight}, + {ST_ENTRY, N_("Nick names not to highlight:"), P_OFFSETNL(irc_no_hilight), 0, 0, sizeof prefs.irc_no_hilight}, + {ST_ENTRY, N_("Nick names to always highlight:"), P_OFFSETNL(irc_nick_hilight), 0, 0, sizeof prefs.irc_nick_hilight}, + {ST_LABEL, N_("Separate multiple words with commas.\nWildcards are accepted.")}, + {ST_END, 0, 0, 0, 0, 0} +}; + static const setting general_settings[] = { {ST_HEADER, N_("Default Messages"),0,0,0}, @@ -363,7 +394,6 @@ static const setting general_settings[] = {ST_END, 0, 0, 0, 0, 0} }; -#if 0 static const setting advanced_settings[] = { {ST_HEADER, N_("Advanced Settings"),0,0,0}, @@ -378,7 +408,6 @@ static const setting advanced_settings[] = {ST_END, 0, 0, 0, 0, 0} }; -#endif static const setting logging_settings[] = { @@ -1711,7 +1740,7 @@ static const char *const cata[] = N_("General"), N_("Logging"), N_("Sound"), -/* N_("Advanced"),*/ + N_("Advanced"), NULL, N_("Network"), N_("Network setup"), @@ -1732,10 +1761,19 @@ setup_create_pages (GtkWidget *box) setup_add_page (cata[3], book, setup_create_page (userlist_settings)); setup_add_page (cata[4], book, setup_create_page (tabs_settings)); setup_add_page (cata[5], book, setup_create_color_page ()); - setup_add_page (cata[8], book, setup_create_page (alert_settings)); + + if (xtray_mode ()) + { + setup_add_page (cata[8], book, setup_create_page (alert_settings_xtray)); + } else + { + setup_add_page (cata[8], book, setup_create_page (alert_settings)); + } + setup_add_page (cata[9], book, setup_create_page (general_settings)); setup_add_page (cata[10], book, setup_create_page (logging_settings)); setup_add_page (cata[11], book, setup_create_sound_page ()); + setup_add_page (cata[12], book, setup_create_page (advanced_settings)); setup_add_page (cata[14], book, setup_create_page (network_settings)); setup_add_page (cata[15], book, setup_create_page (filexfer_settings)); diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index d67ffe2d..d2c6a8a8 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -31,6 +31,8 @@ /*#include "gtkspell-iso-codes.h" #include "sexy-marshal.h"*/ +#include "typedef.h" + /* * Bunch of poop to make enchant into a runtime dependency rather than a * compile-time dependency. This makes it so I don't have to hear the @@ -134,12 +136,10 @@ initialize_enchant () GModule *enchant; gpointer funcptr; - enchant = g_module_open("libenchant", 0); + enchant = g_module_open("libenchant.dll", 0); if (enchant == NULL) { - enchant = g_module_open("libenchant.so.1", 0); - if (enchant == NULL) - return; + return; } have_enchant = TRUE; diff --git a/src/fe-gtk/typedef.h b/src/fe-gtk/typedef.h new file mode 100644 index 00000000..b20612ea --- /dev/null +++ b/src/fe-gtk/typedef.h @@ -0,0 +1,11 @@ +#ifndef SSIZE_T_DEFINED +#ifdef ssize_t +#undef ssize_t +#endif +#ifdef _WIN64 +typedef __int64 ssize_t; +#else +typedef _W64 int ssize_t; +#endif +#define SSIZE_T_DEFINED +#endif diff --git a/src/fe-gtk/xchat.rc b/src/fe-gtk/xchat.rc new file mode 100644 index 00000000..18c209c1 --- /dev/null +++ b/src/fe-gtk/xchat.rc @@ -0,0 +1,22 @@ +#include +#include "../../config.h" + +XC_ICON ICON "../../xchat.ico" + +VS_VERSION_INFO VERSIONINFO + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + + VALUE "FileDescription", "XChat-WDK IRC Client" + VALUE "ProductName", "XChat-WDK" + VALUE "ProductVersion", PACKAGE_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04B0 + END + END diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index fa9803c7..47d7e3ee 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -67,6 +66,8 @@ #endif #include "xtext.h" +#include "../common/xchat.h" +#include "../common/xchatc.h" #define charlen(str) g_utf8_skip[*(guchar *)(str)] @@ -1941,7 +1942,7 @@ gtk_xtext_check_mark_stamp (GtkXText *xtext, GdkModifierType mask) { gboolean redraw = FALSE; - if ((mask & GDK_SHIFT_MASK)) + if (mask & GDK_SHIFT_MASK || prefs.autocopy_stamp) { if (!xtext->mark_stamp) { @@ -2106,7 +2107,16 @@ gtk_xtext_set_clip_owner (GtkWidget * xtext, GdkEventButton * event) free (str); } - gtk_selection_owner_set (xtext, GDK_SELECTION_PRIMARY, event->time); + if (event) + { + gtk_selection_owner_set (xtext, GDK_SELECTION_PRIMARY, event->time); + } +} + +void +gtk_xtext_copy_selection (GtkXText *xtext) +{ + gtk_xtext_set_clip_owner (xtext, NULL); } static void @@ -2182,9 +2192,12 @@ gtk_xtext_button_release (GtkWidget * widget, GdkEventButton * event) if (xtext->buffer->last_ent_start) { xtext->color_paste = FALSE; - if (event->state & GDK_CONTROL_MASK) + if (event->state & GDK_CONTROL_MASK || prefs.autocopy_color) xtext->color_paste = TRUE; - gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event); + if (prefs.autocopy_text) + { + gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event); + } } if (xtext->select_start_x == event->x && @@ -2249,7 +2262,10 @@ gtk_xtext_button_press (GtkWidget * widget, GdkEventButton * event) ent->mark_end = offset + len; gtk_xtext_selection_render (xtext, ent, offset, ent, offset + len); xtext->word_or_line_select = TRUE; - gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event); + if (prefs.autocopy_text) + { + gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event); + } } return FALSE; @@ -2265,7 +2281,10 @@ gtk_xtext_button_press (GtkWidget * widget, GdkEventButton * event) ent->mark_end = ent->str_len; gtk_xtext_selection_render (xtext, ent, 0, ent, ent->str_len); xtext->word_or_line_select = TRUE; - gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event); + if (prefs.autocopy_text) + { + gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event); + } } return FALSE; @@ -3836,7 +3855,7 @@ gtk_xtext_load_trans (GtkXText * xtext) PaintDesktop (hdc); ReleaseDC (hwnd, hdc); - gdk_window_get_size (GTK_WIDGET (xtext)->window, &width, &height); + gdk_drawable_get_size (GTK_WIDGET (xtext)->window, &width, &height); img = gdk_image_get (GTK_WIDGET (xtext)->window, 0, 0, width+128, height); xtext->pixmap = win32_tint (xtext, img, img->width, img->height); diff --git a/src/fe-gtk/xtext.h b/src/fe-gtk/xtext.h index a37ddc32..90fa1bca 100644 --- a/src/fe-gtk/xtext.h +++ b/src/fe-gtk/xtext.h @@ -270,6 +270,7 @@ void gtk_xtext_set_wordwrap (GtkXText *xtext, gboolean word_wrap); xtext_buffer *gtk_xtext_buffer_new (GtkXText *xtext); void gtk_xtext_buffer_free (xtext_buffer *buf); void gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render); +void gtk_xtext_copy_selection (GtkXText *xtext); GType gtk_xtext_get_type (void); #endif diff --git a/src/fe-text/fe-text.c b/src/fe-text/fe-text.c index 2bc2e649..f3c1ff05 100644 --- a/src/fe-text/fe-text.c +++ b/src/fe-text/fe-text.c @@ -22,60 +22,51 @@ #ifdef HAVE_STRINGS_H #include #endif +#ifdef WIN32 +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#else +#include #include +#endif #include -#include #include +#include #include "../common/xchat.h" #include "../common/xchatc.h" +#include "../common/cfgfiles.h" #include "../common/outbound.h" #include "../common/util.h" #include "../common/fe.h" #include "fe-text.h" -static GSList *tmr_list; /* timer list */ -static int tmr_list_count; -static GSList *se_list; /* socket event list */ -static int se_list_count; static int done = FALSE; /* finished ? */ static void send_command (char *cmd) { - handle_multiline (sess_list->data, cmd, TRUE, FALSE); + handle_multiline (current_tab, cmd, TRUE, FALSE); } -static void -read_stdin (void) +static gboolean +handle_line (GIOChannel *channel, GIOCondition cond, gpointer data) { - int len, i = 0; - static int pos = 0; - static char inbuf[1024]; - char tmpbuf[512]; - - len = read (STDIN_FILENO, tmpbuf, sizeof tmpbuf - 1); - - while (i < len) - { - switch (tmpbuf[i]) - { - case '\r': - break; - case '\n': - inbuf[pos] = 0; - pos = 0; - send_command (inbuf); - break; + gchar *str_return; + gsize length, terminator_pos; + GError *error = NULL; + GIOStatus result; - default: - inbuf[pos] = tmpbuf[i]; - if (pos < (sizeof inbuf - 2)) - pos++; - } - i++; + result = g_io_channel_read_line(channel, &str_return, &length, &terminator_pos, &error); + if (result == G_IO_STATUS_ERROR) { + return FALSE; + } + else { + send_command(str_return); + g_free(str_return); + return TRUE; } } @@ -87,12 +78,13 @@ fe_new_window (struct session *sess, int focus) char buf[512]; sess->gui = malloc (4); + current_sess = sess; if (!sess->server->front_session) sess->server->front_session = sess; if (!sess->server->server_session) sess->server->server_session = sess; - if (!current_tab) + if (!current_tab || focus) current_tab = sess; if (done_intro) @@ -101,7 +93,7 @@ fe_new_window (struct session *sess, int focus) snprintf (buf, sizeof (buf), "\n" - " \017xchat \00310"PACKAGE_VERSION"\n" + " \017XChat-Text \00310"PACKAGE_VERSION"\n" " \017Running on \00310%s \017glib \00310%d.%d.%d\n" " \017This binary compiled \00310"__DATE__"\017\n", get_cpu_str(), @@ -133,15 +125,21 @@ get_stamp_str (time_t tim, char *dest, int size) } static int -timecat (char *buf) +timecat (char *buf, time_t stamp) { char stampbuf[64]; - get_stamp_str (time (0), stampbuf, sizeof (stampbuf)); + /* set the stamp to the current time if not provided */ + if (!stamp) + stamp = time (0); + + get_stamp_str (stamp, stampbuf, sizeof (stampbuf)); strcat (buf, stampbuf); return strlen (stampbuf); } +/* Windows doesn't handle ANSI codes in cmd.exe, need to not display them */ +#ifndef WIN32 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ static const short colconv[] = { 0, 7, 4, 2, 1, 3, 5, 11, 13, 12, 6, 16, 14, 15, 10, 7 }; @@ -157,7 +155,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp) if (prefs.timestamp) { newtext[0] = 0; - j += timecat (newtext); + j += timecat (newtext, stamp); } while (i < len) { @@ -165,7 +163,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp) { dotime = FALSE; newtext[j] = 0; - j += timecat (newtext); + j += timecat (newtext, stamp); } switch (text[i]) { @@ -179,8 +177,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp) j++; newtext[j] = 'm'; j++; - i--; - goto jump2; + goto endloop; } k = 0; comma = FALSE; @@ -226,13 +223,16 @@ fe_print_text (struct session *sess, char *text, time_t stamp) comma = TRUE; break; default: - goto jump; + goto endloop; } k = 0; } i++; } break; + /* don't actually want hidden text */ + case '\010': /* hidden */ + break; case '\026': /* REVERSE */ if (reverse) { @@ -296,120 +296,246 @@ fe_print_text (struct session *sess, char *text, time_t stamp) newtext[j] = text[i]; j++; } - jump2: i++; - jump: - i += 0; + endloop: + ; } + + /* make sure last character is a new line */ + if (text[i-1] != '\n') + newtext[j++] = '\n'; + newtext[j] = 0; write (STDOUT_FILENO, newtext, j); free (newtext); } - +#else +/* The win32 version for cmd.exe */ void -fe_timeout_remove (int tag) +fe_print_text (struct session *sess, char *text, time_t stamp) { - timerevent *te; - GSList *list; + int dotime = FALSE; + int comma, k, i = 0, j = 0, len = strlen (text); + + unsigned char *newtext = malloc (len + 1024); - list = tmr_list; - while (list) + if (prefs.timestamp) { - te = (timerevent *) list->data; - if (te->tag == tag) + newtext[0] = 0; + j += timecat (newtext, stamp); + } + while (i < len) + { + if (dotime && text[i] != 0) { - tmr_list = g_slist_remove (tmr_list, te); - free (te); - return; + dotime = FALSE; + newtext[j] = 0; + j += timecat (newtext, stamp); } - list = list->next; + switch (text[i]) + { + case 3: + i++; + if (!isdigit (text[i])) + { + goto endloop; + } + k = 0; + comma = FALSE; + while (i < len) + { + if (text[i] >= '0' && text[i] <= '9' && k < 2) + { + k++; + } else + { + switch (text[i]) + { + case ',': + comma = TRUE; + break; + default: + goto endloop; + } + k = 0; + + } + i++; + } + break; + /* don't actually want hidden text */ + case '\010': /* hidden */ + case '\026': /* REVERSE */ + case '\037': /* underline */ + case '\002': /* bold */ + case '\017': /* reset all */ + break; + case '\007': + if (!prefs.filterbeep) + { + newtext[j] = text[i]; + j++; + } + break; + case '\t': + newtext[j] = ' '; + j++; + break; + case '\n': + newtext[j] = '\r'; + j++; + if (prefs.timestamp) + dotime = TRUE; + default: + newtext[j] = text[i]; + j++; + } + i++; + endloop: + ; } + + /* make sure last character is a new line */ + if (text[i-1] != '\n') + newtext[j++] = '\n'; + + newtext[j] = 0; + write (STDOUT_FILENO, newtext, j); + free (newtext); +} +#endif + +void +fe_timeout_remove (int tag) +{ + g_source_remove (tag); } int fe_timeout_add (int interval, void *callback, void *userdata) { - struct timeval now; - timerevent *te = malloc (sizeof (timerevent)); - - tmr_list_count++; /* this overflows at 2.2Billion, who cares!! */ - - te->tag = tmr_list_count; - te->interval = interval; - te->callback = callback; - te->userdata = userdata; - - gettimeofday (&now, NULL); - te->next_call = now.tv_sec * 1000 + (now.tv_usec / 1000) + te->interval; - - tmr_list = g_slist_prepend (tmr_list, te); - - return te->tag; + return g_timeout_add (interval, (GSourceFunc) callback, userdata); } void fe_input_remove (int tag) { - socketevent *se; - GSList *list; - - list = se_list; - while (list) - { - se = (socketevent *) list->data; - if (se->tag == tag) - { - se_list = g_slist_remove (se_list, se); - free (se); - return; - } - list = list->next; - } + g_source_remove (tag); } int fe_input_add (int sok, int flags, void *func, void *data) { - socketevent *se = malloc (sizeof (socketevent)); + int tag, type = 0; + GIOChannel *channel; - se_list_count++; /* this overflows at 2.2Billion, who cares!! */ + channel = g_io_channel_unix_new (sok); - se->tag = se_list_count; - se->sok = sok; - se->rread = flags & FIA_READ; - se->wwrite = flags & FIA_WRITE; - se->eexcept = flags & FIA_EX; - se->callback = func; - se->userdata = data; - se_list = g_slist_prepend (se_list, se); + if (flags & FIA_READ) + type |= G_IO_IN | G_IO_HUP | G_IO_ERR; + if (flags & FIA_WRITE) + type |= G_IO_OUT | G_IO_ERR; + if (flags & FIA_EX) + type |= G_IO_PRI; - return se->tag; + tag = g_io_add_watch (channel, type, (GIOFunc) func, data); + g_io_channel_unref (channel); + + return tag; } +/* === command-line parameter parsing : requires glib 2.6 === */ + +static char *arg_cfgdir = NULL; +static gint arg_show_autoload = 0; +static gint arg_show_config = 0; +static gint arg_show_version = 0; + +static const GOptionEntry gopt_entries[] = +{ + {"no-auto", 'a', 0, G_OPTION_ARG_NONE, &arg_dont_autoconnect, N_("Don't auto connect to servers"), NULL}, + {"cfgdir", 'd', 0, G_OPTION_ARG_STRING, &arg_cfgdir, N_("Use a different config directory"), "PATH"}, + {"no-plugins", 'n', 0, G_OPTION_ARG_NONE, &arg_skip_plugins, N_("Don't auto load any plugins"), NULL}, + {"plugindir", 'p', 0, G_OPTION_ARG_NONE, &arg_show_autoload, N_("Show plugin auto-load directory"), NULL}, + {"configdir", 'u', 0, G_OPTION_ARG_NONE, &arg_show_config, N_("Show user config directory"), NULL}, + {"url", 0, 0, G_OPTION_ARG_STRING, &arg_url, N_("Open an irc://server:port/channel URL"), "URL"}, + {"version", 'v', 0, G_OPTION_ARG_NONE, &arg_show_version, N_("Show version information"), NULL}, + {NULL} +}; + int fe_args (int argc, char *argv[]) { - if (argc > 1) + GError *error = NULL; + GOptionContext *context; + +#ifdef ENABLE_NLS + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + + context = g_option_context_new (NULL); + g_option_context_add_main_entries (context, gopt_entries, GETTEXT_PACKAGE); + g_option_context_parse (context, &argc, &argv, &error); + + if (error) + { + if (error->message) + printf ("%s\n", error->message); + return 1; + } + + g_option_context_free (context); + + if (arg_show_version) + { + printf (PACKAGE_TARNAME" "PACKAGE_VERSION"\n"); + return 0; + } + + if (arg_show_autoload) { - if (!strcasecmp (argv[1], "--version") || !strcasecmp (argv[1], "-v")) +#ifdef WIN32 + /* see the chdir() below */ + char *sl, *exe = strdup (argv[0]); + sl = strrchr (exe, '\\'); + if (sl) { - puts (PACKAGE_VERSION); - return 0; + *sl = 0; + printf ("%s\\plugins\n", exe); } +#else + printf ("%s\n", XCHATLIBDIR"/plugins"); +#endif + return 0; } + + if (arg_show_config) + { + printf ("%s\n", get_xdir_fs ()); + return 0; + } + + if (arg_cfgdir) /* we want filesystem encoding */ + { + xdir_fs = strdup (arg_cfgdir); + if (xdir_fs[strlen (xdir_fs) - 1] == '/') + xdir_fs[strlen (xdir_fs) - 1] = 0; + g_free (arg_cfgdir); + } + return -1; } void fe_init (void) { - se_list = 0; - se_list_count = 0; - tmr_list = 0; - tmr_list_count = 0; + /* the following should be default generated, not enfoced in binary */ prefs.autosave = 0; prefs.use_server_tab = 0; prefs.autodialog = 0; + /* except for these, there is no lag meter, there is no server list */ prefs.lagometer = 0; prefs.slist_skip = 1; } @@ -417,129 +543,29 @@ fe_init (void) void fe_main (void) { - struct timeval timeout, now; - socketevent *se; - timerevent *te; - fd_set rd, wd, ex; - GSList *list; - guint64 shortest, delay; + GIOChannel *keyboard_input; - if (!sess_list) - new_ircwindow (NULL, NULL, SESS_SERVER, 0); + main_loop = g_main_loop_new(NULL, FALSE); -#ifdef ENABLE_NLS - bindtextdomain (GETTEXT_PACKAGE, PREFIX"/share/locale"); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); + /* Keyboard Entry Setup */ +#ifdef G_OS_WIN32 + keyboard_input = g_io_channel_win32_new_fd(STDIN_FILENO); +#else + keyboard_input = g_io_channel_unix_new(STDIN_FILENO); #endif - while (!done) - { - FD_ZERO (&rd); - FD_ZERO (&wd); - FD_ZERO (&ex); - - list = se_list; - while (list) - { - se = (socketevent *) list->data; - if (se->rread) - FD_SET (se->sok, &rd); - if (se->wwrite) - FD_SET (se->sok, &wd); - if (se->eexcept) - FD_SET (se->sok, &ex); - list = list->next; - } - - FD_SET (STDIN_FILENO, &rd); /* for reading keyboard */ - - /* find the shortest timeout event */ - shortest = 0; - list = tmr_list; - while (list) - { - te = (timerevent *) list->data; - if (te->next_call < shortest || shortest == 0) - shortest = te->next_call; - list = list->next; - } - gettimeofday (&now, NULL); - delay = shortest - ((now.tv_sec * 1000) + (now.tv_usec / 1000)); - timeout.tv_sec = delay / 1000; - timeout.tv_usec = (delay % 1000) * 1000; - - select (FD_SETSIZE, &rd, &wd, &ex, &timeout); - - if (FD_ISSET (STDIN_FILENO, &rd)) - read_stdin (); - - /* set all checked flags to false */ - list = se_list; - while (list) - { - se = (socketevent *) list->data; - se->checked = 0; - list = list->next; - } - - /* check all the socket callbacks */ - list = se_list; - while (list) - { - se = (socketevent *) list->data; - se->checked = 1; - if (se->rread && FD_ISSET (se->sok, &rd)) - { - se->callback (NULL, 1, se->userdata); - } else if (se->wwrite && FD_ISSET (se->sok, &wd)) - { - se->callback (NULL, 2, se->userdata); - } else if (se->eexcept && FD_ISSET (se->sok, &ex)) - { - se->callback (NULL, 4, se->userdata); - } - list = se_list; - if (list) - { - se = (socketevent *) list->data; - while (se->checked) - { - list = list->next; - if (!list) - break; - se = (socketevent *) list->data; - } - } - } + g_io_add_watch(keyboard_input, G_IO_IN, handle_line, NULL); - /* now check our list of timeout events, some might need to be called! */ - gettimeofday (&now, NULL); - list = tmr_list; - while (list) - { - te = (timerevent *) list->data; - list = list->next; - if (now.tv_sec * 1000 + (now.tv_usec / 1000) >= te->next_call) - { - /* if the callback returns 0, it must be removed */ - if (te->callback (te->userdata) == 0) - { - fe_timeout_remove (te->tag); - } else - { - te->next_call = now.tv_sec * 1000 + (now.tv_usec / 1000) + te->interval; - } - } - } + g_main_loop_run(main_loop); - } + return; } void fe_exit (void) { done = TRUE; + g_main_loop_quit(main_loop); } void @@ -793,10 +819,23 @@ fe_get_int (char *prompt, int def, void *callback, void *ud) void fe_idle_add (void *func, void *data) { + g_idle_add (func, data); } void fe_ctrl_gui (session *sess, fe_gui_action action, int arg) { + /* only one action type handled for now, but could add more */ + switch (action) + { + /* gui focus is really the only case xchat-text needs to wory about */ + case FE_GUI_FOCUS: + current_sess = sess; + current_tab = sess; + sess->server->front_session = sess; + break; + default: + break; + } } int fe_gui_info (session *sess, int info_type) diff --git a/src/fe-text/fe-text.h b/src/fe-text/fe-text.h index b8afa284..e4f6f6c0 100644 --- a/src/fe-text/fe-text.h +++ b/src/fe-text/fe-text.h @@ -1,29 +1 @@ - -typedef int (*socket_callback) (void *source, int condition, void *user_data); -typedef int (*timer_callback) (void *user_data); - -struct socketeventRec -{ - socket_callback callback; - void *userdata; - int sok; - int tag; - int rread:1; - int wwrite:1; - int eexcept:1; - int checked:1; -}; - -typedef struct socketeventRec socketevent; - - -struct timerRec -{ - timer_callback callback; - void *userdata; - int interval; - int tag; - guint64 next_call; /* miliseconds */ -}; - -typedef struct timerRec timerevent; +GMainLoop *main_loop; diff --git a/src/fe-text/makefile.mak b/src/fe-text/makefile.mak new file mode 100644 index 00000000..59d277d3 --- /dev/null +++ b/src/fe-text/makefile.mak @@ -0,0 +1,20 @@ +include "..\makeinc.mak" + +COMLIB = ..\common\xchatcommon.lib +PROG = xchat-text.exe + +!ifdef X64 +PLATOBJ = msvcrt_win2003.obj +!else +PLATOBJ = msvcrt_winxp.obj +!endif + +all: fe-text.obj + link /out:$(PROG) /subsystem:console /nologo $(PLATOBJ) $(LIBS) $(COMLIB) fe-text.obj + +fe-text.obj: fe-text.c makefile.mak + cl $(CFLAGS) $(GLIB) fe-text.c + +clean: + @del *.obj + @del $(PROG) diff --git a/src/makefile.mak b/src/makefile.mak new file mode 100644 index 00000000..670774ed --- /dev/null +++ b/src/makefile.mak @@ -0,0 +1,17 @@ +all: + @cd common + @-$(MAKE) /nologo /s /f makefile.mak $@ + @cd ..\fe-gtk + @-$(MAKE) /nologo /s /f makefile.mak $@ + @cd ..\fe-text + @-$(MAKE) /nologo /s /f makefile.mak $@ + +clean: + @del common\*.obj + @del common\xchatcommon.lib + @del fe-gtk\*.obj + @del fe-gtk\xchat.exe + @del fe-gtk\xchat.res + @del fe-text\*.obj + @del fe-text\xchat-text.exe + @del pixmaps\*.h diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak new file mode 100644 index 00000000..17a16642 --- /dev/null +++ b/src/makeinc.skel.mak @@ -0,0 +1,44 @@ +CC = cl +LINK = link +CFLAGS = $(CFLAGS) /Ox /c /MD /MP2 /W0 /nologo +CFLAGS = $(CFLAGS) /DWIN32 /DG_DISABLE_CAST_CHECKS /DG_DISABLE_DEPRECATED /DGDK_PIXBUF_DISABLE_DEPRECATED /DGDK_DISABLE_DEPRECATED /DUSE_IPV6 /DHAVE_STRTOULL /Dstrtoull=_strtoui64 /Dstrcasecmp=stricmp /Dstrncasecmp=strnicmp /DUSE_OPENSSL +CFLAGS = $(CFLAGS) /I$(DEV)\include +CPPFLAGS = /c /MD /W0 /nologo /DWIN32 +LDFLAGS = /subsystem:windows /nologo +LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib winmm.lib ws2_32.lib wininet.lib comdlg32.lib libeay32.lib ssleay32.lib + +GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include +GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 +LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib + +LUALIB = lua51 +LUAOUTPUT = xclua.dll + +PERL510LIB = perl510 +PERL510OUTPUT = xcperl-510.dll +PERL512LIB = perl512 +PERL512OUTPUT = xcperl-512.dll + +PYTHONLIB = python27 +PYTHONOUTPUT = xcpython.dll + +TCLLIB = tcl85 +TCLOUTPUT = xctcl.dll + +!ifdef X64 +CFLAGS = $(CFLAGS) /favor:AMD64 /D_WIN64 +CPPFLAGS = $(CPPFLAGS) /favor:AMD64 /D_WIN64 +LDFLAGS = $(LDFLAGS) msvcrt_win2003.obj + +PERL510PATH = c:\mozilla-build\perl-5.10-x64\lib\CORE +PERL512PATH = c:\mozilla-build\perl-5.12-x64\lib\CORE +PYTHONPATH = c:\mozilla-build\python-2.7-x64 +TCLPATH = c:\mozilla-build\tcl-8.5-x64 +!else +LDFLAGS = $(LDFLAGS) msvcrt_winxp.obj + +PERL510PATH = c:\mozilla-build\perl-5.10-x86\lib\CORE +PERL512PATH = c:\mozilla-build\perl-5.12-x86\lib\CORE +PYTHONPATH = c:\mozilla-build\python-2.7-x86 +TCLPATH = c:\mozilla-build\tcl-8.5-x86 +!endif diff --git a/src/pixmaps/makefile.mak b/src/pixmaps/makefile.mak new file mode 100644 index 00000000..f9535dbe --- /dev/null +++ b/src/pixmaps/makefile.mak @@ -0,0 +1,18 @@ +CONV = gdk-pixbuf-csource + +LIST = bookpng book.png \ + hoppng hop.png \ + oppng op.png \ + purplepng purple.png \ + redpng red.png \ + trayfilepng fileoffer.png \ + trayhilightpng highlight.png \ + traymsgpng message.png \ + voicepng voice.png \ + xchatpng ..\..\xchat.png + +all: + @$(CONV) --build-list $(LIST) > inline_pngs.h + +clean: + @del *.h -- cgit 1.4.1 From f77baf7049c87fc88e8e476ab63c5f23bc8a949b Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Mon, 28 Mar 2011 04:19:06 +0200 Subject: don't limit the number of concurrent compiler processes (XhmikosR) --- src/makeinc.skel.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index 17a16642..c9027992 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -1,6 +1,6 @@ CC = cl LINK = link -CFLAGS = $(CFLAGS) /Ox /c /MD /MP2 /W0 /nologo +CFLAGS = $(CFLAGS) /Ox /c /MD /MP /W0 /nologo CFLAGS = $(CFLAGS) /DWIN32 /DG_DISABLE_CAST_CHECKS /DG_DISABLE_DEPRECATED /DGDK_PIXBUF_DISABLE_DEPRECATED /DGDK_DISABLE_DEPRECATED /DUSE_IPV6 /DHAVE_STRTOULL /Dstrtoull=_strtoui64 /Dstrcasecmp=stricmp /Dstrncasecmp=strnicmp /DUSE_OPENSSL CFLAGS = $(CFLAGS) /I$(DEV)\include CPPFLAGS = /c /MD /W0 /nologo /DWIN32 -- cgit 1.4.1 From 2aed83ec82f3ccdbaa013bdf8fc4dd44d261a96f Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Sat, 16 Apr 2011 20:08:47 +0200 Subject: fix syntax error --- src/common/server.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/common/server.c b/src/common/server.c index 171b7ffd..f7347052 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -1491,7 +1491,6 @@ server_child (server * serv) if (!serv->dont_use_proxy) /* blocked in serverlist? */ { if (FALSE) - { ; #ifdef USE_LIBPROXY } else if (prefs.proxy_type == 5) -- cgit 1.4.1 From b85f311ddd7a1275e49289ba935617a163062790 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Mon, 30 May 2011 21:15:39 +0200 Subject: move cpu arch stuff to separate function --- src/common/util.c | 18 ++++++++++++++++++ src/common/util.h | 1 + src/fe-gtk/about.c | 15 +-------------- 3 files changed, 20 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/common/util.c b/src/common/util.c index 67168a5f..5677e82a 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -647,6 +647,24 @@ get_mhz (void) return 0; /* fails on Win9x */ } +int +get_cpu_arch (void) +{ + SYSTEM_INFO si; + unsigned short int cpu_arch; + + GetSystemInfo (&si); + + if (si.wProcessorArchitecture == 9) + { + return 64; + } + else + { + return 86; + } +} + char * get_cpu_str (void) { diff --git a/src/common/util.h b/src/common/util.h index cd9e1fff..92d2a843 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -45,6 +45,7 @@ char *errorstring (int err); int waitline (int sok, char *buf, int bufsize, int); #ifdef WIN32 int waitline2 (GIOChannel *source, char *buf, int bufsize); +int get_cpu_arch (void); #else #define waitline2(source,buf,size) waitline(serv->childread,buf,size,0) #endif diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index 453d405c..6e69b646 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -88,19 +88,6 @@ menu_about (GtkWidget * wid, gpointer sess) char buf[512]; const char *locale = NULL; extern GtkWindow *parent_window; /* maingui.c */ - SYSTEM_INFO si; - unsigned short int cpu_arch; - - GetSystemInfo (&si); - - if (si.wProcessorArchitecture == 9) - { - cpu_arch = 64; - } - else - { - cpu_arch = 86; - } if (about) { @@ -146,7 +133,7 @@ menu_about (GtkWidget * wid, gpointer sess) gtk_minor_version, gtk_micro_version, (portable_mode () ? "Yes" : "No"), - cpu_arch + get_cpu_arch () #else "%s\n\n" "%s\n" -- cgit 1.4.1 From a795b5ced9815579611908e4d3f1be2557e152ef Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Mon, 30 May 2011 21:24:36 +0200 Subject: display build type in CTCP VERSION reply --- src/common/ctcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/ctcp.c b/src/common/ctcp.c index a1d70049..37392372 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -133,8 +133,8 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (!strcasecmp (msg, "VERSION") && !prefs.hidever) { - snprintf (outbuf, sizeof (outbuf), "VERSION XChat-WDK "PACKAGE_VERSION" / %s", - get_cpu_str ()); + snprintf (outbuf, sizeof (outbuf), "VERSION XChat-WDK "PACKAGE_VERSION" [x%d] / %s", + get_cpu_arch (), get_cpu_str ()); serv->p_nctcp (serv, nick, outbuf); } -- cgit 1.4.1 From 24ac838543bc99ea8d289925b4c5418107d5ae1f Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Mon, 30 May 2011 22:52:02 +0200 Subject: add support for Perl 5.14 --- build/build-x64.bat | 4 ++++ build/build-x86.bat | 4 ++++ build/release-x64.bat | 1 + build/release-x86.bat | 1 + build/xchat-wdk.skel.iss | 4 ++++ plugins/perl/makefile-514.mak | 30 ++++++++++++++++++++++++++++++ src/makeinc.skel.mak | 4 ++++ 7 files changed, 48 insertions(+) create mode 100644 plugins/perl/makefile-514.mak (limited to 'src') diff --git a/build/build-x64.bat b/build/build-x64.bat index 6f49dae2..5375809e 100644 --- a/build/build-x64.bat +++ b/build/build-x64.bat @@ -1,6 +1,7 @@ @echo off set PERL_510=c:\mozilla-build\perl-5.10-x64 set PERL_512=c:\mozilla-build\perl-5.12-x64 +set PERL_514=c:\mozilla-build\perl-5.14-x64 cd .. set DEV_64=%cd%\dep-x64 cd src @@ -30,6 +31,9 @@ nmake /nologo /s /f makefile-510.mak set PATH=%OOPATH%;%PERL_512%\bin nmake /nologo /s /f makefile-512.mak clean nmake /nologo /s /f makefile-512.mak +set PATH=%OOPATH%;%PERL_514%\bin +nmake /nologo /s /f makefile-514.mak clean +nmake /nologo /s /f makefile-514.mak cd ..\..\build set PATH=%OPATH% call release-x64.bat diff --git a/build/build-x86.bat b/build/build-x86.bat index 7776ee4d..b8ee8052 100644 --- a/build/build-x86.bat +++ b/build/build-x86.bat @@ -1,6 +1,7 @@ @echo off set PERL_510=c:\mozilla-build\perl-5.10-x86 set PERL_512=c:\mozilla-build\perl-5.12-x86 +set PERL_514=c:\mozilla-build\perl-5.14-x86 echo [Setup] > xchat-wdk.iss echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk.iss echo WizardSmallImageFile=%cd%\bitmaps\wizardsmallimage.bmp >> xchat-wdk.iss @@ -31,6 +32,9 @@ nmake /nologo /s /f makefile-510.mak set PATH=%OOPATH%;%PERL_512%\bin nmake /nologo /s /f makefile-512.mak clean nmake /nologo /s /f makefile-512.mak +set PATH=%OOPATH%;%PERL_514%\bin +nmake /nologo /s /f makefile-514.mak clean +nmake /nologo /s /f makefile-514.mak cd ..\..\build call compile-po-files.bat set PATH=%OPATH% diff --git a/build/release-x64.bat b/build/release-x64.bat index ddb070b6..50ae1e64 100644 --- a/build/release-x64.bat +++ b/build/release-x64.bat @@ -36,6 +36,7 @@ copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins\xclua.dll.x64 copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins\xcmpcinfo.dll.x64 copy ..\plugins\perl\xcperl-510.dll %XCHAT_DEST%\plugins\xcperl-510.dll.x64 copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins\xcperl-512.dll.x64 +copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins\xcperl-514.dll.x64 copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins\xcpython.dll.x64 copy ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins\xctcl.dll.x64 copy ..\plugins\upd\xcupd.dll %XCHAT_DEST%\plugins\xcupd.dll.x64 diff --git a/build/release-x86.bat b/build/release-x86.bat index c33e981c..05ad7df5 100644 --- a/build/release-x86.bat +++ b/build/release-x86.bat @@ -48,6 +48,7 @@ copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-510.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins +copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins copy ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins copy ..\plugins\upd\xcupd.dll %XCHAT_DEST%\plugins diff --git a/build/xchat-wdk.skel.iss b/build/xchat-wdk.skel.iss index 86b9904a..dccd58ff 100644 --- a/build/xchat-wdk.skel.iss +++ b/build/xchat-wdk.skel.iss @@ -57,6 +57,7 @@ Name: x64; Description: "x64"; GroupDescription: "XChat-WDK version:"; Flags: ex Name: perl510; Description: "5.10"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl +Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked @@ -228,6 +229,9 @@ Source: "plugins\xcperl-510.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcper Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x86 and perl512 Source: "plugins\xcperl-512.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x64 and perl512 +Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x86 and perl514 +Source: "plugins\xcperl-514.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x64 and perl514 + [Icons] Name: "{group}\XChat-WDK"; Filename: "{app}\xchat.exe"; Tasks: not portable Name: "{group}\XChat-Text"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable diff --git a/plugins/perl/makefile-514.mak b/plugins/perl/makefile-514.mak new file mode 100644 index 00000000..94ee456f --- /dev/null +++ b/plugins/perl/makefile-514.mak @@ -0,0 +1,30 @@ +include "..\..\src\makeinc.mak" + +DIRENTLIB = ..\..\src\common\dirent.lib +TARGET = $(PERL514OUTPUT) + +all: $(TARGET) + +perl.def: + echo EXPORTS > perl.def + echo xchat_plugin_init >> perl.def + echo xchat_plugin_deinit >> perl.def + echo xchat_plugin_get_info >> perl.def + +perl.obj: perl.c + $(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL514PATH) /I.. /DPERL_DLL=\"$(PERL514LIB).dll\" + +perl.c: xchat.pm.h + +xchat.pm.h: lib/Xchat.pm lib/IRC.pm + perl.exe generate_header + +$(TARGET): perl.obj perl.def + $(LINK) /DLL /out:$(TARGET) perl.obj $(LDFLAGS) $(PERL514LIB).lib /libpath:$(PERL514PATH) /DELAYLOAD:$(PERL514LIB).dll $(DIRENTLIB) DELAYIMP.LIB user32.lib shell32.lib advapi32.lib /def:perl.def + +clean: + @del $(TARGET) + @del *.obj + @del perl.def + @del *.lib + @del *.exp diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index c9027992..f7bbeeb7 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -18,6 +18,8 @@ PERL510LIB = perl510 PERL510OUTPUT = xcperl-510.dll PERL512LIB = perl512 PERL512OUTPUT = xcperl-512.dll +PERL514LIB = perl514 +PERL514OUTPUT = xcperl-514.dll PYTHONLIB = python27 PYTHONOUTPUT = xcpython.dll @@ -32,6 +34,7 @@ LDFLAGS = $(LDFLAGS) msvcrt_win2003.obj PERL510PATH = c:\mozilla-build\perl-5.10-x64\lib\CORE PERL512PATH = c:\mozilla-build\perl-5.12-x64\lib\CORE +PERL514PATH = c:\mozilla-build\perl-5.14-x64\lib\CORE PYTHONPATH = c:\mozilla-build\python-2.7-x64 TCLPATH = c:\mozilla-build\tcl-8.5-x64 !else @@ -39,6 +42,7 @@ LDFLAGS = $(LDFLAGS) msvcrt_winxp.obj PERL510PATH = c:\mozilla-build\perl-5.10-x86\lib\CORE PERL512PATH = c:\mozilla-build\perl-5.12-x86\lib\CORE +PERL514PATH = c:\mozilla-build\perl-5.14-x86\lib\CORE PYTHONPATH = c:\mozilla-build\python-2.7-x86 TCLPATH = c:\mozilla-build\tcl-8.5-x86 !endif -- cgit 1.4.1 From 5e4a60debe1c3643bcc455778e2ef7f6238c71c2 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Tue, 31 May 2011 00:40:13 +0200 Subject: support for own license text --- src/common/cfgfiles.c | 2 ++ src/common/xchat.h | 1 + src/fe-gtk/about.c | 5 ++++- src/fe-gtk/maingui.c | 14 +++++++++++++- 4 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index d26198ed..a6a75aed 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -421,6 +421,7 @@ const struct prefs vars[] = { {"flood_msg_num", P_OFFINT (msg_number_limit), TYPE_INT}, {"flood_msg_time", P_OFFINT (msg_time_limit), TYPE_INT}, + {"gui_license", P_OFFSET (gui_license), TYPE_STR}, {"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL}, {"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL}, {"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL}, @@ -696,6 +697,7 @@ load_config (void) #ifdef WIN32 prefs.identd = 1; #endif + strcpy (prefs.gui_license, ""); strcpy (prefs.stamp_format, "[%H:%M] "); strcpy (prefs.timestamp_log_format, "%b %d %H:%M:%S "); strcpy (prefs.logmask, "%n-%c.log"); diff --git a/src/common/xchat.h b/src/common/xchat.h index 2f695599..718e0e91 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -121,6 +121,7 @@ struct xchatprefs char partreason[256]; char font_normal[FONTNAMELEN + 1]; char doubleclickuser[256]; + char gui_license[64]; char sounddir[PATHLEN + 1]; char soundcmd[PATHLEN + 1]; char background[PATHLEN + 1]; diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index 6e69b646..e1e5149c 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -40,6 +40,7 @@ #include "../common/xchat.h" #include "../common/util.h" #include "../common/wdkutil.h" +#include "../common/xchatc.h" #include "palette.h" #include "pixmaps.h" #include "gtkutil.h" @@ -114,7 +115,8 @@ menu_about (GtkWidget * wid, gpointer sess) gtk_container_add (GTK_CONTAINER (vbox), label); g_get_charset (&locale); (snprintf) (buf, sizeof (buf), - ""DISPLAY_NAME" "PACKAGE_VERSION"\n\n" + ""DISPLAY_NAME" "PACKAGE_VERSION"\n" + "%s\n\n" #ifdef WIN32 "XChat Release: "XCHAT_RELEASE"\n\n" "OS: %s\n" @@ -127,6 +129,7 @@ menu_about (GtkWidget * wid, gpointer sess) "\302\251 1998-2010 Peter \305\275elezn\303\275 <zed@xchat.org>" /* "\nhttp://code.google.com/p/xchat-wdk/" this is broken in gtk ATM */ "", + prefs.gui_license, get_cpu_str (), locale, gtk_major_version, diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 27d47731..feea6549 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -476,10 +476,22 @@ fe_set_title (session *sess) break; default: def: - gtk_window_set_title (GTK_WINDOW (sess->gui->window), DISPLAY_NAME); + snprintf (tbuf, sizeof (tbuf), DISPLAY_NAME); + if (strcmp (prefs.gui_license, "")) /* zero means gui_license is empty */ + { + strcat (tbuf, " - "); + strcat (tbuf, prefs.gui_license); + } + gtk_window_set_title (GTK_WINDOW (sess->gui->window), tbuf); return; } + if (strcmp (prefs.gui_license, "")) /* zero means gui_license is empty */ + { + strcat (tbuf, " - "); + strcat (tbuf, prefs.gui_license); + } + gtk_window_set_title (GTK_WINDOW (sess->gui->window), tbuf); } -- cgit 1.4.1 From 5ea4855bc32844474df3f542800fcd801d1037fb Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Sun, 5 Jun 2011 04:41:33 +0200 Subject: gui support for license text --- src/fe-gtk/setup.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index bfa49946..eef6761d 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -401,6 +401,7 @@ static const setting advanced_settings[] = {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(raw_modes), 0, 0, 0}, {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, + {ST_ENTRY, N_("License Text:"), P_OFFSETNL(gui_license), 0, 0, sizeof prefs.gui_license}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0}, {ST_TOGGLE, N_("Receive window"), P_OFFINTNL(autoopendccrecvwindow), 0, 0, 0}, -- cgit 1.4.1 From 87b68a17adb0d254d56c995fbaff7a5a94175297 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Sun, 5 Jun 2011 06:12:31 +0200 Subject: add option for changing spell checker color --- src/fe-gtk/palette.c | 3 ++- src/fe-gtk/palette.h | 1 + src/fe-gtk/setup.c | 1 + src/fe-gtk/sexy-spell-entry.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 44 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/palette.c b/src/fe-gtk/palette.c index 8d2ee062..b94ac874 100644 --- a/src/fe-gtk/palette.c +++ b/src/fe-gtk/palette.c @@ -77,8 +77,9 @@ GdkColor colors[] = { {0, 0x0000, 0x0000, 0xffff}, /* 38 tab Nick Mentioned (blue) */ {0, 0xffff, 0x0000, 0x0000}, /* 39 tab New Message (red) */ {0, 0x9595, 0x9595, 0x9595}, /* 40 away user (grey) */ + {0, 0xffff, 0x0000, 0x0000}, /* 41 spell checker color (red) */ }; -#define MAX_COL 40 +#define MAX_COL 41 void diff --git a/src/fe-gtk/palette.h b/src/fe-gtk/palette.h index c97693bb..627c6963 100644 --- a/src/fe-gtk/palette.h +++ b/src/fe-gtk/palette.h @@ -9,6 +9,7 @@ extern GdkColor colors[]; #define COL_HILIGHT 38 #define COL_NEW_MSG 39 #define COL_AWAY 40 +#define COL_SPELL 41 void palette_alloc (GtkWidget * widget); void palette_load (void); diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index eef6761d..250accc5 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -1358,6 +1358,7 @@ setup_create_color_page (void) setup_create_other_color (_("New message:"), COL_NEW_MSG, 10, tab); setup_create_other_colorR (_("Away user:"), COL_AWAY, 10, tab); setup_create_other_color (_("Highlight:"), COL_HILIGHT, 11, tab); + setup_create_other_colorR (_("Spell checker:"), COL_SPELL, 11, tab); return box; } diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index d2c6a8a8..6bc4f0b5 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -26,13 +26,17 @@ #include #include "sexy-spell-entry.h" #include +#include #include #include +#include /*#include "gtkspell-iso-codes.h" #include "sexy-marshal.h"*/ #include "typedef.h" +#include "../common/cfgfiles.h" + /* * Bunch of poop to make enchant into a runtime dependency rather than a * compile-time dependency. This makes it so I don't have to hear the @@ -260,8 +264,42 @@ gtk_entry_find_position (GtkEntry *entry, gint x) static void insert_underline(SexySpellEntry *entry, guint start, guint end) { - PangoAttribute *ucolor = pango_attr_underline_color_new (65535, 0, 0); - PangoAttribute *unline = pango_attr_underline_new (PANGO_UNDERLINE_ERROR); + int fh, l; + int red, green, blue; + struct stat st; + char *cfg; + PangoAttribute *ucolor; + PangoAttribute *unline; + + fh = xchat_open_file ("colors.conf", O_RDONLY, 0, 0); + + if (fh != -1) + { + fstat (fh, &st); + cfg = malloc (st.st_size + 1); + + if (cfg) + { + cfg[0] = '\0'; + l = read (fh, cfg, st.st_size); + if (l >= 0) + { + cfg[l] = '\0'; + } + + cfg_get_color (cfg, "color_265", &red, &green, &blue); + free (cfg); + } + + close (fh); + } else + { + red = 65535; + green = blue = 0; + } + + ucolor = pango_attr_underline_color_new (red, green, blue); + unline = pango_attr_underline_new (PANGO_UNDERLINE_ERROR); ucolor->start_index = start; unline->start_index = start; -- cgit 1.4.1 From 98999bb19d7660321c7151371def629674c5cbc0 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Fri, 17 Jun 2011 00:01:25 +0200 Subject: add support for Windows 8 in CTCP VERSION reply --- src/common/util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/common/util.c b/src/common/util.c index 5677e82a..b9bf3b35 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -726,6 +726,16 @@ get_cpu_str (void) strcpy (winver, "Server 2008 R2"); } break; + case 2: + if (osvi.wProductType == VER_NT_WORKSTATION) + { + strcpy (winver, "8"); + } + else + { + strcpy (winver, "8 Server"); + } + break; } break; } -- cgit 1.4.1 From 70f870fc961e9594ac41707e944b5bf364164c43 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Wed, 27 Jul 2011 04:51:28 +0200 Subject: remove perl 5.10, migrate 5.12 to strawberry --- build/build-x64.bat | 6 +----- build/build-x86.bat | 6 +----- build/release-x64.bat | 1 - build/release-x86.bat | 1 - build/xchat-wdk.skel.iss | 4 ---- plugins/perl/makefile-510.mak | 30 ------------------------------ src/makeinc.skel.mak | 8 ++------ 7 files changed, 4 insertions(+), 52 deletions(-) delete mode 100644 plugins/perl/makefile-510.mak (limited to 'src') diff --git a/build/build-x64.bat b/build/build-x64.bat index 5375809e..29db6400 100644 --- a/build/build-x64.bat +++ b/build/build-x64.bat @@ -1,6 +1,5 @@ @echo off -set PERL_510=c:\mozilla-build\perl-5.10-x64 -set PERL_512=c:\mozilla-build\perl-5.12-x64 +set PERL_512=c:\mozilla-build\perl-5.12-x64\perl set PERL_514=c:\mozilla-build\perl-5.14-x64 cd .. set DEV_64=%cd%\dep-x64 @@ -25,9 +24,6 @@ nmake /nologo /f makefile.mak clean nmake /nologo /f makefile.mak cd perl set OOPATH=%PATH% -set PATH=%OOPATH%;%PERL_510%\bin -nmake /nologo /s /f makefile-510.mak clean -nmake /nologo /s /f makefile-510.mak set PATH=%OOPATH%;%PERL_512%\bin nmake /nologo /s /f makefile-512.mak clean nmake /nologo /s /f makefile-512.mak diff --git a/build/build-x86.bat b/build/build-x86.bat index b8ee8052..c2df1c25 100644 --- a/build/build-x86.bat +++ b/build/build-x86.bat @@ -1,6 +1,5 @@ @echo off -set PERL_510=c:\mozilla-build\perl-5.10-x86 -set PERL_512=c:\mozilla-build\perl-5.12-x86 +set PERL_512=c:\mozilla-build\perl-5.12-x86\perl set PERL_514=c:\mozilla-build\perl-5.14-x86 echo [Setup] > xchat-wdk.iss echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk.iss @@ -26,9 +25,6 @@ nmake /nologo /f makefile.mak clean nmake /nologo /f makefile.mak cd perl set OOPATH=%PATH% -set PATH=%OOPATH%;%PERL_510%\bin -nmake /nologo /s /f makefile-510.mak clean -nmake /nologo /s /f makefile-510.mak set PATH=%OOPATH%;%PERL_512%\bin nmake /nologo /s /f makefile-512.mak clean nmake /nologo /s /f makefile-512.mak diff --git a/build/release-x64.bat b/build/release-x64.bat index 50ae1e64..e22043e9 100644 --- a/build/release-x64.bat +++ b/build/release-x64.bat @@ -34,7 +34,6 @@ copy %DEPS_ROOT%\lib\enchant\libenchant_myspell.dll %XCHAT_DEST%\lib\enchant\lib copy ..\plugins\checksum\xcchecksum.dll %XCHAT_DEST%\plugins\xcchecksum.dll.x64 copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins\xclua.dll.x64 copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins\xcmpcinfo.dll.x64 -copy ..\plugins\perl\xcperl-510.dll %XCHAT_DEST%\plugins\xcperl-510.dll.x64 copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins\xcperl-512.dll.x64 copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins\xcperl-514.dll.x64 copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins\xcpython.dll.x64 diff --git a/build/release-x86.bat b/build/release-x86.bat index 05ad7df5..b61bdbea 100644 --- a/build/release-x86.bat +++ b/build/release-x86.bat @@ -46,7 +46,6 @@ xcopy /q /s /i %DEPS_ROOT%\lib\enchant\libenchant_myspell.dll %XCHAT_DEST%\lib\e xcopy /q /s /i ..\plugins\checksum\xcchecksum.dll %XCHAT_DEST%\plugins\ copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins -copy ..\plugins\perl\xcperl-510.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins diff --git a/build/xchat-wdk.skel.iss b/build/xchat-wdk.skel.iss index 31617542..f0c0c8ad 100644 --- a/build/xchat-wdk.skel.iss +++ b/build/xchat-wdk.skel.iss @@ -55,7 +55,6 @@ Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenounins Name: x86; Description: "x86"; GroupDescription: "XChat-WDK version:"; Flags: exclusive unchecked Name: x64; Description: "x64"; GroupDescription: "XChat-WDK version:"; Flags: exclusive; Check: Is64BitInstallMode -Name: perl510; Description: "5.10"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl @@ -223,9 +222,6 @@ Source: "plugins\xctcl.dll.x64"; DestDir: "{app}\plugins"; DestName: "xctcl.dll" -Source: "plugins\xcperl-510.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x86 and perl510 -Source: "plugins\xcperl-510.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x64 and perl510 - Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x86 and perl512 Source: "plugins\xcperl-512.dll.x64"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: x64 and perl512 diff --git a/plugins/perl/makefile-510.mak b/plugins/perl/makefile-510.mak deleted file mode 100644 index 60f6b2dc..00000000 --- a/plugins/perl/makefile-510.mak +++ /dev/null @@ -1,30 +0,0 @@ -include "..\..\src\makeinc.mak" - -DIRENTLIB = ..\..\src\common\dirent.lib -TARGET = $(PERL510OUTPUT) - -all: $(TARGET) - -perl.def: - echo EXPORTS > perl.def - echo xchat_plugin_init >> perl.def - echo xchat_plugin_deinit >> perl.def - echo xchat_plugin_get_info >> perl.def - -perl.obj: perl.c - $(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL510PATH) /I.. /DPERL_DLL=\"$(PERL510LIB).dll\" - -perl.c: xchat.pm.h - -xchat.pm.h: lib/Xchat.pm lib/IRC.pm - perl.exe generate_header - -$(TARGET): perl.obj perl.def - $(LINK) /DLL /out:$(TARGET) perl.obj $(LDFLAGS) $(PERL510LIB).lib /libpath:$(PERL510PATH) /DELAYLOAD:$(PERL510LIB).dll $(DIRENTLIB) DELAYIMP.LIB user32.lib shell32.lib advapi32.lib /def:perl.def - -clean: - @del $(TARGET) - @del *.obj - @del perl.def - @del *.lib - @del *.exp diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index f7bbeeb7..5c6beb6f 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -14,8 +14,6 @@ LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.l LUALIB = lua51 LUAOUTPUT = xclua.dll -PERL510LIB = perl510 -PERL510OUTPUT = xcperl-510.dll PERL512LIB = perl512 PERL512OUTPUT = xcperl-512.dll PERL514LIB = perl514 @@ -32,16 +30,14 @@ CFLAGS = $(CFLAGS) /favor:AMD64 /D_WIN64 CPPFLAGS = $(CPPFLAGS) /favor:AMD64 /D_WIN64 LDFLAGS = $(LDFLAGS) msvcrt_win2003.obj -PERL510PATH = c:\mozilla-build\perl-5.10-x64\lib\CORE -PERL512PATH = c:\mozilla-build\perl-5.12-x64\lib\CORE +PERL512PATH = c:\mozilla-build\perl-5.12-x64\perl\lib\CORE PERL514PATH = c:\mozilla-build\perl-5.14-x64\lib\CORE PYTHONPATH = c:\mozilla-build\python-2.7-x64 TCLPATH = c:\mozilla-build\tcl-8.5-x64 !else LDFLAGS = $(LDFLAGS) msvcrt_winxp.obj -PERL510PATH = c:\mozilla-build\perl-5.10-x86\lib\CORE -PERL512PATH = c:\mozilla-build\perl-5.12-x86\lib\CORE +PERL512PATH = c:\mozilla-build\perl-5.12-x86\perl\lib\CORE PERL514PATH = c:\mozilla-build\perl-5.14-x86\lib\CORE PYTHONPATH = c:\mozilla-build\python-2.7-x86 TCLPATH = c:\mozilla-build\tcl-8.5-x86 -- cgit 1.4.1 From 7061c055f1eb466484c7a2a561ceda5f177d203b Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Wed, 27 Jul 2011 23:13:07 +0200 Subject: remove odd ifdef --- src/fe-gtk/banlist.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/banlist.c b/src/fe-gtk/banlist.c index f587a0c0..a714d186 100644 --- a/src/fe-gtk/banlist.c +++ b/src/fe-gtk/banlist.c @@ -133,11 +133,8 @@ banlist_do_refresh (struct session *sess) gtk_list_store_clear (store); handle_command (sess, "ban", FALSE); -#ifdef WIN32 - if (0) -#else + if (supports_exempt (sess->server)) -#endif { snprintf (tbuf, sizeof (tbuf), "quote mode %s +e", sess->channel); handle_command (sess, tbuf, FALSE); -- cgit 1.4.1 From b6a0e0d086d5b314742b9ecc84f2392b5dada5c8 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Thu, 28 Jul 2011 00:05:58 +0200 Subject: polish the building process of the perl interface --- build/strawberry-importlib.bat | 19 + plugins/perl/importlib/perl512-x64.def | 1420 -------------------------------- plugins/perl/importlib/perl512-x86.def | 1420 -------------------------------- plugins/perl/importlib/sbperl-x64.bat | 10 - plugins/perl/importlib/sbperl-x86.bat | 10 - plugins/perl/makefile-512.mak | 13 +- plugins/perl/makefile-514.mak | 2 +- plugins/perl/perl512.def | 1420 ++++++++++++++++++++++++++++++++ src/makeinc.skel.mak | 4 +- 9 files changed, 1452 insertions(+), 2866 deletions(-) create mode 100644 build/strawberry-importlib.bat delete mode 100644 plugins/perl/importlib/perl512-x64.def delete mode 100644 plugins/perl/importlib/perl512-x86.def delete mode 100644 plugins/perl/importlib/sbperl-x64.bat delete mode 100644 plugins/perl/importlib/sbperl-x86.bat create mode 100644 plugins/perl/perl512.def (limited to 'src') diff --git a/build/strawberry-importlib.bat b/build/strawberry-importlib.bat new file mode 100644 index 00000000..61da96b3 --- /dev/null +++ b/build/strawberry-importlib.bat @@ -0,0 +1,19 @@ +@echo off +set PATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE +cd c:\mozilla-build\perl-5.12-x86\perl\lib\CORE +echo.Overwrite existing def file? +pause +dumpbin /exports ..\..\bin\perl512.dll > perl512.def +echo.Please adjust the resulting file manually, then hit return! +pause +lib /machine:x86 /def:perl512.def +pause +set PATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 +cd c:\mozilla-build\perl-5.12-x64\perl\lib\CORE +echo.Overwrite existing def file? +pause +dumpbin /exports ..\..\bin\perl512.dll > perl512.def +echo.Please adjust the resulting file manually, then hit return! +pause +lib /machine:x64 /def:perl512.def +pause diff --git a/plugins/perl/importlib/perl512-x64.def b/plugins/perl/importlib/perl512-x64.def deleted file mode 100644 index 5cfcaa68..00000000 --- a/plugins/perl/importlib/perl512-x64.def +++ /dev/null @@ -1,1420 +0,0 @@ -LIBRARY perl512 -EXPORTS -PL_bincompat_options -PL_check -PL_fold -PL_fold_locale -PL_freq -PL_keyword_plugin -PL_memory_wrap -PL_no_aelem -PL_no_dir_func -PL_no_func -PL_no_helem_sv -PL_no_localize_ref -PL_no_mem -PL_no_modify -PL_no_myglob -PL_no_security -PL_no_sock_func -PL_no_symref -PL_no_usym -PL_no_wrongref -PL_op_desc -PL_op_name -PL_opargs -PL_perlio_mutex -PL_ppaddr -PL_reg_extflags_name -PL_reg_name -PL_regkind -PL_sig_name -PL_sig_num -PL_simple -PL_utf8skip -PL_uuemap -PL_varies -PL_vtbl_amagic -PL_vtbl_amagicelem -PL_vtbl_arylen -PL_vtbl_backref -PL_vtbl_bm -PL_vtbl_collxfrm -PL_vtbl_dbline -PL_vtbl_defelem -PL_vtbl_env -PL_vtbl_envelem -PL_vtbl_fm -PL_vtbl_isa -PL_vtbl_isaelem -PL_vtbl_mglob -PL_vtbl_nkeys -PL_vtbl_pack -PL_vtbl_packelem -PL_vtbl_pos -PL_vtbl_regdata -PL_vtbl_regdatum -PL_vtbl_regexp -PL_vtbl_sig -PL_vtbl_sigelem -PL_vtbl_substr -PL_vtbl_sv -PL_vtbl_taint -PL_vtbl_utf8 -PL_vtbl_uvar -PL_vtbl_vec -PL_warn_nl -PL_warn_nosemi -PL_warn_reserved -PL_warn_uninit -PerlIOBase_binmode -PerlIOBase_clearerr -PerlIOBase_close -PerlIOBase_dup -PerlIOBase_eof -PerlIOBase_error -PerlIOBase_fileno -PerlIOBase_noop_fail -PerlIOBase_noop_ok -PerlIOBase_popped -PerlIOBase_pushed -PerlIOBase_read -PerlIOBase_setlinebuf -PerlIOBase_unread -PerlIOBuf_bufsiz -PerlIOBuf_close -PerlIOBuf_dup -PerlIOBuf_fill -PerlIOBuf_flush -PerlIOBuf_get_base -PerlIOBuf_get_cnt -PerlIOBuf_get_ptr -PerlIOBuf_open -PerlIOBuf_popped -PerlIOBuf_pushed -PerlIOBuf_read -PerlIOBuf_seek -PerlIOBuf_set_ptrcnt -PerlIOBuf_tell -PerlIOBuf_unread -PerlIOBuf_write -PerlIO_allocate -PerlIO_apply_layera -PerlIO_apply_layers -PerlIO_arg_fetch -PerlIO_binmode -PerlIO_canset_cnt -PerlIO_debug -PerlIO_define_layer -PerlIO_exportFILE -PerlIO_fast_gets -PerlIO_fdopen -PerlIO_findFILE -PerlIO_find_layer -PerlIO_getc -PerlIO_getname -PerlIO_getpos -PerlIO_has_base -PerlIO_has_cntptr -PerlIO_importFILE -PerlIO_init -PerlIO_isutf8 -PerlIO_layer_fetch -PerlIO_list_alloc -PerlIO_list_free -PerlIO_modestr -PerlIO_open -PerlIO_parse_layers -PerlIO_pending -PerlIO_perlio -PerlIO_pop -PerlIO_printf -PerlIO_push -PerlIO_putc -PerlIO_puts -PerlIO_releaseFILE -PerlIO_reopen -PerlIO_rewind -PerlIO_setpos -PerlIO_sprintf -PerlIO_stdoutf -PerlIO_sv_dup -PerlIO_teardown -PerlIO_tmpfile -PerlIO_ungetc -PerlIO_vprintf -PerlIO_vsprintf -Perl_GNo_ptr -Perl_GYes_ptr -Perl_Gcheck_ptr -Perl_Gcsighandlerp_ptr -Perl_Gcurinterp_ptr -Perl_Gdo_undump_ptr -Perl_Gdollarzero_mutex_ptr -Perl_Gfold_locale_ptr -Perl_Ghexdigit_ptr -Perl_Ghints_mutex_ptr -Perl_Ginterp_size_5_10_0_ptr -Perl_Ginterp_size_ptr -Perl_Gkeyword_plugin_ptr -Perl_Gmy_ctx_mutex_ptr -Perl_Gmy_cxt_index_ptr -Perl_Gop_mutex_ptr -Perl_Gop_seq_ptr -Perl_Gop_sequence_ptr -Perl_Gpatleave_ptr -Perl_Gperlio_debug_fd_ptr -Perl_Gperlio_fd_refcnt_ptr -Perl_Gperlio_fd_refcnt_size_ptr -Perl_Gperlio_mutex_ptr -Perl_Gppaddr_ptr -Perl_Grevision_ptr -Perl_Grunops_dbg_ptr -Perl_Grunops_std_ptr -Perl_Gsh_path_ptr -Perl_Gsig_trapped_ptr -Perl_Gsigfpe_saved_ptr -Perl_Gsubversion_ptr -Perl_Gsv_placeholder_ptr -Perl_Gthr_key_ptr -Perl_Guse_safe_putenv_ptr -Perl_Gv_AMupdate -Perl_Gversion_ptr -Perl_Gveto_cleanup_ptr -Perl_IArgv_ptr -Perl_ICmd_ptr -Perl_IDBgv_ptr -Perl_IDBline_ptr -Perl_IDBsignal_ptr -Perl_IDBsingle_ptr -Perl_IDBsub_ptr -Perl_IDBtrace_ptr -Perl_IDir_ptr -Perl_IEnv_ptr -Perl_ILIO_ptr -Perl_IMemParse_ptr -Perl_IMemShared_ptr -Perl_IMem_ptr -Perl_IOpPtr_ptr -Perl_IOpSlab_ptr -Perl_IOpSpace_ptr -Perl_IProc_ptr -Perl_ISock_ptr -Perl_IStdIO_ptr -Perl_ISv_ptr -Perl_IXpv_ptr -Perl_Iamagic_generation_ptr -Perl_Ian_ptr -Perl_Iargvgv_ptr -Perl_Iargvout_stack_ptr -Perl_Iargvoutgv_ptr -Perl_Ibasetime_ptr -Perl_Ibeginav_ptr -Perl_Ibeginav_save_ptr -Perl_Ibody_arenas_ptr -Perl_Ibody_roots_ptr -Perl_Ibodytarget_ptr -Perl_Ibreakable_sub_gen_ptr -Perl_Icheckav_ptr -Perl_Icheckav_save_ptr -Perl_Ichopset_ptr -Perl_Iclocktick_ptr -Perl_Icollation_ix_ptr -Perl_Icollation_name_ptr -Perl_Icollation_standard_ptr -Perl_Icollxfrm_base_ptr -Perl_Icollxfrm_mult_ptr -Perl_Icolors_ptr -Perl_Icolorset_ptr -Perl_Icompcv_ptr -Perl_Icompiling_ptr -Perl_Icomppad_name_fill_ptr -Perl_Icomppad_name_floor_ptr -Perl_Icomppad_name_ptr -Perl_Icomppad_ptr -Perl_Icop_seqmax_ptr -Perl_Icurcop_ptr -Perl_Icurcopdb_ptr -Perl_Icurpad_ptr -Perl_Icurpm_ptr -Perl_Icurstack_ptr -Perl_Icurstackinfo_ptr -Perl_Icurstash_ptr -Perl_Icurstname_ptr -Perl_Icustom_op_descs_ptr -Perl_Icustom_op_names_ptr -Perl_Icv_has_eval_ptr -Perl_Idbargs_ptr -Perl_Idebstash_ptr -Perl_Idebug_pad_ptr -Perl_Idebug_ptr -Perl_Idef_layerlist_ptr -Perl_Idefgv_ptr -Perl_Idefoutgv_ptr -Perl_Idefstash_ptr -Perl_Idelaymagic_ptr -Perl_Idestroyhook_ptr -Perl_Idiehook_ptr -Perl_Idirty_ptr -Perl_Idoextract_ptr -Perl_Idoswitches_ptr -Perl_Idowarn_ptr -Perl_Idumpindent_ptr -Perl_Ie_script_ptr -Perl_Iefloatbuf_ptr -Perl_Iefloatsize_ptr -Perl_Iegid_ptr -Perl_Iencoding_ptr -Perl_Iendav_ptr -Perl_Ienvgv_ptr -Perl_Ierrgv_ptr -Perl_Ierrors_ptr -Perl_Ieuid_ptr -Perl_Ieval_root_ptr -Perl_Ieval_start_ptr -Perl_Ievalseq_ptr -Perl_Iexit_flags_ptr -Perl_Iexitlist_ptr -Perl_Iexitlistlen_ptr -Perl_Ifdpid_ptr -Perl_Ifilemode_ptr -Perl_Ifirstgv_ptr -Perl_Iforkprocess_ptr -Perl_Iformfeed_ptr -Perl_Iformtarget_ptr -Perl_Igensym_ptr -Perl_Igid_ptr -Perl_Iglob_index_ptr -Perl_Iglobalstash_ptr -Perl_Ihash_seed_ptr -Perl_Ihintgv_ptr -Perl_Ihints_ptr -Perl_Ihv_fetch_ent_mh_ptr -Perl_Iin_clean_all_ptr -Perl_Iin_clean_objs_ptr -Perl_Iin_eval_ptr -Perl_Iin_load_module_ptr -Perl_Iincgv_ptr -Perl_Iinitav_ptr -Perl_Iinplace_ptr -Perl_Iisarev_ptr -Perl_Iknown_layers_ptr -Perl_Ilast_in_gv_ptr -Perl_Ilast_swash_hv_ptr -Perl_Ilast_swash_key_ptr -Perl_Ilast_swash_klen_ptr -Perl_Ilast_swash_slen_ptr -Perl_Ilast_swash_tmps_ptr -Perl_Ilastfd_ptr -Perl_Ilastscream_ptr -Perl_Ilaststatval_ptr -Perl_Ilaststype_ptr -Perl_Ilocalizing_ptr -Perl_Ilocalpatches_ptr -Perl_Ilockhook_ptr -Perl_Imain_cv_ptr -Perl_Imain_root_ptr -Perl_Imain_start_ptr -Perl_Imainstack_ptr -Perl_Imarkstack_max_ptr -Perl_Imarkstack_ptr -Perl_Imarkstack_ptr_ptr -Perl_Imax_intro_pending_ptr -Perl_Imaxo_ptr -Perl_Imaxscream_ptr -Perl_Imaxsysfd_ptr -Perl_Imess_sv_ptr -Perl_Imin_intro_pending_ptr -Perl_Iminus_E_ptr -Perl_Iminus_F_ptr -Perl_Iminus_a_ptr -Perl_Iminus_c_ptr -Perl_Iminus_l_ptr -Perl_Iminus_n_ptr -Perl_Iminus_p_ptr -Perl_Imodglobal_ptr -Perl_Imy_cxt_list_ptr -Perl_Imy_cxt_size_ptr -Perl_Ina_ptr -Perl_Inice_chunk_ptr -Perl_Inice_chunk_size_ptr -Perl_Inomemok_ptr -Perl_Inumeric_local_ptr -Perl_Inumeric_name_ptr -Perl_Inumeric_radix_sv_ptr -Perl_Inumeric_standard_ptr -Perl_Iofsgv_ptr -Perl_Ioldname_ptr -Perl_Iop_mask_ptr -Perl_Iop_ptr -Perl_Iopfreehook_ptr -Perl_Iorigalen_ptr -Perl_Iorigargc_ptr -Perl_Iorigargv_ptr -Perl_Iorigenviron_ptr -Perl_Iorigfilename_ptr -Perl_Iors_sv_ptr -Perl_Iosname_ptr -Perl_Ipad_reset_pending_ptr -Perl_Ipadix_floor_ptr -Perl_Ipadix_ptr -Perl_Iparser_ptr -Perl_Ipatchlevel_ptr -Perl_Ipeepp_ptr -Perl_Iperl_destruct_level_ptr -Perl_Iperldb_ptr -Perl_Iperlio_ptr -Perl_Ipreambleav_ptr -Perl_Iprofiledata_ptr -Perl_Ipsig_name_ptr -Perl_Ipsig_pend_ptr -Perl_Ipsig_ptr_ptr -Perl_Iptr_table_ptr -Perl_Ireentrant_retint_ptr -Perl_Ireg_state_ptr -Perl_Iregdummy_ptr -Perl_Iregex_pad_ptr -Perl_Iregex_padav_ptr -Perl_Ireginterp_cnt_ptr -Perl_Iregistered_mros_ptr -Perl_Iregmatch_slab_ptr -Perl_Iregmatch_state_ptr -Perl_Irehash_seed_ptr -Perl_Irehash_seed_set_ptr -Perl_Ireplgv_ptr -Perl_Irestartop_ptr -Perl_Irs_ptr -Perl_Irunops_ptr -Perl_Isavebegin_ptr -Perl_Isavestack_ix_ptr -Perl_Isavestack_max_ptr -Perl_Isavestack_ptr -Perl_Isawampersand_ptr -Perl_Iscopestack_ix_ptr -Perl_Iscopestack_max_ptr -Perl_Iscopestack_name_ptr -Perl_Iscopestack_ptr -Perl_Iscreamfirst_ptr -Perl_Iscreamnext_ptr -Perl_Isecondgv_ptr -Perl_Isharehook_ptr -Perl_Isig_pending_ptr -Perl_Isighandlerp_ptr -Perl_Isignals_ptr -Perl_Isort_RealCmp_ptr -Perl_Isortcop_ptr -Perl_Isortstash_ptr -Perl_Isplitstr_ptr -Perl_Isrand_called_ptr -Perl_Istack_base_ptr -Perl_Istack_max_ptr -Perl_Istack_sp_ptr -Perl_Istart_env_ptr -Perl_Istashcache_ptr -Perl_Istatbuf_ptr -Perl_Istatcache_ptr -Perl_Istatgv_ptr -Perl_Istatname_ptr -Perl_Istatusvalue_posix_ptr -Perl_Istatusvalue_ptr -Perl_Istderrgv_ptr -Perl_Istdingv_ptr -Perl_Istrtab_ptr -Perl_Isub_generation_ptr -Perl_Isubline_ptr -Perl_Isubname_ptr -Perl_Isv_arenaroot_ptr -Perl_Isv_count_ptr -Perl_Isv_no_ptr -Perl_Isv_objcount_ptr -Perl_Isv_root_ptr -Perl_Isv_undef_ptr -Perl_Isv_yes_ptr -Perl_Isys_intern_ptr -Perl_Itaint_warn_ptr -Perl_Itainted_ptr -Perl_Itainting_ptr -Perl_Ithreadhook_ptr -Perl_Itmps_floor_ptr -Perl_Itmps_ix_ptr -Perl_Itmps_max_ptr -Perl_Itmps_stack_ptr -Perl_Itop_env_ptr -Perl_Itoptarget_ptr -Perl_Iuid_ptr -Perl_Iunicode_ptr -Perl_Iunitcheckav_ptr -Perl_Iunitcheckav_save_ptr -Perl_Iunlockhook_ptr -Perl_Iunsafe_ptr -Perl_Iutf8_X_LVT_ptr -Perl_Iutf8_X_LV_LVT_V_ptr -Perl_Iutf8_X_LV_ptr -Perl_Iutf8_X_L_ptr -Perl_Iutf8_X_T_ptr -Perl_Iutf8_X_V_ptr -Perl_Iutf8_X_begin_ptr -Perl_Iutf8_X_extend_ptr -Perl_Iutf8_X_non_hangul_ptr -Perl_Iutf8_X_prepend_ptr -Perl_Iutf8_alnum_ptr -Perl_Iutf8_alpha_ptr -Perl_Iutf8_ascii_ptr -Perl_Iutf8_cntrl_ptr -Perl_Iutf8_digit_ptr -Perl_Iutf8_graph_ptr -Perl_Iutf8_idcont_ptr -Perl_Iutf8_idstart_ptr -Perl_Iutf8_lower_ptr -Perl_Iutf8_mark_ptr -Perl_Iutf8_perl_space_ptr -Perl_Iutf8_perl_word_ptr -Perl_Iutf8_posix_digit_ptr -Perl_Iutf8_print_ptr -Perl_Iutf8_punct_ptr -Perl_Iutf8_space_ptr -Perl_Iutf8_tofold_ptr -Perl_Iutf8_tolower_ptr -Perl_Iutf8_totitle_ptr -Perl_Iutf8_toupper_ptr -Perl_Iutf8_upper_ptr -Perl_Iutf8_xdigit_ptr -Perl_Iutf8cache_ptr -Perl_Iutf8locale_ptr -Perl_Iwarnhook_ptr -Perl_PerlIO_clearerr -Perl_PerlIO_close -Perl_PerlIO_context_layers -Perl_PerlIO_eof -Perl_PerlIO_error -Perl_PerlIO_fileno -Perl_PerlIO_fill -Perl_PerlIO_flush -Perl_PerlIO_get_base -Perl_PerlIO_get_bufsiz -Perl_PerlIO_get_cnt -Perl_PerlIO_get_ptr -Perl_PerlIO_read -Perl_PerlIO_seek -Perl_PerlIO_set_cnt -Perl_PerlIO_set_ptrcnt -Perl_PerlIO_setlinebuf -Perl_PerlIO_stderr -Perl_PerlIO_stdin -Perl_PerlIO_stdout -Perl_PerlIO_tell -Perl_PerlIO_unread -Perl_PerlIO_write -Perl_Slab_Alloc -Perl_Slab_Free -Perl_amagic_call -Perl_any_dup -Perl_apply_attrs_string -Perl_atfork_lock -Perl_atfork_unlock -Perl_av_arylen_p -Perl_av_clear -Perl_av_delete -Perl_av_exists -Perl_av_extend -Perl_av_fetch -Perl_av_fill -Perl_av_iter_p -Perl_av_len -Perl_av_make -Perl_av_pop -Perl_av_push -Perl_av_reify -Perl_av_shift -Perl_av_store -Perl_av_undef -Perl_av_unshift -Perl_block_gimme -Perl_bytes_from_utf8 -Perl_bytes_to_utf8 -Perl_call_argv -Perl_call_atexit -Perl_call_list -Perl_call_method -Perl_call_pv -Perl_call_sv -Perl_calloc -Perl_cast_i32 -Perl_cast_iv -Perl_cast_ulong -Perl_cast_uv -Perl_ck_warner -Perl_ck_warner_d -Perl_ckwarn -Perl_ckwarn_d -Perl_croak -Perl_croak_nocontext -Perl_croak_xs_usage -Perl_csighandler -Perl_custom_op_desc -Perl_custom_op_name -Perl_cv_const_sv -Perl_cv_undef -Perl_cx_dump -Perl_cx_dup -Perl_cxinc -Perl_deb -Perl_deb_nocontext -Perl_delimcpy -Perl_despatch_signals -Perl_die -Perl_die_nocontext -Perl_dirp_dup -Perl_do_aexec -Perl_do_aspawn -Perl_do_binmode -Perl_do_close -Perl_do_gv_dump -Perl_do_gvgv_dump -Perl_do_hv_dump -Perl_do_join -Perl_do_magic_dump -Perl_do_op_dump -Perl_do_open -Perl_do_open9 -Perl_do_openn -Perl_do_pmop_dump -Perl_do_spawn -Perl_do_spawn_nowait -Perl_do_sprintf -Perl_do_sv_dump -Perl_doing_taint -Perl_doref -Perl_dounwind -Perl_dowantarray -Perl_dump_all -Perl_dump_eval -Perl_dump_form -Perl_dump_indent -Perl_dump_packsubs -Perl_dump_sub -Perl_dump_vindent -Perl_emulate_cop_io -Perl_eval_pv -Perl_eval_sv -Perl_fbm_compile -Perl_fbm_instr -Perl_fetch_cop_label -Perl_filter_add -Perl_filter_del -Perl_filter_read -Perl_find_runcv -Perl_find_rundefsvoffset -Perl_form -Perl_form_nocontext -Perl_fp_dup -Perl_fprintf_nocontext -Perl_free_tmps -Perl_get_av -Perl_get_context -Perl_get_cv -Perl_get_cvn_flags -Perl_get_hv -Perl_get_op_descs -Perl_get_op_names -Perl_get_ppaddr -Perl_get_re_arg -Perl_get_sv -Perl_get_vtbl -Perl_getcwd_sv -Perl_gp_dup -Perl_gp_free -Perl_gp_ref -Perl_grok_bin -Perl_grok_hex -Perl_grok_number -Perl_grok_numeric_radix -Perl_grok_oct -Perl_gv_AVadd -Perl_gv_HVadd -Perl_gv_IOadd -Perl_gv_SVadd -Perl_gv_add_by_type -Perl_gv_autoload4 -Perl_gv_check -Perl_gv_const_sv -Perl_gv_dump -Perl_gv_efullname -Perl_gv_efullname3 -Perl_gv_efullname4 -Perl_gv_fetchfile -Perl_gv_fetchfile_flags -Perl_gv_fetchmeth -Perl_gv_fetchmeth_autoload -Perl_gv_fetchmethod -Perl_gv_fetchmethod_autoload -Perl_gv_fetchmethod_flags -Perl_gv_fetchpv -Perl_gv_fetchpvn_flags -Perl_gv_fetchsv -Perl_gv_fullname -Perl_gv_fullname3 -Perl_gv_fullname4 -Perl_gv_handler -Perl_gv_init -Perl_gv_name_set -Perl_gv_stashpv -Perl_gv_stashpvn -Perl_gv_stashsv -Perl_gv_try_downgrade -Perl_he_dup -Perl_hek_dup -Perl_hv_clear -Perl_hv_clear_placeholders -Perl_hv_common -Perl_hv_common_key_len -Perl_hv_delayfree_ent -Perl_hv_delete -Perl_hv_delete_ent -Perl_hv_eiter_p -Perl_hv_eiter_set -Perl_hv_exists -Perl_hv_exists_ent -Perl_hv_fetch -Perl_hv_fetch_ent -Perl_hv_free_ent -Perl_hv_iterinit -Perl_hv_iterkey -Perl_hv_iterkeysv -Perl_hv_iternext -Perl_hv_iternext_flags -Perl_hv_iternextsv -Perl_hv_iterval -Perl_hv_ksplit -Perl_hv_magic -Perl_hv_name_set -Perl_hv_placeholders_get -Perl_hv_placeholders_p -Perl_hv_placeholders_set -Perl_hv_riter_p -Perl_hv_riter_set -Perl_hv_scalar -Perl_hv_store -Perl_hv_store_ent -Perl_hv_store_flags -Perl_hv_undef -Perl_ibcmp -Perl_ibcmp_locale -Perl_ibcmp_utf8 -Perl_init_i18nl10n -Perl_init_i18nl14n -Perl_init_os_extras -Perl_init_stacks -Perl_init_tm -Perl_instr -Perl_is_ascii_string -Perl_is_lvalue_sub -Perl_is_uni_alnum -Perl_is_uni_alnum_lc -Perl_is_uni_alpha -Perl_is_uni_alpha_lc -Perl_is_uni_ascii -Perl_is_uni_ascii_lc -Perl_is_uni_cntrl -Perl_is_uni_cntrl_lc -Perl_is_uni_digit -Perl_is_uni_digit_lc -Perl_is_uni_graph -Perl_is_uni_graph_lc -Perl_is_uni_idfirst -Perl_is_uni_idfirst_lc -Perl_is_uni_lower -Perl_is_uni_lower_lc -Perl_is_uni_print -Perl_is_uni_print_lc -Perl_is_uni_punct -Perl_is_uni_punct_lc -Perl_is_uni_space -Perl_is_uni_space_lc -Perl_is_uni_upper -Perl_is_uni_upper_lc -Perl_is_uni_xdigit -Perl_is_uni_xdigit_lc -Perl_is_utf8_X_L -Perl_is_utf8_X_LV -Perl_is_utf8_X_LVT -Perl_is_utf8_X_LV_LVT_V -Perl_is_utf8_X_T -Perl_is_utf8_X_V -Perl_is_utf8_X_begin -Perl_is_utf8_X_extend -Perl_is_utf8_X_non_hangul -Perl_is_utf8_X_prepend -Perl_is_utf8_alnum -Perl_is_utf8_alpha -Perl_is_utf8_ascii -Perl_is_utf8_char -Perl_is_utf8_cntrl -Perl_is_utf8_digit -Perl_is_utf8_graph -Perl_is_utf8_idcont -Perl_is_utf8_idfirst -Perl_is_utf8_lower -Perl_is_utf8_mark -Perl_is_utf8_perl_space -Perl_is_utf8_perl_word -Perl_is_utf8_posix_digit -Perl_is_utf8_print -Perl_is_utf8_punct -Perl_is_utf8_space -Perl_is_utf8_string -Perl_is_utf8_string_loc -Perl_is_utf8_string_loclen -Perl_is_utf8_upper -Perl_is_utf8_xdigit -Perl_leave_scope -Perl_lex_bufutf8 -Perl_lex_discard_to -Perl_lex_end -Perl_lex_grow_linestr -Perl_lex_next_chunk -Perl_lex_peek_unichar -Perl_lex_read_space -Perl_lex_read_to -Perl_lex_read_unichar -Perl_lex_stuff_pvn -Perl_lex_stuff_sv -Perl_lex_unstuff -Perl_load_module -Perl_load_module_nocontext -Perl_looks_like_number -Perl_magic_dump -Perl_malloc -Perl_markstack_grow -Perl_mess -Perl_mess_nocontext -Perl_mfree -Perl_mg_clear -Perl_mg_copy -Perl_mg_dup -Perl_mg_find -Perl_mg_free -Perl_mg_get -Perl_mg_length -Perl_mg_magical -Perl_mg_set -Perl_mg_size -Perl_mini_mktime -Perl_mod -Perl_moreswitches -Perl_mro_get_from_name -Perl_mro_get_linear_isa -Perl_mro_get_private_data -Perl_mro_meta_init -Perl_mro_method_changed_in -Perl_mro_register -Perl_mro_set_mro -Perl_mro_set_private_data -Perl_my_atof -Perl_my_atof2 -Perl_my_cxt_init -Perl_my_dirfd -Perl_my_exit -Perl_my_failure_exit -Perl_my_fflush_all -Perl_my_fork -Perl_my_lstat -Perl_my_popen_list -Perl_my_setenv -Perl_my_snprintf -Perl_my_socketpair -Perl_my_stat -Perl_my_strftime -Perl_my_strlcat -Perl_my_strlcpy -Perl_my_vsnprintf -Perl_newANONATTRSUB -Perl_newANONHASH -Perl_newANONLIST -Perl_newANONSUB -Perl_newASSIGNOP -Perl_newATTRSUB -Perl_newAV -Perl_newAVREF -Perl_newBINOP -Perl_newCONDOP -Perl_newCONSTSUB -Perl_newCVREF -Perl_newFORM -Perl_newFOROP -Perl_newGIVENOP -Perl_newGVOP -Perl_newGVREF -Perl_newGVgen -Perl_newHV -Perl_newHVREF -Perl_newHVhv -Perl_newIO -Perl_newLISTOP -Perl_newLOGOP -Perl_newLOOPEX -Perl_newLOOPOP -Perl_newMYSUB -Perl_newNULLLIST -Perl_newOP -Perl_newPADOP -Perl_newPMOP -Perl_newPROG -Perl_newPVOP -Perl_newRANGE -Perl_newRV -Perl_newRV_noinc -Perl_newSLICEOP -Perl_newSTATEOP -Perl_newSUB -Perl_newSV -Perl_newSVOP -Perl_newSVREF -Perl_newSV_type -Perl_newSVhek -Perl_newSViv -Perl_newSVnv -Perl_newSVpv -Perl_newSVpvf -Perl_newSVpvf_nocontext -Perl_newSVpvn -Perl_newSVpvn_flags -Perl_newSVpvn_share -Perl_newSVrv -Perl_newSVsv -Perl_newSVuv -Perl_newUNOP -Perl_newWHENOP -Perl_newWHILEOP -Perl_newXS -Perl_newXS_flags -Perl_new_collate -Perl_new_ctype -Perl_new_numeric -Perl_new_stackinfo -Perl_new_version -Perl_new_warnings_bitfield -Perl_ninstr -Perl_nothreadhook -Perl_op_clear -Perl_op_dump -Perl_op_free -Perl_op_null -Perl_op_refcnt_lock -Perl_op_refcnt_unlock -Perl_pack_cat -Perl_packlist -Perl_pad_findmy -Perl_pad_push -Perl_parser_dup -Perl_pmflag -Perl_pmop_dump -Perl_pop_scope -Perl_pregcomp -Perl_pregexec -Perl_pregfree -Perl_pregfree2 -Perl_prescan_version -Perl_printf_nocontext -Perl_ptr_table_clear -Perl_ptr_table_fetch -Perl_ptr_table_free -Perl_ptr_table_new -Perl_ptr_table_split -Perl_ptr_table_store -Perl_push_scope -Perl_pv_display -Perl_pv_escape -Perl_pv_pretty -Perl_pv_uni_display -Perl_qerror -Perl_re_compile -Perl_re_dup_guts -Perl_re_intuit_start -Perl_re_intuit_string -Perl_realloc -Perl_reentrant_free -Perl_reentrant_init -Perl_reentrant_retry -Perl_reentrant_size -Perl_ref -Perl_refcounted_he_chain_2hv -Perl_refcounted_he_fetch -Perl_refcounted_he_new -Perl_reg_named_buff -Perl_reg_named_buff_all -Perl_reg_named_buff_exists -Perl_reg_named_buff_fetch -Perl_reg_named_buff_firstkey -Perl_reg_named_buff_iter -Perl_reg_named_buff_nextkey -Perl_reg_named_buff_scalar -Perl_reg_numbered_buff_fetch -Perl_reg_numbered_buff_length -Perl_reg_numbered_buff_store -Perl_reg_qr_package -Perl_reg_temp_copy -Perl_regclass_swash -Perl_regcurly -Perl_regdump -Perl_regdupe_internal -Perl_regexec_flags -Perl_regfree_internal -Perl_reginitcolors -Perl_regnext -Perl_repeatcpy -Perl_report_uninit -Perl_require_pv -Perl_rninstr -Perl_rsignal -Perl_rsignal_state -Perl_runops_debug -Perl_runops_standard -Perl_rvpv_dup -Perl_safesyscalloc -Perl_safesysfree -Perl_safesysmalloc -Perl_safesysrealloc -Perl_save_I16 -Perl_save_I32 -Perl_save_I8 -Perl_save_adelete -Perl_save_aelem_flags -Perl_save_alloc -Perl_save_aptr -Perl_save_ary -Perl_save_bool -Perl_save_clearsv -Perl_save_delete -Perl_save_destructor -Perl_save_destructor_x -Perl_save_freeop -Perl_save_freepv -Perl_save_freesv -Perl_save_generic_pvref -Perl_save_generic_svref -Perl_save_gp -Perl_save_hash -Perl_save_hdelete -Perl_save_helem_flags -Perl_save_hptr -Perl_save_int -Perl_save_item -Perl_save_iv -Perl_save_list -Perl_save_long -Perl_save_mortalizesv -Perl_save_nogv -Perl_save_op -Perl_save_padsv_and_mortalize -Perl_save_pptr -Perl_save_pushptr -Perl_save_re_context -Perl_save_scalar -Perl_save_set_svflags -Perl_save_shared_pvref -Perl_save_sptr -Perl_save_svref -Perl_save_vptr -Perl_savepv -Perl_savepvn -Perl_savesharedpv -Perl_savesharedpvn -Perl_savestack_grow -Perl_savestack_grow_cnt -Perl_savesvpv -Perl_scan_bin -Perl_scan_hex -Perl_scan_num -Perl_scan_oct -Perl_scan_version -Perl_scan_vstring -Perl_screaminstr -Perl_seed -Perl_set_context -Perl_set_numeric_local -Perl_set_numeric_radix -Perl_set_numeric_standard -Perl_setdefout -Perl_share_hek -Perl_si_dup -Perl_signbit -Perl_sortsv -Perl_sortsv_flags -Perl_ss_dup -Perl_stack_grow -Perl_start_subparse -Perl_stashpv_hvname_match -Perl_str_to_version -Perl_sv_2bool -Perl_sv_2cv -Perl_sv_2io -Perl_sv_2iv -Perl_sv_2iv_flags -Perl_sv_2mortal -Perl_sv_2nv -Perl_sv_2pv -Perl_sv_2pv_flags -Perl_sv_2pv_nolen -Perl_sv_2pvbyte -Perl_sv_2pvbyte_nolen -Perl_sv_2pvutf8 -Perl_sv_2pvutf8_nolen -Perl_sv_2uv -Perl_sv_2uv_flags -Perl_sv_backoff -Perl_sv_bless -Perl_sv_cat_decode -Perl_sv_catpv -Perl_sv_catpv_mg -Perl_sv_catpvf -Perl_sv_catpvf_mg -Perl_sv_catpvf_mg_nocontext -Perl_sv_catpvf_nocontext -Perl_sv_catpvn -Perl_sv_catpvn_flags -Perl_sv_catpvn_mg -Perl_sv_catsv -Perl_sv_catsv_flags -Perl_sv_catsv_mg -Perl_sv_chop -Perl_sv_clear -Perl_sv_cmp -Perl_sv_cmp_locale -Perl_sv_collxfrm -Perl_sv_compile_2op -Perl_sv_copypv -Perl_sv_dec -Perl_sv_derived_from -Perl_sv_destroyable -Perl_sv_does -Perl_sv_dump -Perl_sv_dup -Perl_sv_eq -Perl_sv_force_normal -Perl_sv_force_normal_flags -Perl_sv_free -Perl_sv_free2 -Perl_sv_gets -Perl_sv_grow -Perl_sv_inc -Perl_sv_insert -Perl_sv_insert_flags -Perl_sv_isa -Perl_sv_isobject -Perl_sv_iv -Perl_sv_len -Perl_sv_len_utf8 -Perl_sv_magic -Perl_sv_magicext -Perl_sv_mortalcopy -Perl_sv_newmortal -Perl_sv_newref -Perl_sv_nolocking -Perl_sv_nosharing -Perl_sv_nounlocking -Perl_sv_nv -Perl_sv_peek -Perl_sv_pos_b2u -Perl_sv_pos_u2b -Perl_sv_pos_u2b_flags -Perl_sv_pv -Perl_sv_pvbyte -Perl_sv_pvbyten -Perl_sv_pvbyten_force -Perl_sv_pvn -Perl_sv_pvn_force -Perl_sv_pvn_force_flags -Perl_sv_pvn_nomg -Perl_sv_pvutf8 -Perl_sv_pvutf8n -Perl_sv_pvutf8n_force -Perl_sv_recode_to_utf8 -Perl_sv_reftype -Perl_sv_replace -Perl_sv_report_used -Perl_sv_reset -Perl_sv_rvweaken -Perl_sv_setiv -Perl_sv_setiv_mg -Perl_sv_setnv -Perl_sv_setnv_mg -Perl_sv_setpv -Perl_sv_setpv_mg -Perl_sv_setpvf -Perl_sv_setpvf_mg -Perl_sv_setpvf_mg_nocontext -Perl_sv_setpvf_nocontext -Perl_sv_setpviv -Perl_sv_setpviv_mg -Perl_sv_setpvn -Perl_sv_setpvn_mg -Perl_sv_setref_iv -Perl_sv_setref_nv -Perl_sv_setref_pv -Perl_sv_setref_pvn -Perl_sv_setref_uv -Perl_sv_setsv -Perl_sv_setsv_flags -Perl_sv_setsv_mg -Perl_sv_setuv -Perl_sv_setuv_mg -Perl_sv_taint -Perl_sv_tainted -Perl_sv_true -Perl_sv_uni_display -Perl_sv_unmagic -Perl_sv_unref -Perl_sv_unref_flags -Perl_sv_untaint -Perl_sv_upgrade -Perl_sv_usepvn -Perl_sv_usepvn_flags -Perl_sv_usepvn_mg -Perl_sv_utf8_decode -Perl_sv_utf8_downgrade -Perl_sv_utf8_encode -Perl_sv_utf8_upgrade -Perl_sv_utf8_upgrade_flags_grow -Perl_sv_uv -Perl_sv_vcatpvf -Perl_sv_vcatpvf_mg -Perl_sv_vcatpvfn -Perl_sv_vsetpvf -Perl_sv_vsetpvf_mg -Perl_sv_vsetpvfn -Perl_swash_fetch -Perl_swash_init -Perl_sys_init -Perl_sys_init3 -Perl_sys_intern_clear -Perl_sys_intern_dup -Perl_sys_intern_init -Perl_sys_term -Perl_taint_env -Perl_taint_proper -Perl_tmps_grow -Perl_to_uni_fold -Perl_to_uni_lower -Perl_to_uni_lower_lc -Perl_to_uni_title -Perl_to_uni_title_lc -Perl_to_uni_upper -Perl_to_uni_upper_lc -Perl_to_utf8_case -Perl_to_utf8_fold -Perl_to_utf8_lower -Perl_to_utf8_title -Perl_to_utf8_upper -Perl_unpack_str -Perl_unpackstring -Perl_unsharepvn -Perl_upg_version -Perl_utf16_to_utf8 -Perl_utf16_to_utf8_reversed -Perl_utf8_distance -Perl_utf8_hop -Perl_utf8_length -Perl_utf8_to_bytes -Perl_utf8_to_uvchr -Perl_utf8_to_uvuni -Perl_utf8n_to_uvchr -Perl_utf8n_to_uvuni -Perl_uvchr_to_utf8 -Perl_uvchr_to_utf8_flags -Perl_uvuni_to_utf8 -Perl_uvuni_to_utf8_flags -Perl_vcmp -Perl_vcroak -Perl_vdeb -Perl_vform -Perl_vivify_defelem -Perl_vload_module -Perl_vmess -Perl_vnewSVpvf -Perl_vnormal -Perl_vnumify -Perl_vstringify -Perl_vverify -Perl_vwarn -Perl_vwarner -Perl_warn -Perl_warn_nocontext -Perl_warner -Perl_warner_nocontext -Perl_whichsig -Perl_win32_init -Perl_win32_term -Perl_yylex -RunPerl -boot_DynaLoader -boot_Win32CORE -init_Win32CORE -perl_alloc -perl_alloc_override -perl_alloc_using -perl_clone -perl_clone_host -perl_clone_using -perl_construct -perl_destruct -perl_free -perl_get_host_info -perl_parse -perl_run -perlsio_binmode -setgid -setuid -win32_abort -win32_accept -win32_access -win32_alarm -win32_ansipath -win32_async_check -win32_bind -win32_calloc -win32_chdir -win32_chmod -win32_chsize -win32_clearenv -win32_clearerr -win32_close -win32_closedir -win32_closesocket -win32_connect -win32_crypt -win32_dup -win32_dup2 -win32_dynaload -win32_endhostent -win32_endnetent -win32_endprotoent -win32_endservent -win32_environ -win32_eof -win32_errno -win32_execv -win32_execvp -win32_fclose -win32_fcloseall -win32_fdopen -win32_feof -win32_ferror -win32_fflush -win32_fgetc -win32_fgetpos -win32_fgets -win32_fileno -win32_flock -win32_flushall -win32_fopen -win32_fprintf -win32_fputc -win32_fputs -win32_fread -win32_free -win32_free_childdir -win32_free_childenv -win32_freopen -win32_fseek -win32_fsetpos -win32_fstat -win32_ftell -win32_fwrite -win32_get_childdir -win32_get_childenv -win32_get_osfhandle -win32_getc -win32_getchar -win32_getenv -win32_gethostbyaddr -win32_gethostbyname -win32_gethostname -win32_getnetbyaddr -win32_getnetbyname -win32_getnetent -win32_getpeername -win32_getpid -win32_getprotobyname -win32_getprotobynumber -win32_getprotoent -win32_gets -win32_getservbyname -win32_getservbyport -win32_getservent -win32_getsockname -win32_getsockopt -win32_gettimeofday -win32_htonl -win32_htons -win32_inet_addr -win32_inet_ntoa -win32_ioctl -win32_ioctlsocket -win32_isatty -win32_kill -win32_link -win32_listen -win32_longpath -win32_lseek -win32_malloc -win32_mkdir -win32_ntohl -win32_ntohs -win32_open -win32_open_osfhandle -win32_opendir -win32_os_id -win32_pclose -win32_perror -win32_pipe -win32_popen -win32_printf -win32_putc -win32_putchar -win32_putenv -win32_puts -win32_read -win32_readdir -win32_realloc -win32_recv -win32_recvfrom -win32_rename -win32_rewind -win32_rewinddir -win32_rmdir -win32_seekdir -win32_select -win32_send -win32_sendto -win32_setbuf -win32_sethostent -win32_setmode -win32_setnetent -win32_setprotoent -win32_setservent -win32_setsockopt -win32_setvbuf -win32_shutdown -win32_sleep -win32_socket -win32_spawnvp -win32_stat -win32_stderr -win32_stdin -win32_stdout -win32_str_os_error -win32_strerror -win32_tell -win32_telldir -win32_times -win32_tmpfile -win32_uname -win32_ungetc -win32_unlink -win32_utime -win32_vfprintf -win32_vprintf -win32_wait -win32_waitpid -win32_write diff --git a/plugins/perl/importlib/perl512-x86.def b/plugins/perl/importlib/perl512-x86.def deleted file mode 100644 index 5cfcaa68..00000000 --- a/plugins/perl/importlib/perl512-x86.def +++ /dev/null @@ -1,1420 +0,0 @@ -LIBRARY perl512 -EXPORTS -PL_bincompat_options -PL_check -PL_fold -PL_fold_locale -PL_freq -PL_keyword_plugin -PL_memory_wrap -PL_no_aelem -PL_no_dir_func -PL_no_func -PL_no_helem_sv -PL_no_localize_ref -PL_no_mem -PL_no_modify -PL_no_myglob -PL_no_security -PL_no_sock_func -PL_no_symref -PL_no_usym -PL_no_wrongref -PL_op_desc -PL_op_name -PL_opargs -PL_perlio_mutex -PL_ppaddr -PL_reg_extflags_name -PL_reg_name -PL_regkind -PL_sig_name -PL_sig_num -PL_simple -PL_utf8skip -PL_uuemap -PL_varies -PL_vtbl_amagic -PL_vtbl_amagicelem -PL_vtbl_arylen -PL_vtbl_backref -PL_vtbl_bm -PL_vtbl_collxfrm -PL_vtbl_dbline -PL_vtbl_defelem -PL_vtbl_env -PL_vtbl_envelem -PL_vtbl_fm -PL_vtbl_isa -PL_vtbl_isaelem -PL_vtbl_mglob -PL_vtbl_nkeys -PL_vtbl_pack -PL_vtbl_packelem -PL_vtbl_pos -PL_vtbl_regdata -PL_vtbl_regdatum -PL_vtbl_regexp -PL_vtbl_sig -PL_vtbl_sigelem -PL_vtbl_substr -PL_vtbl_sv -PL_vtbl_taint -PL_vtbl_utf8 -PL_vtbl_uvar -PL_vtbl_vec -PL_warn_nl -PL_warn_nosemi -PL_warn_reserved -PL_warn_uninit -PerlIOBase_binmode -PerlIOBase_clearerr -PerlIOBase_close -PerlIOBase_dup -PerlIOBase_eof -PerlIOBase_error -PerlIOBase_fileno -PerlIOBase_noop_fail -PerlIOBase_noop_ok -PerlIOBase_popped -PerlIOBase_pushed -PerlIOBase_read -PerlIOBase_setlinebuf -PerlIOBase_unread -PerlIOBuf_bufsiz -PerlIOBuf_close -PerlIOBuf_dup -PerlIOBuf_fill -PerlIOBuf_flush -PerlIOBuf_get_base -PerlIOBuf_get_cnt -PerlIOBuf_get_ptr -PerlIOBuf_open -PerlIOBuf_popped -PerlIOBuf_pushed -PerlIOBuf_read -PerlIOBuf_seek -PerlIOBuf_set_ptrcnt -PerlIOBuf_tell -PerlIOBuf_unread -PerlIOBuf_write -PerlIO_allocate -PerlIO_apply_layera -PerlIO_apply_layers -PerlIO_arg_fetch -PerlIO_binmode -PerlIO_canset_cnt -PerlIO_debug -PerlIO_define_layer -PerlIO_exportFILE -PerlIO_fast_gets -PerlIO_fdopen -PerlIO_findFILE -PerlIO_find_layer -PerlIO_getc -PerlIO_getname -PerlIO_getpos -PerlIO_has_base -PerlIO_has_cntptr -PerlIO_importFILE -PerlIO_init -PerlIO_isutf8 -PerlIO_layer_fetch -PerlIO_list_alloc -PerlIO_list_free -PerlIO_modestr -PerlIO_open -PerlIO_parse_layers -PerlIO_pending -PerlIO_perlio -PerlIO_pop -PerlIO_printf -PerlIO_push -PerlIO_putc -PerlIO_puts -PerlIO_releaseFILE -PerlIO_reopen -PerlIO_rewind -PerlIO_setpos -PerlIO_sprintf -PerlIO_stdoutf -PerlIO_sv_dup -PerlIO_teardown -PerlIO_tmpfile -PerlIO_ungetc -PerlIO_vprintf -PerlIO_vsprintf -Perl_GNo_ptr -Perl_GYes_ptr -Perl_Gcheck_ptr -Perl_Gcsighandlerp_ptr -Perl_Gcurinterp_ptr -Perl_Gdo_undump_ptr -Perl_Gdollarzero_mutex_ptr -Perl_Gfold_locale_ptr -Perl_Ghexdigit_ptr -Perl_Ghints_mutex_ptr -Perl_Ginterp_size_5_10_0_ptr -Perl_Ginterp_size_ptr -Perl_Gkeyword_plugin_ptr -Perl_Gmy_ctx_mutex_ptr -Perl_Gmy_cxt_index_ptr -Perl_Gop_mutex_ptr -Perl_Gop_seq_ptr -Perl_Gop_sequence_ptr -Perl_Gpatleave_ptr -Perl_Gperlio_debug_fd_ptr -Perl_Gperlio_fd_refcnt_ptr -Perl_Gperlio_fd_refcnt_size_ptr -Perl_Gperlio_mutex_ptr -Perl_Gppaddr_ptr -Perl_Grevision_ptr -Perl_Grunops_dbg_ptr -Perl_Grunops_std_ptr -Perl_Gsh_path_ptr -Perl_Gsig_trapped_ptr -Perl_Gsigfpe_saved_ptr -Perl_Gsubversion_ptr -Perl_Gsv_placeholder_ptr -Perl_Gthr_key_ptr -Perl_Guse_safe_putenv_ptr -Perl_Gv_AMupdate -Perl_Gversion_ptr -Perl_Gveto_cleanup_ptr -Perl_IArgv_ptr -Perl_ICmd_ptr -Perl_IDBgv_ptr -Perl_IDBline_ptr -Perl_IDBsignal_ptr -Perl_IDBsingle_ptr -Perl_IDBsub_ptr -Perl_IDBtrace_ptr -Perl_IDir_ptr -Perl_IEnv_ptr -Perl_ILIO_ptr -Perl_IMemParse_ptr -Perl_IMemShared_ptr -Perl_IMem_ptr -Perl_IOpPtr_ptr -Perl_IOpSlab_ptr -Perl_IOpSpace_ptr -Perl_IProc_ptr -Perl_ISock_ptr -Perl_IStdIO_ptr -Perl_ISv_ptr -Perl_IXpv_ptr -Perl_Iamagic_generation_ptr -Perl_Ian_ptr -Perl_Iargvgv_ptr -Perl_Iargvout_stack_ptr -Perl_Iargvoutgv_ptr -Perl_Ibasetime_ptr -Perl_Ibeginav_ptr -Perl_Ibeginav_save_ptr -Perl_Ibody_arenas_ptr -Perl_Ibody_roots_ptr -Perl_Ibodytarget_ptr -Perl_Ibreakable_sub_gen_ptr -Perl_Icheckav_ptr -Perl_Icheckav_save_ptr -Perl_Ichopset_ptr -Perl_Iclocktick_ptr -Perl_Icollation_ix_ptr -Perl_Icollation_name_ptr -Perl_Icollation_standard_ptr -Perl_Icollxfrm_base_ptr -Perl_Icollxfrm_mult_ptr -Perl_Icolors_ptr -Perl_Icolorset_ptr -Perl_Icompcv_ptr -Perl_Icompiling_ptr -Perl_Icomppad_name_fill_ptr -Perl_Icomppad_name_floor_ptr -Perl_Icomppad_name_ptr -Perl_Icomppad_ptr -Perl_Icop_seqmax_ptr -Perl_Icurcop_ptr -Perl_Icurcopdb_ptr -Perl_Icurpad_ptr -Perl_Icurpm_ptr -Perl_Icurstack_ptr -Perl_Icurstackinfo_ptr -Perl_Icurstash_ptr -Perl_Icurstname_ptr -Perl_Icustom_op_descs_ptr -Perl_Icustom_op_names_ptr -Perl_Icv_has_eval_ptr -Perl_Idbargs_ptr -Perl_Idebstash_ptr -Perl_Idebug_pad_ptr -Perl_Idebug_ptr -Perl_Idef_layerlist_ptr -Perl_Idefgv_ptr -Perl_Idefoutgv_ptr -Perl_Idefstash_ptr -Perl_Idelaymagic_ptr -Perl_Idestroyhook_ptr -Perl_Idiehook_ptr -Perl_Idirty_ptr -Perl_Idoextract_ptr -Perl_Idoswitches_ptr -Perl_Idowarn_ptr -Perl_Idumpindent_ptr -Perl_Ie_script_ptr -Perl_Iefloatbuf_ptr -Perl_Iefloatsize_ptr -Perl_Iegid_ptr -Perl_Iencoding_ptr -Perl_Iendav_ptr -Perl_Ienvgv_ptr -Perl_Ierrgv_ptr -Perl_Ierrors_ptr -Perl_Ieuid_ptr -Perl_Ieval_root_ptr -Perl_Ieval_start_ptr -Perl_Ievalseq_ptr -Perl_Iexit_flags_ptr -Perl_Iexitlist_ptr -Perl_Iexitlistlen_ptr -Perl_Ifdpid_ptr -Perl_Ifilemode_ptr -Perl_Ifirstgv_ptr -Perl_Iforkprocess_ptr -Perl_Iformfeed_ptr -Perl_Iformtarget_ptr -Perl_Igensym_ptr -Perl_Igid_ptr -Perl_Iglob_index_ptr -Perl_Iglobalstash_ptr -Perl_Ihash_seed_ptr -Perl_Ihintgv_ptr -Perl_Ihints_ptr -Perl_Ihv_fetch_ent_mh_ptr -Perl_Iin_clean_all_ptr -Perl_Iin_clean_objs_ptr -Perl_Iin_eval_ptr -Perl_Iin_load_module_ptr -Perl_Iincgv_ptr -Perl_Iinitav_ptr -Perl_Iinplace_ptr -Perl_Iisarev_ptr -Perl_Iknown_layers_ptr -Perl_Ilast_in_gv_ptr -Perl_Ilast_swash_hv_ptr -Perl_Ilast_swash_key_ptr -Perl_Ilast_swash_klen_ptr -Perl_Ilast_swash_slen_ptr -Perl_Ilast_swash_tmps_ptr -Perl_Ilastfd_ptr -Perl_Ilastscream_ptr -Perl_Ilaststatval_ptr -Perl_Ilaststype_ptr -Perl_Ilocalizing_ptr -Perl_Ilocalpatches_ptr -Perl_Ilockhook_ptr -Perl_Imain_cv_ptr -Perl_Imain_root_ptr -Perl_Imain_start_ptr -Perl_Imainstack_ptr -Perl_Imarkstack_max_ptr -Perl_Imarkstack_ptr -Perl_Imarkstack_ptr_ptr -Perl_Imax_intro_pending_ptr -Perl_Imaxo_ptr -Perl_Imaxscream_ptr -Perl_Imaxsysfd_ptr -Perl_Imess_sv_ptr -Perl_Imin_intro_pending_ptr -Perl_Iminus_E_ptr -Perl_Iminus_F_ptr -Perl_Iminus_a_ptr -Perl_Iminus_c_ptr -Perl_Iminus_l_ptr -Perl_Iminus_n_ptr -Perl_Iminus_p_ptr -Perl_Imodglobal_ptr -Perl_Imy_cxt_list_ptr -Perl_Imy_cxt_size_ptr -Perl_Ina_ptr -Perl_Inice_chunk_ptr -Perl_Inice_chunk_size_ptr -Perl_Inomemok_ptr -Perl_Inumeric_local_ptr -Perl_Inumeric_name_ptr -Perl_Inumeric_radix_sv_ptr -Perl_Inumeric_standard_ptr -Perl_Iofsgv_ptr -Perl_Ioldname_ptr -Perl_Iop_mask_ptr -Perl_Iop_ptr -Perl_Iopfreehook_ptr -Perl_Iorigalen_ptr -Perl_Iorigargc_ptr -Perl_Iorigargv_ptr -Perl_Iorigenviron_ptr -Perl_Iorigfilename_ptr -Perl_Iors_sv_ptr -Perl_Iosname_ptr -Perl_Ipad_reset_pending_ptr -Perl_Ipadix_floor_ptr -Perl_Ipadix_ptr -Perl_Iparser_ptr -Perl_Ipatchlevel_ptr -Perl_Ipeepp_ptr -Perl_Iperl_destruct_level_ptr -Perl_Iperldb_ptr -Perl_Iperlio_ptr -Perl_Ipreambleav_ptr -Perl_Iprofiledata_ptr -Perl_Ipsig_name_ptr -Perl_Ipsig_pend_ptr -Perl_Ipsig_ptr_ptr -Perl_Iptr_table_ptr -Perl_Ireentrant_retint_ptr -Perl_Ireg_state_ptr -Perl_Iregdummy_ptr -Perl_Iregex_pad_ptr -Perl_Iregex_padav_ptr -Perl_Ireginterp_cnt_ptr -Perl_Iregistered_mros_ptr -Perl_Iregmatch_slab_ptr -Perl_Iregmatch_state_ptr -Perl_Irehash_seed_ptr -Perl_Irehash_seed_set_ptr -Perl_Ireplgv_ptr -Perl_Irestartop_ptr -Perl_Irs_ptr -Perl_Irunops_ptr -Perl_Isavebegin_ptr -Perl_Isavestack_ix_ptr -Perl_Isavestack_max_ptr -Perl_Isavestack_ptr -Perl_Isawampersand_ptr -Perl_Iscopestack_ix_ptr -Perl_Iscopestack_max_ptr -Perl_Iscopestack_name_ptr -Perl_Iscopestack_ptr -Perl_Iscreamfirst_ptr -Perl_Iscreamnext_ptr -Perl_Isecondgv_ptr -Perl_Isharehook_ptr -Perl_Isig_pending_ptr -Perl_Isighandlerp_ptr -Perl_Isignals_ptr -Perl_Isort_RealCmp_ptr -Perl_Isortcop_ptr -Perl_Isortstash_ptr -Perl_Isplitstr_ptr -Perl_Isrand_called_ptr -Perl_Istack_base_ptr -Perl_Istack_max_ptr -Perl_Istack_sp_ptr -Perl_Istart_env_ptr -Perl_Istashcache_ptr -Perl_Istatbuf_ptr -Perl_Istatcache_ptr -Perl_Istatgv_ptr -Perl_Istatname_ptr -Perl_Istatusvalue_posix_ptr -Perl_Istatusvalue_ptr -Perl_Istderrgv_ptr -Perl_Istdingv_ptr -Perl_Istrtab_ptr -Perl_Isub_generation_ptr -Perl_Isubline_ptr -Perl_Isubname_ptr -Perl_Isv_arenaroot_ptr -Perl_Isv_count_ptr -Perl_Isv_no_ptr -Perl_Isv_objcount_ptr -Perl_Isv_root_ptr -Perl_Isv_undef_ptr -Perl_Isv_yes_ptr -Perl_Isys_intern_ptr -Perl_Itaint_warn_ptr -Perl_Itainted_ptr -Perl_Itainting_ptr -Perl_Ithreadhook_ptr -Perl_Itmps_floor_ptr -Perl_Itmps_ix_ptr -Perl_Itmps_max_ptr -Perl_Itmps_stack_ptr -Perl_Itop_env_ptr -Perl_Itoptarget_ptr -Perl_Iuid_ptr -Perl_Iunicode_ptr -Perl_Iunitcheckav_ptr -Perl_Iunitcheckav_save_ptr -Perl_Iunlockhook_ptr -Perl_Iunsafe_ptr -Perl_Iutf8_X_LVT_ptr -Perl_Iutf8_X_LV_LVT_V_ptr -Perl_Iutf8_X_LV_ptr -Perl_Iutf8_X_L_ptr -Perl_Iutf8_X_T_ptr -Perl_Iutf8_X_V_ptr -Perl_Iutf8_X_begin_ptr -Perl_Iutf8_X_extend_ptr -Perl_Iutf8_X_non_hangul_ptr -Perl_Iutf8_X_prepend_ptr -Perl_Iutf8_alnum_ptr -Perl_Iutf8_alpha_ptr -Perl_Iutf8_ascii_ptr -Perl_Iutf8_cntrl_ptr -Perl_Iutf8_digit_ptr -Perl_Iutf8_graph_ptr -Perl_Iutf8_idcont_ptr -Perl_Iutf8_idstart_ptr -Perl_Iutf8_lower_ptr -Perl_Iutf8_mark_ptr -Perl_Iutf8_perl_space_ptr -Perl_Iutf8_perl_word_ptr -Perl_Iutf8_posix_digit_ptr -Perl_Iutf8_print_ptr -Perl_Iutf8_punct_ptr -Perl_Iutf8_space_ptr -Perl_Iutf8_tofold_ptr -Perl_Iutf8_tolower_ptr -Perl_Iutf8_totitle_ptr -Perl_Iutf8_toupper_ptr -Perl_Iutf8_upper_ptr -Perl_Iutf8_xdigit_ptr -Perl_Iutf8cache_ptr -Perl_Iutf8locale_ptr -Perl_Iwarnhook_ptr -Perl_PerlIO_clearerr -Perl_PerlIO_close -Perl_PerlIO_context_layers -Perl_PerlIO_eof -Perl_PerlIO_error -Perl_PerlIO_fileno -Perl_PerlIO_fill -Perl_PerlIO_flush -Perl_PerlIO_get_base -Perl_PerlIO_get_bufsiz -Perl_PerlIO_get_cnt -Perl_PerlIO_get_ptr -Perl_PerlIO_read -Perl_PerlIO_seek -Perl_PerlIO_set_cnt -Perl_PerlIO_set_ptrcnt -Perl_PerlIO_setlinebuf -Perl_PerlIO_stderr -Perl_PerlIO_stdin -Perl_PerlIO_stdout -Perl_PerlIO_tell -Perl_PerlIO_unread -Perl_PerlIO_write -Perl_Slab_Alloc -Perl_Slab_Free -Perl_amagic_call -Perl_any_dup -Perl_apply_attrs_string -Perl_atfork_lock -Perl_atfork_unlock -Perl_av_arylen_p -Perl_av_clear -Perl_av_delete -Perl_av_exists -Perl_av_extend -Perl_av_fetch -Perl_av_fill -Perl_av_iter_p -Perl_av_len -Perl_av_make -Perl_av_pop -Perl_av_push -Perl_av_reify -Perl_av_shift -Perl_av_store -Perl_av_undef -Perl_av_unshift -Perl_block_gimme -Perl_bytes_from_utf8 -Perl_bytes_to_utf8 -Perl_call_argv -Perl_call_atexit -Perl_call_list -Perl_call_method -Perl_call_pv -Perl_call_sv -Perl_calloc -Perl_cast_i32 -Perl_cast_iv -Perl_cast_ulong -Perl_cast_uv -Perl_ck_warner -Perl_ck_warner_d -Perl_ckwarn -Perl_ckwarn_d -Perl_croak -Perl_croak_nocontext -Perl_croak_xs_usage -Perl_csighandler -Perl_custom_op_desc -Perl_custom_op_name -Perl_cv_const_sv -Perl_cv_undef -Perl_cx_dump -Perl_cx_dup -Perl_cxinc -Perl_deb -Perl_deb_nocontext -Perl_delimcpy -Perl_despatch_signals -Perl_die -Perl_die_nocontext -Perl_dirp_dup -Perl_do_aexec -Perl_do_aspawn -Perl_do_binmode -Perl_do_close -Perl_do_gv_dump -Perl_do_gvgv_dump -Perl_do_hv_dump -Perl_do_join -Perl_do_magic_dump -Perl_do_op_dump -Perl_do_open -Perl_do_open9 -Perl_do_openn -Perl_do_pmop_dump -Perl_do_spawn -Perl_do_spawn_nowait -Perl_do_sprintf -Perl_do_sv_dump -Perl_doing_taint -Perl_doref -Perl_dounwind -Perl_dowantarray -Perl_dump_all -Perl_dump_eval -Perl_dump_form -Perl_dump_indent -Perl_dump_packsubs -Perl_dump_sub -Perl_dump_vindent -Perl_emulate_cop_io -Perl_eval_pv -Perl_eval_sv -Perl_fbm_compile -Perl_fbm_instr -Perl_fetch_cop_label -Perl_filter_add -Perl_filter_del -Perl_filter_read -Perl_find_runcv -Perl_find_rundefsvoffset -Perl_form -Perl_form_nocontext -Perl_fp_dup -Perl_fprintf_nocontext -Perl_free_tmps -Perl_get_av -Perl_get_context -Perl_get_cv -Perl_get_cvn_flags -Perl_get_hv -Perl_get_op_descs -Perl_get_op_names -Perl_get_ppaddr -Perl_get_re_arg -Perl_get_sv -Perl_get_vtbl -Perl_getcwd_sv -Perl_gp_dup -Perl_gp_free -Perl_gp_ref -Perl_grok_bin -Perl_grok_hex -Perl_grok_number -Perl_grok_numeric_radix -Perl_grok_oct -Perl_gv_AVadd -Perl_gv_HVadd -Perl_gv_IOadd -Perl_gv_SVadd -Perl_gv_add_by_type -Perl_gv_autoload4 -Perl_gv_check -Perl_gv_const_sv -Perl_gv_dump -Perl_gv_efullname -Perl_gv_efullname3 -Perl_gv_efullname4 -Perl_gv_fetchfile -Perl_gv_fetchfile_flags -Perl_gv_fetchmeth -Perl_gv_fetchmeth_autoload -Perl_gv_fetchmethod -Perl_gv_fetchmethod_autoload -Perl_gv_fetchmethod_flags -Perl_gv_fetchpv -Perl_gv_fetchpvn_flags -Perl_gv_fetchsv -Perl_gv_fullname -Perl_gv_fullname3 -Perl_gv_fullname4 -Perl_gv_handler -Perl_gv_init -Perl_gv_name_set -Perl_gv_stashpv -Perl_gv_stashpvn -Perl_gv_stashsv -Perl_gv_try_downgrade -Perl_he_dup -Perl_hek_dup -Perl_hv_clear -Perl_hv_clear_placeholders -Perl_hv_common -Perl_hv_common_key_len -Perl_hv_delayfree_ent -Perl_hv_delete -Perl_hv_delete_ent -Perl_hv_eiter_p -Perl_hv_eiter_set -Perl_hv_exists -Perl_hv_exists_ent -Perl_hv_fetch -Perl_hv_fetch_ent -Perl_hv_free_ent -Perl_hv_iterinit -Perl_hv_iterkey -Perl_hv_iterkeysv -Perl_hv_iternext -Perl_hv_iternext_flags -Perl_hv_iternextsv -Perl_hv_iterval -Perl_hv_ksplit -Perl_hv_magic -Perl_hv_name_set -Perl_hv_placeholders_get -Perl_hv_placeholders_p -Perl_hv_placeholders_set -Perl_hv_riter_p -Perl_hv_riter_set -Perl_hv_scalar -Perl_hv_store -Perl_hv_store_ent -Perl_hv_store_flags -Perl_hv_undef -Perl_ibcmp -Perl_ibcmp_locale -Perl_ibcmp_utf8 -Perl_init_i18nl10n -Perl_init_i18nl14n -Perl_init_os_extras -Perl_init_stacks -Perl_init_tm -Perl_instr -Perl_is_ascii_string -Perl_is_lvalue_sub -Perl_is_uni_alnum -Perl_is_uni_alnum_lc -Perl_is_uni_alpha -Perl_is_uni_alpha_lc -Perl_is_uni_ascii -Perl_is_uni_ascii_lc -Perl_is_uni_cntrl -Perl_is_uni_cntrl_lc -Perl_is_uni_digit -Perl_is_uni_digit_lc -Perl_is_uni_graph -Perl_is_uni_graph_lc -Perl_is_uni_idfirst -Perl_is_uni_idfirst_lc -Perl_is_uni_lower -Perl_is_uni_lower_lc -Perl_is_uni_print -Perl_is_uni_print_lc -Perl_is_uni_punct -Perl_is_uni_punct_lc -Perl_is_uni_space -Perl_is_uni_space_lc -Perl_is_uni_upper -Perl_is_uni_upper_lc -Perl_is_uni_xdigit -Perl_is_uni_xdigit_lc -Perl_is_utf8_X_L -Perl_is_utf8_X_LV -Perl_is_utf8_X_LVT -Perl_is_utf8_X_LV_LVT_V -Perl_is_utf8_X_T -Perl_is_utf8_X_V -Perl_is_utf8_X_begin -Perl_is_utf8_X_extend -Perl_is_utf8_X_non_hangul -Perl_is_utf8_X_prepend -Perl_is_utf8_alnum -Perl_is_utf8_alpha -Perl_is_utf8_ascii -Perl_is_utf8_char -Perl_is_utf8_cntrl -Perl_is_utf8_digit -Perl_is_utf8_graph -Perl_is_utf8_idcont -Perl_is_utf8_idfirst -Perl_is_utf8_lower -Perl_is_utf8_mark -Perl_is_utf8_perl_space -Perl_is_utf8_perl_word -Perl_is_utf8_posix_digit -Perl_is_utf8_print -Perl_is_utf8_punct -Perl_is_utf8_space -Perl_is_utf8_string -Perl_is_utf8_string_loc -Perl_is_utf8_string_loclen -Perl_is_utf8_upper -Perl_is_utf8_xdigit -Perl_leave_scope -Perl_lex_bufutf8 -Perl_lex_discard_to -Perl_lex_end -Perl_lex_grow_linestr -Perl_lex_next_chunk -Perl_lex_peek_unichar -Perl_lex_read_space -Perl_lex_read_to -Perl_lex_read_unichar -Perl_lex_stuff_pvn -Perl_lex_stuff_sv -Perl_lex_unstuff -Perl_load_module -Perl_load_module_nocontext -Perl_looks_like_number -Perl_magic_dump -Perl_malloc -Perl_markstack_grow -Perl_mess -Perl_mess_nocontext -Perl_mfree -Perl_mg_clear -Perl_mg_copy -Perl_mg_dup -Perl_mg_find -Perl_mg_free -Perl_mg_get -Perl_mg_length -Perl_mg_magical -Perl_mg_set -Perl_mg_size -Perl_mini_mktime -Perl_mod -Perl_moreswitches -Perl_mro_get_from_name -Perl_mro_get_linear_isa -Perl_mro_get_private_data -Perl_mro_meta_init -Perl_mro_method_changed_in -Perl_mro_register -Perl_mro_set_mro -Perl_mro_set_private_data -Perl_my_atof -Perl_my_atof2 -Perl_my_cxt_init -Perl_my_dirfd -Perl_my_exit -Perl_my_failure_exit -Perl_my_fflush_all -Perl_my_fork -Perl_my_lstat -Perl_my_popen_list -Perl_my_setenv -Perl_my_snprintf -Perl_my_socketpair -Perl_my_stat -Perl_my_strftime -Perl_my_strlcat -Perl_my_strlcpy -Perl_my_vsnprintf -Perl_newANONATTRSUB -Perl_newANONHASH -Perl_newANONLIST -Perl_newANONSUB -Perl_newASSIGNOP -Perl_newATTRSUB -Perl_newAV -Perl_newAVREF -Perl_newBINOP -Perl_newCONDOP -Perl_newCONSTSUB -Perl_newCVREF -Perl_newFORM -Perl_newFOROP -Perl_newGIVENOP -Perl_newGVOP -Perl_newGVREF -Perl_newGVgen -Perl_newHV -Perl_newHVREF -Perl_newHVhv -Perl_newIO -Perl_newLISTOP -Perl_newLOGOP -Perl_newLOOPEX -Perl_newLOOPOP -Perl_newMYSUB -Perl_newNULLLIST -Perl_newOP -Perl_newPADOP -Perl_newPMOP -Perl_newPROG -Perl_newPVOP -Perl_newRANGE -Perl_newRV -Perl_newRV_noinc -Perl_newSLICEOP -Perl_newSTATEOP -Perl_newSUB -Perl_newSV -Perl_newSVOP -Perl_newSVREF -Perl_newSV_type -Perl_newSVhek -Perl_newSViv -Perl_newSVnv -Perl_newSVpv -Perl_newSVpvf -Perl_newSVpvf_nocontext -Perl_newSVpvn -Perl_newSVpvn_flags -Perl_newSVpvn_share -Perl_newSVrv -Perl_newSVsv -Perl_newSVuv -Perl_newUNOP -Perl_newWHENOP -Perl_newWHILEOP -Perl_newXS -Perl_newXS_flags -Perl_new_collate -Perl_new_ctype -Perl_new_numeric -Perl_new_stackinfo -Perl_new_version -Perl_new_warnings_bitfield -Perl_ninstr -Perl_nothreadhook -Perl_op_clear -Perl_op_dump -Perl_op_free -Perl_op_null -Perl_op_refcnt_lock -Perl_op_refcnt_unlock -Perl_pack_cat -Perl_packlist -Perl_pad_findmy -Perl_pad_push -Perl_parser_dup -Perl_pmflag -Perl_pmop_dump -Perl_pop_scope -Perl_pregcomp -Perl_pregexec -Perl_pregfree -Perl_pregfree2 -Perl_prescan_version -Perl_printf_nocontext -Perl_ptr_table_clear -Perl_ptr_table_fetch -Perl_ptr_table_free -Perl_ptr_table_new -Perl_ptr_table_split -Perl_ptr_table_store -Perl_push_scope -Perl_pv_display -Perl_pv_escape -Perl_pv_pretty -Perl_pv_uni_display -Perl_qerror -Perl_re_compile -Perl_re_dup_guts -Perl_re_intuit_start -Perl_re_intuit_string -Perl_realloc -Perl_reentrant_free -Perl_reentrant_init -Perl_reentrant_retry -Perl_reentrant_size -Perl_ref -Perl_refcounted_he_chain_2hv -Perl_refcounted_he_fetch -Perl_refcounted_he_new -Perl_reg_named_buff -Perl_reg_named_buff_all -Perl_reg_named_buff_exists -Perl_reg_named_buff_fetch -Perl_reg_named_buff_firstkey -Perl_reg_named_buff_iter -Perl_reg_named_buff_nextkey -Perl_reg_named_buff_scalar -Perl_reg_numbered_buff_fetch -Perl_reg_numbered_buff_length -Perl_reg_numbered_buff_store -Perl_reg_qr_package -Perl_reg_temp_copy -Perl_regclass_swash -Perl_regcurly -Perl_regdump -Perl_regdupe_internal -Perl_regexec_flags -Perl_regfree_internal -Perl_reginitcolors -Perl_regnext -Perl_repeatcpy -Perl_report_uninit -Perl_require_pv -Perl_rninstr -Perl_rsignal -Perl_rsignal_state -Perl_runops_debug -Perl_runops_standard -Perl_rvpv_dup -Perl_safesyscalloc -Perl_safesysfree -Perl_safesysmalloc -Perl_safesysrealloc -Perl_save_I16 -Perl_save_I32 -Perl_save_I8 -Perl_save_adelete -Perl_save_aelem_flags -Perl_save_alloc -Perl_save_aptr -Perl_save_ary -Perl_save_bool -Perl_save_clearsv -Perl_save_delete -Perl_save_destructor -Perl_save_destructor_x -Perl_save_freeop -Perl_save_freepv -Perl_save_freesv -Perl_save_generic_pvref -Perl_save_generic_svref -Perl_save_gp -Perl_save_hash -Perl_save_hdelete -Perl_save_helem_flags -Perl_save_hptr -Perl_save_int -Perl_save_item -Perl_save_iv -Perl_save_list -Perl_save_long -Perl_save_mortalizesv -Perl_save_nogv -Perl_save_op -Perl_save_padsv_and_mortalize -Perl_save_pptr -Perl_save_pushptr -Perl_save_re_context -Perl_save_scalar -Perl_save_set_svflags -Perl_save_shared_pvref -Perl_save_sptr -Perl_save_svref -Perl_save_vptr -Perl_savepv -Perl_savepvn -Perl_savesharedpv -Perl_savesharedpvn -Perl_savestack_grow -Perl_savestack_grow_cnt -Perl_savesvpv -Perl_scan_bin -Perl_scan_hex -Perl_scan_num -Perl_scan_oct -Perl_scan_version -Perl_scan_vstring -Perl_screaminstr -Perl_seed -Perl_set_context -Perl_set_numeric_local -Perl_set_numeric_radix -Perl_set_numeric_standard -Perl_setdefout -Perl_share_hek -Perl_si_dup -Perl_signbit -Perl_sortsv -Perl_sortsv_flags -Perl_ss_dup -Perl_stack_grow -Perl_start_subparse -Perl_stashpv_hvname_match -Perl_str_to_version -Perl_sv_2bool -Perl_sv_2cv -Perl_sv_2io -Perl_sv_2iv -Perl_sv_2iv_flags -Perl_sv_2mortal -Perl_sv_2nv -Perl_sv_2pv -Perl_sv_2pv_flags -Perl_sv_2pv_nolen -Perl_sv_2pvbyte -Perl_sv_2pvbyte_nolen -Perl_sv_2pvutf8 -Perl_sv_2pvutf8_nolen -Perl_sv_2uv -Perl_sv_2uv_flags -Perl_sv_backoff -Perl_sv_bless -Perl_sv_cat_decode -Perl_sv_catpv -Perl_sv_catpv_mg -Perl_sv_catpvf -Perl_sv_catpvf_mg -Perl_sv_catpvf_mg_nocontext -Perl_sv_catpvf_nocontext -Perl_sv_catpvn -Perl_sv_catpvn_flags -Perl_sv_catpvn_mg -Perl_sv_catsv -Perl_sv_catsv_flags -Perl_sv_catsv_mg -Perl_sv_chop -Perl_sv_clear -Perl_sv_cmp -Perl_sv_cmp_locale -Perl_sv_collxfrm -Perl_sv_compile_2op -Perl_sv_copypv -Perl_sv_dec -Perl_sv_derived_from -Perl_sv_destroyable -Perl_sv_does -Perl_sv_dump -Perl_sv_dup -Perl_sv_eq -Perl_sv_force_normal -Perl_sv_force_normal_flags -Perl_sv_free -Perl_sv_free2 -Perl_sv_gets -Perl_sv_grow -Perl_sv_inc -Perl_sv_insert -Perl_sv_insert_flags -Perl_sv_isa -Perl_sv_isobject -Perl_sv_iv -Perl_sv_len -Perl_sv_len_utf8 -Perl_sv_magic -Perl_sv_magicext -Perl_sv_mortalcopy -Perl_sv_newmortal -Perl_sv_newref -Perl_sv_nolocking -Perl_sv_nosharing -Perl_sv_nounlocking -Perl_sv_nv -Perl_sv_peek -Perl_sv_pos_b2u -Perl_sv_pos_u2b -Perl_sv_pos_u2b_flags -Perl_sv_pv -Perl_sv_pvbyte -Perl_sv_pvbyten -Perl_sv_pvbyten_force -Perl_sv_pvn -Perl_sv_pvn_force -Perl_sv_pvn_force_flags -Perl_sv_pvn_nomg -Perl_sv_pvutf8 -Perl_sv_pvutf8n -Perl_sv_pvutf8n_force -Perl_sv_recode_to_utf8 -Perl_sv_reftype -Perl_sv_replace -Perl_sv_report_used -Perl_sv_reset -Perl_sv_rvweaken -Perl_sv_setiv -Perl_sv_setiv_mg -Perl_sv_setnv -Perl_sv_setnv_mg -Perl_sv_setpv -Perl_sv_setpv_mg -Perl_sv_setpvf -Perl_sv_setpvf_mg -Perl_sv_setpvf_mg_nocontext -Perl_sv_setpvf_nocontext -Perl_sv_setpviv -Perl_sv_setpviv_mg -Perl_sv_setpvn -Perl_sv_setpvn_mg -Perl_sv_setref_iv -Perl_sv_setref_nv -Perl_sv_setref_pv -Perl_sv_setref_pvn -Perl_sv_setref_uv -Perl_sv_setsv -Perl_sv_setsv_flags -Perl_sv_setsv_mg -Perl_sv_setuv -Perl_sv_setuv_mg -Perl_sv_taint -Perl_sv_tainted -Perl_sv_true -Perl_sv_uni_display -Perl_sv_unmagic -Perl_sv_unref -Perl_sv_unref_flags -Perl_sv_untaint -Perl_sv_upgrade -Perl_sv_usepvn -Perl_sv_usepvn_flags -Perl_sv_usepvn_mg -Perl_sv_utf8_decode -Perl_sv_utf8_downgrade -Perl_sv_utf8_encode -Perl_sv_utf8_upgrade -Perl_sv_utf8_upgrade_flags_grow -Perl_sv_uv -Perl_sv_vcatpvf -Perl_sv_vcatpvf_mg -Perl_sv_vcatpvfn -Perl_sv_vsetpvf -Perl_sv_vsetpvf_mg -Perl_sv_vsetpvfn -Perl_swash_fetch -Perl_swash_init -Perl_sys_init -Perl_sys_init3 -Perl_sys_intern_clear -Perl_sys_intern_dup -Perl_sys_intern_init -Perl_sys_term -Perl_taint_env -Perl_taint_proper -Perl_tmps_grow -Perl_to_uni_fold -Perl_to_uni_lower -Perl_to_uni_lower_lc -Perl_to_uni_title -Perl_to_uni_title_lc -Perl_to_uni_upper -Perl_to_uni_upper_lc -Perl_to_utf8_case -Perl_to_utf8_fold -Perl_to_utf8_lower -Perl_to_utf8_title -Perl_to_utf8_upper -Perl_unpack_str -Perl_unpackstring -Perl_unsharepvn -Perl_upg_version -Perl_utf16_to_utf8 -Perl_utf16_to_utf8_reversed -Perl_utf8_distance -Perl_utf8_hop -Perl_utf8_length -Perl_utf8_to_bytes -Perl_utf8_to_uvchr -Perl_utf8_to_uvuni -Perl_utf8n_to_uvchr -Perl_utf8n_to_uvuni -Perl_uvchr_to_utf8 -Perl_uvchr_to_utf8_flags -Perl_uvuni_to_utf8 -Perl_uvuni_to_utf8_flags -Perl_vcmp -Perl_vcroak -Perl_vdeb -Perl_vform -Perl_vivify_defelem -Perl_vload_module -Perl_vmess -Perl_vnewSVpvf -Perl_vnormal -Perl_vnumify -Perl_vstringify -Perl_vverify -Perl_vwarn -Perl_vwarner -Perl_warn -Perl_warn_nocontext -Perl_warner -Perl_warner_nocontext -Perl_whichsig -Perl_win32_init -Perl_win32_term -Perl_yylex -RunPerl -boot_DynaLoader -boot_Win32CORE -init_Win32CORE -perl_alloc -perl_alloc_override -perl_alloc_using -perl_clone -perl_clone_host -perl_clone_using -perl_construct -perl_destruct -perl_free -perl_get_host_info -perl_parse -perl_run -perlsio_binmode -setgid -setuid -win32_abort -win32_accept -win32_access -win32_alarm -win32_ansipath -win32_async_check -win32_bind -win32_calloc -win32_chdir -win32_chmod -win32_chsize -win32_clearenv -win32_clearerr -win32_close -win32_closedir -win32_closesocket -win32_connect -win32_crypt -win32_dup -win32_dup2 -win32_dynaload -win32_endhostent -win32_endnetent -win32_endprotoent -win32_endservent -win32_environ -win32_eof -win32_errno -win32_execv -win32_execvp -win32_fclose -win32_fcloseall -win32_fdopen -win32_feof -win32_ferror -win32_fflush -win32_fgetc -win32_fgetpos -win32_fgets -win32_fileno -win32_flock -win32_flushall -win32_fopen -win32_fprintf -win32_fputc -win32_fputs -win32_fread -win32_free -win32_free_childdir -win32_free_childenv -win32_freopen -win32_fseek -win32_fsetpos -win32_fstat -win32_ftell -win32_fwrite -win32_get_childdir -win32_get_childenv -win32_get_osfhandle -win32_getc -win32_getchar -win32_getenv -win32_gethostbyaddr -win32_gethostbyname -win32_gethostname -win32_getnetbyaddr -win32_getnetbyname -win32_getnetent -win32_getpeername -win32_getpid -win32_getprotobyname -win32_getprotobynumber -win32_getprotoent -win32_gets -win32_getservbyname -win32_getservbyport -win32_getservent -win32_getsockname -win32_getsockopt -win32_gettimeofday -win32_htonl -win32_htons -win32_inet_addr -win32_inet_ntoa -win32_ioctl -win32_ioctlsocket -win32_isatty -win32_kill -win32_link -win32_listen -win32_longpath -win32_lseek -win32_malloc -win32_mkdir -win32_ntohl -win32_ntohs -win32_open -win32_open_osfhandle -win32_opendir -win32_os_id -win32_pclose -win32_perror -win32_pipe -win32_popen -win32_printf -win32_putc -win32_putchar -win32_putenv -win32_puts -win32_read -win32_readdir -win32_realloc -win32_recv -win32_recvfrom -win32_rename -win32_rewind -win32_rewinddir -win32_rmdir -win32_seekdir -win32_select -win32_send -win32_sendto -win32_setbuf -win32_sethostent -win32_setmode -win32_setnetent -win32_setprotoent -win32_setservent -win32_setsockopt -win32_setvbuf -win32_shutdown -win32_sleep -win32_socket -win32_spawnvp -win32_stat -win32_stderr -win32_stdin -win32_stdout -win32_str_os_error -win32_strerror -win32_tell -win32_telldir -win32_times -win32_tmpfile -win32_uname -win32_ungetc -win32_unlink -win32_utime -win32_vfprintf -win32_vprintf -win32_wait -win32_waitpid -win32_write diff --git a/plugins/perl/importlib/sbperl-x64.bat b/plugins/perl/importlib/sbperl-x64.bat deleted file mode 100644 index a27ab442..00000000 --- a/plugins/perl/importlib/sbperl-x64.bat +++ /dev/null @@ -1,10 +0,0 @@ -@echo off -set PATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 -cd c:\mozilla-build\perl-5.12-x64\perl\lib\CORE -echo.Overwrite existing def file? -pause -dumpbin /exports ..\..\bin\perl512.dll > perl512.def -echo.Please adjust the resulting file manually, then hit return! -pause -lib /machine:x64 /def:perl512.def -pause diff --git a/plugins/perl/importlib/sbperl-x86.bat b/plugins/perl/importlib/sbperl-x86.bat deleted file mode 100644 index e0b1a3dd..00000000 --- a/plugins/perl/importlib/sbperl-x86.bat +++ /dev/null @@ -1,10 +0,0 @@ -@echo off -set PATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE -cd c:\mozilla-build\perl-5.12-x86\perl\lib\CORE -echo.Overwrite existing def file? -pause -dumpbin /exports ..\..\bin\perl512.dll > perl512.def -echo.Please adjust the resulting file manually, then hit return! -pause -lib /machine:x86 /def:perl512.def -pause diff --git a/plugins/perl/makefile-512.mak b/plugins/perl/makefile-512.mak index 15f78a23..a77dc145 100644 --- a/plugins/perl/makefile-512.mak +++ b/plugins/perl/makefile-512.mak @@ -12,15 +12,22 @@ perl.def: echo xchat_plugin_get_info >> perl.def perl.obj: perl.c - $(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL512PATH) /I.. /DPERL_DLL=\"$(PERL512LIB).dll\" + $(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL512PATH)\perl\lib\CORE /I.. /DPERL_DLL=\"$(PERL512LIB).dll\" + +$(PERL512LIB).lib: perl512.def +!ifdef X64 + lib /machine:x64 /def:perl512.def +!else + lib /machine:x86 /def:perl512.def +!endif perl.c: xchat.pm.h xchat.pm.h: lib/Xchat.pm lib/IRC.pm perl.exe generate_header -$(TARGET): perl.obj perl.def - $(LINK) /DLL /out:$(TARGET) perl.obj $(LDFLAGS) $(PERL512LIB).lib /libpath:$(PERL512PATH) /delayload:$(PERL512LIB).dll $(DIRENTLIB) delayimp.lib user32.lib shell32.lib advapi32.lib /def:perl.def +$(TARGET): perl.obj perl.def $(PERL512LIB).lib + $(LINK) /DLL /out:$(TARGET) perl.obj $(LDFLAGS) $(PERL512LIB).lib /delayload:$(PERL512LIB).dll $(DIRENTLIB) delayimp.lib user32.lib shell32.lib advapi32.lib /def:perl.def clean: @del $(TARGET) diff --git a/plugins/perl/makefile-514.mak b/plugins/perl/makefile-514.mak index 8c689979..4d8181dd 100644 --- a/plugins/perl/makefile-514.mak +++ b/plugins/perl/makefile-514.mak @@ -12,7 +12,7 @@ perl.def: echo xchat_plugin_get_info >> perl.def perl.obj: perl.c - $(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL514PATH) /I.. /DPERL_DLL=\"$(PERL514LIB).dll\" + $(CC) $(CFLAGS) perl.c $(GLIB) /I$(PERL514PATH)\lib\CORE /I.. /DPERL_DLL=\"$(PERL514LIB).dll\" perl.c: xchat.pm.h diff --git a/plugins/perl/perl512.def b/plugins/perl/perl512.def new file mode 100644 index 00000000..5cfcaa68 --- /dev/null +++ b/plugins/perl/perl512.def @@ -0,0 +1,1420 @@ +LIBRARY perl512 +EXPORTS +PL_bincompat_options +PL_check +PL_fold +PL_fold_locale +PL_freq +PL_keyword_plugin +PL_memory_wrap +PL_no_aelem +PL_no_dir_func +PL_no_func +PL_no_helem_sv +PL_no_localize_ref +PL_no_mem +PL_no_modify +PL_no_myglob +PL_no_security +PL_no_sock_func +PL_no_symref +PL_no_usym +PL_no_wrongref +PL_op_desc +PL_op_name +PL_opargs +PL_perlio_mutex +PL_ppaddr +PL_reg_extflags_name +PL_reg_name +PL_regkind +PL_sig_name +PL_sig_num +PL_simple +PL_utf8skip +PL_uuemap +PL_varies +PL_vtbl_amagic +PL_vtbl_amagicelem +PL_vtbl_arylen +PL_vtbl_backref +PL_vtbl_bm +PL_vtbl_collxfrm +PL_vtbl_dbline +PL_vtbl_defelem +PL_vtbl_env +PL_vtbl_envelem +PL_vtbl_fm +PL_vtbl_isa +PL_vtbl_isaelem +PL_vtbl_mglob +PL_vtbl_nkeys +PL_vtbl_pack +PL_vtbl_packelem +PL_vtbl_pos +PL_vtbl_regdata +PL_vtbl_regdatum +PL_vtbl_regexp +PL_vtbl_sig +PL_vtbl_sigelem +PL_vtbl_substr +PL_vtbl_sv +PL_vtbl_taint +PL_vtbl_utf8 +PL_vtbl_uvar +PL_vtbl_vec +PL_warn_nl +PL_warn_nosemi +PL_warn_reserved +PL_warn_uninit +PerlIOBase_binmode +PerlIOBase_clearerr +PerlIOBase_close +PerlIOBase_dup +PerlIOBase_eof +PerlIOBase_error +PerlIOBase_fileno +PerlIOBase_noop_fail +PerlIOBase_noop_ok +PerlIOBase_popped +PerlIOBase_pushed +PerlIOBase_read +PerlIOBase_setlinebuf +PerlIOBase_unread +PerlIOBuf_bufsiz +PerlIOBuf_close +PerlIOBuf_dup +PerlIOBuf_fill +PerlIOBuf_flush +PerlIOBuf_get_base +PerlIOBuf_get_cnt +PerlIOBuf_get_ptr +PerlIOBuf_open +PerlIOBuf_popped +PerlIOBuf_pushed +PerlIOBuf_read +PerlIOBuf_seek +PerlIOBuf_set_ptrcnt +PerlIOBuf_tell +PerlIOBuf_unread +PerlIOBuf_write +PerlIO_allocate +PerlIO_apply_layera +PerlIO_apply_layers +PerlIO_arg_fetch +PerlIO_binmode +PerlIO_canset_cnt +PerlIO_debug +PerlIO_define_layer +PerlIO_exportFILE +PerlIO_fast_gets +PerlIO_fdopen +PerlIO_findFILE +PerlIO_find_layer +PerlIO_getc +PerlIO_getname +PerlIO_getpos +PerlIO_has_base +PerlIO_has_cntptr +PerlIO_importFILE +PerlIO_init +PerlIO_isutf8 +PerlIO_layer_fetch +PerlIO_list_alloc +PerlIO_list_free +PerlIO_modestr +PerlIO_open +PerlIO_parse_layers +PerlIO_pending +PerlIO_perlio +PerlIO_pop +PerlIO_printf +PerlIO_push +PerlIO_putc +PerlIO_puts +PerlIO_releaseFILE +PerlIO_reopen +PerlIO_rewind +PerlIO_setpos +PerlIO_sprintf +PerlIO_stdoutf +PerlIO_sv_dup +PerlIO_teardown +PerlIO_tmpfile +PerlIO_ungetc +PerlIO_vprintf +PerlIO_vsprintf +Perl_GNo_ptr +Perl_GYes_ptr +Perl_Gcheck_ptr +Perl_Gcsighandlerp_ptr +Perl_Gcurinterp_ptr +Perl_Gdo_undump_ptr +Perl_Gdollarzero_mutex_ptr +Perl_Gfold_locale_ptr +Perl_Ghexdigit_ptr +Perl_Ghints_mutex_ptr +Perl_Ginterp_size_5_10_0_ptr +Perl_Ginterp_size_ptr +Perl_Gkeyword_plugin_ptr +Perl_Gmy_ctx_mutex_ptr +Perl_Gmy_cxt_index_ptr +Perl_Gop_mutex_ptr +Perl_Gop_seq_ptr +Perl_Gop_sequence_ptr +Perl_Gpatleave_ptr +Perl_Gperlio_debug_fd_ptr +Perl_Gperlio_fd_refcnt_ptr +Perl_Gperlio_fd_refcnt_size_ptr +Perl_Gperlio_mutex_ptr +Perl_Gppaddr_ptr +Perl_Grevision_ptr +Perl_Grunops_dbg_ptr +Perl_Grunops_std_ptr +Perl_Gsh_path_ptr +Perl_Gsig_trapped_ptr +Perl_Gsigfpe_saved_ptr +Perl_Gsubversion_ptr +Perl_Gsv_placeholder_ptr +Perl_Gthr_key_ptr +Perl_Guse_safe_putenv_ptr +Perl_Gv_AMupdate +Perl_Gversion_ptr +Perl_Gveto_cleanup_ptr +Perl_IArgv_ptr +Perl_ICmd_ptr +Perl_IDBgv_ptr +Perl_IDBline_ptr +Perl_IDBsignal_ptr +Perl_IDBsingle_ptr +Perl_IDBsub_ptr +Perl_IDBtrace_ptr +Perl_IDir_ptr +Perl_IEnv_ptr +Perl_ILIO_ptr +Perl_IMemParse_ptr +Perl_IMemShared_ptr +Perl_IMem_ptr +Perl_IOpPtr_ptr +Perl_IOpSlab_ptr +Perl_IOpSpace_ptr +Perl_IProc_ptr +Perl_ISock_ptr +Perl_IStdIO_ptr +Perl_ISv_ptr +Perl_IXpv_ptr +Perl_Iamagic_generation_ptr +Perl_Ian_ptr +Perl_Iargvgv_ptr +Perl_Iargvout_stack_ptr +Perl_Iargvoutgv_ptr +Perl_Ibasetime_ptr +Perl_Ibeginav_ptr +Perl_Ibeginav_save_ptr +Perl_Ibody_arenas_ptr +Perl_Ibody_roots_ptr +Perl_Ibodytarget_ptr +Perl_Ibreakable_sub_gen_ptr +Perl_Icheckav_ptr +Perl_Icheckav_save_ptr +Perl_Ichopset_ptr +Perl_Iclocktick_ptr +Perl_Icollation_ix_ptr +Perl_Icollation_name_ptr +Perl_Icollation_standard_ptr +Perl_Icollxfrm_base_ptr +Perl_Icollxfrm_mult_ptr +Perl_Icolors_ptr +Perl_Icolorset_ptr +Perl_Icompcv_ptr +Perl_Icompiling_ptr +Perl_Icomppad_name_fill_ptr +Perl_Icomppad_name_floor_ptr +Perl_Icomppad_name_ptr +Perl_Icomppad_ptr +Perl_Icop_seqmax_ptr +Perl_Icurcop_ptr +Perl_Icurcopdb_ptr +Perl_Icurpad_ptr +Perl_Icurpm_ptr +Perl_Icurstack_ptr +Perl_Icurstackinfo_ptr +Perl_Icurstash_ptr +Perl_Icurstname_ptr +Perl_Icustom_op_descs_ptr +Perl_Icustom_op_names_ptr +Perl_Icv_has_eval_ptr +Perl_Idbargs_ptr +Perl_Idebstash_ptr +Perl_Idebug_pad_ptr +Perl_Idebug_ptr +Perl_Idef_layerlist_ptr +Perl_Idefgv_ptr +Perl_Idefoutgv_ptr +Perl_Idefstash_ptr +Perl_Idelaymagic_ptr +Perl_Idestroyhook_ptr +Perl_Idiehook_ptr +Perl_Idirty_ptr +Perl_Idoextract_ptr +Perl_Idoswitches_ptr +Perl_Idowarn_ptr +Perl_Idumpindent_ptr +Perl_Ie_script_ptr +Perl_Iefloatbuf_ptr +Perl_Iefloatsize_ptr +Perl_Iegid_ptr +Perl_Iencoding_ptr +Perl_Iendav_ptr +Perl_Ienvgv_ptr +Perl_Ierrgv_ptr +Perl_Ierrors_ptr +Perl_Ieuid_ptr +Perl_Ieval_root_ptr +Perl_Ieval_start_ptr +Perl_Ievalseq_ptr +Perl_Iexit_flags_ptr +Perl_Iexitlist_ptr +Perl_Iexitlistlen_ptr +Perl_Ifdpid_ptr +Perl_Ifilemode_ptr +Perl_Ifirstgv_ptr +Perl_Iforkprocess_ptr +Perl_Iformfeed_ptr +Perl_Iformtarget_ptr +Perl_Igensym_ptr +Perl_Igid_ptr +Perl_Iglob_index_ptr +Perl_Iglobalstash_ptr +Perl_Ihash_seed_ptr +Perl_Ihintgv_ptr +Perl_Ihints_ptr +Perl_Ihv_fetch_ent_mh_ptr +Perl_Iin_clean_all_ptr +Perl_Iin_clean_objs_ptr +Perl_Iin_eval_ptr +Perl_Iin_load_module_ptr +Perl_Iincgv_ptr +Perl_Iinitav_ptr +Perl_Iinplace_ptr +Perl_Iisarev_ptr +Perl_Iknown_layers_ptr +Perl_Ilast_in_gv_ptr +Perl_Ilast_swash_hv_ptr +Perl_Ilast_swash_key_ptr +Perl_Ilast_swash_klen_ptr +Perl_Ilast_swash_slen_ptr +Perl_Ilast_swash_tmps_ptr +Perl_Ilastfd_ptr +Perl_Ilastscream_ptr +Perl_Ilaststatval_ptr +Perl_Ilaststype_ptr +Perl_Ilocalizing_ptr +Perl_Ilocalpatches_ptr +Perl_Ilockhook_ptr +Perl_Imain_cv_ptr +Perl_Imain_root_ptr +Perl_Imain_start_ptr +Perl_Imainstack_ptr +Perl_Imarkstack_max_ptr +Perl_Imarkstack_ptr +Perl_Imarkstack_ptr_ptr +Perl_Imax_intro_pending_ptr +Perl_Imaxo_ptr +Perl_Imaxscream_ptr +Perl_Imaxsysfd_ptr +Perl_Imess_sv_ptr +Perl_Imin_intro_pending_ptr +Perl_Iminus_E_ptr +Perl_Iminus_F_ptr +Perl_Iminus_a_ptr +Perl_Iminus_c_ptr +Perl_Iminus_l_ptr +Perl_Iminus_n_ptr +Perl_Iminus_p_ptr +Perl_Imodglobal_ptr +Perl_Imy_cxt_list_ptr +Perl_Imy_cxt_size_ptr +Perl_Ina_ptr +Perl_Inice_chunk_ptr +Perl_Inice_chunk_size_ptr +Perl_Inomemok_ptr +Perl_Inumeric_local_ptr +Perl_Inumeric_name_ptr +Perl_Inumeric_radix_sv_ptr +Perl_Inumeric_standard_ptr +Perl_Iofsgv_ptr +Perl_Ioldname_ptr +Perl_Iop_mask_ptr +Perl_Iop_ptr +Perl_Iopfreehook_ptr +Perl_Iorigalen_ptr +Perl_Iorigargc_ptr +Perl_Iorigargv_ptr +Perl_Iorigenviron_ptr +Perl_Iorigfilename_ptr +Perl_Iors_sv_ptr +Perl_Iosname_ptr +Perl_Ipad_reset_pending_ptr +Perl_Ipadix_floor_ptr +Perl_Ipadix_ptr +Perl_Iparser_ptr +Perl_Ipatchlevel_ptr +Perl_Ipeepp_ptr +Perl_Iperl_destruct_level_ptr +Perl_Iperldb_ptr +Perl_Iperlio_ptr +Perl_Ipreambleav_ptr +Perl_Iprofiledata_ptr +Perl_Ipsig_name_ptr +Perl_Ipsig_pend_ptr +Perl_Ipsig_ptr_ptr +Perl_Iptr_table_ptr +Perl_Ireentrant_retint_ptr +Perl_Ireg_state_ptr +Perl_Iregdummy_ptr +Perl_Iregex_pad_ptr +Perl_Iregex_padav_ptr +Perl_Ireginterp_cnt_ptr +Perl_Iregistered_mros_ptr +Perl_Iregmatch_slab_ptr +Perl_Iregmatch_state_ptr +Perl_Irehash_seed_ptr +Perl_Irehash_seed_set_ptr +Perl_Ireplgv_ptr +Perl_Irestartop_ptr +Perl_Irs_ptr +Perl_Irunops_ptr +Perl_Isavebegin_ptr +Perl_Isavestack_ix_ptr +Perl_Isavestack_max_ptr +Perl_Isavestack_ptr +Perl_Isawampersand_ptr +Perl_Iscopestack_ix_ptr +Perl_Iscopestack_max_ptr +Perl_Iscopestack_name_ptr +Perl_Iscopestack_ptr +Perl_Iscreamfirst_ptr +Perl_Iscreamnext_ptr +Perl_Isecondgv_ptr +Perl_Isharehook_ptr +Perl_Isig_pending_ptr +Perl_Isighandlerp_ptr +Perl_Isignals_ptr +Perl_Isort_RealCmp_ptr +Perl_Isortcop_ptr +Perl_Isortstash_ptr +Perl_Isplitstr_ptr +Perl_Isrand_called_ptr +Perl_Istack_base_ptr +Perl_Istack_max_ptr +Perl_Istack_sp_ptr +Perl_Istart_env_ptr +Perl_Istashcache_ptr +Perl_Istatbuf_ptr +Perl_Istatcache_ptr +Perl_Istatgv_ptr +Perl_Istatname_ptr +Perl_Istatusvalue_posix_ptr +Perl_Istatusvalue_ptr +Perl_Istderrgv_ptr +Perl_Istdingv_ptr +Perl_Istrtab_ptr +Perl_Isub_generation_ptr +Perl_Isubline_ptr +Perl_Isubname_ptr +Perl_Isv_arenaroot_ptr +Perl_Isv_count_ptr +Perl_Isv_no_ptr +Perl_Isv_objcount_ptr +Perl_Isv_root_ptr +Perl_Isv_undef_ptr +Perl_Isv_yes_ptr +Perl_Isys_intern_ptr +Perl_Itaint_warn_ptr +Perl_Itainted_ptr +Perl_Itainting_ptr +Perl_Ithreadhook_ptr +Perl_Itmps_floor_ptr +Perl_Itmps_ix_ptr +Perl_Itmps_max_ptr +Perl_Itmps_stack_ptr +Perl_Itop_env_ptr +Perl_Itoptarget_ptr +Perl_Iuid_ptr +Perl_Iunicode_ptr +Perl_Iunitcheckav_ptr +Perl_Iunitcheckav_save_ptr +Perl_Iunlockhook_ptr +Perl_Iunsafe_ptr +Perl_Iutf8_X_LVT_ptr +Perl_Iutf8_X_LV_LVT_V_ptr +Perl_Iutf8_X_LV_ptr +Perl_Iutf8_X_L_ptr +Perl_Iutf8_X_T_ptr +Perl_Iutf8_X_V_ptr +Perl_Iutf8_X_begin_ptr +Perl_Iutf8_X_extend_ptr +Perl_Iutf8_X_non_hangul_ptr +Perl_Iutf8_X_prepend_ptr +Perl_Iutf8_alnum_ptr +Perl_Iutf8_alpha_ptr +Perl_Iutf8_ascii_ptr +Perl_Iutf8_cntrl_ptr +Perl_Iutf8_digit_ptr +Perl_Iutf8_graph_ptr +Perl_Iutf8_idcont_ptr +Perl_Iutf8_idstart_ptr +Perl_Iutf8_lower_ptr +Perl_Iutf8_mark_ptr +Perl_Iutf8_perl_space_ptr +Perl_Iutf8_perl_word_ptr +Perl_Iutf8_posix_digit_ptr +Perl_Iutf8_print_ptr +Perl_Iutf8_punct_ptr +Perl_Iutf8_space_ptr +Perl_Iutf8_tofold_ptr +Perl_Iutf8_tolower_ptr +Perl_Iutf8_totitle_ptr +Perl_Iutf8_toupper_ptr +Perl_Iutf8_upper_ptr +Perl_Iutf8_xdigit_ptr +Perl_Iutf8cache_ptr +Perl_Iutf8locale_ptr +Perl_Iwarnhook_ptr +Perl_PerlIO_clearerr +Perl_PerlIO_close +Perl_PerlIO_context_layers +Perl_PerlIO_eof +Perl_PerlIO_error +Perl_PerlIO_fileno +Perl_PerlIO_fill +Perl_PerlIO_flush +Perl_PerlIO_get_base +Perl_PerlIO_get_bufsiz +Perl_PerlIO_get_cnt +Perl_PerlIO_get_ptr +Perl_PerlIO_read +Perl_PerlIO_seek +Perl_PerlIO_set_cnt +Perl_PerlIO_set_ptrcnt +Perl_PerlIO_setlinebuf +Perl_PerlIO_stderr +Perl_PerlIO_stdin +Perl_PerlIO_stdout +Perl_PerlIO_tell +Perl_PerlIO_unread +Perl_PerlIO_write +Perl_Slab_Alloc +Perl_Slab_Free +Perl_amagic_call +Perl_any_dup +Perl_apply_attrs_string +Perl_atfork_lock +Perl_atfork_unlock +Perl_av_arylen_p +Perl_av_clear +Perl_av_delete +Perl_av_exists +Perl_av_extend +Perl_av_fetch +Perl_av_fill +Perl_av_iter_p +Perl_av_len +Perl_av_make +Perl_av_pop +Perl_av_push +Perl_av_reify +Perl_av_shift +Perl_av_store +Perl_av_undef +Perl_av_unshift +Perl_block_gimme +Perl_bytes_from_utf8 +Perl_bytes_to_utf8 +Perl_call_argv +Perl_call_atexit +Perl_call_list +Perl_call_method +Perl_call_pv +Perl_call_sv +Perl_calloc +Perl_cast_i32 +Perl_cast_iv +Perl_cast_ulong +Perl_cast_uv +Perl_ck_warner +Perl_ck_warner_d +Perl_ckwarn +Perl_ckwarn_d +Perl_croak +Perl_croak_nocontext +Perl_croak_xs_usage +Perl_csighandler +Perl_custom_op_desc +Perl_custom_op_name +Perl_cv_const_sv +Perl_cv_undef +Perl_cx_dump +Perl_cx_dup +Perl_cxinc +Perl_deb +Perl_deb_nocontext +Perl_delimcpy +Perl_despatch_signals +Perl_die +Perl_die_nocontext +Perl_dirp_dup +Perl_do_aexec +Perl_do_aspawn +Perl_do_binmode +Perl_do_close +Perl_do_gv_dump +Perl_do_gvgv_dump +Perl_do_hv_dump +Perl_do_join +Perl_do_magic_dump +Perl_do_op_dump +Perl_do_open +Perl_do_open9 +Perl_do_openn +Perl_do_pmop_dump +Perl_do_spawn +Perl_do_spawn_nowait +Perl_do_sprintf +Perl_do_sv_dump +Perl_doing_taint +Perl_doref +Perl_dounwind +Perl_dowantarray +Perl_dump_all +Perl_dump_eval +Perl_dump_form +Perl_dump_indent +Perl_dump_packsubs +Perl_dump_sub +Perl_dump_vindent +Perl_emulate_cop_io +Perl_eval_pv +Perl_eval_sv +Perl_fbm_compile +Perl_fbm_instr +Perl_fetch_cop_label +Perl_filter_add +Perl_filter_del +Perl_filter_read +Perl_find_runcv +Perl_find_rundefsvoffset +Perl_form +Perl_form_nocontext +Perl_fp_dup +Perl_fprintf_nocontext +Perl_free_tmps +Perl_get_av +Perl_get_context +Perl_get_cv +Perl_get_cvn_flags +Perl_get_hv +Perl_get_op_descs +Perl_get_op_names +Perl_get_ppaddr +Perl_get_re_arg +Perl_get_sv +Perl_get_vtbl +Perl_getcwd_sv +Perl_gp_dup +Perl_gp_free +Perl_gp_ref +Perl_grok_bin +Perl_grok_hex +Perl_grok_number +Perl_grok_numeric_radix +Perl_grok_oct +Perl_gv_AVadd +Perl_gv_HVadd +Perl_gv_IOadd +Perl_gv_SVadd +Perl_gv_add_by_type +Perl_gv_autoload4 +Perl_gv_check +Perl_gv_const_sv +Perl_gv_dump +Perl_gv_efullname +Perl_gv_efullname3 +Perl_gv_efullname4 +Perl_gv_fetchfile +Perl_gv_fetchfile_flags +Perl_gv_fetchmeth +Perl_gv_fetchmeth_autoload +Perl_gv_fetchmethod +Perl_gv_fetchmethod_autoload +Perl_gv_fetchmethod_flags +Perl_gv_fetchpv +Perl_gv_fetchpvn_flags +Perl_gv_fetchsv +Perl_gv_fullname +Perl_gv_fullname3 +Perl_gv_fullname4 +Perl_gv_handler +Perl_gv_init +Perl_gv_name_set +Perl_gv_stashpv +Perl_gv_stashpvn +Perl_gv_stashsv +Perl_gv_try_downgrade +Perl_he_dup +Perl_hek_dup +Perl_hv_clear +Perl_hv_clear_placeholders +Perl_hv_common +Perl_hv_common_key_len +Perl_hv_delayfree_ent +Perl_hv_delete +Perl_hv_delete_ent +Perl_hv_eiter_p +Perl_hv_eiter_set +Perl_hv_exists +Perl_hv_exists_ent +Perl_hv_fetch +Perl_hv_fetch_ent +Perl_hv_free_ent +Perl_hv_iterinit +Perl_hv_iterkey +Perl_hv_iterkeysv +Perl_hv_iternext +Perl_hv_iternext_flags +Perl_hv_iternextsv +Perl_hv_iterval +Perl_hv_ksplit +Perl_hv_magic +Perl_hv_name_set +Perl_hv_placeholders_get +Perl_hv_placeholders_p +Perl_hv_placeholders_set +Perl_hv_riter_p +Perl_hv_riter_set +Perl_hv_scalar +Perl_hv_store +Perl_hv_store_ent +Perl_hv_store_flags +Perl_hv_undef +Perl_ibcmp +Perl_ibcmp_locale +Perl_ibcmp_utf8 +Perl_init_i18nl10n +Perl_init_i18nl14n +Perl_init_os_extras +Perl_init_stacks +Perl_init_tm +Perl_instr +Perl_is_ascii_string +Perl_is_lvalue_sub +Perl_is_uni_alnum +Perl_is_uni_alnum_lc +Perl_is_uni_alpha +Perl_is_uni_alpha_lc +Perl_is_uni_ascii +Perl_is_uni_ascii_lc +Perl_is_uni_cntrl +Perl_is_uni_cntrl_lc +Perl_is_uni_digit +Perl_is_uni_digit_lc +Perl_is_uni_graph +Perl_is_uni_graph_lc +Perl_is_uni_idfirst +Perl_is_uni_idfirst_lc +Perl_is_uni_lower +Perl_is_uni_lower_lc +Perl_is_uni_print +Perl_is_uni_print_lc +Perl_is_uni_punct +Perl_is_uni_punct_lc +Perl_is_uni_space +Perl_is_uni_space_lc +Perl_is_uni_upper +Perl_is_uni_upper_lc +Perl_is_uni_xdigit +Perl_is_uni_xdigit_lc +Perl_is_utf8_X_L +Perl_is_utf8_X_LV +Perl_is_utf8_X_LVT +Perl_is_utf8_X_LV_LVT_V +Perl_is_utf8_X_T +Perl_is_utf8_X_V +Perl_is_utf8_X_begin +Perl_is_utf8_X_extend +Perl_is_utf8_X_non_hangul +Perl_is_utf8_X_prepend +Perl_is_utf8_alnum +Perl_is_utf8_alpha +Perl_is_utf8_ascii +Perl_is_utf8_char +Perl_is_utf8_cntrl +Perl_is_utf8_digit +Perl_is_utf8_graph +Perl_is_utf8_idcont +Perl_is_utf8_idfirst +Perl_is_utf8_lower +Perl_is_utf8_mark +Perl_is_utf8_perl_space +Perl_is_utf8_perl_word +Perl_is_utf8_posix_digit +Perl_is_utf8_print +Perl_is_utf8_punct +Perl_is_utf8_space +Perl_is_utf8_string +Perl_is_utf8_string_loc +Perl_is_utf8_string_loclen +Perl_is_utf8_upper +Perl_is_utf8_xdigit +Perl_leave_scope +Perl_lex_bufutf8 +Perl_lex_discard_to +Perl_lex_end +Perl_lex_grow_linestr +Perl_lex_next_chunk +Perl_lex_peek_unichar +Perl_lex_read_space +Perl_lex_read_to +Perl_lex_read_unichar +Perl_lex_stuff_pvn +Perl_lex_stuff_sv +Perl_lex_unstuff +Perl_load_module +Perl_load_module_nocontext +Perl_looks_like_number +Perl_magic_dump +Perl_malloc +Perl_markstack_grow +Perl_mess +Perl_mess_nocontext +Perl_mfree +Perl_mg_clear +Perl_mg_copy +Perl_mg_dup +Perl_mg_find +Perl_mg_free +Perl_mg_get +Perl_mg_length +Perl_mg_magical +Perl_mg_set +Perl_mg_size +Perl_mini_mktime +Perl_mod +Perl_moreswitches +Perl_mro_get_from_name +Perl_mro_get_linear_isa +Perl_mro_get_private_data +Perl_mro_meta_init +Perl_mro_method_changed_in +Perl_mro_register +Perl_mro_set_mro +Perl_mro_set_private_data +Perl_my_atof +Perl_my_atof2 +Perl_my_cxt_init +Perl_my_dirfd +Perl_my_exit +Perl_my_failure_exit +Perl_my_fflush_all +Perl_my_fork +Perl_my_lstat +Perl_my_popen_list +Perl_my_setenv +Perl_my_snprintf +Perl_my_socketpair +Perl_my_stat +Perl_my_strftime +Perl_my_strlcat +Perl_my_strlcpy +Perl_my_vsnprintf +Perl_newANONATTRSUB +Perl_newANONHASH +Perl_newANONLIST +Perl_newANONSUB +Perl_newASSIGNOP +Perl_newATTRSUB +Perl_newAV +Perl_newAVREF +Perl_newBINOP +Perl_newCONDOP +Perl_newCONSTSUB +Perl_newCVREF +Perl_newFORM +Perl_newFOROP +Perl_newGIVENOP +Perl_newGVOP +Perl_newGVREF +Perl_newGVgen +Perl_newHV +Perl_newHVREF +Perl_newHVhv +Perl_newIO +Perl_newLISTOP +Perl_newLOGOP +Perl_newLOOPEX +Perl_newLOOPOP +Perl_newMYSUB +Perl_newNULLLIST +Perl_newOP +Perl_newPADOP +Perl_newPMOP +Perl_newPROG +Perl_newPVOP +Perl_newRANGE +Perl_newRV +Perl_newRV_noinc +Perl_newSLICEOP +Perl_newSTATEOP +Perl_newSUB +Perl_newSV +Perl_newSVOP +Perl_newSVREF +Perl_newSV_type +Perl_newSVhek +Perl_newSViv +Perl_newSVnv +Perl_newSVpv +Perl_newSVpvf +Perl_newSVpvf_nocontext +Perl_newSVpvn +Perl_newSVpvn_flags +Perl_newSVpvn_share +Perl_newSVrv +Perl_newSVsv +Perl_newSVuv +Perl_newUNOP +Perl_newWHENOP +Perl_newWHILEOP +Perl_newXS +Perl_newXS_flags +Perl_new_collate +Perl_new_ctype +Perl_new_numeric +Perl_new_stackinfo +Perl_new_version +Perl_new_warnings_bitfield +Perl_ninstr +Perl_nothreadhook +Perl_op_clear +Perl_op_dump +Perl_op_free +Perl_op_null +Perl_op_refcnt_lock +Perl_op_refcnt_unlock +Perl_pack_cat +Perl_packlist +Perl_pad_findmy +Perl_pad_push +Perl_parser_dup +Perl_pmflag +Perl_pmop_dump +Perl_pop_scope +Perl_pregcomp +Perl_pregexec +Perl_pregfree +Perl_pregfree2 +Perl_prescan_version +Perl_printf_nocontext +Perl_ptr_table_clear +Perl_ptr_table_fetch +Perl_ptr_table_free +Perl_ptr_table_new +Perl_ptr_table_split +Perl_ptr_table_store +Perl_push_scope +Perl_pv_display +Perl_pv_escape +Perl_pv_pretty +Perl_pv_uni_display +Perl_qerror +Perl_re_compile +Perl_re_dup_guts +Perl_re_intuit_start +Perl_re_intuit_string +Perl_realloc +Perl_reentrant_free +Perl_reentrant_init +Perl_reentrant_retry +Perl_reentrant_size +Perl_ref +Perl_refcounted_he_chain_2hv +Perl_refcounted_he_fetch +Perl_refcounted_he_new +Perl_reg_named_buff +Perl_reg_named_buff_all +Perl_reg_named_buff_exists +Perl_reg_named_buff_fetch +Perl_reg_named_buff_firstkey +Perl_reg_named_buff_iter +Perl_reg_named_buff_nextkey +Perl_reg_named_buff_scalar +Perl_reg_numbered_buff_fetch +Perl_reg_numbered_buff_length +Perl_reg_numbered_buff_store +Perl_reg_qr_package +Perl_reg_temp_copy +Perl_regclass_swash +Perl_regcurly +Perl_regdump +Perl_regdupe_internal +Perl_regexec_flags +Perl_regfree_internal +Perl_reginitcolors +Perl_regnext +Perl_repeatcpy +Perl_report_uninit +Perl_require_pv +Perl_rninstr +Perl_rsignal +Perl_rsignal_state +Perl_runops_debug +Perl_runops_standard +Perl_rvpv_dup +Perl_safesyscalloc +Perl_safesysfree +Perl_safesysmalloc +Perl_safesysrealloc +Perl_save_I16 +Perl_save_I32 +Perl_save_I8 +Perl_save_adelete +Perl_save_aelem_flags +Perl_save_alloc +Perl_save_aptr +Perl_save_ary +Perl_save_bool +Perl_save_clearsv +Perl_save_delete +Perl_save_destructor +Perl_save_destructor_x +Perl_save_freeop +Perl_save_freepv +Perl_save_freesv +Perl_save_generic_pvref +Perl_save_generic_svref +Perl_save_gp +Perl_save_hash +Perl_save_hdelete +Perl_save_helem_flags +Perl_save_hptr +Perl_save_int +Perl_save_item +Perl_save_iv +Perl_save_list +Perl_save_long +Perl_save_mortalizesv +Perl_save_nogv +Perl_save_op +Perl_save_padsv_and_mortalize +Perl_save_pptr +Perl_save_pushptr +Perl_save_re_context +Perl_save_scalar +Perl_save_set_svflags +Perl_save_shared_pvref +Perl_save_sptr +Perl_save_svref +Perl_save_vptr +Perl_savepv +Perl_savepvn +Perl_savesharedpv +Perl_savesharedpvn +Perl_savestack_grow +Perl_savestack_grow_cnt +Perl_savesvpv +Perl_scan_bin +Perl_scan_hex +Perl_scan_num +Perl_scan_oct +Perl_scan_version +Perl_scan_vstring +Perl_screaminstr +Perl_seed +Perl_set_context +Perl_set_numeric_local +Perl_set_numeric_radix +Perl_set_numeric_standard +Perl_setdefout +Perl_share_hek +Perl_si_dup +Perl_signbit +Perl_sortsv +Perl_sortsv_flags +Perl_ss_dup +Perl_stack_grow +Perl_start_subparse +Perl_stashpv_hvname_match +Perl_str_to_version +Perl_sv_2bool +Perl_sv_2cv +Perl_sv_2io +Perl_sv_2iv +Perl_sv_2iv_flags +Perl_sv_2mortal +Perl_sv_2nv +Perl_sv_2pv +Perl_sv_2pv_flags +Perl_sv_2pv_nolen +Perl_sv_2pvbyte +Perl_sv_2pvbyte_nolen +Perl_sv_2pvutf8 +Perl_sv_2pvutf8_nolen +Perl_sv_2uv +Perl_sv_2uv_flags +Perl_sv_backoff +Perl_sv_bless +Perl_sv_cat_decode +Perl_sv_catpv +Perl_sv_catpv_mg +Perl_sv_catpvf +Perl_sv_catpvf_mg +Perl_sv_catpvf_mg_nocontext +Perl_sv_catpvf_nocontext +Perl_sv_catpvn +Perl_sv_catpvn_flags +Perl_sv_catpvn_mg +Perl_sv_catsv +Perl_sv_catsv_flags +Perl_sv_catsv_mg +Perl_sv_chop +Perl_sv_clear +Perl_sv_cmp +Perl_sv_cmp_locale +Perl_sv_collxfrm +Perl_sv_compile_2op +Perl_sv_copypv +Perl_sv_dec +Perl_sv_derived_from +Perl_sv_destroyable +Perl_sv_does +Perl_sv_dump +Perl_sv_dup +Perl_sv_eq +Perl_sv_force_normal +Perl_sv_force_normal_flags +Perl_sv_free +Perl_sv_free2 +Perl_sv_gets +Perl_sv_grow +Perl_sv_inc +Perl_sv_insert +Perl_sv_insert_flags +Perl_sv_isa +Perl_sv_isobject +Perl_sv_iv +Perl_sv_len +Perl_sv_len_utf8 +Perl_sv_magic +Perl_sv_magicext +Perl_sv_mortalcopy +Perl_sv_newmortal +Perl_sv_newref +Perl_sv_nolocking +Perl_sv_nosharing +Perl_sv_nounlocking +Perl_sv_nv +Perl_sv_peek +Perl_sv_pos_b2u +Perl_sv_pos_u2b +Perl_sv_pos_u2b_flags +Perl_sv_pv +Perl_sv_pvbyte +Perl_sv_pvbyten +Perl_sv_pvbyten_force +Perl_sv_pvn +Perl_sv_pvn_force +Perl_sv_pvn_force_flags +Perl_sv_pvn_nomg +Perl_sv_pvutf8 +Perl_sv_pvutf8n +Perl_sv_pvutf8n_force +Perl_sv_recode_to_utf8 +Perl_sv_reftype +Perl_sv_replace +Perl_sv_report_used +Perl_sv_reset +Perl_sv_rvweaken +Perl_sv_setiv +Perl_sv_setiv_mg +Perl_sv_setnv +Perl_sv_setnv_mg +Perl_sv_setpv +Perl_sv_setpv_mg +Perl_sv_setpvf +Perl_sv_setpvf_mg +Perl_sv_setpvf_mg_nocontext +Perl_sv_setpvf_nocontext +Perl_sv_setpviv +Perl_sv_setpviv_mg +Perl_sv_setpvn +Perl_sv_setpvn_mg +Perl_sv_setref_iv +Perl_sv_setref_nv +Perl_sv_setref_pv +Perl_sv_setref_pvn +Perl_sv_setref_uv +Perl_sv_setsv +Perl_sv_setsv_flags +Perl_sv_setsv_mg +Perl_sv_setuv +Perl_sv_setuv_mg +Perl_sv_taint +Perl_sv_tainted +Perl_sv_true +Perl_sv_uni_display +Perl_sv_unmagic +Perl_sv_unref +Perl_sv_unref_flags +Perl_sv_untaint +Perl_sv_upgrade +Perl_sv_usepvn +Perl_sv_usepvn_flags +Perl_sv_usepvn_mg +Perl_sv_utf8_decode +Perl_sv_utf8_downgrade +Perl_sv_utf8_encode +Perl_sv_utf8_upgrade +Perl_sv_utf8_upgrade_flags_grow +Perl_sv_uv +Perl_sv_vcatpvf +Perl_sv_vcatpvf_mg +Perl_sv_vcatpvfn +Perl_sv_vsetpvf +Perl_sv_vsetpvf_mg +Perl_sv_vsetpvfn +Perl_swash_fetch +Perl_swash_init +Perl_sys_init +Perl_sys_init3 +Perl_sys_intern_clear +Perl_sys_intern_dup +Perl_sys_intern_init +Perl_sys_term +Perl_taint_env +Perl_taint_proper +Perl_tmps_grow +Perl_to_uni_fold +Perl_to_uni_lower +Perl_to_uni_lower_lc +Perl_to_uni_title +Perl_to_uni_title_lc +Perl_to_uni_upper +Perl_to_uni_upper_lc +Perl_to_utf8_case +Perl_to_utf8_fold +Perl_to_utf8_lower +Perl_to_utf8_title +Perl_to_utf8_upper +Perl_unpack_str +Perl_unpackstring +Perl_unsharepvn +Perl_upg_version +Perl_utf16_to_utf8 +Perl_utf16_to_utf8_reversed +Perl_utf8_distance +Perl_utf8_hop +Perl_utf8_length +Perl_utf8_to_bytes +Perl_utf8_to_uvchr +Perl_utf8_to_uvuni +Perl_utf8n_to_uvchr +Perl_utf8n_to_uvuni +Perl_uvchr_to_utf8 +Perl_uvchr_to_utf8_flags +Perl_uvuni_to_utf8 +Perl_uvuni_to_utf8_flags +Perl_vcmp +Perl_vcroak +Perl_vdeb +Perl_vform +Perl_vivify_defelem +Perl_vload_module +Perl_vmess +Perl_vnewSVpvf +Perl_vnormal +Perl_vnumify +Perl_vstringify +Perl_vverify +Perl_vwarn +Perl_vwarner +Perl_warn +Perl_warn_nocontext +Perl_warner +Perl_warner_nocontext +Perl_whichsig +Perl_win32_init +Perl_win32_term +Perl_yylex +RunPerl +boot_DynaLoader +boot_Win32CORE +init_Win32CORE +perl_alloc +perl_alloc_override +perl_alloc_using +perl_clone +perl_clone_host +perl_clone_using +perl_construct +perl_destruct +perl_free +perl_get_host_info +perl_parse +perl_run +perlsio_binmode +setgid +setuid +win32_abort +win32_accept +win32_access +win32_alarm +win32_ansipath +win32_async_check +win32_bind +win32_calloc +win32_chdir +win32_chmod +win32_chsize +win32_clearenv +win32_clearerr +win32_close +win32_closedir +win32_closesocket +win32_connect +win32_crypt +win32_dup +win32_dup2 +win32_dynaload +win32_endhostent +win32_endnetent +win32_endprotoent +win32_endservent +win32_environ +win32_eof +win32_errno +win32_execv +win32_execvp +win32_fclose +win32_fcloseall +win32_fdopen +win32_feof +win32_ferror +win32_fflush +win32_fgetc +win32_fgetpos +win32_fgets +win32_fileno +win32_flock +win32_flushall +win32_fopen +win32_fprintf +win32_fputc +win32_fputs +win32_fread +win32_free +win32_free_childdir +win32_free_childenv +win32_freopen +win32_fseek +win32_fsetpos +win32_fstat +win32_ftell +win32_fwrite +win32_get_childdir +win32_get_childenv +win32_get_osfhandle +win32_getc +win32_getchar +win32_getenv +win32_gethostbyaddr +win32_gethostbyname +win32_gethostname +win32_getnetbyaddr +win32_getnetbyname +win32_getnetent +win32_getpeername +win32_getpid +win32_getprotobyname +win32_getprotobynumber +win32_getprotoent +win32_gets +win32_getservbyname +win32_getservbyport +win32_getservent +win32_getsockname +win32_getsockopt +win32_gettimeofday +win32_htonl +win32_htons +win32_inet_addr +win32_inet_ntoa +win32_ioctl +win32_ioctlsocket +win32_isatty +win32_kill +win32_link +win32_listen +win32_longpath +win32_lseek +win32_malloc +win32_mkdir +win32_ntohl +win32_ntohs +win32_open +win32_open_osfhandle +win32_opendir +win32_os_id +win32_pclose +win32_perror +win32_pipe +win32_popen +win32_printf +win32_putc +win32_putchar +win32_putenv +win32_puts +win32_read +win32_readdir +win32_realloc +win32_recv +win32_recvfrom +win32_rename +win32_rewind +win32_rewinddir +win32_rmdir +win32_seekdir +win32_select +win32_send +win32_sendto +win32_setbuf +win32_sethostent +win32_setmode +win32_setnetent +win32_setprotoent +win32_setservent +win32_setsockopt +win32_setvbuf +win32_shutdown +win32_sleep +win32_socket +win32_spawnvp +win32_stat +win32_stderr +win32_stdin +win32_stdout +win32_str_os_error +win32_strerror +win32_tell +win32_telldir +win32_times +win32_tmpfile +win32_uname +win32_ungetc +win32_unlink +win32_utime +win32_vfprintf +win32_vprintf +win32_wait +win32_waitpid +win32_write diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index 5c6beb6f..1d6d23cc 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -30,8 +30,8 @@ CFLAGS = $(CFLAGS) /favor:AMD64 /D_WIN64 CPPFLAGS = $(CPPFLAGS) /favor:AMD64 /D_WIN64 LDFLAGS = $(LDFLAGS) msvcrt_win2003.obj -PERL512PATH = c:\mozilla-build\perl-5.12-x64\perl\lib\CORE -PERL514PATH = c:\mozilla-build\perl-5.14-x64\lib\CORE +PERL512PATH = c:\mozilla-build\perl-5.12-x64 +PERL514PATH = c:\mozilla-build\perl-5.14-x64 PYTHONPATH = c:\mozilla-build\python-2.7-x64 TCLPATH = c:\mozilla-build\tcl-8.5-x64 !else -- cgit 1.4.1 From b1665136f88074fba731ac898308162f4b81c5db Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Thu, 28 Jul 2011 00:10:14 +0200 Subject: forgot to update perl path for x86 --- src/makeinc.skel.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index 1d6d23cc..ad737b38 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -37,8 +37,8 @@ TCLPATH = c:\mozilla-build\tcl-8.5-x64 !else LDFLAGS = $(LDFLAGS) msvcrt_winxp.obj -PERL512PATH = c:\mozilla-build\perl-5.12-x86\perl\lib\CORE -PERL514PATH = c:\mozilla-build\perl-5.14-x86\lib\CORE +PERL512PATH = c:\mozilla-build\perl-5.12-x86 +PERL514PATH = c:\mozilla-build\perl-5.14-x86 PYTHONPATH = c:\mozilla-build\python-2.7-x86 TCLPATH = c:\mozilla-build\tcl-8.5-x86 !endif -- cgit 1.4.1 From 8877fe73b18c924d103b8eca08578dcfdfdbe7f9 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Thu, 28 Jul 2011 02:22:22 +0200 Subject: fix attach/detach keyboard shortcut broken by the autocopy patch --- src/fe-gtk/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 559211c2..da90ca7f 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1585,7 +1585,7 @@ static struct mymenu mymenu[] = { #endif {0, 0, 0, M_SEP, 0, 0, 0}, /* 11 */ #define DETACH_OFFSET (12) - {0, menu_detach, GTK_STOCK_REDO, M_MENUSTOCK, 0, 0, 1, GDK_I}, /* 12 */ + {0, menu_detach, GTK_STOCK_REDO, M_MENUSTOCK, 0, 0, 1, GDK_i}, /* 12 */ #define CLOSE_OFFSET (13) {0, menu_close, GTK_STOCK_CLOSE, M_MENUSTOCK, 0, 0, 1, GDK_w}, {0, 0, 0, M_SEP, 0, 0, 0}, -- cgit 1.4.1 From 08ce6280df217b0a9673c2b91b5400bea45387c9 Mon Sep 17 00:00:00 2001 From: "viktor@asus" Date: Sun, 7 Aug 2011 07:12:10 +0200 Subject: fix another mysterious ifdef which breaks gtkspell usage on windows --- src/fe-gtk/fkeys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index a09c8608..7330854a 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -314,7 +314,7 @@ key_handle_key_press (GtkWidget *wid, GdkEventKey *evt, session *sess) key_action_tab_clean (); break; -#if defined(USE_GTKSPELL) && !defined(WIN32) +#if defined(USE_GTKSPELL)/* && !defined(WIN32) /* gtktextview has no 'activate' event, so we trap ENTER here */ case GDK_Return: case GDK_KP_Enter: -- cgit 1.4.1 From 08e5778b19abcde484056e0cac76c237c2180142 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Sun, 7 Aug 2011 13:41:43 +0200 Subject: spell checker support for multiple languages --- build/share/xml/iso-codes/iso_3166.xml | 1703 +++++++++++++++++++++++++ build/share/xml/iso-codes/iso_639.xml | 2169 ++++++++++++++++++++++++++++++++ config.h | 1 + dep-x64/deps-x64.txt | 1 + dep-x86/deps-x86.txt | 1 + src/fe-gtk/makefile.mak | 2 + src/fe-gtk/sexy-iso-codes.c | 301 +++++ src/fe-gtk/sexy-iso-codes.h | 37 + src/fe-gtk/sexy-marshal.c | 129 ++ src/fe-gtk/sexy-marshal.h | 28 + src/fe-gtk/sexy-spell-entry.c | 27 +- src/makeinc.skel.mak | 2 +- 12 files changed, 4379 insertions(+), 22 deletions(-) create mode 100644 build/share/xml/iso-codes/iso_3166.xml create mode 100644 build/share/xml/iso-codes/iso_639.xml create mode 100644 src/fe-gtk/sexy-iso-codes.c create mode 100644 src/fe-gtk/sexy-iso-codes.h create mode 100644 src/fe-gtk/sexy-marshal.c create mode 100644 src/fe-gtk/sexy-marshal.h (limited to 'src') diff --git a/build/share/xml/iso-codes/iso_3166.xml b/build/share/xml/iso-codes/iso_3166.xml new file mode 100644 index 00000000..77c72eb2 --- /dev/null +++ b/build/share/xml/iso-codes/iso_3166.xml @@ -0,0 +1,1703 @@ + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/share/xml/iso-codes/iso_639.xml b/build/share/xml/iso-codes/iso_639.xml new file mode 100644 index 00000000..02fa01fb --- /dev/null +++ b/build/share/xml/iso-codes/iso_639.xml @@ -0,0 +1,2169 @@ + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config.h b/config.h index fdd277d9..56689133 100644 --- a/config.h +++ b/config.h @@ -3,6 +3,7 @@ #define USE_GMODULE #define USE_PLUGIN #define USE_LIBSEXY +#define HAVE_ISO_CODES #define PACKAGE_NAME "xchat" #define PACKAGE_VERSION "1496-4" #define XCHAT_RELEASE "2.8.8" diff --git a/dep-x64/deps-x64.txt b/dep-x64/deps-x64.txt index 6461b9bd..769e7634 100644 --- a/dep-x64/deps-x64.txt +++ b/dep-x64/deps-x64.txt @@ -19,3 +19,4 @@ http://ftp.gnome.org/pub/gnome/binaries/win64/pango/1.28/pango-dev_1.28.3-1_win6 http://xchat-wdk.googlecode.com/files/Enchant-WDK%201.6.0-2%20x64.7z http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x64.7z http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0d%20x64.7z +http://xchat-wdk.googlecode.com/files/LibXML-WDK%202.7.8%20x64.7z diff --git a/dep-x86/deps-x86.txt b/dep-x86/deps-x86.txt index d0d2db0f..02fcf172 100644 --- a/dep-x86/deps-x86.txt +++ b/dep-x86/deps-x86.txt @@ -21,3 +21,4 @@ http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x86.7z http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0d%20x86.7z http://xchat-wdk.googlecode.com/files/myspell-20101001.7z http://xchat-wdk.googlecode.com/files/gettext-tools-0.17-msgfmt.zip +http://xchat-wdk.googlecode.com/files/LibXML-WDK%202.7.8%20x86.7z diff --git a/src/fe-gtk/makefile.mak b/src/fe-gtk/makefile.mak index f210181a..27922405 100644 --- a/src/fe-gtk/makefile.mak +++ b/src/fe-gtk/makefile.mak @@ -25,6 +25,8 @@ rawlog.obj \ search.obj \ servlistgui.obj \ setup.obj \ +sexy-iso-codes.obj \ +sexy-marshal.obj \ sexy-spell-entry.obj \ textgui.obj \ urlgrab.obj \ diff --git a/src/fe-gtk/sexy-iso-codes.c b/src/fe-gtk/sexy-iso-codes.c new file mode 100644 index 00000000..3477cc30 --- /dev/null +++ b/src/fe-gtk/sexy-iso-codes.c @@ -0,0 +1,301 @@ +/* + * Copyright (C) 2005 Nathan Fredrickson + * Borrowed from Galeon, renamed, and simplified to only use iso-codes with no + * fallback method. + * + * Copyright (C) 2004 Christian Persch + * Copyright (C) 2004 Crispin Flowerday + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + */ + +#include "../../config.h" + +#include "sexy-iso-codes.h" + +#include + +#include + +#include + +static GHashTable *iso_639_table = NULL; +static GHashTable *iso_3166_table = NULL; + +#define ISO_639_DOMAIN "iso_639" +#define ISO_3166_DOMAIN "iso_3166" + +#ifdef HAVE_ISO_CODES + +#define ISOCODESLOCALEDIR "/share/locale" + +static void +read_iso_639_entry (xmlTextReaderPtr reader, + GHashTable *table) +{ + xmlChar *code, *name; + + code = xmlTextReaderGetAttribute (reader, (const xmlChar *) "iso_639_1_code"); + name = xmlTextReaderGetAttribute (reader, (const xmlChar *) "name"); + + /* Get iso-639-2 code */ + if (code == NULL || code[0] == '\0') + { + xmlFree (code); + /* FIXME: use the 2T or 2B code? */ + code = xmlTextReaderGetAttribute (reader, (const xmlChar *) "iso_639_2T_code"); + } + + if (code != NULL && code[0] != '\0' && name != NULL && name[0] != '\0') + { + g_hash_table_insert (table, code, name); + } + else + { + xmlFree (code); + xmlFree (name); + } +} + +static void +read_iso_3166_entry (xmlTextReaderPtr reader, + GHashTable *table) +{ + xmlChar *code, *name; + + code = xmlTextReaderGetAttribute (reader, (const xmlChar *) "alpha_2_code"); + name = xmlTextReaderGetAttribute (reader, (const xmlChar *) "name"); + + if (code != NULL && code[0] != '\0' && name != NULL && name[0] != '\0') + { + char *lcode; + + lcode = g_ascii_strdown ((char *) code, -1); + xmlFree (code); + + g_hash_table_insert (table, lcode, name); + } + else + { + xmlFree (code); + xmlFree (name); + } + +} + +typedef enum +{ + STATE_START, + STATE_STOP, + STATE_ENTRIES, +} ParserState; + +static gboolean +load_iso_entries (int iso, + GFunc read_entry_func, + gpointer user_data) +{ + xmlTextReaderPtr reader; + ParserState state = STATE_START; + xmlChar iso_entries[32], iso_entry[32]; + char *filename; + int ret = -1; + + filename = g_strdup_printf (".\\share\\xml\\iso-codes\\iso_%d.xml", iso); + reader = xmlNewTextReaderFilename (filename); + if (reader == NULL) goto out; + + xmlStrPrintf (iso_entries, sizeof (iso_entries), + (xmlChar *)"iso_%d_entries", iso); + xmlStrPrintf (iso_entry, sizeof (iso_entry), + (xmlChar *)"iso_%d_entry", iso); + + ret = xmlTextReaderRead (reader); + + while (ret == 1) + { + const xmlChar *tag; + xmlReaderTypes type; + + tag = xmlTextReaderConstName (reader); + type = xmlTextReaderNodeType (reader); + + if (state == STATE_ENTRIES && + type == XML_READER_TYPE_ELEMENT && + xmlStrEqual (tag, iso_entry)) + { + read_entry_func (reader, user_data); + } + else if (state == STATE_START && + type == XML_READER_TYPE_ELEMENT && + xmlStrEqual (tag, iso_entries)) + { + state = STATE_ENTRIES; + } + else if (state == STATE_ENTRIES && + type == XML_READER_TYPE_END_ELEMENT && + xmlStrEqual (tag, iso_entries)) + { + state = STATE_STOP; + } + else if (type == XML_READER_TYPE_SIGNIFICANT_WHITESPACE || + type == XML_READER_TYPE_WHITESPACE || + type == XML_READER_TYPE_TEXT || + type == XML_READER_TYPE_COMMENT) + { + /* eat it */ + } + else + { + /* ignore it */ + } + + ret = xmlTextReaderRead (reader); + } + + xmlFreeTextReader (reader); + +out: + if (ret < 0 || state != STATE_STOP) + { + /* This is not critical, we will fallback to our own code */ + g_free (filename); + return FALSE; + } + + g_free (filename); + + return TRUE; +} + +#endif /* HAVE_ISO_CODES */ + + +static void +ensure_iso_codes_initialised (void) +{ + static gboolean initialised = FALSE; + + if (initialised == TRUE) + { + return; + } + initialised = TRUE; + +#if defined (ENABLE_NLS) && defined (HAVE_ISO_CODES) + bindtextdomain (ISO_639_DOMAIN, ISOCODESLOCALEDIR); + bind_textdomain_codeset (ISO_639_DOMAIN, "UTF-8"); + + bindtextdomain(ISO_3166_DOMAIN, ISOCODESLOCALEDIR); + bind_textdomain_codeset (ISO_3166_DOMAIN, "UTF-8"); +#endif + + iso_639_table = g_hash_table_new_full (g_str_hash, g_str_equal, + (GDestroyNotify) xmlFree, + (GDestroyNotify) xmlFree); + + iso_3166_table = g_hash_table_new_full (g_str_hash, g_str_equal, + (GDestroyNotify) g_free, + (GDestroyNotify) xmlFree); + +#ifdef HAVE_ISO_CODES + load_iso_entries (639, (GFunc) read_iso_639_entry, iso_639_table); + load_iso_entries (3166, (GFunc) read_iso_3166_entry, iso_3166_table); +#endif +} + + +static char * +get_iso_name_for_lang_code (const char *code) +{ + char **str; + char *name = NULL; + const char *langname, *localename; + int len; + + str = g_strsplit (code, "_", -1); + + /* count the entries */ + for (len = 0; str[len]; len++ ) /* empty */; + + g_return_val_if_fail (len != 0, NULL); + + langname = (const char *) g_hash_table_lookup (iso_639_table, str[0]); + + if (len == 1 && langname != NULL) + { + name = g_strdup (dgettext (ISO_639_DOMAIN, langname)); + } + else if (len == 2 && langname != NULL) + { + localename = (const char *) g_hash_table_lookup (iso_3166_table, str[1]); + + if (localename != NULL) + { + /* translators: the first %s is the language name, and the + * second %s is the locale name. Example: + * "French (France) + * + * Also: The text before the "|" is context to help you decide on + * the correct translation. You MUST OMIT it in the translated string. + */ + name = g_strdup_printf (Q_("language|%s (%s)"), + dgettext (ISO_639_DOMAIN, langname), + dgettext (ISO_3166_DOMAIN, localename)); + } + else + { + name = g_strdup_printf (Q_("language|%s (%s)"), + dgettext (ISO_639_DOMAIN, langname), str[1]); + } + } + + g_strfreev (str); + + return name; +} + +/** + * gtkspell_iso_codes_lookup_name_for_code: + * @code: A language code, e.g. en_CA + * + * Looks up a name to display to the user for a language code, + * this might use the iso-codes package if support was compiled + * in, and it is available + * + * Returns: the UTF-8 string to display to the user, or NULL if + * a name for the code could not be found + */ +char * +gtkspell_iso_codes_lookup_name_for_code (const char *code) +{ + char * lcode; + char * ret; + + g_return_val_if_fail (code != NULL, NULL); + + ensure_iso_codes_initialised (); + + lcode = g_ascii_strdown (code, -1); + + ret = get_iso_name_for_lang_code (lcode); + + g_free (lcode); + + return ret; +} + diff --git a/src/fe-gtk/sexy-iso-codes.h b/src/fe-gtk/sexy-iso-codes.h new file mode 100644 index 00000000..e5f37162 --- /dev/null +++ b/src/fe-gtk/sexy-iso-codes.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2005 Nathan Fredrickson + * Borrowed from Galeon, renamed, and simplified to only use iso-codes with no + * fallback method. + * + * Copyright (C) 2004 Christian Persch + * Copyright (C) 2004 Crispin Flowerday + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + */ + +#ifndef GTKSPELL_ISO_CODES_H +#define GTKSPELL_ISO_CODES_H + +#include + +G_BEGIN_DECLS + +char * gtkspell_iso_codes_lookup_name_for_code (const char *code); + +G_END_DECLS + +#endif diff --git a/src/fe-gtk/sexy-marshal.c b/src/fe-gtk/sexy-marshal.c new file mode 100644 index 00000000..10a629f2 --- /dev/null +++ b/src/fe-gtk/sexy-marshal.c @@ -0,0 +1,129 @@ + +#include + + +#ifdef G_ENABLE_DEBUG +#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) +#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) +#define g_marshal_value_peek_int(v) g_value_get_int (v) +#define g_marshal_value_peek_uint(v) g_value_get_uint (v) +#define g_marshal_value_peek_long(v) g_value_get_long (v) +#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) +#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) +#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) +#define g_marshal_value_peek_enum(v) g_value_get_enum (v) +#define g_marshal_value_peek_flags(v) g_value_get_flags (v) +#define g_marshal_value_peek_float(v) g_value_get_float (v) +#define g_marshal_value_peek_double(v) g_value_get_double (v) +#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) +#define g_marshal_value_peek_param(v) g_value_get_param (v) +#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) +#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) +#define g_marshal_value_peek_object(v) g_value_get_object (v) +#else /* !G_ENABLE_DEBUG */ +/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. + * Do not access GValues directly in your code. Instead, use the + * g_value_get_*() functions + */ +#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int +#define g_marshal_value_peek_char(v) (v)->data[0].v_int +#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint +#define g_marshal_value_peek_int(v) (v)->data[0].v_int +#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint +#define g_marshal_value_peek_long(v) (v)->data[0].v_long +#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 +#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 +#define g_marshal_value_peek_enum(v) (v)->data[0].v_long +#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_float(v) (v)->data[0].v_float +#define g_marshal_value_peek_double(v) (v)->data[0].v_double +#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#endif /* !G_ENABLE_DEBUG */ + + +/* BOOLEAN:STRING (./marshal.list:1) */ +void +sexy_marshal_BOOLEAN__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__STRING) (gpointer data1, + gpointer arg_1, + gpointer data2); + register GMarshalFunc_BOOLEAN__STRING callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__STRING) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_string (param_values + 1), + data2); + + g_value_set_boolean (return_value, v_return); +} + +/* OBJECT:OBJECT,OBJECT (./marshal.list:2) */ +void +sexy_marshal_OBJECT__OBJECT_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + typedef GObject* (*GMarshalFunc_OBJECT__OBJECT_OBJECT) (gpointer data1, + gpointer arg_1, + gpointer arg_2, + gpointer data2); + register GMarshalFunc_OBJECT__OBJECT_OBJECT callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + GObject* v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_OBJECT__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + data2); + + g_value_take_object (return_value, v_return); +} + diff --git a/src/fe-gtk/sexy-marshal.h b/src/fe-gtk/sexy-marshal.h new file mode 100644 index 00000000..f41eccbe --- /dev/null +++ b/src/fe-gtk/sexy-marshal.h @@ -0,0 +1,28 @@ + +#ifndef __sexy_marshal_MARSHAL_H__ +#define __sexy_marshal_MARSHAL_H__ + +#include + +G_BEGIN_DECLS + +/* BOOLEAN:STRING (./marshal.list:1) */ +extern void sexy_marshal_BOOLEAN__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/* OBJECT:OBJECT,OBJECT (./marshal.list:2) */ +extern void sexy_marshal_OBJECT__OBJECT_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +G_END_DECLS + +#endif /* __sexy_marshal_MARSHAL_H__ */ + diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index 6bc4f0b5..4977a567 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -30,8 +30,8 @@ #include #include #include -/*#include "gtkspell-iso-codes.h" -#include "sexy-marshal.h"*/ +#include "sexy-iso-codes.h" +#include "sexy-marshal.h" #include "typedef.h" @@ -211,14 +211,14 @@ sexy_spell_entry_class_init(SexySpellEntryClass *klass) * Returns: %FALSE to indicate that the word should be marked as * correct. */ -/* signals[WORD_CHECK] = g_signal_new("word_check", + signals[WORD_CHECK] = g_signal_new("word_check", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(SexySpellEntryClass, word_check), (GSignalAccumulator) spell_accumulator, NULL, sexy_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, - 1, G_TYPE_STRING);*/ + 1, G_TYPE_STRING); } static void @@ -495,10 +495,6 @@ build_spelling_menu(SexySpellEntry *entry, const gchar *word) if (entry->priv->dict_list == NULL) return topmenu; -#if 1 - dict = (struct EnchantDict *) entry->priv->dict_list->data; - build_suggestion_menu(entry, topmenu, dict, word); -#else /* Suggestions */ if (g_slist_length(entry->priv->dict_list) == 1) { dict = (struct EnchantDict *) entry->priv->dict_list->data; @@ -527,7 +523,6 @@ build_spelling_menu(SexySpellEntry *entry, const gchar *word) build_suggestion_menu(entry, menu, dict, word); } } -#endif /* Separator */ mi = gtk_separator_menu_item_new (); @@ -541,11 +536,6 @@ build_spelling_menu(SexySpellEntry *entry, const gchar *word) gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU)); -#if 1 - dict = (struct EnchantDict *) entry->priv->dict_list->data; - g_object_set_data(G_OBJECT(mi), "enchant-dict", dict); - g_signal_connect(G_OBJECT(mi), "activate", G_CALLBACK(add_to_dictionary), entry); -#else if (g_slist_length(entry->priv->dict_list) == 1) { dict = (struct EnchantDict *) entry->priv->dict_list->data; g_object_set_data(G_OBJECT(mi), "enchant-dict", dict); @@ -577,7 +567,6 @@ build_spelling_menu(SexySpellEntry *entry, const gchar *word) gtk_menu_shell_append(GTK_MENU_SHELL(menu), submi); } } -#endif gtk_widget_show_all(mi); gtk_menu_shell_append(GTK_MENU_SHELL(topmenu), mi); @@ -759,11 +748,7 @@ word_misspelled(SexySpellEntry *entry, int start, int end) g_strlcpy(word, text + start, end - start + 1); -#if 0 g_signal_emit(entry, signals[WORD_CHECK], 0, word, &ret); -#else - ret = default_word_check (entry, word); -#endif g_free(word); return ret; @@ -1121,8 +1106,8 @@ gchar * sexy_spell_entry_get_language_name(const SexySpellEntry *entry, const gchar *lang) { - /*if (have_enchant) - return gtkspell_iso_codes_lookup_name_for_code(lang);*/ + if (have_enchant) + return gtkspell_iso_codes_lookup_name_for_code(lang); return NULL; } diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index ad737b38..ec14b34a 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -9,7 +9,7 @@ LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 -LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib +LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib libxml2.lib LUALIB = lua51 LUAOUTPUT = xclua.dll -- cgit 1.4.1 From d8cac3bcfe4728b224497ca9411d19f1bd5f1a31 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Sun, 7 Aug 2011 14:11:58 +0200 Subject: some sorting --- src/common/cfgfiles.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index a6a75aed..23151b1e 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -421,7 +421,6 @@ const struct prefs vars[] = { {"flood_msg_num", P_OFFINT (msg_number_limit), TYPE_INT}, {"flood_msg_time", P_OFFINT (msg_time_limit), TYPE_INT}, - {"gui_license", P_OFFSET (gui_license), TYPE_STR}, {"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL}, {"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL}, {"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL}, @@ -435,6 +434,7 @@ const struct prefs vars[] = { {"gui_input_style", P_OFFINT (style_inputbox), TYPE_BOOL}, {"gui_join_dialog", P_OFFINT (gui_join_dialog), TYPE_BOOL}, {"gui_lagometer", P_OFFINT (lagometer), TYPE_INT}, + {"gui_license", P_OFFSET (gui_license), TYPE_STR}, {"gui_mode_buttons", P_OFFINT (chanmodebuttons), TYPE_BOOL}, {"gui_pane_left_size", P_OFFINT (gui_pane_left_size), TYPE_INT}, {"gui_pane_right_size", P_OFFINT (gui_pane_right_size), TYPE_INT}, @@ -555,9 +555,9 @@ const struct prefs vars[] = { {"tab_utils", P_OFFINT (windows_as_tabs), TYPE_BOOL}, {"tab_xp", P_OFFINT (tab_xp), TYPE_BOOL}, - {"text_auto_copy_text", P_OFFINT (autocopy_text), TYPE_BOOL}, + {"text_auto_copy_color", P_OFFINT (autocopy_color), TYPE_BOOL}, {"text_auto_copy_stamp", P_OFFINT (autocopy_stamp), TYPE_BOOL}, - {"text_auto_copy_color", P_OFFINT (autocopy_color), TYPE_BOOL}, + {"text_auto_copy_text", P_OFFINT (autocopy_text), TYPE_BOOL}, {"text_background", P_OFFSET (background), TYPE_STR}, {"text_color_nicks", P_OFFINT (colorednicks), TYPE_BOOL}, {"text_emoticons", P_OFFINT (emoticons), TYPE_BOOL}, -- cgit 1.4.1 From 69aedf51cea645e1dfcbc6f629f8d1461e6e6349 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Sun, 7 Aug 2011 18:26:31 +0200 Subject: recognize all installed dictionaries and select the required ones via spell_langs --- src/common/cfgfiles.c | 2 ++ src/common/xchat.h | 1 + src/fe-gtk/setup.c | 2 ++ src/fe-gtk/sexy-spell-entry.c | 24 +++++++++++++++++------- 4 files changed, 22 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 23151b1e..e3029df8 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -568,6 +568,7 @@ const struct prefs vars[] = { {"text_replay", P_OFFINT (text_replay), TYPE_BOOL}, {"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL}, {"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL}, + {"text_spell_langs", P_OFFSET (spell_langs), TYPE_STR}, {"text_stripcolor", P_OFFINT (stripcolor), TYPE_BOOL}, {"text_thin_sep", P_OFFINT (thin_separator), TYPE_BOOL}, {"text_tint_blue", P_OFFINT (tint_blue), TYPE_INT}, @@ -698,6 +699,7 @@ load_config (void) prefs.identd = 1; #endif strcpy (prefs.gui_license, ""); + strcpy (prefs.spell_langs, g_getenv ("LC_ALL") ? g_getenv ("LC_ALL") : "en_US"); strcpy (prefs.stamp_format, "[%H:%M] "); strcpy (prefs.timestamp_log_format, "%b %d %H:%M:%S "); strcpy (prefs.logmask, "%n-%c.log"); diff --git a/src/common/xchat.h b/src/common/xchat.h index 718e0e91..6856d949 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -122,6 +122,7 @@ struct xchatprefs char font_normal[FONTNAMELEN + 1]; char doubleclickuser[256]; char gui_license[64]; + char spell_langs[64]; char sounddir[PATHLEN + 1]; char soundcmd[PATHLEN + 1]; char background[PATHLEN + 1]; diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 250accc5..17a1b1a5 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -151,6 +151,8 @@ static const setting inputbox_settings[] = {ST_TOGGLE, N_("Use the Text box font and colors"), P_OFFINTNL(style_inputbox),0,0,0}, #if defined(USE_GTKSPELL) || defined(USE_LIBSEXY) {ST_TOGGLE, N_("Spell checking"), P_OFFINTNL(gui_input_spell),0,0,0}, + {ST_ENTRY, N_("Dictionaries to use:"), P_OFFSETNL(spell_langs),0,0,sizeof prefs.spell_langs}, + {ST_LABEL, N_("Use language codes (as in \"share\\locale\"). Separate multiple entries with commas.\nUsing too many dictionaries may cause performance problems.")}, #endif {ST_HEADER, N_("Nick Completion"),0,0,0}, diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index 4977a567..8f21e977 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -36,6 +36,7 @@ #include "typedef.h" #include "../common/cfgfiles.h" +#include "../common/xchatc.h" /* * Bunch of poop to make enchant into a runtime dependency rather than a @@ -944,10 +945,10 @@ void sexy_spell_entry_activate_default_languages(SexySpellEntry *entry) { #if GLIB_CHECK_VERSION (2, 6, 0) - const gchar* const *langs; + /*const gchar* const *langs; int i; - gchar *lastprefix = NULL; - GSList *enchant_langs; + gchar *lastprefix = NULL;*/ + GSList *enchant_langs, *i; if (!have_enchant) return; @@ -956,14 +957,14 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry) entry->priv->broker = enchant_broker_init(); - langs = g_get_language_names (); + /*langs = g_get_language_names (); if (langs == NULL) - return; + return;*/ enchant_langs = sexy_spell_entry_get_languages(entry); - for (i = 0; langs[i]; i++) { + /*for (i = 0; langs[i]; i++) { if ((g_strncasecmp(langs[i], "C", 1) != 0) && (strlen(langs[i]) >= 2) && enchant_has_lang(langs[i], enchant_langs)) { @@ -975,10 +976,19 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry) } } if (lastprefix != NULL) - g_free(lastprefix); + g_free(lastprefix);*/ + + for (i = enchant_langs; i; i = g_slist_next (i)) + { + if (strstr (prefs.spell_langs, i->data) != NULL) + { + sexy_spell_entry_activate_language_internal (entry, i->data, NULL); + } + } g_slist_foreach(enchant_langs, (GFunc) g_free, NULL); g_slist_free(enchant_langs); + g_slist_free (i); /* If we don't have any languages activated, use "en" */ if (entry->priv->dict_list == NULL) -- cgit 1.4.1 From c000073225cafe8f2ed6d30ff4b9ba5351dfbb6b Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Sun, 7 Aug 2011 19:37:41 +0200 Subject: last minute typofix --- src/fe-gtk/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 17a1b1a5..e07c2c7e 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -152,7 +152,7 @@ static const setting inputbox_settings[] = #if defined(USE_GTKSPELL) || defined(USE_LIBSEXY) {ST_TOGGLE, N_("Spell checking"), P_OFFINTNL(gui_input_spell),0,0,0}, {ST_ENTRY, N_("Dictionaries to use:"), P_OFFSETNL(spell_langs),0,0,sizeof prefs.spell_langs}, - {ST_LABEL, N_("Use language codes (as in \"share\\locale\"). Separate multiple entries with commas.\nUsing too many dictionaries may cause performance problems.")}, + {ST_LABEL, N_("Use language codes (as in \"share\\myspell\\dicts\").\nSeparate multiple entries with commas.")}, #endif {ST_HEADER, N_("Nick Completion"),0,0,0}, -- cgit 1.4.1 From 1e74680172e4ff43fb109557bea87d090d8376c2 Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Tue, 9 Aug 2011 01:57:42 +0200 Subject: add option to auto-open a new tab when sending /msg (openSUSE) --- src/common/cfgfiles.c | 1 + src/common/outbound.c | 6 ++++++ src/common/xchat.h | 1 + src/fe-gtk/setup.c | 1 + 4 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index e3029df8..7948fe2c 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -423,6 +423,7 @@ const struct prefs vars[] = { {"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL}, {"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL}, + {"gui_auto_open_msg", P_OFFINT (gui_auto_open_msg), TYPE_BOOL}, {"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL}, {"gui_auto_open_send", P_OFFINT (autoopendccsendwindow), TYPE_BOOL}, {"gui_dialog_height", P_OFFINT (dialog_height), TYPE_INT}, diff --git a/src/common/outbound.c b/src/common/outbound.c index df8eddbd..417ac323 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2605,7 +2605,13 @@ cmd_msg (struct session *sess, char *tbuf, char *word[], char *word_eol[]) } newsess = find_dialog (sess->server, nick); if (!newsess) + { newsess = find_channel (sess->server, nick); + if (!newsess && prefs.gui_auto_open_msg) + { + newsess = new_ircwindow (sess->server, nick, SESS_DIALOG, 0); + } + } if (newsess) inbound_chanmsg (newsess->server, NULL, newsess->channel, newsess->server->nick, msg, TRUE, FALSE); diff --git a/src/common/xchat.h b/src/common/xchat.h index 6856d949..3ec13e6b 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -205,6 +205,7 @@ struct xchatprefs unsigned int perc_ascii; unsigned int autosave; unsigned int autodialog; + unsigned int gui_auto_open_msg; unsigned int autosave_url; unsigned int autoreconnect; unsigned int autoreconnectonfail; diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index e07c2c7e..acb4eda6 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -265,6 +265,7 @@ static const setting tabs_settings[] = {ST_TOGGLE, N_("Open an extra tab for server messages"), P_OFFINTNL(use_server_tab), 0, 0, 0}, {ST_TOGGLE, N_("Open an extra tab for server notices"), P_OFFINTNL(notices_tabs), 0, 0, 0}, {ST_TOGGLE, N_("Open a new tab when you receive a private message"), P_OFFINTNL(autodialog), 0, 0, 0}, + {ST_TOGGLE, N_("Open a new tab when you send a private message"), P_OFFINTNL(gui_auto_open_msg), 0, 0, 0}, {ST_TOGGLE, N_("Sort tabs in alphabetical order"), P_OFFINTNL(tab_sort), 0, 0, 0}, {ST_TOGGLE, N_("Smaller text"), P_OFFINTNL(tab_small), 0, 0, 0}, #if 0 -- cgit 1.4.1 From 6d1b99654c66e404bf08494b00917b5d180c1c81 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 9 Aug 2011 21:04:11 +0200 Subject: disable channel switcher's context menu item for tray alerts when xtray is loaded --- src/fe-gtk/maingui.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index feea6549..74157a7f 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -1591,7 +1591,12 @@ mg_create_alertmenu (session *sess, GtkWidget *menu) submenu = menu_quick_sub (_("_Extra Alerts"), menu, NULL, XCMENU_MNEMONIC, -1); mg_perchan_menu_item (_("Beep on _Message"), submenu, &sess->alert_beep, prefs.input_beep_chans); - mg_perchan_menu_item (_("Blink Tray _Icon"), submenu, &sess->alert_tray, prefs.input_tray_chans); + + if (!xtray_mode ()) /*disable this context menu item when xtray is loaded */ + { + mg_perchan_menu_item (_("Blink Tray _Icon"), submenu, &sess->alert_tray, prefs.input_tray_chans); + } + mg_perchan_menu_item (_("Blink Task _Bar"), submenu, &sess->alert_taskbar, prefs.input_flash_chans); } -- cgit 1.4.1 From 9a4907e28a1e446e9dff89c6612f18e32f20b3fb Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 11 Aug 2011 03:58:30 +0200 Subject: add manifest file so that visual styles are applied to xtray (XhmikosR) --- src/fe-gtk/xchat.exe.manifest | 22 ++++++++++++++++++++++ src/fe-gtk/xchat.rc | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 src/fe-gtk/xchat.exe.manifest (limited to 'src') diff --git a/src/fe-gtk/xchat.exe.manifest b/src/fe-gtk/xchat.exe.manifest new file mode 100644 index 00000000..13685d98 --- /dev/null +++ b/src/fe-gtk/xchat.exe.manifest @@ -0,0 +1,22 @@ + + + + XChat IRC client + + + + + + diff --git a/src/fe-gtk/xchat.rc b/src/fe-gtk/xchat.rc index 18c209c1..0588b525 100644 --- a/src/fe-gtk/xchat.rc +++ b/src/fe-gtk/xchat.rc @@ -1,6 +1,8 @@ #include #include "../../config.h" +1 24 "xchat.exe.manifest" + XC_ICON ICON "../../xchat.ico" VS_VERSION_INFO VERSIONINFO -- cgit 1.4.1 From 2db80fa59981217fcdc9c58e4163155cc0af669c Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 11 Aug 2011 08:11:57 +0200 Subject: VersionInfo enhancements (XhmikosR) --- src/fe-gtk/xchat.rc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/fe-gtk/xchat.rc b/src/fe-gtk/xchat.rc index 0588b525..28676b83 100644 --- a/src/fe-gtk/xchat.rc +++ b/src/fe-gtk/xchat.rc @@ -1,11 +1,14 @@ #include #include "../../config.h" +#include "../../resource.h" 1 24 "xchat.exe.manifest" XC_ICON ICON "../../xchat.ico" VS_VERSION_INFO VERSIONINFO + FILEVERSION COMMA_VERSION + PRODUCTVERSION COMMA_VERSION BEGIN BLOCK "StringFileInfo" BEGIN @@ -15,6 +18,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "XChat-WDK IRC Client" VALUE "ProductName", "XChat-WDK" VALUE "ProductVersion", PACKAGE_VERSION + VALUE "FileVersion", PACKAGE_VERSION END END BLOCK "VarFileInfo" -- cgit 1.4.1 From 54ee14903b6be413e9b5ec7957b6b4d5a1d3ab8c Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 14 Aug 2011 23:39:03 +0200 Subject: first attempt at switching to OBS, compiles, but doesn't run yet --- build/build-small.bat | 12 ++++++++---- build/dep-extract.bat | 7 ++++++- config.h | 1 + dep-x86/deps-x86.txt | 48 ++++++++++++++++++++++++++++-------------------- src/fe-gtk/xtext.c | 2 +- src/makeinc.skel.mak | 4 ++-- 6 files changed, 46 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/build/build-small.bat b/build/build-small.bat index 9bc59029..c6618802 100644 --- a/build/build-small.bat +++ b/build/build-small.bat @@ -36,19 +36,23 @@ copy %DEPS_ROOT%\bin\libglib-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgmodule-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libpng15-15.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgdk-win32-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libfontconfig-1.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\freetype6.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libfreetype-6.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libjasper-1.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libjpeg-8.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libpixman-1-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\intl.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libxml2.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libintl-8.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libtiff-3.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libxml2-2.dll %XCHAT_DEST% xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libpixmap.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines\ copy %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines\libwimp.dll %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\ diff --git a/build/dep-extract.bat b/build/dep-extract.bat index 05e40e02..c3aba497 100644 --- a/build/dep-extract.bat +++ b/build/dep-extract.bat @@ -1,9 +1,14 @@ @echo off -set PATH=%PROGRAMW6432%\7-Zip +set PATH=%PATH%;%PROGRAMW6432%\7-Zip cd ..\dep-x64 7z x *.zip 7z x *.7z cd ..\dep-x86 +7z x -y *.rpm +7z x *.cpio +del *.cpio +xcopy /q /s /i usr\i686-w64-mingw32\sys-root\mingw\* . +rmdir /q /s usr 7z x *.zip 7z x *.7z pause diff --git a/config.h b/config.h index 80bbc5d2..20150285 100644 --- a/config.h +++ b/config.h @@ -2,6 +2,7 @@ #define ENABLE_NLS #define USE_GMODULE #define USE_PLUGIN +#define USE_OPENSSL #define USE_LIBSEXY #define HAVE_ISO_CODES #define PACKAGE_NAME "xchat" diff --git a/dep-x86/deps-x86.txt b/dep-x86/deps-x86.txt index 02fcf172..07c4359b 100644 --- a/dep-x86/deps-x86.txt +++ b/dep-x86/deps-x86.txt @@ -1,24 +1,32 @@ -http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk_1.32.0-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk-dev_1.32.0-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.10.2-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.10.2-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.4.4-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev_0.18.1.1-2_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.3-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/gdk-pixbuf/2.22/gdk-pixbuf_2.22.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/gdk-pixbuf/2.22/gdk-pixbuf-dev_2.22.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib_2.26.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib-dev_2.26.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+_2.22.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-dev_2.22.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango_1.28.3-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango-dev_1.28.3-1_win32.zip +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-atk-2.0.1-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-atk-devel-2.0.1-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-cairo-devel-1.10.2-6.24.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-expat-2.0.1-4.21.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-fontconfig-2.8.0-5.22.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-freetype-2.4.6-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-gettext-runtime-0.18.1.1-13.14.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-gettext-tools-0.18.1.1-13.14.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libcairo2-1.10.2-6.24.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libexpat-2.0.1-4.21.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libintl-0.18.1.1-13.14.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libintl-devel-0.18.1.1-13.14.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libjasper-1.900.1-6.24.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libjpeg-8c-2.28.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libpng-1.5.4-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libtiff-3.9.5-1.18.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libxml2-2.7.8-7.19.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-libxml2-devel-2.7.8-7.19.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-gdk-pixbuf-2.22.1-10.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-gdk-pixbuf-devel-2.22.1-10.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-gdk-pixbuf-devel-tools-2.22.1-10.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-glib2-2.28.8-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-glib2-devel-2.28.8-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-gtk2-2.24.5-2.12.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-gtk2-devel-2.24.5-2.12.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-pango-1.28.4-4.28.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-pango-devel-1.28.4-4.28.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/SLE_11_SP1/noarch/mingw32-pixman-0.22.2-1.1.noarch.rpm http://xchat-wdk.googlecode.com/files/Enchant-WDK%201.6.0-2%20x86.7z http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x86.7z http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0d%20x86.7z http://xchat-wdk.googlecode.com/files/myspell-20101001.7z -http://xchat-wdk.googlecode.com/files/gettext-tools-0.17-msgfmt.zip -http://xchat-wdk.googlecode.com/files/LibXML-WDK%202.7.8%20x86.7z diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 47d7e3ee..d797e5ff 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -999,7 +999,7 @@ gtk_xtext_realize (GtkWidget * widget) gdk_window_set_user_data (widget->window, widget); - xtext->depth = gdk_drawable_get_visual (widget->window)->depth; + xtext->depth = gdk_window_get_visual (widget->window)->depth; val.subwindow_mode = GDK_INCLUDE_INFERIORS; val.graphics_exposures = 0; diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index ec14b34a..90751dcd 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -7,9 +7,9 @@ CPPFLAGS = /c /MD /W0 /nologo /DWIN32 LDFLAGS = /subsystem:windows /nologo LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib winmm.lib ws2_32.lib wininet.lib comdlg32.lib libeay32.lib ssleay32.lib -GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include +GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include /I$(DEV)\include\libxml2 GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 -LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib libxml2.lib +LIBS = $(LIBS) /libpath:$(DEV)\lib libgtk-win32-2.0.dll.a libgdk-win32-2.0.dll.a libatk-1.0.dll.a libgio-2.0.dll.a libgdk_pixbuf-2.0.dll.a libpangowin32-1.0.dll.a libpangocairo-1.0.dll.a libpango-1.0.dll.a libcairo.dll.a libgobject-2.0.dll.a libgmodule-2.0.dll.a libglib-2.0.dll.a libintl.dll.a libxml2.dll.a LUALIB = lua51 LUAOUTPUT = xclua.dll -- cgit 1.4.1 From 19345289008d27dcd8631776c29e462d992ed638 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 15 Aug 2011 00:51:11 +0200 Subject: obs gtk works but requires library conversion --- build/convert-lib-x64.py | 38 ++++++++++++++++++++++++++++++++++++++ build/convert-lib-x86.py | 38 ++++++++++++++++++++++++++++++++++++++ build/dep-extract.bat | 4 ++++ src/makeinc.skel.mak | 4 ++-- 4 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 build/convert-lib-x64.py create mode 100644 build/convert-lib-x86.py (limited to 'src') diff --git a/build/convert-lib-x64.py b/build/convert-lib-x64.py new file mode 100644 index 00000000..71962098 --- /dev/null +++ b/build/convert-lib-x64.py @@ -0,0 +1,38 @@ +# script by Mikhail Titov +# http://mail.gnome.org/archives/gtk-list/2011-March/msg00103.html + +import os,re,sys,shutil +from os.path import join, getsize +from subprocess import Popen, PIPE +os.environ['PATH'] = os.environ['PATH'] + ";C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin\\amd64;C:\\mozilla-build\\mingw64\\bin" +#gendef = "C:\\workspace\\glibmm-2.27.99\\MSVC_Net2008\\gendef\\Win32\\Debug\\gendef.exe" +# dll = re.sub(".a", "", lib) +# output = Popen([gendef, d, dll, lib], stdout=PIPE).communicate()[0] + +def gen(dll): + name = re.sub("^lib", "", dll) + name = re.sub("(?:-\\d).dll", "", name) +# shutil.copyfile(lib, name + ".lib") + print("Working on %s\n" % dll) + output = Popen(["nm", "lib%s.dll.a" % name], stdout=PIPE).communicate()[0] + d = "%s.def" % name + with open(d, "wb") as f: + f.write(b"EXPORTS\n") + for line in output.split(b"\r\n"): + if (re.match(b".* T _|.* I __nm", line)): #|.* I __imp + line = re.sub(b"^.* T _|^.* I __nm__", b"", line) #|^.* I _ + f.write(line + b"\n") + f.write(str.encode("LIBRARY %s\n" % dll)) + p = Popen(["lib", "/machine:x64", "/def:%s" % d]) #, shell = True) + +root = "c:\\mozilla-build\\build\\xchat-wdk\\dep-x64" +os.chdir(root + "\\lib") +for root, dirs, files in os.walk(root + "\\bin"): + for name in files: + if (re.search(".dll", name)): + print("Processing: %s\n" % name) + gen(name) + +#gen("libatk-1.0-0.dll") +# glibmm-2.4.def libglibmm-2.4-1.dll libglibmm-2.4.dll.a +# dumpbin /SYMBOLS /OUT:dumpbin.out libglibmm-2.4.dll.a diff --git a/build/convert-lib-x86.py b/build/convert-lib-x86.py new file mode 100644 index 00000000..dbf89b37 --- /dev/null +++ b/build/convert-lib-x86.py @@ -0,0 +1,38 @@ +# script by Mikhail Titov +# http://mail.gnome.org/archives/gtk-list/2011-March/msg00103.html + +import os,re,sys,shutil +from os.path import join, getsize +from subprocess import Popen, PIPE +os.environ['PATH'] = os.environ['PATH'] + ";C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin;C:\\mozilla-build\\mingw32\\bin" +#gendef = "C:\\workspace\\glibmm-2.27.99\\MSVC_Net2008\\gendef\\Win32\\Debug\\gendef.exe" +# dll = re.sub(".a", "", lib) +# output = Popen([gendef, d, dll, lib], stdout=PIPE).communicate()[0] + +def gen(dll): + name = re.sub("^lib", "", dll) + name = re.sub("(?:-\\d).dll", "", name) +# shutil.copyfile(lib, name + ".lib") + print("Working on %s\n" % dll) + output = Popen(["nm", "lib%s.dll.a" % name], stdout=PIPE).communicate()[0] + d = "%s.def" % name + with open(d, "wb") as f: + f.write(b"EXPORTS\n") + for line in output.split(b"\r\n"): + if (re.match(b".* T _|.* I __nm", line)): #|.* I __imp + line = re.sub(b"^.* T _|^.* I __nm__", b"", line) #|^.* I _ + f.write(line + b"\n") + f.write(str.encode("LIBRARY %s\n" % dll)) + p = Popen(["lib", "/machine:x86", "/def:%s" % d]) #, shell = True) + +root = "c:\\mozilla-build\\build\\xchat-wdk\\dep-x86" +os.chdir(root + "\\lib") +for root, dirs, files in os.walk(root + "\\bin"): + for name in files: + if (re.search(".dll", name)): + print("Processing: %s\n" % name) + gen(name) + +#gen("libatk-1.0-0.dll") +# glibmm-2.4.def libglibmm-2.4-1.dll libglibmm-2.4.dll.a +# dumpbin /SYMBOLS /OUT:dumpbin.out libglibmm-2.4.dll.a diff --git a/build/dep-extract.bat b/build/dep-extract.bat index c3aba497..1f8ac036 100644 --- a/build/dep-extract.bat +++ b/build/dep-extract.bat @@ -9,6 +9,10 @@ cd ..\dep-x86 del *.cpio xcopy /q /s /i usr\i686-w64-mingw32\sys-root\mingw\* . rmdir /q /s usr +set OPATH=%PATH% +set PATH=%PATH%;c:\mozilla-build\python-2.7-x86 +python convert-lib.py +set PATH=%OPATH% 7z x *.zip 7z x *.7z pause diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index 90751dcd..c34803c4 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -1,7 +1,7 @@ CC = cl LINK = link CFLAGS = $(CFLAGS) /Ox /c /MD /MP /W0 /nologo -CFLAGS = $(CFLAGS) /DWIN32 /DG_DISABLE_CAST_CHECKS /DG_DISABLE_DEPRECATED /DGDK_PIXBUF_DISABLE_DEPRECATED /DGDK_DISABLE_DEPRECATED /DUSE_IPV6 /DHAVE_STRTOULL /Dstrtoull=_strtoui64 /Dstrcasecmp=stricmp /Dstrncasecmp=strnicmp /DUSE_OPENSSL +CFLAGS = $(CFLAGS) /DWIN32 /DG_DISABLE_CAST_CHECKS /DG_DISABLE_DEPRECATED /DGDK_PIXBUF_DISABLE_DEPRECATED /DGDK_DISABLE_DEPRECATED /DUSE_IPV6 /DHAVE_STRTOULL /Dstrtoull=_strtoui64 /Dstrcasecmp=stricmp /Dstrncasecmp=strnicmp CFLAGS = $(CFLAGS) /I$(DEV)\include CPPFLAGS = /c /MD /W0 /nologo /DWIN32 LDFLAGS = /subsystem:windows /nologo @@ -9,7 +9,7 @@ LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include /I$(DEV)\include\libxml2 GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 -LIBS = $(LIBS) /libpath:$(DEV)\lib libgtk-win32-2.0.dll.a libgdk-win32-2.0.dll.a libatk-1.0.dll.a libgio-2.0.dll.a libgdk_pixbuf-2.0.dll.a libpangowin32-1.0.dll.a libpangocairo-1.0.dll.a libpango-1.0.dll.a libcairo.dll.a libgobject-2.0.dll.a libgmodule-2.0.dll.a libglib-2.0.dll.a libintl.dll.a libxml2.dll.a +LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib xml2.lib LUALIB = lua51 LUAOUTPUT = xclua.dll -- cgit 1.4.1 From 314a9578dbab3744c95484feff4aa9d9e31df278 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 15 Aug 2011 01:34:21 +0200 Subject: some restructing --- config.h | 1 + src/makeinc.skel.mak | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/config.h b/config.h index 20150285..94c7e964 100644 --- a/config.h +++ b/config.h @@ -4,6 +4,7 @@ #define USE_PLUGIN #define USE_OPENSSL #define USE_LIBSEXY +#define USE_IPV6 #define HAVE_ISO_CODES #define PACKAGE_NAME "xchat" #define PACKAGE_VERSION "1496-6" diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index c34803c4..ee3f1101 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -1,7 +1,7 @@ CC = cl LINK = link CFLAGS = $(CFLAGS) /Ox /c /MD /MP /W0 /nologo -CFLAGS = $(CFLAGS) /DWIN32 /DG_DISABLE_CAST_CHECKS /DG_DISABLE_DEPRECATED /DGDK_PIXBUF_DISABLE_DEPRECATED /DGDK_DISABLE_DEPRECATED /DUSE_IPV6 /DHAVE_STRTOULL /Dstrtoull=_strtoui64 /Dstrcasecmp=stricmp /Dstrncasecmp=strnicmp +CFLAGS = $(CFLAGS) /DWIN32 /DG_DISABLE_CAST_CHECKS /DG_DISABLE_DEPRECATED /DGDK_PIXBUF_DISABLE_DEPRECATED /DGDK_DISABLE_DEPRECATED /DHAVE_STRTOULL /Dstrtoull=_strtoui64 /Dstrcasecmp=stricmp /Dstrncasecmp=strnicmp CFLAGS = $(CFLAGS) /I$(DEV)\include CPPFLAGS = /c /MD /W0 /nologo /DWIN32 LDFLAGS = /subsystem:windows /nologo -- cgit 1.4.1 From 858db21519e53f104e1e5dce05245d2789126c36 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 15 Aug 2011 05:38:59 +0200 Subject: restructuring part2 --- src/common/inet.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/common/inet.h b/src/common/inet.h index 02473fe2..8995569c 100644 --- a/src/common/inet.h +++ b/src/common/inet.h @@ -21,6 +21,7 @@ #else +#include "../../config.h" #ifdef USE_IPV6 #include #include -- cgit 1.4.1 From 2c9e9dfc9bcf8b9369bf25d918a03585a2038070 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 15 Aug 2011 05:39:26 +0200 Subject: update scripts for gendef usage --- build/dep-extract.bat | 22 +++++++++++++++++----- src/makeinc.skel.mak | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/build/dep-extract.bat b/build/dep-extract.bat index a088c6a2..e89f2018 100644 --- a/build/dep-extract.bat +++ b/build/dep-extract.bat @@ -1,5 +1,6 @@ @echo off -set PATH=%PATH%;%PROGRAMW6432%\7-Zip +set PATH=%PATH%;%PROGRAMW6432%\7-Zip;c:\mozilla-build\gendef + cd ..\dep-x64 7z x -y *.rpm 7z x *.cpio @@ -7,11 +8,17 @@ del *.cpio xcopy /q /s /i usr\x86_64-w64-mingw32\sys-root\mingw\* . rmdir /q /s usr set OPATH=%PATH% -set PATH=%PATH%;c:\mozilla-build\python-2.7-x64 -python ..\build\convert-lib-x64.py +set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 +cd lib +for %%A in (..\bin\*.dll) do ( + gendef %%A + lib /nologo /machine:x64 /def:%%~nA.def +) +cd .. set PATH=%OPATH% 7z x *.7z copy /y ..\build\glibconfig-x64.h lib\glib-2.0\include\glibconfig.h + cd ..\dep-x86 7z x -y *.rpm 7z x *.cpio @@ -19,8 +26,13 @@ del *.cpio xcopy /q /s /i usr\i686-w64-mingw32\sys-root\mingw\* . rmdir /q /s usr set OPATH=%PATH% -set PATH=%PATH%;c:\mozilla-build\python-2.7-x86 -python ..\build\convert-lib-x86.py +set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE +cd lib +for %%A in (..\bin\*.dll) do ( + gendef ..\bin\%%A + lib /nologo /machine:x86 /def:%%~nA.def +) +cd .. set PATH=%OPATH% 7z x *.7z copy /y ..\build\glibconfig-x86.h lib\glib-2.0\include\glibconfig.h diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index ee3f1101..03fa43e8 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -9,7 +9,7 @@ LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include /I$(DEV)\include\libxml2 GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 -LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib xml2.lib +LIBS = $(LIBS) /libpath:$(DEV)\lib libgtk-win32-2.0-0.lib libgdk-win32-2.0-0.lib libatk-1.0-0.lib libgio-2.0-0.lib libgdk_pixbuf-2.0-0.lib libpangowin32-1.0-0.lib libpangocairo-1.0-0.lib libpango-1.0-0.lib libcairo-2.lib libgobject-2.0-0.lib libgmodule-2.0-0.lib libglib-2.0-0.lib libintl-8.lib libxml2-2.lib LUALIB = lua51 LUAOUTPUT = xclua.dll -- cgit 1.4.1 From 4514516712b57f412de237922d9567e6e389ab20 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 17 Aug 2011 06:47:57 +0200 Subject: makefile and build script cleanup --- build/build-x64.bat | 4 +--- build/build-x86.bat | 4 +--- build/release-x64.bat | 1 + build/release-x86.bat | 1 + src/makefile.mak | 24 +++++++++++++++--------- 5 files changed, 19 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/build/build-x64.bat b/build/build-x64.bat index 49583c7a..97ec4712 100644 --- a/build/build-x64.bat +++ b/build/build-x64.bat @@ -25,9 +25,6 @@ echo DEV = %DEV_64% > makeinc.mak echo X64 = YES >> makeinc.mak type makeinc.skel.mak >> makeinc.mak nmake /nologo /f makefile.mak clean -cd pixmaps -nmake /nologo /f makefile.mak -cd .. nmake /nologo /f makefile.mak cd ..\plugins nmake /nologo /f makefile.mak clean @@ -44,3 +41,4 @@ cd ..\..\build call compile-po-files.bat set PATH=%OPATH% call release-x64.bat +pause diff --git a/build/build-x86.bat b/build/build-x86.bat index f3aaa30f..fb811920 100644 --- a/build/build-x86.bat +++ b/build/build-x86.bat @@ -24,9 +24,6 @@ cd src echo DEV = %DEV_32% > makeinc.mak type makeinc.skel.mak >> makeinc.mak nmake /nologo /f makefile.mak clean -cd pixmaps -nmake /nologo /f makefile.mak -cd .. nmake /nologo /f makefile.mak cd ..\plugins nmake /nologo /f makefile.mak clean @@ -43,3 +40,4 @@ cd ..\..\build call compile-po-files.bat set PATH=%OPATH% call release-x86.bat +pause diff --git a/build/release-x64.bat b/build/release-x64.bat index e6026dfa..44107c7b 100644 --- a/build/release-x64.bat +++ b/build/release-x64.bat @@ -7,6 +7,7 @@ echo 2> portable-mode move portable-mode %XCHAT_DEST% copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST% copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST% +copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST% diff --git a/build/release-x86.bat b/build/release-x86.bat index aceb525a..4233f8d0 100644 --- a/build/release-x86.bat +++ b/build/release-x86.bat @@ -7,6 +7,7 @@ echo 2> portable-mode move portable-mode %XCHAT_DEST% copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST% copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST% +copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST% diff --git a/src/makefile.mak b/src/makefile.mak index 670774ed..cd73b879 100644 --- a/src/makefile.mak +++ b/src/makefile.mak @@ -1,17 +1,23 @@ all: - @cd common + @cd pixmaps + @-$(MAKE) /nologo /s /f makefile.mak $@ + @cd ..\common @-$(MAKE) /nologo /s /f makefile.mak $@ @cd ..\fe-gtk @-$(MAKE) /nologo /s /f makefile.mak $@ @cd ..\fe-text @-$(MAKE) /nologo /s /f makefile.mak $@ + @cd ..\gtk2-prefs + @-$(MAKE) /nologo /s /f makefile.mak $@ clean: - @del common\*.obj - @del common\xchatcommon.lib - @del fe-gtk\*.obj - @del fe-gtk\xchat.exe - @del fe-gtk\xchat.res - @del fe-text\*.obj - @del fe-text\xchat-text.exe - @del pixmaps\*.h + @cd pixmaps + @-$(MAKE) /nologo /s /f makefile.mak clean $@ + @cd ..\common + @-$(MAKE) /nologo /s /f makefile.mak clean $@ + @cd ..\fe-gtk + @-$(MAKE) /nologo /s /f makefile.mak clean $@ + @cd ..\fe-text + @-$(MAKE) /nologo /s /f makefile.mak clean $@ + @cd ..\gtk2-prefs + @-$(MAKE) /nologo /s /f makefile.mak clean $@ -- cgit 1.4.1 From 80be398c40c0750b95fa17c50d97f6510381c70d Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 17 Aug 2011 06:51:34 +0200 Subject: add gtk+ preference tool --- src/gtk2-prefs/callbacks.cpp | 224 ++++++++++++ src/gtk2-prefs/callbacks.h | 71 ++++ src/gtk2-prefs/config.h | 59 +++ src/gtk2-prefs/interface.cpp | 836 +++++++++++++++++++++++++++++++++++++++++++ src/gtk2-prefs/interface.h | 5 + src/gtk2-prefs/main.cpp | 611 +++++++++++++++++++++++++++++++ src/gtk2-prefs/main.h | 32 ++ src/gtk2-prefs/makefile.mak | 24 ++ src/gtk2-prefs/support.cpp | 146 ++++++++ src/gtk2-prefs/support.h | 44 +++ src/gtk2-prefs/sys_win32.h | 28 ++ src/gtk2-prefs/win32util.cpp | 80 +++++ src/gtk2-prefs/win32util.h | 26 ++ 13 files changed, 2186 insertions(+) create mode 100644 src/gtk2-prefs/callbacks.cpp create mode 100644 src/gtk2-prefs/callbacks.h create mode 100644 src/gtk2-prefs/config.h create mode 100644 src/gtk2-prefs/interface.cpp create mode 100644 src/gtk2-prefs/interface.h create mode 100644 src/gtk2-prefs/main.cpp create mode 100644 src/gtk2-prefs/main.h create mode 100644 src/gtk2-prefs/makefile.mak create mode 100644 src/gtk2-prefs/support.cpp create mode 100644 src/gtk2-prefs/support.h create mode 100644 src/gtk2-prefs/sys_win32.h create mode 100644 src/gtk2-prefs/win32util.cpp create mode 100644 src/gtk2-prefs/win32util.h (limited to 'src') diff --git a/src/gtk2-prefs/callbacks.cpp b/src/gtk2-prefs/callbacks.cpp new file mode 100644 index 00000000..9cc5c928 --- /dev/null +++ b/src/gtk2-prefs/callbacks.cpp @@ -0,0 +1,224 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include "callbacks.h" +#include "interface.h" +#include "support.h" + +#include "main.h" + + + +extern GtkWidget* g_main_window; + +void +on_main_showpreviewtoggle_toggled (GtkToggleButton *togglebutton, + gpointer user_data) +{ + if (gtk_toggle_button_get_active (togglebutton)) { + gtk_widget_show(lookup_widget(g_main_window, "main_previewhbox")); + gtk_button_set_label(GTK_BUTTON(togglebutton), "Hide preview <<"); + gtk_window_resize(GTK_WINDOW(g_main_window), 700, 330); + } else { + gtk_widget_hide(lookup_widget(g_main_window, "main_previewhbox")); + gtk_button_set_label(GTK_BUTTON(togglebutton), "Show preview >>"); + gtk_window_resize(GTK_WINDOW(g_main_window), 300, 330); + } + +} + + +/* +extern GtkWidget* g_fontsel_dialog; + + +void +on_fontsel_dialog_response (GtkDialog *dialog, + gint id, + gpointer user_data) +{ + + switch(id) { + case GTK_RESPONSE_OK: + { + const char* font = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(dialog)); + std::string f = (font ? font : ""); + set_theme(get_selected_theme(), f); + break; + } +// case GTK_RESPONSE_CANCEL: +// gtk_widget_destroy(g_fontsel_dialog); +// g_fontsel_dialog = 0; +// return; + + } + gtk_widget_destroy(g_fontsel_dialog); + g_fontsel_dialog = 0; + +} + + +gboolean +on_fontsel_dialog_delete_event (GtkWidget *widget, + GdkEvent *event, + gpointer user_data) +{ + gtk_widget_destroy(g_fontsel_dialog); + g_fontsel_dialog = 0; + + return FALSE; +} + + +void +on_main_fontselectbutton_clicked (GtkButton *button, + gpointer user_data) +{ + g_fontsel_dialog = create_fontsel_dialog(); + gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(g_fontsel_dialog), get_current_font().c_str()); + gtk_widget_show(g_fontsel_dialog); +} +*/ + + + + + +void +on_main_ok_button_clicked (GtkButton *button, + gpointer user_data) +{ + if (save_current_theme()) + gtk_main_quit(); +} + + +void +on_main_cancel_button_clicked (GtkButton *button, + gpointer user_data) +{ + gtk_main_quit(); +} + + +void +on_main_reset_button_clicked (GtkButton *button, + gpointer user_data) +{ + set_theme(get_orig_theme(), get_orig_font()); +} + + +gboolean +on_main_window_delete_event (GtkWidget *widget, + GdkEvent *event, + gpointer user_data) +{ + program_shutdown(); + return true; +} + + +void +on_main_use_default_font_radio_toggled (GtkToggleButton *togglebutton, + gpointer user_data) +{ + bool default_font = gtk_toggle_button_get_active(togglebutton); + + gtk_widget_set_sensitive(lookup_widget(g_main_window, "main_font_selector_button"), !default_font); + + apply_theme(get_selected_theme(), get_selected_font()); +} + + +void +on_main_font_selector_button_font_set (GtkFontButton *fontbutton, + gpointer user_data) +{ + apply_theme(get_selected_theme(), get_selected_font()); +} + + +void +on_new2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_open2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_save2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_save_as2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_quit2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_cut2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_copy2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_paste2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_delete2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_about2_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + diff --git a/src/gtk2-prefs/callbacks.h b/src/gtk2-prefs/callbacks.h new file mode 100644 index 00000000..5759aebc --- /dev/null +++ b/src/gtk2-prefs/callbacks.h @@ -0,0 +1,71 @@ +#include + + +void +on_main_showpreviewtoggle_toggled (GtkToggleButton *togglebutton, + gpointer user_data); + +void +on_main_ok_button_clicked (GtkButton *button, + gpointer user_data); + +void +on_main_cancel_button_clicked (GtkButton *button, + gpointer user_data); + +void +on_main_reset_button_clicked (GtkButton *button, + gpointer user_data); + +gboolean +on_main_window_delete_event (GtkWidget *widget, + GdkEvent *event, + gpointer user_data); + +void +on_main_use_default_font_radio_toggled (GtkToggleButton *togglebutton, + gpointer user_data); + +void +on_main_font_selector_button_font_set (GtkFontButton *fontbutton, + gpointer user_data); + +void +on_new2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_open2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_save2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_save_as2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_quit2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_cut2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_copy2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_paste2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_delete2_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_about2_activate (GtkMenuItem *menuitem, + gpointer user_data); diff --git a/src/gtk2-prefs/config.h b/src/gtk2-prefs/config.h new file mode 100644 index 00000000..4501a33b --- /dev/null +++ b/src/gtk2-prefs/config.h @@ -0,0 +1,59 @@ +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* For gmessages.h error message */ +#define G_HAVE_ISO_VARARGS + +/* For mkdir */ +#define HAVE_DIRECT_H 1 + +/* Name of package */ +#define PACKAGE gtk2-prefs + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#define PACKAGE_NAME gtk2-prefs + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING gtk2-prefs 0.4.1 + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME gtk2-prefs + +/* Define to the version of this package. */ +#define PACKAGE_VERSION 0.4.1 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION 0.4.1 diff --git a/src/gtk2-prefs/interface.cpp b/src/gtk2-prefs/interface.cpp new file mode 100644 index 00000000..adfcc66b --- /dev/null +++ b/src/gtk2-prefs/interface.cpp @@ -0,0 +1,836 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +#include +#include + +#include "callbacks.h" +#include "interface.h" +#include "support.h" + +#define GLADE_HOOKUP_OBJECT(component,widget,name) \ + g_object_set_data_full (G_OBJECT (component), name, \ + gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) + +#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ + g_object_set_data (G_OBJECT (component), name, widget) + +GtkWidget* +create_main_window (void) +{ + GtkWidget *main_window; + GtkWidget *main_hbox; + GtkWidget *vbox1; + GtkWidget *hbox1; + GtkWidget *frame2; + GtkWidget *alignment3; + GtkWidget *scrolledwindow3; + GtkWidget *main_themelist; + GtkWidget *label1234; + GtkWidget *frame3; + GtkWidget *alignment4; + GtkWidget *vbox7; + GtkWidget *hbox8; + GtkWidget *vbox9; + GtkWidget *main_use_default_font_radio; + GSList *main_use_default_font_radio_group = NULL; + GtkWidget *main_use_custom_font_radio; + GtkWidget *alignment5; + GtkWidget *vbox10; + GtkWidget *hbox9; + GtkWidget *vbox11; + GtkWidget *main_font_selector_button; + GtkWidget *label669; + GtkWidget *vbox13; + GtkWidget *hbox6666; + GtkWidget *main_use_system_config_checkbutton; + GtkWidget *main_showpreviewtoggle; + GtkWidget *hbuttonbox1; + GtkWidget *hbox7; + GtkWidget *hbox6665; + GtkWidget *image2; + GtkWidget *label2; + GtkWidget *vbox6; + GtkWidget *hbox5; + GtkWidget *main_ok_button; + GtkWidget *main_cancel_button; + GtkWidget *main_reset_button; + GtkWidget *alignment2; + GtkWidget *hbox6; + GtkWidget *image1; + GtkWidget *label667; + GtkWidget *main_previewhbox; + GtkWidget *vseparator2; + GtkWidget *frame4; + GtkWidget *alignment6; + GtkWidget *vbox12; + GtkWidget *main_previewbook; + GtkWidget *table1; + GtkWidget *vbox2; + GtkWidget *checkbutton1; + GtkWidget *checkbutton2; + GtkWidget *button4; + GtkWidget *togglebutton1; + GtkObject *spinbutton1_adj; + GtkWidget *spinbutton1; + GtkWidget *vbox4; + GtkWidget *menubar2; + GtkWidget *menuitem5; + GtkWidget *menuitem5_menu; + GtkWidget *new2; + GtkWidget *open2; + GtkWidget *save2; + GtkWidget *save_as2; + GtkWidget *separatormenuitem2; + GtkWidget *quit2; + GtkWidget *menuitem6; + GtkWidget *menuitem6_menu; + GtkWidget *cut2; + GtkWidget *copy2; + GtkWidget *paste2; + GtkWidget *delete2; + GtkWidget *menuitem8; + GtkWidget *menuitem8_menu; + GtkWidget *about2; + GtkWidget *combobox1; + GtkWidget *comboboxentry1; + GtkWidget *hscale1; + GtkWidget *scrolledwindow1; + GtkWidget *preview_treeview; + GtkWidget *statusbar1; + GtkWidget *progressbar1; + GtkWidget *vseparator1; + GtkWidget *frame1; + GtkWidget *vbox3; + GtkWidget *radiobutton1; + GSList *radiobutton1_group = NULL; + GtkWidget *radiobutton2; + GtkWidget *radiobutton3; + GtkWidget *label6; + GtkWidget *label4; + GtkWidget *scrolledwindow2; + GtkWidget *textview1; + GtkWidget *label5; + GtkWidget *vbox5; + GtkWidget *hbox4; + GtkWidget *about_label; + GtkWidget *label666; + GtkWidget *label670; + GtkAccelGroup *accel_group; + GtkTooltips *tooltips; + + tooltips = gtk_tooltips_new (); + + accel_group = gtk_accel_group_new (); + + main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_widget_set_name (main_window, "main_window"); + gtk_window_set_title (GTK_WINDOW (main_window), "Gtk2 Theme Selector"); + + main_hbox = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (main_hbox, "main_hbox"); + gtk_widget_show (main_hbox); + gtk_container_add (GTK_CONTAINER (main_window), main_hbox); + gtk_widget_set_size_request (main_hbox, 310, 320); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox1, "vbox1"); + gtk_widget_show (vbox1); + gtk_box_pack_start (GTK_BOX (main_hbox), vbox1, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox1), 3); + + hbox1 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox1, "hbox1"); + gtk_widget_show (hbox1); + gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0); + + frame2 = gtk_frame_new (NULL); + gtk_widget_set_name (frame2, "frame2"); + gtk_widget_show (frame2); + gtk_box_pack_start (GTK_BOX (hbox1), frame2, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_NONE); + + alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_set_name (alignment3, "alignment3"); + gtk_widget_show (alignment3); + gtk_container_add (GTK_CONTAINER (frame2), alignment3); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment3), 0, 0, 12, 0); + + scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_set_name (scrolledwindow3, "scrolledwindow3"); + gtk_widget_show (scrolledwindow3); + gtk_container_add (GTK_CONTAINER (alignment3), scrolledwindow3); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN); + + main_themelist = gtk_tree_view_new (); + gtk_widget_set_name (main_themelist, "main_themelist"); + gtk_widget_show (main_themelist); + gtk_container_add (GTK_CONTAINER (scrolledwindow3), main_themelist); + GTK_WIDGET_SET_FLAGS (main_themelist, GTK_CAN_DEFAULT); + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (main_themelist), FALSE); + + label1234 = gtk_label_new ("Theme"); + gtk_widget_set_name (label1234, "label1234"); + gtk_widget_show (label1234); + gtk_frame_set_label_widget (GTK_FRAME (frame2), label1234); + gtk_label_set_use_markup (GTK_LABEL (label1234), TRUE); + + frame3 = gtk_frame_new (NULL); + gtk_widget_set_name (frame3, "frame3"); + gtk_widget_show (frame3); + gtk_box_pack_start (GTK_BOX (vbox1), frame3, FALSE, FALSE, 9); + gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_NONE); + + alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_set_name (alignment4, "alignment4"); + gtk_widget_show (alignment4); + gtk_container_add (GTK_CONTAINER (frame3), alignment4); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0); + + vbox7 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox7, "vbox7"); + gtk_widget_show (vbox7); + gtk_container_add (GTK_CONTAINER (alignment4), vbox7); + + hbox8 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox8, "hbox8"); + gtk_widget_show (hbox8); + gtk_box_pack_start (GTK_BOX (vbox7), hbox8, FALSE, FALSE, 0); + + vbox9 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox9, "vbox9"); + gtk_widget_show (vbox9); + gtk_box_pack_start (GTK_BOX (hbox8), vbox9, TRUE, TRUE, 0); + + main_use_default_font_radio = gtk_radio_button_new_with_mnemonic (NULL, "Use theme default font"); + gtk_widget_set_name (main_use_default_font_radio, "main_use_default_font_radio"); + gtk_widget_show (main_use_default_font_radio); + gtk_box_pack_start (GTK_BOX (vbox9), main_use_default_font_radio, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (main_use_default_font_radio), main_use_default_font_radio_group); + main_use_default_font_radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (main_use_default_font_radio)); + + main_use_custom_font_radio = gtk_radio_button_new_with_mnemonic (NULL, "Use custom font:"); + gtk_widget_set_name (main_use_custom_font_radio, "main_use_custom_font_radio"); + gtk_widget_show (main_use_custom_font_radio); + gtk_box_pack_start (GTK_BOX (vbox9), main_use_custom_font_radio, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (main_use_custom_font_radio), main_use_default_font_radio_group); + main_use_default_font_radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (main_use_custom_font_radio)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_use_custom_font_radio), TRUE); + + alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_set_name (alignment5, "alignment5"); + gtk_widget_show (alignment5); + gtk_box_pack_start (GTK_BOX (vbox9), alignment5, TRUE, TRUE, 0); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0); + + vbox10 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox10, "vbox10"); + gtk_widget_show (vbox10); + gtk_container_add (GTK_CONTAINER (alignment5), vbox10); + + hbox9 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox9, "hbox9"); + gtk_widget_show (hbox9); + gtk_box_pack_start (GTK_BOX (vbox10), hbox9, FALSE, FALSE, 0); + + vbox11 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox11, "vbox11"); + gtk_widget_show (vbox11); + gtk_box_pack_start (GTK_BOX (hbox9), vbox11, TRUE, TRUE, 0); + + main_font_selector_button = gtk_font_button_new (); + gtk_widget_set_name (main_font_selector_button, "main_font_selector_button"); + gtk_widget_show (main_font_selector_button); + gtk_box_pack_start (GTK_BOX (vbox11), main_font_selector_button, FALSE, FALSE, 0); + + label669 = gtk_label_new ("Font"); + gtk_widget_set_name (label669, "label669"); + gtk_widget_show (label669); + gtk_frame_set_label_widget (GTK_FRAME (frame3), label669); + gtk_label_set_use_markup (GTK_LABEL (label669), TRUE); + + vbox13 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox13, "vbox13"); + gtk_widget_show (vbox13); + gtk_box_pack_start (GTK_BOX (vbox1), vbox13, FALSE, FALSE, 0); + + hbox6666 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox6666, "hbox6666"); + gtk_widget_show (hbox6666); + gtk_box_pack_start (GTK_BOX (vbox13), hbox6666, TRUE, TRUE, 0); + + main_use_system_config_checkbutton = gtk_check_button_new_with_mnemonic ("Apply for all users"); + gtk_widget_set_name (main_use_system_config_checkbutton, "main_use_system_config_checkbutton"); + gtk_widget_show (main_use_system_config_checkbutton); + gtk_box_pack_start (GTK_BOX (hbox6666), main_use_system_config_checkbutton, FALSE, FALSE, 12); + gtk_tooltips_set_tip (tooltips, main_use_system_config_checkbutton, "If this is enabled, the program will update the system-wide configuration file. NOT RECOMMENDED!", NULL); + + main_showpreviewtoggle = gtk_toggle_button_new_with_mnemonic ("Show preview >>"); + gtk_widget_set_name (main_showpreviewtoggle, "main_showpreviewtoggle"); + gtk_widget_show (main_showpreviewtoggle); + gtk_box_pack_end (GTK_BOX (hbox6666), main_showpreviewtoggle, FALSE, FALSE, 2); + + hbuttonbox1 = gtk_hbutton_box_new (); + gtk_widget_set_name (hbuttonbox1, "hbuttonbox1"); + gtk_widget_show (hbuttonbox1); + gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, FALSE, 0); + + hbox7 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox7, "hbox7"); + gtk_widget_show (hbox7); + gtk_box_pack_start (GTK_BOX (vbox1), hbox7, FALSE, TRUE, 6); + + hbox6665 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox6665, "hbox6665"); + gtk_widget_show (hbox6665); + gtk_box_pack_start (GTK_BOX (hbox7), hbox6665, TRUE, FALSE, 0); + + image2 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_LARGE_TOOLBAR); + gtk_widget_set_name (image2, "image2"); + gtk_widget_show (image2); + gtk_box_pack_start (GTK_BOX (hbox6665), image2, FALSE, FALSE, 0); + + label2 = gtk_label_new ("You should restart your programs\nfor this change to take effect."); + gtk_widget_set_name (label2, "label2"); + gtk_widget_show (label2); + gtk_box_pack_start (GTK_BOX (hbox6665), label2, FALSE, FALSE, 0); + gtk_label_set_line_wrap (GTK_LABEL (label2), TRUE); + gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5); + + vbox6 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox6, "vbox6"); + gtk_widget_show (vbox6); + gtk_box_pack_start (GTK_BOX (vbox1), vbox6, FALSE, FALSE, 0); + + hbox5 = gtk_hbox_new (TRUE, 0); + gtk_widget_set_name (hbox5, "hbox5"); + gtk_widget_show (hbox5); + gtk_box_pack_start (GTK_BOX (vbox6), hbox5, FALSE, FALSE, 0); + gtk_container_set_border_width (GTK_CONTAINER (hbox5), 4); + + main_ok_button = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_set_name (main_ok_button, "main_ok_button"); + gtk_widget_show (main_ok_button); + gtk_box_pack_end (GTK_BOX (hbox5), main_ok_button, TRUE, TRUE, 4); + GTK_WIDGET_SET_FLAGS (main_ok_button, GTK_CAN_DEFAULT); + + main_cancel_button = gtk_button_new_from_stock ("gtk-cancel"); + gtk_widget_set_name (main_cancel_button, "main_cancel_button"); + gtk_widget_show (main_cancel_button); + gtk_box_pack_end (GTK_BOX (hbox5), main_cancel_button, TRUE, TRUE, 4); + GTK_WIDGET_SET_FLAGS (main_cancel_button, GTK_CAN_DEFAULT); + + main_reset_button = gtk_button_new (); + gtk_widget_set_name (main_reset_button, "main_reset_button"); + gtk_widget_show (main_reset_button); + gtk_box_pack_end (GTK_BOX (hbox5), main_reset_button, TRUE, TRUE, 4); + + alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_set_name (alignment2, "alignment2"); + gtk_widget_show (alignment2); + gtk_container_add (GTK_CONTAINER (main_reset_button), alignment2); + + hbox6 = gtk_hbox_new (FALSE, 2); + gtk_widget_set_name (hbox6, "hbox6"); + gtk_widget_show (hbox6); + gtk_container_add (GTK_CONTAINER (alignment2), hbox6); + + image1 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_BUTTON); + gtk_widget_set_name (image1, "image1"); + gtk_widget_show (image1); + gtk_box_pack_start (GTK_BOX (hbox6), image1, FALSE, FALSE, 0); + + label667 = gtk_label_new_with_mnemonic ("_Reset"); + gtk_widget_set_name (label667, "label667"); + gtk_widget_show (label667); + gtk_box_pack_start (GTK_BOX (hbox6), label667, FALSE, FALSE, 0); + + main_previewhbox = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (main_previewhbox, "main_previewhbox"); + gtk_box_pack_start (GTK_BOX (main_hbox), main_previewhbox, TRUE, TRUE, 0); + + vseparator2 = gtk_vseparator_new (); + gtk_widget_set_name (vseparator2, "vseparator2"); + gtk_widget_show (vseparator2); + gtk_box_pack_start (GTK_BOX (main_previewhbox), vseparator2, FALSE, TRUE, 4); + + frame4 = gtk_frame_new (NULL); + gtk_widget_set_name (frame4, "frame4"); + gtk_widget_show (frame4); + gtk_box_pack_start (GTK_BOX (main_previewhbox), frame4, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (frame4), 3); + gtk_frame_set_shadow_type (GTK_FRAME (frame4), GTK_SHADOW_NONE); + + alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_set_name (alignment6, "alignment6"); + gtk_widget_show (alignment6); + gtk_container_add (GTK_CONTAINER (frame4), alignment6); + + vbox12 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox12, "vbox12"); + gtk_widget_show (vbox12); + gtk_container_add (GTK_CONTAINER (alignment6), vbox12); + + main_previewbook = gtk_notebook_new (); + gtk_widget_set_name (main_previewbook, "main_previewbook"); + gtk_widget_show (main_previewbook); + gtk_box_pack_start (GTK_BOX (vbox12), main_previewbook, TRUE, TRUE, 0); + + table1 = gtk_table_new (3, 3, FALSE); + gtk_widget_set_name (table1, "table1"); + gtk_widget_show (table1); + gtk_container_add (GTK_CONTAINER (main_previewbook), table1); + gtk_container_set_border_width (GTK_CONTAINER (table1), 5); + + vbox2 = gtk_vbox_new (FALSE, 4); + gtk_widget_set_name (vbox2, "vbox2"); + gtk_widget_show (vbox2); + gtk_table_attach (GTK_TABLE (table1), vbox2, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + + checkbutton1 = gtk_check_button_new_with_mnemonic ("check button 1"); + gtk_widget_set_name (checkbutton1, "checkbutton1"); + gtk_widget_show (checkbutton1); + gtk_box_pack_start (GTK_BOX (vbox2), checkbutton1, FALSE, FALSE, 0); + + checkbutton2 = gtk_check_button_new_with_mnemonic ("check button 2"); + gtk_widget_set_name (checkbutton2, "checkbutton2"); + gtk_widget_show (checkbutton2); + gtk_box_pack_start (GTK_BOX (vbox2), checkbutton2, FALSE, FALSE, 0); + + button4 = gtk_button_new_with_mnemonic ("button"); + gtk_widget_set_name (button4, "button4"); + gtk_widget_show (button4); + gtk_box_pack_start (GTK_BOX (vbox2), button4, FALSE, FALSE, 0); + + togglebutton1 = gtk_toggle_button_new_with_mnemonic ("toggle button"); + gtk_widget_set_name (togglebutton1, "togglebutton1"); + gtk_widget_show (togglebutton1); + gtk_box_pack_start (GTK_BOX (vbox2), togglebutton1, FALSE, FALSE, 0); + + spinbutton1_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); + spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 0); + gtk_widget_set_name (spinbutton1, "spinbutton1"); + gtk_widget_show (spinbutton1); + gtk_box_pack_start (GTK_BOX (vbox2), spinbutton1, FALSE, FALSE, 0); + + vbox4 = gtk_vbox_new (FALSE, 4); + gtk_widget_set_name (vbox4, "vbox4"); + gtk_widget_show (vbox4); + gtk_table_attach (GTK_TABLE (table1), vbox4, 2, 3, 0, 1, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + menubar2 = gtk_menu_bar_new (); + gtk_widget_set_name (menubar2, "menubar2"); + gtk_widget_show (menubar2); + gtk_box_pack_start (GTK_BOX (vbox4), menubar2, FALSE, FALSE, 0); + + menuitem5 = gtk_menu_item_new_with_mnemonic ("_File"); + gtk_widget_set_name (menuitem5, "menuitem5"); + gtk_widget_show (menuitem5); + gtk_container_add (GTK_CONTAINER (menubar2), menuitem5); + + menuitem5_menu = gtk_menu_new (); + gtk_widget_set_name (menuitem5_menu, "menuitem5_menu"); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem5), menuitem5_menu); + + new2 = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group); + gtk_widget_set_name (new2, "new2"); + gtk_widget_show (new2); + gtk_container_add (GTK_CONTAINER (menuitem5_menu), new2); + + open2 = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group); + gtk_widget_set_name (open2, "open2"); + gtk_widget_show (open2); + gtk_container_add (GTK_CONTAINER (menuitem5_menu), open2); + + save2 = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group); + gtk_widget_set_name (save2, "save2"); + gtk_widget_show (save2); + gtk_container_add (GTK_CONTAINER (menuitem5_menu), save2); + + save_as2 = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group); + gtk_widget_set_name (save_as2, "save_as2"); + gtk_widget_show (save_as2); + gtk_container_add (GTK_CONTAINER (menuitem5_menu), save_as2); + + separatormenuitem2 = gtk_separator_menu_item_new (); + gtk_widget_set_name (separatormenuitem2, "separatormenuitem2"); + gtk_widget_show (separatormenuitem2); + gtk_container_add (GTK_CONTAINER (menuitem5_menu), separatormenuitem2); + gtk_widget_set_sensitive (separatormenuitem2, FALSE); + + quit2 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group); + gtk_widget_set_name (quit2, "quit2"); + gtk_widget_show (quit2); + gtk_container_add (GTK_CONTAINER (menuitem5_menu), quit2); + + menuitem6 = gtk_menu_item_new_with_mnemonic ("_Edit"); + gtk_widget_set_name (menuitem6, "menuitem6"); + gtk_widget_show (menuitem6); + gtk_container_add (GTK_CONTAINER (menubar2), menuitem6); + + menuitem6_menu = gtk_menu_new (); + gtk_widget_set_name (menuitem6_menu, "menuitem6_menu"); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem6), menuitem6_menu); + + cut2 = gtk_image_menu_item_new_from_stock ("gtk-cut", accel_group); + gtk_widget_set_name (cut2, "cut2"); + gtk_widget_show (cut2); + gtk_container_add (GTK_CONTAINER (menuitem6_menu), cut2); + + copy2 = gtk_image_menu_item_new_from_stock ("gtk-copy", accel_group); + gtk_widget_set_name (copy2, "copy2"); + gtk_widget_show (copy2); + gtk_container_add (GTK_CONTAINER (menuitem6_menu), copy2); + + paste2 = gtk_image_menu_item_new_from_stock ("gtk-paste", accel_group); + gtk_widget_set_name (paste2, "paste2"); + gtk_widget_show (paste2); + gtk_container_add (GTK_CONTAINER (menuitem6_menu), paste2); + + delete2 = gtk_image_menu_item_new_from_stock ("gtk-delete", accel_group); + gtk_widget_set_name (delete2, "delete2"); + gtk_widget_show (delete2); + gtk_container_add (GTK_CONTAINER (menuitem6_menu), delete2); + + menuitem8 = gtk_menu_item_new_with_mnemonic ("_Help"); + gtk_widget_set_name (menuitem8, "menuitem8"); + gtk_widget_show (menuitem8); + gtk_container_add (GTK_CONTAINER (menubar2), menuitem8); + + menuitem8_menu = gtk_menu_new (); + gtk_widget_set_name (menuitem8_menu, "menuitem8_menu"); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem8), menuitem8_menu); + + about2 = gtk_menu_item_new_with_mnemonic ("_About"); + gtk_widget_set_name (about2, "about2"); + gtk_widget_show (about2); + gtk_container_add (GTK_CONTAINER (menuitem8_menu), about2); + + combobox1 = gtk_combo_box_new_text (); + gtk_widget_set_name (combobox1, "combobox1"); + gtk_widget_show (combobox1); + gtk_box_pack_start (GTK_BOX (vbox4), combobox1, FALSE, FALSE, 0); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox1), "item 1"); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox1), "item 2"); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox1), "item 3"); + + comboboxentry1 = gtk_combo_box_entry_new_text (); + gtk_widget_set_name (comboboxentry1, "comboboxentry1"); + gtk_widget_show (comboboxentry1); + gtk_box_pack_start (GTK_BOX (vbox4), comboboxentry1, FALSE, FALSE, 0); + gtk_widget_set_size_request (comboboxentry1, 80, 25); + gtk_combo_box_append_text (GTK_COMBO_BOX (comboboxentry1), "item 1"); + gtk_combo_box_append_text (GTK_COMBO_BOX (comboboxentry1), "item 2"); + gtk_combo_box_append_text (GTK_COMBO_BOX (comboboxentry1), "item 3"); + + hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (15, 0, 50, 1, 0, 0))); + gtk_widget_set_name (hscale1, "hscale1"); + gtk_widget_show (hscale1); + gtk_box_pack_start (GTK_BOX (vbox4), hscale1, TRUE, TRUE, 0); + gtk_scale_set_digits (GTK_SCALE (hscale1), 0); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_set_name (scrolledwindow1, "scrolledwindow1"); + gtk_widget_show (scrolledwindow1); + gtk_table_attach (GTK_TABLE (table1), scrolledwindow1, 2, 3, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + + preview_treeview = gtk_tree_view_new (); + gtk_widget_set_name (preview_treeview, "preview_treeview"); + gtk_widget_show (preview_treeview); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), preview_treeview); + gtk_tree_view_set_reorderable (GTK_TREE_VIEW (preview_treeview), TRUE); + + statusbar1 = gtk_statusbar_new (); + gtk_widget_set_name (statusbar1, "statusbar1"); + gtk_widget_show (statusbar1); + gtk_table_attach (GTK_TABLE (table1), statusbar1, 1, 3, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_widget_set_size_request (statusbar1, 6, 20); + + progressbar1 = gtk_progress_bar_new (); + gtk_widget_set_name (progressbar1, "progressbar1"); + gtk_widget_show (progressbar1); + gtk_table_attach (GTK_TABLE (table1), progressbar1, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_widget_set_size_request (progressbar1, 80, 20); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar1), 0.56); + gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar1), "56%"); + + vseparator1 = gtk_vseparator_new (); + gtk_widget_set_name (vseparator1, "vseparator1"); + gtk_widget_show (vseparator1); + gtk_table_attach (GTK_TABLE (table1), vseparator1, 1, 2, 0, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 5, 0); + + frame1 = gtk_frame_new (NULL); + gtk_widget_set_name (frame1, "frame1"); + gtk_widget_show (frame1); + gtk_table_attach (GTK_TABLE (table1), frame1, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND), 0, 0); + gtk_frame_set_label_align (GTK_FRAME (frame1), 0.5, 0.5); + + vbox3 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox3, "vbox3"); + gtk_widget_show (vbox3); + gtk_container_add (GTK_CONTAINER (frame1), vbox3); + gtk_container_set_border_width (GTK_CONTAINER (vbox3), 5); + + radiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, "radio 1"); + gtk_widget_set_name (radiobutton1, "radiobutton1"); + gtk_widget_show (radiobutton1); + gtk_box_pack_start (GTK_BOX (vbox3), radiobutton1, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton1), radiobutton1_group); + radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton1)); + + radiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, "radio 2"); + gtk_widget_set_name (radiobutton2, "radiobutton2"); + gtk_widget_show (radiobutton2); + gtk_box_pack_start (GTK_BOX (vbox3), radiobutton2, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton2), radiobutton1_group); + radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton2)); + + radiobutton3 = gtk_radio_button_new_with_mnemonic (NULL, "radio 3"); + gtk_widget_set_name (radiobutton3, "radiobutton3"); + gtk_widget_show (radiobutton3); + gtk_box_pack_start (GTK_BOX (vbox3), radiobutton3, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton3), radiobutton1_group); + radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton3)); + + label6 = gtk_label_new ("frame"); + gtk_widget_set_name (label6, "label6"); + gtk_widget_show (label6); + gtk_frame_set_label_widget (GTK_FRAME (frame1), label6); + gtk_misc_set_padding (GTK_MISC (label6), 1, 0); + + label4 = gtk_label_new ("Common widgets"); + gtk_widget_set_name (label4, "label4"); + gtk_widget_show (label4); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_previewbook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_previewbook), 0), label4); + + scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_set_name (scrolledwindow2, "scrolledwindow2"); + gtk_widget_show (scrolledwindow2); + gtk_container_add (GTK_CONTAINER (main_previewbook), scrolledwindow2); + + textview1 = gtk_text_view_new (); + gtk_widget_set_name (textview1, "textview1"); + gtk_widget_show (textview1); + gtk_container_add (GTK_CONTAINER (scrolledwindow2), textview1); + gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (textview1), GTK_WRAP_WORD); + gtk_text_view_set_left_margin (GTK_TEXT_VIEW (textview1), 8); + gtk_text_view_set_right_margin (GTK_TEXT_VIEW (textview1), 8); + gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview1)), "You can type some text here.\nYou can also click the right mouse button for a popup menu.", -1); + + label5 = gtk_label_new ("Text area"); + gtk_widget_set_name (label5, "label5"); + gtk_widget_show (label5); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_previewbook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_previewbook), 1), label5); + + vbox5 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox5, "vbox5"); + gtk_widget_show (vbox5); + gtk_container_add (GTK_CONTAINER (main_previewbook), vbox5); + + hbox4 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox4, "hbox4"); + gtk_widget_show (hbox4); + gtk_box_pack_start (GTK_BOX (vbox5), hbox4, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (hbox4), 7); + + about_label = gtk_label_new (""); + gtk_widget_set_name (about_label, "about_label"); + gtk_widget_show (about_label); + gtk_box_pack_start (GTK_BOX (hbox4), about_label, FALSE, FALSE, 0); + gtk_label_set_line_wrap (GTK_LABEL (about_label), TRUE); + + label666 = gtk_label_new ("About"); + gtk_widget_set_name (label666, "label666"); + gtk_widget_show (label666); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_previewbook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_previewbook), 2), label666); + + label670 = gtk_label_new ("Preview"); + gtk_widget_set_name (label670, "label670"); + gtk_widget_show (label670); + gtk_frame_set_label_widget (GTK_FRAME (frame4), label670); + gtk_label_set_use_markup (GTK_LABEL (label670), TRUE); + + g_signal_connect ((gpointer) main_window, "delete_event", + G_CALLBACK (on_main_window_delete_event), + NULL); + g_signal_connect ((gpointer) main_use_default_font_radio, "toggled", + G_CALLBACK (on_main_use_default_font_radio_toggled), + NULL); + g_signal_connect ((gpointer) main_font_selector_button, "font_set", + G_CALLBACK (on_main_font_selector_button_font_set), + NULL); + g_signal_connect ((gpointer) main_showpreviewtoggle, "toggled", + G_CALLBACK (on_main_showpreviewtoggle_toggled), + NULL); + g_signal_connect ((gpointer) main_ok_button, "clicked", + G_CALLBACK (on_main_ok_button_clicked), + NULL); + g_signal_connect ((gpointer) main_cancel_button, "clicked", + G_CALLBACK (on_main_cancel_button_clicked), + NULL); + g_signal_connect ((gpointer) main_reset_button, "clicked", + G_CALLBACK (on_main_reset_button_clicked), + NULL); + g_signal_connect ((gpointer) new2, "activate", + G_CALLBACK (on_new2_activate), + NULL); + g_signal_connect ((gpointer) open2, "activate", + G_CALLBACK (on_open2_activate), + NULL); + g_signal_connect ((gpointer) save2, "activate", + G_CALLBACK (on_save2_activate), + NULL); + g_signal_connect ((gpointer) save_as2, "activate", + G_CALLBACK (on_save_as2_activate), + NULL); + g_signal_connect ((gpointer) quit2, "activate", + G_CALLBACK (on_quit2_activate), + NULL); + g_signal_connect ((gpointer) cut2, "activate", + G_CALLBACK (on_cut2_activate), + NULL); + g_signal_connect ((gpointer) copy2, "activate", + G_CALLBACK (on_copy2_activate), + NULL); + g_signal_connect ((gpointer) paste2, "activate", + G_CALLBACK (on_paste2_activate), + NULL); + g_signal_connect ((gpointer) delete2, "activate", + G_CALLBACK (on_delete2_activate), + NULL); + g_signal_connect ((gpointer) about2, "activate", + G_CALLBACK (on_about2_activate), + NULL); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (main_window, main_window, "main_window"); + GLADE_HOOKUP_OBJECT (main_window, main_hbox, "main_hbox"); + GLADE_HOOKUP_OBJECT (main_window, vbox1, "vbox1"); + GLADE_HOOKUP_OBJECT (main_window, hbox1, "hbox1"); + GLADE_HOOKUP_OBJECT (main_window, frame2, "frame2"); + GLADE_HOOKUP_OBJECT (main_window, alignment3, "alignment3"); + GLADE_HOOKUP_OBJECT (main_window, scrolledwindow3, "scrolledwindow3"); + GLADE_HOOKUP_OBJECT (main_window, main_themelist, "main_themelist"); + GLADE_HOOKUP_OBJECT (main_window, label1234, "label1234"); + GLADE_HOOKUP_OBJECT (main_window, frame3, "frame3"); + GLADE_HOOKUP_OBJECT (main_window, alignment4, "alignment4"); + GLADE_HOOKUP_OBJECT (main_window, vbox7, "vbox7"); + GLADE_HOOKUP_OBJECT (main_window, hbox8, "hbox8"); + GLADE_HOOKUP_OBJECT (main_window, vbox9, "vbox9"); + GLADE_HOOKUP_OBJECT (main_window, main_use_default_font_radio, "main_use_default_font_radio"); + GLADE_HOOKUP_OBJECT (main_window, main_use_custom_font_radio, "main_use_custom_font_radio"); + GLADE_HOOKUP_OBJECT (main_window, alignment5, "alignment5"); + GLADE_HOOKUP_OBJECT (main_window, vbox10, "vbox10"); + GLADE_HOOKUP_OBJECT (main_window, hbox9, "hbox9"); + GLADE_HOOKUP_OBJECT (main_window, vbox11, "vbox11"); + GLADE_HOOKUP_OBJECT (main_window, main_font_selector_button, "main_font_selector_button"); + GLADE_HOOKUP_OBJECT (main_window, label669, "label669"); + GLADE_HOOKUP_OBJECT (main_window, vbox13, "vbox13"); + GLADE_HOOKUP_OBJECT (main_window, hbox6666, "hbox6666"); + GLADE_HOOKUP_OBJECT (main_window, main_use_system_config_checkbutton, "main_use_system_config_checkbutton"); + GLADE_HOOKUP_OBJECT (main_window, main_showpreviewtoggle, "main_showpreviewtoggle"); + GLADE_HOOKUP_OBJECT (main_window, hbuttonbox1, "hbuttonbox1"); + GLADE_HOOKUP_OBJECT (main_window, hbox7, "hbox7"); + GLADE_HOOKUP_OBJECT (main_window, hbox6665, "hbox6665"); + GLADE_HOOKUP_OBJECT (main_window, image2, "image2"); + GLADE_HOOKUP_OBJECT (main_window, label2, "label2"); + GLADE_HOOKUP_OBJECT (main_window, vbox6, "vbox6"); + GLADE_HOOKUP_OBJECT (main_window, hbox5, "hbox5"); + GLADE_HOOKUP_OBJECT (main_window, main_ok_button, "main_ok_button"); + GLADE_HOOKUP_OBJECT (main_window, main_cancel_button, "main_cancel_button"); + GLADE_HOOKUP_OBJECT (main_window, main_reset_button, "main_reset_button"); + GLADE_HOOKUP_OBJECT (main_window, alignment2, "alignment2"); + GLADE_HOOKUP_OBJECT (main_window, hbox6, "hbox6"); + GLADE_HOOKUP_OBJECT (main_window, image1, "image1"); + GLADE_HOOKUP_OBJECT (main_window, label667, "label667"); + GLADE_HOOKUP_OBJECT (main_window, main_previewhbox, "main_previewhbox"); + GLADE_HOOKUP_OBJECT (main_window, vseparator2, "vseparator2"); + GLADE_HOOKUP_OBJECT (main_window, frame4, "frame4"); + GLADE_HOOKUP_OBJECT (main_window, alignment6, "alignment6"); + GLADE_HOOKUP_OBJECT (main_window, vbox12, "vbox12"); + GLADE_HOOKUP_OBJECT (main_window, main_previewbook, "main_previewbook"); + GLADE_HOOKUP_OBJECT (main_window, table1, "table1"); + GLADE_HOOKUP_OBJECT (main_window, vbox2, "vbox2"); + GLADE_HOOKUP_OBJECT (main_window, checkbutton1, "checkbutton1"); + GLADE_HOOKUP_OBJECT (main_window, checkbutton2, "checkbutton2"); + GLADE_HOOKUP_OBJECT (main_window, button4, "button4"); + GLADE_HOOKUP_OBJECT (main_window, togglebutton1, "togglebutton1"); + GLADE_HOOKUP_OBJECT (main_window, spinbutton1, "spinbutton1"); + GLADE_HOOKUP_OBJECT (main_window, vbox4, "vbox4"); + GLADE_HOOKUP_OBJECT (main_window, menubar2, "menubar2"); + GLADE_HOOKUP_OBJECT (main_window, menuitem5, "menuitem5"); + GLADE_HOOKUP_OBJECT (main_window, menuitem5_menu, "menuitem5_menu"); + GLADE_HOOKUP_OBJECT (main_window, new2, "new2"); + GLADE_HOOKUP_OBJECT (main_window, open2, "open2"); + GLADE_HOOKUP_OBJECT (main_window, save2, "save2"); + GLADE_HOOKUP_OBJECT (main_window, save_as2, "save_as2"); + GLADE_HOOKUP_OBJECT (main_window, separatormenuitem2, "separatormenuitem2"); + GLADE_HOOKUP_OBJECT (main_window, quit2, "quit2"); + GLADE_HOOKUP_OBJECT (main_window, menuitem6, "menuitem6"); + GLADE_HOOKUP_OBJECT (main_window, menuitem6_menu, "menuitem6_menu"); + GLADE_HOOKUP_OBJECT (main_window, cut2, "cut2"); + GLADE_HOOKUP_OBJECT (main_window, copy2, "copy2"); + GLADE_HOOKUP_OBJECT (main_window, paste2, "paste2"); + GLADE_HOOKUP_OBJECT (main_window, delete2, "delete2"); + GLADE_HOOKUP_OBJECT (main_window, menuitem8, "menuitem8"); + GLADE_HOOKUP_OBJECT (main_window, menuitem8_menu, "menuitem8_menu"); + GLADE_HOOKUP_OBJECT (main_window, about2, "about2"); + GLADE_HOOKUP_OBJECT (main_window, combobox1, "combobox1"); + GLADE_HOOKUP_OBJECT (main_window, comboboxentry1, "comboboxentry1"); + GLADE_HOOKUP_OBJECT (main_window, hscale1, "hscale1"); + GLADE_HOOKUP_OBJECT (main_window, scrolledwindow1, "scrolledwindow1"); + GLADE_HOOKUP_OBJECT (main_window, preview_treeview, "preview_treeview"); + GLADE_HOOKUP_OBJECT (main_window, statusbar1, "statusbar1"); + GLADE_HOOKUP_OBJECT (main_window, progressbar1, "progressbar1"); + GLADE_HOOKUP_OBJECT (main_window, vseparator1, "vseparator1"); + GLADE_HOOKUP_OBJECT (main_window, frame1, "frame1"); + GLADE_HOOKUP_OBJECT (main_window, vbox3, "vbox3"); + GLADE_HOOKUP_OBJECT (main_window, radiobutton1, "radiobutton1"); + GLADE_HOOKUP_OBJECT (main_window, radiobutton2, "radiobutton2"); + GLADE_HOOKUP_OBJECT (main_window, radiobutton3, "radiobutton3"); + GLADE_HOOKUP_OBJECT (main_window, label6, "label6"); + GLADE_HOOKUP_OBJECT (main_window, label4, "label4"); + GLADE_HOOKUP_OBJECT (main_window, scrolledwindow2, "scrolledwindow2"); + GLADE_HOOKUP_OBJECT (main_window, textview1, "textview1"); + GLADE_HOOKUP_OBJECT (main_window, label5, "label5"); + GLADE_HOOKUP_OBJECT (main_window, vbox5, "vbox5"); + GLADE_HOOKUP_OBJECT (main_window, hbox4, "hbox4"); + GLADE_HOOKUP_OBJECT (main_window, about_label, "about_label"); + GLADE_HOOKUP_OBJECT (main_window, label666, "label666"); + GLADE_HOOKUP_OBJECT (main_window, label670, "label670"); + GLADE_HOOKUP_OBJECT_NO_REF (main_window, tooltips, "tooltips"); + + gtk_widget_grab_default (main_themelist); + gtk_window_add_accel_group (GTK_WINDOW (main_window), accel_group); + + return main_window; +} + diff --git a/src/gtk2-prefs/interface.h b/src/gtk2-prefs/interface.h new file mode 100644 index 00000000..11c79152 --- /dev/null +++ b/src/gtk2-prefs/interface.h @@ -0,0 +1,5 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +GtkWidget* create_main_window (void); diff --git a/src/gtk2-prefs/main.cpp b/src/gtk2-prefs/main.cpp new file mode 100644 index 00000000..334c23d1 --- /dev/null +++ b/src/gtk2-prefs/main.cpp @@ -0,0 +1,611 @@ +/*************************************************************************** + main.cpp - description + ------------------- + begin : Wed Jan 1 19:06:46 GMT+4 2003 + copyright : (C) 2003 - 2005 by Alex Shaduri + email : ashaduri '@' gmail.com + ***************************************************************************/ + + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include + +#ifdef _WIN32 +#include "win32util.h" +#include +#else +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "interface.h" +#include "callbacks.h" +#include "support.h" + +#include "main.h" + + +// ------------------------------------------------------ + + + +GtkWidget* g_main_window = 0; +// GtkWidget* g_fontsel_dialog = 0; + + +static std::string s_tmp_file; + + + +// ------------------------------------------------------ + + + +static std::string gchar_to_string(gchar* gstr) +{ + std::string str = (gstr ? gstr : ""); + g_free(gstr); + return str; +} + + + +std::string get_home_dir() +{ + std::string dir; + + if (g_get_home_dir()) + dir = g_get_home_dir(); + +#ifdef _WIN32 + if (dir == "") { + dir = win32_get_registry_value_string(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal"); + } + if (dir == "") { + dir = win32_get_registry_value_string(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "User"); + } +#endif + + return dir; + +} + + + + +// ------------------------------------------------------ + + +static std::string s_orig_theme; +static std::string s_orig_font; + +std::string& get_orig_theme() +{ + return s_orig_theme; +} + + +std::string& get_orig_font() +{ + return s_orig_font; +} + + +// ------------------------------------------------------ + + +std::string get_current_theme() +{ + + GtkSettings* settings = gtk_settings_get_default(); + gchar* theme; + g_object_get(settings, "gtk-theme-name", &theme, NULL); + + return gchar_to_string(theme); +} + + + + +std::string get_current_font() +{ + return gchar_to_string(pango_font_description_to_string(gtk_rc_get_style(g_main_window)->font_desc)); +} + + + +// ------------------------------------------------------ + + + +std::string get_selected_theme() +{ + GtkTreeView* treeview = GTK_TREE_VIEW(lookup_widget(g_main_window, "main_themelist")); + GtkTreeModel* model = gtk_tree_view_get_model(treeview); + GtkTreeSelection* selection = gtk_tree_view_get_selection(treeview); + + GtkTreeIter iter; + gtk_tree_selection_get_selected(selection, 0, &iter); + + gchar* theme_name; + gtk_tree_model_get(model, &iter, 0, &theme_name, -1); +// std::cout << theme_name << "\n"; + return gchar_to_string(theme_name); +} + + + +std::string get_selected_font() +{ +// GtkWidget* fontentry = lookup_widget(g_main_window, "main_fontentry"); +// return gtk_entry_get_text(GTK_ENTRY(fontentry)); + + bool default_font = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(g_main_window, "main_use_default_font_radio"))); + + if (default_font) + return ""; + + GtkWidget* fontbutton = lookup_widget(g_main_window, "main_font_selector_button"); + return gtk_font_button_get_font_name(GTK_FONT_BUTTON(fontbutton)); +} + + +// ------------------------------------------------------ + + + +static void themelist_selection_changed_cb(GtkTreeSelection* selection, gpointer data) +{ + if (gtk_tree_selection_get_selected (selection, 0, 0)) + apply_theme(get_selected_theme(), get_current_font()); +} + + + +// ------------------------------------------------------ + + + +static void populate_with_themes(GtkWidget* w) +{ + + std::string search_path = gchar_to_string(gtk_rc_get_theme_dir()); + //std::string search_path = gchar_to_string(g_build_filename("lib", "gtk-2.0", "2.10.0", "engines", NULL)); + + if (search_path.size() && search_path[search_path.size() -1] != G_DIR_SEPARATOR) + search_path += G_DIR_SEPARATOR_S; + + GDir* gdir = g_dir_open(search_path.c_str(), 0, NULL); + if (gdir == NULL) + return; + + + char* name; + GList* glist = 0; + + while ( (name = const_cast(g_dir_read_name(gdir))) != NULL ) { + std::string filename = name; + +// if (g_ascii_strup(fname.c_str(), -1) == "Default") +// continue; + + std::string fullname = search_path + filename; + std::string rc = fullname; rc += G_DIR_SEPARATOR_S; rc += "gtk-2.0"; rc += G_DIR_SEPARATOR_S; rc += "gtkrc"; + + bool is_dir = 0; + if (g_file_test(fullname.c_str(), G_FILE_TEST_IS_DIR)) + is_dir = 1; + + if (is_dir && g_file_test(rc.c_str(), G_FILE_TEST_IS_REGULAR)) { + glist = g_list_insert_sorted(glist, g_strdup(filename.c_str()), (GCompareFunc)strcmp); + } + } + + g_dir_close(gdir); + + + + + // ---------------- tree + + + GtkTreeView* treeview = GTK_TREE_VIEW(w); + GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING); + gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); + + GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes ( + "Theme", gtk_cell_renderer_text_new(), + "text", 0, + NULL); + gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_GROW_ONLY); + gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); + + + GtkTreeIter iter; + + int i =0, curr=0; + while (char* theme = (char*)g_list_nth_data(glist, i)) { + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, 0, theme, -1); + + if (strcmp(theme, get_current_theme().c_str()) == 0) { + curr = i; + } + + ++i; + } + + + GtkTreeSelection* selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); + + // set the default theme + + // THIS IS IMPORTANT!!! + gtk_widget_grab_focus(w); + + std::stringstream str; + str << curr; + GtkTreePath* selpath = gtk_tree_path_new_from_string (str.str().c_str()); + if (selpath) { + gtk_tree_selection_select_path(selection, selpath); + gtk_tree_view_scroll_to_cell(treeview, selpath, NULL, true, 0.5, 0.0); + gtk_tree_path_free(selpath); + } + + g_signal_connect (G_OBJECT (selection), "changed", + G_CALLBACK (themelist_selection_changed_cb), NULL); + + g_object_unref (G_OBJECT (store)); + + + // ---------------- font + +// GtkWidget* fontentry = lookup_widget(g_main_window, "main_fontentry"); +// gtk_entry_set_text(GTK_ENTRY(fontentry), get_current_font().c_str()); + + GtkWidget* fontbutton = lookup_widget(g_main_window, "main_font_selector_button"); + gtk_font_button_set_font_name(GTK_FONT_BUTTON(fontbutton), get_current_font().c_str()); + + +} + + + + +// ------------------------------------------------------ + +#ifdef _WIN32 +static void redirect_to_file (const gchar* log_domain, GLogLevelFlags log_level, + const gchar* message, gpointer user_data) +{ + std::fstream f; + f.open("g_stdout.txt", std::ios::app); + f << message << "\n"; + f.close(); +} +#endif + +// ------------------------------------------------------ + + + + +int main(int argc, char *argv[]) +{ + + // work around pango weirdness +#ifdef _WIN32 + // no longer needed as of pango 1.2.5, but won't do any harm +// putenv("PANGO_WIN32_NO_UNISCRIBE=1"); +#endif + + + + + std::string user = g_get_user_name(); + std::string tmp = g_get_tmp_dir(); + std::string tmp_file = tmp + G_DIR_SEPARATOR_S + "gtk_prefs_tmprc_" + user; + s_tmp_file = tmp_file; + gtk_rc_add_default_file(tmp_file.c_str()); + + + + gtk_init (&argc, &argv); + + // redirect gtk warnings to file when in win32 +#if defined _WIN32 && !defined DEBUG + g_log_set_handler ("GLib", GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL + | G_LOG_FLAG_RECURSION), redirect_to_file, NULL); + g_log_set_handler ("GModule", GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL + | G_LOG_FLAG_RECURSION), redirect_to_file, NULL); + g_log_set_handler ("GLib-GObject", GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL + | G_LOG_FLAG_RECURSION), redirect_to_file, NULL); + g_log_set_handler ("GThread", GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL + | G_LOG_FLAG_RECURSION), redirect_to_file, NULL); + g_log_set_handler ("Gtk", GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL + | G_LOG_FLAG_RECURSION), redirect_to_file, NULL); + g_log_set_handler ("Gdk", GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL + | G_LOG_FLAG_RECURSION), redirect_to_file, NULL); + g_log_set_handler ("GdkPixbuf", GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL + | G_LOG_FLAG_RECURSION), redirect_to_file, NULL); +#endif + + + add_pixmap_directory("."); + + g_main_window = create_main_window(); + + + populate_with_themes(lookup_widget(g_main_window, "main_themelist")); + + + std::string about_text = std::string("Gtk2 Theme Selector v") + "\n\ +\n\ +by Alex Shaduri \n\ +\n\ + The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided \"AS IS\", and you, its user, assume the entire risk as to its quality and accuracy.\n\ +\n\ + This is free software, and you are welcome to redistribute it under terms of GNU General Public License v2."; + + + gtk_label_set_text(GTK_LABEL(lookup_widget(g_main_window, "about_label")), about_text.c_str()); + + + GtkTreeView* treeview = GTK_TREE_VIEW(lookup_widget(g_main_window, "preview_treeview")); + GtkTreeStore *store = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_INT); + gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); + + + GtkTreeViewColumn* column1 = gtk_tree_view_column_new_with_attributes ("Text", gtk_cell_renderer_text_new(), "text", 0, NULL); + gtk_tree_view_column_set_sizing(column1, GTK_TREE_VIEW_COLUMN_GROW_ONLY); + gtk_tree_view_column_set_resizable(column1, true); + gtk_tree_view_column_set_reorderable (column1, true); + gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column1); + + GtkTreeViewColumn* column2 = gtk_tree_view_column_new_with_attributes ("Number", gtk_cell_renderer_text_new(), "text", 1, NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column2); + + + GtkTreeIter iter1, iter2; + + gtk_tree_store_append (store, &iter1, NULL); + gtk_tree_store_set (store, &iter1, 0, "Parent 2", 1, 66, -1); + + gtk_tree_store_append (store, &iter1, NULL); + gtk_tree_store_set (store, &iter1, 0, "Parent 1", 1, 65, -1); + + gtk_tree_store_append (store, &iter2, &iter1); + gtk_tree_store_set (store, &iter2, 0, "Child 1", 1, 67, -1); + + gtk_tree_view_column_set_sort_column_id(column1, 0); + gtk_tree_view_column_set_sort_order (column1, GTK_SORT_ASCENDING); + gtk_tree_view_column_set_sort_indicator(column1, true); + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), 0, GTK_SORT_ASCENDING); + + g_object_unref (G_OBJECT (store)); + + + get_orig_theme() = get_current_theme(); + get_orig_font() = get_current_font(); + + + gtk_widget_show (g_main_window); + + + gtk_main(); + + return EXIT_SUCCESS; + +} + + + +// ------------------------------- + + + +void set_theme(const std::string& theme_name, const std::string& font) +{ + // set widgets accordingly + + // tree + GtkTreeView* treeview = GTK_TREE_VIEW(lookup_widget(g_main_window, "main_themelist")); + GtkTreeModel* model = gtk_tree_view_get_model(treeview); + GtkTreeSelection* selection = gtk_tree_view_get_selection(treeview); + + GtkTreeIter iter; + gtk_tree_model_get_iter_first(model, &iter); + + while(gtk_tree_model_iter_next(model, &iter)) { + + gchar* text; + gtk_tree_model_get (model, &iter, 0, &text, -1); + std::string theme = gchar_to_string(text); + + if (theme_name == theme) { + gtk_tree_selection_select_iter(selection, &iter); + break; + } + + } + + + // font +// GtkWidget* fontentry = lookup_widget(g_main_window, "main_fontentry"); +// gtk_entry_set_text(GTK_ENTRY(fontentry), font.c_str()); + + if (font != "") { + GtkWidget* fontbutton = lookup_widget(g_main_window, "main_font_selector_button"); + gtk_font_button_set_font_name(GTK_FONT_BUTTON(fontbutton), get_current_font().c_str()); + } + + + apply_theme(get_selected_theme(), get_selected_font()); + +} + + + + +void apply_theme(const std::string& theme_name, const std::string& font) +{ + + std::stringstream strstr; + strstr << "gtk-theme-name = \"" << theme_name << "\"\n"; + + if (font != "") + strstr << "style \"user-font\"\n{\nfont_name=\"" << font << "\"\n}\nwidget_class \"*\" style \"user-font\""; + +// std::cout << strstr.str() << "\n\n\n"; + std::fstream f; + f.open(s_tmp_file.c_str(), std::ios::out); + f << strstr.str(); + f.close(); + + + GtkSettings* settings = gtk_settings_get_default(); + + gtk_rc_reparse_all_for_settings (settings, true); +// gtk_rc_parse_string(strstr.str().c_str()); +// gtk_rc_parse("/root/.gtk-tmp"); +// gtk_rc_reset_styles(settings); + + unlink(s_tmp_file.c_str()); + + while (gtk_events_pending()) + gtk_main_iteration(); + + +} + + + + +#ifdef _WIN32 +#ifdef HAVE_DIRECT_H +#include +#define mkdir(a) _mkdir(a) +#else +#define mkdir(a, b) mkdir(a) +#endif +#endif + + +bool save_current_theme() +{ + + std::string conf_file = ""; + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(g_main_window, "main_use_system_config_checkbutton")))) { + + char* themes_dir_c = gtk_rc_get_theme_dir(); + char* conf_file_c = g_build_filename(themes_dir_c, "..", "..", "etc", "gtk-2.0", "gtkrc", NULL); + + conf_file = (conf_file_c ? conf_file_c : ""); + + // file doesn't exist, try to get it from gtk. + if (!g_file_test(conf_file.c_str(), G_FILE_TEST_EXISTS)) { + + gchar** rc_files = gtk_rc_get_default_files(); + if (rc_files[0] != 0) { + conf_file = rc_files[0]; + } + + } + + + g_free(themes_dir_c); + g_free(conf_file_c); + + + // mkdir a directory, only one level deep + char* etc = g_path_get_dirname(conf_file.c_str()); + if (!g_file_test(etc, G_FILE_TEST_IS_DIR)) { + mkdir(etc, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); + } + g_free(etc); + + + } else { + + conf_file = get_home_dir(); + + if (conf_file[conf_file.length()-1] != G_DIR_SEPARATOR) + conf_file += G_DIR_SEPARATOR_S; + + conf_file += ".gtkrc-2.0"; + + } + + + + // ask + + GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget* dialog = gtk_dialog_new_with_buttons ("Query", GTK_WINDOW(window), + GtkDialogFlags(GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL), + GTK_STOCK_NO, GTK_RESPONSE_REJECT, + GTK_STOCK_YES, GTK_RESPONSE_ACCEPT, + NULL); + gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); + GtkWidget* hbox = gtk_hbox_new(1, 1); + gtk_container_set_border_width(GTK_CONTAINER(hbox), 10); + + gtk_container_add (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); + gtk_container_add (GTK_CONTAINER(hbox), + gtk_label_new((std::string("\n\nThe file \"") + conf_file + "\" will be overwritten.\nAre you sure?\n\n").c_str())); + + gtk_widget_show_all (dialog); + + bool ret = 0; + gint result = gtk_dialog_run (GTK_DIALOG (dialog)); + switch (result) { + case GTK_RESPONSE_ACCEPT: + ret = 1; + break; + } + gtk_widget_destroy(dialog); + gtk_widget_destroy(window); + + if (!ret) // the user pressed "No". + return false; + + + std::string font = get_selected_font(); + + std::fstream f; + f.open(conf_file.c_str(), std::ios::out); + f << "# Auto-written by gtk2_prefs. Do not edit.\n\n"; + f << "gtk-theme-name = \"" << get_selected_theme() << "\"\n"; + + if (font != "") + f << "style \"user-font\"\n{\n\tfont_name=\"" << font << "\"\n}\nwidget_class \"*\" style \"user-font\""; + f.close(); + + + return true; + +} + + + + +void program_shutdown() +{ + gtk_main_quit(); +} + + + + + diff --git a/src/gtk2-prefs/main.h b/src/gtk2-prefs/main.h new file mode 100644 index 00000000..ab4e5cbd --- /dev/null +++ b/src/gtk2-prefs/main.h @@ -0,0 +1,32 @@ +/*************************************************************************** + main.cpp - description + ------------------- + begin : Wed Jan 1 2003 + copyright : (C) 2003 - 2005 by Alex Shaduri + email : ashaduri '@' gmail.com + ***************************************************************************/ + +#ifndef _MAIN_H_ +#define _MAIN_H_ + + +#include + + +std::string& get_orig_theme(); +std::string& get_orig_font(); + +std::string get_current_theme(); +std::string get_current_font(); + +std::string get_selected_theme(); +std::string get_selected_font(); + +void set_theme(const std::string& theme_name, const std::string& font); +void apply_theme(const std::string& theme_name, const std::string& font); +bool save_current_theme(); + +void program_shutdown(); + + +#endif diff --git a/src/gtk2-prefs/makefile.mak b/src/gtk2-prefs/makefile.mak new file mode 100644 index 00000000..1eeeb565 --- /dev/null +++ b/src/gtk2-prefs/makefile.mak @@ -0,0 +1,24 @@ +include "..\makeinc.mak" + +TARGET = gtk2-prefs.exe + +PREF_OBJECTS = \ +callbacks.obj \ +interface.obj \ +support.obj \ +win32util.obj \ +main.obj + +CPPFLAGS = $(CPPFLAGS) /D_STL70_ /D_STATIC_CPPLIB /EHsc /DHAVE_CONFIG_H + +all: $(PREF_OBJECTS) $(TARGET) + +.cpp.obj: + $(CC) $(CPPFLAGS) $(GLIB) $(GTK) /I. /c $< + +$(TARGET): $(PREF_OBJECTS) + $(LINK) /out:$(TARGET) /entry:mainCRTStartup $(LDFLAGS) $(PREF_OBJECTS) ntstc_msvcrt.lib $(LIBS) + +clean: + del $(TARGET) + del *.obj diff --git a/src/gtk2-prefs/support.cpp b/src/gtk2-prefs/support.cpp new file mode 100644 index 00000000..bb19f284 --- /dev/null +++ b/src/gtk2-prefs/support.cpp @@ -0,0 +1,146 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +#include + +#include "support.h" + +GtkWidget* +lookup_widget (GtkWidget *widget, + const gchar *widget_name) +{ + GtkWidget *parent, *found_widget; + + for (;;) + { + if (GTK_IS_MENU (widget)) + parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); + else + parent = widget->parent; + if (!parent) + parent = (GtkWidget*)g_object_get_data (G_OBJECT (widget), "GladeParentKey"); + if (parent == NULL) + break; + widget = parent; + } + + found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), + widget_name); + if (!found_widget) + g_warning ("Widget not found: %s", widget_name); + return found_widget; +} + +static GList *pixmaps_directories = NULL; + +/* Use this function to set the directory containing installed pixmaps. */ +void +add_pixmap_directory (const gchar *directory) +{ + pixmaps_directories = g_list_prepend (pixmaps_directories, + g_strdup (directory)); +} + +/* This is an internally used function to find pixmap files. */ +static gchar* +find_pixmap_file (const gchar *filename) +{ + GList *elem; + + /* We step through each of the pixmaps directory to find it. */ + elem = pixmaps_directories; + while (elem) + { + gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data, + G_DIR_SEPARATOR_S, filename); + if (g_file_test (pathname, G_FILE_TEST_EXISTS)) + return pathname; + g_free (pathname); + elem = elem->next; + } + return NULL; +} + +/* This is an internally used function to create pixmaps. */ +GtkWidget* +create_pixmap (GtkWidget *widget, + const gchar *filename) +{ + gchar *pathname = NULL; + GtkWidget *pixmap; + + if (!filename || !filename[0]) + return gtk_image_new (); + + pathname = find_pixmap_file (filename); + + if (!pathname) + { + g_warning ("Couldn't find pixmap file: %s", filename); + return gtk_image_new (); + } + + pixmap = gtk_image_new_from_file (pathname); + g_free (pathname); + return pixmap; +} + +/* This is an internally used function to create pixmaps. */ +GdkPixbuf* +create_pixbuf (const gchar *filename) +{ + gchar *pathname = NULL; + GdkPixbuf *pixbuf; + GError *error = NULL; + + if (!filename || !filename[0]) + return NULL; + + pathname = find_pixmap_file (filename); + + if (!pathname) + { + g_warning ("Couldn't find pixmap file: %s", filename); + return NULL; + } + + pixbuf = gdk_pixbuf_new_from_file (pathname, &error); + if (!pixbuf) + { + fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", + pathname, error->message); + g_error_free (error); + } + g_free (pathname); + return pixbuf; +} + +/* This is used to set ATK action descriptions. */ +void +glade_set_atk_action_description (AtkAction *action, + const gchar *action_name, + const gchar *description) +{ + gint n_actions, i; + + n_actions = atk_action_get_n_actions (action); + for (i = 0; i < n_actions; i++) + { + if (!strcmp (atk_action_get_name (action, i), action_name)) + atk_action_set_description (action, i, description); + } +} + diff --git a/src/gtk2-prefs/support.h b/src/gtk2-prefs/support.h new file mode 100644 index 00000000..2dea079c --- /dev/null +++ b/src/gtk2-prefs/support.h @@ -0,0 +1,44 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +/* + * Public Functions. + */ + +/* + * This function returns a widget in a component created by Glade. + * Call it with the toplevel widget in the component (i.e. a window/dialog), + * or alternatively any widget in the component, and the name of the widget + * you want returned. + */ +GtkWidget* lookup_widget (GtkWidget *widget, + const gchar *widget_name); + + +/* Use this function to set the directory containing installed pixmaps. */ +void add_pixmap_directory (const gchar *directory); + + +/* + * Private Functions. + */ + +/* This is used to create the pixmaps used in the interface. */ +GtkWidget* create_pixmap (GtkWidget *widget, + const gchar *filename); + +/* This is used to create the pixbufs used in the interface. */ +GdkPixbuf* create_pixbuf (const gchar *filename); + +/* This is used to set ATK action descriptions. */ +void glade_set_atk_action_description (AtkAction *action, + const gchar *action_name, + const gchar *description); + diff --git a/src/gtk2-prefs/sys_win32.h b/src/gtk2-prefs/sys_win32.h new file mode 100644 index 00000000..0a106690 --- /dev/null +++ b/src/gtk2-prefs/sys_win32.h @@ -0,0 +1,28 @@ +/*************************************************************************** + sys_win32.h - description + ------------------- + begin : Wed Oct 22 2003 + copyright : (C) 2003 by Alex Shaduri, Irakli A. Elizbarashvili + email : alex_sh@land.ru + ***************************************************************************/ +#ifndef SYS_WIN32_H +#define SYS_WIN32_H + + + + + +#ifdef _WIN32 + +# define WIN32_LEAN_AND_MEAN +# include + +#endif + + + + + + + +#endif diff --git a/src/gtk2-prefs/win32util.cpp b/src/gtk2-prefs/win32util.cpp new file mode 100644 index 00000000..79cab17d --- /dev/null +++ b/src/gtk2-prefs/win32util.cpp @@ -0,0 +1,80 @@ +/*************************************************************************** + win32util.cpp - description + ------------------- + begin : Tue Jan 14 2003 + copyright : (C) 2003 by Alex Shaduri + email : alex_sh@land.ru + ***************************************************************************/ + +#ifdef _WIN32 + +#include +#include "sys_win32.h" +#include "win32util.h" + + + + + +std::string win32_get_registry_value_string(HKEY base, const std::string& keydir, const std::string& key) +{ + + HKEY reg_key = NULL; + DWORD type; + DWORD nbytes; + char* result = NULL; +//HKEY_CURRENT_USER + nbytes = 0; + if ( RegOpenKeyEx ( base, keydir.c_str(), 0, KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS + && RegQueryValueEx (reg_key, key.c_str(), 0, &type, NULL, &nbytes) == ERROR_SUCCESS ) { + result = (char*)malloc(nbytes + 1); + RegQueryValueEx (reg_key, key.c_str(), 0, &type, (BYTE*)result, &nbytes); + result[nbytes] = '\0'; + } + + if (reg_key != NULL) + RegCloseKey (reg_key); + + std::string ret = ""; + + if (result) { + ret = result; + } + + return ret; + +} + + + + +void win32_set_registry_value_string(HKEY base, const std::string& keydir, const std::string& key, const std::string& value) +{ + + HKEY reg_key = NULL; + DWORD nbytes; + + nbytes = value.length() + 1; + + if ( RegOpenKeyEx ( base, keydir.c_str(), 0, KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS) { + RegSetValueEx (reg_key, key.c_str(), 0, REG_SZ, (const BYTE*)(value.c_str()), nbytes); + } + + if (reg_key != NULL) + RegCloseKey (reg_key); + +} + + + + + + + +#endif + + + + + + diff --git a/src/gtk2-prefs/win32util.h b/src/gtk2-prefs/win32util.h new file mode 100644 index 00000000..8c194a19 --- /dev/null +++ b/src/gtk2-prefs/win32util.h @@ -0,0 +1,26 @@ +/*************************************************************************** + win32util.h - description + ------------------- + begin : Tue Jan 14 2003 + copyright : (C) 2003 by Alex Shaduri + email : alex_sh@land.ru + ***************************************************************************/ +#ifndef WIN32UTIL_H +#define WIN32UTIL_H + +#ifdef _WIN32 + +#include +#include "sys_win32.h" + + + +std::string win32_get_registry_value_string(HKEY base, const std::string& keydir, const std::string& key); +void win32_set_registry_value_string(HKEY base, const std::string& keydir, const std::string& key, const std::string& value); + + + + +#endif //_WIN32 + +#endif // WIN32UTIL_H -- cgit 1.4.1 From 5c6dacbecf9dc33e348bda1ec9f500c93706b66c Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 17 Aug 2011 14:37:09 +0200 Subject: gtk2prefs tweaking --- src/gtk2-prefs/interface.cpp | 8 ++++---- src/gtk2-prefs/main.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/gtk2-prefs/interface.cpp b/src/gtk2-prefs/interface.cpp index adfcc66b..18b66bb6 100644 --- a/src/gtk2-prefs/interface.cpp +++ b/src/gtk2-prefs/interface.cpp @@ -138,7 +138,7 @@ create_main_window (void) main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (main_window, "main_window"); - gtk_window_set_title (GTK_WINDOW (main_window), "Gtk2 Theme Selector"); + gtk_window_set_title (GTK_WINDOW (main_window), "GTK+ Preference Tool"); main_hbox = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (main_hbox, "main_hbox"); @@ -273,11 +273,11 @@ create_main_window (void) gtk_widget_show (hbox6666); gtk_box_pack_start (GTK_BOX (vbox13), hbox6666, TRUE, TRUE, 0); - main_use_system_config_checkbutton = gtk_check_button_new_with_mnemonic ("Apply for all users"); + /* main_use_system_config_checkbutton = gtk_check_button_new_with_mnemonic ("Apply for all users"); gtk_widget_set_name (main_use_system_config_checkbutton, "main_use_system_config_checkbutton"); gtk_widget_show (main_use_system_config_checkbutton); gtk_box_pack_start (GTK_BOX (hbox6666), main_use_system_config_checkbutton, FALSE, FALSE, 12); - gtk_tooltips_set_tip (tooltips, main_use_system_config_checkbutton, "If this is enabled, the program will update the system-wide configuration file. NOT RECOMMENDED!", NULL); + gtk_tooltips_set_tip (tooltips, main_use_system_config_checkbutton, "If this is enabled, the program will update the system-wide configuration file. NOT RECOMMENDED!", NULL); */ main_showpreviewtoggle = gtk_toggle_button_new_with_mnemonic ("Show preview >>"); gtk_widget_set_name (main_showpreviewtoggle, "main_showpreviewtoggle"); @@ -755,7 +755,7 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, label669, "label669"); GLADE_HOOKUP_OBJECT (main_window, vbox13, "vbox13"); GLADE_HOOKUP_OBJECT (main_window, hbox6666, "hbox6666"); - GLADE_HOOKUP_OBJECT (main_window, main_use_system_config_checkbutton, "main_use_system_config_checkbutton"); + /* GLADE_HOOKUP_OBJECT (main_window, main_use_system_config_checkbutton, "main_use_system_config_checkbutton"); */ GLADE_HOOKUP_OBJECT (main_window, main_showpreviewtoggle, "main_showpreviewtoggle"); GLADE_HOOKUP_OBJECT (main_window, hbuttonbox1, "hbuttonbox1"); GLADE_HOOKUP_OBJECT (main_window, hbox7, "hbox7"); diff --git a/src/gtk2-prefs/main.cpp b/src/gtk2-prefs/main.cpp index 334c23d1..e1a0415d 100644 --- a/src/gtk2-prefs/main.cpp +++ b/src/gtk2-prefs/main.cpp @@ -349,7 +349,7 @@ int main(int argc, char *argv[]) populate_with_themes(lookup_widget(g_main_window, "main_themelist")); - std::string about_text = std::string("Gtk2 Theme Selector v") + "\n\ + std::string about_text = std::string("GTK+ Preference Tool") + "\n\ \n\ by Alex Shaduri \n\ \n\ @@ -506,10 +506,10 @@ bool save_current_theme() std::string conf_file = ""; - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(g_main_window, "main_use_system_config_checkbutton")))) { + if ((_access( "portable-mode", 0 )) != -1) { char* themes_dir_c = gtk_rc_get_theme_dir(); - char* conf_file_c = g_build_filename(themes_dir_c, "..", "..", "etc", "gtk-2.0", "gtkrc", NULL); + char* conf_file_c = g_build_filename("etc", "gtk-2.0", "gtkrc", NULL); conf_file = (conf_file_c ? conf_file_c : ""); -- cgit 1.4.1 From 440e3bc279a9ef5d33a3e70d54c8d1b2dd0bde2b Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 17 Aug 2011 15:26:08 +0200 Subject: disable logging when not in portable mode --- src/gtk2-prefs/main.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gtk2-prefs/main.cpp b/src/gtk2-prefs/main.cpp index e1a0415d..42e425c2 100644 --- a/src/gtk2-prefs/main.cpp +++ b/src/gtk2-prefs/main.cpp @@ -288,10 +288,15 @@ static void populate_with_themes(GtkWidget* w) static void redirect_to_file (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message, gpointer user_data) { - std::fstream f; - f.open("g_stdout.txt", std::ios::app); + /* only write logs if running in portable mode, otherwise + we would get a permission error in program files */ + if ((_access( "portable-mode", 0 )) != -1) + { + std::fstream f; + f.open("gtk2-prefs.log", std::ios::app); f << message << "\n"; - f.close(); + f.close(); + } } #endif -- cgit 1.4.1 From 36f67ffe28f2b4a07fef3d48721a40309768e005 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 7 Sep 2011 22:08:24 +0200 Subject: add command for saving the preferences --- src/common/outbound.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/common/outbound.c b/src/common/outbound.c index 417ac323..3a4d379c 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2886,6 +2886,14 @@ cmd_recv (struct session *sess, char *tbuf, char *word[], char *word_eol[]) return FALSE; } +static int +cmd_saveconf (struct session *sess, char *tbuf, char *word[], char *word_eol[]) +{ + save_config (); + + return TRUE; +} + static int cmd_say (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { @@ -3638,6 +3646,7 @@ const struct commands xc_cmds[] = { #endif {"RECV", cmd_recv, 1, 0, 1, N_("RECV , send raw data to xchat, as if it was received from the irc server")}, + {"SAVECONF", cmd_saveconf, 0, 0, 1, N_("SAVECONF, saves the current settings to disk")}, {"SAY", cmd_say, 0, 0, 1, N_("SAY , sends the text to the object in the current window")}, {"SEND", cmd_send, 0, 0, 1, N_("SEND []")}, -- cgit 1.4.1 From 24e2da5c7943b347aa8c75e26c814f4421e34881 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 29 Oct 2011 13:25:33 +0200 Subject: re-enable transparent backgrounds --- src/common/cfgfiles.c | 2 +- src/fe-gtk/setup.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 7948fe2c..c3dcb347 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -575,7 +575,7 @@ const struct prefs vars[] = { {"text_tint_blue", P_OFFINT (tint_blue), TYPE_INT}, {"text_tint_green", P_OFFINT (tint_green), TYPE_INT}, {"text_tint_red", P_OFFINT (tint_red), TYPE_INT}, - /* {"text_transparent", P_OFFINT (transparent), TYPE_BOOL}, */ + {"text_transparent", P_OFFINT (transparent), TYPE_BOOL}, {"text_wordwrap", P_OFFINT (wordwrap), TYPE_BOOL}, {0, 0, 0}, diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index acb4eda6..a1a200a5 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -109,13 +109,13 @@ static const setting textbox_settings[] = N_("Give each person on IRC a different color"),0,0}, {ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(indent_nicks), N_("Make nick names right-justified"),0,0}, - /* {ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(transparent),0,0,0}, */ + {ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(transparent),0,0,0}, {ST_TOGGLE, N_("Show marker line"), P_OFFINTNL(show_marker), N_("Insert a red line after the last read text."),0,0}, - /* {ST_HEADER, N_("Transparency Settings"), 0,0,0}, + {ST_HEADER, N_("Transparency Settings"), 0,0,0}, {ST_HSCALE, N_("Red:"), P_OFFINTNL(tint_red),0,0,0}, {ST_HSCALE, N_("Green:"), P_OFFINTNL(tint_green),0,0,0}, - {ST_HSCALE, N_("Blue:"), P_OFFINTNL(tint_blue),0,0,0}, */ + {ST_HSCALE, N_("Blue:"), P_OFFINTNL(tint_blue),0,0,0}, {ST_HEADER, N_("Time Stamps"),0,0,0}, {ST_TOGGLE, N_("Enable time stamps"), P_OFFINTNL(timestamp),0,0,2}, -- cgit 1.4.1 From 760ebc785fe71717bcf277d2e2669f25d5f5333c Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 22 Nov 2011 15:36:54 +0100 Subject: use gtk.org library names --- src/makeinc.skel.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index 03fa43e8..1ccb0d32 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -9,7 +9,7 @@ LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include /I$(DEV)\include\libxml2 GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 -LIBS = $(LIBS) /libpath:$(DEV)\lib libgtk-win32-2.0-0.lib libgdk-win32-2.0-0.lib libatk-1.0-0.lib libgio-2.0-0.lib libgdk_pixbuf-2.0-0.lib libpangowin32-1.0-0.lib libpangocairo-1.0-0.lib libpango-1.0-0.lib libcairo-2.lib libgobject-2.0-0.lib libgmodule-2.0-0.lib libglib-2.0-0.lib libintl-8.lib libxml2-2.lib +LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib libxml2.lib LUALIB = lua51 LUAOUTPUT = xclua.dll -- cgit 1.4.1 From 98938cd85e02d93c2e27454c49a4f1e23c9e45d2 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 22 Nov 2011 16:25:26 +0100 Subject: compatibility for gtk 2.16 --- src/fe-gtk/xtext.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index d797e5ff..5a83062b 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -999,7 +999,11 @@ gtk_xtext_realize (GtkWidget * widget) gdk_window_set_user_data (widget->window, widget); +#if GTK_CHECK_VERSION(2,24,0) xtext->depth = gdk_window_get_visual (widget->window)->depth; +#else + xtext->depth = gdk_drawable_get_visual (widget->window)->depth; +#endif val.subwindow_mode = GDK_INCLUDE_INFERIORS; val.graphics_exposures = 0; -- cgit 1.4.1 From 99e015c3b3ce49ae13d213ce493504dc7332e19c Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 22 Nov 2011 16:53:48 +0100 Subject: release script updates and gtkpref complete removal --- build/release-x64.bat | 12 ++++-------- build/release-x86.bat | 17 ++++++----------- src/makefile.mak | 8 ++++---- 3 files changed, 14 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/build/release-x64.bat b/build/release-x64.bat index df5269c3..47ba3589 100644 --- a/build/release-x64.bat +++ b/build/release-x64.bat @@ -7,7 +7,7 @@ echo 2> portable-mode move portable-mode %XCHAT_DEST% copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST% copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST% -copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% +::copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST% @@ -22,16 +22,12 @@ copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgtk-win32-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libintl-8.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjasper-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjpeg-8.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpixman-1-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpng15-15.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libtiff-3.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libxml2-2.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libxml2.dll %XCHAT_DEST% xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\ xcopy /q /s /i etc %XCHAT_DEST%\etc @@ -52,7 +48,7 @@ copy %DEPS_ROOT%\bin\libenchant.dll %XCHAT_DEST% xcopy /q /s /i %DEPS_ROOT%\lib\enchant\libenchant_myspell.dll %XCHAT_DEST%\lib\enchant\ xcopy /q /s /i ..\plugins\checksum\xcchecksum.dll %XCHAT_DEST%\plugins\ copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins -copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins +::copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins diff --git a/build/release-x86.bat b/build/release-x86.bat index bf16a3c6..c7223fe0 100644 --- a/build/release-x86.bat +++ b/build/release-x86.bat @@ -7,13 +7,12 @@ echo 2> portable-mode move portable-mode %XCHAT_DEST% copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST% copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST% -copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% +::copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libffi-5.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libfontconfig-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libfreetype-6.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\freetype6.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgdk-win32-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgio-2.0-0.dll %XCHAT_DEST% @@ -22,17 +21,13 @@ copy %DEPS_ROOT%\bin\libgmodule-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgtk-win32-2.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libintl-8.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjasper-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjpeg-8.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\intl.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpixman-1-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpng15-15.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libtiff-3.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libxml2-2.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libxml2.dll %XCHAT_DEST% xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\ xcopy /q /s /i etc %XCHAT_DEST%\etc @@ -53,7 +48,7 @@ copy %DEPS_ROOT%\bin\libenchant.dll %XCHAT_DEST% xcopy /q /s /i %DEPS_ROOT%\lib\enchant\libenchant_myspell.dll %XCHAT_DEST%\lib\enchant\ xcopy /q /s /i ..\plugins\checksum\xcchecksum.dll %XCHAT_DEST%\plugins\ copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins -copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins +::copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins diff --git a/src/makefile.mak b/src/makefile.mak index cd73b879..6e6cf95c 100644 --- a/src/makefile.mak +++ b/src/makefile.mak @@ -7,8 +7,8 @@ all: @-$(MAKE) /nologo /s /f makefile.mak $@ @cd ..\fe-text @-$(MAKE) /nologo /s /f makefile.mak $@ - @cd ..\gtk2-prefs - @-$(MAKE) /nologo /s /f makefile.mak $@ +# @cd ..\gtk2-prefs +# @-$(MAKE) /nologo /s /f makefile.mak $@ clean: @cd pixmaps @@ -19,5 +19,5 @@ clean: @-$(MAKE) /nologo /s /f makefile.mak clean $@ @cd ..\fe-text @-$(MAKE) /nologo /s /f makefile.mak clean $@ - @cd ..\gtk2-prefs - @-$(MAKE) /nologo /s /f makefile.mak clean $@ +# @cd ..\gtk2-prefs +# @-$(MAKE) /nologo /s /f makefile.mak clean $@ -- cgit 1.4.1 From 686685baa93a1539346f7d8373ed34b2f965189d Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 02:57:34 +0100 Subject: remove unused variable --- src/common/util.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/common/util.c b/src/common/util.c index b9bf3b35..870f4d5c 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -651,7 +651,6 @@ int get_cpu_arch (void) { SYSTEM_INFO si; - unsigned short int cpu_arch; GetSystemInfo (&si); -- cgit 1.4.1 From 67ef819ebced1e46874b60abaef5876444585684 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 11:51:19 +0100 Subject: report back when saving preferences via command --- src/common/outbound.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/outbound.c b/src/common/outbound.c index 3a4d379c..8ae1bb55 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2889,7 +2889,14 @@ cmd_recv (struct session *sess, char *tbuf, char *word[], char *word_eol[]) static int cmd_saveconf (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { - save_config (); + if (save_config ()) + { + PrintText (sess, "Preferences have been saved successfully.\n"); + } + else + { + PrintText (sess, "Error saving preferences.\n"); + } return TRUE; } -- cgit 1.4.1 From f45abe6fadf11e9f307d78b572377adc3b0d384e Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 11:58:39 +0100 Subject: Revert "add option to auto-open a new tab when sending /msg (openSUSE)", /query msg is already there for that This reverts commit 1e74680172e4ff43fb109557bea87d090d8376c2. --- src/common/cfgfiles.c | 1 - src/common/outbound.c | 6 ------ src/common/xchat.h | 1 - src/fe-gtk/setup.c | 1 - 4 files changed, 9 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index c3dcb347..2aad854a 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -423,7 +423,6 @@ const struct prefs vars[] = { {"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL}, {"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL}, - {"gui_auto_open_msg", P_OFFINT (gui_auto_open_msg), TYPE_BOOL}, {"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL}, {"gui_auto_open_send", P_OFFINT (autoopendccsendwindow), TYPE_BOOL}, {"gui_dialog_height", P_OFFINT (dialog_height), TYPE_INT}, diff --git a/src/common/outbound.c b/src/common/outbound.c index 8ae1bb55..55ea003f 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2605,13 +2605,7 @@ cmd_msg (struct session *sess, char *tbuf, char *word[], char *word_eol[]) } newsess = find_dialog (sess->server, nick); if (!newsess) - { newsess = find_channel (sess->server, nick); - if (!newsess && prefs.gui_auto_open_msg) - { - newsess = new_ircwindow (sess->server, nick, SESS_DIALOG, 0); - } - } if (newsess) inbound_chanmsg (newsess->server, NULL, newsess->channel, newsess->server->nick, msg, TRUE, FALSE); diff --git a/src/common/xchat.h b/src/common/xchat.h index 3ec13e6b..6856d949 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -205,7 +205,6 @@ struct xchatprefs unsigned int perc_ascii; unsigned int autosave; unsigned int autodialog; - unsigned int gui_auto_open_msg; unsigned int autosave_url; unsigned int autoreconnect; unsigned int autoreconnectonfail; diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index a1a200a5..66e8349e 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -265,7 +265,6 @@ static const setting tabs_settings[] = {ST_TOGGLE, N_("Open an extra tab for server messages"), P_OFFINTNL(use_server_tab), 0, 0, 0}, {ST_TOGGLE, N_("Open an extra tab for server notices"), P_OFFINTNL(notices_tabs), 0, 0, 0}, {ST_TOGGLE, N_("Open a new tab when you receive a private message"), P_OFFINTNL(autodialog), 0, 0, 0}, - {ST_TOGGLE, N_("Open a new tab when you send a private message"), P_OFFINTNL(gui_auto_open_msg), 0, 0, 0}, {ST_TOGGLE, N_("Sort tabs in alphabetical order"), P_OFFINTNL(tab_sort), 0, 0, 0}, {ST_TOGGLE, N_("Smaller text"), P_OFFINTNL(tab_small), 0, 0, 0}, #if 0 -- cgit 1.4.1 From 3e7adb9878d8fca9b14b48e340eecfe489e14d15 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 12:38:51 +0100 Subject: update offset due to new menu item (copy selection) --- src/fe-gtk/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index da90ca7f..816c93ec 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1652,11 +1652,11 @@ static struct mymenu mymenu[] = { {N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_m}, {N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_C}, {N_("C_lear Text"), menu_flushbuffer, GTK_STOCK_CLEAR, M_MENUSTOCK, 0, 0, 1, GDK_l}, -#define SEARCH_OFFSET 67 +#define SEARCH_OFFSET 68 {N_("Search Text..."), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_f}, {N_("Save Text..."), menu_savebuffer, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, - {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 69 */ + {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 70 */ {N_("_Contents"), menu_docs, GTK_STOCK_HELP, M_MENUSTOCK, 0, 0, 1, GDK_F1}, #if 0 {N_("Check for updates"), menu_update, 0, M_MENUITEM, 0, 1}, -- cgit 1.4.1 From 60bcde41ae44d90615930e7ce2e88e8b8c724274 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 13:13:58 +0100 Subject: add menu item for saving preferences to disk --- src/fe-gtk/menu.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 816c93ec..8ba73a61 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1121,6 +1121,21 @@ usermenu_update (void) } } +static void +menu_saveconf (void) +{ + session *sess = current_sess; + + if (save_config ()) + { + PrintText (sess, "Preferences have been saved successfully.\n"); + } + else + { + PrintText (sess, "Error saving preferences.\n"); + } +} + static void menu_newserver_window (GtkWidget * wid, gpointer none) { @@ -1638,6 +1653,8 @@ static struct mymenu mymenu[] = { {N_("Userlist Popup..."), menu_ulpopup, 0, M_MENUITEM, 0, 0, 1}, {0, 0, 0, M_END, 0, 0, 0}, /* 53 */ + {N_("Save Settings to Disk"), menu_saveconf, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, + {N_("_Window"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("Ban List..."), menu_banlist, 0, M_MENUITEM, 0, 0, 1}, {N_("Character Chart..."), ascii_open, 0, M_MENUITEM, 0, 0, 1}, @@ -1652,11 +1669,11 @@ static struct mymenu mymenu[] = { {N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_m}, {N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_C}, {N_("C_lear Text"), menu_flushbuffer, GTK_STOCK_CLEAR, M_MENUSTOCK, 0, 0, 1, GDK_l}, -#define SEARCH_OFFSET 68 +#define SEARCH_OFFSET 69 {N_("Search Text..."), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_f}, {N_("Save Text..."), menu_savebuffer, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, - {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 70 */ + {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 71 */ {N_("_Contents"), menu_docs, GTK_STOCK_HELP, M_MENUSTOCK, 0, 0, 1, GDK_F1}, #if 0 {N_("Check for updates"), menu_update, 0, M_MENUITEM, 0, 1}, -- cgit 1.4.1 From f8679494263312804cd4f296115d86c59a0540a2 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 13:23:51 +0100 Subject: be consistent with menu item --- src/fe-gtk/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 8ba73a61..646839e8 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1128,11 +1128,11 @@ menu_saveconf (void) if (save_config ()) { - PrintText (sess, "Preferences have been saved successfully.\n"); + PrintText (sess, "Settings have been saved successfully.\n"); } else { - PrintText (sess, "Error saving preferences.\n"); + PrintText (sess, "Error saving settings.\n"); } } -- cgit 1.4.1 From 2d0144500c5ecb21bd31506db4949c42c71618fb Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 13:25:16 +0100 Subject: the same for outbound /saveconf --- src/common/outbound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/outbound.c b/src/common/outbound.c index 55ea003f..32302efe 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2885,11 +2885,11 @@ cmd_saveconf (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { if (save_config ()) { - PrintText (sess, "Preferences have been saved successfully.\n"); + PrintText (sess, "Settings have been saved successfully.\n"); } else { - PrintText (sess, "Error saving preferences.\n"); + PrintText (sess, "Error saving settings.\n"); } return TRUE; -- cgit 1.4.1 From 9ab089e2e49dd300fae7a76596b444dc974b40e9 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 13:40:18 +0100 Subject: disable saveconf menu item, autosave will be added later --- src/fe-gtk/menu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 646839e8..90c784f0 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1653,7 +1653,7 @@ static struct mymenu mymenu[] = { {N_("Userlist Popup..."), menu_ulpopup, 0, M_MENUITEM, 0, 0, 1}, {0, 0, 0, M_END, 0, 0, 0}, /* 53 */ - {N_("Save Settings to Disk"), menu_saveconf, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, + /* {N_("Save Settings to Disk"), menu_saveconf, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, don't use this, a /set auto-save approach will be added instead */ {N_("_Window"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("Ban List..."), menu_banlist, 0, M_MENUITEM, 0, 0, 1}, @@ -1669,11 +1669,11 @@ static struct mymenu mymenu[] = { {N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_m}, {N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_C}, {N_("C_lear Text"), menu_flushbuffer, GTK_STOCK_CLEAR, M_MENUSTOCK, 0, 0, 1, GDK_l}, -#define SEARCH_OFFSET 69 +#define SEARCH_OFFSET 68 {N_("Search Text..."), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_f}, {N_("Save Text..."), menu_savebuffer, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, - {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 71 */ + {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 70 */ {N_("_Contents"), menu_docs, GTK_STOCK_HELP, M_MENUSTOCK, 0, 0, 1, GDK_F1}, #if 0 {N_("Check for updates"), menu_update, 0, M_MENUITEM, 0, 1}, -- cgit 1.4.1 From 08ee077396f971eec805c7db96c7c4b160adc436 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 23 Nov 2011 13:58:50 +0100 Subject: no manual saving, auto-save changes during /set --- src/common/cfgfiles.c | 6 ++++++ src/common/outbound.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 2aad854a..53e0865c 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -1084,7 +1084,13 @@ cmd_set (struct session *sess, char *tbuf, char *word[], char *word_eol[]) while (vars[i].name); if (!finds && !quiet) + { PrintText (sess, "No such variable.\n"); + } + else if (prefs.autosave && !save_config ()) + { + PrintText (sess, "Error saving changes to disk.\n"); + } return TRUE; } diff --git a/src/common/outbound.c b/src/common/outbound.c index 32302efe..917562b9 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -3647,7 +3647,7 @@ const struct commands xc_cmds[] = { #endif {"RECV", cmd_recv, 1, 0, 1, N_("RECV , send raw data to xchat, as if it was received from the irc server")}, - {"SAVECONF", cmd_saveconf, 0, 0, 1, N_("SAVECONF, saves the current settings to disk")}, + /*{"SAVECONF", cmd_saveconf, 0, 0, 1, N_("SAVECONF, saves the current settings to disk")},*/ {"SAY", cmd_say, 0, 0, 1, N_("SAY , sends the text to the object in the current window")}, {"SEND", cmd_send, 0, 0, 1, N_("SEND []")}, -- cgit 1.4.1 From fb1a986332a7ff6db6f2a70df447c5d484af7cdc Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 25 Nov 2011 09:59:39 +0100 Subject: option to allow only one instance xchat to run --- src/common/cfgfiles.c | 1 + src/common/xchat.c | 30 ++++++++++++++++++++++++++++-- src/common/xchat.h | 1 + src/fe-gtk/setup.c | 1 + 4 files changed, 31 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 53e0865c..e5d0eaef 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -436,6 +436,7 @@ const struct prefs vars[] = { {"gui_lagometer", P_OFFINT (lagometer), TYPE_INT}, {"gui_license", P_OFFSET (gui_license), TYPE_STR}, {"gui_mode_buttons", P_OFFINT (chanmodebuttons), TYPE_BOOL}, + {"gui_one_instance", P_OFFINT (gui_one_instance), TYPE_BOOL}, {"gui_pane_left_size", P_OFFINT (gui_pane_left_size), TYPE_INT}, {"gui_pane_right_size", P_OFFINT (gui_pane_right_size), TYPE_INT}, {"gui_quit_dialog", P_OFFINT (gui_quit_dialog), TYPE_BOOL}, diff --git a/src/common/xchat.c b/src/common/xchat.c index ba2f5d41..8dca6de8 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -26,7 +26,9 @@ #define WANTSOCKET #include "inet.h" -#ifndef WIN32 +#ifdef WIN32 +#include +#else #include #include #endif @@ -903,7 +905,11 @@ int main (int argc, char *argv[]) { int ret; - + +#ifdef WIN32 + HANDLE mutex; +#endif + srand (time (0)); /* CL: do this only once! */ #ifdef SOCKS @@ -920,6 +926,21 @@ main (int argc, char *argv[]) load_config (); +#ifdef WIN32 + if (prefs.gui_one_instance) + { + DWORD error; + + mutex = CreateMutex (NULL, TRUE, "Local\xchat"); + error = GetLastError (); + + if (error == ERROR_ALREADY_EXISTS || mutex == NULL) + { + return 1; + } + } +#endif + #ifdef USE_LIBPROXY libproxy_factory = px_proxy_factory_new(); #endif @@ -945,6 +966,11 @@ main (int argc, char *argv[]) #ifdef WIN32 WSACleanup (); + + if (prefs.gui_one_instance) + { + CloseHandle (mutex); + } #endif return 0; diff --git a/src/common/xchat.h b/src/common/xchat.h index 6856d949..08177e20 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -186,6 +186,7 @@ struct xchatprefs int gui_usermenu; int gui_join_dialog; int gui_quit_dialog; + int gui_one_instance; int dialog_left; int dialog_top; int dialog_width; diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 66e8349e..8fbed277 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -403,6 +403,7 @@ static const setting advanced_settings[] = {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(raw_modes), 0, 0, 0}, {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, + {ST_TOGGLE, N_("Allow only one instance of XChat to run"), P_OFFINTNL(gui_one_instance), 0, 0, 0}, {ST_ENTRY, N_("License Text:"), P_OFFSETNL(gui_license), 0, 0, sizeof prefs.gui_license}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0}, -- cgit 1.4.1 From 0c3c36fdf3663bc428254254a790c1bc7e3500fc Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 25 Nov 2011 10:10:11 +0100 Subject: disable one instance option in portable mode --- src/common/xchat.c | 5 +++-- src/fe-gtk/setup.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/common/xchat.c b/src/common/xchat.c index 8dca6de8..c0847a32 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -49,6 +49,7 @@ #include "text.h" #include "url.h" #include "xchatc.h" +#include "wdkutil.h" #ifdef USE_OPENSSL #include /* SSL_() */ @@ -927,7 +928,7 @@ main (int argc, char *argv[]) load_config (); #ifdef WIN32 - if (prefs.gui_one_instance) + if (prefs.gui_one_instance && !portable_mode ()) { DWORD error; @@ -967,7 +968,7 @@ main (int argc, char *argv[]) #ifdef WIN32 WSACleanup (); - if (prefs.gui_one_instance) + if (prefs.gui_one_instance && !portable_mode ()) { CloseHandle (mutex); } diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 8fbed277..5b242508 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -14,6 +14,7 @@ #include "../common/text.h" #include "../common/userlist.h" #include "../common/util.h" +#include "../common/wdkutil.h" #include "../common/xchatc.h" #include "fe-gtk.h" #include "gtkutil.h" @@ -397,6 +398,22 @@ static const setting general_settings[] = }; static const setting advanced_settings[] = +{ + {ST_HEADER, N_("Advanced Settings"),0,0,0}, + {ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(recon_delay), 0, 0, 9999}, + {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(raw_modes), 0, 0, 0}, + {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, + {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, + {ST_ENTRY, N_("License Text:"), P_OFFSETNL(gui_license), 0, 0, sizeof prefs.gui_license}, + {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, + {ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0}, + {ST_TOGGLE, N_("Receive window"), P_OFFINTNL(autoopendccrecvwindow), 0, 0, 0}, + {ST_TOGGLE, N_("Chat window"), P_OFFINTNL(autoopendccchatwindow), 0, 0, 0}, + + {ST_END, 0, 0, 0, 0, 0} +}; + +static const setting advanced_settings_oneinstance[] = { {ST_HEADER, N_("Advanced Settings"),0,0,0}, {ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(recon_delay), 0, 0, 9999}, @@ -1770,7 +1787,8 @@ setup_create_pages (GtkWidget *box) if (xtray_mode ()) { setup_add_page (cata[8], book, setup_create_page (alert_settings_xtray)); - } else + } + else { setup_add_page (cata[8], book, setup_create_page (alert_settings)); } @@ -1778,7 +1796,16 @@ setup_create_pages (GtkWidget *box) setup_add_page (cata[9], book, setup_create_page (general_settings)); setup_add_page (cata[10], book, setup_create_page (logging_settings)); setup_add_page (cata[11], book, setup_create_sound_page ()); - setup_add_page (cata[12], book, setup_create_page (advanced_settings)); + + if (portable_mode ()) + { + setup_add_page (cata[12], book, setup_create_page (advanced_settings)); + } + else + { + setup_add_page (cata[12], book, setup_create_page (advanced_settings_oneinstance)); + } + setup_add_page (cata[14], book, setup_create_page (network_settings)); setup_add_page (cata[15], book, setup_create_page (filexfer_settings)); -- cgit 1.4.1 From 75904d4a044f0094e1c6cb102ca6b439700aa734 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 25 Nov 2011 11:15:17 +0100 Subject: an ugly hack to make the about screen consistent --- src/fe-gtk/about.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index e1e5149c..a5772e39 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -116,9 +116,9 @@ menu_about (GtkWidget * wid, gpointer sess) g_get_charset (&locale); (snprintf) (buf, sizeof (buf), ""DISPLAY_NAME" "PACKAGE_VERSION"\n" - "%s\n\n" #ifdef WIN32 - "XChat Release: "XCHAT_RELEASE"\n\n" + "%s%s%s" + "\nXChat Release: "XCHAT_RELEASE"\n\n" "OS: %s\n" "Charset: %s " "GTK+: %i.%i.%i\n" @@ -129,7 +129,9 @@ menu_about (GtkWidget * wid, gpointer sess) "\302\251 1998-2010 Peter \305\275elezn\303\275 <zed@xchat.org>" /* "\nhttp://code.google.com/p/xchat-wdk/" this is broken in gtk ATM */ "", - prefs.gui_license, + (strcmp (prefs.gui_license, "") ? "" : ""), + (strcmp (prefs.gui_license, "") ? prefs.gui_license : ""), + (strcmp (prefs.gui_license, "") ? "\n" : ""), get_cpu_str (), locale, gtk_major_version, -- cgit 1.4.1 From ec29822ef45b0522bc7caa7e30d1c575a1b9f8c0 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 28 Nov 2011 15:37:36 +0100 Subject: obs fixes part 1 --- build/dep-extract-x64.bat | 24 +++++ build/dep-extract-x86.bat | 24 +++++ build/dep-extract.bat | 15 ---- build/glibconfig-x86.h | 225 ++++++++++++++++++++++++++++++++++++++++++++++ dep-x86/deps-x86.txt | 47 ++++++---- src/makefile.mak | 8 +- src/makeinc.skel.mak | 2 +- 7 files changed, 308 insertions(+), 37 deletions(-) create mode 100644 build/dep-extract-x64.bat create mode 100644 build/dep-extract-x86.bat delete mode 100644 build/dep-extract.bat create mode 100644 build/glibconfig-x86.h (limited to 'src') diff --git a/build/dep-extract-x64.bat b/build/dep-extract-x64.bat new file mode 100644 index 00000000..d6381cb3 --- /dev/null +++ b/build/dep-extract-x64.bat @@ -0,0 +1,24 @@ +@echo off +set PATH=%PATH%;%PROGRAMW6432%\7-Zip;c:\mozilla-build\gendef + +cd ..\dep-x64 +7z x -y *.rpm +7z x *.cpio +del *.cpio +xcopy /q /s /i usr\x86_64-w64-mingw32\sys-root\mingw\* . +rmdir /q /s usr +set OPATH=%PATH% +set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 +cd lib +for %%A in (..\bin\*.dll) do ( + gendef %%A + lib /nologo /machine:x64 /def:%%~nA.def +) +cd .. +set PATH=%OPATH% +7z x *.7z +copy /y ..\build\glibconfig-x64.h lib\glib-2.0\include\glibconfig.h +cd share\locale +del /q /s gettext-tools.mo +del /q /s gettext-runtime.mo +pause diff --git a/build/dep-extract-x86.bat b/build/dep-extract-x86.bat new file mode 100644 index 00000000..93e73ee4 --- /dev/null +++ b/build/dep-extract-x86.bat @@ -0,0 +1,24 @@ +@echo off +set PATH=%PATH%;%PROGRAMW6432%\7-Zip;c:\mozilla-build\gendef + +cd ..\dep-x86 +7z x -y *.rpm +7z x *.cpio +del *.cpio +xcopy /q /s /i usr\i686-w64-mingw32\sys-root\mingw\* . +rmdir /q /s usr +set OPATH=%PATH% +set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE +cd lib +for %%A in (..\bin\*.dll) do ( + gendef %%A + lib /nologo /machine:x86 /def:%%~nA.def +) +cd .. +set PATH=%OPATH% +7z x *.7z +copy /y ..\build\glibconfig-x86.h lib\glib-2.0\include\glibconfig.h +cd share\locale +del /q /s gettext-tools.mo +del /q /s gettext-runtime.mo +pause diff --git a/build/dep-extract.bat b/build/dep-extract.bat deleted file mode 100644 index 13941ab0..00000000 --- a/build/dep-extract.bat +++ /dev/null @@ -1,15 +0,0 @@ -@echo off -set PATH=%PROGRAMW6432%\7-Zip -cd ..\dep-x64 -7z -y x *.zip -7z x *.7z -cd share\locale -del /q /s gettext-tools.mo -del /q /s gettext-runtime.mo -cd ..\..\..\dep-x86 -7z -y x *.zip -7z x *.7z -cd share\locale -del /q /s gettext-tools.mo -del /q /s gettext-runtime.mo -pause diff --git a/build/glibconfig-x86.h b/build/glibconfig-x86.h new file mode 100644 index 00000000..7f8a0636 --- /dev/null +++ b/build/glibconfig-x86.h @@ -0,0 +1,225 @@ +/* glibconfig.h + * + * This is a generated file. Please modify 'configure.ac' + */ + +#ifndef __G_LIBCONFIG_H__ +#define __G_LIBCONFIG_H__ + +#include + +#include +#include + +G_BEGIN_DECLS + +#define G_MINFLOAT FLT_MIN +#define G_MAXFLOAT FLT_MAX +#define G_MINDOUBLE DBL_MIN +#define G_MAXDOUBLE DBL_MAX +#define G_MINSHORT SHRT_MIN +#define G_MAXSHORT SHRT_MAX +#define G_MAXUSHORT USHRT_MAX +#define G_MININT INT_MIN +#define G_MAXINT INT_MAX +#define G_MAXUINT UINT_MAX +#define G_MINLONG LONG_MIN +#define G_MAXLONG LONG_MAX +#define G_MAXULONG ULONG_MAX + +typedef signed char gint8; +typedef unsigned char guint8; +typedef signed short gint16; +typedef unsigned short guint16; +#define G_GINT16_MODIFIER "h" +#define G_GINT16_FORMAT "hi" +#define G_GUINT16_FORMAT "hu" +typedef signed int gint32; +typedef unsigned int guint32; +#define G_GINT32_MODIFIER "" +#define G_GINT32_FORMAT "i" +#define G_GUINT32_FORMAT "u" +#define G_HAVE_GINT64 1 /* deprecated, always true */ + +G_GNUC_EXTENSION typedef signed long long gint64; +G_GNUC_EXTENSION typedef unsigned long long guint64; + +#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) +#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) +#define G_GINT64_MODIFIER "I64" +#define G_GINT64_FORMAT "I64i" +#define G_GUINT64_FORMAT "I64u" + +#define GLIB_SIZEOF_VOID_P 4 +#define GLIB_SIZEOF_LONG 4 +#define GLIB_SIZEOF_SIZE_T 4 + +typedef signed int gssize; +typedef unsigned int gsize; +#define G_GSIZE_MODIFIER "" +#define G_GSSIZE_FORMAT "i" +#define G_GSIZE_FORMAT "u" + +#define G_MAXSIZE G_MAXUINT +#define G_MINSSIZE G_MININT +#define G_MAXSSIZE G_MAXINT + +typedef gint64 goffset; +#define G_MINOFFSET G_MININT64 +#define G_MAXOFFSET G_MAXINT64 + +#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER +#define G_GOFFSET_FORMAT G_GINT64_FORMAT +#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) + + +#define GPOINTER_TO_INT(p) ((gint) (p)) +#define GPOINTER_TO_UINT(p) ((guint) (p)) + +#define GINT_TO_POINTER(i) ((gpointer) (i)) +#define GUINT_TO_POINTER(u) ((gpointer) (u)) + +typedef signed int gintptr; +typedef unsigned int guintptr; + +#define G_GINTPTR_MODIFIER "" +#define G_GINTPTR_FORMAT "i" +#define G_GUINTPTR_FORMAT "u" + +#ifdef NeXT /* @#%@! NeXTStep */ +# define g_ATEXIT(proc) (!atexit (proc)) +#else +# define g_ATEXIT(proc) (atexit (proc)) +#endif + +#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END + +#define GLIB_MAJOR_VERSION 2 +#define GLIB_MINOR_VERSION 30 +#define GLIB_MICRO_VERSION 2 + +#define G_OS_WIN32 +#define G_PLATFORM_WIN32 + + +#define G_VA_COPY va_copy + +#ifdef __cplusplus +#define G_HAVE_INLINE 1 +#else /* !__cplusplus */ +#ifndef _MSC_VER +#define G_HAVE_INLINE 1 +#endif /* _MSC_VER */ +#define G_HAVE___INLINE 1 +#if !defined(_MSC_VER) && !defined(__DMC__) +#define G_HAVE___INLINE__ 1 +#endif /* !_MSC_VER and !__DMC__ */ +#endif /* !__cplusplus */ + +#ifdef __cplusplus +#define G_CAN_INLINE 1 +#else /* !__cplusplus */ +#define G_CAN_INLINE 1 +#endif + +#ifndef __cplusplus +# define G_HAVE_ISO_VARARGS 1 +#endif + +/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi + * is passed ISO vararg support is turned off, and there is no work + * around to turn it on, so we unconditionally turn it off. + */ +#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 +# undef G_HAVE_ISO_VARARGS +#endif + +#define G_HAVE_GNUC_VARARGS 1 +#define G_HAVE_GROWING_STACK 0 + +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +#define G_GNUC_INTERNAL __hidden +#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#else +#define G_GNUC_INTERNAL +#endif + +#define G_THREADS_ENABLED +#define G_THREADS_IMPL_WIN32 +typedef struct _GMutex* GStaticMutex; +#define G_STATIC_MUTEX_INIT NULL +#define g_static_mutex_get_mutex(mutex) \ + (g_static_mutex_get_mutex_impl_shortcut (mutex)) +/* This represents a system thread as used by the implementation. An + * alien implementaion, as loaded by g_thread_init can only count on + * "sizeof (gpointer)" bytes to store their info. We however need more + * for some of our native implementations. */ +typedef union _GSystemThread GSystemThread; +union _GSystemThread +{ + char data[4]; + double dummy_double; + void *dummy_pointer; + long dummy_long; +}; + +#define G_ATOMIC_OP_USE_GCC_BUILTINS 1 + +#define GINT16_TO_LE(val) ((gint16) (val)) +#define GUINT16_TO_LE(val) ((guint16) (val)) +#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) +#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) +#define GINT32_TO_LE(val) ((gint32) (val)) +#define GUINT32_TO_LE(val) ((guint32) (val)) +#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) +#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) +#define GINT64_TO_LE(val) ((gint64) (val)) +#define GUINT64_TO_LE(val) ((guint64) (val)) +#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) +#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) +#define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val)) +#define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val)) +#define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val)) +#define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val)) +#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) +#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) +#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) +#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) +#define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val)) +#define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val)) +#define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val)) +#define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val)) +#define G_BYTE_ORDER G_LITTLE_ENDIAN + +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLNVAL =32 + +#define G_MODULE_SUFFIX "dll" + +/* A GPid is an abstraction for a process "handle". It is *not* an + * abstraction for a process identifier in general. GPid is used in + * GLib only for descendant processes spawned with the g_spawn* + * functions. On POSIX there is no "process handle" concept as such, + * but on Windows a GPid is a handle to a process, a kind of pointer, + * not a process identifier. + */ +typedef void * GPid; + +#define GLIB_SYSDEF_AF_UNIX 1 +#define GLIB_SYSDEF_AF_INET 2 +#define GLIB_SYSDEF_AF_INET6 23 + +#define GLIB_SYSDEF_MSG_OOB 1 +#define GLIB_SYSDEF_MSG_PEEK 2 +#define GLIB_SYSDEF_MSG_DONTROUTE 4 + +G_END_DECLS + +#endif /* GLIBCONFIG_H */ diff --git a/dep-x86/deps-x86.txt b/dep-x86/deps-x86.txt index 9f5a3bdb..27732940 100644 --- a/dep-x86/deps-x86.txt +++ b/dep-x86/deps-x86.txt @@ -1,20 +1,33 @@ -http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk_1.32.0-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk-dev_1.32.0-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.10.2-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.10.2-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.4.4-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev_0.18.1.1-2_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-tools-dev_0.18.1.1-2_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.3-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib_2.26.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib-dev_2.26.1-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+_2.16.6-3_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-dev_2.16.6-3_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango_1.28.3-1_win32.zip -http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango-dev_1.28.3-1_win32.zip +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-atk-2.2.0-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-atk-devel-2.2.0-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-cairo-devel-1.10.2-6.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-expat-2.0.1-4.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-fontconfig-2.8.0-5.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-freetype-2.4.7-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gdk-pixbuf-2.24.0-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gdk-pixbuf-devel-2.24.0-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gdk-pixbuf-devel-tools-2.24.0-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gettext-runtime-0.18.1.1-13.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gettext-tools-0.18.1.1-13.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-glib2-2.30.2-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-glib2-devel-2.30.2-1.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-2.24.8-1.2.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-devel-2.24.8-1.2.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-engines-2.20.2-5.2.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-lang-2.24.8-1.2.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libcairo2-1.10.2-6.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libexpat-2.0.1-4.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libffi-3.0.10-2.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libgcc-4.6.2-2.1.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libintl-0.18.1.1-13.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libintl-devel-0.18.1.1-13.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libjasper-1.900.1-6.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libjpeg-8c-2.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libpng-1.5.6-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libtiff-3.9.5-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-pango-1.29.4-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-pango-devel-1.29.4-1.3.noarch.rpm +http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-pixman-0.24.0-1.3.noarch.rpm http://xchat-wdk.googlecode.com/files/Enchant-WDK%201.6.0-2%20x86.7z http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x86.7z http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0e-2%20x86.7z diff --git a/src/makefile.mak b/src/makefile.mak index 6e6cf95c..cd73b879 100644 --- a/src/makefile.mak +++ b/src/makefile.mak @@ -7,8 +7,8 @@ all: @-$(MAKE) /nologo /s /f makefile.mak $@ @cd ..\fe-text @-$(MAKE) /nologo /s /f makefile.mak $@ -# @cd ..\gtk2-prefs -# @-$(MAKE) /nologo /s /f makefile.mak $@ + @cd ..\gtk2-prefs + @-$(MAKE) /nologo /s /f makefile.mak $@ clean: @cd pixmaps @@ -19,5 +19,5 @@ clean: @-$(MAKE) /nologo /s /f makefile.mak clean $@ @cd ..\fe-text @-$(MAKE) /nologo /s /f makefile.mak clean $@ -# @cd ..\gtk2-prefs -# @-$(MAKE) /nologo /s /f makefile.mak clean $@ + @cd ..\gtk2-prefs + @-$(MAKE) /nologo /s /f makefile.mak clean $@ diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index 1ccb0d32..03fa43e8 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -9,7 +9,7 @@ LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include /I$(DEV)\include\libxml2 GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 -LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib libxml2.lib +LIBS = $(LIBS) /libpath:$(DEV)\lib libgtk-win32-2.0-0.lib libgdk-win32-2.0-0.lib libatk-1.0-0.lib libgio-2.0-0.lib libgdk_pixbuf-2.0-0.lib libpangowin32-1.0-0.lib libpangocairo-1.0-0.lib libpango-1.0-0.lib libcairo-2.lib libgobject-2.0-0.lib libgmodule-2.0-0.lib libglib-2.0-0.lib libintl-8.lib libxml2-2.lib LUALIB = lua51 LUAOUTPUT = xclua.dll -- cgit 1.4.1 From 9d1b4bbf9efca4f2e8a593cad7526a1a6850cc27 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 28 Nov 2011 18:08:58 +0100 Subject: some branding for gtkpref --- src/gtk2-prefs/interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gtk2-prefs/interface.cpp b/src/gtk2-prefs/interface.cpp index 18b66bb6..7c1cc53c 100644 --- a/src/gtk2-prefs/interface.cpp +++ b/src/gtk2-prefs/interface.cpp @@ -304,7 +304,7 @@ create_main_window (void) gtk_widget_show (image2); gtk_box_pack_start (GTK_BOX (hbox6665), image2, FALSE, FALSE, 0); - label2 = gtk_label_new ("You should restart your programs\nfor this change to take effect."); + label2 = gtk_label_new ("You should restart XChat-WDK\nfor this change to take effect."); gtk_widget_set_name (label2, "label2"); gtk_widget_show (label2); gtk_box_pack_start (GTK_BOX (hbox6665), label2, FALSE, FALSE, 0); -- cgit 1.4.1 From 986d0a19935112882cd77860af5b8d6e94f7585f Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 28 Nov 2011 18:48:13 +0100 Subject: supposed fix for xtray, but not working correctly yet --- src/fe-gtk/fe-gtk.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index 3f403f94..c11f5235 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -926,7 +926,11 @@ fe_gui_info_ptr (session *sess, int info_type) { case 0: /* native window pointer (for plugins) */ #ifdef WIN32 +#if GTK_CHECK_VERSION(2,24,8) + return gdk_win32_window_get_impl_hwnd (sess->gui->window->window); +#else return GDK_WINDOW_HWND (sess->gui->window->window); +#endif #else return sess->gui->window; #endif -- cgit 1.4.1 From e4e44c93e111e9b38229929a982837c8265248dc Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 29 Nov 2011 02:00:35 +0100 Subject: disable taskbar alerts on x86 until it's fixed in gtk --- src/fe-gtk/maingui.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 74157a7f..daa5f868 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -218,7 +218,10 @@ mg_create_tab_colors (void) static void set_window_urgency (GtkWidget *win, gboolean set) { +#ifdef _WIN64 + /* this is currently borked in OBS GTK+ 2.24.8 */ gtk_window_set_urgency_hint (GTK_WINDOW (win), set); +#endif } static void -- cgit 1.4.1 From b16ca3fa64fc1fa83d40d00d0090cc7fd27a9840 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 29 Nov 2011 20:15:56 +0100 Subject: initial plugin config framework, can't save multiple entries --- plugins/xchat-plugin.h | 20 +++++++++++ src/common/cfgfiles.c | 2 +- src/common/cfgfiles.h | 1 + src/common/plugin.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++ src/common/plugin.h | 7 ++++ src/common/util.c | 18 ++++++++++ src/common/util.h | 1 + src/common/xchat-plugin.h | 20 +++++++++++ 8 files changed, 157 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h index 30b19295..e9dd1be8 100644 --- a/plugins/xchat-plugin.h +++ b/plugins/xchat-plugin.h @@ -137,6 +137,13 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); + int (*xchat_set_plugin_pref) (xchat_plugin *ph, + char *var, + char *value); + int (*xchat_get_plugin_pref) (xchat_plugin *ph, + char *var, + char *dest, + int dest_len); }; #endif @@ -292,6 +299,17 @@ void xchat_free (xchat_plugin *ph, void *ptr); +int +xchat_set_plugin_pref (xchat_plugin *ph, + char *var, + char *value); + +int +xchat_get_plugin_pref (xchat_plugin *ph, + char *var, + char *dest, + int dest_len); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -326,6 +344,8 @@ xchat_free (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) +#define xchat_set_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref) +#define xchat_get_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref) #endif #ifdef __cplusplus diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index e5d0eaef..ff4f3756 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -197,7 +197,7 @@ cfg_get_str (char *cfg, char *var, char *dest, int dest_len) } } -static int +int cfg_put_str (int fh, char *var, char *value) { char buf[512]; diff --git a/src/common/cfgfiles.h b/src/common/cfgfiles.h index 984b9472..59fc34b0 100644 --- a/src/common/cfgfiles.h +++ b/src/common/cfgfiles.h @@ -9,6 +9,7 @@ extern char *xdir_fs; extern char *xdir_utf; char *cfg_get_str (char *cfg, char *var, char *dest, int dest_len); +int cfg_put_str (int fh, char *var, char *value); int cfg_get_bool (char *var); int cfg_get_int_with_result (char *cfg, char *var, int *result); int cfg_get_int (char *cfg, char *var); diff --git a/src/common/plugin.c b/src/common/plugin.c index b40660a1..ffdc013e 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include "xchat.h" #include "fe.h" @@ -262,6 +264,8 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func, pl->xchat_send_modes = xchat_send_modes; pl->xchat_strip = xchat_strip; pl->xchat_free = xchat_free; + pl->xchat_set_plugin_pref = xchat_set_plugin_pref; + pl->xchat_get_plugin_pref = xchat_get_plugin_pref; /* incase new plugins are loaded on older xchat */ pl->xchat_dummy4 = xchat_dummy; @@ -1570,3 +1574,88 @@ xchat_free (xchat_plugin *ph, void *ptr) { g_free (ptr); } + +int +xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) +{ + int fh; + char confname[32]; + char *canon; + + canon = g_strdup (pl->name); + canonalize_key (canon); + sprintf (confname, "plugin_%s.conf", canon); + g_free (canon); + + /* partly borrowed from palette.c */ + fh = xchat_open_file (confname, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE); + if (fh != -1) + { + cfg_put_str (fh, var, value); + close (fh); + + return 1; + } + else + { + return 0; + } +} + +int +xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest, int dest_len) +{ + //cfg_get_str (char *cfg, char *var, char *dest, int dest_len) + int fh; + int l; + char confname[32]; + //char *buffer; + char *canon; + char *cfg; + struct stat st; + + canon = g_strdup (pl->name); + canonalize_key (canon); + sprintf (confname, "plugin_%s.conf", canon); + g_free (canon); + + //buffer = (char*) malloc (dest_len); + + /* partly borrowed from palette.c */ + fh = xchat_open_file (confname, O_RDONLY, 0, 0); + + if (fh != -1) + { + fstat (fh, &st); + cfg = malloc (st.st_size + 1); + + if (cfg) + { + cfg[0] = '\0'; + l = read (fh, cfg, st.st_size); + + if (l >= 0) + { + cfg[l] = '\0'; + } + + if (!cfg_get_str (cfg, var, dest, dest_len)) + { + return 0; + } + + free (cfg); + } + else + { + return 0; + } + + close (fh); + return 1; + } + else + { + return 0; + } +} diff --git a/src/common/plugin.h b/src/common/plugin.h index b0c89d1b..6a2d62e2 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -98,6 +98,13 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); + int (*xchat_set_plugin_pref) (xchat_plugin *ph, + char *var, + char *value); + int (*xchat_get_plugin_pref) (xchat_plugin *ph, + char *var, + char *dest, + int dest_len); void *(*xchat_dummy4) (xchat_plugin *ph); void *(*xchat_dummy3) (xchat_plugin *ph); void *(*xchat_dummy2) (xchat_plugin *ph); diff --git a/src/common/util.c b/src/common/util.c index 870f4d5c..c16d41f5 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1830,3 +1830,21 @@ safe_strcpy (char *dest, const char *src, int bytes_left) } } } + +void +canonalize_key (char *key) +{ + char *pos, token; + + for (pos = key; (token = *pos) != 0; pos++) + { + if (token != '_' && (token < '0' || token > '9') && (token < 'A' || token > 'Z') && (token < 'a' || token > 'z')) + { + *pos = '_'; + } + else + { + *pos = tolower(token); + } + } +} diff --git a/src/common/util.h b/src/common/util.h index 92d2a843..bee6ec3c 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -56,5 +56,6 @@ int token_foreach (char *str, char sep, int (*callback) (char *str, void *ud), v guint32 str_hash (const char *key); guint32 str_ihash (const unsigned char *key); void safe_strcpy (char *dest, const char *src, int bytes_left); +void canonalize_key (char *key); #endif diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h index 30b19295..e9dd1be8 100644 --- a/src/common/xchat-plugin.h +++ b/src/common/xchat-plugin.h @@ -137,6 +137,13 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); + int (*xchat_set_plugin_pref) (xchat_plugin *ph, + char *var, + char *value); + int (*xchat_get_plugin_pref) (xchat_plugin *ph, + char *var, + char *dest, + int dest_len); }; #endif @@ -292,6 +299,17 @@ void xchat_free (xchat_plugin *ph, void *ptr); +int +xchat_set_plugin_pref (xchat_plugin *ph, + char *var, + char *value); + +int +xchat_get_plugin_pref (xchat_plugin *ph, + char *var, + char *dest, + int dest_len); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -326,6 +344,8 @@ xchat_free (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) +#define xchat_set_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref) +#define xchat_get_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref) #endif #ifdef __cplusplus -- cgit 1.4.1 From f9fa102690cef217b1565af35b34a727a9b58b33 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 01:41:34 +0100 Subject: plugin config save is done via raw file access, now works with multiple vars --- plugins/xchat-plugin.h | 6 +- src/common/plugin.c | 143 ++++++++++++++++++++++++++++++++-------------- src/common/xchat-plugin.h | 6 +- 3 files changed, 105 insertions(+), 50 deletions(-) (limited to 'src') diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h index e9dd1be8..c3606b19 100644 --- a/plugins/xchat-plugin.h +++ b/plugins/xchat-plugin.h @@ -142,8 +142,7 @@ struct _xchat_plugin char *value); int (*xchat_get_plugin_pref) (xchat_plugin *ph, char *var, - char *dest, - int dest_len); + char *dest); }; #endif @@ -307,8 +306,7 @@ xchat_set_plugin_pref (xchat_plugin *ph, int xchat_get_plugin_pref (xchat_plugin *ph, char *var, - char *dest, - int dest_len); + char *dest); #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE diff --git a/src/common/plugin.c b/src/common/plugin.c index ffdc013e..96510265 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1578,38 +1578,104 @@ xchat_free (xchat_plugin *ph, void *ptr) int xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) { - int fh; - char confname[32]; + FILE *fpIn; + int fhOut; + int prevConfig; + char confname[64]; + char confname_tmp[69]; + char buffer[512]; /* the same as in cfg_put_str */ + char buffer_tmp[512]; char *canon; canon = g_strdup (pl->name); canonalize_key (canon); sprintf (confname, "plugin_%s.conf", canon); g_free (canon); + sprintf (confname_tmp, "%s.new", confname); - /* partly borrowed from palette.c */ - fh = xchat_open_file (confname, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE); - if (fh != -1) + fhOut = xchat_open_file (confname_tmp, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE); + fpIn = xchat_fopen_file (confname, "r", 0); + + if (fhOut == -1) /* unable to save, abort */ { - cfg_put_str (fh, var, value); - close (fh); + return 0; + } + else if (fpIn == NULL) /* no previous config, no parsing */ + { + sprintf (buffer, "%s = %s\n", var, value); + write (fhOut, buffer, strlen (buffer)); + close (fhOut); - return 1; +#ifdef WIN32 + sprintf (buffer, "%s/%s", get_xdir_fs (), confname); + unlink (buffer); +#endif + + sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); + if (rename (buffer_tmp, buffer) == 0) + { + return 1; + } + else + { + return 0; + } } - else + else /* existing config, preserve settings and find & replace current var value if any */ { - return 0; + prevConfig = 0; + + while (fscanf (fpIn, " %[^\n]", &buffer) != EOF) /* read whole lines including whitespaces */ + { + sprintf (buffer_tmp, "%s ", var); /* add one space, this way it works against var - var2 checks too */ + + if (strncmp (buffer_tmp, buffer, strlen (var) + 1) == 0) /* given setting already exists */ + { + sprintf (buffer, "%s = %s\n", var, value); + prevConfig = 1; + } + else + { + strcat (buffer, "\n"); + } + + write (fhOut, buffer, strlen (buffer)); + } + + fclose (fpIn); + + if (!prevConfig) + { + sprintf (buffer, "%s = %s\n", var, value); + write (fhOut, buffer, strlen (buffer)); + } + + close (fhOut); + +#ifdef WIN32 + sprintf (buffer, "%s/%s", get_xdir_fs (), confname); + unlink (buffer); +#endif + + sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); + + if (rename (buffer_tmp, buffer) == 0) + { + return 1; + } + else + { + return 0; + } } } int -xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest, int dest_len) +xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest) { - //cfg_get_str (char *cfg, char *var, char *dest, int dest_len) int fh; int l; - char confname[32]; - //char *buffer; + char confname[64]; char *canon; char *cfg; struct stat st; @@ -1619,43 +1685,36 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest, int dest_len) sprintf (confname, "plugin_%s.conf", canon); g_free (canon); - //buffer = (char*) malloc (dest_len); - /* partly borrowed from palette.c */ - fh = xchat_open_file (confname, O_RDONLY, 0, 0); + fh = xchat_open_file (confname, _O_RDONLY, 0, 0); - if (fh != -1) + if (fh == -1) { - fstat (fh, &st); - cfg = malloc (st.st_size + 1); - - if (cfg) - { - cfg[0] = '\0'; - l = read (fh, cfg, st.st_size); + return 0; + } - if (l >= 0) - { - cfg[l] = '\0'; - } + fstat (fh, &st); + cfg = malloc (st.st_size + 1); - if (!cfg_get_str (cfg, var, dest, dest_len)) - { - return 0; - } + if (!cfg) + { + return 0; + } - free (cfg); - } - else - { - return 0; - } + cfg[0] = '\0'; + l = read (fh, cfg, st.st_size); - close (fh); - return 1; + if (l >= 0) + { + cfg[l] = '\0'; } - else + + if (!cfg_get_str (cfg, var, dest, 512)) /* dest_len is the same as buffer size in set */ { return 0; } + + free (cfg); + close (fh); + return 1; } diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h index e9dd1be8..c3606b19 100644 --- a/src/common/xchat-plugin.h +++ b/src/common/xchat-plugin.h @@ -142,8 +142,7 @@ struct _xchat_plugin char *value); int (*xchat_get_plugin_pref) (xchat_plugin *ph, char *var, - char *dest, - int dest_len); + char *dest); }; #endif @@ -307,8 +306,7 @@ xchat_set_plugin_pref (xchat_plugin *ph, int xchat_get_plugin_pref (xchat_plugin *ph, char *var, - char *dest, - int dest_len); + char *dest); #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE -- cgit 1.4.1 From 14c7027d5296585af5cbd16c8fb5ab9f6fe44c30 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 01:43:45 +0100 Subject: cfg_put_str is not required anymore --- src/common/cfgfiles.c | 2 +- src/common/cfgfiles.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index ff4f3756..e5d0eaef 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -197,7 +197,7 @@ cfg_get_str (char *cfg, char *var, char *dest, int dest_len) } } -int +static int cfg_put_str (int fh, char *var, char *value) { char buf[512]; diff --git a/src/common/cfgfiles.h b/src/common/cfgfiles.h index 59fc34b0..984b9472 100644 --- a/src/common/cfgfiles.h +++ b/src/common/cfgfiles.h @@ -9,7 +9,6 @@ extern char *xdir_fs; extern char *xdir_utf; char *cfg_get_str (char *cfg, char *var, char *dest, int dest_len); -int cfg_put_str (int fh, char *var, char *value); int cfg_get_bool (char *var); int cfg_get_int_with_result (char *cfg, char *var, int *result); int cfg_get_int (char *cfg, char *var); -- cgit 1.4.1 From e2fa2d47872d8d3111996e9d3d96b326fd316904 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 02:18:18 +0100 Subject: fix some memory leaks --- src/common/plugin.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index 96510265..7bc39400 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1698,6 +1698,7 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest) if (!cfg) { + close (fh); return 0; } @@ -1711,6 +1712,8 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest) if (!cfg_get_str (cfg, var, dest, 512)) /* dest_len is the same as buffer size in set */ { + free (cfg); + close (fh); return 0; } -- cgit 1.4.1 From 845c4915bf51d4d670f527275b99c7423708bbfc Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 03:40:07 +0100 Subject: plugin config unix compatibility part 1 --- src/common/plugin.c | 8 +++++++- src/version-script | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index 7bc39400..45109ee2 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -23,6 +23,12 @@ #include #include +#ifdef WIN32 +#include +#else +#include +#endif + #include "xchat.h" #include "fe.h" #include "util.h" @@ -1686,7 +1692,7 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest) g_free (canon); /* partly borrowed from palette.c */ - fh = xchat_open_file (confname, _O_RDONLY, 0, 0); + fh = xchat_open_file (confname, O_RDONLY, 0, 0); if (fh == -1) { diff --git a/src/version-script b/src/version-script index 048c1f55..e747958b 100644 --- a/src/version-script +++ b/src/version-script @@ -30,5 +30,7 @@ EXPORTED { xchat_send_modes; xchat_strip; xchat_free; + xchat_set_plugin_pref; + xchat_get_plugin_pref; local: *; }; -- cgit 1.4.1 From 2fac353c85ee186b7efa94af6552f676f717cc89 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 07:27:58 +0100 Subject: fix nasty ifdef bug --- src/common/plugin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index 45109ee2..1e930538 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1612,11 +1612,10 @@ xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) write (fhOut, buffer, strlen (buffer)); close (fhOut); -#ifdef WIN32 sprintf (buffer, "%s/%s", get_xdir_fs (), confname); +#ifdef WIN32 unlink (buffer); #endif - sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); if (rename (buffer_tmp, buffer) == 0) { @@ -1658,11 +1657,10 @@ xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) close (fhOut); -#ifdef WIN32 sprintf (buffer, "%s/%s", get_xdir_fs (), confname); +#ifdef WIN32 unlink (buffer); #endif - sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); if (rename (buffer_tmp, buffer) == 0) -- cgit 1.4.1 From f49caf67f642336888a63d61f60b458236df19ad Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 07:32:40 +0100 Subject: cosmetics --- src/common/plugin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index 1e930538..41690038 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1613,10 +1613,12 @@ xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) close (fhOut); sprintf (buffer, "%s/%s", get_xdir_fs (), confname); + sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); + #ifdef WIN32 unlink (buffer); #endif - sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); + if (rename (buffer_tmp, buffer) == 0) { return 1; @@ -1658,10 +1660,11 @@ xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) close (fhOut); sprintf (buffer, "%s/%s", get_xdir_fs (), confname); + sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); + #ifdef WIN32 unlink (buffer); #endif - sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); if (rename (buffer_tmp, buffer) == 0) { -- cgit 1.4.1 From 1567d326971811fd956042aaa43c932d247b4681 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 08:28:19 +0100 Subject: plugin config - separate string and int functions --- plugins/xchat-plugin.h | 27 +++++++++++++++++++++------ src/common/plugin.c | 26 ++++++++++++++++++++++---- src/common/plugin.h | 12 ++++++++---- src/common/xchat-plugin.h | 27 +++++++++++++++++++++------ 4 files changed, 72 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h index c3606b19..c278012a 100644 --- a/plugins/xchat-plugin.h +++ b/plugins/xchat-plugin.h @@ -137,12 +137,17 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_plugin_pref) (xchat_plugin *ph, + int (*xchat_set_plugin_pref_str) (xchat_plugin *ph, char *var, char *value); - int (*xchat_get_plugin_pref) (xchat_plugin *ph, + int (*xchat_get_plugin_pref_str) (xchat_plugin *ph, char *var, char *dest); + int (*xchat_set_plugin_pref_int) (xchat_plugin *ph, + char *var, + int value); + int (*xchat_get_plugin_pref_int) (xchat_plugin *ph, + char *var); }; #endif @@ -299,15 +304,23 @@ xchat_free (xchat_plugin *ph, void *ptr); int -xchat_set_plugin_pref (xchat_plugin *ph, +xchat_set_plugin_pref_str (xchat_plugin *ph, char *var, char *value); int -xchat_get_plugin_pref (xchat_plugin *ph, +xchat_get_plugin_pref_str (xchat_plugin *ph, char *var, char *dest); +int +xchat_set_plugin_pref_int (xchat_plugin *ph, + char *var, + int value); +int +xchat_get_plugin_pref_int (xchat_plugin *ph, + char *var); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -342,8 +355,10 @@ xchat_get_plugin_pref (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) -#define xchat_set_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref) -#define xchat_get_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref) +#define xchat_set_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_str) +#define xchat_get_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_str) +#define xchat_set_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_int) +#define xchat_get_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_int) #endif #ifdef __cplusplus diff --git a/src/common/plugin.c b/src/common/plugin.c index 41690038..bd960ea5 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -270,8 +270,10 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func, pl->xchat_send_modes = xchat_send_modes; pl->xchat_strip = xchat_strip; pl->xchat_free = xchat_free; - pl->xchat_set_plugin_pref = xchat_set_plugin_pref; - pl->xchat_get_plugin_pref = xchat_get_plugin_pref; + pl->xchat_set_plugin_pref_str = xchat_set_plugin_pref_str; + pl->xchat_get_plugin_pref_str = xchat_get_plugin_pref_str; + pl->xchat_set_plugin_pref_int = xchat_set_plugin_pref_int; + pl->xchat_get_plugin_pref_int= xchat_get_plugin_pref_int; /* incase new plugins are loaded on older xchat */ pl->xchat_dummy4 = xchat_dummy; @@ -1582,7 +1584,7 @@ xchat_free (xchat_plugin *ph, void *ptr) } int -xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) +xchat_set_plugin_pref_str (xchat_plugin *pl, char *var, char *value) { FILE *fpIn; int fhOut; @@ -1678,7 +1680,7 @@ xchat_set_plugin_pref (xchat_plugin *pl, char *var, char *value) } int -xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest) +xchat_get_plugin_pref_str (xchat_plugin *pl, char *var, char *dest) { int fh; int l; @@ -1728,3 +1730,19 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest) close (fh); return 1; } + +int +xchat_set_plugin_pref_int (xchat_plugin *pl, char *var, int value) +{ + char buffer[12]; + sprintf (buffer, "%d", value); + return xchat_set_plugin_pref_str (pl, var, buffer); +} + +int +xchat_get_plugin_pref_int (xchat_plugin *pl, char *var) +{ + char buffer[12]; + xchat_get_plugin_pref_str (pl, var, buffer); + return atoi (buffer); +} diff --git a/src/common/plugin.h b/src/common/plugin.h index 6a2d62e2..f0ae6fc4 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -98,13 +98,17 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_plugin_pref) (xchat_plugin *ph, + int (*xchat_set_plugin_pref_str) (xchat_plugin *ph, char *var, char *value); - int (*xchat_get_plugin_pref) (xchat_plugin *ph, + int (*xchat_get_plugin_pref_str) (xchat_plugin *ph, char *var, - char *dest, - int dest_len); + char *dest); + int (*xchat_set_plugin_pref_int) (xchat_plugin *ph, + char *var, + int value); + int (*xchat_get_plugin_pref_int) (xchat_plugin *ph, + char *var); void *(*xchat_dummy4) (xchat_plugin *ph); void *(*xchat_dummy3) (xchat_plugin *ph); void *(*xchat_dummy2) (xchat_plugin *ph); diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h index c3606b19..c278012a 100644 --- a/src/common/xchat-plugin.h +++ b/src/common/xchat-plugin.h @@ -137,12 +137,17 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_plugin_pref) (xchat_plugin *ph, + int (*xchat_set_plugin_pref_str) (xchat_plugin *ph, char *var, char *value); - int (*xchat_get_plugin_pref) (xchat_plugin *ph, + int (*xchat_get_plugin_pref_str) (xchat_plugin *ph, char *var, char *dest); + int (*xchat_set_plugin_pref_int) (xchat_plugin *ph, + char *var, + int value); + int (*xchat_get_plugin_pref_int) (xchat_plugin *ph, + char *var); }; #endif @@ -299,15 +304,23 @@ xchat_free (xchat_plugin *ph, void *ptr); int -xchat_set_plugin_pref (xchat_plugin *ph, +xchat_set_plugin_pref_str (xchat_plugin *ph, char *var, char *value); int -xchat_get_plugin_pref (xchat_plugin *ph, +xchat_get_plugin_pref_str (xchat_plugin *ph, char *var, char *dest); +int +xchat_set_plugin_pref_int (xchat_plugin *ph, + char *var, + int value); +int +xchat_get_plugin_pref_int (xchat_plugin *ph, + char *var); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -342,8 +355,10 @@ xchat_get_plugin_pref (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) -#define xchat_set_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref) -#define xchat_get_plugin_pref ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref) +#define xchat_set_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_str) +#define xchat_get_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_str) +#define xchat_set_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_int) +#define xchat_get_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_int) #endif #ifdef __cplusplus -- cgit 1.4.1 From ebee44ca131baae1d64a4af992c5580dd5836585 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 08:35:13 +0100 Subject: some more unix love for plugin config --- src/version-script | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/version-script b/src/version-script index e747958b..94a95a0b 100644 --- a/src/version-script +++ b/src/version-script @@ -30,7 +30,9 @@ EXPORTED { xchat_send_modes; xchat_strip; xchat_free; - xchat_set_plugin_pref; - xchat_get_plugin_pref; + xchat_set_plugin_pref_str; + xchat_get_plugin_pref_str; + xchat_set_plugin_pref_int; + xchat_get_plugin_pref_int; local: *; }; -- cgit 1.4.1 From ac4043dd9d3f0549198977593ddcbba5039eae6d Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 08:35:18 +0100 Subject: cosmetics --- src/common/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index bd960ea5..56626865 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -273,7 +273,7 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func, pl->xchat_set_plugin_pref_str = xchat_set_plugin_pref_str; pl->xchat_get_plugin_pref_str = xchat_get_plugin_pref_str; pl->xchat_set_plugin_pref_int = xchat_set_plugin_pref_int; - pl->xchat_get_plugin_pref_int= xchat_get_plugin_pref_int; + pl->xchat_get_plugin_pref_int = xchat_get_plugin_pref_int; /* incase new plugins are loaded on older xchat */ pl->xchat_dummy4 = xchat_dummy; -- cgit 1.4.1 From e488a0232a467b0b469a45f251b264f723380276 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 08:52:55 +0100 Subject: make error check possible for xchat_get_plugin_pref_int --- src/common/plugin.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index 56626865..d1493ccd 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1735,6 +1735,7 @@ int xchat_set_plugin_pref_int (xchat_plugin *pl, char *var, int value) { char buffer[12]; + sprintf (buffer, "%d", value); return xchat_set_plugin_pref_str (pl, var, buffer); } @@ -1743,6 +1744,13 @@ int xchat_get_plugin_pref_int (xchat_plugin *pl, char *var) { char buffer[12]; - xchat_get_plugin_pref_str (pl, var, buffer); - return atoi (buffer); + + if (xchat_get_plugin_pref_str (pl, var, buffer)) + { + return atoi (buffer); + } + else + { + return -1; + } } -- cgit 1.4.1 From b692172aa907243c7543015468da0fb077a9ac99 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 30 Nov 2011 08:59:40 +0100 Subject: refactoring --- plugins/xchat-plugin.h | 24 ++++++++++++------------ src/common/plugin.c | 20 ++++++++++---------- src/common/plugin.h | 8 ++++---- src/common/xchat-plugin.h | 24 ++++++++++++------------ src/version-script | 8 ++++---- 5 files changed, 42 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h index c278012a..48e3bc02 100644 --- a/plugins/xchat-plugin.h +++ b/plugins/xchat-plugin.h @@ -137,16 +137,16 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_plugin_pref_str) (xchat_plugin *ph, + int (*xchat_set_pluginpref_str) (xchat_plugin *ph, char *var, char *value); - int (*xchat_get_plugin_pref_str) (xchat_plugin *ph, + int (*xchat_get_pluginpref_str) (xchat_plugin *ph, char *var, char *dest); - int (*xchat_set_plugin_pref_int) (xchat_plugin *ph, + int (*xchat_set_pluginpref_int) (xchat_plugin *ph, char *var, int value); - int (*xchat_get_plugin_pref_int) (xchat_plugin *ph, + int (*xchat_get_pluginpref_int) (xchat_plugin *ph, char *var); }; #endif @@ -304,21 +304,21 @@ xchat_free (xchat_plugin *ph, void *ptr); int -xchat_set_plugin_pref_str (xchat_plugin *ph, +xchat_set_pluginpref_str (xchat_plugin *ph, char *var, char *value); int -xchat_get_plugin_pref_str (xchat_plugin *ph, +xchat_get_pluginpref_str (xchat_plugin *ph, char *var, char *dest); int -xchat_set_plugin_pref_int (xchat_plugin *ph, +xchat_set_pluginpref_int (xchat_plugin *ph, char *var, int value); int -xchat_get_plugin_pref_int (xchat_plugin *ph, +xchat_get_pluginpref_int (xchat_plugin *ph, char *var); #if !defined(PLUGIN_C) && defined(WIN32) @@ -355,10 +355,10 @@ xchat_get_plugin_pref_int (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) -#define xchat_set_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_str) -#define xchat_get_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_str) -#define xchat_set_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_int) -#define xchat_get_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_int) +#define xchat_set_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_str) +#define xchat_get_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_str) +#define xchat_set_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_int) +#define xchat_get_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_int) #endif #ifdef __cplusplus diff --git a/src/common/plugin.c b/src/common/plugin.c index d1493ccd..b5b10a0e 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -270,10 +270,10 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func, pl->xchat_send_modes = xchat_send_modes; pl->xchat_strip = xchat_strip; pl->xchat_free = xchat_free; - pl->xchat_set_plugin_pref_str = xchat_set_plugin_pref_str; - pl->xchat_get_plugin_pref_str = xchat_get_plugin_pref_str; - pl->xchat_set_plugin_pref_int = xchat_set_plugin_pref_int; - pl->xchat_get_plugin_pref_int = xchat_get_plugin_pref_int; + pl->xchat_set_pluginpref_str = xchat_set_pluginpref_str; + pl->xchat_get_pluginpref_str = xchat_get_pluginpref_str; + pl->xchat_set_pluginpref_int = xchat_set_pluginpref_int; + pl->xchat_get_pluginpref_int = xchat_get_pluginpref_int; /* incase new plugins are loaded on older xchat */ pl->xchat_dummy4 = xchat_dummy; @@ -1584,7 +1584,7 @@ xchat_free (xchat_plugin *ph, void *ptr) } int -xchat_set_plugin_pref_str (xchat_plugin *pl, char *var, char *value) +xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value) { FILE *fpIn; int fhOut; @@ -1680,7 +1680,7 @@ xchat_set_plugin_pref_str (xchat_plugin *pl, char *var, char *value) } int -xchat_get_plugin_pref_str (xchat_plugin *pl, char *var, char *dest) +xchat_get_pluginpref_str (xchat_plugin *pl, char *var, char *dest) { int fh; int l; @@ -1732,20 +1732,20 @@ xchat_get_plugin_pref_str (xchat_plugin *pl, char *var, char *dest) } int -xchat_set_plugin_pref_int (xchat_plugin *pl, char *var, int value) +xchat_set_pluginpref_int (xchat_plugin *pl, char *var, int value) { char buffer[12]; sprintf (buffer, "%d", value); - return xchat_set_plugin_pref_str (pl, var, buffer); + return xchat_set_pluginpref_str (pl, var, buffer); } int -xchat_get_plugin_pref_int (xchat_plugin *pl, char *var) +xchat_get_pluginpref_int (xchat_plugin *pl, char *var) { char buffer[12]; - if (xchat_get_plugin_pref_str (pl, var, buffer)) + if (xchat_get_pluginpref_str (pl, var, buffer)) { return atoi (buffer); } diff --git a/src/common/plugin.h b/src/common/plugin.h index f0ae6fc4..858ed815 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -98,16 +98,16 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_plugin_pref_str) (xchat_plugin *ph, + int (*xchat_set_pluginpref_str) (xchat_plugin *ph, char *var, char *value); - int (*xchat_get_plugin_pref_str) (xchat_plugin *ph, + int (*xchat_get_pluginpref_str) (xchat_plugin *ph, char *var, char *dest); - int (*xchat_set_plugin_pref_int) (xchat_plugin *ph, + int (*xchat_set_pluginpref_int) (xchat_plugin *ph, char *var, int value); - int (*xchat_get_plugin_pref_int) (xchat_plugin *ph, + int (*xchat_get_pluginpref_int) (xchat_plugin *ph, char *var); void *(*xchat_dummy4) (xchat_plugin *ph); void *(*xchat_dummy3) (xchat_plugin *ph); diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h index c278012a..48e3bc02 100644 --- a/src/common/xchat-plugin.h +++ b/src/common/xchat-plugin.h @@ -137,16 +137,16 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_plugin_pref_str) (xchat_plugin *ph, + int (*xchat_set_pluginpref_str) (xchat_plugin *ph, char *var, char *value); - int (*xchat_get_plugin_pref_str) (xchat_plugin *ph, + int (*xchat_get_pluginpref_str) (xchat_plugin *ph, char *var, char *dest); - int (*xchat_set_plugin_pref_int) (xchat_plugin *ph, + int (*xchat_set_pluginpref_int) (xchat_plugin *ph, char *var, int value); - int (*xchat_get_plugin_pref_int) (xchat_plugin *ph, + int (*xchat_get_pluginpref_int) (xchat_plugin *ph, char *var); }; #endif @@ -304,21 +304,21 @@ xchat_free (xchat_plugin *ph, void *ptr); int -xchat_set_plugin_pref_str (xchat_plugin *ph, +xchat_set_pluginpref_str (xchat_plugin *ph, char *var, char *value); int -xchat_get_plugin_pref_str (xchat_plugin *ph, +xchat_get_pluginpref_str (xchat_plugin *ph, char *var, char *dest); int -xchat_set_plugin_pref_int (xchat_plugin *ph, +xchat_set_pluginpref_int (xchat_plugin *ph, char *var, int value); int -xchat_get_plugin_pref_int (xchat_plugin *ph, +xchat_get_pluginpref_int (xchat_plugin *ph, char *var); #if !defined(PLUGIN_C) && defined(WIN32) @@ -355,10 +355,10 @@ xchat_get_plugin_pref_int (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) -#define xchat_set_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_str) -#define xchat_get_plugin_pref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_str) -#define xchat_set_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_plugin_pref_int) -#define xchat_get_plugin_pref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_plugin_pref_int) +#define xchat_set_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_str) +#define xchat_get_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_str) +#define xchat_set_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_int) +#define xchat_get_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_int) #endif #ifdef __cplusplus diff --git a/src/version-script b/src/version-script index 94a95a0b..e76f4fe9 100644 --- a/src/version-script +++ b/src/version-script @@ -30,9 +30,9 @@ EXPORTED { xchat_send_modes; xchat_strip; xchat_free; - xchat_set_plugin_pref_str; - xchat_get_plugin_pref_str; - xchat_set_plugin_pref_int; - xchat_get_plugin_pref_int; + xchat_set_pluginpref_str; + xchat_get_pluginpref_str; + xchat_set_pluginpref_int; + xchat_get_pluginpref_int; local: *; }; -- cgit 1.4.1 From 455032938a9d5336e55684692113fbca8a156810 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 1 Dec 2011 21:24:58 +0100 Subject: plugin api conformance --- plugins/xchat-plugin.h | 20 ++++++++++---------- src/common/plugin.c | 10 +++++----- src/common/plugin.h | 10 +++++----- src/common/xchat-plugin.h | 20 ++++++++++---------- 4 files changed, 30 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h index 48e3bc02..15799424 100644 --- a/plugins/xchat-plugin.h +++ b/plugins/xchat-plugin.h @@ -138,16 +138,16 @@ struct _xchat_plugin void (*xchat_free) (xchat_plugin *ph, void *ptr); int (*xchat_set_pluginpref_str) (xchat_plugin *ph, - char *var, - char *value); + const char *var, + const char *value); int (*xchat_get_pluginpref_str) (xchat_plugin *ph, - char *var, + const char *var, char *dest); int (*xchat_set_pluginpref_int) (xchat_plugin *ph, - char *var, + const char *var, int value); int (*xchat_get_pluginpref_int) (xchat_plugin *ph, - char *var); + const char *var); }; #endif @@ -305,21 +305,21 @@ xchat_free (xchat_plugin *ph, int xchat_set_pluginpref_str (xchat_plugin *ph, - char *var, - char *value); + const char *var, + const char *value); int xchat_get_pluginpref_str (xchat_plugin *ph, - char *var, + const char *var, char *dest); int xchat_set_pluginpref_int (xchat_plugin *ph, - char *var, + const char *var, int value); int xchat_get_pluginpref_int (xchat_plugin *ph, - char *var); + const char *var); #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE diff --git a/src/common/plugin.c b/src/common/plugin.c index b5b10a0e..b443b586 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1584,7 +1584,7 @@ xchat_free (xchat_plugin *ph, void *ptr) } int -xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value) +xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value) { FILE *fpIn; int fhOut; @@ -1653,7 +1653,7 @@ xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value) fclose (fpIn); - if (!prevConfig) + if (!prevConfig) /* var doesn't exist currently, append */ { sprintf (buffer, "%s = %s\n", var, value); write (fhOut, buffer, strlen (buffer)); @@ -1680,7 +1680,7 @@ xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value) } int -xchat_get_pluginpref_str (xchat_plugin *pl, char *var, char *dest) +xchat_get_pluginpref_str (xchat_plugin *pl, const char *var, char *dest) { int fh; int l; @@ -1732,7 +1732,7 @@ xchat_get_pluginpref_str (xchat_plugin *pl, char *var, char *dest) } int -xchat_set_pluginpref_int (xchat_plugin *pl, char *var, int value) +xchat_set_pluginpref_int (xchat_plugin *pl, const char *var, int value) { char buffer[12]; @@ -1741,7 +1741,7 @@ xchat_set_pluginpref_int (xchat_plugin *pl, char *var, int value) } int -xchat_get_pluginpref_int (xchat_plugin *pl, char *var) +xchat_get_pluginpref_int (xchat_plugin *pl, const char *var) { char buffer[12]; diff --git a/src/common/plugin.h b/src/common/plugin.h index 858ed815..cddb86fb 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -99,16 +99,16 @@ struct _xchat_plugin void (*xchat_free) (xchat_plugin *ph, void *ptr); int (*xchat_set_pluginpref_str) (xchat_plugin *ph, - char *var, - char *value); + const char *var, + const char *value); int (*xchat_get_pluginpref_str) (xchat_plugin *ph, - char *var, + const char *var, char *dest); int (*xchat_set_pluginpref_int) (xchat_plugin *ph, - char *var, + const char *var, int value); int (*xchat_get_pluginpref_int) (xchat_plugin *ph, - char *var); + const char *var); void *(*xchat_dummy4) (xchat_plugin *ph); void *(*xchat_dummy3) (xchat_plugin *ph); void *(*xchat_dummy2) (xchat_plugin *ph); diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h index 48e3bc02..15799424 100644 --- a/src/common/xchat-plugin.h +++ b/src/common/xchat-plugin.h @@ -138,16 +138,16 @@ struct _xchat_plugin void (*xchat_free) (xchat_plugin *ph, void *ptr); int (*xchat_set_pluginpref_str) (xchat_plugin *ph, - char *var, - char *value); + const char *var, + const char *value); int (*xchat_get_pluginpref_str) (xchat_plugin *ph, - char *var, + const char *var, char *dest); int (*xchat_set_pluginpref_int) (xchat_plugin *ph, - char *var, + const char *var, int value); int (*xchat_get_pluginpref_int) (xchat_plugin *ph, - char *var); + const char *var); }; #endif @@ -305,21 +305,21 @@ xchat_free (xchat_plugin *ph, int xchat_set_pluginpref_str (xchat_plugin *ph, - char *var, - char *value); + const char *var, + const char *value); int xchat_get_pluginpref_str (xchat_plugin *ph, - char *var, + const char *var, char *dest); int xchat_set_pluginpref_int (xchat_plugin *ph, - char *var, + const char *var, int value); int xchat_get_pluginpref_int (xchat_plugin *ph, - char *var); + const char *var); #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE -- cgit 1.4.1 From a3a6346fec2b7696b80a4a3fce1bbc3d93a71002 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 1 Dec 2011 21:25:17 +0100 Subject: fix cfgfiles bug when variable names include each other --- src/common/cfgfiles.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index e5d0eaef..22ef00d7 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -164,9 +164,13 @@ list_delentry (GSList ** list, char *name) char * cfg_get_str (char *cfg, char *var, char *dest, int dest_len) { + char buffer[128]; /* should be plenty for a variable name */ + + sprintf (buffer, "%s ", var); /* add one space, this way it works against var - var2 checks too */ + while (1) { - if (!strncasecmp (var, cfg, strlen (var))) + if (!strncasecmp (buffer, cfg, strlen (var) + 1)) { char *value, t; cfg += strlen (var); -- cgit 1.4.1 From f99e0c73cbd4be095d677639a02d4b52c68f7238 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 1 Dec 2011 23:04:07 +0100 Subject: return to original code, this is an unnecessary modificatino --- src/common/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index b443b586..ccb64e93 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -42,7 +42,7 @@ #include "text.h" #define PLUGIN_C typedef struct session xchat_context; -#include "../../plugins/xchat-plugin.h" +#include "xchat-plugin.h" #include "plugin.h" -- cgit 1.4.1 From 6dbc85b2db5153d1b7a6bf323261bc83fbf1dc50 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 2 Dec 2011 11:28:27 +0100 Subject: obs gtk 2.24 is utter, unusable crap, revert to gtk 2.16 --- build/dep-extract-x64.bat | 31 +++++++++++++------------ build/dep-extract-x86.bat | 31 +++++++++++++------------ build/release-x64.bat | 25 +++++++++++--------- build/release-x86.bat | 31 ++++++++++++++----------- build/xchat-wdk-x64.skel.iss | 49 +++++++++++++++++++++------------------ build/xchat-wdk-x86.skel.iss | 55 ++++++++++++++++++++++++-------------------- dep-x64/deps-x64.txt | 51 +++++++++++++++------------------------- dep-x86/deps-x86.txt | 51 +++++++++++++++------------------------- src/fe-gtk/maingui.c | 3 --- src/makeinc.skel.mak | 3 ++- 10 files changed, 158 insertions(+), 172 deletions(-) (limited to 'src') diff --git a/build/dep-extract-x64.bat b/build/dep-extract-x64.bat index d6381cb3..efc6386d 100644 --- a/build/dep-extract-x64.bat +++ b/build/dep-extract-x64.bat @@ -2,22 +2,23 @@ set PATH=%PATH%;%PROGRAMW6432%\7-Zip;c:\mozilla-build\gendef cd ..\dep-x64 -7z x -y *.rpm -7z x *.cpio -del *.cpio -xcopy /q /s /i usr\x86_64-w64-mingw32\sys-root\mingw\* . -rmdir /q /s usr -set OPATH=%PATH% -set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 -cd lib -for %%A in (..\bin\*.dll) do ( - gendef %%A - lib /nologo /machine:x64 /def:%%~nA.def -) -cd .. -set PATH=%OPATH% +::obs 7z x -y *.rpm +::obs 7z x *.cpio +::obs del *.cpio +::obs xcopy /q /s /i usr\x86_64-w64-mingw32\sys-root\mingw\* . +::obs rmdir /q /s usr +::obs set OPATH=%PATH% +::obs set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 +::obs cd lib +::obs for %%A in (..\bin\*.dll) do ( +::obs gendef %%A +::obs lib /nologo /machine:x64 /def:%%~nA.def +::obs ) +::obs cd .. +::obs set PATH=%OPATH% +7z x -y *.zip 7z x *.7z -copy /y ..\build\glibconfig-x64.h lib\glib-2.0\include\glibconfig.h +::obs copy /y ..\build\glibconfig-x64.h lib\glib-2.0\include\glibconfig.h cd share\locale del /q /s gettext-tools.mo del /q /s gettext-runtime.mo diff --git a/build/dep-extract-x86.bat b/build/dep-extract-x86.bat index 93e73ee4..9fd3d6e2 100644 --- a/build/dep-extract-x86.bat +++ b/build/dep-extract-x86.bat @@ -2,22 +2,23 @@ set PATH=%PATH%;%PROGRAMW6432%\7-Zip;c:\mozilla-build\gendef cd ..\dep-x86 -7z x -y *.rpm -7z x *.cpio -del *.cpio -xcopy /q /s /i usr\i686-w64-mingw32\sys-root\mingw\* . -rmdir /q /s usr -set OPATH=%PATH% -set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE -cd lib -for %%A in (..\bin\*.dll) do ( - gendef %%A - lib /nologo /machine:x86 /def:%%~nA.def -) -cd .. -set PATH=%OPATH% +::obs 7z x -y *.rpm +::obs 7z x *.cpio +::obs del *.cpio +::obs xcopy /q /s /i usr\i686-w64-mingw32\sys-root\mingw\* . +::obs rmdir /q /s usr +::obs set OPATH=%PATH% +::obs set PATH=%PATH%;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE +::obs cd lib +::obs for %%A in (..\bin\*.dll) do ( +::obs gendef %%A +::obs lib /nologo /machine:x86 /def:%%~nA.def +::obs ) +::obs cd .. +::obs set PATH=%OPATH% +7z x -y *.zip 7z x *.7z -copy /y ..\build\glibconfig-x86.h lib\glib-2.0\include\glibconfig.h +::obs copy /y ..\build\glibconfig-x86.h lib\glib-2.0\include\glibconfig.h cd share\locale del /q /s gettext-tools.mo del /q /s gettext-runtime.mo diff --git a/build/release-x64.bat b/build/release-x64.bat index e2f91991..4e658fc6 100644 --- a/build/release-x64.bat +++ b/build/release-x64.bat @@ -7,11 +7,11 @@ echo 2> portable-mode move portable-mode %XCHAT_DEST% copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST% copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST% -copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% +::obs copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libffi-5.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libffi-5.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libfontconfig-1.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libfreetype-6.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST% @@ -23,21 +23,23 @@ copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgtk-win32-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libintl-8.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjasper-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjpeg-8.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libjasper-1.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libjpeg-8.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpixman-1-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpng15-15.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libtiff-3.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libxml2-2.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libpixman-1-0.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libpng15-15.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libtiff-3.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libxml2.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libxml2-2.dll %XCHAT_DEST% xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\ xcopy /q /s /i etc %XCHAT_DEST%\etc xcopy /q /s /i share %XCHAT_DEST%\share -xcopy /q /s /i %DEPS_ROOT%\share\themes %XCHAT_DEST%\share\themes +::obs xcopy /q /s /i %DEPS_ROOT%\share\themes %XCHAT_DEST%\share\themes copy ..\COPYING %XCHAT_DEST% copy %DEPS_ROOT%\LICENSE.OPENSSL %XCHAT_DEST% copy %DEPS_ROOT%\LICENSE.ZLIB %XCHAT_DEST% @@ -45,7 +47,8 @@ copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.0 %XCHAT_DEST%\LICENSE.GTK copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.1 %XCHAT_DEST%\LICENSE.CAIRO copy %DEPS_ROOT%\LICENSE.LUA %XCHAT_DEST% copy %DEPS_ROOT%\LICENSE.ENCHANT %XCHAT_DEST% -copy %DEPS_ROOT%\share\doc\libxml2-2.7.8\Copyright %XCHAT_DEST%\LICENSE.LIBXML +copy %DEPS_ROOT%\LICENSE.LIBXML %XCHAT_DEST% +::obs copy %DEPS_ROOT%\share\doc\libxml2-2.7.8\Copyright %XCHAT_DEST%\LICENSE.LIBXML copy %DEPS_ROOT%\bin\libeay32.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\ssleay32.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\zlib1.dll %XCHAT_DEST% @@ -57,7 +60,7 @@ copy ..\plugins\doat\xcdoat.dll %XCHAT_DEST%\plugins copy ..\plugins\exec\xcexec.dll %XCHAT_DEST%\plugins copy ..\plugins\fishlim\xcfishlim.dll %XCHAT_DEST%\plugins copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins -copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins +::obs copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins diff --git a/build/release-x86.bat b/build/release-x86.bat index 81c1bd7f..a2598399 100644 --- a/build/release-x86.bat +++ b/build/release-x86.bat @@ -7,13 +7,14 @@ echo 2> portable-mode move portable-mode %XCHAT_DEST% copy ..\src\fe-gtk\xchat.exe %XCHAT_DEST% copy ..\src\fe-text\xchat-text.exe %XCHAT_DEST% -copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% +::obs copy ..\src\gtk2-prefs\gtk2-prefs.exe %XCHAT_DEST% copy %DEPS_ROOT%\bin\libatk-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libcairo-2.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libexpat-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libffi-5.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libffi-5.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libfontconfig-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libfreetype-6.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\freetype6.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libfreetype-6.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgdk-win32-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgio-2.0-0.dll %XCHAT_DEST% @@ -22,22 +23,25 @@ copy %DEPS_ROOT%\bin\libgmodule-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgobject-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgthread-2.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libgtk-win32-2.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libintl-8.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjasper-1.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libjpeg-8.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\intl.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libintl-8.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libjasper-1.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libjpeg-8.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpango-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangocairo-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangoft2-1.0-0.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\libpangowin32-1.0-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpixman-1-0.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libpng15-15.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libtiff-3.dll %XCHAT_DEST% -copy %DEPS_ROOT%\bin\libxml2-2.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libpixman-1-0.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libpng14-14.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libpng15-15.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libtiff-3.dll %XCHAT_DEST% +copy %DEPS_ROOT%\bin\libxml2.dll %XCHAT_DEST% +::obs copy %DEPS_ROOT%\bin\libxml2-2.dll %XCHAT_DEST% xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\2.10.0\engines %XCHAT_DEST%\lib\gtk-2.0\2.10.0\engines xcopy /q /s /i %DEPS_ROOT%\lib\gtk-2.0\modules\libgail.dll %XCHAT_DEST%\lib\gtk-2.0\modules\ xcopy /q /s /i etc %XCHAT_DEST%\etc xcopy /q /s /i share %XCHAT_DEST%\share -xcopy /q /s /i %DEPS_ROOT%\share\themes %XCHAT_DEST%\share\themes +::obs xcopy /q /s /i %DEPS_ROOT%\share\themes %XCHAT_DEST%\share\themes copy ..\COPYING %XCHAT_DEST% copy %DEPS_ROOT%\LICENSE.OPENSSL %XCHAT_DEST% copy %DEPS_ROOT%\LICENSE.ZLIB %XCHAT_DEST% @@ -45,7 +49,8 @@ copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.0 %XCHAT_DEST%\LICENSE.GTK copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.1 %XCHAT_DEST%\LICENSE.CAIRO copy %DEPS_ROOT%\LICENSE.LUA %XCHAT_DEST% copy %DEPS_ROOT%\LICENSE.ENCHANT %XCHAT_DEST% -copy %DEPS_ROOT%\share\doc\libxml2-2.7.8\Copyright %XCHAT_DEST%\LICENSE.LIBXML +copy %DEPS_ROOT%\LICENSE.LIBXML %XCHAT_DEST% +::obs copy %DEPS_ROOT%\share\doc\libxml2-2.7.8\Copyright %XCHAT_DEST%\LICENSE.LIBXML copy %DEPS_ROOT%\bin\libeay32.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\ssleay32.dll %XCHAT_DEST% copy %DEPS_ROOT%\bin\zlib1.dll %XCHAT_DEST% @@ -57,7 +62,7 @@ copy ..\plugins\doat\xcdoat.dll %XCHAT_DEST%\plugins copy ..\plugins\exec\xcexec.dll %XCHAT_DEST%\plugins copy ..\plugins\fishlim\xcfishlim.dll %XCHAT_DEST%\plugins copy ..\plugins\lua\xclua.dll %XCHAT_DEST%\plugins -copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins +::obs copy ..\plugins\gtkpref\xcgtkpref.dll %XCHAT_DEST%\plugins copy ..\plugins\mpcinfo\xcmpcinfo.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins copy ..\plugins\perl\xcperl-514.dll %XCHAT_DEST%\plugins diff --git a/build/xchat-wdk-x64.skel.iss b/build/xchat-wdk-x64.skel.iss index edc6b4e4..a98e4338 100644 --- a/build/xchat-wdk-x64.skel.iss +++ b/build/xchat-wdk-x64.skel.iss @@ -31,7 +31,7 @@ Name: "custom"; Description: "Custom Installation"; Flags: iscustom Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning -Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning +;obs Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning ;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning @@ -43,7 +43,7 @@ Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; F Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\winsys"; Description: "WinSys"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning -;Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning @@ -87,6 +87,7 @@ Source: "LICENSE.CAIRO"; DestDir: "{app}"; Components: libs Source: "LICENSE.LUA"; DestDir: "{app}"; Components: libs Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Components: libs Source: "LICENSE.LIBXML"; DestDir: "{app}"; Components: libs +Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Components: libs ;Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Components: libs and not gtkengines Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: createallsubdirs recursesubdirs; Components: libs Source: "locale\*"; DestDir: "{app}\locale"; Flags: createallsubdirs recursesubdirs; Components: translations @@ -97,7 +98,7 @@ Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libcairo-2.dll"; DestDir: "{app}"; Components: libs Source: "libeay32.dll"; DestDir: "{app}"; Components: libs Source: "libexpat-1.dll"; DestDir: "{app}"; Components: libs -Source: "libffi-5.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libffi-5.dll"; DestDir: "{app}"; Components: libs Source: "libfreetype-6.dll"; DestDir: "{app}"; Components: libs Source: "libfontconfig-1.dll"; DestDir: "{app}"; Components: libs Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Components: libs @@ -109,19 +110,21 @@ Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libintl-8.dll"; DestDir: "{app}"; Components: libs -Source: "libjasper-1.dll"; DestDir: "{app}"; Components: libs -Source: "libjpeg-8.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libjasper-1.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libjpeg-8.dll"; DestDir: "{app}"; Components: libs Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Components: libs -Source: "libpixman-1-0.dll"; DestDir: "{app}"; Components: libs -Source: "libtiff-3.dll"; DestDir: "{app}"; Components: libs -Source: "libpng15-15.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libpixman-1-0.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libtiff-3.dll"; DestDir: "{app}"; Components: libs +Source: "libpng14-14.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libpng15-15.dll"; DestDir: "{app}"; Components: libs Source: "lua51.dll"; DestDir: "{app}"; Components: libs Source: "ssleay32.dll"; DestDir: "{app}"; Components: libs Source: "zlib1.dll"; DestDir: "{app}"; Components: libs -Source: "libxml2-2.dll"; DestDir: "{app}"; Components: libs +Source: "libxml2.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libxml2-2.dll"; DestDir: "{app}"; Components: libs Source: "libenchant.dll"; DestDir: "{app}"; Components: libs Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Components: libs @@ -130,19 +133,19 @@ Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\ Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Components: libs -Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Components: gtkengines -Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: createallsubdirs recursesubdirs; Components: gtkengines -Source: "gtk2-prefs.exe"; DestDir: "{app}"; Components: gtkengines +;obs Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Components: gtkengines +;obs Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: createallsubdirs recursesubdirs; Components: gtkengines +;obs Source: "gtk2-prefs.exe"; DestDir: "{app}"; Components: gtkengines Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Components: plugins\checksum Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Components: plugins\doat @@ -155,7 +158,7 @@ Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Components: plugins\upd Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Components: plugins\winamp Source: "etc\system.png"; DestDir: "{app}\etc"; Components: plugins\winsys Source: "plugins\xcwinsys.dll"; DestDir: "{app}\plugins"; Components: plugins\winsys -;Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Components: plugins\xtray +Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Components: plugins\xtray Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Components: plugins\wmpa Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Components: langs\lua diff --git a/build/xchat-wdk-x86.skel.iss b/build/xchat-wdk-x86.skel.iss index 70f781bb..e8f114ac 100644 --- a/build/xchat-wdk-x86.skel.iss +++ b/build/xchat-wdk-x86.skel.iss @@ -30,7 +30,7 @@ Name: "custom"; Description: "Custom Installation"; Flags: iscustom Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning -Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning +;obs Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning ;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning @@ -42,7 +42,7 @@ Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; F Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\winsys"; Description: "WinSys"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning -;Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning @@ -86,6 +86,7 @@ Source: "LICENSE.CAIRO"; DestDir: "{app}"; Components: libs Source: "LICENSE.LUA"; DestDir: "{app}"; Components: libs Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Components: libs Source: "LICENSE.LIBXML"; DestDir: "{app}"; Components: libs +Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Components: libs ;Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Components: libs and not gtkengines Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: createallsubdirs recursesubdirs; Components: libs Source: "locale\*"; DestDir: "{app}\locale"; Flags: createallsubdirs recursesubdirs; Components: translations @@ -96,8 +97,9 @@ Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libcairo-2.dll"; DestDir: "{app}"; Components: libs Source: "libeay32.dll"; DestDir: "{app}"; Components: libs Source: "libexpat-1.dll"; DestDir: "{app}"; Components: libs -Source: "libffi-5.dll"; DestDir: "{app}"; Components: libs -Source: "libfreetype-6.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libffi-5.dll"; DestDir: "{app}"; Components: libs +Source: "freetype6.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libfreetype-6.dll"; DestDir: "{app}"; Components: libs Source: "libfontconfig-1.dll"; DestDir: "{app}"; Components: libs Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs @@ -107,20 +109,23 @@ Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs -Source: "libintl-8.dll"; DestDir: "{app}"; Components: libs -Source: "libjasper-1.dll"; DestDir: "{app}"; Components: libs -Source: "libjpeg-8.dll"; DestDir: "{app}"; Components: libs +Source: "intl.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libintl-8.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libjasper-1.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libjpeg-8.dll"; DestDir: "{app}"; Components: libs Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Components: libs Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Components: libs -Source: "libpixman-1-0.dll"; DestDir: "{app}"; Components: libs -Source: "libtiff-3.dll"; DestDir: "{app}"; Components: libs -Source: "libpng15-15.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libpixman-1-0.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libtiff-3.dll"; DestDir: "{app}"; Components: libs +Source: "libpng14-14.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libpng15-15.dll"; DestDir: "{app}"; Components: libs Source: "lua51.dll"; DestDir: "{app}"; Components: libs Source: "ssleay32.dll"; DestDir: "{app}"; Components: libs Source: "zlib1.dll"; DestDir: "{app}"; Components: libs -Source: "libxml2-2.dll"; DestDir: "{app}"; Components: libs +Source: "libxml2.dll"; DestDir: "{app}"; Components: libs +;obs Source: "libxml2-2.dll"; DestDir: "{app}"; Components: libs Source: "libenchant.dll"; DestDir: "{app}"; Components: libs Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Components: libs @@ -129,19 +134,19 @@ Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\ Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Components: libs -Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines -Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Components: gtkengines -Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: createallsubdirs recursesubdirs; Components: gtkengines -Source: "gtk2-prefs.exe"; DestDir: "{app}"; Components: gtkengines +;obs Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtkengines +;obs Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Components: gtkengines +;obs Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: createallsubdirs recursesubdirs; Components: gtkengines +;obs Source: "gtk2-prefs.exe"; DestDir: "{app}"; Components: gtkengines Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Components: plugins\checksum Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Components: plugins\doat @@ -154,7 +159,7 @@ Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Components: plugins\upd Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Components: plugins\winamp Source: "etc\system.png"; DestDir: "{app}\etc"; Components: plugins\winsys Source: "plugins\xcwinsys.dll"; DestDir: "{app}\plugins"; Components: plugins\winsys -;Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Components: plugins\xtray +Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Components: plugins\xtray Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Components: plugins\wmpa Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Components: langs\lua diff --git a/dep-x64/deps-x64.txt b/dep-x64/deps-x64.txt index d7daa22a..ed52c2ca 100644 --- a/dep-x64/deps-x64.txt +++ b/dep-x64/deps-x64.txt @@ -1,36 +1,21 @@ -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-atk-2.2.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-atk-devel-2.2.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-cairo-devel-1.10.2-6.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-expat-2.0.1-3.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-fontconfig-2.8.0-5.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-freetype-2.4.7-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gdk-pixbuf-2.24.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gdk-pixbuf-devel-2.24.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gdk-pixbuf-devel-tools-2.24.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gettext-runtime-0.18.1.1-11.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gettext-tools-0.18.1.1-11.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-glib2-2.30.2-1.1.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-glib2-devel-2.30.2-1.1.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gtk2-2.24.8-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gtk2-devel-2.24.8-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gtk2-engine-murrine-0.98.1.1-3.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gtk2-engines-2.20.2-6.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-gtk2-lang-2.24.8-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libcairo2-1.10.2-6.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libexpat-2.0.1-3.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libffi-3.0.10-6.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libgcc-4.6.2-3.1.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libintl-0.18.1.1-11.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libintl-devel-0.18.1.1-11.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libjasper-1.900.1-6.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libjpeg-8c-2.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libpng-1.5.6-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libtiff-3.9.5-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libxml2-2.7.8-9.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-libxml2-devel-2.7.8-9.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-pango-1.29.4-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-pango-devel-1.29.4-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.1/noarch/mingw64-pixman-0.24.0-1.2.noarch.rpm +http://ftp.gnome.org/pub/gnome/binaries/win64/atk/1.32/atk_1.32.0-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/atk/1.32/atk-dev_1.32.0-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/cairo_1.10.2-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/cairo-dev_1.10.2-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/expat_2.0.1-3_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/fontconfig_2.8.0-2_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/freetype_2.4.4-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/gettext-runtime_0.18.1.1-2_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/gettext-runtime-dev_0.18.1.1-2_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/gettext-tools-dev_0.18.1.1-2_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/libpng_1.4.3-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/glib/2.26/glib_2.26.1-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/glib/2.26/glib-dev_2.26.1-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.16/gtk+_2.16.6-3_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.16/gtk+-dev_2.16.6-3_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/pango/1.28/pango_1.28.3-1_win64.zip +http://ftp.gnome.org/pub/gnome/binaries/win64/pango/1.28/pango-dev_1.28.3-1_win64.zip http://xchat-wdk.googlecode.com/files/Enchant-WDK%201.6.0-2%20x64.7z http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x64.7z http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0e-2%20x64.7z +http://xchat-wdk.googlecode.com/files/LibXML-WDK%202.7.8%20x64.7z diff --git a/dep-x86/deps-x86.txt b/dep-x86/deps-x86.txt index 5241fe5d..9f5a3bdb 100644 --- a/dep-x86/deps-x86.txt +++ b/dep-x86/deps-x86.txt @@ -1,36 +1,21 @@ -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-atk-2.2.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-atk-devel-2.2.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-cairo-devel-1.10.2-6.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-expat-2.0.1-4.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-fontconfig-2.8.0-5.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-freetype-2.4.7-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gdk-pixbuf-2.24.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gdk-pixbuf-devel-2.24.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gdk-pixbuf-devel-tools-2.24.0-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gettext-runtime-0.18.1.1-13.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gettext-tools-0.18.1.1-13.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-glib2-2.30.2-1.1.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-glib2-devel-2.30.2-1.1.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-2.24.8-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-devel-2.24.8-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-engine-murrine-0.98.1.1-3.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-engines-2.20.2-5.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-gtk2-lang-2.24.8-1.2.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libcairo2-1.10.2-6.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libexpat-2.0.1-4.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libffi-3.0.10-2.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libgcc-4.6.2-2.1.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libintl-0.18.1.1-13.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libintl-devel-0.18.1.1-13.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libjasper-1.900.1-6.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libjpeg-8c-2.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libpng-1.5.6-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libtiff-3.9.5-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libxml2-2.7.8-8.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-libxml2-devel-2.7.8-8.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-pango-1.29.4-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-pango-devel-1.29.4-1.3.noarch.rpm -http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/noarch/mingw32-pixman-0.24.0-1.3.noarch.rpm +http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk_1.32.0-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk-dev_1.32.0-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.10.2-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.10.2-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.4.4-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev_0.18.1.1-2_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-tools-dev_0.18.1.1-2_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.3-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib_2.26.1-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib-dev_2.26.1-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+_2.16.6-3_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-dev_2.16.6-3_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango_1.28.3-1_win32.zip +http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango-dev_1.28.3-1_win32.zip http://xchat-wdk.googlecode.com/files/Enchant-WDK%201.6.0-2%20x86.7z http://xchat-wdk.googlecode.com/files/Lua-WDK%205.1.4-2-2%20x86.7z http://xchat-wdk.googlecode.com/files/OpenSSL-WDK%201.0.0e-2%20x86.7z +http://xchat-wdk.googlecode.com/files/LibXML-WDK%202.7.8%20x86.7z diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index daa5f868..74157a7f 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -218,10 +218,7 @@ mg_create_tab_colors (void) static void set_window_urgency (GtkWidget *win, gboolean set) { -#ifdef _WIN64 - /* this is currently borked in OBS GTK+ 2.24.8 */ gtk_window_set_urgency_hint (GTK_WINDOW (win), set); -#endif } static void diff --git a/src/makeinc.skel.mak b/src/makeinc.skel.mak index 03fa43e8..552b6a6e 100644 --- a/src/makeinc.skel.mak +++ b/src/makeinc.skel.mak @@ -9,7 +9,8 @@ LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib GLIB = /I$(DEV)\include\glib-2.0 /I$(DEV)\lib\glib-2.0\include /I$(DEV)\include\libxml2 GTK = /I$(DEV)\include\gtk-2.0 /I$(DEV)\lib\gtk-2.0\include /I$(DEV)\include\atk-1.0 /I$(DEV)\include\cairo /I$(DEV)\include\pango-1.0 /I$(DEV)\include\gdk-pixbuf-2.0 -LIBS = $(LIBS) /libpath:$(DEV)\lib libgtk-win32-2.0-0.lib libgdk-win32-2.0-0.lib libatk-1.0-0.lib libgio-2.0-0.lib libgdk_pixbuf-2.0-0.lib libpangowin32-1.0-0.lib libpangocairo-1.0-0.lib libpango-1.0-0.lib libcairo-2.lib libgobject-2.0-0.lib libgmodule-2.0-0.lib libglib-2.0-0.lib libintl-8.lib libxml2-2.lib +LIBS = $(LIBS) /libpath:$(DEV)\lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib libxml2.lib +#obs LIBS = $(LIBS) /libpath:$(DEV)\lib libgtk-win32-2.0-0.lib libgdk-win32-2.0-0.lib libatk-1.0-0.lib libgio-2.0-0.lib libgdk_pixbuf-2.0-0.lib libpangowin32-1.0-0.lib libpangocairo-1.0-0.lib libpango-1.0-0.lib libcairo-2.lib libgobject-2.0-0.lib libgmodule-2.0-0.lib libglib-2.0-0.lib libintl-8.lib libxml2-2.lib LUALIB = lua51 LUAOUTPUT = xclua.dll -- cgit 1.4.1 From 132ef6cb50201cb6ab8ab0609a88ccce62aa6a21 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 11 Dec 2011 17:34:02 +0100 Subject: initial patches for linux compatibility --- plugins/perl/perl.c | 2 +- plugins/perl/perl.def | 4 +++ plugins/python/python.c | 6 ++++ plugins/tcl/tclplugin.c | 2 ++ plugins/xdcc/xdcc.c | 4 +++ src/common/cfgfiles.c | 20 +++++++++--- src/common/chanopt.c | 4 +++ src/common/ctcp.c | 9 ++++++ src/common/dcc.c | 8 ++++- src/common/ignore.c | 4 +++ src/common/inbound.c | 4 +++ src/common/makefile.mak | 1 - src/common/msproxy.c | 4 +++ src/common/network.c | 4 +++ src/common/notify.c | 4 +++ src/common/outbound.c | 7 ++++- src/common/plugin-timer.c | 2 +- src/common/proto-irc.c | 4 +++ src/common/server.c | 5 +++ src/common/servlist.c | 4 +++ src/common/text.c | 71 +++++++++++++++++++++++++++++++++++++++++++ src/common/util.c | 42 +++++++++++++++++++++++-- src/common/util.h | 2 ++ src/common/wdkutil.c | 27 ---------------- src/common/wdkutil.h | 2 -- src/common/xchat.c | 4 +-- src/common/xchat.h | 4 +++ src/fe-gtk/about.c | 4 +-- src/fe-gtk/banlist.c | 4 +++ src/fe-gtk/chanlist.c | 4 +++ src/fe-gtk/editlist.c | 5 +++ src/fe-gtk/fe-gtk.c | 6 +++- src/fe-gtk/fkeys.c | 6 +++- src/fe-gtk/gtkutil.c | 4 +++ src/fe-gtk/joind.c | 4 +++ src/fe-gtk/maingui.c | 3 +- src/fe-gtk/menu.c | 8 ++++- src/fe-gtk/palette.c | 4 +++ src/fe-gtk/plugin-tray.c | 18 ++++++++--- src/fe-gtk/plugingui.c | 9 ++++-- src/fe-gtk/rawlog.c | 4 +++ src/fe-gtk/setup.c | 13 ++++++-- src/fe-gtk/sexy-spell-entry.c | 11 +++++++ src/fe-gtk/xtext.c | 2 ++ 44 files changed, 304 insertions(+), 59 deletions(-) create mode 100644 plugins/perl/perl.def delete mode 100644 src/common/wdkutil.c delete mode 100644 src/common/wdkutil.h (limited to 'src') diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index a454b43d..a2763771 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -27,7 +27,7 @@ #endif #ifdef WIN32 #include -#define _INC_DIRENT +#define _INC_DIRENT /* disable inclusion of perl's dirent.h, we use an own version for win32 */ #include "../../src/common/dirent.h" #else #include diff --git a/plugins/perl/perl.def b/plugins/perl/perl.def new file mode 100644 index 00000000..a2ec6566 --- /dev/null +++ b/plugins/perl/perl.def @@ -0,0 +1,4 @@ +EXPORTS + xchat_plugin_init + xchat_plugin_deinit + xchat_plugin_get_info \ No newline at end of file diff --git a/plugins/python/python.c b/plugins/python/python.c index 55adf989..3c535057 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -55,8 +55,14 @@ #include #include #include + +#ifdef WIN32 #include "../../src/common/dirent.h" #include "../../config.h" +#else +#include +#include +#endif #include "xchat-plugin.h" #include "Python.h" diff --git a/plugins/tcl/tclplugin.c b/plugins/tcl/tclplugin.c index 9289d01d..920a48ad 100644 --- a/plugins/tcl/tclplugin.c +++ b/plugins/tcl/tclplugin.c @@ -32,6 +32,8 @@ static char RCSID[] = "$Id: tclplugin.c,v 1.64 2010/03/10 04:24:16 mooooooo Exp #include #define bzero(mem, sz) memset((mem), 0, (sz)) #define bcopy(src, dest, count) memmove((dest), (src), (count)) +#else +#include #endif #include "xchat-plugin.h" diff --git a/plugins/xdcc/xdcc.c b/plugins/xdcc/xdcc.c index a8fda540..060dbbe3 100644 --- a/plugins/xdcc/xdcc.c +++ b/plugins/xdcc/xdcc.c @@ -5,6 +5,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "xchat-plugin.h" #include "../../src/common/xchat.h" diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 22ef00d7..130ad9d9 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -29,11 +29,12 @@ #include "fe.h" #include "text.h" #include "xchatc.h" -#include "wdkutil.h" #ifndef WIN32 +#include #define XCHAT_DIR ".xchat2" #endif + #define DEF_FONT "Monospace 9" void @@ -402,7 +403,9 @@ const struct prefs vars[] = { {"dcc_blocksize", P_OFFINT (dcc_blocksize), TYPE_INT}, {"dcc_completed_dir", P_OFFSET (dcc_completed_dir), TYPE_STR}, {"dcc_dir", P_OFFSET (dccdir), TYPE_STR}, - /* {"dcc_fast_send", P_OFFINT (fastdccsend), TYPE_BOOL}, */ +#ifndef WIN32 + {"dcc_fast_send", P_OFFINT (fastdccsend), TYPE_BOOL}, +#endif {"dcc_global_max_get_cps", P_OFFINT (dcc_global_max_get_cps), TYPE_INT}, {"dcc_global_max_send_cps", P_OFFINT (dcc_global_max_send_cps), TYPE_INT}, {"dcc_ip", P_OFFSET (dcc_ip_str), TYPE_STR}, @@ -440,7 +443,9 @@ const struct prefs vars[] = { {"gui_lagometer", P_OFFINT (lagometer), TYPE_INT}, {"gui_license", P_OFFSET (gui_license), TYPE_STR}, {"gui_mode_buttons", P_OFFINT (chanmodebuttons), TYPE_BOOL}, +#ifdef WIN32 {"gui_one_instance", P_OFFINT (gui_one_instance), TYPE_BOOL}, +#endif {"gui_pane_left_size", P_OFFINT (gui_pane_left_size), TYPE_INT}, {"gui_pane_right_size", P_OFFINT (gui_pane_right_size), TYPE_INT}, {"gui_quit_dialog", P_OFFINT (gui_quit_dialog), TYPE_BOOL}, @@ -547,7 +552,9 @@ const struct prefs vars[] = { {"tab_chans", P_OFFINT (tabchannels), TYPE_BOOL}, {"tab_dialogs", P_OFFINT (privmsgtab), TYPE_BOOL}, +#ifdef WIN32 {"tab_icons", P_OFFINT (tab_icons), TYPE_BOOL}, +#endif {"tab_layout", P_OFFINT (tab_layout), TYPE_INT}, {"tab_new_to_front", P_OFFINT (newtabstofront), TYPE_INT}, {"tab_notices", P_OFFINT (notices_tabs), TYPE_BOOL}, @@ -558,14 +565,18 @@ const struct prefs vars[] = { {"tab_sort", P_OFFINT (tab_sort), TYPE_BOOL}, {"tab_trunc", P_OFFINT (truncchans), TYPE_INT}, {"tab_utils", P_OFFINT (windows_as_tabs), TYPE_BOOL}, +#ifdef WIN32 {"tab_xp", P_OFFINT (tab_xp), TYPE_BOOL}, +#endif {"text_auto_copy_color", P_OFFINT (autocopy_color), TYPE_BOOL}, {"text_auto_copy_stamp", P_OFFINT (autocopy_stamp), TYPE_BOOL}, {"text_auto_copy_text", P_OFFINT (autocopy_text), TYPE_BOOL}, {"text_background", P_OFFSET (background), TYPE_STR}, {"text_color_nicks", P_OFFINT (colorednicks), TYPE_BOOL}, +#ifdef WIN32 {"text_emoticons", P_OFFINT (emoticons), TYPE_BOOL}, +#endif {"text_font", P_OFFSET (font_normal), TYPE_STR}, {"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL}, {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, @@ -642,7 +653,9 @@ load_config (void) prefs.indent_nicks = 1; prefs.thin_separator = 1; prefs._tabs_position = 2; /* 2 = left */ - /* prefs.fastdccsend = 1; */ +#ifndef WIN32 + prefs.fastdccsend = 1; +#endif prefs.wordwrap = 1; prefs.autosave = 1; prefs.autodialog = 1; @@ -667,7 +680,6 @@ load_config (void) prefs.dialog_height = 256; prefs.gui_join_dialog = 1; prefs.gui_quit_dialog = 1; - prefs.slist_skip = 1; prefs.dcctimeout = 180; prefs.dccstalltimeout = 60; prefs.notify_timeout = 15; diff --git a/src/common/chanopt.c b/src/common/chanopt.c index ce37157a..f8e16e8b 100644 --- a/src/common/chanopt.c +++ b/src/common/chanopt.c @@ -8,6 +8,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "xchat.h" #include "cfgfiles.h" diff --git a/src/common/ctcp.c b/src/common/ctcp.c index 37392372..2bb75746 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -20,6 +20,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "xchat.h" #include "cfgfiles.h" #include "util.h" @@ -133,8 +137,13 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (!strcasecmp (msg, "VERSION") && !prefs.hidever) { +#ifdef WIN32 snprintf (outbuf, sizeof (outbuf), "VERSION XChat-WDK "PACKAGE_VERSION" [x%d] / %s", get_cpu_arch (), get_cpu_str ()); +#else + snprintf (outbuf, sizeof (outbuf), "VERSION XChat-WDK "PACKAGE_VERSION" %s", + get_cpu_str ()); +#endif serv->p_nctcp (serv, nick, outbuf); } diff --git a/src/common/dcc.c b/src/common/dcc.c index 9375095e..d91b7e8e 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -40,6 +40,8 @@ #ifdef WIN32 #include +#else +#include #endif #include "xchat.h" @@ -56,7 +58,9 @@ #ifdef USE_DCC64 #define BIG_STR_TO_INT(x) strtoull(x,NULL,10) +#ifdef WIN32 #define stat _stat64 +#endif #else #define BIG_STR_TO_INT(x) strtoul(x,NULL,10) #endif @@ -1983,7 +1987,9 @@ is_same_file (struct DCC *dcc, struct DCC *new_dcc) return TRUE; /* now handle case-insensitive Filesystems: HFS+, FAT */ -#ifndef WIN32 +#ifdef WIN32 + /* warning no win32 implementation - behaviour may be unreliable */ +#else /* this fstat() shouldn't really fail */ if ((dcc->fp == -1 ? stat (dcc->destfile_fs, &st_a) : fstat (dcc->fp, &st_a)) == -1) return FALSE; diff --git a/src/common/ignore.c b/src/common/ignore.c index adb61f37..0ed23daa 100644 --- a/src/common/ignore.c +++ b/src/common/ignore.c @@ -23,6 +23,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "xchat.h" #include "ignore.h" #include "cfgfiles.h" diff --git a/src/common/inbound.c b/src/common/inbound.c index 3485dfd4..bd7252c5 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -23,6 +23,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #define WANTARPA #define WANTDNS #include "inet.h" diff --git a/src/common/makefile.mak b/src/common/makefile.mak index 424316c0..8b350efc 100644 --- a/src/common/makefile.mak +++ b/src/common/makefile.mak @@ -25,7 +25,6 @@ tree.obj \ url.obj \ userlist.obj \ util.obj \ -wdkutil.obj \ xchat.obj all: $(COMMON_OBJECTS) xchatcommon.lib dirent.lib diff --git a/src/common/msproxy.c b/src/common/msproxy.c index 8ad37ffc..5103233a 100644 --- a/src/common/msproxy.c +++ b/src/common/msproxy.c @@ -28,6 +28,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #define WANTSOCKET #define WANTARPA #include "inet.h" diff --git a/src/common/network.c b/src/common/network.c index b7d9aa1f..eba24b05 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -23,6 +23,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "../../config.h" /* grab USE_IPV6 and LOOKUPD defines */ #define WANTSOCKET diff --git a/src/common/notify.c b/src/common/notify.c index 4aa5ea17..9c6e54de 100644 --- a/src/common/notify.c +++ b/src/common/notify.c @@ -24,6 +24,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "xchat.h" #include "notify.h" #include "cfgfiles.h" diff --git a/src/common/outbound.c b/src/common/outbound.c index 917562b9..8b0432ec 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -30,6 +30,7 @@ #ifndef WIN32 #include +#include #endif #include @@ -2880,6 +2881,7 @@ cmd_recv (struct session *sess, char *tbuf, char *word[], char *word_eol[]) return FALSE; } +#if 0 /* manual command for flushing prefs to disk, but we use an autosave-upon-set approach instead */ static int cmd_saveconf (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { @@ -2894,6 +2896,7 @@ cmd_saveconf (struct session *sess, char *tbuf, char *word[], char *word_eol[]) return TRUE; } +#endif static int cmd_say (struct session *sess, char *tbuf, char *word[], char *word_eol[]) @@ -3647,7 +3650,9 @@ const struct commands xc_cmds[] = { #endif {"RECV", cmd_recv, 1, 0, 1, N_("RECV , send raw data to xchat, as if it was received from the irc server")}, - /*{"SAVECONF", cmd_saveconf, 0, 0, 1, N_("SAVECONF, saves the current settings to disk")},*/ +#if 0 + {"SAVECONF", cmd_saveconf, 0, 0, 1, N_("SAVECONF, saves the current settings to disk")}, +#endif {"SAY", cmd_say, 0, 0, 1, N_("SAY , sends the text to the object in the current window")}, {"SEND", cmd_send, 0, 0, 1, N_("SEND []")}, diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c index 2524439d..f09074a8 100644 --- a/src/common/plugin-timer.c +++ b/src/common/plugin-timer.c @@ -1,7 +1,7 @@ #include #include #include -#include "../../plugins/xchat-plugin.h" +#include "xchat-plugin.h" #ifdef WIN32 #define strcasecmp stricmp diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 3d45e1b0..91a57abe 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -24,6 +24,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "xchat.h" #include "ctcp.h" #include "fe.h" diff --git a/src/common/server.c b/src/common/server.c index f7347052..cdd67cda 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -36,6 +36,7 @@ #ifndef WIN32 #include #include +#include #else #include #endif @@ -1763,7 +1764,11 @@ server_connect (server *serv, char *hostname, int port, int no_login) } #endif serv->childpid = pid; +#ifdef WIN32 serv->iotag = fe_input_add (serv->childread, FIA_READ|FIA_FD, server_read_child, +#else + serv->iotag = fe_input_add (serv->childread, FIA_READ, server_read_child, +#endif serv); } diff --git a/src/common/servlist.c b/src/common/servlist.c index 1ca63201..a94c260a 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -22,6 +22,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "xchat.h" #include diff --git a/src/common/text.c b/src/common/text.c index fcde5870..fd5d25e9 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -25,6 +25,11 @@ #include #include +#ifndef WIN32 +#include +#include +#endif + #include "xchat.h" #include #include "cfgfiles.h" @@ -270,6 +275,12 @@ scrollback_load (session *sess) time_t stamp; int lines; +#ifndef WIN32 + char *map, *end_map; + struct stat statbuf; + const char *begin, *eol; +#endif + if (sess->text_scrollback == SET_DEFAULT) { if (!prefs.text_replay) @@ -288,6 +299,65 @@ scrollback_load (session *sess) if (fh == -1) return; +#ifndef WIN32 + if (fstat (fh, &statbuf) < 0) + return; + + map = mmap (NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fh, 0); + if (map == MAP_FAILED) + return; + + end_map = map + statbuf.st_size; + + lines = 0; + begin = map; + while (begin < end_map) + { + int n_bytes; + + eol = memchr (begin, '\n', end_map - begin); + + if (!eol) + eol = end_map; + + n_bytes = MIN (eol - begin, sizeof (buf) - 1); + + strncpy (buf, begin, n_bytes); + + buf[n_bytes] = 0; + + if (buf[0] == 'T') + { + if (sizeof (time_t) == 4) + stamp = strtoul (buf + 2, NULL, 10); + else + stamp = strtoull (buf + 2, NULL, 10); /* just incase time_t is 64 bits */ + text = strchr (buf + 3, ' '); + if (text) + { + text = strip_color (text + 1, -1, STRIP_COLOR); + fe_print_text (sess, text, stamp); + g_free (text); + } + lines++; + } + + begin = eol + 1; + } + + sess->scrollwritten = lines; + + if (lines) + { + text = ctime (&stamp); + text[24] = 0; /* get rid of the \n */ + snprintf (buf, sizeof (buf), "\n*\t%s %s\n\n", _("Loaded log from"), text); + fe_print_text (sess, buf, 0); + /*EMIT_SIGNAL (XP_TE_GENMSG, sess, "*", buf, NULL, NULL, NULL, 0);*/ + } + + munmap (map, statbuf.st_size); +#else lines = 0; while (waitline (fh, buf, sizeof buf, FALSE) != -1) { @@ -318,6 +388,7 @@ scrollback_load (session *sess) fe_print_text (sess, buf, 0); /*EMIT_SIGNAL (XP_TE_GENMSG, sess, "*", buf, NULL, NULL, NULL, 0);*/ } +#endif close (fh); } diff --git a/src/common/util.c b/src/common/util.c index c16d41f5..ccc48657 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -27,17 +27,21 @@ #include #include #include + #ifdef WIN32 #include #include +#include +#include "dirent.h" #else -#include +#include #include #include #include +#include #endif + #include -#include "dirent.h" #include #include "xchat.h" #include "xchatc.h" @@ -1848,3 +1852,37 @@ canonalize_key (char *key) } } } + +int +portable_mode () +{ +#ifdef WIN32 + if ((_access( "portable-mode", 0 )) != -1) + { + return 1; + } + else + { + return 0; + } +#else + return 0; +#endif +} + +int +xtray_mode () +{ +#ifdef WIN32 + if ((_access( "plugins/xtray.dll", 0 )) != -1) + { + return 1; + } + else + { + return 0; + } +#else + return 0; +#endif +} diff --git a/src/common/util.h b/src/common/util.h index bee6ec3c..82d74366 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -57,5 +57,7 @@ guint32 str_hash (const char *key); 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 xtray_mode (); #endif diff --git a/src/common/wdkutil.c b/src/common/wdkutil.c deleted file mode 100644 index 5bf4f0c0..00000000 --- a/src/common/wdkutil.c +++ /dev/null @@ -1,27 +0,0 @@ -#include - -int -portable_mode () -{ - if ((_access( "portable-mode", 0 )) != -1) - { - return 1; - } - else - { - return 0; - } -} - -int -xtray_mode () -{ - if ((_access( "plugins/xtray.dll", 0 )) != -1) - { - return 1; - } - else - { - return 0; - } -} diff --git a/src/common/wdkutil.h b/src/common/wdkutil.h deleted file mode 100644 index 2e4c693a..00000000 --- a/src/common/wdkutil.h +++ /dev/null @@ -1,2 +0,0 @@ -int portable_mode (); -int xtray_mode (); diff --git a/src/common/xchat.c b/src/common/xchat.c index c0847a32..22c4eddb 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -31,6 +31,7 @@ #else #include #include +#include #endif #include "xchat.h" @@ -39,7 +40,7 @@ #include "cfgfiles.h" #include "chanopt.h" #include "ignore.h" -#include "../../plugins/xchat-plugin.h" +#include "xchat-plugin.h" #include "plugin.h" #include "plugin-timer.h" #include "notify.h" @@ -49,7 +50,6 @@ #include "text.h" #include "url.h" #include "xchatc.h" -#include "wdkutil.h" #ifdef USE_OPENSSL #include /* SSL_() */ diff --git a/src/common/xchat.h b/src/common/xchat.h index 08177e20..91e2d50e 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -186,7 +186,9 @@ struct xchatprefs int gui_usermenu; int gui_join_dialog; int gui_quit_dialog; +#ifdef WIN32 int gui_one_instance; +#endif int dialog_left; int dialog_top; int dialog_width; @@ -304,10 +306,12 @@ struct xchatprefs unsigned int wait_on_exit; unsigned int confmode; unsigned int utf8_locale; +#ifdef WIN32 unsigned int identd; unsigned int emoticons; unsigned int tab_icons; unsigned int tab_xp; +#endif unsigned int ctcp_number_limit; /*flood */ unsigned int ctcp_time_limit; /*seconds of floods */ diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index a5772e39..41f3c09b 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -39,7 +39,6 @@ #include "../common/xchat.h" #include "../common/util.h" -#include "../common/wdkutil.h" #include "../common/xchatc.h" #include "palette.h" #include "pixmaps.h" @@ -71,7 +70,7 @@ menu_about (GtkWidget * wid, gpointer sess) "(C) 1998-2005 Peter Zelezny", author, buf, 0)); } -#else +#endif static GtkWidget *about = 0; @@ -171,4 +170,3 @@ menu_about (GtkWidget * wid, gpointer sess) gtk_widget_show_all (about); } -#endif diff --git a/src/fe-gtk/banlist.c b/src/fe-gtk/banlist.c index a714d186..fecb62a5 100644 --- a/src/fe-gtk/banlist.c +++ b/src/fe-gtk/banlist.c @@ -22,6 +22,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "fe-gtk.h" #include diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c index 6203083b..4dca935b 100644 --- a/src/fe-gtk/chanlist.c +++ b/src/fe-gtk/chanlist.c @@ -22,6 +22,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "fe-gtk.h" #include diff --git a/src/fe-gtk/editlist.c b/src/fe-gtk/editlist.c index fd2d6810..d374d064 100644 --- a/src/fe-gtk/editlist.c +++ b/src/fe-gtk/editlist.c @@ -22,6 +22,11 @@ #include #include #include + +#ifndef WIN32 +#include +#endif + #include "fe-gtk.h" #include diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index c11f5235..88a1138c 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -31,7 +31,11 @@ #include #include +#ifdef WIN32 #include +#else +#include +#endif #include "../common/xchat.h" #include "../common/fe.h" @@ -411,7 +415,7 @@ log_handler (const gchar *log_domain, { session *sess; - /* if (getenv ("XCHAT_WARNING_IGNORE")) */ + /* if (getenv ("XCHAT_WARNING_IGNORE")) this gets ignored sometimes, so simply just disable all warnings */ return; sess = find_dialog (serv_list->data, "(warnings)"); diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index 7330854a..b9690731 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -24,6 +24,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "fe-gtk.h" #include @@ -314,7 +318,7 @@ key_handle_key_press (GtkWidget *wid, GdkEventKey *evt, session *sess) key_action_tab_clean (); break; -#if defined(USE_GTKSPELL)/* && !defined(WIN32) +#if defined(USE_GTKSPELL)/* && !defined(WIN32) */ /* gtktextview has no 'activate' event, so we trap ENTER here */ case GDK_Return: case GDK_KP_Enter: diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c index 522b44df..fe4e1737 100644 --- a/src/fe-gtk/gtkutil.c +++ b/src/fe-gtk/gtkutil.c @@ -23,6 +23,7 @@ #include #include #include + #include "fe-gtk.h" #include @@ -50,9 +51,12 @@ #include "../common/util.h" #include "gtkutil.h" #include "pixmaps.h" + #ifdef WIN32 #include "../common/fe.h" #include "../common/thread.h" +#else +#include #endif /* gtkutil.c, just some gtk wrappers */ diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c index 6cd812cf..e645f0bc 100644 --- a/src/fe-gtk/joind.c +++ b/src/fe-gtk/joind.c @@ -12,6 +12,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include #include #include diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 74157a7f..28cf46a9 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -53,7 +53,8 @@ #include "../common/plugin.h" #include "../common/modes.h" #include "../common/url.h" -#include "../common/wdkutil.h" +#include "../common/util.h" + #include "fe-gtk.h" #include "banlist.h" #include "gtkutil.h" diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 90c784f0..e6a5eca0 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -23,6 +23,8 @@ #ifdef WIN32 #include +#else +#include #endif #include "fe-gtk.h" @@ -1121,6 +1123,7 @@ usermenu_update (void) } } +#if 0 static void menu_saveconf (void) { @@ -1135,6 +1138,7 @@ menu_saveconf (void) PrintText (sess, "Error saving settings.\n"); } } +#endif static void menu_newserver_window (GtkWidget * wid, gpointer none) @@ -1653,7 +1657,9 @@ static struct mymenu mymenu[] = { {N_("Userlist Popup..."), menu_ulpopup, 0, M_MENUITEM, 0, 0, 1}, {0, 0, 0, M_END, 0, 0, 0}, /* 53 */ - /* {N_("Save Settings to Disk"), menu_saveconf, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, don't use this, a /set auto-save approach will be added instead */ +#if 0 + {N_("Save Settings to Disk"), menu_saveconf, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, /* don't use this, a /set auto-save approach will be added instead */ +#endif {N_("_Window"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("Ban List..."), menu_banlist, 0, M_MENUITEM, 0, 0, 1}, diff --git a/src/fe-gtk/palette.c b/src/fe-gtk/palette.c index b94ac874..104700c2 100644 --- a/src/fe-gtk/palette.c +++ b/src/fe-gtk/palette.c @@ -22,6 +22,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "fe-gtk.h" #include "palette.h" diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 62a726a4..b9f60f8d 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -1,20 +1,23 @@ /* Copyright (C) 2006-2007 Peter Zelezny. */ #include -#include "../../plugins/xchat-plugin.h" +#include "../common/xchat-plugin.h" #include "../common/xchat.h" #include "../common/xchatc.h" #include "../common/inbound.h" #include "../common/server.h" #include "../common/fe.h" #include "../common/util.h" -#include "../common/wdkutil.h" #include "fe-gtk.h" #include "pixmaps.h" #include "maingui.h" #include "menu.h" #include +#ifndef WIN32 +#include +#endif + #ifdef USE_LIBNOTIFY #include #ifndef NOTIFY_CHECK_VERSION @@ -510,7 +513,7 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata) tray_make_item (menu, _("_Hide Window"), tray_menu_restore_cb, NULL); tray_make_item (menu, NULL, tray_menu_quit_cb, NULL); -#if 0 +#ifndef WIN32 /* somehow this is broken on win32 */ submenu = mg_submenu (menu, _("_Blink on")); blink_item (&prefs.input_tray_chans, submenu, _("Channel Message")); blink_item (&prefs.input_tray_priv, submenu, _("Private Message")); @@ -528,6 +531,7 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata) tray_make_item (menu, NULL, tray_menu_quit_cb, NULL); #endif + mg_create_icon_item (_("_Quit"), GTK_STOCK_QUIT, menu, tray_menu_quit_cb, NULL); menu_add_plugin_items (menu, "\x5$TRAY", NULL); @@ -553,8 +557,12 @@ tray_init (void) sticon = gtk_status_icon_new_from_pixbuf (ICON_NORMAL); if (!sticon) return; - /* g_signal_connect (G_OBJECT (sticon), "popup-menu", - G_CALLBACK (tray_menu_cb), sticon); */ + +#ifndef WIN32 + g_signal_connect (G_OBJECT (sticon), "popup-menu", + G_CALLBACK (tray_menu_cb), sticon); +#endif + g_signal_connect (G_OBJECT (sticon), "activate", G_CALLBACK (tray_menu_restore_cb), NULL); } diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c index 0edfc62b..71d2f02e 100644 --- a/src/fe-gtk/plugingui.c +++ b/src/fe-gtk/plugingui.c @@ -35,7 +35,7 @@ #include "../common/xchat.h" #define PLUGIN_C typedef struct session xchat_context; -#include "../../plugins/xchat-plugin.h" +#include "../common/xchat-plugin.h" #include "../common/plugin.h" #include "../common/util.h" #include "../common/outbound.h" @@ -146,10 +146,13 @@ plugingui_load_cb (session *sess, char *file) void plugingui_load (void) { - gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, - current_sess, + gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess, +#ifdef WIN32 "Plugins and Scripts\0*.dll;*.lua;*.pl;*.py;*.tcl\0" "All files\0*.*\0\0", 0); +#else + NULL, FRF_ADDFOLDER); +#endif } static void diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c index a3e1a63b..593468c1 100644 --- a/src/fe-gtk/rawlog.c +++ b/src/fe-gtk/rawlog.c @@ -21,6 +21,10 @@ #include #include +#ifndef WIN32 +#include +#endif + #include "fe-gtk.h" #include diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 5b242508..1f1be0b4 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -14,7 +14,6 @@ #include "../common/text.h" #include "../common/userlist.h" #include "../common/util.h" -#include "../common/wdkutil.h" #include "../common/xchatc.h" #include "fe-gtk.h" #include "gtkutil.h" @@ -111,7 +110,7 @@ static const setting textbox_settings[] = {ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(indent_nicks), N_("Make nick names right-justified"),0,0}, {ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(transparent),0,0,0}, - {ST_TOGGLE, N_("Show marker line"), P_OFFINTNL(show_marker), + {ST_TOGGLR, N_("Show marker line"), P_OFFINTNL(show_marker), N_("Insert a red line after the last read text."),0,0}, {ST_HEADER, N_("Transparency Settings"), 0,0,0}, {ST_HSCALE, N_("Red:"), P_OFFINTNL(tint_red),0,0,0}, @@ -153,7 +152,11 @@ static const setting inputbox_settings[] = #if defined(USE_GTKSPELL) || defined(USE_LIBSEXY) {ST_TOGGLE, N_("Spell checking"), P_OFFINTNL(gui_input_spell),0,0,0}, {ST_ENTRY, N_("Dictionaries to use:"), P_OFFSETNL(spell_langs),0,0,sizeof prefs.spell_langs}, +#ifdef WIN32 {ST_LABEL, N_("Use language codes (as in \"share\\myspell\\dicts\").\nSeparate multiple entries with commas.")}, +#else + {ST_LABEL, N_("Use language codes. Separate multiple entries with commas.")}, +#endif #endif {ST_HEADER, N_("Nick Completion"),0,0,0}, @@ -413,6 +416,7 @@ static const setting advanced_settings[] = {ST_END, 0, 0, 0, 0, 0} }; +#ifdef WIN32 static const setting advanced_settings_oneinstance[] = { {ST_HEADER, N_("Advanced Settings"),0,0,0}, @@ -429,6 +433,7 @@ static const setting advanced_settings_oneinstance[] = {ST_END, 0, 0, 0, 0, 0} }; +#endif static const setting logging_settings[] = { @@ -1797,6 +1802,7 @@ setup_create_pages (GtkWidget *box) setup_add_page (cata[10], book, setup_create_page (logging_settings)); setup_add_page (cata[11], book, setup_create_sound_page ()); +#ifdef WIN32 if (portable_mode ()) { setup_add_page (cata[12], book, setup_create_page (advanced_settings)); @@ -1805,6 +1811,9 @@ setup_create_pages (GtkWidget *box) { setup_add_page (cata[12], book, setup_create_page (advanced_settings_oneinstance)); } +#else + setup_add_page (cata[12], book, setup_create_page (advanced_settings)); +#endif setup_add_page (cata[14], book, setup_create_page (network_settings)); setup_add_page (cata[15], book, setup_create_page (filexfer_settings)); diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index 8f21e977..9483f04b 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -33,7 +33,9 @@ #include "sexy-iso-codes.h" #include "sexy-marshal.h" +#ifdef WIN32 #include "typedef.h" +#endif #include "../common/cfgfiles.h" #include "../common/xchatc.h" @@ -141,9 +143,18 @@ initialize_enchant () GModule *enchant; gpointer funcptr; +#ifdef WIN32 enchant = g_module_open("libenchant.dll", 0); +#else + enchant = g_module_open("libenchant", 0); +#endif if (enchant == NULL) { +#ifndef WIN32 + enchant = g_module_open("libenchant.so.1", 0); + if (enchant == NULL) + return; +#endif return; } diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 5a83062b..3bc9b6a8 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -74,6 +74,8 @@ #ifdef WIN32 #include #include +#else +#include #endif /* is delimiter */ -- cgit 1.4.1 From 13ee029364b37eca95c43641420e75c872b32653 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 11 Dec 2011 18:04:35 +0100 Subject: some more multiplatform support --- plugins/lua/lua.c | 2 +- plugins/lua/makefile.mak | 2 +- plugins/perl/makefile-512.mak | 2 +- plugins/perl/makefile-514.mak | 2 +- plugins/perl/perl.c | 2 +- plugins/python/makefile.mak | 2 +- plugins/python/python.c | 2 +- src/common/dirent-win32.c | 199 ++++++++++++++++++++++++++++++++++++++++++ src/common/dirent-win32.h | 28 ++++++ src/common/dirent.c | 199 ------------------------------------------ src/common/dirent.h | 28 ------ src/common/makefile.mak | 10 +-- src/common/plugin.c | 4 + src/common/util.c | 2 +- src/fe-gtk/about.c | 2 +- src/fe-gtk/fe-gtk.h | 7 -- src/fe-gtk/setup.c | 2 + 17 files changed, 247 insertions(+), 248 deletions(-) create mode 100644 src/common/dirent-win32.c create mode 100644 src/common/dirent-win32.h delete mode 100644 src/common/dirent.c delete mode 100644 src/common/dirent.h (limited to 'src') diff --git a/plugins/lua/lua.c b/plugins/lua/lua.c index 9574fd4d..9f29bf08 100644 --- a/plugins/lua/lua.c +++ b/plugins/lua/lua.c @@ -43,12 +43,12 @@ #include #include #include -#include "../../src/common/dirent.h" #include #include #ifdef _WIN32 #include /* for getcwd */ +#include "../../src/common/dirent-win32.h" #endif #if !( defined(_WIN32) || defined(LXC_XCHAT_GETTEXT) ) diff --git a/plugins/lua/makefile.mak b/plugins/lua/makefile.mak index fbc94072..97a7e10b 100644 --- a/plugins/lua/makefile.mak +++ b/plugins/lua/makefile.mak @@ -1,6 +1,6 @@ include "..\..\src\makeinc.mak" -DIRENTLIB = ..\..\src\common\dirent.lib +DIRENTLIB = ..\..\src\common\dirent-win32.lib all: lua.obj lua.def link $(LDFLAGS) $(LIBS) /dll /out:xclua.dll $(LUALIB).lib $(DIRENTLIB) /def:lua.def lua.obj diff --git a/plugins/perl/makefile-512.mak b/plugins/perl/makefile-512.mak index 677c9073..7f2fbe04 100644 --- a/plugins/perl/makefile-512.mak +++ b/plugins/perl/makefile-512.mak @@ -1,6 +1,6 @@ include "..\..\src\makeinc.mak" -DIRENTLIB = ..\..\src\common\dirent.lib +DIRENTLIB = ..\..\src\common\dirent-win32.lib TARGET = $(PERL512OUTPUT) all: $(TARGET) diff --git a/plugins/perl/makefile-514.mak b/plugins/perl/makefile-514.mak index c31a7ec4..4c8d0ebd 100644 --- a/plugins/perl/makefile-514.mak +++ b/plugins/perl/makefile-514.mak @@ -1,6 +1,6 @@ include "..\..\src\makeinc.mak" -DIRENTLIB = ..\..\src\common\dirent.lib +DIRENTLIB = ..\..\src\common\dirent-win32.lib TARGET = $(PERL514OUTPUT) all: $(TARGET) diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index a2763771..719ef292 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -28,7 +28,7 @@ #ifdef WIN32 #include #define _INC_DIRENT /* disable inclusion of perl's dirent.h, we use an own version for win32 */ -#include "../../src/common/dirent.h" +#include "../../src/common/dirent-win32.h" #else #include #endif diff --git a/plugins/python/makefile.mak b/plugins/python/makefile.mak index 8cbba3f5..bc004577 100644 --- a/plugins/python/makefile.mak +++ b/plugins/python/makefile.mak @@ -1,6 +1,6 @@ include "..\..\src\makeinc.mak" -DIRENTLIB = ..\..\src\common\dirent.lib +DIRENTLIB = ..\..\src\common\dirent-win32.lib TARGET = $(PYTHONOUTPUT) all: $(TARGET) diff --git a/plugins/python/python.c b/plugins/python/python.c index 3c535057..dcf4fc8f 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -57,7 +57,7 @@ #include #ifdef WIN32 -#include "../../src/common/dirent.h" +#include "../../src/common/dirent-win32.h" #include "../../config.h" #else #include diff --git a/src/common/dirent-win32.c b/src/common/dirent-win32.c new file mode 100644 index 00000000..273c6732 --- /dev/null +++ b/src/common/dirent-win32.c @@ -0,0 +1,199 @@ +/***************************************************************************** + * dirent.h - dirent API for Microsoft Visual Studio + * + * Copyright (C) 2006 Toni Ronkko + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * ``Software''), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Dec 15, 2009, John Cunningham + * Added rewinddir member function + * + * Jan 18, 2008, Toni Ronkko + * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string + * between multi-byte and unicode representations. This makes the + * code simpler and also allows the code to be compiled under MingW. Thanks + * to Azriel Fasten for the suggestion. + * + * Mar 4, 2007, Toni Ronkko + * Bug fix: due to the strncpy_s() function this file only compiled in + * Visual Studio 2005. Using the new string functions only when the + * compiler version allows. + * + * Nov 2, 2006, Toni Ronkko + * Major update: removed support for Watcom C, MS-DOS and Turbo C to + * simplify the file, updated the code to compile cleanly on Visual + * Studio 2005 with both unicode and multi-byte character strings, + * removed rewinddir() as it had a bug. + * + * Aug 20, 2006, Toni Ronkko + * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified + * comments by removing SGML tags. + * + * May 14 2002, Toni Ronkko + * Embedded the function definitions directly to the header so that no + * source modules need to be included in the Visual Studio project. Removed + * all the dependencies to other projects so that this very header can be + * used independently. + * + * May 28 1998, Toni Ronkko + * First version. + *****************************************************************************/ + +#include "dirent-win32.h" + +/* Use the new safe string functions introduced in Visual Studio 2005 */ +#if defined(_MSC_VER) && _MSC_VER >= 1400 +# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) +#else +# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) +#endif + + +/***************************************************************************** + * Open directory stream DIRNAME for read and return a pointer to the + * internal working area that is used to retrieve individual directory + * entries. + */ +DIR *opendir(const char *dirname) +{ + DIR *dirp; + assert (dirname != NULL); + assert (strlen (dirname) < MAX_PATH); + + /* construct new DIR structure */ + dirp = (DIR*) malloc (sizeof (struct DIR)); + if (dirp != NULL) { + char *p; + + /* take directory name... */ + STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); + dirp->patt[MAX_PATH] = '\0'; + + /* ... and append search pattern to it */ + p = strchr (dirp->patt, '\0'); + if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { + *p++ = '\\'; + } + *p++ = '*'; + *p = '\0'; + + /* open stream and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return NULL; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; + } + + return dirp; +} + + +/***************************************************************************** + * Read a directory entry, and return a pointer to a dirent structure + * containing the name of the entry in d_name field. Individual directory + * entries returned by this very function include regular files, + * sub-directories, pseudo-directories "." and "..", but also volume labels, + * hidden files and system files may be returned. + */ +struct dirent *readdir(DIR *dirp) +{ + assert (dirp != NULL); + + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* directory stream was opened/rewound incorrectly or ended normally */ + return NULL; + } + + /* get next directory entry */ + if (dirp->cached != 0) { + /* a valid directory entry already in memory */ + dirp->cached = 0; + } else { + /* read next directory entry from disk */ + if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { + /* the very last file has been processed or an error occured */ + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + return NULL; + } + } + + /* copy as a multibyte character string */ + STRNCPY ( dirp->current.d_name, + dirp->current.data.cFileName, + sizeof(dirp->current.d_name) ); + dirp->current.d_name[MAX_PATH] = '\0'; + + return &dirp->current; +} + + +/***************************************************************************** + * Close directory stream opened by opendir() function. Close of the + * directory stream invalidates the DIR structure as well as any previously + * read directory entry. + */ +int closedir(DIR *dirp) +{ + assert (dirp != NULL); + + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* release directory handle */ + free (dirp); + return 0; +} + + +/***************************************************************************** + * Resets the position of the directory stream to which dirp refers to the + * beginning of the directory. It also causes the directory stream to refer + * to the current state of the corresponding directory, as a call to opendir() + * would have done. If dirp does not refer to a directory stream, the effect + * is undefined. + */ +void rewinddir(DIR* dirp) +{ + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* open new search handle and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; +} diff --git a/src/common/dirent-win32.h b/src/common/dirent-win32.h new file mode 100644 index 00000000..cbb753e6 --- /dev/null +++ b/src/common/dirent-win32.h @@ -0,0 +1,28 @@ +#ifndef DIRENT_H +#define DIRENT_H + +#include +#include +#include + +typedef struct dirent +{ + char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ + WIN32_FIND_DATAA data; /* file attributes */ +} dirent; + +typedef struct DIR +{ + dirent current; /* Current directory entry */ + int cached; /* Indicates un-processed entry in memory */ + HANDLE search_handle; /* File search handle */ + char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ +} DIR; + +/* Forward declarations */ +DIR *opendir (const char *dirname); +struct dirent *readdir (DIR *dirp); +int closedir (DIR *dirp); +void rewinddir(DIR* dirp); + +#endif /*DIRENT_H*/ diff --git a/src/common/dirent.c b/src/common/dirent.c deleted file mode 100644 index a84f1b65..00000000 --- a/src/common/dirent.c +++ /dev/null @@ -1,199 +0,0 @@ -/***************************************************************************** - * dirent.h - dirent API for Microsoft Visual Studio - * - * Copyright (C) 2006 Toni Ronkko - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * ``Software''), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Dec 15, 2009, John Cunningham - * Added rewinddir member function - * - * Jan 18, 2008, Toni Ronkko - * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string - * between multi-byte and unicode representations. This makes the - * code simpler and also allows the code to be compiled under MingW. Thanks - * to Azriel Fasten for the suggestion. - * - * Mar 4, 2007, Toni Ronkko - * Bug fix: due to the strncpy_s() function this file only compiled in - * Visual Studio 2005. Using the new string functions only when the - * compiler version allows. - * - * Nov 2, 2006, Toni Ronkko - * Major update: removed support for Watcom C, MS-DOS and Turbo C to - * simplify the file, updated the code to compile cleanly on Visual - * Studio 2005 with both unicode and multi-byte character strings, - * removed rewinddir() as it had a bug. - * - * Aug 20, 2006, Toni Ronkko - * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified - * comments by removing SGML tags. - * - * May 14 2002, Toni Ronkko - * Embedded the function definitions directly to the header so that no - * source modules need to be included in the Visual Studio project. Removed - * all the dependencies to other projects so that this very header can be - * used independently. - * - * May 28 1998, Toni Ronkko - * First version. - *****************************************************************************/ - -#include "dirent.h" - -/* Use the new safe string functions introduced in Visual Studio 2005 */ -#if defined(_MSC_VER) && _MSC_VER >= 1400 -# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) -#else -# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) -#endif - - -/***************************************************************************** - * Open directory stream DIRNAME for read and return a pointer to the - * internal working area that is used to retrieve individual directory - * entries. - */ -DIR *opendir(const char *dirname) -{ - DIR *dirp; - assert (dirname != NULL); - assert (strlen (dirname) < MAX_PATH); - - /* construct new DIR structure */ - dirp = (DIR*) malloc (sizeof (struct DIR)); - if (dirp != NULL) { - char *p; - - /* take directory name... */ - STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); - dirp->patt[MAX_PATH] = '\0'; - - /* ... and append search pattern to it */ - p = strchr (dirp->patt, '\0'); - if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { - *p++ = '\\'; - } - *p++ = '*'; - *p = '\0'; - - /* open stream and retrieve first file */ - dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* invalid search pattern? */ - free (dirp); - return NULL; - } - - /* there is an un-processed directory entry in memory now */ - dirp->cached = 1; - } - - return dirp; -} - - -/***************************************************************************** - * Read a directory entry, and return a pointer to a dirent structure - * containing the name of the entry in d_name field. Individual directory - * entries returned by this very function include regular files, - * sub-directories, pseudo-directories "." and "..", but also volume labels, - * hidden files and system files may be returned. - */ -struct dirent *readdir(DIR *dirp) -{ - assert (dirp != NULL); - - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* directory stream was opened/rewound incorrectly or ended normally */ - return NULL; - } - - /* get next directory entry */ - if (dirp->cached != 0) { - /* a valid directory entry already in memory */ - dirp->cached = 0; - } else { - /* read next directory entry from disk */ - if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { - /* the very last file has been processed or an error occured */ - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - return NULL; - } - } - - /* copy as a multibyte character string */ - STRNCPY ( dirp->current.d_name, - dirp->current.data.cFileName, - sizeof(dirp->current.d_name) ); - dirp->current.d_name[MAX_PATH] = '\0'; - - return &dirp->current; -} - - -/***************************************************************************** - * Close directory stream opened by opendir() function. Close of the - * directory stream invalidates the DIR structure as well as any previously - * read directory entry. - */ -int closedir(DIR *dirp) -{ - assert (dirp != NULL); - - /* release search handle */ - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - } - - /* release directory handle */ - free (dirp); - return 0; -} - - -/***************************************************************************** - * Resets the position of the directory stream to which dirp refers to the - * beginning of the directory. It also causes the directory stream to refer - * to the current state of the corresponding directory, as a call to opendir() - * would have done. If dirp does not refer to a directory stream, the effect - * is undefined. - */ -void rewinddir(DIR* dirp) -{ - /* release search handle */ - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - } - - /* open new search handle and retrieve first file */ - dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* invalid search pattern? */ - free (dirp); - return; - } - - /* there is an un-processed directory entry in memory now */ - dirp->cached = 1; -} diff --git a/src/common/dirent.h b/src/common/dirent.h deleted file mode 100644 index cbb753e6..00000000 --- a/src/common/dirent.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef DIRENT_H -#define DIRENT_H - -#include -#include -#include - -typedef struct dirent -{ - char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ - WIN32_FIND_DATAA data; /* file attributes */ -} dirent; - -typedef struct DIR -{ - dirent current; /* Current directory entry */ - int cached; /* Indicates un-processed entry in memory */ - HANDLE search_handle; /* File search handle */ - char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ -} DIR; - -/* Forward declarations */ -DIR *opendir (const char *dirname); -struct dirent *readdir (DIR *dirp); -int closedir (DIR *dirp); -void rewinddir(DIR* dirp); - -#endif /*DIRENT_H*/ diff --git a/src/common/makefile.mak b/src/common/makefile.mak index 8b350efc..f78a6d8d 100644 --- a/src/common/makefile.mak +++ b/src/common/makefile.mak @@ -5,7 +5,7 @@ cfgfiles.obj \ chanopt.obj \ ctcp.obj \ dcc.obj \ -dirent.obj \ +dirent-win32.obj \ history.obj \ ignore.obj \ inbound.obj \ @@ -27,13 +27,13 @@ userlist.obj \ util.obj \ xchat.obj -all: $(COMMON_OBJECTS) xchatcommon.lib dirent.lib +all: $(COMMON_OBJECTS) xchatcommon.lib dirent-win32.lib xchatcommon.lib: $(COMMON_OBJECTS) lib /nologo /out:xchatcommon.lib $(COMMON_OBJECTS) -dirent.lib: dirent.obj - lib /nologo /out:dirent.lib dirent.obj +dirent-win32.lib: dirent-win32.obj + lib /nologo /out:dirent-win32.lib dirent-win32.obj .c.obj:: $(CC) $(CFLAGS) $(GLIB) $< @@ -41,4 +41,4 @@ dirent.lib: dirent.obj clean: @del *.obj @del xchatcommon.lib - @del dirent.lib + @del dirent-win32.lib diff --git a/src/common/plugin.c b/src/common/plugin.c index ccb64e93..5ed20b87 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1008,7 +1008,11 @@ xchat_get_info (xchat_plugin *ph, const char *id) return XCHATLIBDIR; case 0x14f51cd8: /* version */ +#ifdef WIN32 return XCHAT_RELEASE; +#else + return PACKAGE_VERSION; +#endif case 0xdd9b1abd: /* xchatdir */ return get_xdir_utf8 (); diff --git a/src/common/util.c b/src/common/util.c index ccc48657..51222e40 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -32,7 +32,7 @@ #include #include #include -#include "dirent.h" +#include "dirent-win32.h" #else #include #include diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index 41f3c09b..dc1cbf08 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -139,7 +139,7 @@ menu_about (GtkWidget * wid, gpointer sess) (portable_mode () ? "Yes" : "No"), get_cpu_arch () #else - "%s\n\n" + "\n%s\n\n" "%s\n" "Charset: %s " "Renderer: %s\n" diff --git a/src/fe-gtk/fe-gtk.h b/src/fe-gtk/fe-gtk.h index 4183f559..8fffb3cc 100644 --- a/src/fe-gtk/fe-gtk.h +++ b/src/fe-gtk/fe-gtk.h @@ -1,13 +1,6 @@ #include "../../config.h" -#ifdef WIN32 -/* If you're compiling this for Windows, your release is un-official - * and not condoned. Please don't use the XChat name. Make up your - * own name! */ #define DISPLAY_NAME "XChat-WDK" -#else -#define DISPLAY_NAME "XChat" -#endif #ifndef WIN32 #include diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 1f1be0b4..cce85d30 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -1383,7 +1383,9 @@ setup_create_color_page (void) setup_create_other_color (_("New message:"), COL_NEW_MSG, 10, tab); setup_create_other_colorR (_("Away user:"), COL_AWAY, 10, tab); setup_create_other_color (_("Highlight:"), COL_HILIGHT, 11, tab); +#if defined(USE_GTKSPELL) || defined(USE_LIBSEXY) setup_create_other_colorR (_("Spell checker:"), COL_SPELL, 11, tab); +#endif return box; } -- cgit 1.4.1 From 38a42ed51950661edd5a5ea59151795e12b259f3 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 11 Dec 2011 19:27:37 +0100 Subject: fix built-in spelling on linux --- configure.in | 9 +++++++++ src/fe-gtk/Makefile.am | 9 +++++---- src/fe-gtk/sexy-iso-codes.c | 4 ++++ 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/configure.in b/configure.in index 620268d2..1ebc46f5 100644 --- a/configure.in +++ b/configure.in @@ -10,6 +10,7 @@ AC_CONFIG_SRCDIR([configure.in]) AM_INIT_AUTOMAKE([1.9 dist-bzip2 subdir-objects no-define]) +AC_USE_SYSTEM_EXTENSIONS AM_MAINTAINER_MODE AC_PROG_CC AM_PROG_CC_C_O @@ -40,6 +41,7 @@ dnl AH_VERBATIM([USE_GNOME],[#undef USE_GNOME]) AH_VERBATIM([USE_SHM],[#undef USE_SHM]) AH_VERBATIM([USE_GTKSPELL],[#undef USE_GTKSPELL]) AH_VERBATIM([USE_LIBSEXY],[#undef USE_LIBSEXY]) +AH_VERBATIM([HAVE_ISO_CODES],[#undef HAVE_ISO_CODES]) AH_VERBATIM([USE_LIBNOTIFY],[#undef USE_LIBNOTIFY]) AH_VERBATIM([USE_IPV6],[#undef USE_IPV6]) AH_VERBATIM([USE_MMX],[#undef USE_MMX]) @@ -549,7 +551,14 @@ if test "$spell" = "libsexy" ; then fi if test "$spell" = "static" ; then + PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.0.0, [ + AC_DEFINE(HAVE_ISO_CODES) AC_DEFINE(USE_LIBSEXY) + GUI_CFLAGS="$GUI_CFLAGS -I/usr/include/libxml2" + LIBS="$LIBS -lxml2" + ], [ + AC_MSG_ERROR("Cannot find libxml2") + ]) fi dnl ********************************************************************* diff --git a/src/fe-gtk/Makefile.am b/src/fe-gtk/Makefile.am index 7db38096..da36ed57 100644 --- a/src/fe-gtk/Makefile.am +++ b/src/fe-gtk/Makefile.am @@ -10,8 +10,8 @@ EXTRA_DIST = \ about.h ascii.h banlist.h chanlist.h chanview.h chanview-tabs.c \ chanview-tree.c custom-list.h editlist.h fe-gtk.h fkeys.h gtkutil.h joind.h \ maingui.h menu.h mmx_cmod.S mmx_cmod.h notifygui.h palette.h pixmaps.h \ - plugin-tray.h plugingui.c plugingui.h rawlog.h search.h sexy-spell-entry.h \ - textgui.h urlgrab.h userlistgui.h xtext.h + plugin-tray.h plugingui.c plugingui.h rawlog.h search.h sexy-iso-codes.h \ + sexy-spell-entry.h sexy-marshal.h textgui.h urlgrab.h userlistgui.h xtext.h if USE_MMX mmx_cmod_S = mmx_cmod.S @@ -22,11 +22,12 @@ plugingui_c = plugingui.c endif if USE_LIBSEXY -sexy_spell_entry_c = sexy-spell-entry.c +sexy_spell = \ + sexy-iso-codes.c sexy-marshal.c sexy-spell-entry.c endif xchat_SOURCES = about.c ascii.c banlist.c chanlist.c chanview.c custom-list.c \ dccgui.c editlist.c fe-gtk.c fkeys.c gtkutil.c ignoregui.c joind.c menu.c \ maingui.c $(mmx_cmod_S) notifygui.c palette.c pixmaps.c plugin-tray.c $(plugingui_c) \ - rawlog.c search.c servlistgui.c setup.c $(sexy_spell_entry_c) textgui.c \ + rawlog.c search.c servlistgui.c setup.c $(sexy_spell) textgui.c \ urlgrab.c userlistgui.c xtext.c diff --git a/src/fe-gtk/sexy-iso-codes.c b/src/fe-gtk/sexy-iso-codes.c index 3477cc30..4b637c9f 100644 --- a/src/fe-gtk/sexy-iso-codes.c +++ b/src/fe-gtk/sexy-iso-codes.c @@ -115,7 +115,11 @@ load_iso_entries (int iso, char *filename; int ret = -1; +#ifdef WIN32 filename = g_strdup_printf (".\\share\\xml\\iso-codes\\iso_%d.xml", iso); +#else + filename = g_strdup_printf ("/usr/share/xml/iso-codes/iso_%d.xml", iso); +#endif reader = xmlNewTextReaderFilename (filename); if (reader == NULL) goto out; -- cgit 1.4.1 From c3821b6316c3d25ef6affd5215796d3abbefd2fe Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 14 Jan 2012 00:29:01 +0100 Subject: skeleton for xchat_del_pluginpref --- plugins/xchat-plugin.h | 7 +++++++ src/common/plugin.c | 21 ++++++++++++++++++--- src/common/plugin.h | 2 ++ src/common/xchat-plugin.h | 7 +++++++ src/version-script | 1 + 5 files changed, 35 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h index 15799424..373c664e 100644 --- a/plugins/xchat-plugin.h +++ b/plugins/xchat-plugin.h @@ -148,6 +148,8 @@ struct _xchat_plugin int value); int (*xchat_get_pluginpref_int) (xchat_plugin *ph, const char *var); + int (*xchat_del_pluginpref) (xchat_plugin *ph, + const char *var); }; #endif @@ -321,6 +323,10 @@ int xchat_get_pluginpref_int (xchat_plugin *ph, const char *var); +int +xchat_del_pluginpref (xchat_plugin *ph, + const char *var); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -359,6 +365,7 @@ xchat_get_pluginpref_int (xchat_plugin *ph, #define xchat_get_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_str) #define xchat_set_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_int) #define xchat_get_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_int) +#define xchat_del_pluginpref ((XCHAT_PLUGIN_HANDLE)->xchat_del_pluginpref) #endif #ifdef __cplusplus diff --git a/src/common/plugin.c b/src/common/plugin.c index 5ed20b87..02cdcce5 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -274,6 +274,7 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func, pl->xchat_get_pluginpref_str = xchat_get_pluginpref_str; pl->xchat_set_pluginpref_int = xchat_set_pluginpref_int; pl->xchat_get_pluginpref_int = xchat_get_pluginpref_int; + pl->xchat_del_pluginpref = xchat_del_pluginpref; /* incase new plugins are loaded on older xchat */ pl->xchat_dummy4 = xchat_dummy; @@ -1587,9 +1588,11 @@ xchat_free (xchat_plugin *ph, void *ptr) g_free (ptr); } -int -xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value) +static int +xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *value, int mode) { + /* mode: 0 = delete, 1 = save */ + FILE *fpIn; int fhOut; int prevConfig; @@ -1683,6 +1686,12 @@ xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value) } } +int +xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value) +{ + return xchat_set_pluginpref_str (pl, var, value, 1); +} + int xchat_get_pluginpref_str (xchat_plugin *pl, const char *var, char *dest) { @@ -1741,7 +1750,7 @@ xchat_set_pluginpref_int (xchat_plugin *pl, const char *var, int value) char buffer[12]; sprintf (buffer, "%d", value); - return xchat_set_pluginpref_str (pl, var, buffer); + return xchat_set_pluginpref_str_real (pl, var, buffer, 1); } int @@ -1758,3 +1767,9 @@ xchat_get_pluginpref_int (xchat_plugin *pl, const char *var) return -1; } } + +int +xchat_del_pluginpref (xchat_plugin *pl, const char *var) +{ + xchat_set_pluginpref_str_real (pl, var, 0, 0); +} diff --git a/src/common/plugin.h b/src/common/plugin.h index cddb86fb..bb86f0a3 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -109,6 +109,8 @@ struct _xchat_plugin int value); int (*xchat_get_pluginpref_int) (xchat_plugin *ph, const char *var); + int (*xchat_del_pluginpref) (xchat_plugin *ph, + const char *var); void *(*xchat_dummy4) (xchat_plugin *ph); void *(*xchat_dummy3) (xchat_plugin *ph); void *(*xchat_dummy2) (xchat_plugin *ph); diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h index 15799424..373c664e 100644 --- a/src/common/xchat-plugin.h +++ b/src/common/xchat-plugin.h @@ -148,6 +148,8 @@ struct _xchat_plugin int value); int (*xchat_get_pluginpref_int) (xchat_plugin *ph, const char *var); + int (*xchat_del_pluginpref) (xchat_plugin *ph, + const char *var); }; #endif @@ -321,6 +323,10 @@ int xchat_get_pluginpref_int (xchat_plugin *ph, const char *var); +int +xchat_del_pluginpref (xchat_plugin *ph, + const char *var); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -359,6 +365,7 @@ xchat_get_pluginpref_int (xchat_plugin *ph, #define xchat_get_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_str) #define xchat_set_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_int) #define xchat_get_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_int) +#define xchat_del_pluginpref ((XCHAT_PLUGIN_HANDLE)->xchat_del_pluginpref) #endif #ifdef __cplusplus diff --git a/src/version-script b/src/version-script index e76f4fe9..fe04dd46 100644 --- a/src/version-script +++ b/src/version-script @@ -34,5 +34,6 @@ EXPORTED { xchat_get_pluginpref_str; xchat_set_pluginpref_int; xchat_get_pluginpref_int; + xchat_del_pluginpref; local: *; }; -- cgit 1.4.1 From 17d13aa8d3cbc76156c831883eab0efbe40b671b Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 14 Jan 2012 01:49:12 +0100 Subject: implement xchat_del_pluginpref --- src/common/plugin.c | 61 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index 02cdcce5..b08143e0 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1589,13 +1589,11 @@ xchat_free (xchat_plugin *ph, void *ptr) } static int -xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *value, int mode) +xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *value, int mode) /* mode: 0 = delete, 1 = save */ { - /* mode: 0 = delete, 1 = save */ - FILE *fpIn; int fhOut; - int prevConfig; + int prevSetting; char confname[64]; char confname_tmp[69]; char buffer[512]; /* the same as in cfg_put_str */ @@ -1615,31 +1613,40 @@ xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *va { return 0; } - else if (fpIn == NULL) /* no previous config, no parsing */ + else if (fpIn == NULL) /* no previous config file, no parsing */ { - sprintf (buffer, "%s = %s\n", var, value); - write (fhOut, buffer, strlen (buffer)); - close (fhOut); + if (mode) + { + sprintf (buffer, "%s = %s\n", var, value); + write (fhOut, buffer, strlen (buffer)); + close (fhOut); - sprintf (buffer, "%s/%s", get_xdir_fs (), confname); - sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); + sprintf (buffer, "%s/%s", get_xdir_fs (), confname); + sprintf (buffer_tmp, "%s/%s", get_xdir_fs (), confname_tmp); #ifdef WIN32 - unlink (buffer); + unlink (buffer); #endif - if (rename (buffer_tmp, buffer) == 0) - { - return 1; + if (rename (buffer_tmp, buffer) == 0) + { + return 1; + } + else + { + return 0; + } } else { - return 0; + /* mode = 0, we want to delete but the config file and thus the given setting does not exist, we're ready */ + close (fhOut); + return 1; } } - else /* existing config, preserve settings and find & replace current var value if any */ + else /* existing config file, preserve settings and find & replace current var value if any */ { - prevConfig = 0; + prevSetting = 0; while (fscanf (fpIn, " %[^\n]", &buffer) != EOF) /* read whole lines including whitespaces */ { @@ -1647,12 +1654,20 @@ xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *va if (strncmp (buffer_tmp, buffer, strlen (var) + 1) == 0) /* given setting already exists */ { - sprintf (buffer, "%s = %s\n", var, value); - prevConfig = 1; + if (mode) /* overwrite the existing matching setting if we are in save mode */ + { + sprintf (buffer, "%s = %s\n", var, value); + } + else /* erase the setting in delete mode */ + { + strcpy (buffer, ""); + } + + prevSetting = 1; } else { - strcat (buffer, "\n"); + strcat (buffer, "\n"); /* preserve the existing different settings */ } write (fhOut, buffer, strlen (buffer)); @@ -1660,7 +1675,7 @@ xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *va fclose (fpIn); - if (!prevConfig) /* var doesn't exist currently, append */ + if (!prevSetting && mode) /* var doesn't exist currently, append if we're in save mode */ { sprintf (buffer, "%s = %s\n", var, value); write (fhOut, buffer, strlen (buffer)); @@ -1689,7 +1704,7 @@ xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *va int xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value) { - return xchat_set_pluginpref_str (pl, var, value, 1); + return xchat_set_pluginpref_str_real (pl, var, value, 1); } int @@ -1771,5 +1786,5 @@ xchat_get_pluginpref_int (xchat_plugin *pl, const char *var) int xchat_del_pluginpref (xchat_plugin *pl, const char *var) { - xchat_set_pluginpref_str_real (pl, var, 0, 0); + return xchat_set_pluginpref_str_real (pl, var, 0, 0); } -- cgit 1.4.1 From 4942dc667f3ff40601b7afd2efd91dff1f73789a Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 15 Jan 2012 19:07:48 +0100 Subject: refactor plugin config API and add skeleton for xchat_pluginpref_list --- plugins/plugin20.html | 61 ++++++++++++++++++++++++++++++++++------------- plugins/xchat-plugin.h | 37 ++++++++++++++++------------ src/common/plugin.c | 37 ++++++++++++++++------------ src/common/plugin.h | 12 ++++++---- src/common/xchat-plugin.h | 37 ++++++++++++++++------------ src/version-script | 11 +++++---- 6 files changed, 124 insertions(+), 71 deletions(-) (limited to 'src') diff --git a/plugins/plugin20.html b/plugins/plugin20.html index a9aaaace..6323cd80 100644 --- a/plugins/plugin20.html +++ b/plugins/plugin20.html @@ -81,10 +81,12 @@ margin-right: 32px;
xchat_strip
xchat_free
-
xchat_set_pluginpref_str -
xchat_get_pluginpref_str -
xchat_set_pluginpref_int -
xchat_get_pluginpref_int +
xchat_pluginpref_set_str +
xchat_pluginpref_get_str +
xchat_pluginpref_set_int +
xchat_pluginpref_get_int +
xchat_pluginpref_delete +
xchat_pluginpref_list

xchat_list_get
xchat_list_free @@ -1003,8 +1005,8 @@ A newly allocated string or NULL for failure. You must free this string with xch

-

 xchat_set_pluginpref_str() (new for 2.8.10)

-Prototype: int xchat_set_pluginpref_str (xchat_plugin *ph, const char *var, const char *value); +

 xchat_pluginpref_set_str() (new for 2.8.10)

+Prototype: int xchat_pluginpref_set_str (xchat_plugin *ph, const char *var, const char *value);

Description: Saves a plugin-specific setting with string value to a plugin-specific config file.
@@ -1028,8 +1030,8 @@ A newly allocated string or NULL for failure. You must free this string with xch *plugin_desc = "Testing stuff"; *plugin_version = "1.0"; - xchat_set_pluginpref_str (ph, "myvar1", "I want to save this string!"); - xchat_set_pluginpref_str (ph, "myvar2", "This is important, too."); + xchat_pluginpref_set_str (ph, "myvar1", "I want to save this string!"); + xchat_pluginpref_set_str (ph, "myvar2", "This is important, too."); return 1; /* return 1 for success */ } @@ -1042,8 +1044,8 @@ myvar2 = This is important, too. You should never need to edit this file manually.


-

 xchat_get_pluginpref_str() (new for 2.8.10)

-Prototype: int xchat_get_pluginpref_str (xchat_plugin *ph, const char *var, char *dest); +

 xchat_pluginpref_get_str() (new for 2.8.10)

+Prototype: int xchat_pluginpref_get_str (xchat_plugin *ph, const char *var, char *dest);

Description: Loads a plugin-specific setting with string value from a plugin-specific config file.
@@ -1056,8 +1058,8 @@ You should never need to edit this file manually. Returns: 1 for success, 0 for failure.


-

 xchat_set_pluginpref_int() (new for 2.8.10)

-Prototype: int xchat_set_pluginpref_int (xchat_plugin *ph, const char *var, int value); +

 xchat_pluginpref_set_int() (new for 2.8.10)

+Prototype: int xchat_pluginpref_set_int (xchat_plugin *ph, const char *var, int value);

Description: Saves a plugin-specific setting with decimal value to a plugin-specific config file.
@@ -1076,7 +1078,7 @@ You should never need to edit this file manually. if (buffer > 0 && buffer < INT_MAX) { - if (xchat_set_pluginpref_int (ph, "myint1", buffer)) + if (xchat_pluginpref_set_int (ph, "myint1", buffer)) { xchat_printf (ph, "Setting successfully saved!\n"); } @@ -1093,10 +1095,11 @@ You should never need to edit this file manually. return XCHAT_EAT_XCHAT; } -

+You only need these kind of complex checks if you're saving user input, which can be non-numeric. +


-

 xchat_get_pluginpref_int() (new for 2.8.10)

-Prototype: int xchat_get_pluginpref_int (xchat_plugin *ph, const char *var); +

 xchat_pluginpref_get_int() (new for 2.8.10)

+Prototype: int xchat_pluginpref_get_int (xchat_plugin *ph, const char *var);

Description: Loads a plugin-specific setting with decimal value from a plugin-specific config file.
@@ -1108,5 +1111,31 @@ You should never need to edit this file manually. Returns: The decimal value of the requested setting upon success, -1 for failure.


+

 xchat_pluginpref_delete() (new for 2.8.10)

+Prototype: int xchat_pluginpref_delete (xchat_plugin *ph, const char *var); +
+
Description: Deletes a plugin-specific setting from a plugin-specific config file. +
+
Arguments: +
ph: Plugin handle (as given to xchat_plugin_init). +
var: Name of the setting to delete. +
+
+Returns: 1 for success, 0 for failure. If the given setting didn't exist, it also returns 1, so 1 only indicates that the setting won't exist after the call. +


+ +

 xchat_pluginpref_list() (new for 2.8.10)

+Prototype: int xchat_pluginpref_list (xchat_plugin *ph, const char *dest); +
+
Description: Builds a comma-separated list of the currently saved settings from a plugin-specific config file. +
+
Arguments: +
ph: Plugin handle (as given to xchat_plugin_init). +
dest: Array to save the list to. +
+
+Returns: 1 for success, 0 for failure. +


+ diff --git a/plugins/xchat-plugin.h b/plugins/xchat-plugin.h index 373c664e..1b7da8fb 100644 --- a/plugins/xchat-plugin.h +++ b/plugins/xchat-plugin.h @@ -137,19 +137,21 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_pluginpref_str) (xchat_plugin *ph, + int (*xchat_pluginpref_set_str) (xchat_plugin *ph, const char *var, const char *value); - int (*xchat_get_pluginpref_str) (xchat_plugin *ph, + int (*xchat_pluginpref_get_str) (xchat_plugin *ph, const char *var, char *dest); - int (*xchat_set_pluginpref_int) (xchat_plugin *ph, + int (*xchat_pluginpref_set_int) (xchat_plugin *ph, const char *var, int value); - int (*xchat_get_pluginpref_int) (xchat_plugin *ph, + int (*xchat_pluginpref_get_int) (xchat_plugin *ph, const char *var); - int (*xchat_del_pluginpref) (xchat_plugin *ph, + int (*xchat_pluginpref_delete) (xchat_plugin *ph, const char *var); + int (*xchat_pluginpref_list) (xchat_plugin *ph, + char *dest); }; #endif @@ -306,27 +308,31 @@ xchat_free (xchat_plugin *ph, void *ptr); int -xchat_set_pluginpref_str (xchat_plugin *ph, +xchat_pluginpref_set_str (xchat_plugin *ph, const char *var, const char *value); int -xchat_get_pluginpref_str (xchat_plugin *ph, +xchat_pluginpref_get_str (xchat_plugin *ph, const char *var, char *dest); int -xchat_set_pluginpref_int (xchat_plugin *ph, +xchat_pluginpref_set_int (xchat_plugin *ph, const char *var, int value); int -xchat_get_pluginpref_int (xchat_plugin *ph, +xchat_pluginpref_get_int (xchat_plugin *ph, const char *var); int -xchat_del_pluginpref (xchat_plugin *ph, +xchat_pluginpref_delete (xchat_plugin *ph, const char *var); +int +xchat_pluginpref_list (xchat_plugin *ph, + char *dest); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -361,11 +367,12 @@ xchat_del_pluginpref (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) -#define xchat_set_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_str) -#define xchat_get_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_str) -#define xchat_set_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_int) -#define xchat_get_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_int) -#define xchat_del_pluginpref ((XCHAT_PLUGIN_HANDLE)->xchat_del_pluginpref) +#define xchat_pluginpref_set_str ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_set_str) +#define xchat_pluginpref_get_str ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_get_str) +#define xchat_pluginpref_set_int ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_set_int) +#define xchat_pluginpref_get_int ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_get_int) +#define xchat_pluginpref_delete ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_delete) +#define xchat_pluginpref_list ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_list) #endif #ifdef __cplusplus diff --git a/src/common/plugin.c b/src/common/plugin.c index b08143e0..cff8d49b 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -270,11 +270,12 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func, pl->xchat_send_modes = xchat_send_modes; pl->xchat_strip = xchat_strip; pl->xchat_free = xchat_free; - pl->xchat_set_pluginpref_str = xchat_set_pluginpref_str; - pl->xchat_get_pluginpref_str = xchat_get_pluginpref_str; - pl->xchat_set_pluginpref_int = xchat_set_pluginpref_int; - pl->xchat_get_pluginpref_int = xchat_get_pluginpref_int; - pl->xchat_del_pluginpref = xchat_del_pluginpref; + pl->xchat_pluginpref_set_str = xchat_pluginpref_set_str; + pl->xchat_pluginpref_get_str = xchat_pluginpref_get_str; + pl->xchat_pluginpref_set_int = xchat_pluginpref_set_int; + pl->xchat_pluginpref_get_int = xchat_pluginpref_get_int; + pl->xchat_pluginpref_delete = xchat_pluginpref_delete; + pl->xchat_pluginpref_list = xchat_pluginpref_list; /* incase new plugins are loaded on older xchat */ pl->xchat_dummy4 = xchat_dummy; @@ -1589,7 +1590,7 @@ xchat_free (xchat_plugin *ph, void *ptr) } static int -xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *value, int mode) /* mode: 0 = delete, 1 = save */ +xchat_pluginpref_set_str_real (xchat_plugin *pl, const char *var, const char *value, int mode) /* mode: 0 = delete, 1 = save */ { FILE *fpIn; int fhOut; @@ -1702,13 +1703,13 @@ xchat_set_pluginpref_str_real (xchat_plugin *pl, const char *var, const char *va } int -xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value) +xchat_pluginpref_set_str (xchat_plugin *pl, const char *var, const char *value) { - return xchat_set_pluginpref_str_real (pl, var, value, 1); + return xchat_pluginpref_set_str_real (pl, var, value, 1); } int -xchat_get_pluginpref_str (xchat_plugin *pl, const char *var, char *dest) +xchat_pluginpref_get_str (xchat_plugin *pl, const char *var, char *dest) { int fh; int l; @@ -1760,20 +1761,20 @@ xchat_get_pluginpref_str (xchat_plugin *pl, const char *var, char *dest) } int -xchat_set_pluginpref_int (xchat_plugin *pl, const char *var, int value) +xchat_pluginpref_set_int (xchat_plugin *pl, const char *var, int value) { char buffer[12]; sprintf (buffer, "%d", value); - return xchat_set_pluginpref_str_real (pl, var, buffer, 1); + return xchat_pluginpref_set_str_real (pl, var, buffer, 1); } int -xchat_get_pluginpref_int (xchat_plugin *pl, const char *var) +xchat_pluginpref_get_int (xchat_plugin *pl, const char *var) { char buffer[12]; - if (xchat_get_pluginpref_str (pl, var, buffer)) + if (xchat_pluginpref_get_str (pl, var, buffer)) { return atoi (buffer); } @@ -1784,7 +1785,13 @@ xchat_get_pluginpref_int (xchat_plugin *pl, const char *var) } int -xchat_del_pluginpref (xchat_plugin *pl, const char *var) +xchat_pluginpref_delete (xchat_plugin *pl, const char *var) { - return xchat_set_pluginpref_str_real (pl, var, 0, 0); + return xchat_pluginpref_set_str_real (pl, var, 0, 0); } + +int +xchat_pluginpref_list (char* dest) +{ + return 0; +} \ No newline at end of file diff --git a/src/common/plugin.h b/src/common/plugin.h index bb86f0a3..8c347d51 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -98,19 +98,21 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_pluginpref_str) (xchat_plugin *ph, + int (*xchat_pluginpref_set_str) (xchat_plugin *ph, const char *var, const char *value); - int (*xchat_get_pluginpref_str) (xchat_plugin *ph, + int (*xchat_pluginpref_get_str) (xchat_plugin *ph, const char *var, char *dest); - int (*xchat_set_pluginpref_int) (xchat_plugin *ph, + int (*xchat_pluginpref_set_int) (xchat_plugin *ph, const char *var, int value); - int (*xchat_get_pluginpref_int) (xchat_plugin *ph, + int (*xchat_pluginpref_get_int) (xchat_plugin *ph, const char *var); - int (*xchat_del_pluginpref) (xchat_plugin *ph, + int (*xchat_pluginpref_delete) (xchat_plugin *ph, const char *var); + int (*xchat_pluginpref_list) (xchat_plugin *ph, + char *dest); void *(*xchat_dummy4) (xchat_plugin *ph); void *(*xchat_dummy3) (xchat_plugin *ph); void *(*xchat_dummy2) (xchat_plugin *ph); diff --git a/src/common/xchat-plugin.h b/src/common/xchat-plugin.h index 373c664e..1b7da8fb 100644 --- a/src/common/xchat-plugin.h +++ b/src/common/xchat-plugin.h @@ -137,19 +137,21 @@ struct _xchat_plugin int flags); void (*xchat_free) (xchat_plugin *ph, void *ptr); - int (*xchat_set_pluginpref_str) (xchat_plugin *ph, + int (*xchat_pluginpref_set_str) (xchat_plugin *ph, const char *var, const char *value); - int (*xchat_get_pluginpref_str) (xchat_plugin *ph, + int (*xchat_pluginpref_get_str) (xchat_plugin *ph, const char *var, char *dest); - int (*xchat_set_pluginpref_int) (xchat_plugin *ph, + int (*xchat_pluginpref_set_int) (xchat_plugin *ph, const char *var, int value); - int (*xchat_get_pluginpref_int) (xchat_plugin *ph, + int (*xchat_pluginpref_get_int) (xchat_plugin *ph, const char *var); - int (*xchat_del_pluginpref) (xchat_plugin *ph, + int (*xchat_pluginpref_delete) (xchat_plugin *ph, const char *var); + int (*xchat_pluginpref_list) (xchat_plugin *ph, + char *dest); }; #endif @@ -306,27 +308,31 @@ xchat_free (xchat_plugin *ph, void *ptr); int -xchat_set_pluginpref_str (xchat_plugin *ph, +xchat_pluginpref_set_str (xchat_plugin *ph, const char *var, const char *value); int -xchat_get_pluginpref_str (xchat_plugin *ph, +xchat_pluginpref_get_str (xchat_plugin *ph, const char *var, char *dest); int -xchat_set_pluginpref_int (xchat_plugin *ph, +xchat_pluginpref_set_int (xchat_plugin *ph, const char *var, int value); int -xchat_get_pluginpref_int (xchat_plugin *ph, +xchat_pluginpref_get_int (xchat_plugin *ph, const char *var); int -xchat_del_pluginpref (xchat_plugin *ph, +xchat_pluginpref_delete (xchat_plugin *ph, const char *var); +int +xchat_pluginpref_list (xchat_plugin *ph, + char *dest); + #if !defined(PLUGIN_C) && defined(WIN32) #ifndef XCHAT_PLUGIN_HANDLE #define XCHAT_PLUGIN_HANDLE (ph) @@ -361,11 +367,12 @@ xchat_del_pluginpref (xchat_plugin *ph, #define xchat_send_modes ((XCHAT_PLUGIN_HANDLE)->xchat_send_modes) #define xchat_strip ((XCHAT_PLUGIN_HANDLE)->xchat_strip) #define xchat_free ((XCHAT_PLUGIN_HANDLE)->xchat_free) -#define xchat_set_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_str) -#define xchat_get_pluginpref_str ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_str) -#define xchat_set_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_set_pluginpref_int) -#define xchat_get_pluginpref_int ((XCHAT_PLUGIN_HANDLE)->xchat_get_pluginpref_int) -#define xchat_del_pluginpref ((XCHAT_PLUGIN_HANDLE)->xchat_del_pluginpref) +#define xchat_pluginpref_set_str ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_set_str) +#define xchat_pluginpref_get_str ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_get_str) +#define xchat_pluginpref_set_int ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_set_int) +#define xchat_pluginpref_get_int ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_get_int) +#define xchat_pluginpref_delete ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_delete) +#define xchat_pluginpref_list ((XCHAT_PLUGIN_HANDLE)->xchat_pluginpref_list) #endif #ifdef __cplusplus diff --git a/src/version-script b/src/version-script index fe04dd46..4441aeae 100644 --- a/src/version-script +++ b/src/version-script @@ -30,10 +30,11 @@ EXPORTED { xchat_send_modes; xchat_strip; xchat_free; - xchat_set_pluginpref_str; - xchat_get_pluginpref_str; - xchat_set_pluginpref_int; - xchat_get_pluginpref_int; - xchat_del_pluginpref; + xchat_pluginpref_set_str; + xchat_pluginpref_get_str; + xchat_pluginpref_set_int; + xchat_pluginpref_get_int; + xchat_pluginpref_delete; + xchat_pluginpref_list; local: *; }; -- cgit 1.4.1 From 5c30b848915c77ae8a78bc08df8483e397fe3409 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 15 Jan 2012 21:15:14 +0100 Subject: implement xchat_pluginpref_list --- src/common/plugin.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index cff8d49b..d4f7edc0 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1791,7 +1791,36 @@ xchat_pluginpref_delete (xchat_plugin *pl, const char *var) } int -xchat_pluginpref_list (char* dest) +xchat_pluginpref_list (xchat_plugin *pl, char* dest) { - return 0; -} \ No newline at end of file + FILE *fpIn; + char confname[64]; + char buffer[512]; /* the same as in cfg_put_str */ + char buffer2[512]; + char *token; + + token = g_strdup (pl->name); + canonalize_key (token); + sprintf (confname, "plugin_%s.conf", token); + g_free (token); + + fpIn = xchat_fopen_file (confname, "r", 0); + + if (fpIn == NULL) /* no existing config file, no parsing */ + { + return 0; + } + else /* existing config file, get list of settings */ + { + while (fscanf (fpIn, " %[^\n]", &buffer) != EOF) /* read whole lines including whitespaces */ + { + token = strtok (buffer, "="); + strncat (dest, token, strlen (token) - 1); + strcat (dest, ","); + } + + fclose (fpIn); + } + + return 1; +} -- cgit 1.4.1 From 6d8d9c335d7d76df6d7209d55aa83c3daa4d4a05 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 15 Jan 2012 22:08:14 +0100 Subject: avoid garbage in xchat_pluginpref_list --- src/common/plugin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index d4f7edc0..b37c59e2 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1795,7 +1795,7 @@ xchat_pluginpref_list (xchat_plugin *pl, char* dest) { FILE *fpIn; char confname[64]; - char buffer[512]; /* the same as in cfg_put_str */ + char buffer[512]; /* the same as in cfg_put_str */ char buffer2[512]; char *token; @@ -1806,12 +1806,13 @@ xchat_pluginpref_list (xchat_plugin *pl, char* dest) fpIn = xchat_fopen_file (confname, "r", 0); - if (fpIn == NULL) /* no existing config file, no parsing */ + if (fpIn == NULL) /* no existing config file, no parsing */ { return 0; } - else /* existing config file, get list of settings */ + else /* existing config file, get list of settings */ { + strcpy (dest, ""); /* clean up garbage */ while (fscanf (fpIn, " %[^\n]", &buffer) != EOF) /* read whole lines including whitespaces */ { token = strtok (buffer, "="); -- cgit 1.4.1 From ffdd106588854aa66cdad1ad4bbac980b96df967 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 15 Jan 2012 23:12:37 +0100 Subject: remove unused buffer --- src/common/plugin.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/common/plugin.c b/src/common/plugin.c index b37c59e2..2e81c1f1 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1796,7 +1796,6 @@ xchat_pluginpref_list (xchat_plugin *pl, char* dest) FILE *fpIn; char confname[64]; char buffer[512]; /* the same as in cfg_put_str */ - char buffer2[512]; char *token; token = g_strdup (pl->name); -- cgit 1.4.1 From a9fb6a18ecaff6b2f39a4710677385557af15924 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 20 Jan 2012 00:38:57 +0100 Subject: initial patch for filtering malicious characters on win32 (Khisanth) --- src/common/server.c | 17 +++++++++++++++++ src/common/text.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- src/common/text.h | 3 +++ 3 files changed, 70 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/server.c b/src/common/server.c index cdd67cda..53e877e3 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -310,6 +310,11 @@ server_inline (server *serv, char *line, int len) { char *utf_line_allocated = NULL; +#ifdef WIN32 + char *cleaned_line; + int cleaned_len; +#endif + /* Checks whether we're set to use UTF-8 charset */ if (serv->using_irc || /* 1. using CP1252/UTF-8 Hybrid */ (serv->encoding == NULL && prefs.utf8_locale) || /* OR 2. using system default->UTF-8 */ @@ -396,12 +401,24 @@ server_inline (server *serv, char *line, int len) } } +#ifdef WIN32 + cleaned_line = text_replace_non_bmp (line, len, &cleaned_len); + if (cleaned_line != NULL ) { + line = cleaned_line; + len = cleaned_len; + } +#endif + fe_add_rawlog (serv, line, len, FALSE); url_check_line (line, len); /* let proto-irc.c handle it */ serv->p_inline (serv, line, len); +#ifdef WIN32 + g_free (cleaned_line); +#endif + if (utf_line_allocated != NULL) /* only if a special copy was allocated */ g_free (utf_line_allocated); } diff --git a/src/common/text.c b/src/common/text.c index 9aa1bc85..93392d1a 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -275,7 +275,10 @@ scrollback_load (session *sess) time_t stamp; int lines; -#ifndef WIN32 +#ifdef WIN32 + char *cleaned_text; + int cleaned_len; +#else char *map, *end_map; struct stat statbuf; const char *begin, *eol; @@ -371,6 +374,12 @@ scrollback_load (session *sess) if (text) { text = strip_color (text + 1, -1, STRIP_COLOR); + cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); + if (cleaned_text != NULL) + { + g_free (text); + text = cleaned_text; + } fe_print_text (sess, text, stamp); g_free (text); } @@ -852,6 +861,46 @@ iso_8859_1_to_utf8 (unsigned char *text, int len, gsize *bytes_written) return res; } +#ifdef WIN32 +/* replace characters outside of the Basic Multilingual Plane with + * replacement characters (0xFFFD) */ +char * +text_replace_non_bmp (char *utf8_input, int input_length, glong *output_length) +{ + gunichar *ucs4_text; + gunichar suspect; + gchar *utf8_text; + glong ucs4_length; + glong index; + + ucs4_text = g_utf8_to_ucs4_fast (utf8_input, input_length, &ucs4_length); + + /* replace anything not in the Basic Multilingual Plane + * (code points above 0xFFFF) with the replacement + * character */ + for (index = 0; index < ucs4_length; index++) + { + suspect = ucs4_text[index]; + if ((suspect >= 0x1D173 && suspect <= 0x1D17A) + || (suspect >= 0xE0001 && suspect <= 0xE007F)) + { + ucs4_text[index] = 0xFFFD; /* replacement character */ + } + } + + utf8_text = g_ucs4_to_utf8 ( + ucs4_text, + ucs4_length, + NULL, + output_length, + NULL + ); + g_free (ucs4_text); + + return utf8_text; +} +#endif + char * text_validate (char **text, int *len) { diff --git a/src/common/text.h b/src/common/text.h index 150821ae..6d5ac03e 100644 --- a/src/common/text.h +++ b/src/common/text.h @@ -28,6 +28,9 @@ int pevent_load (char *filename); void pevent_make_pntevts (void); void text_emit (int index, session *sess, char *a, char *b, char *c, char *d); int text_emit_by_name (char *name, session *sess, char *a, char *b, char *c, char *d); +#ifdef WIN32 +char *text_replace_non_bmp (char *utf8_input, int input_length, glong *output_length); +#endif char *text_validate (char **text, int *len); int get_stamp_str (char *fmt, time_t tim, char **ret); void format_event (session *sess, int index, char **args, char *o, int sizeofo, unsigned int stripcolor_args); -- cgit 1.4.1 From c1ec6d1039317342ed339f2ca1b52e2f4f3b07d3 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 20 Jan 2012 01:31:53 +0100 Subject: allow for disabling the filtering mechanism --- src/common/cfgfiles.c | 4 ++++ src/common/server.c | 11 +++++++---- src/common/text.c | 11 +++++++---- src/common/xchat.h | 1 + src/fe-gtk/setup.c | 4 ++++ 5 files changed, 23 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 130ad9d9..47d615e0 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -581,6 +581,9 @@ const struct prefs vars[] = { {"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL}, {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, {"text_max_lines", P_OFFINT (max_lines), TYPE_INT}, +#ifdef WIN32 + {"text_nonbmp", P_OFFINT (text_nonbmp), TYPE_BOOL}, +#endif {"text_replay", P_OFFINT (text_replay), TYPE_BOOL}, {"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL}, {"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL}, @@ -714,6 +717,7 @@ load_config (void) prefs.autodccsend = 2; /* browse mode */ #ifdef WIN32 prefs.identd = 1; + prefs.text_nonbmp = 1; #endif strcpy (prefs.gui_license, ""); strcpy (prefs.spell_langs, g_getenv ("LC_ALL") ? g_getenv ("LC_ALL") : "en_US"); diff --git a/src/common/server.c b/src/common/server.c index 53e877e3..fb50cc8a 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -402,10 +402,13 @@ server_inline (server *serv, char *line, int len) } #ifdef WIN32 - cleaned_line = text_replace_non_bmp (line, len, &cleaned_len); - if (cleaned_line != NULL ) { - line = cleaned_line; - len = cleaned_len; + if (prefs.text_nonbmp) + { + cleaned_line = text_replace_non_bmp (line, len, &cleaned_len); + if (cleaned_line != NULL ) { + line = cleaned_line; + len = cleaned_len; + } } #endif diff --git a/src/common/text.c b/src/common/text.c index 93392d1a..64102908 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -374,11 +374,14 @@ scrollback_load (session *sess) if (text) { text = strip_color (text + 1, -1, STRIP_COLOR); - cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); - if (cleaned_text != NULL) + if (prefs.text_nonbmp) { - g_free (text); - text = cleaned_text; + cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); + if (cleaned_text != NULL) + { + g_free (text); + text = cleaned_text; + } } fe_print_text (sess, text, stamp); g_free (text); diff --git a/src/common/xchat.h b/src/common/xchat.h index 6815cc39..ba9040ca 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -307,6 +307,7 @@ struct xchatprefs unsigned int emoticons; unsigned int tab_icons; unsigned int tab_xp; + unsigned int text_nonbmp; #endif unsigned int ctcp_number_limit; /*flood */ diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index cce85d30..bf100570 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -407,6 +407,9 @@ static const setting advanced_settings[] = {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(raw_modes), 0, 0, 0}, {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, +#ifdef WIN32 + {ST_TOGGLE, N_("Sanitize exotic characters causing crashes"), P_OFFINTNL(text_nonbmp), 0, 0, 0}, +#endif {ST_ENTRY, N_("License Text:"), P_OFFSETNL(gui_license), 0, 0, sizeof prefs.gui_license}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0}, @@ -425,6 +428,7 @@ static const setting advanced_settings_oneinstance[] = {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, {ST_TOGGLE, N_("Allow only one instance of XChat to run"), P_OFFINTNL(gui_one_instance), 0, 0, 0}, + {ST_TOGGLE, N_("Sanitize exotic characters causing crashes"), P_OFFINTNL(text_nonbmp), 0, 0, 0}, {ST_ENTRY, N_("License Text:"), P_OFFSETNL(gui_license), 0, 0, sizeof prefs.gui_license}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0}, -- cgit 1.4.1 From 3563acdb0d87d88733c967f8ac920877b8b4a1eb Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 20 Jan 2012 01:47:01 +0100 Subject: Revert "allow for disabling the filtering mechanism" This reverts commit c1ec6d1039317342ed339f2ca1b52e2f4f3b07d3. --- src/common/cfgfiles.c | 4 ---- src/common/server.c | 11 ++++------- src/common/text.c | 11 ++++------- src/common/xchat.h | 1 - src/fe-gtk/setup.c | 4 ---- 5 files changed, 8 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 47d615e0..130ad9d9 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -581,9 +581,6 @@ const struct prefs vars[] = { {"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL}, {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, {"text_max_lines", P_OFFINT (max_lines), TYPE_INT}, -#ifdef WIN32 - {"text_nonbmp", P_OFFINT (text_nonbmp), TYPE_BOOL}, -#endif {"text_replay", P_OFFINT (text_replay), TYPE_BOOL}, {"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL}, {"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL}, @@ -717,7 +714,6 @@ load_config (void) prefs.autodccsend = 2; /* browse mode */ #ifdef WIN32 prefs.identd = 1; - prefs.text_nonbmp = 1; #endif strcpy (prefs.gui_license, ""); strcpy (prefs.spell_langs, g_getenv ("LC_ALL") ? g_getenv ("LC_ALL") : "en_US"); diff --git a/src/common/server.c b/src/common/server.c index fb50cc8a..53e877e3 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -402,13 +402,10 @@ server_inline (server *serv, char *line, int len) } #ifdef WIN32 - if (prefs.text_nonbmp) - { - cleaned_line = text_replace_non_bmp (line, len, &cleaned_len); - if (cleaned_line != NULL ) { - line = cleaned_line; - len = cleaned_len; - } + cleaned_line = text_replace_non_bmp (line, len, &cleaned_len); + if (cleaned_line != NULL ) { + line = cleaned_line; + len = cleaned_len; } #endif diff --git a/src/common/text.c b/src/common/text.c index 64102908..93392d1a 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -374,14 +374,11 @@ scrollback_load (session *sess) if (text) { text = strip_color (text + 1, -1, STRIP_COLOR); - if (prefs.text_nonbmp) + cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); + if (cleaned_text != NULL) { - cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); - if (cleaned_text != NULL) - { - g_free (text); - text = cleaned_text; - } + g_free (text); + text = cleaned_text; } fe_print_text (sess, text, stamp); g_free (text); diff --git a/src/common/xchat.h b/src/common/xchat.h index ba9040ca..6815cc39 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -307,7 +307,6 @@ struct xchatprefs unsigned int emoticons; unsigned int tab_icons; unsigned int tab_xp; - unsigned int text_nonbmp; #endif unsigned int ctcp_number_limit; /*flood */ diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index bf100570..cce85d30 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -407,9 +407,6 @@ static const setting advanced_settings[] = {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(raw_modes), 0, 0, 0}, {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, -#ifdef WIN32 - {ST_TOGGLE, N_("Sanitize exotic characters causing crashes"), P_OFFINTNL(text_nonbmp), 0, 0, 0}, -#endif {ST_ENTRY, N_("License Text:"), P_OFFSETNL(gui_license), 0, 0, sizeof prefs.gui_license}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0}, @@ -428,7 +425,6 @@ static const setting advanced_settings_oneinstance[] = {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, {ST_TOGGLE, N_("Allow only one instance of XChat to run"), P_OFFINTNL(gui_one_instance), 0, 0, 0}, - {ST_TOGGLE, N_("Sanitize exotic characters causing crashes"), P_OFFINTNL(text_nonbmp), 0, 0, 0}, {ST_ENTRY, N_("License Text:"), P_OFFSETNL(gui_license), 0, 0, sizeof prefs.gui_license}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0}, -- cgit 1.4.1 From 7aecdd300972acbe86c7a01b5f1ed80a7a26123a Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 30 Jan 2012 14:37:07 +0100 Subject: avoid confusion about strftime --- src/fe-gtk/setup.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index cce85d30..497d012d 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -120,7 +120,11 @@ static const setting textbox_settings[] = {ST_HEADER, N_("Time Stamps"),0,0,0}, {ST_TOGGLE, N_("Enable time stamps"), P_OFFINTNL(timestamp),0,0,2}, {ST_ENTRY, N_("Time stamp format:"), P_OFFSETNL(stamp_format), - N_("See strftime manpage for details."),0,sizeof prefs.stamp_format}, +#ifdef WIN32 + N_("See the strftime MSDN article for details."),0,sizeof prefs.stamp_format}, +#else + N_("See the strftime manpage for details."),0,sizeof prefs.stamp_format}, +#endif {ST_HEADER, N_("Auto-Copy Behavior"),0,0,0}, {ST_TOGGLE, N_("Automatically copy selected text"), P_OFFINTNL(autocopy_text), -- cgit 1.4.1 From 99b9c1f0b20d2ed896cb930c0213e0d6f28a5b10 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 1 Feb 2012 18:09:27 +0100 Subject: IPv6 support for XChat (Olipro) --- src/common/identd.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++- src/common/identd.h | 1 + src/common/makefile.mak | 1 + src/common/server.c | 2 +- 4 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 src/common/identd.h (limited to 'src') diff --git a/src/common/identd.c b/src/common/identd.c index 919282ea..430c7e8f 100644 --- a/src/common/identd.c +++ b/src/common/identd.c @@ -1,8 +1,13 @@ /* simple identd server for xchat under win32 */ +#include "inet.h" +#include "xchat.h" +#include "xchatc.h" static int identd_is_running = FALSE; - +#ifdef USE_IPV6 +static int identd_ipv6_is_running = FALSE; +#endif static int identd (char *username) @@ -75,11 +80,102 @@ identd (char *username) return 0; } -static void +#ifdef USE_IPV6 +static int +identd_ipv6 (char *username) +{ + int sok, read_sok, len; + char *p; + char buf[256]; + char outbuf[256]; + char ipv6buf[60]; + DWORD ipv6buflen = sizeof (ipv6buf); + struct sockaddr_in6 addr; + + sok = socket (AF_INET6, SOCK_STREAM, 0); + + if (sok == INVALID_SOCKET) + { + free (username); + return 0; + } + + len = 1; + setsockopt (sok, SOL_SOCKET, SO_REUSEADDR, (char *) &len, sizeof (len)); + + memset (&addr, 0, sizeof (addr)); + addr.sin6_family = AF_INET6; + addr.sin6_port = htons (113); + + if (bind (sok, (struct sockaddr *) &addr, sizeof (addr)) == SOCKET_ERROR) + { + closesocket (sok); + free (username); + return 0; + } + + if (listen (sok, 1) == SOCKET_ERROR) + { + closesocket (sok); + free (username); + return 0; + } + + len = sizeof (addr); + read_sok = accept (sok, (struct sockaddr *) &addr, &len); + closesocket (sok); + + if (read_sok == INVALID_SOCKET) + { + free (username); + return 0; + } + + identd_ipv6_is_running = FALSE; + + if (WSAAddressToString ((struct sockaddr *) &addr, sizeof (addr), NULL, &ipv6buf, &ipv6buflen) == SOCKET_ERROR) + { + snprintf (ipv6buf, sizeof (ipv6buf) - 1, "[SOCKET ERROR: 0x%X]", WSAGetLastError ()); + } + + snprintf (outbuf, sizeof (outbuf), "%%\tServicing ident request from %s\n", ipv6buf); + PrintText (current_sess, outbuf); + + recv (read_sok, buf, sizeof (buf) - 1, 0); + buf[sizeof (buf) - 1] = 0; /* ensure null termination */ + + p = strchr (buf, ','); + + if (p) + { + snprintf (outbuf, sizeof (outbuf) - 1, "%d, %d : USERID : UNIX : %s\r\n", atoi (buf), atoi (p + 1), username); + outbuf[sizeof (outbuf) - 1] = 0; /* ensure null termination */ + send (read_sok, outbuf, strlen (outbuf), 0); + } + + sleep (1); + closesocket (read_sok); + free (username); + + return 0; +} +#endif + +void identd_start (char *username) { DWORD tid; +#ifdef USE_IPV6 + DWORD tidv6; + if (identd_ipv6_is_running == FALSE) + { + identd_ipv6_is_running = TRUE; + CloseHandle (CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) identd_ipv6, + strdup (username), 0, &tidv6)); + } +#endif + if (identd_is_running == FALSE) { identd_is_running = TRUE; diff --git a/src/common/identd.h b/src/common/identd.h new file mode 100644 index 00000000..636f9641 --- /dev/null +++ b/src/common/identd.h @@ -0,0 +1 @@ +void identd_start (char *username); diff --git a/src/common/makefile.mak b/src/common/makefile.mak index f78a6d8d..d6df2608 100644 --- a/src/common/makefile.mak +++ b/src/common/makefile.mak @@ -7,6 +7,7 @@ ctcp.obj \ dcc.obj \ dirent-win32.obj \ history.obj \ +identd.obj \ ignore.obj \ inbound.obj \ modes.obj \ diff --git a/src/common/server.c b/src/common/server.c index 53e877e3..75b2e005 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -67,7 +67,7 @@ #endif #ifdef WIN32 -#include "identd.c" +#include "identd.h" #endif #ifdef USE_LIBPROXY -- cgit 1.4.1 From a6230d9e00bf55725195572094bb7f1372cc93a8 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 4 Feb 2012 16:23:02 +0100 Subject: fix compilation error on Linux due to bad merge --- src/common/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/server.c b/src/common/server.c index 75b2e005..657030ba 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -1511,7 +1511,7 @@ server_child (server * serv) if (FALSE) ; #ifdef USE_LIBPROXY - } else if (prefs.proxy_type == 5) + else if (prefs.proxy_type == 5) { char **proxy_list; char *url, *proxy; -- cgit 1.4.1 From 77ca8de9b3fd241e3191441a5cbde69fad2bf375 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 15 Feb 2012 22:56:52 +0100 Subject: provide a GUI field for alternative fonts, pango.aliases replacement --- src/common/cfgfiles.c | 11 +++++++++++ src/common/xchat.h | 6 ++++++ src/fe-gtk/setup.c | 23 +++++++++++++++++++++++ 3 files changed, 40 insertions(+) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 130ad9d9..da4adbd3 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -36,6 +36,9 @@ #endif #define DEF_FONT "Monospace 9" +#ifdef WIN32 +#define DEF_FONT_ALTER "Arial Unicode MS,Lucida Sans Unicode" +#endif void list_addentry (GSList ** list, char *cmd, char *name) @@ -578,6 +581,10 @@ const struct prefs vars[] = { {"text_emoticons", P_OFFINT (emoticons), TYPE_BOOL}, #endif {"text_font", P_OFFSET (font_normal), TYPE_STR}, +#ifdef WIN32 + {"text_font_main", P_OFFSET (font_main), TYPE_STR}, + {"text_font_alternative", P_OFFSET (font_alternative), TYPE_STR}, +#endif {"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL}, {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, {"text_max_lines", P_OFFINT (max_lines), TYPE_INT}, @@ -749,6 +756,10 @@ load_config (void) strcpy (prefs.quitreason, _("Leaving")); strcpy (prefs.partreason, prefs.quitreason); strcpy (prefs.font_normal, DEF_FONT); +#ifdef WIN32 + strcpy (prefs.font_main, DEF_FONT); + strcpy (prefs.font_alternative, DEF_FONT_ALTER); +#endif strcpy (prefs.dnsprogram, "host"); strcpy (prefs.irc_no_hilight, "NickServ,ChanServ"); diff --git a/src/common/xchat.h b/src/common/xchat.h index 6815cc39..dbffb900 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -115,7 +115,13 @@ struct xchatprefs char awayreason[256]; char quitreason[256]; char partreason[256]; +#ifdef WIN32 + char font_normal[4 * FONTNAMELEN + 1]; + char font_main[FONTNAMELEN + 1]; + char font_alternative[3 * FONTNAMELEN + 1]; +#else char font_normal[FONTNAMELEN + 1]; +#endif char doubleclickuser[256]; char gui_license[64]; char spell_langs[64]; diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 497d012d..243ebfbf 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -102,7 +102,12 @@ typedef struct static const setting textbox_settings[] = { {ST_HEADER, N_("Text Box Appearance"),0,0,0}, +#ifdef WIN32 + {ST_EFONT, N_("Main font:"), P_OFFSETNL(font_main), 0, 0, sizeof prefs.font_main}, + {ST_ENTRY, N_("Alternative fonts:"), P_OFFSETNL(font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.font_alternative}, +#else {ST_EFONT, N_("Font:"), P_OFFSETNL(font_normal), 0, 0, sizeof prefs.font_normal}, +#endif {ST_EFILE, N_("Background image:"), P_OFFSETNL(background), 0, 0, sizeof prefs.background}, {ST_NUMBER, N_("Scrollback lines:"), P_OFFINTNL(max_lines),0,0,100000}, {ST_TOGGLE, N_("Colored nick names"), P_OFFINTNL(colorednicks), @@ -2056,6 +2061,11 @@ setup_apply_real (int new_pix, int do_ulist, int do_layout) static void setup_apply (struct xchatprefs *pr) { +#ifdef WIN32 + PangoFontDescription *old_desc; + PangoFontDescription *new_desc; + char buffer[4 * FONTNAMELEN + 1]; +#endif int new_pix = FALSE; int noapply = FALSE; int do_ulist = FALSE; @@ -2099,6 +2109,19 @@ setup_apply (struct xchatprefs *pr) memcpy (&prefs, pr, sizeof (prefs)); +#ifdef WIN32 /* merge font_main and font_alternative into font_normal */ + old_desc = pango_font_description_from_string (prefs.font_main); + sprintf (buffer, "%s,%s", pango_font_description_get_family (old_desc), prefs.font_alternative); + new_desc = pango_font_description_from_string (buffer); + pango_font_description_set_weight (new_desc, pango_font_description_get_weight (old_desc)); + pango_font_description_set_style (new_desc, pango_font_description_get_style (old_desc)); + pango_font_description_set_size (new_desc, pango_font_description_get_size (old_desc)); + sprintf (prefs.font_normal, "%s", pango_font_description_to_string (new_desc)); + + g_free (old_desc); + g_free (new_desc); +#endif + setup_apply_real (new_pix, do_ulist, do_layout); if (noapply) -- cgit 1.4.1 From fc3d4d31f01a639972faf5fd5f85fc6602f53c1b Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 16 Feb 2012 00:43:12 +0100 Subject: avoid unnecessary g_free() calls --- src/fe-gtk/setup.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 243ebfbf..63cc0d30 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -2118,8 +2118,10 @@ setup_apply (struct xchatprefs *pr) pango_font_description_set_size (new_desc, pango_font_description_get_size (old_desc)); sprintf (prefs.font_normal, "%s", pango_font_description_to_string (new_desc)); + /* FIXME this is not required after pango_font_description_from_string() g_free (old_desc); g_free (new_desc); + */ #endif setup_apply_real (new_pix, do_ulist, do_layout); -- cgit 1.4.1 From 0ac0510be0270cde636bbd8c590ef9fbda9d90ef Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 16 Feb 2012 17:21:15 +0100 Subject: fix for time stamp format crashes --- src/common/text.c | 7 +++++++ src/fe-gtk/setup.c | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/text.c b/src/common/text.c index 93392d1a..f8afc4b3 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -686,6 +686,13 @@ get_stamp_str (char *fmt, time_t tim, char **ret) } len = strftime (dest, sizeof (dest), fmt, localtime (&tim)); +#ifdef WIN32 + if (!len) + { + /* use failsafe format until a correct one is specified */ + len = strftime (dest, sizeof (dest), "[%H:%M]", localtime (&tim)); + } +#endif if (len) { if (prefs.utf8_locale) diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 63cc0d30..f6acd5d6 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -455,7 +455,11 @@ static const setting logging_settings[] = {ST_HEADER, N_("Time Stamps"),0,0,0}, {ST_TOGGLE, N_("Insert timestamps in logs"), P_OFFINTNL(timestamp_logs), 0, 0, 2}, {ST_ENTRY, N_("Log timestamp format:"), P_OFFSETNL(timestamp_log_format), 0, 0, sizeof prefs.timestamp_log_format}, - {ST_LABEL, N_("See strftime manpage for details.")}, +#ifdef WIN32 + {ST_LABEL, N_("See the strftime MSDN article for details.")}, +#else + {ST_LABEL, N_("See the strftime manpage for details.")}, +#endif {ST_END, 0, 0, 0, 0, 0} }; @@ -2065,6 +2069,7 @@ setup_apply (struct xchatprefs *pr) PangoFontDescription *old_desc; PangoFontDescription *new_desc; char buffer[4 * FONTNAMELEN + 1]; + time_t rawtime; #endif int new_pix = FALSE; int noapply = FALSE; @@ -2109,7 +2114,8 @@ setup_apply (struct xchatprefs *pr) memcpy (&prefs, pr, sizeof (prefs)); -#ifdef WIN32 /* merge font_main and font_alternative into font_normal */ +#ifdef WIN32 + /* merge font_main and font_alternative into font_normal */ old_desc = pango_font_description_from_string (prefs.font_main); sprintf (buffer, "%s,%s", pango_font_description_get_family (old_desc), prefs.font_alternative); new_desc = pango_font_description_from_string (buffer); @@ -2122,6 +2128,13 @@ setup_apply (struct xchatprefs *pr) g_free (old_desc); g_free (new_desc); */ + + /* workaround for strftime differences between POSIX and MSVC */ + time (&rawtime); + if(!strftime (buffer, sizeof (buffer), prefs.stamp_format, localtime (&rawtime)) || !strftime (buffer, sizeof (buffer), prefs.timestamp_log_format, localtime (&rawtime))) + { + fe_message (_("Invalid time stamp format! See the strftime MSDN article for details."), FE_MSG_ERROR); + } #endif setup_apply_real (new_pix, do_ulist, do_layout); -- cgit 1.4.1 From a27d2e4d0bb1d0926473b95d0a2c1d58955a7edc Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 16 Feb 2012 17:23:08 +0100 Subject: cosmetics --- src/fe-gtk/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index f6acd5d6..cec06b25 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -2131,7 +2131,8 @@ setup_apply (struct xchatprefs *pr) /* workaround for strftime differences between POSIX and MSVC */ time (&rawtime); - if(!strftime (buffer, sizeof (buffer), prefs.stamp_format, localtime (&rawtime)) || !strftime (buffer, sizeof (buffer), prefs.timestamp_log_format, localtime (&rawtime))) + + if (!strftime (buffer, sizeof (buffer), prefs.stamp_format, localtime (&rawtime)) || !strftime (buffer, sizeof (buffer), prefs.timestamp_log_format, localtime (&rawtime))) { fe_message (_("Invalid time stamp format! See the strftime MSDN article for details."), FE_MSG_ERROR); } -- cgit 1.4.1 From e3121eae6879a155aa59293b1c790822f5bd87df Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 16 Feb 2012 18:14:49 +0100 Subject: add some nice message to About --- src/fe-gtk/about.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index dc1cbf08..a77f7344 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -116,6 +116,7 @@ menu_about (GtkWidget * wid, gpointer sess) (snprintf) (buf, sizeof (buf), ""DISPLAY_NAME" "PACKAGE_VERSION"\n" #ifdef WIN32 + "Anniversary Release\n" "%s%s%s" "\nXChat Release: "XCHAT_RELEASE"\n\n" "OS: %s\n" -- cgit 1.4.1 From 2835b09fd22b70f5d2daa0bcc4f8b28f98ee1540 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Thu, 16 Feb 2012 18:24:04 +0100 Subject: Revert "add some nice message to About" This reverts commit e3121eae6879a155aa59293b1c790822f5bd87df. --- src/fe-gtk/about.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index a77f7344..dc1cbf08 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -116,7 +116,6 @@ menu_about (GtkWidget * wid, gpointer sess) (snprintf) (buf, sizeof (buf), ""DISPLAY_NAME" "PACKAGE_VERSION"\n" #ifdef WIN32 - "Anniversary Release\n" "%s%s%s" "\nXChat Release: "XCHAT_RELEASE"\n\n" "OS: %s\n" -- cgit 1.4.1 From 1f62507fc0e5a771be07312a243aee8e35e210ea Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 16 May 2012 19:47:12 +0200 Subject: remove real name field from network list --- src/fe-gtk/servlistgui.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/servlistgui.c b/src/fe-gtk/servlistgui.c index 2ac0e6c9..96feb5f4 100644 --- a/src/fe-gtk/servlistgui.c +++ b/src/fe-gtk/servlistgui.c @@ -61,7 +61,7 @@ static GtkWidget *entry_nick1; static GtkWidget *entry_nick2; static GtkWidget *entry_nick3; static GtkWidget *entry_guser; -static GtkWidget *entry_greal; +/* static GtkWidget *entry_greal; */ /* edit area */ static GtkWidget *edit_win; @@ -649,8 +649,8 @@ servlist_savegui (void) if (GTK_ENTRY (entry_guser)->text[0] == 0) return 1; - if (GTK_ENTRY (entry_greal)->text[0] == 0) - return 1; + /* if (GTK_ENTRY (entry_greal)->text[0] == 0) + return 1; */ strcpy (prefs.nick1, GTK_ENTRY (entry_nick1)->text); strcpy (prefs.nick2, GTK_ENTRY (entry_nick2)->text); @@ -659,7 +659,7 @@ servlist_savegui (void) sp = strchr (prefs.username, ' '); if (sp) sp[0] = 0; /* spaces will break the login */ - strcpy (prefs.realname, GTK_ENTRY (entry_greal)->text); + /* strcpy (prefs.realname, GTK_ENTRY (entry_greal)->text); */ servlist_save (); return 0; @@ -1624,12 +1624,12 @@ servlist_open_networks (void) GtkWidget *label4; GtkWidget *label5; GtkWidget *label6; - GtkWidget *label7; + /* GtkWidget *label7; */ GtkWidget *entry1; GtkWidget *entry2; GtkWidget *entry3; GtkWidget *entry4; - GtkWidget *entry5; + /* GtkWidget *entry5; */ GtkWidget *vbox2; GtkWidget *label1; GtkWidget *table4; @@ -1703,12 +1703,12 @@ servlist_open_networks (void) (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); - label7 = gtk_label_new_with_mnemonic (_("Rea_l name:")); + /* label7 = gtk_label_new_with_mnemonic (_("Rea_l name:")); gtk_widget_show (label7); gtk_table_attach (GTK_TABLE (table1), label7, 0, 1, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);*/ entry_nick1 = entry1 = gtk_entry_new (); gtk_entry_set_text (GTK_ENTRY (entry1), prefs.nick1); @@ -1738,12 +1738,12 @@ servlist_open_networks (void) (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); - entry_greal = entry5 = gtk_entry_new (); + /* entry_greal = entry5 = gtk_entry_new (); gtk_entry_set_text (GTK_ENTRY (entry5), prefs.realname); gtk_widget_show (entry5); gtk_table_attach (GTK_TABLE (table1), entry5, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); + (GtkAttachOptions) (0), 0, 0); */ vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox2); @@ -1882,7 +1882,7 @@ servlist_open_networks (void) gtk_label_set_mnemonic_widget (GTK_LABEL (label3), entry1); gtk_label_set_mnemonic_widget (GTK_LABEL (label6), entry4); - gtk_label_set_mnemonic_widget (GTK_LABEL (label7), entry5); + /* gtk_label_set_mnemonic_widget (GTK_LABEL (label7), entry5); */ gtk_widget_grab_focus (networks_tree); gtk_widget_grab_default (button_close); -- cgit 1.4.1 From a6cc734b3802846f6ffd1cb1123bf4ca978e6056 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 28 May 2012 23:17:09 +0200 Subject: Search window improvements (Richard Hitt) --- src/common/cfgfiles.c | 8 + src/common/xchat.h | 6 + src/fe-gtk/maingui.c | 7 +- src/fe-gtk/menu.c | 47 ++- src/fe-gtk/search.c | 120 ++++++-- src/fe-gtk/xtext.c | 800 +++++++++++++++++++++++++++++++++++++++++--------- src/fe-gtk/xtext.h | 19 +- 7 files changed, 850 insertions(+), 157 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 443538d2..6bbdb3f7 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -451,6 +451,7 @@ const struct prefs vars[] = { #endif {"gui_pane_left_size", P_OFFINT (gui_pane_left_size), TYPE_INT}, {"gui_pane_right_size", P_OFFINT (gui_pane_right_size), TYPE_INT}, + {"gui_pane_right_size_min", P_OFFINT (gui_pane_right_size_min), TYPE_INT}, {"gui_quit_dialog", P_OFFINT (gui_quit_dialog), TYPE_BOOL}, {"gui_slist_fav", P_OFFINT (slist_fav), TYPE_INT}, {"gui_slist_select", P_OFFINT (slist_select), TYPE_INT}, @@ -589,6 +590,11 @@ const struct prefs vars[] = { {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, {"text_max_lines", P_OFFINT (max_lines), TYPE_INT}, {"text_replay", P_OFFINT (text_replay), TYPE_BOOL}, + {"text_search_case_match", P_OFFINT (text_search_case_match), TYPE_BOOL}, + {"text_search_backward", P_OFFINT (text_search_backward), TYPE_BOOL}, + {"text_search_highlight_all", P_OFFINT (text_search_highlight_all), TYPE_BOOL}, + {"text_search_follow", P_OFFINT (text_search_follow), TYPE_BOOL}, + {"text_search_regexp", P_OFFINT (text_search_regexp), TYPE_BOOL}, {"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL}, {"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL}, {"text_spell_langs", P_OFFSET (spell_langs), TYPE_STR}, @@ -715,6 +721,7 @@ load_config (void) prefs.gui_tray = 1; prefs.gui_pane_left_size = 100; prefs.gui_pane_right_size = 100; + prefs.gui_pane_right_size_min = 80; prefs.mainwindow_save = 1; prefs.bantype = 2; prefs.input_balloon_time = 20; @@ -723,6 +730,7 @@ load_config (void) prefs.autodccsend = 2; /* browse mode */ prefs.url_grabber = 1; prefs.url_grabber_limit = 0; /* 0 means unlimited for backcompat */ + prefs.text_search_follow = 1; #ifdef WIN32 prefs.identd = 1; #endif diff --git a/src/common/xchat.h b/src/common/xchat.h index 95fb1324..9db44c3f 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -162,6 +162,7 @@ struct xchatprefs int gui_pane_left_size; int gui_pane_right_size; + int gui_pane_right_size_min; int gui_ulist_pos; int tab_pos; @@ -327,6 +328,11 @@ struct xchatprefs This is so that we continue using internal defaults (which can change in the next release) until the user edits them. */ unsigned int save_pevents:1; + unsigned int text_search_case_match; + unsigned int text_search_backward; + unsigned int text_search_highlight_all; + unsigned int text_search_follow; + unsigned int text_search_regexp; }; /* Session types */ diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 31f9fbc5..0b7f7c43 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -800,6 +800,9 @@ mg_userlist_showhide (session *sess, int show) { session_gui *gui = sess->gui; int handle_size; + int right_size; + + right_size = MAX (prefs.gui_pane_right_size, prefs.gui_pane_right_size_min); if (show) { @@ -807,7 +810,7 @@ mg_userlist_showhide (session *sess, int show) gui->ul_hidden = 0; gtk_widget_style_get (GTK_WIDGET (gui->hpane_right), "handle-size", &handle_size, NULL); - gtk_paned_set_position (GTK_PANED (gui->hpane_right), GTK_WIDGET (gui->hpane_right)->allocation.width - (prefs.gui_pane_right_size + handle_size)); + gtk_paned_set_position (GTK_PANED (gui->hpane_right), GTK_WIDGET (gui->hpane_right)->allocation.width - (right_size + handle_size)); } else { @@ -2848,7 +2851,7 @@ mg_create_entry (session *sess, GtkWidget *box) #else gui->input_box = entry = gtk_entry_new (); #endif - gtk_entry_set_max_length (GTK_ENTRY (gui->input_box), 2048); + gtk_entry_set_max_length (GTK_ENTRY (gui->input_box), 0); g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (mg_inputbox_cb), gui); gtk_container_add (GTK_CONTAINER (hbox), entry); diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index e6a5eca0..4760ba93 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1215,6 +1215,41 @@ menu_search () search_open (current_sess); } +static void +menu_search_next () +{ + GtkXText *xtext = GTK_XTEXT (current_sess->gui->xtext); + xtext_buffer *buf = xtext->buffer; + + if (!gtk_xtext_search (xtext, buf->search_text, + (buf->search_flags & (case_match | follow | regexp)), NULL)) + { + fe_message (_("Search hit end, not found."), FE_MSG_ERROR); + } +} + +static void +menu_search_prev () +{ + GtkXText *xtext = GTK_XTEXT (current_sess->gui->xtext); + xtext_buffer *buf = xtext->buffer; + + if (!gtk_xtext_search(xtext, buf->search_text, + (buf->search_flags & (case_match | follow | regexp) | backward), NULL)) + { + fe_message (_("Search hit end, not found."), FE_MSG_ERROR); + } +} + +static void +menu_search_reset () +{ + GtkXText *xtext = GTK_XTEXT (current_sess->gui->xtext); + xtext_buffer *buf = xtext->buffer; + + gtk_xtext_search (xtext, "", 0, NULL); +} + static void menu_resetmarker (GtkWidget * wid, gpointer none) { @@ -1675,11 +1710,17 @@ static struct mymenu mymenu[] = { {N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_m}, {N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_C}, {N_("C_lear Text"), menu_flushbuffer, GTK_STOCK_CLEAR, M_MENUSTOCK, 0, 0, 1, GDK_l}, -#define SEARCH_OFFSET 68 - {N_("Search Text..."), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_f}, {N_("Save Text..."), menu_savebuffer, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, +#define SEARCH_OFFSET 70 + {N_("Search"), 0, GTK_STOCK_JUSTIFY_LEFT, M_MENUSUB, 0, 0, 1}, + {N_("Search Text..."), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_f}, + {N_("Reset Search"), menu_search_reset, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_F}, + {N_("Search Next" ), menu_search_next, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_g}, + {N_("Search Previous" ), menu_search_prev, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_G}, + {0, 0, 0, M_END, 0, 0, 0}, + + {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 74 */ - {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 70 */ {N_("_Contents"), menu_docs, GTK_STOCK_HELP, M_MENUSTOCK, 0, 0, 1, GDK_F1}, #if 0 {N_("Check for updates"), menu_update, 0, M_MENUITEM, 0, 1}, diff --git a/src/fe-gtk/search.c b/src/fe-gtk/search.c index bbde9c5c..30ef266f 100644 --- a/src/fe-gtk/search.c +++ b/src/fe-gtk/search.c @@ -42,15 +42,20 @@ #include "xtext.h" #include "maingui.h" - -static textentry *last; /* our last search pos */ -static int case_match = 0; -static int search_backward = 0; - +GtkWidget *searchwin; static void search_search (session * sess, const gchar *text) { + gtk_xtext_search_flags flags; + textentry *last; + GError *err = NULL; + + flags = ((prefs.text_search_case_match == 1? case_match: 0) | + (prefs.text_search_backward == 1? backward: 0) | + (prefs.text_search_highlight_all == 1? highlight: 0) | + (prefs.text_search_follow == 1? follow: 0) | + (prefs.text_search_regexp == 1? regexp: 0)); if (!is_session (sess)) { fe_message (_("The window you opened this Search " @@ -58,10 +63,20 @@ search_search (session * sess, const gchar *text) return; } - last = gtk_xtext_search (GTK_XTEXT (sess->gui->xtext), text, - last, case_match, search_backward); - if (!last) + last = gtk_xtext_search (GTK_XTEXT (sess->gui->xtext), text, flags, &err); + if (text == NULL || text[0] == 0) + { + return; + } + if (err) + { + fe_message (_(err->message), FE_MSG_ERROR); + g_error_free (err); + } + else if (!last) + { fe_message (_("Search hit end, not found."), FE_MSG_ERROR); + } } static void @@ -79,6 +94,23 @@ static void search_close_cb (GtkWidget * button, GtkWidget * win) { gtk_widget_destroy (win); + searchwin = NULL; +} + +static void +search_reset_cb (GtkWidget * button, session * sess) +{ + search_search (sess, ""); + if (searchwin) + { + search_close_cb (button, searchwin); + } +} + +static void +search_cleanup_cb (GtkWidget * button, GtkWidget * win) +{ + searchwin = NULL; } static void @@ -98,13 +130,26 @@ search_key_cb (GtkWidget * window, GdkEventKey * key, gpointer userdata) static void search_caseign_cb (GtkToggleButton * but, session * sess) { - case_match = (but->active)? 1: 0; + prefs.text_search_case_match = (but->active)? 1: 0; } static void search_dirbwd_cb (GtkToggleButton * but, session * sess) { - search_backward = (but->active)? 1: 0; + prefs.text_search_backward = (but->active)? 1: 0; +} + +static void +search_regexp_cb (GtkToggleButton * but, session * sess) +{ + prefs.text_search_regexp = (but->active)? 1: 0; +} + +static void +search_highlight_cb (GtkToggleButton * but, session * sess) +{ + prefs.text_search_highlight_all = (but->active)? 1: 0; + search_search (sess, NULL); } void @@ -112,18 +157,21 @@ search_open (session * sess) { GtkWidget *win, *hbox, *vbox, *entry, *wid; - last = NULL; + if (searchwin) + { + gtk_widget_destroy (searchwin); + searchwin = NULL; + } win = mg_create_generic_tab ("search", _("XChat: Search"), TRUE, FALSE, - NULL, NULL, 0, 0, &vbox, 0); + search_cleanup_cb, NULL, 0, 0, &vbox, 0); gtk_container_set_border_width (GTK_CONTAINER (win), 12); gtk_box_set_spacing (GTK_BOX (vbox), 4); + /* First line: _____________________ _Find */ hbox = gtk_hbox_new (0, 10); gtk_container_add (GTK_CONTAINER (vbox), hbox); gtk_widget_show (hbox); - gtkutil_label_new (_("Find:"), hbox); - entry = gtk_entry_new (); g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (search_entry_cb), sess); @@ -131,29 +179,61 @@ search_open (session * sess) gtk_widget_show (entry); gtk_widget_grab_focus (entry); + wid = gtk_hbutton_box_new (); + gtk_container_add (GTK_CONTAINER (hbox), wid); + gtk_widget_show (wid); + wid = gtkutil_button (wid, GTK_STOCK_FIND, 0, search_find_cb, sess, + _("_Find")); + g_object_set_data (G_OBJECT (wid), "e", entry); + + /* Second line: X Match case */ wid = gtk_check_button_new_with_mnemonic (_("_Match case")); - GTK_TOGGLE_BUTTON (wid)->active = case_match; + GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_case_match; g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_caseign_cb), sess); gtk_container_add (GTK_CONTAINER (vbox), wid); + add_tip (wid, "Perform a case-sensitive search."); gtk_widget_show (wid); + /* Third line: X Search backwards */ wid = gtk_check_button_new_with_mnemonic (_("Search _backwards")); - GTK_TOGGLE_BUTTON (wid)->active = search_backward; + GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_backward; g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_dirbwd_cb), sess); gtk_container_add (GTK_CONTAINER (vbox), wid); + add_tip (wid, "Search from the newest text line to the oldest."); + gtk_widget_show (wid); + + /* Fourth line: X Highlight all */ + wid = gtk_check_button_new_with_mnemonic (_("_Highlight all")); + GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_highlight_all; + g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_highlight_cb), sess); + gtk_container_add (GTK_CONTAINER (vbox), wid); + add_tip (wid, "Highlight all occurrences, and underline the current occurrence."); gtk_widget_show (wid); + /* Fifth line: X Regular expression */ + wid = gtk_check_button_new_with_mnemonic (_("R_egular expression")); + GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_regexp; + g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_regexp_cb), sess); + gtk_container_add (GTK_CONTAINER (vbox), wid); + add_tip (wid, "Regard search string as a regular expression."); + gtk_widget_show (wid); + + /* Sixth line: _Close Close and _Reset */ hbox = gtk_hbutton_box_new (); gtk_box_pack_start (GTK_BOX (vbox), hbox, 0, 0, 4); gtk_widget_show (hbox); - gtkutil_button (hbox, GTK_STOCK_CLOSE, 0, search_close_cb, win, + wid = gtkutil_button (hbox, GTK_STOCK_CLOSE, 0, search_close_cb, win, _("_Close")); - wid = gtkutil_button (hbox, GTK_STOCK_FIND, 0, search_find_cb, sess, - _("_Find")); - g_object_set_data (G_OBJECT (wid), "e", entry); + add_tip (wid, "Close this box, but continue searching new lines."); + wid = gtkutil_button (hbox, "gtk-reset", 0, search_reset_cb, sess, + _("Close and _Reset")); + add_tip (wid, "Close this box, reset highlighted search items, and stop searching new lines."); + /* Add recognition of the ESC key to close the box */ g_signal_connect (G_OBJECT (win), "key_press_event", G_CALLBACK (search_key_cb), win); + /* That's all, folks */ + searchwin = win; gtk_widget_show (win); } diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 3bc9b6a8..2899ba68 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -65,6 +65,11 @@ #include "mmx_cmod.h" #endif +#include "../common/xchat.h" +#include "../common/fe.h" +#include "../common/util.h" +#include "../common/xchatc.h" +#include "fe-gtk.h" #include "xtext.h" #include "../common/xchat.h" #include "../common/xchatc.h" @@ -92,6 +97,20 @@ static GtkWidgetClass *parent_class = NULL; +/* + * offsets_t is used for retaining search information. + * It is stored in the 'data' member of a GList, + * as chained from ent->marks. It saves starting and + * ending+1 offset of a found occurrence. + */ +typedef union offsets_u { + struct offsets_s { + guint16 start; + guint16 end; + } o; + guint32 u; +} offsets_t; + struct textentry { struct textentry *next; @@ -111,6 +130,7 @@ struct textentry guchar tag; guchar pad1; guchar pad2; /* 32-bit align : 44 bytes total */ + GList *marks; /* List of found strings */ }; enum @@ -149,11 +169,25 @@ static void gtk_xtext_recalc_widths (xtext_buffer *buf, int); static void gtk_xtext_fix_indent (xtext_buffer *buf); static int gtk_xtext_find_subline (GtkXText *xtext, textentry *ent, int line); static char *gtk_xtext_conv_color (unsigned char *text, int len, int *newlen); +/* For use by gtk_xtext_strip_color() and its callers -- */ +typedef union offlen_u { + struct offlen_s { + guint16 off; + guint16 len; + } o; + guint32 u; +} offlen_t; static unsigned char * gtk_xtext_strip_color (unsigned char *text, int len, unsigned char *outbuf, - int *newlen, int *mb_ret, int strip_hidden); + int *newlen, int *mb_ret, GSList **slp, int strip_hidden); static gboolean gtk_xtext_check_ent_visibility (GtkXText * xtext, textentry *find_ent, int add); static int gtk_xtext_render_page_timeout (GtkXText * xtext); +static int gtk_xtext_search_offset (xtext_buffer *buf, textentry *ent, unsigned int off); +static void gtk_xtext_search_textentry (xtext_buffer *, textentry *, int); +static void gtk_xtext_search_textentry_del (xtext_buffer *, textentry *); +static void gtk_xtext_search_textentry_fini (gpointer, gpointer); +static void gtk_xtext_search_fini (xtext_buffer *); +static gboolean gtk_xtext_search_init (xtext_buffer *buf, const gchar *text, gtk_xtext_search_flags flags, GError **perr); /* some utility functions first */ @@ -770,9 +804,8 @@ gtk_xtext_adjustment_set (xtext_buffer *buf, int fire_signal) if (adj->upper == 0) adj->upper = 1; - adj->page_size = - (GTK_WIDGET (buf->xtext)->allocation.height - - buf->xtext->font->descent) / buf->xtext->fontsize; + adj->page_size = GTK_WIDGET (buf->xtext)->allocation.height / + buf->xtext->fontsize; adj->page_increment = adj->page_size; if (adj->value > adj->upper - adj->page_size) @@ -1100,6 +1133,7 @@ gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation) xtext->avoid_trans = FALSE; + allocation->height = allocation->height / xtext->fontsize * xtext->fontsize; widget->allocation = *allocation; if (GTK_WIDGET_REALIZED (widget)) { @@ -1129,18 +1163,6 @@ gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation) } } -static void -gtk_xtext_selection_clear_full (xtext_buffer *buf) -{ - textentry *ent = buf->text_first; - while (ent) - { - ent->mark_start = -1; - ent->mark_end = -1; - ent = ent->next; - } -} - static int gtk_xtext_selection_clear (xtext_buffer *buf) { @@ -1724,13 +1746,6 @@ gtk_xtext_selection_draw (GtkXText * xtext, GdkEventMotion * event, gboolean ren offset_end = tmp; } - /* has the selection changed? Dont render unless necessary */ - if (xtext->buffer->last_ent_start == ent_start && - xtext->buffer->last_ent_end == ent_end && - xtext->buffer->last_offset_start == offset_start && - xtext->buffer->last_offset_end == offset_end) - return; - /* set all the old mark_ fields to -1 */ gtk_xtext_selection_clear (xtext->buffer); @@ -1760,10 +1775,24 @@ gtk_xtext_selection_draw (GtkXText * xtext, GdkEventMotion * event, gboolean ren gtk_xtext_selection_render (xtext, ent_start, offset_start, ent_end, offset_end); } +static int +gtk_xtext_timeout_ms (GtkXText *xtext, int pixes) +{ + int apixes = abs(pixes); + + if (apixes < 6) return 100; + if (apixes < 12) return 50; + if (apixes < 20) return 20; + return 10; +} + static gint gtk_xtext_scrolldown_timeout (GtkXText * xtext) { int p_y, win_height; + xtext_buffer *buf = xtext->buffer; + GtkAdjustment *adj = xtext->adj; + textentry *ent; gdk_window_get_pointer (GTK_WIDGET (xtext)->window, 0, &p_y, 0); gdk_drawable_get_size (GTK_WIDGET (xtext)->window, 0, &win_height); @@ -1771,13 +1800,30 @@ gtk_xtext_scrolldown_timeout (GtkXText * xtext) if (p_y > win_height && xtext->adj->value < (xtext->adj->upper - xtext->adj->page_size)) { - xtext->adj->value++; - gtk_adjustment_changed (xtext->adj); - gtk_xtext_render_page (xtext); - return 1; + xtext->adj->value += buf->pagetop_ent->lines_taken; + ent = buf->last_ent_end->next; + if (ent) + { + gtk_adjustment_value_changed (xtext->adj); + } + else + { + buf->scrollbar_down = TRUE; + } + xtext->scroll_tag = g_timeout_add (gtk_xtext_timeout_ms (xtext, p_y - win_height), + (GSourceFunc) + gtk_xtext_scrolldown_timeout, + xtext); + xtext->select_start_y -= (adj->value - xtext->select_start_adj) * xtext->fontsize; + xtext->select_start_adj = adj->value; + gtk_xtext_selection_draw (xtext, NULL, TRUE); + gtk_xtext_render_ents (xtext, ent, buf->last_ent_end); + } + else + { + xtext->scroll_tag = 0; } - xtext->scroll_tag = 0; return 0; } @@ -1785,18 +1831,35 @@ static gint gtk_xtext_scrollup_timeout (GtkXText * xtext) { int p_y; + xtext_buffer *buf = xtext->buffer; + GtkAdjustment *adj = xtext->adj; + textentry *ent; gdk_window_get_pointer (GTK_WIDGET (xtext)->window, 0, &p_y, 0); - if (p_y < 0 && xtext->adj->value > 0.0) + if (p_y < 0 && adj->value >= 0) { - xtext->adj->value--; - gtk_adjustment_changed (xtext->adj); - gtk_xtext_render_page (xtext); - return 1; + buf->scrollbar_down = FALSE; + ent = buf->last_ent_start->prev; + if (ent) + { + adj->value -= ent->lines_taken; + gtk_adjustment_value_changed (adj); + } + xtext->select_start_y -= (adj->value - xtext->select_start_adj) * xtext->fontsize; + xtext->select_start_adj = adj->value; + gtk_xtext_selection_draw (xtext, NULL, TRUE); + gtk_xtext_render_ents (xtext, ent, buf->last_ent_end); + xtext->scroll_tag = g_timeout_add (gtk_xtext_timeout_ms (xtext, p_y), + (GSourceFunc) + gtk_xtext_scrollup_timeout, + xtext); + } + else + { + xtext->scroll_tag = 0; } - xtext->scroll_tag = 0; return 0; } @@ -1806,35 +1869,32 @@ gtk_xtext_selection_update (GtkXText * xtext, GdkEventMotion * event, int p_y, g int win_height; int moved; + if (xtext->scroll_tag) + { + return; + } + gdk_drawable_get_size (GTK_WIDGET (xtext)->window, 0, &win_height); /* selecting past top of window, scroll up! */ if (p_y < 0 && xtext->adj->value >= 0) { - if (!xtext->scroll_tag) - xtext->scroll_tag = g_timeout_add (100, - (GSourceFunc) - gtk_xtext_scrollup_timeout, - xtext); - return; + gtk_xtext_scrollup_timeout (xtext); } /* selecting past bottom of window, scroll down! */ - if (p_y > win_height && + else if (p_y > win_height && xtext->adj->value < (xtext->adj->upper - xtext->adj->page_size)) { - if (!xtext->scroll_tag) - xtext->scroll_tag = g_timeout_add (100, - (GSourceFunc) - gtk_xtext_scrolldown_timeout, - xtext); - return; + gtk_xtext_scrolldown_timeout (xtext); + } + else + { + moved = (int)xtext->adj->value - xtext->select_start_adj; + xtext->select_start_y -= (moved * xtext->fontsize); + xtext->select_start_adj = xtext->adj->value; + gtk_xtext_selection_draw (xtext, event, render); } - - moved = (int)xtext->adj->value - xtext->select_start_adj; - xtext->select_start_y -= (moved * xtext->fontsize); - xtext->select_start_adj = xtext->adj->value; - gtk_xtext_selection_draw (xtext, event, render); } static char * @@ -1890,7 +1950,7 @@ gtk_xtext_get_word (GtkXText * xtext, int x, int y, textentry ** ret_ent, if (ret_len) *ret_len = str - word; - return gtk_xtext_strip_color (word, len, xtext->scratch_buffer, NULL, NULL, FALSE); + return gtk_xtext_strip_color (word, len, xtext->scratch_buffer, NULL, NULL, NULL, FALSE); } #ifdef MOTION_MONITOR @@ -2190,6 +2250,11 @@ gtk_xtext_button_release (GtkWidget * widget, GdkEventButton * event) if (event->button == 1) { xtext->button_down = FALSE; + if (xtext->scroll_tag) + { + g_source_remove (xtext->scroll_tag); + xtext->scroll_tag = 0; + } gtk_grab_remove (widget); /*gdk_pointer_ungrab (0);*/ @@ -2416,7 +2481,7 @@ gtk_xtext_selection_get_text (GtkXText *xtext, int *len_ret) len = strlen (txt); } else { - stripped = gtk_xtext_strip_color (txt, strlen (txt), NULL, &len, 0, FALSE); + stripped = gtk_xtext_strip_color (txt, strlen (txt), NULL, &len, NULL, NULL, FALSE); free (txt); } @@ -2456,12 +2521,14 @@ gtk_xtext_selection_get (GtkWidget * widget, #if (GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION == 0) gdk_string_to_compound_text ( + stripped, &encoding, &format, &new_text, + &new_length); #else gdk_string_to_compound_text_for_display ( gdk_drawable_get_display (widget->window), -#endif stripped, &encoding, &format, &new_text, &new_length); +#endif gtk_selection_data_set (selection_data_ptr, encoding, format, new_text, new_length); gdk_free_compound_text (new_text); @@ -2576,19 +2643,26 @@ gtk_xtext_get_type (void) static unsigned char * gtk_xtext_strip_color (unsigned char *text, int len, unsigned char *outbuf, - int *newlen, int *mb_ret, int strip_hidden) + int *newlen, int *mb_ret, GSList **slp, int strip_hidden) { int i = 0; int rcol = 0, bgcol = 0; int hidden = FALSE; unsigned char *new_str; int mb = FALSE; + GSList *sl = NULL; + unsigned char *text0 = text; + int off1, len1; + offlen_t data; if (outbuf == NULL) new_str = malloc (len + 2); else new_str = outbuf; + off1 = 0; + len1 = 0; + data.u = 0; while (len > 0) { if (*text >= 128) @@ -2622,12 +2696,32 @@ gtk_xtext_strip_color (unsigned char *text, int len, unsigned char *outbuf, break; default: if (!(hidden && strip_hidden)) + { + if (text - text0 - off1 != len1) + { + if (len1) + { + data.o.off = off1; + data.o.len = len1; + sl = g_slist_append (sl, GUINT_TO_POINTER (data.u)); + len1 = 0; + } + off1 = text - text0; + } + len1++; new_str[i++] = *text; + } } } text++; len--; } + if (len1) + { + data.o.off = off1; + data.o.len = len1; + sl = g_slist_append (sl, GUINT_TO_POINTER (data.u)); + } new_str[i] = 0; @@ -2637,9 +2731,15 @@ gtk_xtext_strip_color (unsigned char *text, int len, unsigned char *outbuf, if (mb_ret != NULL) *mb_ret = mb; + if (slp) + *slp = sl; + else + g_slist_free (sl); + return new_str; } + /* GeEkMaN: converts mIRC control codes to literal control codes */ static char * @@ -2743,7 +2843,7 @@ gtk_xtext_text_width (GtkXText *xtext, unsigned char *text, int len, int new_len, mb; new_buf = gtk_xtext_strip_color (text, len, xtext->scratch_buffer, - &new_len, &mb, !xtext->ignore_hidden); + &new_len, &mb, NULL, !xtext->ignore_hidden); if (mb_ret) *mb_ret = mb; @@ -2909,6 +3009,63 @@ gtk_xtext_reset (GtkXText * xtext, int mark, int attribs) xtext->nc = 0; } +/* + * gtk_xtext_search_offset (buf, ent, off) -- + * Look for arg offset in arg textentry + * Return one or more flags: + * GTK_MATCH_MID if we are in a match + * GTK_MATCH_START if we're at the first byte of it + * GTK_MATCH_END if we at the first byte past it + * GTK_MATCH_CUR if it is the current match + */ +#define GTK_MATCH_START 1 +#define GTK_MATCH_MID 2 +#define GTK_MATCH_END 4 +#define GTK_MATCH_CUR 8 +static int +gtk_xtext_search_offset (xtext_buffer *buf, textentry *ent, unsigned int off) +{ + GList *gl; + offsets_t o; + int flags = 0; + + for (gl = g_list_first (ent->marks); gl; gl = g_list_next (gl)) + { + o.u = GPOINTER_TO_UINT (gl->data); + if (off < o.o.start || off > o.o.end) + continue; + flags = GTK_MATCH_MID; + if (off == o.o.start) + flags |= GTK_MATCH_START; + if (off == o.o.end) + { + gl = g_list_next (gl); + if (gl) + { + o.u = GPOINTER_TO_UINT (gl->data); + if (off == o.o.start) /* If subseq match is adjacent */ + { + flags |= (gl == buf->curmark)? GTK_MATCH_CUR: 0; + } + else /* If subseq match is not adjacent */ + { + flags |= GTK_MATCH_END; + } + } + else /* If there is no subseq match */ + { + flags |= GTK_MATCH_END; + } + } + else if (gl == buf->curmark) /* If not yet at the end of this match */ + { + flags |= GTK_MATCH_CUR; + } + break; + } + return flags; +} + /* render a single line, which WONT wrap, and parse mIRC colors */ static int @@ -2923,6 +3080,9 @@ gtk_xtext_render_str (GtkXText * xtext, int y, textentry * ent, int offset; int mark = FALSE; int ret = 1; + int k; + int srch_underline = FALSE; + int srch_mark = FALSE; xtext->in_hilight = FALSE; @@ -3074,6 +3234,50 @@ gtk_xtext_render_str (GtkXText * xtext, int y, textentry * ent, } } + if (!left_only && !mark && + (k = gtk_xtext_search_offset (xtext->buffer, ent, offset + i))) + { + x += gtk_xtext_render_flush (xtext, x, y, pstr, j, gc, ent->mb); + pstr += j; + j = 0; + if (!(xtext->buffer->search_flags & highlight)) + { + if (k & GTK_MATCH_CUR) + { + xtext_set_bg (xtext, gc, XTEXT_MARK_BG); + xtext_set_fg (xtext, gc, XTEXT_MARK_FG); + xtext->backcolor = TRUE; + srch_mark = TRUE; + } else + { + xtext_set_bg (xtext, gc, xtext->col_back); + xtext_set_fg (xtext, gc, xtext->col_fore); + xtext->backcolor = (xtext->col_back != XTEXT_BG)? TRUE: FALSE; + srch_mark = FALSE; + } + } + else + { + xtext->underline = (k & GTK_MATCH_CUR)? TRUE: FALSE; + if (k & (GTK_MATCH_START | GTK_MATCH_MID)) + { + xtext_set_bg (xtext, gc, XTEXT_MARK_BG); + xtext_set_fg (xtext, gc, XTEXT_MARK_FG); + xtext->backcolor = TRUE; + srch_mark = TRUE; + } + if (k & GTK_MATCH_END) + { + xtext_set_bg (xtext, gc, xtext->col_back); + xtext_set_fg (xtext, gc, xtext->col_fore); + xtext->backcolor = (xtext->col_back != XTEXT_BG)? TRUE: FALSE; + srch_mark = FALSE; + xtext->underline = FALSE; + } + srch_underline = xtext->underline; + } + } + switch (str[i]) { case '\n': @@ -3223,6 +3427,11 @@ gtk_xtext_render_str (GtkXText * xtext, int y, textentry * ent, xtext_set_bg (xtext, gc, XTEXT_MARK_BG); xtext_set_fg (xtext, gc, XTEXT_MARK_FG); xtext->backcolor = TRUE; + if (srch_underline) + { + xtext->underline = FALSE; + srch_underline = FALSE; + } mark = TRUE; } @@ -3245,7 +3454,7 @@ gtk_xtext_render_str (GtkXText * xtext, int y, textentry * ent, if (j) x += gtk_xtext_render_flush (xtext, x, y, pstr, j, gc, ent->mb); - if (mark) + if (mark || srch_mark) { xtext_set_bg (xtext, gc, xtext->col_back); xtext_set_fg (xtext, gc, xtext->col_fore); @@ -4413,7 +4622,7 @@ gtk_xtext_save (GtkXText * xtext, int fh) while (ent) { buf = gtk_xtext_strip_color (ent->str, ent->str_len, NULL, - &newlen, NULL, FALSE); + &newlen, NULL, NULL, FALSE); write (fh, buf, newlen); write (fh, "\n", 1); free (buf); @@ -4800,6 +5009,11 @@ gtk_xtext_kill_ent (xtext_buffer *buffer, textentry *ent) if (buffer->marker_pos == ent) buffer->marker_pos = NULL; + if (ent->marks) + { + gtk_xtext_search_textentry_del (buffer, ent); + } + free (ent); return visible; } @@ -4864,7 +5078,23 @@ gtk_xtext_remove_bottom (xtext_buffer *buffer) else buffer->text_first = NULL; - gtk_xtext_kill_ent (buffer, ent); + if (gtk_xtext_kill_ent (buffer, ent)) + { + if (!buffer->xtext->add_io_tag) + { + /* remove scrolling events */ + if (buffer->xtext->io_tag) + { + g_source_remove (buffer->xtext->io_tag); + buffer->xtext->io_tag = 0; + } + buffer->xtext->force_render = TRUE; + buffer->xtext->add_io_tag = g_timeout_add (REFRESH_TIMEOUT * 2, + (GSourceFunc) + gtk_xtext_render_page_timeout, + buffer->xtext); + } + } } /* If lines=0 => clear all */ @@ -4899,6 +5129,8 @@ gtk_xtext_clear (xtext_buffer *buf, int lines) else { /* delete all */ + if (buf->search_found) + gtk_xtext_search_fini (buf); if (buf->xtext->auto_indent) buf->indent = MARGIN; buf->scrollbar_down = TRUE; @@ -4930,21 +5162,37 @@ static gboolean gtk_xtext_check_ent_visibility (GtkXText * xtext, textentry *find_ent, int add) { textentry *ent; - int lines_max; - int line = 0; + int lines; + xtext_buffer *buf = xtext->buffer; int width; int height; - gdk_drawable_get_size (GTK_WIDGET (xtext)->window, &width, &height); + if (find_ent == NULL) + { + return FALSE; + } - lines_max = ((height + xtext->pixel_offset) / xtext->fontsize) + add; - ent = xtext->buffer->pagetop_ent; + gdk_drawable_get_size (GTK_WIDGET (xtext)->window, &width, &height); - while (ent && line < lines_max) + ent = buf->pagetop_ent; + /* If top line not completely displayed return FALSE */ + if (ent == find_ent && buf->pagetop_subline > 0) { - if (find_ent == ent) + return FALSE; + } + /* Loop through line positions looking for find_ent */ + lines = ((height + xtext->pixel_offset) / xtext->fontsize) + buf->pagetop_subline + add; + while (ent) + { + lines -= ent->lines_taken; + if (lines <= 0) + { + return FALSE; + } + if (ent == find_ent) + { return TRUE; - line += ent->lines_taken; + } ent = ent->next; } @@ -4958,90 +5206,369 @@ gtk_xtext_check_marker_visibility (GtkXText * xtext) xtext->buffer->marker_seen = TRUE; } -textentry * -gtk_xtext_search (GtkXText * xtext, const gchar *text, textentry *start, gboolean case_match, gboolean backward) +static void +gtk_xtext_unstrip_color (gint start, gint end, GSList *slp, GList **gl, gint maxo) { - textentry *ent, *fent; - int line; - gchar *str, *nee, *hay; /* needle in haystack */ - - gtk_xtext_selection_clear_full (xtext->buffer); - xtext->buffer->last_ent_start = NULL; - xtext->buffer->last_ent_end = NULL; + gint off1, off2, curlen; + GSList *cursl; + offsets_t marks; - /* set up text comparand for Case Match or Ignore */ - if (case_match) - nee = g_strdup (text); - else - nee = g_utf8_casefold (text, strlen (text)); + off1 = 0; + curlen = 0; + cursl = slp; + while (cursl) + { + offlen_t ol; + ol.u = GPOINTER_TO_UINT(cursl->data); + if (start < ol.o.len) + { + off1 = ol.o.off + start; + break; + } + curlen += ol.o.len; + start -= ol.o.len; + end -= ol.o.len; + cursl = g_slist_next (cursl); + } - /* Validate that start gives a currently valid ent pointer */ - ent = xtext->buffer->text_first; - while (ent) + off2 = off1; + while (cursl) { - if (ent == start) + offlen_t ol; + ol.u = GPOINTER_TO_UINT(cursl->data); + if (end < ol.o.len) + { + off2 = ol.o.off + end; break; - ent = ent->next; + } + curlen += ol.o.len; + end -= ol.o.len; + cursl = g_slist_next (cursl); + } + if (!cursl) + { + off2 = maxo; } - if (!ent) - start = NULL; - /* Choose first ent to look at */ - if (start) - ent = backward? start->prev: start->next; - else - ent = backward? xtext->buffer->text_last: xtext->buffer->text_first; + marks.o.start = off1; + marks.o.end = off2; + *gl = g_list_append (*gl, GUINT_TO_POINTER (marks.u)); +} - /* Search from there to one end or the other until found */ - while (ent) +/* Search a single textentry for occurrence(s) of search arg string */ +static void +gtk_xtext_search_textentry (xtext_buffer *buf, textentry *ent, int pre) +{ + gchar *str; /* text string to be searched */ + GList *gl = NULL; + GSList *slp; + gint lstr; + + if (buf->search_text == NULL) { - /* If Case Ignore, fold before & free after calling strstr */ - if (case_match) - hay = g_strdup (ent->str); - else - hay = g_utf8_casefold (ent->str, strlen (ent->str)); - /* Try to find the needle in this haystack */ - str = g_strstr_len (hay, strlen (hay), nee); + return; + } + + str = gtk_xtext_strip_color (ent->str, ent->str_len, buf->xtext->scratch_buffer, + &lstr, NULL, &slp, !buf->xtext->ignore_hidden); + + /* Regular-expression matching --- */ + if (buf->search_flags & regexp) + { + GMatchInfo *gmi; + gint start, end; + + if (buf->search_re == NULL) + { + return; + } + g_regex_match (buf->search_re, str, 0, &gmi); + while (g_match_info_matches (gmi)) + { + g_match_info_fetch_pos (gmi, 0, &start, &end); + gtk_xtext_unstrip_color (start, end, slp, &gl, ent->str_len); + g_match_info_next (gmi, NULL); + } + g_match_info_free (gmi); + + /* Non-regular-expression matching --- */ + } else { + gchar *hay, *pos; + gint lhay, off, len; + gint match = buf->search_flags & case_match; + + hay = match? g_strdup (str): g_utf8_casefold (str, lstr); + lhay = strlen (hay); + off = 0; + + for (pos = hay, len = lhay; len; + off += buf->search_lnee, pos = hay + off, len = lhay - off) + { + str = g_strstr_len (pos, len, buf->search_nee); + if (str == NULL) + { + break; + } + off = str - hay; + gtk_xtext_unstrip_color (off, off + buf->search_lnee, + slp, &gl, ent->str_len); + } + g_free (hay); - if (str) - break; - ent = backward? ent->prev: ent->next; } - fent = ent; - /* Save distance to start, end of found string */ - if (ent) + /* Common processing --- */ + g_slist_free (slp); + ent->marks = gl; + if (gl) + { + buf->search_found = (pre? g_list_prepend: g_list_append) (buf->search_found, ent); + if (pre == FALSE && buf->hintsearch == NULL) + { + buf->hintsearch = ent; + } + } + return; +} + +/* Free all search information for a textentry */ +static void +gtk_xtext_search_textentry_del (xtext_buffer *buf, textentry *ent) +{ + g_list_free (ent->marks); + ent->marks = NULL; + if (buf->cursearch && buf->cursearch->data == ent) + { + buf->cursearch = NULL; + buf->curmark = NULL; + } + if (buf->pagetop_ent == ent) + { + buf->pagetop_ent = NULL; + } + if (buf->hintsearch == ent) + { + buf->hintsearch = NULL; + } + buf->search_found = g_list_remove (buf->search_found, ent); +} + +/* Used only by glist_foreach */ +static void +gtk_xtext_search_textentry_fini (gpointer entp, gpointer dummy) +{ + textentry *ent = entp; + + g_list_free (ent->marks); + ent->marks = NULL; +} + +/* Free all search information for all textentrys and the xtext_buffer */ +static void +gtk_xtext_search_fini (xtext_buffer *buf) +{ + g_list_foreach (buf->search_found, gtk_xtext_search_textentry_fini, 0); + g_list_free (buf->search_found); + buf->search_found = NULL; + g_free (buf->search_text); + buf->search_text = NULL; + g_free (buf->search_nee); + buf->search_nee = NULL; + buf->search_flags = 0; + buf->cursearch = NULL; + buf->curmark = NULL; + if (buf->search_re) + { + g_regex_unref (buf->search_re); + buf->search_re = NULL; + } +} + +/* Returns TRUE if the base search information exists and is still okay to use */ +static gboolean +gtk_xtext_search_init (xtext_buffer *buf, const gchar *text, gtk_xtext_search_flags flags, GError **perr) +{ + /* Of the five flags, backward and highlight_all do not need a new search */ + if (buf->search_found && + strcmp (buf->search_text, text) == 0 && + (buf->search_flags & case_match) == (flags & case_match) && + (buf->search_flags & follow) == (flags & follow) && + (buf->search_flags & regexp) == (flags & regexp)) + { + return TRUE; + } + buf->hintsearch = buf->cursearch? buf->cursearch->data: NULL; + gtk_xtext_search_fini (buf); + buf->search_text = g_strdup (text); + if (flags & regexp) + { + buf->search_re = g_regex_new (text, (flags & case_match)? 0: G_REGEX_CASELESS, 0, perr); + if (perr && *perr) + { + return FALSE; + } + } + else + { + if (flags & case_match) + { + buf->search_nee = g_strdup (text); + } + else + { + buf->search_nee = g_utf8_casefold (text, strlen (text)); + } + buf->search_lnee = strlen (buf->search_nee); + } + buf->search_flags = flags; + buf->cursearch = NULL; + buf->curmark = NULL; + return FALSE; +} + +#define BACKWARD (flags & backward) +#define FIRSTLAST(lp) (BACKWARD? g_list_last(lp): g_list_first(lp)) +#define NEXTPREVIOUS(lp) (BACKWARD? g_list_previous(lp): g_list_next(lp)) +textentry * +gtk_xtext_search (GtkXText * xtext, const gchar *text, gtk_xtext_search_flags flags, GError **perr) +{ + textentry *ent = NULL; + xtext_buffer *buf = xtext->buffer; + GList *gl; + + if (buf->text_first == NULL) + { + return NULL; + } + + /* If the text arg is NULL, one of these has been toggled: highlight follow */ + if (text == NULL) /* Here on highlight or follow toggle */ { - ent->mark_start = str - hay; - ent->mark_end = ent->mark_start + strlen (nee); + gint oldfollow = buf->search_flags & follow; + gint newfollow = flags & follow; - /* is the match visible? Might need to scroll */ - if (!gtk_xtext_check_ent_visibility (xtext, ent, 0)) + /* If "Follow" has just been checked, search possible new textentries --- */ + if (newfollow && (newfollow != oldfollow)) { - ent = xtext->buffer->text_first; - line = 0; - while (ent) + gl = g_list_last (buf->search_found); + ent = gl? gl->data: buf->text_first; + for (; ent; ent = ent->next) { - line += ent->lines_taken; - ent = ent->next; - if (ent == fent) - break; + gtk_xtext_search_textentry (buf, ent, FALSE); + } + } + buf->search_flags = flags; + ent = buf->pagetop_ent; + } + + /* if the text arg is "", the reset button has been clicked or Control-Shift-F has been hit */ + else if (text[0] == 0) /* Let a null string do a reset. */ + { + gtk_xtext_search_fini (buf); + } + + /* If the text arg is neither NULL nor "", it's the search string */ + else + { + if (gtk_xtext_search_init (buf, text, flags, perr) == FALSE) /* If a new search: */ + { + if (perr && *perr) + { + return NULL; + } + for (ent = buf->text_first; ent; ent = ent->next) + { + gtk_xtext_search_textentry (buf, ent, TRUE); + } + buf->search_found = g_list_reverse (buf->search_found); + } + + /* Now base search results are in place. */ + + if (buf->search_found) + { + /* If we're in the midst of moving among found items */ + if (buf->cursearch) + { + ent = buf->cursearch->data; + buf->curmark = NEXTPREVIOUS (buf->curmark); + if (buf->curmark == NULL) + { + /* We've returned all the matches for this textentry. */ + buf->cursearch = NEXTPREVIOUS (buf->cursearch); + if (buf->cursearch) + { + ent = buf->cursearch->data; + buf->curmark = FIRSTLAST (ent->marks); + } + else /* We've returned all the matches for all textentries */ + { + ent = NULL; + } + } + } +#if 0 + /* If user changed the search, let's look starting where he was */ + else if (buf->hintsearch) + { + for (ent = buf->hintsearch; ent; ent = BACKWARD? ent->prev: ent->next) + if (ent->marks) + break; + if (ent == NULL) + for (ent = buf->hintsearch; ent; ent = BACKWARD? ent->next: ent->prev) + if (ent->marks) + break; + if (ent) + { + buf->cursearch = g_list_find (buf->search_found, ent); + buf->curmark = FIRSTLAST (ent->marks); + } + } +#endif + /* This is a fresh search */ + else + { + buf->cursearch = FIRSTLAST (buf->search_found); + ent = buf->cursearch->data; + buf->curmark = FIRSTLAST (ent->marks); + } + } + } + buf->hintsearch = ent; + + if (!gtk_xtext_check_ent_visibility (xtext, ent, 1)) + { + GtkAdjustment *adj = xtext->adj; + float value; + + buf->pagetop_ent = NULL; + for (value = 0, ent = buf->text_first; + ent && ent != buf->hintsearch; ent = ent->next) + { + value += ent->lines_taken; + } + if (value > adj->upper - adj->page_size) + { + value = adj->upper - adj->page_size; + } + else if ((flags & backward) && ent) + { + value -= adj->page_size - ent->lines_taken; + if (value < 0) + { + value = 0; } - while (line > xtext->adj->upper - xtext->adj->page_size) - line--; - if (backward) - line -= xtext->adj->page_size - ent->lines_taken; - xtext->adj->value = line; - xtext->buffer->scrollbar_down = FALSE; - gtk_adjustment_changed (xtext->adj); } + gtk_adjustment_set_value (adj, value); } - g_free (nee); gtk_widget_queue_draw (GTK_WIDGET (xtext)); - return fent; + return buf->hintsearch; } +#undef BACKWARD +#undef FIRSTLAST +#undef NEXTPREVIOUS static int gtk_xtext_render_page_timeout (GtkXText * xtext) @@ -5104,6 +5631,7 @@ gtk_xtext_append_entry (xtext_buffer *buf, textentry * ent, time_t stamp) ent->mark_start = -1; ent->mark_end = -1; ent->next = NULL; + ent->marks = NULL; if (ent->indent < MARGIN) ent->indent = MARGIN; /* 2 pixels is the left margin */ @@ -5122,10 +5650,11 @@ gtk_xtext_append_entry (xtext_buffer *buf, textentry * ent, time_t stamp) if (buf->reset_marker_pos || ((buf->marker_pos == NULL || buf->marker_seen) && (buf->xtext->buffer != buf || #if GTK_CHECK_VERSION(2,4,0) - !gtk_window_has_toplevel_focus (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (buf->xtext))))))) + !gtk_window_has_toplevel_focus (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (buf->xtext)))) #else - !(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (buf->xtext))))->has_focus))) + !(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (buf->xtext))))->has_focus #endif + ))) { buf->marker_pos = ent; dontscroll (buf); /* force scrolling off */ @@ -5165,6 +5694,10 @@ gtk_xtext_append_entry (xtext_buffer *buf, textentry * ent, time_t stamp) if (buf->old_value < 0) buf->old_value = 0; } + if (buf->search_flags & follow) + { + gtk_xtext_search_textentry (buf, ent, FALSE); + } } /* the main two public functions */ @@ -5491,6 +6024,11 @@ gtk_xtext_buffer_free (xtext_buffer *buf) if (buf->xtext->selection_buffer == buf) buf->xtext->selection_buffer = NULL; + if (buf->search_found) + { + gtk_xtext_search_fini (buf); + } + ent = buf->text_first; while (ent) { diff --git a/src/fe-gtk/xtext.h b/src/fe-gtk/xtext.h index 90fa1bca..6c126346 100644 --- a/src/fe-gtk/xtext.h +++ b/src/fe-gtk/xtext.h @@ -43,6 +43,13 @@ typedef struct _GtkXText GtkXText; typedef struct _GtkXTextClass GtkXTextClass; typedef struct textentry textentry; +typedef enum gtk_xtext_search_flags_e { + case_match = 1, + backward = 2, + highlight = 4, + follow = 8, + regexp = 16 +} gtk_xtext_search_flags; typedef struct { GtkXText *xtext; /* attached to this widget */ @@ -77,6 +84,16 @@ typedef struct { unsigned int grid_dirty:1; unsigned int marker_seen:1; unsigned int reset_marker_pos:1; + + GList *search_found; /* list of textentries where search found strings */ + gchar *search_text; /* desired text to search for */ + gchar *search_nee; /* prepared needle to look in haystack for */ + gint search_lnee; /* its length */ + gtk_xtext_search_flags search_flags; /* match, bwd, highlight */ + GList *cursearch; /* GList whose 'data' pts to current textentry */ + GList *curmark; /* current item in ent->marks */ + GRegex *search_re; /* Compiled regular expression */ + textentry *hintsearch; /* textentry found for last search */ } xtext_buffer; struct _GtkXText @@ -247,7 +264,7 @@ void gtk_xtext_clear (xtext_buffer *buf, int lines); void gtk_xtext_save (GtkXText * xtext, int fh); void gtk_xtext_refresh (GtkXText * xtext, int do_trans); int gtk_xtext_lastlog (xtext_buffer *out, xtext_buffer *search_area, int (*cmp_func) (char *, void *userdata), void *userdata); -textentry *gtk_xtext_search (GtkXText * xtext, const gchar *text, textentry *start, gboolean case_match, gboolean backward); +textentry *gtk_xtext_search (GtkXText * xtext, const gchar *text, gtk_xtext_search_flags flags, GError **err); void gtk_xtext_reset_marker_pos (GtkXText *xtext); void gtk_xtext_check_marker_visibility(GtkXText *xtext); -- cgit 1.4.1 From e012c9e5a77ec2361dfe33ed393f7156570e650a Mon Sep 17 00:00:00 2001 From: Richart Hitt Date: Sat, 2 Jun 2012 02:25:30 +0200 Subject: Eliminate multiple inclusions (Richard Hitt) --- src/fe-gtk/xtext.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 2899ba68..d474f148 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -71,8 +71,6 @@ #include "../common/xchatc.h" #include "fe-gtk.h" #include "xtext.h" -#include "../common/xchat.h" -#include "../common/xchatc.h" #define charlen(str) g_utf8_skip[*(guchar *)(str)] @@ -3015,7 +3013,7 @@ gtk_xtext_reset (GtkXText * xtext, int mark, int attribs) * Return one or more flags: * GTK_MATCH_MID if we are in a match * GTK_MATCH_START if we're at the first byte of it - * GTK_MATCH_END if we at the first byte past it + * GTK_MATCH_END if we're at the first byte past it * GTK_MATCH_CUR if it is the current match */ #define GTK_MATCH_START 1 -- cgit 1.4.1 From 2f6eccd87373fd19cdc35af32dfbe8565f10653c Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 2 Jun 2012 04:28:37 +0200 Subject: Restore XChat-WDK from tray when only one instance is allowed to run and X-Tray is used --- src/common/xchat.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/xchat.c b/src/common/xchat.c index 22c4eddb..0cfd422e 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -902,6 +902,39 @@ xchat_execv (char * const argv[]) #endif } +#ifdef WIN32 +static void +xchat_restore_window (HWND xchat_window) +{ + /* ShowWindow (xchat_window, SW_RESTORE); another way, but works worse */ + SendMessage (xchat_window, WM_SYSCOMMAND, SC_RESTORE, 0); + SetForegroundWindow (xchat_window); +} + +BOOL CALLBACK +enum_windows_impl (HWND current_window, LPARAM lParam) +{ + TCHAR buffer[10]; + ZeroMemory (&buffer, sizeof (buffer)); + + if (!current_window) + { + return TRUE; + } + + GetWindowText (current_window, buffer, 10); + if (stricmp (buffer, "xchat-wdk") == 0) /* We've found it, stop */ + { + xchat_restore_window (current_window); + return FALSE; + } + else /* Keep searching */ + { + return TRUE; + } +} +#endif + int main (int argc, char *argv[]) { @@ -937,7 +970,20 @@ main (int argc, char *argv[]) if (error == ERROR_ALREADY_EXISTS || mutex == NULL) { - return 1; + /* restoring the XChat window from the tray via the taskbar icon + * only works correctly when X-Tray is used, but it's not a big deal + * since you can only minimize XChat to tray via the taskbar if you + * use X-Tray*/ + if (xtray_mode ()) + { + /* FindWindow() doesn't support wildcards so we check all the open windows */ + EnumWindows (enum_windows_impl, NULL); + return 0; + } + else + { + return 1; + } } } #endif -- cgit 1.4.1 From 4f73128e9b71a786a57acac1aa0572e8ecefb915 Mon Sep 17 00:00:00 2001 From: Richard Hitt Date: Sun, 3 Jun 2012 11:58:37 +0200 Subject: Fix coloring the bottom of the chat area (Richard Hitt) --- src/fe-gtk/xtext.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index d474f148..6e314f68 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -1131,7 +1131,6 @@ gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation) xtext->avoid_trans = FALSE; - allocation->height = allocation->height / xtext->fontsize * xtext->fontsize; widget->allocation = *allocation; if (GTK_WIDGET_REALIZED (widget)) { -- cgit 1.4.1 From 39422d5503281030d712c39af25317b5e3ece0fe Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 3 Jun 2012 12:06:06 +0200 Subject: Initial Visual Studio solution --- src/common/dirent-win32.c | 199 ---------------------- src/common/dirent-win32.h | 28 --- src/common/util.c | 4 +- src/common/xchat.h | 6 +- src/dirent-win32/dirent-win32.c | 199 ++++++++++++++++++++++ src/dirent-win32/dirent-win32.h | 28 +++ src/fe-gtk/custom-list.c | 2 +- src/fe-gtk/xchat.rc | 2 - win32/common/common.vcxproj | 148 ++++++++++++++++ win32/common/common.vcxproj.filters | 197 +++++++++++++++++++++ win32/dirent-win32/dirent-win32.vcxproj | 88 ++++++++++ win32/dirent-win32/dirent-win32.vcxproj.filters | 23 +++ win32/fe-gtk/fe-gtk.vcxproj | 164 ++++++++++++++++++ win32/fe-gtk/fe-gtk.vcxproj.filters | 216 ++++++++++++++++++++++++ win32/pixmaps/pixmaps.vcxproj | 105 ++++++++++++ win32/pixmaps/pixmaps.vcxproj.filters | 41 +++++ win32/version/version.c | 144 ++++++++++++++++ win32/version/version.vcxproj | 93 ++++++++++ win32/version/version.vcxproj.filters | 14 ++ win32/xchat.props | 14 ++ win32/xchat.sln | 50 ++++++ 21 files changed, 1530 insertions(+), 235 deletions(-) delete mode 100644 src/common/dirent-win32.c delete mode 100644 src/common/dirent-win32.h create mode 100644 src/dirent-win32/dirent-win32.c create mode 100644 src/dirent-win32/dirent-win32.h create mode 100644 win32/common/common.vcxproj create mode 100644 win32/common/common.vcxproj.filters create mode 100644 win32/dirent-win32/dirent-win32.vcxproj create mode 100644 win32/dirent-win32/dirent-win32.vcxproj.filters create mode 100644 win32/fe-gtk/fe-gtk.vcxproj create mode 100644 win32/fe-gtk/fe-gtk.vcxproj.filters create mode 100644 win32/pixmaps/pixmaps.vcxproj create mode 100644 win32/pixmaps/pixmaps.vcxproj.filters create mode 100644 win32/version/version.c create mode 100644 win32/version/version.vcxproj create mode 100644 win32/version/version.vcxproj.filters create mode 100644 win32/xchat.props create mode 100644 win32/xchat.sln (limited to 'src') diff --git a/src/common/dirent-win32.c b/src/common/dirent-win32.c deleted file mode 100644 index 273c6732..00000000 --- a/src/common/dirent-win32.c +++ /dev/null @@ -1,199 +0,0 @@ -/***************************************************************************** - * dirent.h - dirent API for Microsoft Visual Studio - * - * Copyright (C) 2006 Toni Ronkko - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * ``Software''), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Dec 15, 2009, John Cunningham - * Added rewinddir member function - * - * Jan 18, 2008, Toni Ronkko - * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string - * between multi-byte and unicode representations. This makes the - * code simpler and also allows the code to be compiled under MingW. Thanks - * to Azriel Fasten for the suggestion. - * - * Mar 4, 2007, Toni Ronkko - * Bug fix: due to the strncpy_s() function this file only compiled in - * Visual Studio 2005. Using the new string functions only when the - * compiler version allows. - * - * Nov 2, 2006, Toni Ronkko - * Major update: removed support for Watcom C, MS-DOS and Turbo C to - * simplify the file, updated the code to compile cleanly on Visual - * Studio 2005 with both unicode and multi-byte character strings, - * removed rewinddir() as it had a bug. - * - * Aug 20, 2006, Toni Ronkko - * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified - * comments by removing SGML tags. - * - * May 14 2002, Toni Ronkko - * Embedded the function definitions directly to the header so that no - * source modules need to be included in the Visual Studio project. Removed - * all the dependencies to other projects so that this very header can be - * used independently. - * - * May 28 1998, Toni Ronkko - * First version. - *****************************************************************************/ - -#include "dirent-win32.h" - -/* Use the new safe string functions introduced in Visual Studio 2005 */ -#if defined(_MSC_VER) && _MSC_VER >= 1400 -# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) -#else -# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) -#endif - - -/***************************************************************************** - * Open directory stream DIRNAME for read and return a pointer to the - * internal working area that is used to retrieve individual directory - * entries. - */ -DIR *opendir(const char *dirname) -{ - DIR *dirp; - assert (dirname != NULL); - assert (strlen (dirname) < MAX_PATH); - - /* construct new DIR structure */ - dirp = (DIR*) malloc (sizeof (struct DIR)); - if (dirp != NULL) { - char *p; - - /* take directory name... */ - STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); - dirp->patt[MAX_PATH] = '\0'; - - /* ... and append search pattern to it */ - p = strchr (dirp->patt, '\0'); - if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { - *p++ = '\\'; - } - *p++ = '*'; - *p = '\0'; - - /* open stream and retrieve first file */ - dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* invalid search pattern? */ - free (dirp); - return NULL; - } - - /* there is an un-processed directory entry in memory now */ - dirp->cached = 1; - } - - return dirp; -} - - -/***************************************************************************** - * Read a directory entry, and return a pointer to a dirent structure - * containing the name of the entry in d_name field. Individual directory - * entries returned by this very function include regular files, - * sub-directories, pseudo-directories "." and "..", but also volume labels, - * hidden files and system files may be returned. - */ -struct dirent *readdir(DIR *dirp) -{ - assert (dirp != NULL); - - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* directory stream was opened/rewound incorrectly or ended normally */ - return NULL; - } - - /* get next directory entry */ - if (dirp->cached != 0) { - /* a valid directory entry already in memory */ - dirp->cached = 0; - } else { - /* read next directory entry from disk */ - if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { - /* the very last file has been processed or an error occured */ - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - return NULL; - } - } - - /* copy as a multibyte character string */ - STRNCPY ( dirp->current.d_name, - dirp->current.data.cFileName, - sizeof(dirp->current.d_name) ); - dirp->current.d_name[MAX_PATH] = '\0'; - - return &dirp->current; -} - - -/***************************************************************************** - * Close directory stream opened by opendir() function. Close of the - * directory stream invalidates the DIR structure as well as any previously - * read directory entry. - */ -int closedir(DIR *dirp) -{ - assert (dirp != NULL); - - /* release search handle */ - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - } - - /* release directory handle */ - free (dirp); - return 0; -} - - -/***************************************************************************** - * Resets the position of the directory stream to which dirp refers to the - * beginning of the directory. It also causes the directory stream to refer - * to the current state of the corresponding directory, as a call to opendir() - * would have done. If dirp does not refer to a directory stream, the effect - * is undefined. - */ -void rewinddir(DIR* dirp) -{ - /* release search handle */ - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - } - - /* open new search handle and retrieve first file */ - dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* invalid search pattern? */ - free (dirp); - return; - } - - /* there is an un-processed directory entry in memory now */ - dirp->cached = 1; -} diff --git a/src/common/dirent-win32.h b/src/common/dirent-win32.h deleted file mode 100644 index cbb753e6..00000000 --- a/src/common/dirent-win32.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef DIRENT_H -#define DIRENT_H - -#include -#include -#include - -typedef struct dirent -{ - char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ - WIN32_FIND_DATAA data; /* file attributes */ -} dirent; - -typedef struct DIR -{ - dirent current; /* Current directory entry */ - int cached; /* Indicates un-processed entry in memory */ - HANDLE search_handle; /* File search handle */ - char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ -} DIR; - -/* Forward declarations */ -DIR *opendir (const char *dirname); -struct dirent *readdir (DIR *dirp); -int closedir (DIR *dirp); -void rewinddir(DIR* dirp); - -#endif /*DIRENT_H*/ diff --git a/src/common/util.c b/src/common/util.c index 9d9c2cff..a79e343b 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -32,7 +32,7 @@ #include #include #include -#include "dirent-win32.h" +#include "../dirent-win32/dirent-win32.h" #else #include #include @@ -57,11 +57,9 @@ #include #endif -#ifndef ENABLE_NLS #ifndef HAVE_SNPRINTF #define snprintf g_snprintf #endif -#endif #ifdef USE_DEBUG diff --git a/src/common/xchat.h b/src/common/xchat.h index 9db44c3f..b4e652c9 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -8,7 +8,6 @@ #include "history.h" -#ifndef ENABLE_NLS #ifndef HAVE_SNPRINTF #define snprintf g_snprintf #endif @@ -16,7 +15,6 @@ #ifndef HAVE_VSNPRINTF #define vsnprintf _vsnprintf #endif -#endif #ifdef USE_DEBUG #define malloc(n) xchat_malloc(n, __FILE__, __LINE__) @@ -79,6 +77,10 @@ void *xchat_realloc (char *old, int len, char *file, int line); #define USERNAMELEN 10 #define HIDDEN_CHAR 8 /* invisible character for xtext */ +#ifdef __cplusplus +#define asdfasdf +#endif + #if defined(ENABLE_NLS) && !defined(_) # include # define _(x) gettext(x) diff --git a/src/dirent-win32/dirent-win32.c b/src/dirent-win32/dirent-win32.c new file mode 100644 index 00000000..273c6732 --- /dev/null +++ b/src/dirent-win32/dirent-win32.c @@ -0,0 +1,199 @@ +/***************************************************************************** + * dirent.h - dirent API for Microsoft Visual Studio + * + * Copyright (C) 2006 Toni Ronkko + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * ``Software''), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Dec 15, 2009, John Cunningham + * Added rewinddir member function + * + * Jan 18, 2008, Toni Ronkko + * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string + * between multi-byte and unicode representations. This makes the + * code simpler and also allows the code to be compiled under MingW. Thanks + * to Azriel Fasten for the suggestion. + * + * Mar 4, 2007, Toni Ronkko + * Bug fix: due to the strncpy_s() function this file only compiled in + * Visual Studio 2005. Using the new string functions only when the + * compiler version allows. + * + * Nov 2, 2006, Toni Ronkko + * Major update: removed support for Watcom C, MS-DOS and Turbo C to + * simplify the file, updated the code to compile cleanly on Visual + * Studio 2005 with both unicode and multi-byte character strings, + * removed rewinddir() as it had a bug. + * + * Aug 20, 2006, Toni Ronkko + * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified + * comments by removing SGML tags. + * + * May 14 2002, Toni Ronkko + * Embedded the function definitions directly to the header so that no + * source modules need to be included in the Visual Studio project. Removed + * all the dependencies to other projects so that this very header can be + * used independently. + * + * May 28 1998, Toni Ronkko + * First version. + *****************************************************************************/ + +#include "dirent-win32.h" + +/* Use the new safe string functions introduced in Visual Studio 2005 */ +#if defined(_MSC_VER) && _MSC_VER >= 1400 +# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) +#else +# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) +#endif + + +/***************************************************************************** + * Open directory stream DIRNAME for read and return a pointer to the + * internal working area that is used to retrieve individual directory + * entries. + */ +DIR *opendir(const char *dirname) +{ + DIR *dirp; + assert (dirname != NULL); + assert (strlen (dirname) < MAX_PATH); + + /* construct new DIR structure */ + dirp = (DIR*) malloc (sizeof (struct DIR)); + if (dirp != NULL) { + char *p; + + /* take directory name... */ + STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); + dirp->patt[MAX_PATH] = '\0'; + + /* ... and append search pattern to it */ + p = strchr (dirp->patt, '\0'); + if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { + *p++ = '\\'; + } + *p++ = '*'; + *p = '\0'; + + /* open stream and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return NULL; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; + } + + return dirp; +} + + +/***************************************************************************** + * Read a directory entry, and return a pointer to a dirent structure + * containing the name of the entry in d_name field. Individual directory + * entries returned by this very function include regular files, + * sub-directories, pseudo-directories "." and "..", but also volume labels, + * hidden files and system files may be returned. + */ +struct dirent *readdir(DIR *dirp) +{ + assert (dirp != NULL); + + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* directory stream was opened/rewound incorrectly or ended normally */ + return NULL; + } + + /* get next directory entry */ + if (dirp->cached != 0) { + /* a valid directory entry already in memory */ + dirp->cached = 0; + } else { + /* read next directory entry from disk */ + if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { + /* the very last file has been processed or an error occured */ + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + return NULL; + } + } + + /* copy as a multibyte character string */ + STRNCPY ( dirp->current.d_name, + dirp->current.data.cFileName, + sizeof(dirp->current.d_name) ); + dirp->current.d_name[MAX_PATH] = '\0'; + + return &dirp->current; +} + + +/***************************************************************************** + * Close directory stream opened by opendir() function. Close of the + * directory stream invalidates the DIR structure as well as any previously + * read directory entry. + */ +int closedir(DIR *dirp) +{ + assert (dirp != NULL); + + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* release directory handle */ + free (dirp); + return 0; +} + + +/***************************************************************************** + * Resets the position of the directory stream to which dirp refers to the + * beginning of the directory. It also causes the directory stream to refer + * to the current state of the corresponding directory, as a call to opendir() + * would have done. If dirp does not refer to a directory stream, the effect + * is undefined. + */ +void rewinddir(DIR* dirp) +{ + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* open new search handle and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; +} diff --git a/src/dirent-win32/dirent-win32.h b/src/dirent-win32/dirent-win32.h new file mode 100644 index 00000000..cbb753e6 --- /dev/null +++ b/src/dirent-win32/dirent-win32.h @@ -0,0 +1,28 @@ +#ifndef DIRENT_H +#define DIRENT_H + +#include +#include +#include + +typedef struct dirent +{ + char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ + WIN32_FIND_DATAA data; /* file attributes */ +} dirent; + +typedef struct DIR +{ + dirent current; /* Current directory entry */ + int cached; /* Indicates un-processed entry in memory */ + HANDLE search_handle; /* File search handle */ + char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ +} DIR; + +/* Forward declarations */ +DIR *opendir (const char *dirname); +struct dirent *readdir (DIR *dirp); +int closedir (DIR *dirp); +void rewinddir(DIR* dirp); + +#endif /*DIRENT_H*/ diff --git a/src/fe-gtk/custom-list.c b/src/fe-gtk/custom-list.c index ac20e0ff..0c3c40b5 100644 --- a/src/fe-gtk/custom-list.c +++ b/src/fe-gtk/custom-list.c @@ -106,7 +106,7 @@ custom_list_sortable_init (GtkTreeSortableIface * iface) * *****************************************************************************/ -static GType +GType custom_list_get_type (void) { static GType custom_list_type = 0; diff --git a/src/fe-gtk/xchat.rc b/src/fe-gtk/xchat.rc index 28676b83..f63b70e7 100644 --- a/src/fe-gtk/xchat.rc +++ b/src/fe-gtk/xchat.rc @@ -2,8 +2,6 @@ #include "../../config.h" #include "../../resource.h" -1 24 "xchat.exe.manifest" - XC_ICON ICON "../../xchat.ico" VS_VERSION_INFO VERSIONINFO diff --git a/win32/common/common.vcxproj b/win32/common/common.vcxproj new file mode 100644 index 00000000..17116886 --- /dev/null +++ b/win32/common/common.vcxproj @@ -0,0 +1,148 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(VCTargetsPath11) + + + {0F863741-E1CE-4625-84DC-7AD205A63B6B} + Win32Proj + common + + + + StaticLibrary + true + v110 + Unicode + + + StaticLibrary + false + v110 + true + MultiByte + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) + true + CompileAsC + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/win32/common/common.vcxproj.filters b/win32/common/common.vcxproj.filters new file mode 100644 index 00000000..b4079efe --- /dev/null +++ b/win32/common/common.vcxproj.filters @@ -0,0 +1,197 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/win32/dirent-win32/dirent-win32.vcxproj b/win32/dirent-win32/dirent-win32.vcxproj new file mode 100644 index 00000000..c9223bef --- /dev/null +++ b/win32/dirent-win32/dirent-win32.vcxproj @@ -0,0 +1,88 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + + + $(VCTargetsPath11) + + + {969AA8C5-1655-4CAC-A83F-F651959CAA2F} + Win32Proj + direntwin32 + + + + StaticLibrary + true + v110 + Unicode + + + StaticLibrary + false + v110 + true + MultiByte + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + CompileAsC + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/win32/dirent-win32/dirent-win32.vcxproj.filters b/win32/dirent-win32/dirent-win32.vcxproj.filters new file mode 100644 index 00000000..d4d7e628 --- /dev/null +++ b/win32/dirent-win32/dirent-win32.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/win32/fe-gtk/fe-gtk.vcxproj b/win32/fe-gtk/fe-gtk.vcxproj new file mode 100644 index 00000000..0850e2fc --- /dev/null +++ b/win32/fe-gtk/fe-gtk.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(VCTargetsPath11) + + + {BFC7E652-7E90-441C-9BE5-F238B1912BFB} + Win32Proj + fegtk + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + MultiByte + + + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);$(Gtk) + true + CompileAsC + + + Windows + true + true + true + $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) + "$(DepsRoot)\lib";%(AdditionalLibraryDirectories) + mainCRTStartup + false + + + + + + \ No newline at end of file diff --git a/win32/fe-gtk/fe-gtk.vcxproj.filters b/win32/fe-gtk/fe-gtk.vcxproj.filters new file mode 100644 index 00000000..a99aa4de --- /dev/null +++ b/win32/fe-gtk/fe-gtk.vcxproj.filters @@ -0,0 +1,216 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Resource Files + + + + + Resource Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/win32/pixmaps/pixmaps.vcxproj b/win32/pixmaps/pixmaps.vcxproj new file mode 100644 index 00000000..78f86c1c --- /dev/null +++ b/win32/pixmaps/pixmaps.vcxproj @@ -0,0 +1,105 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + $(VCTargetsPath11) + + + {BBEA966D-9722-4CE3-B773-1AEC6E0234C3} + Win32Proj + pixmaps + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + MultiByte + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/pixmaps/pixmaps.vcxproj.filters b/win32/pixmaps/pixmaps.vcxproj.filters new file mode 100644 index 00000000..624f1ab6 --- /dev/null +++ b/win32/pixmaps/pixmaps.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/win32/version/version.c b/win32/version/version.c new file mode 100644 index 00000000..d9e1ef9f --- /dev/null +++ b/win32/version/version.c @@ -0,0 +1,144 @@ +/* XChat-WDK + * Copyright (c) 2011 Berke Viktor. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include "../../config.h" + +char * +comma () +{ + int major, minor; + char *version_string; /* nnnn,n,n,n format */ + + version_string = (char*) malloc (11); + + if (sscanf (PACKAGE_VERSION, "%d-%d", &major, &minor) > 1) + { + sprintf (version_string, "%d,%d,0,0", major, minor); + } else + { + sprintf (version_string, "%d,0,0,0", major); + } + + return version_string; +} + +char * +point () +{ + int major1, major2, major3, major4, minor; + char *version_string; /* nn.nn.nn.nn format */ + + version_string = (char*) malloc (12); + + if (sscanf (PACKAGE_VERSION, "%c%c%c%c-%d", &major1, &major2, &major3, &major4, &minor) > 4) + { + sprintf (version_string, "%c%c.%c%c.%d.0", major1, major2, major3, major4, minor); + } else + { + sprintf (version_string, "%c%c.%c%c.0.0", major1, major2, major3, major4); + } + + return version_string; +} + +int +main (int argc, char *argv[]) +{ + if (argc > 1) + { + if (!strcmp (argv[1], "-r")) /* xchat.rc/FILEVERSION, PRODUCTVERSION */ + { + printf ("#define COMMA_VERSION %s\n", comma ()); + } + else if (!strcmp (argv[1], "-a32")) /* xchat-wdk.iss/AppVerName */ + { + printf ("AppVerName=XChat-WDK %s (x86)\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-a64")) /* xchat-wdk.iss/AppVerName */ + { + printf ("AppVerName=XChat-WDK %s (x64)\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-v")) /* xchat-wdk.iss/AppVersion */ + { + printf ("AppVersion=%s\n", point ()); + } + else if (!strcmp (argv[1], "-i")) /* xchat-wdk.iss/VersionInfoVersion */ + { + printf ("VersionInfoVersion=%s\n", point ()); + } + else if (!strcmp (argv[1], "-o32")) /* xchat-wdk.iss/OutputBaseFilename */ + { + printf ("OutputBaseFilename=XChat-WDK %s x86\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-o64")) /* xchat-wdk.iss/OutputBaseFilename */ + { + printf ("OutputBaseFilename=XChat-WDK %s x64\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-v")) /* version.txt */ + { + printf ("%s", PACKAGE_VERSION); + } else + { + printf ("usage:\n\t-a\txchat-wdk.iss/AppVerName\n\t-i\txchat-wdk.iss/VersionInfoVersion\n\t-o\txchat-wdk.iss/OutputBaseFilename\n\t-r\txchat.rc/FILEVERSION, PRODUCTVERSION\n\t-v\txchat-wdk.iss/AppVersion\n"); + } + } else + { + printf ("usage:\n\t-a\txchat-wdk.iss/AppVerName\n\t-i\txchat-wdk.iss/VersionInfoVersion\n\t-o\txchat-wdk.iss/OutputBaseFilename\n\t-r\txchat.rc/FILEVERSION, PRODUCTVERSION\n\t-v\txchat-wdk.iss/AppVersion\n"); + } + +#if 0 /* ugly hack */ + switch ((int) argv[1][0]) + { + case 'r': /* xchat.rc/FILEVERSION, PRODUCTVERSION*/ + printf ("#define COMMA_VERSION \"%s\"\n", comma ()); + break; + case 'a': /* xchat-wdk.iss/AppVerName */ + printf ("AppVerName=XChat-WDK %s\n", PACKAGE_VERSION); + break; + case 'v': /* xchat-wdk.iss/AppVersion */ + printf ("AppVersion=%s\n", point ()); + break; + case 'i': /* xchat-wdk.iss/VersionInfoVersion */ + printf ("VersionInfoVersion=%s\n", point ()); + break; + case 'o': /* xchat-wdk.iss/OutputBaseFilename */ + printf ("OutputBaseFilename=XChat-WDK %s\n", PACKAGE_VERSION); + break; + case 'u': /* version.txt */ + printf ("%s", PACKAGE_VERSION); + break; + default: + printf ("use a, i, o, r or v.\n"); + break; + } +#endif + + return 0; +} diff --git a/win32/version/version.vcxproj b/win32/version/version.vcxproj new file mode 100644 index 00000000..0498c72f --- /dev/null +++ b/win32/version/version.vcxproj @@ -0,0 +1,93 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + $(VCTargetsPath11) + + + {B724C127-7151-421A-8CA0-3FBA6D96D8CE} + Win32Proj + version + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + MultiByte + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + CompileAsC + + + Console + true + true + true + + + "$(OutputPath)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" + + + + + + \ No newline at end of file diff --git a/win32/version/version.vcxproj.filters b/win32/version/version.vcxproj.filters new file mode 100644 index 00000000..decec7d0 --- /dev/null +++ b/win32/version/version.vcxproj.filters @@ -0,0 +1,14 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + \ No newline at end of file diff --git a/win32/xchat.props b/win32/xchat.props new file mode 100644 index 00000000..b322a088 --- /dev/null +++ b/win32/xchat.props @@ -0,0 +1,14 @@ + + + + + _CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;G_DISABLE_CAST_CHECKS;G_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;GDK_DISABLE_DEPRECATED;HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp + c:\mozilla-build\deps-root\$(PlatformName) + $(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2 + $(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0 + bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" xchatpng "$(SolutionDir)\..\xchat.png" + gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;intl.lib;libxml2.lib;libeay32.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib + + + + diff --git a/win32/xchat.sln b/win32/xchat.sln new file mode 100644 index 00000000..be2bc8f4 --- /dev/null +++ b/win32/xchat.sln @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dirent-win32", "dirent-win32\dirent-win32.vcxproj", "{969AA8C5-1655-4CAC-A83F-F651959CAA2F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcxproj", "{0F863741-E1CE-4625-84DC-7AD205A63B6B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fe-gtk", "fe-gtk\fe-gtk.vcxproj", "{BFC7E652-7E90-441C-9BE5-F238B1912BFB}" + ProjectSection(ProjectDependencies) = postProject + {0F863741-E1CE-4625-84DC-7AD205A63B6B} = {0F863741-E1CE-4625-84DC-7AD205A63B6B} + {969AA8C5-1655-4CAC-A83F-F651959CAA2F} = {969AA8C5-1655-4CAC-A83F-F651959CAA2F} + {B724C127-7151-421A-8CA0-3FBA6D96D8CE} = {B724C127-7151-421A-8CA0-3FBA6D96D8CE} + {BBEA966D-9722-4CE3-B773-1AEC6E0234C3} = {BBEA966D-9722-4CE3-B773-1AEC6E0234C3} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pixmaps", "pixmaps\pixmaps.vcxproj", "{BBEA966D-9722-4CE3-B773-1AEC6E0234C3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version\version.vcxproj", "{B724C127-7151-421A-8CA0-3FBA6D96D8CE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Debug|Win32.Build.0 = Debug|Win32 + {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Release|Win32.ActiveCfg = Release|Win32 + {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Release|Win32.Build.0 = Release|Win32 + {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Debug|Win32.Build.0 = Debug|Win32 + {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Release|Win32.ActiveCfg = Release|Win32 + {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Release|Win32.Build.0 = Release|Win32 + {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Debug|Win32.Build.0 = Debug|Win32 + {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Release|Win32.ActiveCfg = Release|Win32 + {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Release|Win32.Build.0 = Release|Win32 + {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Debug|Win32.ActiveCfg = Debug|Win32 + {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Debug|Win32.Build.0 = Debug|Win32 + {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Release|Win32.ActiveCfg = Release|Win32 + {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Release|Win32.Build.0 = Release|Win32 + {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Debug|Win32.ActiveCfg = Debug|Win32 + {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Debug|Win32.Build.0 = Debug|Win32 + {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Release|Win32.ActiveCfg = Release|Win32 + {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal -- cgit 1.4.1 From f480aed3c4e57db5919cb139dc7eb0f3ad953c56 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 3 Jun 2012 12:10:47 +0200 Subject: Oopsie --- src/common/xchat.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/common/xchat.h b/src/common/xchat.h index b4e652c9..540a7e1a 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -77,10 +77,6 @@ void *xchat_realloc (char *old, int len, char *file, int line); #define USERNAMELEN 10 #define HIDDEN_CHAR 8 /* invisible character for xtext */ -#ifdef __cplusplus -#define asdfasdf -#endif - #if defined(ENABLE_NLS) && !defined(_) # include # define _(x) gettext(x) -- cgit 1.4.1 From 9f7f85fa5dba59951a6d24e4721875a4bc2db18c Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 3 Jun 2012 14:22:51 +0200 Subject: Also check for executable name when restoring from tray via shortcut --- src/common/xchat.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/common/xchat.c b/src/common/xchat.c index 0cfd422e..845f262b 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -914,24 +914,31 @@ xchat_restore_window (HWND xchat_window) BOOL CALLBACK enum_windows_impl (HWND current_window, LPARAM lParam) { - TCHAR buffer[10]; - ZeroMemory (&buffer, sizeof (buffer)); + TCHAR window_name[10]; + TCHAR module_path[1024]; + ZeroMemory (&window_name, sizeof (window_name)); if (!current_window) { return TRUE; } - GetWindowText (current_window, buffer, 10); - if (stricmp (buffer, "xchat-wdk") == 0) /* We've found it, stop */ + GetWindowText (current_window, window_name, 10); + if (stricmp (window_name, "xchat-wdk") == 0) { - xchat_restore_window (current_window); - return FALSE; - } - else /* Keep searching */ - { - return TRUE; + /* 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, "xchat.exe")) /* We've found it, stop */ + { + xchat_restore_window (current_window); + return FALSE; + } } + + return TRUE; /* Keep searching */ + } #endif -- cgit 1.4.1 From eaa673182255fb261c91cab7c0ff16f7952b529a Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 10 Jun 2012 07:52:15 +0200 Subject: Migrate VS solution to VS2010+WDK7 --- src/common/common.vcxproj | 116 +++++++++++ src/common/common.vcxproj.filters | 194 ++++++++++++++++++ src/common/util.c | 2 +- src/dirent-win32/dirent-win32.c | 199 ------------------- src/dirent-win32/dirent-win32.h | 28 --- src/dirent/dirent-win32.c | 199 +++++++++++++++++++ src/dirent/dirent-win32.h | 28 +++ src/dirent/dirent.vcxproj | 60 ++++++ src/dirent/dirent.vcxproj.filters | 23 +++ src/fe-gtk/fe-gtk.vcxproj | 132 +++++++++++++ src/fe-gtk/fe-gtk.vcxproj.filters | 216 ++++++++++++++++++++ src/fe-text/fe-text.vcxproj | 64 ++++++ src/fe-text/fe-text.vcxproj.filters | 23 +++ src/pixmaps/pixmaps.vcxproj | 68 +++++++ src/pixmaps/pixmaps.vcxproj.filters | 41 ++++ src/version/version.c | 143 ++++++++++++++ src/version/version.vcxproj | 59 ++++++ src/version/version.vcxproj.filters | 14 ++ win32/common/common.vcxproj | 218 --------------------- win32/common/common.vcxproj.filters | 197 ------------------- win32/dirent-win32/dirent-win32.vcxproj | 156 --------------- win32/dirent-win32/dirent-win32.vcxproj.filters | 23 --- win32/fe-gtk/fe-gtk.vcxproj | 250 ------------------------ win32/fe-gtk/fe-gtk.vcxproj.filters | 216 -------------------- win32/pixmaps/pixmaps.vcxproj | 183 ----------------- win32/pixmaps/pixmaps.vcxproj.filters | 41 ---- win32/version/version.c | 144 -------------- win32/version/version.vcxproj | 168 ---------------- win32/version/version.vcxproj.filters | 14 -- win32/xchat.props | 2 +- win32/xchat.sln | 85 +++----- 31 files changed, 1412 insertions(+), 1894 deletions(-) create mode 100644 src/common/common.vcxproj create mode 100644 src/common/common.vcxproj.filters delete mode 100644 src/dirent-win32/dirent-win32.c delete mode 100644 src/dirent-win32/dirent-win32.h create mode 100644 src/dirent/dirent-win32.c create mode 100644 src/dirent/dirent-win32.h create mode 100644 src/dirent/dirent.vcxproj create mode 100644 src/dirent/dirent.vcxproj.filters create mode 100644 src/fe-gtk/fe-gtk.vcxproj create mode 100644 src/fe-gtk/fe-gtk.vcxproj.filters create mode 100644 src/fe-text/fe-text.vcxproj create mode 100644 src/fe-text/fe-text.vcxproj.filters create mode 100644 src/pixmaps/pixmaps.vcxproj create mode 100644 src/pixmaps/pixmaps.vcxproj.filters create mode 100644 src/version/version.c create mode 100644 src/version/version.vcxproj create mode 100644 src/version/version.vcxproj.filters delete mode 100644 win32/common/common.vcxproj delete mode 100644 win32/common/common.vcxproj.filters delete mode 100644 win32/dirent-win32/dirent-win32.vcxproj delete mode 100644 win32/dirent-win32/dirent-win32.vcxproj.filters delete mode 100644 win32/fe-gtk/fe-gtk.vcxproj delete mode 100644 win32/fe-gtk/fe-gtk.vcxproj.filters delete mode 100644 win32/pixmaps/pixmaps.vcxproj delete mode 100644 win32/pixmaps/pixmaps.vcxproj.filters delete mode 100644 win32/version/version.c delete mode 100644 win32/version/version.vcxproj delete mode 100644 win32/version/version.vcxproj.filters (limited to 'src') diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj new file mode 100644 index 00000000..f0a730b7 --- /dev/null +++ b/src/common/common.vcxproj @@ -0,0 +1,116 @@ + + + + + Release + Win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {87554B59-006C-4D94-9714-897B27067BA3} + Win32Proj + common + + + + StaticLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/src/common/common.vcxproj.filters b/src/common/common.vcxproj.filters new file mode 100644 index 00000000..afb66e63 --- /dev/null +++ b/src/common/common.vcxproj.filters @@ -0,0 +1,194 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/src/common/util.c b/src/common/util.c index a79e343b..73e1b29a 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -32,7 +32,7 @@ #include #include #include -#include "../dirent-win32/dirent-win32.h" +#include "../dirent/dirent-win32.h" #else #include #include diff --git a/src/dirent-win32/dirent-win32.c b/src/dirent-win32/dirent-win32.c deleted file mode 100644 index 273c6732..00000000 --- a/src/dirent-win32/dirent-win32.c +++ /dev/null @@ -1,199 +0,0 @@ -/***************************************************************************** - * dirent.h - dirent API for Microsoft Visual Studio - * - * Copyright (C) 2006 Toni Ronkko - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * ``Software''), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Dec 15, 2009, John Cunningham - * Added rewinddir member function - * - * Jan 18, 2008, Toni Ronkko - * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string - * between multi-byte and unicode representations. This makes the - * code simpler and also allows the code to be compiled under MingW. Thanks - * to Azriel Fasten for the suggestion. - * - * Mar 4, 2007, Toni Ronkko - * Bug fix: due to the strncpy_s() function this file only compiled in - * Visual Studio 2005. Using the new string functions only when the - * compiler version allows. - * - * Nov 2, 2006, Toni Ronkko - * Major update: removed support for Watcom C, MS-DOS and Turbo C to - * simplify the file, updated the code to compile cleanly on Visual - * Studio 2005 with both unicode and multi-byte character strings, - * removed rewinddir() as it had a bug. - * - * Aug 20, 2006, Toni Ronkko - * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified - * comments by removing SGML tags. - * - * May 14 2002, Toni Ronkko - * Embedded the function definitions directly to the header so that no - * source modules need to be included in the Visual Studio project. Removed - * all the dependencies to other projects so that this very header can be - * used independently. - * - * May 28 1998, Toni Ronkko - * First version. - *****************************************************************************/ - -#include "dirent-win32.h" - -/* Use the new safe string functions introduced in Visual Studio 2005 */ -#if defined(_MSC_VER) && _MSC_VER >= 1400 -# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) -#else -# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) -#endif - - -/***************************************************************************** - * Open directory stream DIRNAME for read and return a pointer to the - * internal working area that is used to retrieve individual directory - * entries. - */ -DIR *opendir(const char *dirname) -{ - DIR *dirp; - assert (dirname != NULL); - assert (strlen (dirname) < MAX_PATH); - - /* construct new DIR structure */ - dirp = (DIR*) malloc (sizeof (struct DIR)); - if (dirp != NULL) { - char *p; - - /* take directory name... */ - STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); - dirp->patt[MAX_PATH] = '\0'; - - /* ... and append search pattern to it */ - p = strchr (dirp->patt, '\0'); - if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { - *p++ = '\\'; - } - *p++ = '*'; - *p = '\0'; - - /* open stream and retrieve first file */ - dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* invalid search pattern? */ - free (dirp); - return NULL; - } - - /* there is an un-processed directory entry in memory now */ - dirp->cached = 1; - } - - return dirp; -} - - -/***************************************************************************** - * Read a directory entry, and return a pointer to a dirent structure - * containing the name of the entry in d_name field. Individual directory - * entries returned by this very function include regular files, - * sub-directories, pseudo-directories "." and "..", but also volume labels, - * hidden files and system files may be returned. - */ -struct dirent *readdir(DIR *dirp) -{ - assert (dirp != NULL); - - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* directory stream was opened/rewound incorrectly or ended normally */ - return NULL; - } - - /* get next directory entry */ - if (dirp->cached != 0) { - /* a valid directory entry already in memory */ - dirp->cached = 0; - } else { - /* read next directory entry from disk */ - if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { - /* the very last file has been processed or an error occured */ - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - return NULL; - } - } - - /* copy as a multibyte character string */ - STRNCPY ( dirp->current.d_name, - dirp->current.data.cFileName, - sizeof(dirp->current.d_name) ); - dirp->current.d_name[MAX_PATH] = '\0'; - - return &dirp->current; -} - - -/***************************************************************************** - * Close directory stream opened by opendir() function. Close of the - * directory stream invalidates the DIR structure as well as any previously - * read directory entry. - */ -int closedir(DIR *dirp) -{ - assert (dirp != NULL); - - /* release search handle */ - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - } - - /* release directory handle */ - free (dirp); - return 0; -} - - -/***************************************************************************** - * Resets the position of the directory stream to which dirp refers to the - * beginning of the directory. It also causes the directory stream to refer - * to the current state of the corresponding directory, as a call to opendir() - * would have done. If dirp does not refer to a directory stream, the effect - * is undefined. - */ -void rewinddir(DIR* dirp) -{ - /* release search handle */ - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - } - - /* open new search handle and retrieve first file */ - dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* invalid search pattern? */ - free (dirp); - return; - } - - /* there is an un-processed directory entry in memory now */ - dirp->cached = 1; -} diff --git a/src/dirent-win32/dirent-win32.h b/src/dirent-win32/dirent-win32.h deleted file mode 100644 index cbb753e6..00000000 --- a/src/dirent-win32/dirent-win32.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef DIRENT_H -#define DIRENT_H - -#include -#include -#include - -typedef struct dirent -{ - char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ - WIN32_FIND_DATAA data; /* file attributes */ -} dirent; - -typedef struct DIR -{ - dirent current; /* Current directory entry */ - int cached; /* Indicates un-processed entry in memory */ - HANDLE search_handle; /* File search handle */ - char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ -} DIR; - -/* Forward declarations */ -DIR *opendir (const char *dirname); -struct dirent *readdir (DIR *dirp); -int closedir (DIR *dirp); -void rewinddir(DIR* dirp); - -#endif /*DIRENT_H*/ diff --git a/src/dirent/dirent-win32.c b/src/dirent/dirent-win32.c new file mode 100644 index 00000000..273c6732 --- /dev/null +++ b/src/dirent/dirent-win32.c @@ -0,0 +1,199 @@ +/***************************************************************************** + * dirent.h - dirent API for Microsoft Visual Studio + * + * Copyright (C) 2006 Toni Ronkko + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * ``Software''), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Dec 15, 2009, John Cunningham + * Added rewinddir member function + * + * Jan 18, 2008, Toni Ronkko + * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string + * between multi-byte and unicode representations. This makes the + * code simpler and also allows the code to be compiled under MingW. Thanks + * to Azriel Fasten for the suggestion. + * + * Mar 4, 2007, Toni Ronkko + * Bug fix: due to the strncpy_s() function this file only compiled in + * Visual Studio 2005. Using the new string functions only when the + * compiler version allows. + * + * Nov 2, 2006, Toni Ronkko + * Major update: removed support for Watcom C, MS-DOS and Turbo C to + * simplify the file, updated the code to compile cleanly on Visual + * Studio 2005 with both unicode and multi-byte character strings, + * removed rewinddir() as it had a bug. + * + * Aug 20, 2006, Toni Ronkko + * Removed all remarks about MSVC 1.0, which is antiqued now. Simplified + * comments by removing SGML tags. + * + * May 14 2002, Toni Ronkko + * Embedded the function definitions directly to the header so that no + * source modules need to be included in the Visual Studio project. Removed + * all the dependencies to other projects so that this very header can be + * used independently. + * + * May 28 1998, Toni Ronkko + * First version. + *****************************************************************************/ + +#include "dirent-win32.h" + +/* Use the new safe string functions introduced in Visual Studio 2005 */ +#if defined(_MSC_VER) && _MSC_VER >= 1400 +# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) +#else +# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) +#endif + + +/***************************************************************************** + * Open directory stream DIRNAME for read and return a pointer to the + * internal working area that is used to retrieve individual directory + * entries. + */ +DIR *opendir(const char *dirname) +{ + DIR *dirp; + assert (dirname != NULL); + assert (strlen (dirname) < MAX_PATH); + + /* construct new DIR structure */ + dirp = (DIR*) malloc (sizeof (struct DIR)); + if (dirp != NULL) { + char *p; + + /* take directory name... */ + STRNCPY (dirp->patt, dirname, sizeof(dirp->patt)); + dirp->patt[MAX_PATH] = '\0'; + + /* ... and append search pattern to it */ + p = strchr (dirp->patt, '\0'); + if (dirp->patt < p && *(p-1) != '\\' && *(p-1) != ':') { + *p++ = '\\'; + } + *p++ = '*'; + *p = '\0'; + + /* open stream and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return NULL; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; + } + + return dirp; +} + + +/***************************************************************************** + * Read a directory entry, and return a pointer to a dirent structure + * containing the name of the entry in d_name field. Individual directory + * entries returned by this very function include regular files, + * sub-directories, pseudo-directories "." and "..", but also volume labels, + * hidden files and system files may be returned. + */ +struct dirent *readdir(DIR *dirp) +{ + assert (dirp != NULL); + + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* directory stream was opened/rewound incorrectly or ended normally */ + return NULL; + } + + /* get next directory entry */ + if (dirp->cached != 0) { + /* a valid directory entry already in memory */ + dirp->cached = 0; + } else { + /* read next directory entry from disk */ + if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) { + /* the very last file has been processed or an error occured */ + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + return NULL; + } + } + + /* copy as a multibyte character string */ + STRNCPY ( dirp->current.d_name, + dirp->current.data.cFileName, + sizeof(dirp->current.d_name) ); + dirp->current.d_name[MAX_PATH] = '\0'; + + return &dirp->current; +} + + +/***************************************************************************** + * Close directory stream opened by opendir() function. Close of the + * directory stream invalidates the DIR structure as well as any previously + * read directory entry. + */ +int closedir(DIR *dirp) +{ + assert (dirp != NULL); + + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* release directory handle */ + free (dirp); + return 0; +} + + +/***************************************************************************** + * Resets the position of the directory stream to which dirp refers to the + * beginning of the directory. It also causes the directory stream to refer + * to the current state of the corresponding directory, as a call to opendir() + * would have done. If dirp does not refer to a directory stream, the effect + * is undefined. + */ +void rewinddir(DIR* dirp) +{ + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* open new search handle and retrieve first file */ + dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free (dirp); + return; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; +} diff --git a/src/dirent/dirent-win32.h b/src/dirent/dirent-win32.h new file mode 100644 index 00000000..cbb753e6 --- /dev/null +++ b/src/dirent/dirent-win32.h @@ -0,0 +1,28 @@ +#ifndef DIRENT_H +#define DIRENT_H + +#include +#include +#include + +typedef struct dirent +{ + char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ + WIN32_FIND_DATAA data; /* file attributes */ +} dirent; + +typedef struct DIR +{ + dirent current; /* Current directory entry */ + int cached; /* Indicates un-processed entry in memory */ + HANDLE search_handle; /* File search handle */ + char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ +} DIR; + +/* Forward declarations */ +DIR *opendir (const char *dirname); +struct dirent *readdir (DIR *dirp); +int closedir (DIR *dirp); +void rewinddir(DIR* dirp); + +#endif /*DIRENT_H*/ diff --git a/src/dirent/dirent.vcxproj b/src/dirent/dirent.vcxproj new file mode 100644 index 00000000..65fa2fb0 --- /dev/null +++ b/src/dirent/dirent.vcxproj @@ -0,0 +1,60 @@ + + + + + Release + Win32 + + + + + + + + + + {98B56DF9-E4F1-4696-A565-5F7823CF214D} + Win32Proj + dirent + + + + StaticLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + $(ProjectName)-win32 + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/src/dirent/dirent.vcxproj.filters b/src/dirent/dirent.vcxproj.filters new file mode 100644 index 00000000..d889015d --- /dev/null +++ b/src/dirent/dirent.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Header Files + + + + + Source Files + + + \ No newline at end of file diff --git a/src/fe-gtk/fe-gtk.vcxproj b/src/fe-gtk/fe-gtk.vcxproj new file mode 100644 index 00000000..deb76c27 --- /dev/null +++ b/src/fe-gtk/fe-gtk.vcxproj @@ -0,0 +1,132 @@ + + + + + Release + Win32 + + + + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82} + Win32Proj + fegtk + + + + Application + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xchat + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) + mainCRTStartup + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/fe-gtk/fe-gtk.vcxproj.filters b/src/fe-gtk/fe-gtk.vcxproj.filters new file mode 100644 index 00000000..0e2e830b --- /dev/null +++ b/src/fe-gtk/fe-gtk.vcxproj.filters @@ -0,0 +1,216 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/src/fe-text/fe-text.vcxproj b/src/fe-text/fe-text.vcxproj new file mode 100644 index 00000000..389c7b5e --- /dev/null +++ b/src/fe-text/fe-text.vcxproj @@ -0,0 +1,64 @@ + + + + + Release + Win32 + + + + {E93E1255-95D1-4B08-8FDF-B53CC6A21280} + Win32Proj + fetext + + + + Application + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xchat-text + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + + + + + + + + + + + \ No newline at end of file diff --git a/src/fe-text/fe-text.vcxproj.filters b/src/fe-text/fe-text.vcxproj.filters new file mode 100644 index 00000000..e8a4bcc5 --- /dev/null +++ b/src/fe-text/fe-text.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Header Files + + + + + Source Files + + + \ No newline at end of file diff --git a/src/pixmaps/pixmaps.vcxproj b/src/pixmaps/pixmaps.vcxproj new file mode 100644 index 00000000..39151d5a --- /dev/null +++ b/src/pixmaps/pixmaps.vcxproj @@ -0,0 +1,68 @@ + + + + + Release + Win32 + + + + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642} + Win32Proj + pixmaps + + + + Application + false + true + MultiByte + WDK7 + + + + + + + + + + + false + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/pixmaps/pixmaps.vcxproj.filters b/src/pixmaps/pixmaps.vcxproj.filters new file mode 100644 index 00000000..aca4cd4b --- /dev/null +++ b/src/pixmaps/pixmaps.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/src/version/version.c b/src/version/version.c new file mode 100644 index 00000000..14312a43 --- /dev/null +++ b/src/version/version.c @@ -0,0 +1,143 @@ +/* XChat-WDK + * Copyright (c) 2011 Berke Viktor. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include "../../config.h" + +char * +comma () +{ + int major, minor; + char *version_string; /* nnnn,n,n,n format */ + + version_string = (char*) malloc (11); + + if (sscanf (PACKAGE_VERSION, "%d-%d", &major, &minor) > 1) + { + sprintf (version_string, "%d,%d,0,0", major, minor); + } else + { + sprintf (version_string, "%d,0,0,0", major); + } + + return version_string; +} + +char * +point () +{ + int major1, major2, major3, major4, minor; + char *version_string; /* nn.nn.nn.nn format */ + + version_string = (char*) malloc (12); + + if (sscanf (PACKAGE_VERSION, "%c%c%c%c-%d", &major1, &major2, &major3, &major4, &minor) > 4) + { + sprintf (version_string, "%c%c.%c%c.%d.0", major1, major2, major3, major4, minor); + } else + { + sprintf (version_string, "%c%c.%c%c.0.0", major1, major2, major3, major4); + } + + return version_string; +} + +int +main (int argc, char *argv[]) +{ + if (argc > 1) + { + if (!strcmp (argv[1], "-r")) /* xchat.rc/FILEVERSION, PRODUCTVERSION */ + { + printf ("#define COMMA_VERSION %s\n", comma ()); + } + else if (!strcmp (argv[1], "-a32")) /* xchat-wdk.iss/AppVerName */ + { + printf ("AppVerName=XChat-WDK %s (x86)\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-a64")) /* xchat-wdk.iss/AppVerName */ + { + printf ("AppVerName=XChat-WDK %s (x64)\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-v")) /* xchat-wdk.iss/AppVersion */ + { + printf ("AppVersion=%s\n", point ()); + } + else if (!strcmp (argv[1], "-i")) /* xchat-wdk.iss/VersionInfoVersion */ + { + printf ("VersionInfoVersion=%s\n", point ()); + } + else if (!strcmp (argv[1], "-o32")) /* xchat-wdk.iss/OutputBaseFilename */ + { + printf ("OutputBaseFilename=XChat-WDK %s x86\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-o64")) /* xchat-wdk.iss/OutputBaseFilename */ + { + printf ("OutputBaseFilename=XChat-WDK %s x64\n", PACKAGE_VERSION); + } + else if (!strcmp (argv[1], "-v")) /* version.txt */ + { + printf ("%s", PACKAGE_VERSION); + } else + { + printf ("usage:\n\t-a\txchat-wdk.iss/AppVerName\n\t-i\txchat-wdk.iss/VersionInfoVersion\n\t-o\txchat-wdk.iss/OutputBaseFilename\n\t-r\txchat.rc/FILEVERSION, PRODUCTVERSION\n\t-v\txchat-wdk.iss/AppVersion\n"); + } + } else + { + printf ("usage:\n\t-a\txchat-wdk.iss/AppVerName\n\t-i\txchat-wdk.iss/VersionInfoVersion\n\t-o\txchat-wdk.iss/OutputBaseFilename\n\t-r\txchat.rc/FILEVERSION, PRODUCTVERSION\n\t-v\txchat-wdk.iss/AppVersion\n"); + } + +#if 0 /* ugly hack */ + switch ((int) argv[1][0]) + { + case 'r': /* xchat.rc/FILEVERSION, PRODUCTVERSION*/ + printf ("#define COMMA_VERSION \"%s\"\n", comma ()); + break; + case 'a': /* xchat-wdk.iss/AppVerName */ + printf ("AppVerName=XChat-WDK %s\n", PACKAGE_VERSION); + break; + case 'v': /* xchat-wdk.iss/AppVersion */ + printf ("AppVersion=%s\n", point ()); + break; + case 'i': /* xchat-wdk.iss/VersionInfoVersion */ + printf ("VersionInfoVersion=%s\n", point ()); + break; + case 'o': /* xchat-wdk.iss/OutputBaseFilename */ + printf ("OutputBaseFilename=XChat-WDK %s\n", PACKAGE_VERSION); + break; + case 'u': /* version.txt */ + printf ("%s", PACKAGE_VERSION); + break; + default: + printf ("use a, i, o, r or v.\n"); + break; + } +#endif + + return 0; +} diff --git a/src/version/version.vcxproj b/src/version/version.vcxproj new file mode 100644 index 00000000..e6d510f8 --- /dev/null +++ b/src/version/version.vcxproj @@ -0,0 +1,59 @@ + + + + + Release + Win32 + + + + {6CD3647E-4541-4849-9DD7-C8816665AE42} + Win32Proj + version + + + + Application + false + true + MultiByte + WDK7 + + + + + + + + + + + false + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + "$(OutputPath)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" + + + + + + + + + \ No newline at end of file diff --git a/src/version/version.vcxproj.filters b/src/version/version.vcxproj.filters new file mode 100644 index 00000000..decec7d0 --- /dev/null +++ b/src/version/version.vcxproj.filters @@ -0,0 +1,14 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + \ No newline at end of file diff --git a/win32/common/common.vcxproj b/win32/common/common.vcxproj deleted file mode 100644 index a7e9eea9..00000000 --- a/win32/common/common.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(VCTargetsPath11) - - - {0F863741-E1CE-4625-84DC-7AD205A63B6B} - Win32Proj - common - - - - StaticLibrary - true - v110 - MultiByte - - - StaticLibrary - true - v110 - MultiByte - - - StaticLibrary - false - v110 - true - MultiByte - - - StaticLibrary - false - v110 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) - true - CompileAsC - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) - true - CompileAsC - - - Windows - true - - - - - Level1 - - - MinSpace - true - true - WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) - true - CompileAsC - Size - - - Windows - true - true - true - - - - - Level1 - - - MinSpace - true - true - WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) - true - CompileAsC - Size - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/win32/common/common.vcxproj.filters b/win32/common/common.vcxproj.filters deleted file mode 100644 index b4079efe..00000000 --- a/win32/common/common.vcxproj.filters +++ /dev/null @@ -1,197 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/win32/dirent-win32/dirent-win32.vcxproj b/win32/dirent-win32/dirent-win32.vcxproj deleted file mode 100644 index 8dfcf35e..00000000 --- a/win32/dirent-win32/dirent-win32.vcxproj +++ /dev/null @@ -1,156 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - $(VCTargetsPath11) - - - {969AA8C5-1655-4CAC-A83F-F651959CAA2F} - Win32Proj - direntwin32 - - - - StaticLibrary - true - v110 - MultiByte - - - StaticLibrary - true - v110 - MultiByte - - - StaticLibrary - false - v110 - true - MultiByte - - - StaticLibrary - false - v110 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - CompileAsC - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - CompileAsC - - - Windows - true - - - - - Level1 - - - MinSpace - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - CompileAsC - true - Size - - - Windows - true - true - true - - - - - Level1 - - - MinSpace - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - CompileAsC - true - Size - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/win32/dirent-win32/dirent-win32.vcxproj.filters b/win32/dirent-win32/dirent-win32.vcxproj.filters deleted file mode 100644 index d4d7e628..00000000 --- a/win32/dirent-win32/dirent-win32.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/win32/fe-gtk/fe-gtk.vcxproj b/win32/fe-gtk/fe-gtk.vcxproj deleted file mode 100644 index cf1bb5e2..00000000 --- a/win32/fe-gtk/fe-gtk.vcxproj +++ /dev/null @@ -1,250 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(VCTargetsPath11) - - - {BFC7E652-7E90-441C-9BE5-F238B1912BFB} - Win32Proj - fegtk - - - - Application - true - v110 - MultiByte - - - Application - true - v110 - MultiByte - - - Application - false - v110 - true - MultiByte - - - Application - false - v110 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories) - true - CompileAsC - - - Windows - true - "$(DepsRoot)\lib";%(AdditionalLibraryDirectories) - $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) - mainCRTStartup - false - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories) - true - CompileAsC - - - Windows - true - "$(DepsRoot)\lib";%(AdditionalLibraryDirectories) - $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) - mainCRTStartup - false - - - - - Level1 - NotUsing - MinSpace - true - true - WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories) - true - CompileAsC - Size - - - Windows - true - true - true - $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) - "$(DepsRoot)\lib";%(AdditionalLibraryDirectories) - mainCRTStartup - false - - - - - Level1 - NotUsing - MinSpace - true - true - WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions) - $(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories) - true - CompileAsC - Size - - - Windows - true - true - true - $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) - "$(DepsRoot)\lib";%(AdditionalLibraryDirectories) - mainCRTStartup - false - - - - - - \ No newline at end of file diff --git a/win32/fe-gtk/fe-gtk.vcxproj.filters b/win32/fe-gtk/fe-gtk.vcxproj.filters deleted file mode 100644 index a99aa4de..00000000 --- a/win32/fe-gtk/fe-gtk.vcxproj.filters +++ /dev/null @@ -1,216 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Resource Files - - - - - Resource Files - - - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/win32/pixmaps/pixmaps.vcxproj b/win32/pixmaps/pixmaps.vcxproj deleted file mode 100644 index 661d492d..00000000 --- a/win32/pixmaps/pixmaps.vcxproj +++ /dev/null @@ -1,183 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - $(VCTargetsPath11) - - - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3} - Win32Proj - pixmaps - - - - Application - true - v110 - MultiByte - - - Application - true - v110 - MultiByte - - - Application - false - v110 - true - MultiByte - - - Application - false - v110 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - - - "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - - - "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - true - true - - - - - - - "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - true - true - - - - - - - "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32/pixmaps/pixmaps.vcxproj.filters b/win32/pixmaps/pixmaps.vcxproj.filters deleted file mode 100644 index 624f1ab6..00000000 --- a/win32/pixmaps/pixmaps.vcxproj.filters +++ /dev/null @@ -1,41 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/win32/version/version.c b/win32/version/version.c deleted file mode 100644 index d9e1ef9f..00000000 --- a/win32/version/version.c +++ /dev/null @@ -1,144 +0,0 @@ -/* XChat-WDK - * Copyright (c) 2011 Berke Viktor. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include "../../config.h" - -char * -comma () -{ - int major, minor; - char *version_string; /* nnnn,n,n,n format */ - - version_string = (char*) malloc (11); - - if (sscanf (PACKAGE_VERSION, "%d-%d", &major, &minor) > 1) - { - sprintf (version_string, "%d,%d,0,0", major, minor); - } else - { - sprintf (version_string, "%d,0,0,0", major); - } - - return version_string; -} - -char * -point () -{ - int major1, major2, major3, major4, minor; - char *version_string; /* nn.nn.nn.nn format */ - - version_string = (char*) malloc (12); - - if (sscanf (PACKAGE_VERSION, "%c%c%c%c-%d", &major1, &major2, &major3, &major4, &minor) > 4) - { - sprintf (version_string, "%c%c.%c%c.%d.0", major1, major2, major3, major4, minor); - } else - { - sprintf (version_string, "%c%c.%c%c.0.0", major1, major2, major3, major4); - } - - return version_string; -} - -int -main (int argc, char *argv[]) -{ - if (argc > 1) - { - if (!strcmp (argv[1], "-r")) /* xchat.rc/FILEVERSION, PRODUCTVERSION */ - { - printf ("#define COMMA_VERSION %s\n", comma ()); - } - else if (!strcmp (argv[1], "-a32")) /* xchat-wdk.iss/AppVerName */ - { - printf ("AppVerName=XChat-WDK %s (x86)\n", PACKAGE_VERSION); - } - else if (!strcmp (argv[1], "-a64")) /* xchat-wdk.iss/AppVerName */ - { - printf ("AppVerName=XChat-WDK %s (x64)\n", PACKAGE_VERSION); - } - else if (!strcmp (argv[1], "-v")) /* xchat-wdk.iss/AppVersion */ - { - printf ("AppVersion=%s\n", point ()); - } - else if (!strcmp (argv[1], "-i")) /* xchat-wdk.iss/VersionInfoVersion */ - { - printf ("VersionInfoVersion=%s\n", point ()); - } - else if (!strcmp (argv[1], "-o32")) /* xchat-wdk.iss/OutputBaseFilename */ - { - printf ("OutputBaseFilename=XChat-WDK %s x86\n", PACKAGE_VERSION); - } - else if (!strcmp (argv[1], "-o64")) /* xchat-wdk.iss/OutputBaseFilename */ - { - printf ("OutputBaseFilename=XChat-WDK %s x64\n", PACKAGE_VERSION); - } - else if (!strcmp (argv[1], "-v")) /* version.txt */ - { - printf ("%s", PACKAGE_VERSION); - } else - { - printf ("usage:\n\t-a\txchat-wdk.iss/AppVerName\n\t-i\txchat-wdk.iss/VersionInfoVersion\n\t-o\txchat-wdk.iss/OutputBaseFilename\n\t-r\txchat.rc/FILEVERSION, PRODUCTVERSION\n\t-v\txchat-wdk.iss/AppVersion\n"); - } - } else - { - printf ("usage:\n\t-a\txchat-wdk.iss/AppVerName\n\t-i\txchat-wdk.iss/VersionInfoVersion\n\t-o\txchat-wdk.iss/OutputBaseFilename\n\t-r\txchat.rc/FILEVERSION, PRODUCTVERSION\n\t-v\txchat-wdk.iss/AppVersion\n"); - } - -#if 0 /* ugly hack */ - switch ((int) argv[1][0]) - { - case 'r': /* xchat.rc/FILEVERSION, PRODUCTVERSION*/ - printf ("#define COMMA_VERSION \"%s\"\n", comma ()); - break; - case 'a': /* xchat-wdk.iss/AppVerName */ - printf ("AppVerName=XChat-WDK %s\n", PACKAGE_VERSION); - break; - case 'v': /* xchat-wdk.iss/AppVersion */ - printf ("AppVersion=%s\n", point ()); - break; - case 'i': /* xchat-wdk.iss/VersionInfoVersion */ - printf ("VersionInfoVersion=%s\n", point ()); - break; - case 'o': /* xchat-wdk.iss/OutputBaseFilename */ - printf ("OutputBaseFilename=XChat-WDK %s\n", PACKAGE_VERSION); - break; - case 'u': /* version.txt */ - printf ("%s", PACKAGE_VERSION); - break; - default: - printf ("use a, i, o, r or v.\n"); - break; - } -#endif - - return 0; -} diff --git a/win32/version/version.vcxproj b/win32/version/version.vcxproj deleted file mode 100644 index 86f443be..00000000 --- a/win32/version/version.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - $(VCTargetsPath11) - - - {B724C127-7151-421A-8CA0-3FBA6D96D8CE} - Win32Proj - version - - - - Application - true - v110 - MultiByte - - - Application - true - v110 - MultiByte - - - Application - false - v110 - true - MultiByte - - - Application - false - v110 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - CompileAsC - - - Console - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - CompileAsC - - - Console - true - - - - - Level1 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - CompileAsC - true - - - Console - true - true - true - - - "$(OutputPath)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" - - - - - Level1 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - CompileAsC - true - - - Console - true - true - true - - - "$(OutputPath)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" - - - - - - \ No newline at end of file diff --git a/win32/version/version.vcxproj.filters b/win32/version/version.vcxproj.filters deleted file mode 100644 index decec7d0..00000000 --- a/win32/version/version.vcxproj.filters +++ /dev/null @@ -1,14 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - \ No newline at end of file diff --git a/win32/xchat.props b/win32/xchat.props index 9e2607d3..09f26df0 100644 --- a/win32/xchat.props +++ b/win32/xchat.props @@ -5,7 +5,7 @@ c:\mozilla-build\deps root - _CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;G_DISABLE_CAST_CHECKS;G_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;GDK_DISABLE_DEPRECATED;HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp + _CRT_SECURE_NO_WARNINGS;G_DISABLE_CAST_CHECKS;G_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;GDK_DISABLE_DEPRECATED;HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp $(YourDepsFolder)\$(PlatformName) $(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2 $(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0 diff --git a/win32/xchat.sln b/win32/xchat.sln index 1c13a18e..430e3d60 100644 --- a/win32/xchat.sln +++ b/win32/xchat.sln @@ -1,70 +1,45 @@  -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dirent-win32", "dirent-win32\dirent-win32.vcxproj", "{969AA8C5-1655-4CAC-A83F-F651959CAA2F}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\src\common\common.vcxproj", "{87554B59-006C-4D94-9714-897B27067BA3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcxproj", "{0F863741-E1CE-4625-84DC-7AD205A63B6B}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dirent", "..\src\dirent\dirent.vcxproj", "{98B56DF9-E4F1-4696-A565-5F7823CF214D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fe-gtk", "fe-gtk\fe-gtk.vcxproj", "{BFC7E652-7E90-441C-9BE5-F238B1912BFB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pixmaps", "..\src\pixmaps\pixmaps.vcxproj", "{626DA61C-FA8B-474C-B2F5-72AD9DFEE642}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "..\src\version\version.vcxproj", "{6CD3647E-4541-4849-9DD7-C8816665AE42}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fe-gtk", "..\src\fe-gtk\fe-gtk.vcxproj", "{E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}" ProjectSection(ProjectDependencies) = postProject - {0F863741-E1CE-4625-84DC-7AD205A63B6B} = {0F863741-E1CE-4625-84DC-7AD205A63B6B} - {969AA8C5-1655-4CAC-A83F-F651959CAA2F} = {969AA8C5-1655-4CAC-A83F-F651959CAA2F} - {B724C127-7151-421A-8CA0-3FBA6D96D8CE} = {B724C127-7151-421A-8CA0-3FBA6D96D8CE} - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3} = {BBEA966D-9722-4CE3-B773-1AEC6E0234C3} + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642} = {626DA61C-FA8B-474C-B2F5-72AD9DFEE642} + {87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3} + {6CD3647E-4541-4849-9DD7-C8816665AE42} = {6CD3647E-4541-4849-9DD7-C8816665AE42} + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pixmaps", "pixmaps\pixmaps.vcxproj", "{BBEA966D-9722-4CE3-B773-1AEC6E0234C3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version\version.vcxproj", "{B724C127-7151-421A-8CA0-3FBA6D96D8CE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fe-text", "..\src\fe-text\fe-text.vcxproj", "{E93E1255-95D1-4B08-8FDF-B53CC6A21280}" + ProjectSection(ProjectDependencies) = postProject + {87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3} + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 - Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Debug|Win32.Build.0 = Debug|Win32 - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Debug|x64.ActiveCfg = Debug|x64 - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Debug|x64.Build.0 = Debug|x64 - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Release|Win32.ActiveCfg = Release|Win32 - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Release|Win32.Build.0 = Release|Win32 - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Release|x64.ActiveCfg = Release|x64 - {0F863741-E1CE-4625-84DC-7AD205A63B6B}.Release|x64.Build.0 = Release|x64 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Debug|Win32.Build.0 = Debug|Win32 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Debug|x64.ActiveCfg = Debug|x64 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Debug|x64.Build.0 = Debug|x64 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Release|Win32.ActiveCfg = Release|Win32 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Release|Win32.Build.0 = Release|Win32 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Release|x64.ActiveCfg = Release|x64 - {969AA8C5-1655-4CAC-A83F-F651959CAA2F}.Release|x64.Build.0 = Release|x64 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Debug|Win32.Build.0 = Debug|Win32 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Debug|x64.ActiveCfg = Debug|x64 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Debug|x64.Build.0 = Debug|x64 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Release|Win32.ActiveCfg = Release|Win32 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Release|Win32.Build.0 = Release|Win32 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Release|x64.ActiveCfg = Release|x64 - {B724C127-7151-421A-8CA0-3FBA6D96D8CE}.Release|x64.Build.0 = Release|x64 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Debug|Win32.ActiveCfg = Debug|Win32 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Debug|Win32.Build.0 = Debug|Win32 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Debug|x64.ActiveCfg = Debug|x64 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Debug|x64.Build.0 = Debug|x64 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Release|Win32.ActiveCfg = Release|Win32 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Release|Win32.Build.0 = Release|Win32 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Release|x64.ActiveCfg = Release|x64 - {BBEA966D-9722-4CE3-B773-1AEC6E0234C3}.Release|x64.Build.0 = Release|x64 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Debug|Win32.Build.0 = Debug|Win32 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Debug|x64.ActiveCfg = Debug|x64 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Debug|x64.Build.0 = Debug|x64 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Release|Win32.ActiveCfg = Release|Win32 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Release|Win32.Build.0 = Release|Win32 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Release|x64.ActiveCfg = Release|x64 - {BFC7E652-7E90-441C-9BE5-F238B1912BFB}.Release|x64.Build.0 = Release|x64 + {87554B59-006C-4D94-9714-897B27067BA3}.Release|Win32.ActiveCfg = Release|Win32 + {87554B59-006C-4D94-9714-897B27067BA3}.Release|Win32.Build.0 = Release|Win32 + {98B56DF9-E4F1-4696-A565-5F7823CF214D}.Release|Win32.ActiveCfg = Release|Win32 + {98B56DF9-E4F1-4696-A565-5F7823CF214D}.Release|Win32.Build.0 = Release|Win32 + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642}.Release|Win32.ActiveCfg = Release|Win32 + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642}.Release|Win32.Build.0 = Release|Win32 + {6CD3647E-4541-4849-9DD7-C8816665AE42}.Release|Win32.ActiveCfg = Release|Win32 + {6CD3647E-4541-4849-9DD7-C8816665AE42}.Release|Win32.Build.0 = Release|Win32 + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}.Release|Win32.ActiveCfg = Release|Win32 + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}.Release|Win32.Build.0 = Release|Win32 + {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|Win32.ActiveCfg = Release|Win32 + {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE -- cgit 1.4.1 From 04829d015d500719d8aaeef56d988a46fd2639b7 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 10 Jun 2012 09:20:58 +0200 Subject: Don't use the user's login name for real name while it's invisible --- src/common/cfgfiles.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 6bbdb3f7..081137b8 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -643,9 +643,11 @@ load_config (void) if (!username) username = "root"; - realname = g_get_real_name (); + /* We hid Real name from the Network List, so don't use the user's name unnoticeably */ + /* realname = g_get_real_name (); if ((realname && realname[0] == 0) || !realname) - realname = username; + realname = username; */ + realname = "realname"; username = convert_with_fallback (username, "username"); realname = convert_with_fallback (realname, "realname"); -- cgit 1.4.1 From 95aace51cca7c7a87107a52a5618bba2135ce025 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 10 Jun 2012 12:49:17 +0200 Subject: More solution fixes and add language interfaces --- plugins/lua/lua.c | 2 +- plugins/lua/lua.def | 3 ++ plugins/lua/lua.vcxproj | 73 +++++++++++++++++++++++++++++++++++ plugins/lua/lua.vcxproj.filters | 23 +++++++++++ plugins/perl/perl-512.vcxproj | 71 ++++++++++++++++++++++++++++++++++ plugins/perl/perl-512.vcxproj.filters | 23 +++++++++++ plugins/perl/perl-514.vcxproj | 71 ++++++++++++++++++++++++++++++++++ plugins/perl/perl-514.vcxproj.filters | 23 +++++++++++ plugins/perl/perl-516.vcxproj | 71 ++++++++++++++++++++++++++++++++++ plugins/perl/perl-516.vcxproj.filters | 23 +++++++++++ plugins/perl/perl.c | 2 +- plugins/python/python.c | 2 +- plugins/python/python.def | 4 ++ plugins/python/python.vcxproj | 65 +++++++++++++++++++++++++++++++ plugins/python/python.vcxproj.filters | 23 +++++++++++ plugins/tcl/tcl.def | 4 ++ plugins/tcl/tcl.vcxproj | 69 +++++++++++++++++++++++++++++++++ plugins/tcl/tcl.vcxproj.filters | 35 +++++++++++++++++ src/fe-gtk/fe-gtk.vcxproj | 4 +- src/pixmaps/pixmaps.vcxproj | 2 +- win32/xchat.props | 30 ++++++++++++-- win32/xchat.sln | 52 +++++++++++++++++++++++++ 22 files changed, 666 insertions(+), 9 deletions(-) create mode 100644 plugins/lua/lua.def create mode 100644 plugins/lua/lua.vcxproj create mode 100644 plugins/lua/lua.vcxproj.filters create mode 100644 plugins/perl/perl-512.vcxproj create mode 100644 plugins/perl/perl-512.vcxproj.filters create mode 100644 plugins/perl/perl-514.vcxproj create mode 100644 plugins/perl/perl-514.vcxproj.filters create mode 100644 plugins/perl/perl-516.vcxproj create mode 100644 plugins/perl/perl-516.vcxproj.filters create mode 100644 plugins/python/python.def create mode 100644 plugins/python/python.vcxproj create mode 100644 plugins/python/python.vcxproj.filters create mode 100644 plugins/tcl/tcl.def create mode 100644 plugins/tcl/tcl.vcxproj create mode 100644 plugins/tcl/tcl.vcxproj.filters (limited to 'src') diff --git a/plugins/lua/lua.c b/plugins/lua/lua.c index 9f29bf08..6ccddf2c 100644 --- a/plugins/lua/lua.c +++ b/plugins/lua/lua.c @@ -48,7 +48,7 @@ #ifdef _WIN32 #include /* for getcwd */ -#include "../../src/common/dirent-win32.h" +#include "../../src/dirent/dirent-win32.h" #endif #if !( defined(_WIN32) || defined(LXC_XCHAT_GETTEXT) ) diff --git a/plugins/lua/lua.def b/plugins/lua/lua.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/lua/lua.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/lua/lua.vcxproj b/plugins/lua/lua.vcxproj new file mode 100644 index 00000000..d78a1e35 --- /dev/null +++ b/plugins/lua/lua.vcxproj @@ -0,0 +1,73 @@ + + + + + Release + Win32 + + + + {646B4316-C8B8-4DB6-B6AE-E586929E5729} + Win32Proj + lua + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + $(LuaOutput) + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + $(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories) + "$(LuaLib).lib";;dirent-win32.lib;%(AdditionalDependencies) + + + + + "$(LuaLib).lib";$(DepLibs);dirent-win32.lib;%(AdditionalDependencies) + + + + + WIN32;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);snprintf=g_snprintf;%(PreprocessorDefinitions) + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/lua/lua.vcxproj.filters b/plugins/lua/lua.vcxproj.filters new file mode 100644 index 00000000..9c7e3d89 --- /dev/null +++ b/plugins/lua/lua.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/perl/perl-512.vcxproj b/plugins/perl/perl-512.vcxproj new file mode 100644 index 00000000..440496f3 --- /dev/null +++ b/plugins/perl/perl-512.vcxproj @@ -0,0 +1,71 @@ + + + + + Release + Win32 + + + + {987E9374-98A1-44BA-946F-D3472D7A7055} + Win32Proj + perl512 + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + $(Perl512Output) + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL512_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + true + $(Perl512Path)\perl\lib\CORE;..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + $(OutDir);%(AdditionalLibraryDirectories) + $(Perl512Lib).lib;dirent-win32.lib;%(AdditionalDependencies) + perl.def + $(Perl512Lib).dll;%(DelayLoadDLLs) + + + "$(GendefPath)\gendef" "$(Perl512Path)\perl\bin\$(Perl512Lib).dll" +lib /nologo /machine:x86 "/def:$(Perl512Lib).def" "/out:$(OutputPath)\$(Perl512Lib).lib" +"$(Perl512Path)\perl\bin\perl.exe" generate_header + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/perl/perl-512.vcxproj.filters b/plugins/perl/perl-512.vcxproj.filters new file mode 100644 index 00000000..c6c78a57 --- /dev/null +++ b/plugins/perl/perl-512.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/plugins/perl/perl-514.vcxproj b/plugins/perl/perl-514.vcxproj new file mode 100644 index 00000000..04865562 --- /dev/null +++ b/plugins/perl/perl-514.vcxproj @@ -0,0 +1,71 @@ + + + + + Release + Win32 + + + + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} + Win32Proj + perl514 + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + $(Perl514Output) + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL514_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(Perl514Path)\perl\lib\CORE;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(OutDir);%(AdditionalLibraryDirectories) + $(Perl514Lib).lib;dirent-win32.lib;%(AdditionalDependencies) + perl.def + $(Perl514Lib).dll;%(DelayLoadDLLs) + + + "$(GendefPath)\gendef" "$(Perl514Path)\perl\bin\$(Perl514Lib).dll" +lib /nologo /machine:x86 "/def:$(Perl514Lib).def" "/out:$(OutputPath)\$(Perl514Lib).lib" +"$(Perl514Path)\perl\bin\perl.exe" generate_header + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/perl/perl-514.vcxproj.filters b/plugins/perl/perl-514.vcxproj.filters new file mode 100644 index 00000000..c6c78a57 --- /dev/null +++ b/plugins/perl/perl-514.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/plugins/perl/perl-516.vcxproj b/plugins/perl/perl-516.vcxproj new file mode 100644 index 00000000..5a3c620d --- /dev/null +++ b/plugins/perl/perl-516.vcxproj @@ -0,0 +1,71 @@ + + + + + Release + Win32 + + + + {58654438-F674-42F7-88FA-73EF90AD80B1} + Win32Proj + perl516 + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + $(Perl516Output) + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL516_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(Perl516Path)\perl\lib\CORE;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(OutDir);%(AdditionalLibraryDirectories) + $(Perl516Lib).lib;dirent-win32.lib;%(AdditionalDependencies) + perl.def + $(Perl516Lib).dll;%(DelayLoadDLLs) + + + "$(GendefPath)\gendef" "$(Perl516Path)\perl\bin\$(Perl516Lib).dll" +lib /nologo /machine:x86 "/def:$(Perl516Lib).def" "/out:$(OutputPath)\$(Perl516Lib).lib" +"$(Perl516Path)\perl\bin\perl.exe" generate_header + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/perl/perl-516.vcxproj.filters b/plugins/perl/perl-516.vcxproj.filters new file mode 100644 index 00000000..f6d00b5c --- /dev/null +++ b/plugins/perl/perl-516.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index 719ef292..b07aa651 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -28,7 +28,7 @@ #ifdef WIN32 #include #define _INC_DIRENT /* disable inclusion of perl's dirent.h, we use an own version for win32 */ -#include "../../src/common/dirent-win32.h" +#include "../../src/dirent/dirent-win32.h" #else #include #endif diff --git a/plugins/python/python.c b/plugins/python/python.c index dcf4fc8f..74d07224 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -57,7 +57,7 @@ #include #ifdef WIN32 -#include "../../src/common/dirent-win32.h" +#include "../../src/dirent/dirent-win32.h" #include "../../config.h" #else #include diff --git a/plugins/python/python.def b/plugins/python/python.def new file mode 100644 index 00000000..5797636b --- /dev/null +++ b/plugins/python/python.def @@ -0,0 +1,4 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit +xchat_plugin_get_info diff --git a/plugins/python/python.vcxproj b/plugins/python/python.vcxproj new file mode 100644 index 00000000..de0fadea --- /dev/null +++ b/plugins/python/python.vcxproj @@ -0,0 +1,65 @@ + + + + + Release + Win32 + + + + {19C52A0A-A790-409E-A28A-9745FF990F5C} + Win32Proj + python + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + $(PythonOutput) + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(Glib);$(PythonPath)\include;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + python.def + "$(PythonLib).lib";$(DepLibs);dirent-win32.lib;%(AdditionalDependencies) + $(DepsRoot)\lib;$(OutDir);$(PythonPath)\libs;%(AdditionalLibraryDirectories) + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/python/python.vcxproj.filters b/plugins/python/python.vcxproj.filters new file mode 100644 index 00000000..d56e53b6 --- /dev/null +++ b/plugins/python/python.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/tcl/tcl.def b/plugins/tcl/tcl.def new file mode 100644 index 00000000..5797636b --- /dev/null +++ b/plugins/tcl/tcl.def @@ -0,0 +1,4 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit +xchat_plugin_get_info diff --git a/plugins/tcl/tcl.vcxproj b/plugins/tcl/tcl.vcxproj new file mode 100644 index 00000000..fa69aa33 --- /dev/null +++ b/plugins/tcl/tcl.vcxproj @@ -0,0 +1,69 @@ + + + + + Release + Win32 + + + + + + + + + + + + + + {2773666A-8CFC-4533-A043-EAD59F16A1C7} + Win32Proj + tcl + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + $(TclOutput) + + + + Level1 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;TCL_EXPORTS;TCL_DLL="$(TclLib).dll";$(OwnFlags);%(PreprocessorDefinitions) + $(TclPath)\include;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(TclPath)\lib;%(AdditionalLibraryDirectories) + "$(TclLib).lib";%(AdditionalDependencies) + tcl.def + $(TclLib).dll;%(DelayLoadDLLs) + + + + + + \ No newline at end of file diff --git a/plugins/tcl/tcl.vcxproj.filters b/plugins/tcl/tcl.vcxproj.filters new file mode 100644 index 00000000..43f63d84 --- /dev/null +++ b/plugins/tcl/tcl.vcxproj.filters @@ -0,0 +1,35 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/src/fe-gtk/fe-gtk.vcxproj b/src/fe-gtk/fe-gtk.vcxproj index deb76c27..68390d03 100644 --- a/src/fe-gtk/fe-gtk.vcxproj +++ b/src/fe-gtk/fe-gtk.vcxproj @@ -48,8 +48,8 @@ true true true - $(DepsRoot)\lib;%(AdditionalLibraryDirectories) - $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) + $(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories) + $(DepLibs);common.lib;dirent-win32.lib;%(AdditionalDependencies) mainCRTStartup diff --git a/src/pixmaps/pixmaps.vcxproj b/src/pixmaps/pixmaps.vcxproj index 39151d5a..ba88104d 100644 --- a/src/pixmaps/pixmaps.vcxproj +++ b/src/pixmaps/pixmaps.vcxproj @@ -47,7 +47,7 @@ true - "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" + "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" diff --git a/win32/xchat.props b/win32/xchat.props index 09f26df0..32ed807d 100644 --- a/win32/xchat.props +++ b/win32/xchat.props @@ -3,10 +3,34 @@ - c:\mozilla-build\deps root + c:\mozilla-build\xchat deps + c:\mozilla-build\gendef path + c:\mozilla-build\tcl path + c:\mozilla-build\perl512 path + c:\mozilla-build\perl514 path + c:\mozilla-build\perl516 path + c:\mozilla-build\python path - _CRT_SECURE_NO_WARNINGS;G_DISABLE_CAST_CHECKS;G_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;GDK_DISABLE_DEPRECATED;HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp - $(YourDepsFolder)\$(PlatformName) + G_DISABLE_CAST_CHECKS;G_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;GDK_DISABLE_DEPRECATED;HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp;__inline__=__inline; + $(YourDepsPath)\$(PlatformName) + $(YourGendefPath) + lua51 + xclua + $(YourTclPath)\$(PlatformName) + tcl85 + xctcl + $(YourPerl512Path)\$(PlatformName) + perl512 + xcperl-512 + $(YourPerl514Path)\$(PlatformName) + perl514 + xcperl-514 + $(YourPerl516Path)\$(PlatformName) + perl516 + xcperl-516 + $(YourPythonPath)\$(PlatformName) + python27 + xcpython $(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2 $(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0 bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" xchatpng "$(SolutionDir)\..\xchat.png" diff --git a/win32/xchat.sln b/win32/xchat.sln index 430e3d60..7aa6b029 100644 --- a/win32/xchat.sln +++ b/win32/xchat.sln @@ -23,6 +23,32 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fe-text", "..\src\fe-text\f {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xchat", "xchat", "{AAACEB12-9475-410E-AF5A-FDFF907E9043}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{561126F4-FA18-45FC-A2BF-8F858F161D6D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripting", "scripting", "{D237DA6B-BD5F-46C0-8BEA-50E9A1340240}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{BB051F0F-A841-4A9A-BAF6-51DD9866D65A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "..\plugins\tcl\tcl.vcxproj", "{2773666A-8CFC-4533-A043-EAD59F16A1C7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perl-512", "..\plugins\perl\perl-512.vcxproj", "{987E9374-98A1-44BA-946F-D3472D7A7055}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perl-514", "..\plugins\perl\perl-514.vcxproj", "{C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}" + ProjectSection(ProjectDependencies) = postProject + {987E9374-98A1-44BA-946F-D3472D7A7055} = {987E9374-98A1-44BA-946F-D3472D7A7055} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perl-516", "..\plugins\perl\perl-516.vcxproj", "{58654438-F674-42F7-88FA-73EF90AD80B1}" + ProjectSection(ProjectDependencies) = postProject + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} = {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "..\plugins\python\python.vcxproj", "{19C52A0A-A790-409E-A28A-9745FF990F5C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "..\plugins\lua\lua.vcxproj", "{646B4316-C8B8-4DB6-B6AE-E586929E5729}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Win32 = Release|Win32 @@ -40,8 +66,34 @@ Global {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}.Release|Win32.Build.0 = Release|Win32 {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|Win32.ActiveCfg = Release|Win32 {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|Win32.Build.0 = Release|Win32 + {2773666A-8CFC-4533-A043-EAD59F16A1C7}.Release|Win32.ActiveCfg = Release|Win32 + {2773666A-8CFC-4533-A043-EAD59F16A1C7}.Release|Win32.Build.0 = Release|Win32 + {987E9374-98A1-44BA-946F-D3472D7A7055}.Release|Win32.ActiveCfg = Release|Win32 + {987E9374-98A1-44BA-946F-D3472D7A7055}.Release|Win32.Build.0 = Release|Win32 + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}.Release|Win32.ActiveCfg = Release|Win32 + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}.Release|Win32.Build.0 = Release|Win32 + {58654438-F674-42F7-88FA-73EF90AD80B1}.Release|Win32.ActiveCfg = Release|Win32 + {58654438-F674-42F7-88FA-73EF90AD80B1}.Release|Win32.Build.0 = Release|Win32 + {19C52A0A-A790-409E-A28A-9745FF990F5C}.Release|Win32.ActiveCfg = Release|Win32 + {19C52A0A-A790-409E-A28A-9745FF990F5C}.Release|Win32.Build.0 = Release|Win32 + {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|Win32.ActiveCfg = Release|Win32 + {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642} = {AAACEB12-9475-410E-AF5A-FDFF907E9043} + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82} = {AAACEB12-9475-410E-AF5A-FDFF907E9043} + {E93E1255-95D1-4B08-8FDF-B53CC6A21280} = {AAACEB12-9475-410E-AF5A-FDFF907E9043} + {87554B59-006C-4D94-9714-897B27067BA3} = {AAACEB12-9475-410E-AF5A-FDFF907E9043} + {6CD3647E-4541-4849-9DD7-C8816665AE42} = {BB051F0F-A841-4A9A-BAF6-51DD9866D65A} + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {BB051F0F-A841-4A9A-BAF6-51DD9866D65A} + {2773666A-8CFC-4533-A043-EAD59F16A1C7} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} + {987E9374-98A1-44BA-946F-D3472D7A7055} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} + {58654438-F674-42F7-88FA-73EF90AD80B1} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} + {19C52A0A-A790-409E-A28A-9745FF990F5C} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} + {646B4316-C8B8-4DB6-B6AE-E586929E5729} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} + EndGlobalSection EndGlobal -- cgit 1.4.1 From a673109c495916f4198b216a0e52aa9d6b986a8f Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 10 Jun 2012 14:19:40 +0200 Subject: Add all plugins to solution except WMPA --- plugins/checksum/checksum.def | 3 + plugins/checksum/checksum.vcxproj | 65 ++++++++++++++++++ plugins/checksum/checksum.vcxproj.filters | 23 +++++++ plugins/dns/dns.def | 3 + plugins/dns/dns.vcxproj | 69 +++++++++++++++++++ plugins/dns/dns.vcxproj.filters | 35 ++++++++++ plugins/doat/doat.def | 3 + plugins/doat/doat.vcxproj | 63 +++++++++++++++++ plugins/doat/doat.vcxproj.filters | 23 +++++++ plugins/exec/exec.def | 3 + plugins/exec/exec.vcxproj | 63 +++++++++++++++++ plugins/exec/exec.vcxproj.filters | 23 +++++++ plugins/fishlim/fishlim.def | 4 ++ plugins/fishlim/fishlim.vcxproj | 77 +++++++++++++++++++++ plugins/fishlim/fishlim.vcxproj.filters | 59 ++++++++++++++++ plugins/lua/lua.vcxproj | 6 +- plugins/mpcinfo/mpcinfo.def | 3 + plugins/mpcinfo/mpcinfo.vcxproj | 63 +++++++++++++++++ plugins/mpcinfo/mpcinfo.vcxproj.filters | 23 +++++++ plugins/upd/upd.def | 3 + plugins/upd/upd.vcxproj | 65 ++++++++++++++++++ plugins/upd/upd.vcxproj.filters | 23 +++++++ plugins/winamp/winamp.def | 3 + plugins/winamp/winamp.vcxproj | 63 +++++++++++++++++ plugins/winamp/winamp.vcxproj.filters | 23 +++++++ plugins/winsys/winsys.def | 3 + plugins/winsys/winsys.vcxproj | 66 ++++++++++++++++++ plugins/winsys/winsys.vcxproj.filters | 23 +++++++ plugins/xsasl/xsasl.def | 3 + plugins/xsasl/xsasl.vcxproj | 65 ++++++++++++++++++ plugins/xsasl/xsasl.vcxproj.filters | 23 +++++++ plugins/xtray/xtray.def | 3 + plugins/xtray/xtray.vcxproj | 91 +++++++++++++++++++++++++ plugins/xtray/xtray.vcxproj.filters | 109 ++++++++++++++++++++++++++++++ src/version/version.vcxproj | 3 +- win32/xchat.sln | 66 ++++++++++++++++++ 36 files changed, 1244 insertions(+), 2 deletions(-) create mode 100644 plugins/checksum/checksum.def create mode 100644 plugins/checksum/checksum.vcxproj create mode 100644 plugins/checksum/checksum.vcxproj.filters create mode 100644 plugins/dns/dns.def create mode 100644 plugins/dns/dns.vcxproj create mode 100644 plugins/dns/dns.vcxproj.filters create mode 100644 plugins/doat/doat.def create mode 100644 plugins/doat/doat.vcxproj create mode 100644 plugins/doat/doat.vcxproj.filters create mode 100644 plugins/exec/exec.def create mode 100644 plugins/exec/exec.vcxproj create mode 100644 plugins/exec/exec.vcxproj.filters create mode 100644 plugins/fishlim/fishlim.def create mode 100644 plugins/fishlim/fishlim.vcxproj create mode 100644 plugins/fishlim/fishlim.vcxproj.filters create mode 100644 plugins/mpcinfo/mpcinfo.def create mode 100644 plugins/mpcinfo/mpcinfo.vcxproj create mode 100644 plugins/mpcinfo/mpcinfo.vcxproj.filters create mode 100644 plugins/upd/upd.def create mode 100644 plugins/upd/upd.vcxproj create mode 100644 plugins/upd/upd.vcxproj.filters create mode 100644 plugins/winamp/winamp.def create mode 100644 plugins/winamp/winamp.vcxproj create mode 100644 plugins/winamp/winamp.vcxproj.filters create mode 100644 plugins/winsys/winsys.def create mode 100644 plugins/winsys/winsys.vcxproj create mode 100644 plugins/winsys/winsys.vcxproj.filters create mode 100644 plugins/xsasl/xsasl.def create mode 100644 plugins/xsasl/xsasl.vcxproj create mode 100644 plugins/xsasl/xsasl.vcxproj.filters create mode 100644 plugins/xtray/xtray.def create mode 100644 plugins/xtray/xtray.vcxproj create mode 100644 plugins/xtray/xtray.vcxproj.filters (limited to 'src') diff --git a/plugins/checksum/checksum.def b/plugins/checksum/checksum.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/checksum/checksum.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/checksum/checksum.vcxproj b/plugins/checksum/checksum.vcxproj new file mode 100644 index 00000000..cbfa2a2d --- /dev/null +++ b/plugins/checksum/checksum.vcxproj @@ -0,0 +1,65 @@ + + + + + Release + Win32 + + + + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91} + Win32Proj + checksum + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcchecksum + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions) + $(DepsRoot)\include;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + checksum.def + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/checksum/checksum.vcxproj.filters b/plugins/checksum/checksum.vcxproj.filters new file mode 100644 index 00000000..e6ef5e81 --- /dev/null +++ b/plugins/checksum/checksum.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/plugins/dns/dns.def b/plugins/dns/dns.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/dns/dns.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/dns/dns.vcxproj b/plugins/dns/dns.vcxproj new file mode 100644 index 00000000..b98c778f --- /dev/null +++ b/plugins/dns/dns.vcxproj @@ -0,0 +1,69 @@ + + + + + Release + Win32 + + + + {3786FA8C-3E76-45E3-984E-FCCFF44729C9} + Win32Proj + dns + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcdns + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions) + ..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + dns.def + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/dns/dns.vcxproj.filters b/plugins/dns/dns.vcxproj.filters new file mode 100644 index 00000000..a49dc1e2 --- /dev/null +++ b/plugins/dns/dns.vcxproj.filters @@ -0,0 +1,35 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/plugins/doat/doat.def b/plugins/doat/doat.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/doat/doat.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/doat/doat.vcxproj b/plugins/doat/doat.vcxproj new file mode 100644 index 00000000..f0168a6b --- /dev/null +++ b/plugins/doat/doat.vcxproj @@ -0,0 +1,63 @@ + + + + + Release + Win32 + + + + {4980AF24-9D42-427D-A8E6-0DF3B97C455D} + Win32Proj + doat + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcdoat + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions) + ..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + doat.def + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/doat/doat.vcxproj.filters b/plugins/doat/doat.vcxproj.filters new file mode 100644 index 00000000..43ea8307 --- /dev/null +++ b/plugins/doat/doat.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/plugins/exec/exec.def b/plugins/exec/exec.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/exec/exec.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/exec/exec.vcxproj b/plugins/exec/exec.vcxproj new file mode 100644 index 00000000..cef4049c --- /dev/null +++ b/plugins/exec/exec.vcxproj @@ -0,0 +1,63 @@ + + + + + Release + Win32 + + + + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76} + Win32Proj + exec + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcexec + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + exec.def + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/exec/exec.vcxproj.filters b/plugins/exec/exec.vcxproj.filters new file mode 100644 index 00000000..f800df93 --- /dev/null +++ b/plugins/exec/exec.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/fishlim/fishlim.def b/plugins/fishlim/fishlim.def new file mode 100644 index 00000000..5797636b --- /dev/null +++ b/plugins/fishlim/fishlim.def @@ -0,0 +1,4 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit +xchat_plugin_get_info diff --git a/plugins/fishlim/fishlim.vcxproj b/plugins/fishlim/fishlim.vcxproj new file mode 100644 index 00000000..1cf5293f --- /dev/null +++ b/plugins/fishlim/fishlim.vcxproj @@ -0,0 +1,77 @@ + + + + + Release + Win32 + + + + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E} + Win32Proj + fishlim + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcfishlim + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions) + true + $(DepsRoot)\include;$(Glib);..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + fishlim.def + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/fishlim/fishlim.vcxproj.filters b/plugins/fishlim/fishlim.vcxproj.filters new file mode 100644 index 00000000..72e9f017 --- /dev/null +++ b/plugins/fishlim/fishlim.vcxproj.filters @@ -0,0 +1,59 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/plugins/lua/lua.vcxproj b/plugins/lua/lua.vcxproj index d78a1e35..69a8e4ea 100644 --- a/plugins/lua/lua.vcxproj +++ b/plugins/lua/lua.vcxproj @@ -33,7 +33,7 @@ - Level3 + Level1 MaxSpeed @@ -59,7 +59,11 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);snprintf=g_snprintf;%(PreprocessorDefinitions) + true + + lua.def + diff --git a/plugins/mpcinfo/mpcinfo.def b/plugins/mpcinfo/mpcinfo.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/mpcinfo/mpcinfo.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/mpcinfo/mpcinfo.vcxproj b/plugins/mpcinfo/mpcinfo.vcxproj new file mode 100644 index 00000000..04182d50 --- /dev/null +++ b/plugins/mpcinfo/mpcinfo.vcxproj @@ -0,0 +1,63 @@ + + + + + Release + Win32 + + + + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC} + Win32Proj + mpcinfo + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcmpcinfo + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + mpcinfo.def + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/mpcinfo/mpcinfo.vcxproj.filters b/plugins/mpcinfo/mpcinfo.vcxproj.filters new file mode 100644 index 00000000..7e22eb30 --- /dev/null +++ b/plugins/mpcinfo/mpcinfo.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/upd/upd.def b/plugins/upd/upd.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/upd/upd.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/upd/upd.vcxproj b/plugins/upd/upd.vcxproj new file mode 100644 index 00000000..ee00dc1a --- /dev/null +++ b/plugins/upd/upd.vcxproj @@ -0,0 +1,65 @@ + + + + + Release + Win32 + + + + {461DC24A-A410-4171-8C02-CCDBF3702C2A} + Win32Proj + upd + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcupd + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + upd.def + $(DepLibs);%(AdditionalDependencies) + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/upd/upd.vcxproj.filters b/plugins/upd/upd.vcxproj.filters new file mode 100644 index 00000000..e3d7397e --- /dev/null +++ b/plugins/upd/upd.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/winamp/winamp.def b/plugins/winamp/winamp.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/winamp/winamp.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/winamp/winamp.vcxproj b/plugins/winamp/winamp.vcxproj new file mode 100644 index 00000000..3924b8b2 --- /dev/null +++ b/plugins/winamp/winamp.vcxproj @@ -0,0 +1,63 @@ + + + + + Release + Win32 + + + + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} + Win32Proj + winamp + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcwinamp + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + winamp.def + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/winamp/winamp.vcxproj.filters b/plugins/winamp/winamp.vcxproj.filters new file mode 100644 index 00000000..1a800a33 --- /dev/null +++ b/plugins/winamp/winamp.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/winsys/winsys.def b/plugins/winsys/winsys.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/winsys/winsys.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/winsys/winsys.vcxproj b/plugins/winsys/winsys.vcxproj new file mode 100644 index 00000000..1466e8e7 --- /dev/null +++ b/plugins/winsys/winsys.vcxproj @@ -0,0 +1,66 @@ + + + + + Release + Win32 + + + + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA} + Win32Proj + winsys + + + + DynamicLibrary + false + true + Unicode + WDK7 + + + + + + + + + + + false + xcwinsys + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;WINSYS_EXPORTS;%(PreprocessorDefinitions) + ..;%(AdditionalIncludeDirectories) + true + false + + + Windows + true + true + true + winsys.def + wbemuuid.lib;vccomsup.lib;%(AdditionalDependencies) + comsupp.lib + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/winsys/winsys.vcxproj.filters b/plugins/winsys/winsys.vcxproj.filters new file mode 100644 index 00000000..6e5b445c --- /dev/null +++ b/plugins/winsys/winsys.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/xsasl/xsasl.def b/plugins/xsasl/xsasl.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/xsasl/xsasl.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/xsasl/xsasl.vcxproj b/plugins/xsasl/xsasl.vcxproj new file mode 100644 index 00000000..9bb8fb24 --- /dev/null +++ b/plugins/xsasl/xsasl.vcxproj @@ -0,0 +1,65 @@ + + + + + Release + Win32 + + + + {18871EBA-AC85-4652-8919-EB8064B9A714} + Win32Proj + xsasl + + + + DynamicLibrary + false + true + MultiByte + WDK7 + + + + + + + + + + + false + xcxsasl + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;XSASL_EXPORTS;%(PreprocessorDefinitions) + $(Glib);..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + xsasl.def + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/xsasl/xsasl.vcxproj.filters b/plugins/xsasl/xsasl.vcxproj.filters new file mode 100644 index 00000000..b01aa8eb --- /dev/null +++ b/plugins/xsasl/xsasl.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/plugins/xtray/xtray.def b/plugins/xtray/xtray.def new file mode 100644 index 00000000..77670bf2 --- /dev/null +++ b/plugins/xtray/xtray.def @@ -0,0 +1,3 @@ +EXPORTS +xchat_plugin_init +xchat_plugin_deinit diff --git a/plugins/xtray/xtray.vcxproj b/plugins/xtray/xtray.vcxproj new file mode 100644 index 00000000..1dc97f30 --- /dev/null +++ b/plugins/xtray/xtray.vcxproj @@ -0,0 +1,91 @@ + + + + + Release + Win32 + + + + {3024CF36-85E5-4E00-9608-7002E2C7EF14} + Win32Proj + xtray + + + + DynamicLibrary + false + true + Unicode + WDK7 + + + + + + + + + + + false + + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;_STL70_;_STATIC_CPPLIB;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + xtray.def + ntstc_msvcrt.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/xtray/xtray.vcxproj.filters b/plugins/xtray/xtray.vcxproj.filters new file mode 100644 index 00000000..3b909983 --- /dev/null +++ b/plugins/xtray/xtray.vcxproj.filters @@ -0,0 +1,109 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {448b49a5-e68b-451e-bfbc-0855da024b2e} + + + {8345128a-0635-43d6-9115-a85ad9c77ee2} + + + + + Resource Files + + + Resource Files\bitmaps + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + Resource Files\icons + + + + + Resource Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/src/version/version.vcxproj b/src/version/version.vcxproj index e6d510f8..26c13458 100644 --- a/src/version/version.vcxproj +++ b/src/version/version.vcxproj @@ -32,13 +32,14 @@ - Level3 + Level1 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true Console diff --git a/win32/xchat.sln b/win32/xchat.sln index 7aa6b029..ecb1f859 100644 --- a/win32/xchat.sln +++ b/win32/xchat.sln @@ -34,20 +34,53 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "..\plugins\tcl\tcl.vcxproj", "{2773666A-8CFC-4533-A043-EAD59F16A1C7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perl-512", "..\plugins\perl\perl-512.vcxproj", "{987E9374-98A1-44BA-946F-D3472D7A7055}" + ProjectSection(ProjectDependencies) = postProject + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perl-514", "..\plugins\perl\perl-514.vcxproj", "{C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}" ProjectSection(ProjectDependencies) = postProject {987E9374-98A1-44BA-946F-D3472D7A7055} = {987E9374-98A1-44BA-946F-D3472D7A7055} + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perl-516", "..\plugins\perl\perl-516.vcxproj", "{58654438-F674-42F7-88FA-73EF90AD80B1}" ProjectSection(ProjectDependencies) = postProject {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} = {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "..\plugins\python\python.vcxproj", "{19C52A0A-A790-409E-A28A-9745FF990F5C}" + ProjectSection(ProjectDependencies) = postProject + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "..\plugins\lua\lua.vcxproj", "{646B4316-C8B8-4DB6-B6AE-E586929E5729}" + ProjectSection(ProjectDependencies) = postProject + {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {98B56DF9-E4F1-4696-A565-5F7823CF214D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doat", "..\plugins\doat\doat.vcxproj", "{4980AF24-9D42-427D-A8E6-0DF3B97C455D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checksum", "..\plugins\checksum\checksum.vcxproj", "{5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dns", "..\plugins\dns\dns.vcxproj", "{3786FA8C-3E76-45E3-984E-FCCFF44729C9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exec", "..\plugins\exec\exec.vcxproj", "{17E4BE39-76F7-4A06-AD21-EFD0C5091F76}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fishlim", "..\plugins\fishlim\fishlim.vcxproj", "{3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpcinfo", "..\plugins\mpcinfo\mpcinfo.vcxproj", "{B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upd", "..\plugins\upd\upd.vcxproj", "{461DC24A-A410-4171-8C02-CCDBF3702C2A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winamp", "..\plugins\winamp\winamp.vcxproj", "{E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsys", "..\plugins\winsys\winsys.vcxproj", "{6C0CA980-97C5-427A-BE61-5BCECAFABBDA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xsasl", "..\plugins\xsasl\xsasl.vcxproj", "{18871EBA-AC85-4652-8919-EB8064B9A714}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xtray", "..\plugins\xtray\xtray.vcxproj", "{3024CF36-85E5-4E00-9608-7002E2C7EF14}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -78,6 +111,28 @@ Global {19C52A0A-A790-409E-A28A-9745FF990F5C}.Release|Win32.Build.0 = Release|Win32 {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|Win32.ActiveCfg = Release|Win32 {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|Win32.Build.0 = Release|Win32 + {4980AF24-9D42-427D-A8E6-0DF3B97C455D}.Release|Win32.ActiveCfg = Release|Win32 + {4980AF24-9D42-427D-A8E6-0DF3B97C455D}.Release|Win32.Build.0 = Release|Win32 + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}.Release|Win32.ActiveCfg = Release|Win32 + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}.Release|Win32.Build.0 = Release|Win32 + {3786FA8C-3E76-45E3-984E-FCCFF44729C9}.Release|Win32.ActiveCfg = Release|Win32 + {3786FA8C-3E76-45E3-984E-FCCFF44729C9}.Release|Win32.Build.0 = Release|Win32 + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76}.Release|Win32.ActiveCfg = Release|Win32 + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76}.Release|Win32.Build.0 = Release|Win32 + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}.Release|Win32.ActiveCfg = Release|Win32 + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}.Release|Win32.Build.0 = Release|Win32 + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}.Release|Win32.ActiveCfg = Release|Win32 + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}.Release|Win32.Build.0 = Release|Win32 + {461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|Win32.ActiveCfg = Release|Win32 + {461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|Win32.Build.0 = Release|Win32 + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|Win32.ActiveCfg = Release|Win32 + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|Win32.Build.0 = Release|Win32 + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|Win32.ActiveCfg = Release|Win32 + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|Win32.Build.0 = Release|Win32 + {18871EBA-AC85-4652-8919-EB8064B9A714}.Release|Win32.ActiveCfg = Release|Win32 + {18871EBA-AC85-4652-8919-EB8064B9A714}.Release|Win32.Build.0 = Release|Win32 + {3024CF36-85E5-4E00-9608-7002E2C7EF14}.Release|Win32.ActiveCfg = Release|Win32 + {3024CF36-85E5-4E00-9608-7002E2C7EF14}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -89,6 +144,17 @@ Global {87554B59-006C-4D94-9714-897B27067BA3} = {AAACEB12-9475-410E-AF5A-FDFF907E9043} {6CD3647E-4541-4849-9DD7-C8816665AE42} = {BB051F0F-A841-4A9A-BAF6-51DD9866D65A} {98B56DF9-E4F1-4696-A565-5F7823CF214D} = {BB051F0F-A841-4A9A-BAF6-51DD9866D65A} + {4980AF24-9D42-427D-A8E6-0DF3B97C455D} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {3786FA8C-3E76-45E3-984E-FCCFF44729C9} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {461DC24A-A410-4171-8C02-CCDBF3702C2A} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {18871EBA-AC85-4652-8919-EB8064B9A714} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} + {3024CF36-85E5-4E00-9608-7002E2C7EF14} = {561126F4-FA18-45FC-A2BF-8F858F161D6D} {2773666A-8CFC-4533-A043-EAD59F16A1C7} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} {987E9374-98A1-44BA-946F-D3472D7A7055} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240} -- cgit 1.4.1 From 593efa703b6914f963533da513576a26e744ead9 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 15 Jun 2012 21:37:48 +0200 Subject: LOTS of fixes to the VS solution --- plugins/checksum/checksum.vcxproj | 2 + plugins/dns/dns.vcxproj | 2 + plugins/doat/doat.vcxproj | 2 + plugins/exec/exec.vcxproj | 2 + plugins/fishlim/fishlim.vcxproj | 2 + plugins/lua/lua.vcxproj | 2 + plugins/mpcinfo/mpcinfo.vcxproj | 2 + plugins/perl/perl-512.vcxproj | 11 +- plugins/perl/perl-514.vcxproj | 11 +- plugins/perl/perl-516.vcxproj | 11 +- plugins/python/python.vcxproj | 2 + plugins/tcl/tcl.vcxproj | 2 + plugins/upd/upd.vcxproj | 2 + plugins/winamp/winamp.vcxproj | 2 + plugins/winsys/winsys.vcxproj | 2 + plugins/wmpa/wmpa.vcxproj | 2 + plugins/xsasl/xsasl.vcxproj | 2 + plugins/xtray/xtray.vcxproj | 2 + src/common/common.vcxproj | 5 +- src/dirent/dirent.vcxproj | 2 + src/fe-gtk/fe-gtk.vcxproj | 2 + src/fe-text/fe-text.vcxproj | 2 + src/pixmaps/pixmaps.vcxproj | 4 +- src/version/version.c | 20 +- src/version/version.vcxproj | 4 +- win32/bitmaps/wizardimage.bmp | Bin 52062 -> 0 bytes win32/bitmaps/wizardsmallimage.bmp | Bin 9798 -> 0 bytes win32/copy/copy.vcxproj | 21 +- win32/copy/copy.vcxproj.filters | 46 +- win32/copy/etc/download.png | Bin 0 -> 703 bytes win32/copy/etc/gtk-2.0/gtkrc | 71 + win32/copy/etc/gtkpref.png | Bin 0 -> 323 bytes win32/copy/etc/music.png | Bin 0 -> 3577 bytes win32/copy/etc/system.png | Bin 0 -> 3578 bytes win32/copy/share/xml/iso-codes/iso_3166.xml | 1703 +++++++++++++++++++ win32/copy/share/xml/iso-codes/iso_639.xml | 2169 +++++++++++++++++++++++++ win32/etc/download.png | Bin 703 -> 0 bytes win32/etc/gtk-2.0/gtkrc | 71 - win32/etc/gtkpref.png | Bin 323 -> 0 bytes win32/etc/music.png | Bin 3577 -> 0 bytes win32/etc/system.png | Bin 3578 -> 0 bytes win32/installer/installer.vcxproj | 32 +- win32/installer/installer.vcxproj.filters | 28 +- win32/installer/watercolorlite-blue.cjstyles | Bin 0 -> 308224 bytes win32/installer/watercolorlite-green.cjstyles | Bin 0 -> 308224 bytes win32/installer/wizardimage.bmp | Bin 0 -> 52062 bytes win32/installer/wizardsmallimage.bmp | Bin 0 -> 9798 bytes win32/installer/xchat-wdk-x64.skel.iss | 279 ++++ win32/installer/xchat-wdk-x86.skel.iss | 282 ++++ win32/isskin/watercolorlite-blue.cjstyles | Bin 308224 -> 0 bytes win32/isskin/watercolorlite-green.cjstyles | Bin 308224 -> 0 bytes win32/nls/nls.vcxproj | 13 +- win32/share/themes/Murrine/gtk-2.0/gtkrc | 7 - win32/share/xml/iso-codes/iso_3166.xml | 1703 ------------------- win32/share/xml/iso-codes/iso_639.xml | 2169 ------------------------- win32/xchat-wdk-x64.skel.iss | 279 ---- win32/xchat-wdk-x86.skel.iss | 282 ---- win32/xchat.props | 2 +- win32/xchat.sln | 24 +- 59 files changed, 4718 insertions(+), 4565 deletions(-) delete mode 100644 win32/bitmaps/wizardimage.bmp delete mode 100644 win32/bitmaps/wizardsmallimage.bmp create mode 100644 win32/copy/etc/download.png create mode 100644 win32/copy/etc/gtk-2.0/gtkrc create mode 100644 win32/copy/etc/gtkpref.png create mode 100644 win32/copy/etc/music.png create mode 100644 win32/copy/etc/system.png create mode 100644 win32/copy/share/xml/iso-codes/iso_3166.xml create mode 100644 win32/copy/share/xml/iso-codes/iso_639.xml delete mode 100644 win32/etc/download.png delete mode 100644 win32/etc/gtk-2.0/gtkrc delete mode 100644 win32/etc/gtkpref.png delete mode 100644 win32/etc/music.png delete mode 100644 win32/etc/system.png create mode 100644 win32/installer/watercolorlite-blue.cjstyles create mode 100644 win32/installer/watercolorlite-green.cjstyles create mode 100644 win32/installer/wizardimage.bmp create mode 100644 win32/installer/wizardsmallimage.bmp create mode 100644 win32/installer/xchat-wdk-x64.skel.iss create mode 100644 win32/installer/xchat-wdk-x86.skel.iss delete mode 100644 win32/isskin/watercolorlite-blue.cjstyles delete mode 100644 win32/isskin/watercolorlite-green.cjstyles delete mode 100644 win32/share/themes/Murrine/gtk-2.0/gtkrc delete mode 100644 win32/share/xml/iso-codes/iso_3166.xml delete mode 100644 win32/share/xml/iso-codes/iso_639.xml delete mode 100644 win32/xchat-wdk-x64.skel.iss delete mode 100644 win32/xchat-wdk-x86.skel.iss (limited to 'src') diff --git a/plugins/checksum/checksum.vcxproj b/plugins/checksum/checksum.vcxproj index cbfa2a2d..c4090cd1 100644 --- a/plugins/checksum/checksum.vcxproj +++ b/plugins/checksum/checksum.vcxproj @@ -30,6 +30,8 @@ false xcchecksum + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/dns/dns.vcxproj b/plugins/dns/dns.vcxproj index b98c778f..38f1634b 100644 --- a/plugins/dns/dns.vcxproj +++ b/plugins/dns/dns.vcxproj @@ -30,6 +30,8 @@ false xcdns + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/doat/doat.vcxproj b/plugins/doat/doat.vcxproj index f0168a6b..c6901fe1 100644 --- a/plugins/doat/doat.vcxproj +++ b/plugins/doat/doat.vcxproj @@ -30,6 +30,8 @@ false xcdoat + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/exec/exec.vcxproj b/plugins/exec/exec.vcxproj index cef4049c..15bf5ec5 100644 --- a/plugins/exec/exec.vcxproj +++ b/plugins/exec/exec.vcxproj @@ -30,6 +30,8 @@ false xcexec + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/fishlim/fishlim.vcxproj b/plugins/fishlim/fishlim.vcxproj index 1cf5293f..0f6e1c38 100644 --- a/plugins/fishlim/fishlim.vcxproj +++ b/plugins/fishlim/fishlim.vcxproj @@ -30,6 +30,8 @@ false xcfishlim + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/lua/lua.vcxproj b/plugins/lua/lua.vcxproj index 69a8e4ea..26d21856 100644 --- a/plugins/lua/lua.vcxproj +++ b/plugins/lua/lua.vcxproj @@ -30,6 +30,8 @@ false $(LuaOutput) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/mpcinfo/mpcinfo.vcxproj b/plugins/mpcinfo/mpcinfo.vcxproj index 04182d50..7f12822e 100644 --- a/plugins/mpcinfo/mpcinfo.vcxproj +++ b/plugins/mpcinfo/mpcinfo.vcxproj @@ -30,6 +30,8 @@ false xcmpcinfo + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/perl/perl-512.vcxproj b/plugins/perl/perl-512.vcxproj index 440496f3..d924af48 100644 --- a/plugins/perl/perl-512.vcxproj +++ b/plugins/perl/perl-512.vcxproj @@ -30,6 +30,8 @@ false $(Perl512Output) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) @@ -41,7 +43,7 @@ true WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL512_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) true - $(Perl512Path)\perl\lib\CORE;..;%(AdditionalIncludeDirectories) + $(Perl512Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories) Windows @@ -55,8 +57,11 @@ "$(GendefPath)\gendef" "$(Perl512Path)\perl\bin\$(Perl512Lib).dll" -lib /nologo /machine:x86 "/def:$(Perl512Lib).def" "/out:$(OutputPath)\$(Perl512Lib).lib" -"$(Perl512Path)\perl\bin\perl.exe" generate_header +move $(Perl512Lib).def "$(IntDir)" +lib /nologo /machine:x86 "/def:$(IntDir)$(Perl512Lib).def" "/out:$(OutDir)\$(Perl512Lib).lib" +"$(Perl512Path)\perl\bin\perl.exe" generate_header +move irc.pm.h "$(IntDir)" +move xchat.pm.h "$(IntDir)" diff --git a/plugins/perl/perl-514.vcxproj b/plugins/perl/perl-514.vcxproj index 04865562..58cc4f04 100644 --- a/plugins/perl/perl-514.vcxproj +++ b/plugins/perl/perl-514.vcxproj @@ -30,6 +30,8 @@ false $(Perl514Output) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) @@ -40,7 +42,7 @@ true true WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL514_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) - $(Perl514Path)\perl\lib\CORE;..;%(AdditionalIncludeDirectories) + $(Perl514Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories) true @@ -55,8 +57,11 @@ "$(GendefPath)\gendef" "$(Perl514Path)\perl\bin\$(Perl514Lib).dll" -lib /nologo /machine:x86 "/def:$(Perl514Lib).def" "/out:$(OutputPath)\$(Perl514Lib).lib" -"$(Perl514Path)\perl\bin\perl.exe" generate_header +move $(Perl514Lib).def "$(IntDir)" +lib /nologo /machine:x86 "/def:$(IntDir)$(Perl514Lib).def" "/out:$(OutDir)\$(Perl514Lib).lib" +"$(Perl514Path)\perl\bin\perl.exe" generate_header +move irc.pm.h "$(IntDir)" +move xchat.pm.h "$(IntDir)" diff --git a/plugins/perl/perl-516.vcxproj b/plugins/perl/perl-516.vcxproj index 5a3c620d..516c1b80 100644 --- a/plugins/perl/perl-516.vcxproj +++ b/plugins/perl/perl-516.vcxproj @@ -30,6 +30,8 @@ false $(Perl516Output) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) @@ -40,7 +42,7 @@ true true WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL516_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) - $(Perl516Path)\perl\lib\CORE;..;%(AdditionalIncludeDirectories) + $(Perl516Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories) true @@ -55,8 +57,11 @@ "$(GendefPath)\gendef" "$(Perl516Path)\perl\bin\$(Perl516Lib).dll" -lib /nologo /machine:x86 "/def:$(Perl516Lib).def" "/out:$(OutputPath)\$(Perl516Lib).lib" -"$(Perl516Path)\perl\bin\perl.exe" generate_header +move $(Perl516Lib).def "$(IntDir)" +lib /nologo /machine:x86 "/def:$(IntDir)$(Perl516Lib).def" "/out:$(OutDir)\$(Perl516Lib).lib" +"$(Perl516Path)\perl\bin\perl.exe" generate_header +move irc.pm.h "$(IntDir)" +move xchat.pm.h "$(IntDir)" diff --git a/plugins/python/python.vcxproj b/plugins/python/python.vcxproj index de0fadea..923eeb92 100644 --- a/plugins/python/python.vcxproj +++ b/plugins/python/python.vcxproj @@ -30,6 +30,8 @@ false $(PythonOutput) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/tcl/tcl.vcxproj b/plugins/tcl/tcl.vcxproj index fa69aa33..baa188f6 100644 --- a/plugins/tcl/tcl.vcxproj +++ b/plugins/tcl/tcl.vcxproj @@ -40,6 +40,8 @@ false $(TclOutput) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/upd/upd.vcxproj b/plugins/upd/upd.vcxproj index ee00dc1a..9cf7c017 100644 --- a/plugins/upd/upd.vcxproj +++ b/plugins/upd/upd.vcxproj @@ -30,6 +30,8 @@ false xcupd + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/winamp/winamp.vcxproj b/plugins/winamp/winamp.vcxproj index 3924b8b2..0a1eb419 100644 --- a/plugins/winamp/winamp.vcxproj +++ b/plugins/winamp/winamp.vcxproj @@ -30,6 +30,8 @@ false xcwinamp + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/winsys/winsys.vcxproj b/plugins/winsys/winsys.vcxproj index 1466e8e7..656f6ee9 100644 --- a/plugins/winsys/winsys.vcxproj +++ b/plugins/winsys/winsys.vcxproj @@ -30,6 +30,8 @@ false xcwinsys + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/wmpa/wmpa.vcxproj b/plugins/wmpa/wmpa.vcxproj index b231d0b0..630cef4d 100644 --- a/plugins/wmpa/wmpa.vcxproj +++ b/plugins/wmpa/wmpa.vcxproj @@ -31,6 +31,8 @@ false xcwmpa + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/xsasl/xsasl.vcxproj b/plugins/xsasl/xsasl.vcxproj index 9bb8fb24..7e0c41d7 100644 --- a/plugins/xsasl/xsasl.vcxproj +++ b/plugins/xsasl/xsasl.vcxproj @@ -30,6 +30,8 @@ false xcxsasl + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/plugins/xtray/xtray.vcxproj b/plugins/xtray/xtray.vcxproj index 1dc97f30..1f7aa5cf 100644 --- a/plugins/xtray/xtray.vcxproj +++ b/plugins/xtray/xtray.vcxproj @@ -29,6 +29,8 @@ false + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj index f0a730b7..b57b2ccf 100644 --- a/src/common/common.vcxproj +++ b/src/common/common.vcxproj @@ -90,7 +90,10 @@ - + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 diff --git a/src/dirent/dirent.vcxproj b/src/dirent/dirent.vcxproj index 65fa2fb0..8ac38f92 100644 --- a/src/dirent/dirent.vcxproj +++ b/src/dirent/dirent.vcxproj @@ -35,6 +35,8 @@ $(ProjectName)-win32 + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/src/fe-gtk/fe-gtk.vcxproj b/src/fe-gtk/fe-gtk.vcxproj index 68390d03..fce8d3e6 100644 --- a/src/fe-gtk/fe-gtk.vcxproj +++ b/src/fe-gtk/fe-gtk.vcxproj @@ -30,6 +30,8 @@ false xchat + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/src/fe-text/fe-text.vcxproj b/src/fe-text/fe-text.vcxproj index 389c7b5e..ac7068ec 100644 --- a/src/fe-text/fe-text.vcxproj +++ b/src/fe-text/fe-text.vcxproj @@ -30,6 +30,8 @@ false xchat-text + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) diff --git a/src/pixmaps/pixmaps.vcxproj b/src/pixmaps/pixmaps.vcxproj index ba88104d..3fda0fef 100644 --- a/src/pixmaps/pixmaps.vcxproj +++ b/src/pixmaps/pixmaps.vcxproj @@ -29,6 +29,8 @@ false + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) @@ -47,7 +49,7 @@ true - "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" + "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" diff --git a/src/version/version.c b/src/version/version.c index 14312a43..53af5675 100644 --- a/src/version/version.c +++ b/src/version/version.c @@ -76,13 +76,13 @@ main (int argc, char *argv[]) { printf ("#define COMMA_VERSION %s\n", comma ()); } - else if (!strcmp (argv[1], "-a32")) /* xchat-wdk.iss/AppVerName */ - { - printf ("AppVerName=XChat-WDK %s (x86)\n", PACKAGE_VERSION); - } - else if (!strcmp (argv[1], "-a64")) /* xchat-wdk.iss/AppVerName */ + else if (!strcmp (argv[1], "-a")) /* xchat-wdk.iss/AppVerName */ { +#ifdef _WIN64 printf ("AppVerName=XChat-WDK %s (x64)\n", PACKAGE_VERSION); +#else + printf ("AppVerName=XChat-WDK %s (x86)\n", PACKAGE_VERSION); +#endif } else if (!strcmp (argv[1], "-v")) /* xchat-wdk.iss/AppVersion */ { @@ -92,13 +92,13 @@ main (int argc, char *argv[]) { printf ("VersionInfoVersion=%s\n", point ()); } - else if (!strcmp (argv[1], "-o32")) /* xchat-wdk.iss/OutputBaseFilename */ - { - printf ("OutputBaseFilename=XChat-WDK %s x86\n", PACKAGE_VERSION); - } - else if (!strcmp (argv[1], "-o64")) /* xchat-wdk.iss/OutputBaseFilename */ + else if (!strcmp (argv[1], "-o")) /* xchat-wdk.iss/OutputBaseFilename */ { +#ifdef _WIN64 printf ("OutputBaseFilename=XChat-WDK %s x64\n", PACKAGE_VERSION); +#else + printf ("OutputBaseFilename=XChat-WDK %s x86\n", PACKAGE_VERSION); +#endif } else if (!strcmp (argv[1], "-v")) /* version.txt */ { diff --git a/src/version/version.vcxproj b/src/version/version.vcxproj index 26c13458..b07b8e2a 100644 --- a/src/version/version.vcxproj +++ b/src/version/version.vcxproj @@ -29,6 +29,8 @@ false + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) @@ -48,7 +50,7 @@ true - "$(OutputPath)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" + "$(OutDir)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" diff --git a/win32/bitmaps/wizardimage.bmp b/win32/bitmaps/wizardimage.bmp deleted file mode 100644 index 9f5a4c90..00000000 Binary files a/win32/bitmaps/wizardimage.bmp and /dev/null differ diff --git a/win32/bitmaps/wizardsmallimage.bmp b/win32/bitmaps/wizardsmallimage.bmp deleted file mode 100644 index 1bb8b790..00000000 Binary files a/win32/bitmaps/wizardsmallimage.bmp and /dev/null differ diff --git a/win32/copy/copy.vcxproj b/win32/copy/copy.vcxproj index d7c6fda7..5b64ddc6 100644 --- a/win32/copy/copy.vcxproj +++ b/win32/copy/copy.vcxproj @@ -16,6 +16,7 @@ false true MultiByte + WDK7 @@ -25,7 +26,10 @@ - + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level3 @@ -67,8 +71,8 @@ copy "$(DepsRoot)\bin\libpng14-14.dll" "$(XChatDest)" copy "$(DepsRoot)\bin\libxml2.dll" "$(XChatDest)" xcopy /q /s /i "$(DepsRoot)\lib\gtk-2.0\2.10.0\engines" "$(XChatDest)\lib\gtk-2.0\2.10.0\engines" xcopy /q /s /i "$(DepsRoot)\lib\gtk-2.0\modules\libgail.dll" "$(XChatDest)\lib\gtk-2.0\modules\" -xcopy /q /s /i "..\etc" "$(XChatDest)\etc" -xcopy /q /s /i "..\share" "$(XChatDest)\share" +xcopy /q /s /i etc "$(XChatDest)\etc" +xcopy /q /s /i share "$(XChatDest)\share" copy "..\..\COPYING" "$(XChatDest)" copy "$(DepsRoot)\LICENSE.OPENSSL" "$(XChatDest)" copy "$(DepsRoot)\LICENSE.ZLIB" "$(XChatDest)" @@ -102,13 +106,20 @@ copy "$(OutDir)\xcwinamp.dll" "$(XChatDest)\plugins" copy "$(OutDir)\xcwinsys.dll" "$(XChatDest)\plugins" copy "$(OutDir)\xcwmpa.dll" "$(XChatDest)\plugins" copy "$(DepsRoot)\bin\lua51.dll" "$(XChatDest)" -xcopy /q /s /i "..\..\po\locale" "$(XChatDest)\locale" +xcopy /q /s /i "$(OutDir)\locale" "$(XChatDest)\locale" xcopy /q /s /i "$(DepsRoot)\share\locale" "$(XChatDest)\share\locale" copy "$(ProgramFiles)\Codejock Software\ISSkin\ISSkinU.dll" "$(XChatDest)" -copy "..\isskin\watercolorlite-green.cjstyles" "$(XChatDest)" +copy "..\installer\watercolorlite-green.cjstyles" "$(XChatDest)" + + + + + + + diff --git a/win32/copy/copy.vcxproj.filters b/win32/copy/copy.vcxproj.filters index ef1ebf58..f832474d 100644 --- a/win32/copy/copy.vcxproj.filters +++ b/win32/copy/copy.vcxproj.filters @@ -1,2 +1,46 @@  - \ No newline at end of file + + + + {e02a8c67-767c-4c6e-a854-81fae08cf4da} + + + {503881c0-011d-443b-a373-4bfe125dcfa6} + + + {4316433a-2a8e-48f7-9020-e1f4de0d23d1} + + + {832ebebc-ab71-4bf6-9f3a-02ec748f7c14} + + + {9a881586-aed2-4f80-ba84-e521e6785566} + + + {c825f724-0618-4160-97b7-12d6e0f2bc7b} + + + + + Resource Files\etc + + + Resource Files\etc + + + Resource Files\etc + + + Resource Files\etc + + + Resource Files\etc\gtk-2.0 + + + Resource Files\share\xml\iso-codes + + + Resource Files\share\xml\iso-codes + + + \ No newline at end of file diff --git a/win32/copy/etc/download.png b/win32/copy/etc/download.png new file mode 100644 index 00000000..43253432 Binary files /dev/null and b/win32/copy/etc/download.png differ diff --git a/win32/copy/etc/gtk-2.0/gtkrc b/win32/copy/etc/gtk-2.0/gtkrc new file mode 100644 index 00000000..6ac7b76c --- /dev/null +++ b/win32/copy/etc/gtk-2.0/gtkrc @@ -0,0 +1,71 @@ +gtk-font-name = "sans 8" + +gtk-icon-sizes = "gtk-menu=13,13:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32" +gtk-toolbar-icon-size = small-toolbar + +# disable images in buttons. i've only seen ugly delphi apps use this feature. +gtk-button-images = 0 + +# enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly. +# the office apps use them heavily, though. +gtk-menu-images = 1 + +# use the win32 button ordering instead of the GNOME HIG one, where applicable +gtk-alternative-button-order = 1 + +# use the win32 sort indicators direction, as in Explorer +gtk-alternative-sort-arrows = 1 + +# Windows users don't expect the PC Speaker beeping at them when they backspace in an empty textview and stuff like that +gtk-error-bell = 0 + +# hide mnemonic underlines until the Alt key is pressed (requires gtk 2.18+) +# gtk-auto-mnemonics = 1 + +style "msw-default" +{ + GtkWidget::interior-focus = 1 + GtkOptionMenu::indicator-size = { 9, 5 } + GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 } + GtkSpinButton::shadow-type = in + + # Owen and I disagree that these should be themable + #GtkUIManager::add-tearoffs = 0 + #GtkComboBox::add-tearoffs = 0 + + GtkComboBox::appears-as-list = 1 + GtkComboBox::focus-on-click = 0 + + GOComboBox::add_tearoffs = 0 + + GtkTreeView::allow-rules = 0 + GtkTreeView::expander-size = 12 + + GtkExpander::expander-size = 12 + + GtkScrolledWindow::scrollbar_spacing = 1 + + GtkSeparatorMenuItem::horizontal-padding = 2 + + engine "wimp" + { + } +} +class "*" style "msw-default" + +binding "ms-windows-tree-view" +{ + bind "Right" { "expand-collapse-cursor-row" (1,1,0) } + bind "Left" { "expand-collapse-cursor-row" (1,0,0) } +} + +class "GtkTreeView" binding "ms-windows-tree-view" + +style "msw-combobox-thickness" = "msw-default" +{ + xthickness = 0 + ythickness = 0 +} + +widget_class "*TreeView*ComboBox*" style "msw-combobox-thickness" +widget_class "*ComboBox*GtkFrame*" style "msw-combobox-thickness" diff --git a/win32/copy/etc/gtkpref.png b/win32/copy/etc/gtkpref.png new file mode 100644 index 00000000..9a6c9cf9 Binary files /dev/null and b/win32/copy/etc/gtkpref.png differ diff --git a/win32/copy/etc/music.png b/win32/copy/etc/music.png new file mode 100644 index 00000000..3a72f118 Binary files /dev/null and b/win32/copy/etc/music.png differ diff --git a/win32/copy/etc/system.png b/win32/copy/etc/system.png new file mode 100644 index 00000000..fc4282c7 Binary files /dev/null and b/win32/copy/etc/system.png differ diff --git a/win32/copy/share/xml/iso-codes/iso_3166.xml b/win32/copy/share/xml/iso-codes/iso_3166.xml new file mode 100644 index 00000000..77c72eb2 --- /dev/null +++ b/win32/copy/share/xml/iso-codes/iso_3166.xml @@ -0,0 +1,1703 @@ + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/copy/share/xml/iso-codes/iso_639.xml b/win32/copy/share/xml/iso-codes/iso_639.xml new file mode 100644 index 00000000..02fa01fb --- /dev/null +++ b/win32/copy/share/xml/iso-codes/iso_639.xml @@ -0,0 +1,2169 @@ + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/etc/download.png b/win32/etc/download.png deleted file mode 100644 index 43253432..00000000 Binary files a/win32/etc/download.png and /dev/null differ diff --git a/win32/etc/gtk-2.0/gtkrc b/win32/etc/gtk-2.0/gtkrc deleted file mode 100644 index 6ac7b76c..00000000 --- a/win32/etc/gtk-2.0/gtkrc +++ /dev/null @@ -1,71 +0,0 @@ -gtk-font-name = "sans 8" - -gtk-icon-sizes = "gtk-menu=13,13:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32" -gtk-toolbar-icon-size = small-toolbar - -# disable images in buttons. i've only seen ugly delphi apps use this feature. -gtk-button-images = 0 - -# enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly. -# the office apps use them heavily, though. -gtk-menu-images = 1 - -# use the win32 button ordering instead of the GNOME HIG one, where applicable -gtk-alternative-button-order = 1 - -# use the win32 sort indicators direction, as in Explorer -gtk-alternative-sort-arrows = 1 - -# Windows users don't expect the PC Speaker beeping at them when they backspace in an empty textview and stuff like that -gtk-error-bell = 0 - -# hide mnemonic underlines until the Alt key is pressed (requires gtk 2.18+) -# gtk-auto-mnemonics = 1 - -style "msw-default" -{ - GtkWidget::interior-focus = 1 - GtkOptionMenu::indicator-size = { 9, 5 } - GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 } - GtkSpinButton::shadow-type = in - - # Owen and I disagree that these should be themable - #GtkUIManager::add-tearoffs = 0 - #GtkComboBox::add-tearoffs = 0 - - GtkComboBox::appears-as-list = 1 - GtkComboBox::focus-on-click = 0 - - GOComboBox::add_tearoffs = 0 - - GtkTreeView::allow-rules = 0 - GtkTreeView::expander-size = 12 - - GtkExpander::expander-size = 12 - - GtkScrolledWindow::scrollbar_spacing = 1 - - GtkSeparatorMenuItem::horizontal-padding = 2 - - engine "wimp" - { - } -} -class "*" style "msw-default" - -binding "ms-windows-tree-view" -{ - bind "Right" { "expand-collapse-cursor-row" (1,1,0) } - bind "Left" { "expand-collapse-cursor-row" (1,0,0) } -} - -class "GtkTreeView" binding "ms-windows-tree-view" - -style "msw-combobox-thickness" = "msw-default" -{ - xthickness = 0 - ythickness = 0 -} - -widget_class "*TreeView*ComboBox*" style "msw-combobox-thickness" -widget_class "*ComboBox*GtkFrame*" style "msw-combobox-thickness" diff --git a/win32/etc/gtkpref.png b/win32/etc/gtkpref.png deleted file mode 100644 index 9a6c9cf9..00000000 Binary files a/win32/etc/gtkpref.png and /dev/null differ diff --git a/win32/etc/music.png b/win32/etc/music.png deleted file mode 100644 index 3a72f118..00000000 Binary files a/win32/etc/music.png and /dev/null differ diff --git a/win32/etc/system.png b/win32/etc/system.png deleted file mode 100644 index fc4282c7..00000000 Binary files a/win32/etc/system.png and /dev/null differ diff --git a/win32/installer/installer.vcxproj b/win32/installer/installer.vcxproj index a8ca84fa..3cb84d56 100644 --- a/win32/installer/installer.vcxproj +++ b/win32/installer/installer.vcxproj @@ -16,6 +16,7 @@ false true MultiByte + WDK7 @@ -25,7 +26,10 @@ - + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level3 @@ -39,19 +43,25 @@ true - echo [Setup] > "$(SolutionDir)\xchat-wdk-x86.iss" -echo WizardImageFile="$(SolutionDir)\bitmaps\wizardimage.bmp" >> "$(SolutionDir)\xchat-wdk-x86.iss" -echo WizardSmallImageFile="$(SolutionDir)\bitmaps\wizardsmallimage.bmp" >> "$(SolutionDir)\xchat-wdk-x86.iss" -"$(OutDir)\version" -a32 >> "$(SolutionDir)\xchat-wdk-x86.iss" -"$(OutDir)\version" -v >> "$(SolutionDir)\xchat-wdk-x86.iss" -"$(OutDir)\version" -i >> "$(SolutionDir)\xchat-wdk-x86.iss" -"$(OutDir)\version" -o32 >> "$(SolutionDir)\xchat-wdk-x86.iss" -echo SetupIconFile="$(SolutionDir)\..\xchat.ico" >> "$(SolutionDir)\xchat-wdk-x86.iss" -type "$(SolutionDir)\xchat-wdk-x86.skel.iss" >> "$(SolutionDir)\xchat-wdk-x86.iss" -"$(ProgramFiles)\Inno Setup 5\compil32" /cc "$(SolutionDir)\xchat-wdk-x86.iss" + echo [Setup] > "$(OutDir)\xchat-wdk-x86.iss" +echo WizardImageFile="$(ProjectDir)\wizardimage.bmp" >> "$(OutDir)\xchat-wdk-x86.iss" +echo WizardSmallImageFile="$(ProjectDir)\wizardsmallimage.bmp" >> "$(OutDir)\xchat-wdk-x86.iss" +"$(OutDir)\version" -a >> "$(OutDir)\xchat-wdk-x86.iss" +"$(OutDir)\version" -v >> "$(OutDir)\xchat-wdk-x86.iss" +"$(OutDir)\version" -i >> "$(OutDir)\xchat-wdk-x86.iss" +"$(OutDir)\version" -o >> "$(OutDir)\xchat-wdk-x86.iss" +echo SetupIconFile="$(SolutionDir)\..\xchat.ico" >> "$(OutDir)\xchat-wdk-x86.iss" +type xchat-wdk-x86.skel.iss >> "$(OutDir)\xchat-wdk-x86.iss" +"$(ProgramFiles)\Inno Setup 5\compil32" /cc "$(OutDir)\xchat-wdk-x86.iss" + + + + + + diff --git a/win32/installer/installer.vcxproj.filters b/win32/installer/installer.vcxproj.filters index 47cfb34e..b18a6411 100644 --- a/win32/installer/installer.vcxproj.filters +++ b/win32/installer/installer.vcxproj.filters @@ -1,17 +1,29 @@  - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + \ No newline at end of file diff --git a/win32/installer/watercolorlite-blue.cjstyles b/win32/installer/watercolorlite-blue.cjstyles new file mode 100644 index 00000000..a457029b Binary files /dev/null and b/win32/installer/watercolorlite-blue.cjstyles differ diff --git a/win32/installer/watercolorlite-green.cjstyles b/win32/installer/watercolorlite-green.cjstyles new file mode 100644 index 00000000..2b77026d Binary files /dev/null and b/win32/installer/watercolorlite-green.cjstyles differ diff --git a/win32/installer/wizardimage.bmp b/win32/installer/wizardimage.bmp new file mode 100644 index 00000000..9f5a4c90 Binary files /dev/null and b/win32/installer/wizardimage.bmp differ diff --git a/win32/installer/wizardsmallimage.bmp b/win32/installer/wizardsmallimage.bmp new file mode 100644 index 00000000..1bb8b790 Binary files /dev/null and b/win32/installer/wizardsmallimage.bmp differ diff --git a/win32/installer/xchat-wdk-x64.skel.iss b/win32/installer/xchat-wdk-x64.skel.iss new file mode 100644 index 00000000..e0a804db --- /dev/null +++ b/win32/installer/xchat-wdk-x64.skel.iss @@ -0,0 +1,279 @@ +AppName=XChat-WDK (x64) +AppPublisher=XChat-WDK +AppPublisherURL=http://www.xchat-wdk.org/ +AppCopyright=Copyright (C) 1998-2010 Peter Zelezny +AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list +AppUpdatesURL=http://www.xchat-wdk.org/home/downloads +LicenseFile=COPYING +UninstallDisplayIcon={app}\xchat.exe +UninstallDisplayName=XChat-WDK (x64) +DefaultDirName={pf}\XChat-WDK +DefaultGroupName=XChat-WDK +DisableProgramGroupPage=yes +SolidCompression=yes +SourceDir=..\..\rel +OutputDir=..\.. +FlatComponentsList=no +PrivilegesRequired=none +ShowComponentSizes=no +CreateUninstallRegKey=not IsTaskSelected('portable') +Uninstallable=not IsTaskSelected('portable') +ArchitecturesAllowed=x64 +ArchitecturesInstallIn64BitMode=x64 + +[Types] +Name: "normal"; Description: "Normal Installation" +Name: "full"; Description: "Full Installation" +Name: "minimal"; Description: "Minimal Installation" +Name: "custom"; Description: "Custom Installation"; Flags: iscustom + +[Components] +Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed +Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning +Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning +;obs Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning +;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\dns"; Description: "DNS"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\doat"; Description: "Do At"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\exec"; Description: "Exec"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning +;Name: "plugins\nonbmp"; Description: "Non-BMP"; Types: normal full custom; Flags: disablenouninstallwarning +Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning +Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\winsys"; Description: "WinSys"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xsasl"; Description: "X-SASL"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning + +[Tasks] +Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked + +Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl +Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl + +[Registry] +Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable +Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable + +[Run] +Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent + +[Files] +; Add the ISSkin DLL used for skinning Inno Setup installations. +Source: ISSkinU.dll; DestDir: {app}; Flags: dontcopy + +; Add the Visual Style resource contains resources used for skinning, +; you can also use Microsoft Visual Styles (*.msstyles) resources. +Source: watercolorlite-blue.cjstyles; DestDir: {tmp}; Flags: dontcopy + +Source: "portable-mode"; DestDir: "{app}"; Tasks: portable + +Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "COPYING"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.ZLIB"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.GTK"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.CAIRO"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.LUA"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.LIBXML"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs +;Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs and not gtkengines +Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs +Source: "locale\*"; DestDir: "{app}\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations +Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations +;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: spelling + +Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libcairo-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libexpat-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libffi-5.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libfontconfig-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libjasper-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libjpeg-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libpixman-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libtiff-3.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpng14-14.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libpng15-15.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libxml2-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs + +Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs + +Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs +Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs +Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Flags: ignoreversion; Components: libs + +;obs Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: gtkengines +;obs Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: gtkengines +;obs Source: "gtk2-prefs.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: gtkengines + +Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum +Source: "plugins\xcdns.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\dns +Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\doat +Source: "plugins\xcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\exec +Source: "plugins\xcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim +Source: "etc\music.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winamp or plugins\mpcinfo +Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\mpcinfo +;Source: "plugins\xcnonbmp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\nonbmp +Source: "etc\download.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\upd +Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd +Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp +Source: "etc\system.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winsys +Source: "plugins\xcwinsys.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winsys +Source: "plugins\xcxsasl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xsasl +Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xtray +Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\wmpa + +Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\lua +Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python +Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\tcl + +Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl512 +Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl514 + +Source: "xchat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "xchat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xctext + +[Icons] +Name: "{group}\XChat-WDK (x64)"; Filename: "{app}\xchat.exe"; Tasks: not portable +Name: "{group}\XChat-Text (x64)"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable +Name: "{group}\Uninstall XChat-WDK (x64)"; Filename: "{uninstallexe}"; Tasks: not portable + +[Messages] +BeveledLabel= XChat-WDK + +[Code] +///////////////////////////////////////////////////////////////////// +// these are required for x86->x64 or reverse upgrades +///////////////////////////////////////////////////////////////////// +function GetUninstallString(): String; +var + sUnInstPath: String; + sUnInstallString: String; +begin + sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK (x64)_is1'); + sUnInstallString := ''; + if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + Result := sUnInstallString; +end; + + +///////////////////////////////////////////////////////////////////// +function IsUpgrade(): Boolean; +begin + Result := (GetUninstallString() <> ''); +end; + + +///////////////////////////////////////////////////////////////////// +function UnInstallOldVersion(): Integer; +var + sUnInstallString: String; + iResultCode: Integer; +begin +// Return Values: +// 1 - uninstall string is empty +// 2 - error executing the UnInstallString +// 3 - successfully executed the UnInstallString + + // default return value + Result := 0; + + // get the uninstall string of the old app + sUnInstallString := GetUninstallString(); + if sUnInstallString <> '' then begin + sUnInstallString := RemoveQuotes(sUnInstallString); + if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then + Result := 3 + else + Result := 2; + end else + Result := 1; +end; + +///////////////////////////////////////////////////////////////////// +procedure CurStepChanged(CurStep: TSetupStep); +begin + if not (IsTaskSelected('portable')) then + begin + if (CurStep=ssInstall) then + begin + if (IsUpgrade()) then + begin + UnInstallOldVersion(); + end; + end; + end; +end; + +///////////////////////////////////////////////////////////////////// +// Importing LoadSkin API from ISSkin.DLL +procedure LoadSkin(lpszPath: String; lpszIniFileName: String); +external 'LoadSkin@files:isskinu.dll stdcall'; + +// Importing UnloadSkin API from ISSkin.DLL +procedure UnloadSkin(); +external 'UnloadSkin@files:isskinu.dll stdcall'; + +// Importing ShowWindow Windows API from User32.DLL +function ShowWindow(hWnd: Integer; uType: Integer): Integer; +external 'ShowWindow@user32.dll stdcall'; + +function InitializeSetup(): Boolean; +begin + ExtractTemporaryFile('watercolorlite-blue.cjstyles'); + LoadSkin(ExpandConstant('{tmp}\watercolorlite-blue.cjstyles'), ''); + Result := True; +end; + +procedure DeinitializeSetup(); +begin + // Hide Window before unloading skin so user does not get + // a glimpse of an unskinned window before it is closed. + ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0); + UnloadSkin(); +end; diff --git a/win32/installer/xchat-wdk-x86.skel.iss b/win32/installer/xchat-wdk-x86.skel.iss new file mode 100644 index 00000000..748c2b19 --- /dev/null +++ b/win32/installer/xchat-wdk-x86.skel.iss @@ -0,0 +1,282 @@ +AppName=XChat-WDK (x86) +AppPublisher=XChat-WDK +AppPublisherURL=http://www.xchat-wdk.org/ +AppCopyright=Copyright (C) 1998-2010 Peter Zelezny +AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list +AppUpdatesURL=http://www.xchat-wdk.org/home/downloads +LicenseFile=COPYING +UninstallDisplayIcon={app}\xchat.exe +UninstallDisplayName=XChat-WDK (x86) +DefaultDirName={pf}\XChat-WDK +DefaultGroupName=XChat-WDK +DisableProgramGroupPage=yes +SolidCompression=yes +SourceDir=..\rel +OutputDir=.. +FlatComponentsList=no +PrivilegesRequired=none +ShowComponentSizes=no +CreateUninstallRegKey=not IsTaskSelected('portable') +Uninstallable=not IsTaskSelected('portable') +ArchitecturesAllowed=x86 x64 + +[Types] +Name: "normal"; Description: "Normal Installation" +Name: "full"; Description: "Full Installation" +Name: "minimal"; Description: "Minimal Installation" +Name: "custom"; Description: "Custom Installation"; Flags: iscustom + +[Components] +Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed +Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning +Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning +;obs Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning +;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\dns"; Description: "DNS"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\doat"; Description: "Do At"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\exec"; Description: "Exec"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning +;Name: "plugins\nonbmp"; Description: "Non-BMP"; Types: normal full custom; Flags: disablenouninstallwarning +Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning +Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\winsys"; Description: "WinSys"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xsasl"; Description: "X-SASL"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning + +[Tasks] +Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked + +Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl +Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl +Name: perl516; Description: "5.16"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl + +[Registry] +Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable +Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable + +[Run] +Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent + +[Files] +; Add the ISSkin DLL used for skinning Inno Setup installations. +Source: ISSkinU.dll; DestDir: {app}; Flags: dontcopy + +; Add the Visual Style resource contains resources used for skinning, +; you can also use Microsoft Visual Styles (*.msstyles) resources. +Source: watercolorlite-green.cjstyles; DestDir: {tmp}; Flags: dontcopy + +Source: "portable-mode"; DestDir: "{app}"; Tasks: portable + +Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "COPYING"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.ZLIB"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.GTK"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.CAIRO"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.LUA"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.LIBXML"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs +;Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs and not gtkengines +Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs +Source: "locale\*"; DestDir: "{app}\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations +Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations +;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: spelling + +Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libcairo-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libexpat-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libffi-5.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "freetype6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libfontconfig-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "intl.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libjasper-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libjpeg-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libpixman-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libtiff-3.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpng14-14.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libpng15-15.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libxml2-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs + +Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs + +Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs +Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs +Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Flags: ignoreversion; Components: libs + +;obs Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: gtkengines +;obs Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: gtkengines +;obs Source: "gtk2-prefs.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: gtkengines + +Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum +Source: "plugins\xcdns.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\dns +Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\doat +Source: "plugins\xcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\exec +Source: "plugins\xcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim +Source: "etc\music.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winamp or plugins\mpcinfo +Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\mpcinfo +;Source: "plugins\xcnonbmp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\nonbmp +Source: "etc\download.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\upd +Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd +Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp +Source: "etc\system.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winsys +Source: "plugins\xcwinsys.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winsys +Source: "plugins\xcxsasl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xsasl +Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xtray +Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\wmpa + +Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\lua +Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python +Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\tcl + +Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl512 +Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl514 +Source: "plugins\xcperl-516.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl516 + +Source: "xchat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "xchat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xctext + +[Icons] +Name: "{group}\XChat-WDK (x86)"; Filename: "{app}\xchat.exe"; Tasks: not portable +Name: "{group}\XChat-Text (x86)"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable +Name: "{group}\Uninstall XChat-WDK (x86)"; Filename: "{uninstallexe}"; Tasks: not portable + +[Messages] +BeveledLabel= XChat-WDK + +[Code] +///////////////////////////////////////////////////////////////////// +// these are required for x86->x64 or reverse upgrades +///////////////////////////////////////////////////////////////////// +function GetUninstallString(): String; +var + sUnInstPath: String; + sUnInstallString: String; +begin + sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK (x86)_is1'); + sUnInstallString := ''; + if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + Result := sUnInstallString; +end; + + +///////////////////////////////////////////////////////////////////// +function IsUpgrade(): Boolean; +begin + Result := (GetUninstallString() <> ''); +end; + + +///////////////////////////////////////////////////////////////////// +function UnInstallOldVersion(): Integer; +var + sUnInstallString: String; + iResultCode: Integer; +begin +// Return Values: +// 1 - uninstall string is empty +// 2 - error executing the UnInstallString +// 3 - successfully executed the UnInstallString + + // default return value + Result := 0; + + // get the uninstall string of the old app + sUnInstallString := GetUninstallString(); + if sUnInstallString <> '' then begin + sUnInstallString := RemoveQuotes(sUnInstallString); + if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then + Result := 3 + else + Result := 2; + end else + Result := 1; +end; + +///////////////////////////////////////////////////////////////////// +procedure CurStepChanged(CurStep: TSetupStep); +begin + if not (IsTaskSelected('portable')) then + begin + if (CurStep=ssInstall) then + begin + if (IsUpgrade()) then + begin + UnInstallOldVersion(); + end; + end; + end; +end; + +///////////////////////////////////////////////////////////////////// +// Importing LoadSkin API from ISSkin.DLL +procedure LoadSkin(lpszPath: String; lpszIniFileName: String); +external 'LoadSkin@files:isskinu.dll stdcall'; + +// Importing UnloadSkin API from ISSkin.DLL +procedure UnloadSkin(); +external 'UnloadSkin@files:isskinu.dll stdcall'; + +// Importing ShowWindow Windows API from User32.DLL +function ShowWindow(hWnd: Integer; uType: Integer): Integer; +external 'ShowWindow@user32.dll stdcall'; + +function InitializeSetup(): Boolean; +begin + ExtractTemporaryFile('watercolorlite-green.cjstyles'); + LoadSkin(ExpandConstant('{tmp}\watercolorlite-green.cjstyles'), ''); + Result := True; +end; + +procedure DeinitializeSetup(); +begin + // Hide Window before unloading skin so user does not get + // a glimpse of an unskinned window before it is closed. + ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0); + UnloadSkin(); +end; diff --git a/win32/isskin/watercolorlite-blue.cjstyles b/win32/isskin/watercolorlite-blue.cjstyles deleted file mode 100644 index a457029b..00000000 Binary files a/win32/isskin/watercolorlite-blue.cjstyles and /dev/null differ diff --git a/win32/isskin/watercolorlite-green.cjstyles b/win32/isskin/watercolorlite-green.cjstyles deleted file mode 100644 index 2b77026d..00000000 Binary files a/win32/isskin/watercolorlite-green.cjstyles and /dev/null differ diff --git a/win32/nls/nls.vcxproj b/win32/nls/nls.vcxproj index a9fa71bf..10e53bd8 100644 --- a/win32/nls/nls.vcxproj +++ b/win32/nls/nls.vcxproj @@ -26,7 +26,10 @@ - + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level3 @@ -45,11 +48,11 @@ cd ..\..\po -rmdir /q /s locale -mkdir locale +rmdir /q /s "$(OutDir)\locale" +mkdir "$(OutDir)\locale" for %%A in (*.po) do ( -mkdir locale\%%~nA\LC_MESSAGES -"$(DepsRoot)\bin\msgfmt" -co locale\%%~nA\LC_MESSAGES\xchat.mo %%A +mkdir "$(OutDir)\locale\%%~nA\LC_MESSAGES" +"$(DepsRoot)\bin\msgfmt" -co "$(OutDir)\locale\%%~nA\LC_MESSAGES\xchat.mo" %%A ) diff --git a/win32/share/themes/Murrine/gtk-2.0/gtkrc b/win32/share/themes/Murrine/gtk-2.0/gtkrc deleted file mode 100644 index b9d95848..00000000 --- a/win32/share/themes/Murrine/gtk-2.0/gtkrc +++ /dev/null @@ -1,7 +0,0 @@ -style "default" -{ - engine "murrine" - { - } -} -class "*" style "default" diff --git a/win32/share/xml/iso-codes/iso_3166.xml b/win32/share/xml/iso-codes/iso_3166.xml deleted file mode 100644 index 77c72eb2..00000000 --- a/win32/share/xml/iso-codes/iso_3166.xml +++ /dev/null @@ -1,1703 +0,0 @@ - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/share/xml/iso-codes/iso_639.xml b/win32/share/xml/iso-codes/iso_639.xml deleted file mode 100644 index 02fa01fb..00000000 --- a/win32/share/xml/iso-codes/iso_639.xml +++ /dev/null @@ -1,2169 +0,0 @@ - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/xchat-wdk-x64.skel.iss b/win32/xchat-wdk-x64.skel.iss deleted file mode 100644 index 1caf8198..00000000 --- a/win32/xchat-wdk-x64.skel.iss +++ /dev/null @@ -1,279 +0,0 @@ -AppName=XChat-WDK (x64) -AppPublisher=XChat-WDK -AppPublisherURL=http://www.xchat-wdk.org/ -AppCopyright=Copyright (C) 1998-2010 Peter Zelezny -AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list -AppUpdatesURL=http://www.xchat-wdk.org/home/downloads -LicenseFile=COPYING -UninstallDisplayIcon={app}\xchat.exe -UninstallDisplayName=XChat-WDK (x64) -DefaultDirName={pf}\XChat-WDK -DefaultGroupName=XChat-WDK -DisableProgramGroupPage=yes -SolidCompression=yes -SourceDir=dist-x64 -OutputDir=..\ -FlatComponentsList=no -PrivilegesRequired=none -ShowComponentSizes=no -CreateUninstallRegKey=not IsTaskSelected('portable') -Uninstallable=not IsTaskSelected('portable') -ArchitecturesAllowed=x64 -ArchitecturesInstallIn64BitMode=x64 - -[Types] -Name: "normal"; Description: "Normal Installation" -Name: "full"; Description: "Full Installation" -Name: "minimal"; Description: "Minimal Installation" -Name: "custom"; Description: "Custom Installation"; Flags: iscustom - -[Components] -Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed -Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning -Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning -;obs Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning -;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\dns"; Description: "DNS"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\doat"; Description: "Do At"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\exec"; Description: "Exec"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning -;Name: "plugins\nonbmp"; Description: "Non-BMP"; Types: normal full custom; Flags: disablenouninstallwarning -Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning -Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\winsys"; Description: "WinSys"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\xsasl"; Description: "X-SASL"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning - -[Tasks] -Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked - -Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl -Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl - -[Registry] -Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable -Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable - -[Run] -Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent - -[Files] -; Add the ISSkin DLL used for skinning Inno Setup installations. -Source: ISSkinU.dll; DestDir: {app}; Flags: dontcopy - -; Add the Visual Style resource contains resources used for skinning, -; you can also use Microsoft Visual Styles (*.msstyles) resources. -Source: watercolorlite-blue.cjstyles; DestDir: {tmp}; Flags: dontcopy - -Source: "portable-mode"; DestDir: "{app}"; Tasks: portable - -Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "COPYING"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.ZLIB"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.GTK"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.CAIRO"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.LUA"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.LIBXML"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs -;Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs and not gtkengines -Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs -Source: "locale\*"; DestDir: "{app}\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations -Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations -;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: spelling - -Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libcairo-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libexpat-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libffi-5.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libfontconfig-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libjasper-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libjpeg-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libpixman-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libtiff-3.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpng14-14.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libpng15-15.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libxml2-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs - -Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs - -Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs -Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs -Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Flags: ignoreversion; Components: libs - -;obs Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: gtkengines -;obs Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: gtkengines -;obs Source: "gtk2-prefs.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: gtkengines - -Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum -Source: "plugins\xcdns.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\dns -Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\doat -Source: "plugins\xcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\exec -Source: "plugins\xcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim -Source: "etc\music.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winamp or plugins\mpcinfo -Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\mpcinfo -;Source: "plugins\xcnonbmp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\nonbmp -Source: "etc\download.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\upd -Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd -Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp -Source: "etc\system.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winsys -Source: "plugins\xcwinsys.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winsys -Source: "plugins\xcxsasl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xsasl -Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xtray -Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\wmpa - -Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\lua -Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python -Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\tcl - -Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl512 -Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl514 - -Source: "xchat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "xchat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xctext - -[Icons] -Name: "{group}\XChat-WDK (x64)"; Filename: "{app}\xchat.exe"; Tasks: not portable -Name: "{group}\XChat-Text (x64)"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable -Name: "{group}\Uninstall XChat-WDK (x64)"; Filename: "{uninstallexe}"; Tasks: not portable - -[Messages] -BeveledLabel= XChat-WDK - -[Code] -///////////////////////////////////////////////////////////////////// -// these are required for x86->x64 or reverse upgrades -///////////////////////////////////////////////////////////////////// -function GetUninstallString(): String; -var - sUnInstPath: String; - sUnInstallString: String; -begin - sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK (x64)_is1'); - sUnInstallString := ''; - if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then - RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); - Result := sUnInstallString; -end; - - -///////////////////////////////////////////////////////////////////// -function IsUpgrade(): Boolean; -begin - Result := (GetUninstallString() <> ''); -end; - - -///////////////////////////////////////////////////////////////////// -function UnInstallOldVersion(): Integer; -var - sUnInstallString: String; - iResultCode: Integer; -begin -// Return Values: -// 1 - uninstall string is empty -// 2 - error executing the UnInstallString -// 3 - successfully executed the UnInstallString - - // default return value - Result := 0; - - // get the uninstall string of the old app - sUnInstallString := GetUninstallString(); - if sUnInstallString <> '' then begin - sUnInstallString := RemoveQuotes(sUnInstallString); - if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then - Result := 3 - else - Result := 2; - end else - Result := 1; -end; - -///////////////////////////////////////////////////////////////////// -procedure CurStepChanged(CurStep: TSetupStep); -begin - if not (IsTaskSelected('portable')) then - begin - if (CurStep=ssInstall) then - begin - if (IsUpgrade()) then - begin - UnInstallOldVersion(); - end; - end; - end; -end; - -///////////////////////////////////////////////////////////////////// -// Importing LoadSkin API from ISSkin.DLL -procedure LoadSkin(lpszPath: String; lpszIniFileName: String); -external 'LoadSkin@files:isskinu.dll stdcall'; - -// Importing UnloadSkin API from ISSkin.DLL -procedure UnloadSkin(); -external 'UnloadSkin@files:isskinu.dll stdcall'; - -// Importing ShowWindow Windows API from User32.DLL -function ShowWindow(hWnd: Integer; uType: Integer): Integer; -external 'ShowWindow@user32.dll stdcall'; - -function InitializeSetup(): Boolean; -begin - ExtractTemporaryFile('watercolorlite-blue.cjstyles'); - LoadSkin(ExpandConstant('{tmp}\watercolorlite-blue.cjstyles'), ''); - Result := True; -end; - -procedure DeinitializeSetup(); -begin - // Hide Window before unloading skin so user does not get - // a glimpse of an unskinned window before it is closed. - ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0); - UnloadSkin(); -end; diff --git a/win32/xchat-wdk-x86.skel.iss b/win32/xchat-wdk-x86.skel.iss deleted file mode 100644 index 511a29f8..00000000 --- a/win32/xchat-wdk-x86.skel.iss +++ /dev/null @@ -1,282 +0,0 @@ -AppName=XChat-WDK (x86) -AppPublisher=XChat-WDK -AppPublisherURL=http://www.xchat-wdk.org/ -AppCopyright=Copyright (C) 1998-2010 Peter Zelezny -AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list -AppUpdatesURL=http://www.xchat-wdk.org/home/downloads -LicenseFile=COPYING -UninstallDisplayIcon={app}\xchat.exe -UninstallDisplayName=XChat-WDK (x86) -DefaultDirName={pf}\XChat-WDK -DefaultGroupName=XChat-WDK -DisableProgramGroupPage=yes -SolidCompression=yes -SourceDir=dist\Win32 -OutputDir=..\ -FlatComponentsList=no -PrivilegesRequired=none -ShowComponentSizes=no -CreateUninstallRegKey=not IsTaskSelected('portable') -Uninstallable=not IsTaskSelected('portable') -ArchitecturesAllowed=x86 x64 - -[Types] -Name: "normal"; Description: "Normal Installation" -Name: "full"; Description: "Full Installation" -Name: "minimal"; Description: "Minimal Installation" -Name: "custom"; Description: "Custom Installation"; Flags: iscustom - -[Components] -Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed -Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning -Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning -;obs Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning -;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\dns"; Description: "DNS"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\doat"; Description: "Do At"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\exec"; Description: "Exec"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning -;Name: "plugins\nonbmp"; Description: "Non-BMP"; Types: normal full custom; Flags: disablenouninstallwarning -Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning -Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\winsys"; Description: "WinSys"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\xsasl"; Description: "X-SASL"; Types: full custom; Flags: disablenouninstallwarning -Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning -Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning - -[Tasks] -Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked - -Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl -Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl -Name: perl516; Description: "5.16"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl - -[Registry] -Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable -Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable -Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable - -[Run] -Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent - -[Files] -; Add the ISSkin DLL used for skinning Inno Setup installations. -Source: ISSkinU.dll; DestDir: {app}; Flags: dontcopy - -; Add the Visual Style resource contains resources used for skinning, -; you can also use Microsoft Visual Styles (*.msstyles) resources. -Source: watercolorlite-green.cjstyles; DestDir: {tmp}; Flags: dontcopy - -Source: "portable-mode"; DestDir: "{app}"; Tasks: portable - -Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "COPYING"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.ZLIB"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.GTK"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.CAIRO"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.LUA"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "LICENSE.LIBXML"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs -;Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs and not gtkengines -Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs -Source: "locale\*"; DestDir: "{app}\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations -Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations -;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: spelling - -Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libcairo-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libexpat-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libffi-5.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "freetype6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libfontconfig-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "intl.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libjasper-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libjpeg-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libpixman-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libtiff-3.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libpng14-14.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libpng15-15.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -;obs Source: "libxml2-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs - -Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs - -Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs -Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs -Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Flags: ignoreversion; Components: libs - -;obs Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines -;obs Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: gtkengines -;obs Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: gtkengines -;obs Source: "gtk2-prefs.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: gtkengines - -Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum -Source: "plugins\xcdns.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\dns -Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\doat -Source: "plugins\xcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\exec -Source: "plugins\xcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim -Source: "etc\music.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winamp or plugins\mpcinfo -Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\mpcinfo -;Source: "plugins\xcnonbmp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\nonbmp -Source: "etc\download.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\upd -Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd -Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp -Source: "etc\system.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winsys -Source: "plugins\xcwinsys.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winsys -Source: "plugins\xcxsasl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xsasl -Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xtray -Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\wmpa - -Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\lua -Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python -Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\tcl - -Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl512 -Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl514 -Source: "plugins\xcperl-516.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl516 - -Source: "xchat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs -Source: "xchat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xctext - -[Icons] -Name: "{group}\XChat-WDK (x86)"; Filename: "{app}\xchat.exe"; Tasks: not portable -Name: "{group}\XChat-Text (x86)"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable -Name: "{group}\Uninstall XChat-WDK (x86)"; Filename: "{uninstallexe}"; Tasks: not portable - -[Messages] -BeveledLabel= XChat-WDK - -[Code] -///////////////////////////////////////////////////////////////////// -// these are required for x86->x64 or reverse upgrades -///////////////////////////////////////////////////////////////////// -function GetUninstallString(): String; -var - sUnInstPath: String; - sUnInstallString: String; -begin - sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK (x86)_is1'); - sUnInstallString := ''; - if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then - RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); - Result := sUnInstallString; -end; - - -///////////////////////////////////////////////////////////////////// -function IsUpgrade(): Boolean; -begin - Result := (GetUninstallString() <> ''); -end; - - -///////////////////////////////////////////////////////////////////// -function UnInstallOldVersion(): Integer; -var - sUnInstallString: String; - iResultCode: Integer; -begin -// Return Values: -// 1 - uninstall string is empty -// 2 - error executing the UnInstallString -// 3 - successfully executed the UnInstallString - - // default return value - Result := 0; - - // get the uninstall string of the old app - sUnInstallString := GetUninstallString(); - if sUnInstallString <> '' then begin - sUnInstallString := RemoveQuotes(sUnInstallString); - if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then - Result := 3 - else - Result := 2; - end else - Result := 1; -end; - -///////////////////////////////////////////////////////////////////// -procedure CurStepChanged(CurStep: TSetupStep); -begin - if not (IsTaskSelected('portable')) then - begin - if (CurStep=ssInstall) then - begin - if (IsUpgrade()) then - begin - UnInstallOldVersion(); - end; - end; - end; -end; - -///////////////////////////////////////////////////////////////////// -// Importing LoadSkin API from ISSkin.DLL -procedure LoadSkin(lpszPath: String; lpszIniFileName: String); -external 'LoadSkin@files:isskinu.dll stdcall'; - -// Importing UnloadSkin API from ISSkin.DLL -procedure UnloadSkin(); -external 'UnloadSkin@files:isskinu.dll stdcall'; - -// Importing ShowWindow Windows API from User32.DLL -function ShowWindow(hWnd: Integer; uType: Integer): Integer; -external 'ShowWindow@user32.dll stdcall'; - -function InitializeSetup(): Boolean; -begin - ExtractTemporaryFile('watercolorlite-green.cjstyles'); - LoadSkin(ExpandConstant('{tmp}\watercolorlite-green.cjstyles'), ''); - Result := True; -end; - -procedure DeinitializeSetup(); -begin - // Hide Window before unloading skin so user does not get - // a glimpse of an unskinned window before it is closed. - ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0); - UnloadSkin(); -end; diff --git a/win32/xchat.props b/win32/xchat.props index e0aa21c8..3038fb04 100644 --- a/win32/xchat.props +++ b/win32/xchat.props @@ -35,7 +35,7 @@ $(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0 bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" xchatpng "$(SolutionDir)\..\xchat.png" gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;intl.lib;libxml2.lib;libeay32.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib - $(SolutionDir)\dist\$(PlatformName) + $(SolutionDir)build\$(PlatformName)\rel diff --git a/win32/xchat.sln b/win32/xchat.sln index 050313eb..84e1190e 100644 --- a/win32/xchat.sln +++ b/win32/xchat.sln @@ -89,10 +89,32 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nls", "nls\nls.vcxproj", "{B10A2C41-344C-43E0-A32D-B9587C198D8B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy", "copy\copy.vcxproj", "{C9B735E4-75BC-45AC-A5E3-39A6D076F912}" + ProjectSection(ProjectDependencies) = postProject + {19C52A0A-A790-409E-A28A-9745FF990F5C} = {19C52A0A-A790-409E-A28A-9745FF990F5C} + {E7F4DB0A-510D-41EF-B284-6E1DE1CC450D} = {E7F4DB0A-510D-41EF-B284-6E1DE1CC450D} + {646B4316-C8B8-4DB6-B6AE-E586929E5729} = {646B4316-C8B8-4DB6-B6AE-E586929E5729} + {4980AF24-9D42-427D-A8E6-0DF3B97C455D} = {4980AF24-9D42-427D-A8E6-0DF3B97C455D} + {3024CF36-85E5-4E00-9608-7002E2C7EF14} = {3024CF36-85E5-4E00-9608-7002E2C7EF14} + {58654438-F674-42F7-88FA-73EF90AD80B1} = {58654438-F674-42F7-88FA-73EF90AD80B1} + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76} = {17E4BE39-76F7-4A06-AD21-EFD0C5091F76} + {B10A2C41-344C-43E0-A32D-B9587C198D8B} = {B10A2C41-344C-43E0-A32D-B9587C198D8B} + {461DC24A-A410-4171-8C02-CCDBF3702C2A} = {461DC24A-A410-4171-8C02-CCDBF3702C2A} + {E93E1255-95D1-4B08-8FDF-B53CC6A21280} = {E93E1255-95D1-4B08-8FDF-B53CC6A21280} + {2773666A-8CFC-4533-A043-EAD59F16A1C7} = {2773666A-8CFC-4533-A043-EAD59F16A1C7} + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} = {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} + {987E9374-98A1-44BA-946F-D3472D7A7055} = {987E9374-98A1-44BA-946F-D3472D7A7055} + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91} = {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91} + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA} = {6C0CA980-97C5-427A-BE61-5BCECAFABBDA} + {3786FA8C-3E76-45E3-984E-FCCFF44729C9} = {3786FA8C-3E76-45E3-984E-FCCFF44729C9} + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC} = {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC} + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} = {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} + {18871EBA-AC85-4652-8919-EB8064B9A714} = {18871EBA-AC85-4652-8919-EB8064B9A714} + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82} = {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82} + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E} = {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\installer.vcxproj", "{5A0F4962-E670-4DA2-9E45-52CC47F26E2F}" ProjectSection(ProjectDependencies) = postProject - {B10A2C41-344C-43E0-A32D-B9587C198D8B} = {B10A2C41-344C-43E0-A32D-B9587C198D8B} {C9B735E4-75BC-45AC-A5E3-39A6D076F912} = {C9B735E4-75BC-45AC-A5E3-39A6D076F912} EndProjectSection EndProject -- cgit 1.4.1 From ad59c4a586711f488b31f83072ebdc9ac595366e Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 15 Jun 2012 22:36:29 +0200 Subject: Add x64 support to the VS solution --- plugins/checksum/checksum.vcxproj | 43 ++++++++++++++++ plugins/dns/dns.vcxproj | 43 ++++++++++++++++ plugins/doat/doat.vcxproj | 41 ++++++++++++++++ plugins/exec/exec.vcxproj | 41 ++++++++++++++++ plugins/fishlim/fishlim.vcxproj | 43 ++++++++++++++++ plugins/lua/lua.vcxproj | 55 +++++++++++++++++++++ plugins/mpcinfo/mpcinfo.vcxproj | 41 ++++++++++++++++ plugins/perl/perl-512.vcxproj | 52 ++++++++++++++++++++ plugins/perl/perl-514.vcxproj | 52 ++++++++++++++++++++ plugins/perl/perl-516.vcxproj | 52 ++++++++++++++++++++ plugins/python/python.vcxproj | 43 ++++++++++++++++ plugins/tcl/tcl.vcxproj | 43 ++++++++++++++++ plugins/upd/upd.vcxproj | 43 ++++++++++++++++ plugins/winamp/winamp.vcxproj | 41 ++++++++++++++++ plugins/winsys/winsys.vcxproj | 44 +++++++++++++++++ plugins/wmpa/wmpa.vcxproj | 43 ++++++++++++++++ plugins/xsasl/xsasl.vcxproj | 43 ++++++++++++++++ plugins/xtray/xtray.vcxproj | 41 ++++++++++++++++ src/common/common.vcxproj | 38 ++++++++++++++ src/dirent/dirent.vcxproj | 38 ++++++++++++++ src/fe-gtk/fe-gtk.vcxproj | 43 ++++++++++++++++ src/fe-text/fe-text.vcxproj | 42 ++++++++++++++++ src/pixmaps/pixmaps.vcxproj | 40 +++++++++++++++ src/version/version.vcxproj | 41 ++++++++++++++++ win32/copy/copy.vcxproj | 101 ++++++++++++++++++++++++++++++++++++++ win32/installer/installer.vcxproj | 44 +++++++++++++++++ win32/nls/nls.vcxproj | 45 +++++++++++++++++ win32/xchat.sln | 55 +++++++++++++++++++++ 28 files changed, 1291 insertions(+) (limited to 'src') diff --git a/plugins/checksum/checksum.vcxproj b/plugins/checksum/checksum.vcxproj index c4090cd1..753ca10e 100644 --- a/plugins/checksum/checksum.vcxproj +++ b/plugins/checksum/checksum.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcchecksum + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +76,28 @@ $(DepLibs);%(AdditionalDependencies) + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions) + $(DepsRoot)\include;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + checksum.def + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + + diff --git a/plugins/dns/dns.vcxproj b/plugins/dns/dns.vcxproj index 38f1634b..64df391d 100644 --- a/plugins/dns/dns.vcxproj +++ b/plugins/dns/dns.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {3786FA8C-3E76-45E3-984E-FCCFF44729C9} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcdns + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +76,28 @@ dns.def + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions) + ..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + dns.def + + diff --git a/plugins/doat/doat.vcxproj b/plugins/doat/doat.vcxproj index c6901fe1..33969fc3 100644 --- a/plugins/doat/doat.vcxproj +++ b/plugins/doat/doat.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {4980AF24-9D42-427D-A8E6-0DF3B97C455D} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcdoat + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -53,6 +74,26 @@ doat.def + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions) + ..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + doat.def + + diff --git a/plugins/exec/exec.vcxproj b/plugins/exec/exec.vcxproj index 15bf5ec5..22e6200a 100644 --- a/plugins/exec/exec.vcxproj +++ b/plugins/exec/exec.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcexec + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -53,6 +74,26 @@ exec.def + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + exec.def + + diff --git a/plugins/fishlim/fishlim.vcxproj b/plugins/fishlim/fishlim.vcxproj index 0f6e1c38..6b5dcc07 100644 --- a/plugins/fishlim/fishlim.vcxproj +++ b/plugins/fishlim/fishlim.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcfishlim + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +76,28 @@ $(DepLibs);%(AdditionalDependencies) + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions) + true + $(DepsRoot)\include;$(Glib);..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + fishlim.def + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + + diff --git a/plugins/lua/lua.vcxproj b/plugins/lua/lua.vcxproj index 26d21856..cbb3c444 100644 --- a/plugins/lua/lua.vcxproj +++ b/plugins/lua/lua.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {646B4316-C8B8-4DB6-B6AE-E586929E5729} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(LuaOutput) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -53,11 +74,36 @@ "$(LuaLib).lib";;dirent-win32.lib;%(AdditionalDependencies) + + + Level1 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + $(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories) + "$(LuaLib).lib";;dirent-win32.lib;%(AdditionalDependencies) + + "$(LuaLib).lib";$(DepLibs);dirent-win32.lib;%(AdditionalDependencies) + + + "$(LuaLib).lib";$(DepLibs);dirent-win32.lib;%(AdditionalDependencies) + + WIN32;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);snprintf=g_snprintf;%(PreprocessorDefinitions) @@ -67,6 +113,15 @@ lua.def + + + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);snprintf=g_snprintf;%(PreprocessorDefinitions) + true + + + lua.def + + diff --git a/plugins/mpcinfo/mpcinfo.vcxproj b/plugins/mpcinfo/mpcinfo.vcxproj index 7f12822e..6746ce15 100644 --- a/plugins/mpcinfo/mpcinfo.vcxproj +++ b/plugins/mpcinfo/mpcinfo.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcmpcinfo + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -53,6 +74,26 @@ mpcinfo.def + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + mpcinfo.def + + diff --git a/plugins/perl/perl-512.vcxproj b/plugins/perl/perl-512.vcxproj index d924af48..313014b9 100644 --- a/plugins/perl/perl-512.vcxproj +++ b/plugins/perl/perl-512.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {987E9374-98A1-44BA-946F-D3472D7A7055} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(Perl512Output) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -61,6 +82,37 @@ move $(Perl512Lib).def "$(IntDir)" lib /nologo /machine:x86 "/def:$(IntDir)$(Perl512Lib).def" "/out:$(OutDir)\$(Perl512Lib).lib" "$(Perl512Path)\perl\bin\perl.exe" generate_header move irc.pm.h "$(IntDir)" +move xchat.pm.h "$(IntDir)" + + + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;PERL512_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + true + $(Perl512Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + $(OutDir);%(AdditionalLibraryDirectories) + $(Perl512Lib).lib;dirent-win32.lib;%(AdditionalDependencies) + perl.def + $(Perl512Lib).dll;%(DelayLoadDLLs) + + + "$(GendefPath)\gendef" "$(Perl512Path)\perl\bin\$(Perl512Lib).dll" +move $(Perl512Lib).def "$(IntDir)" +lib /nologo /machine:x64 "/def:$(IntDir)$(Perl512Lib).def" "/out:$(OutDir)\$(Perl512Lib).lib" +"$(Perl512Path)\perl\bin\perl.exe" generate_header +move irc.pm.h "$(IntDir)" move xchat.pm.h "$(IntDir)" diff --git a/plugins/perl/perl-514.vcxproj b/plugins/perl/perl-514.vcxproj index 58cc4f04..6e469944 100644 --- a/plugins/perl/perl-514.vcxproj +++ b/plugins/perl/perl-514.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(Perl514Output) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -61,6 +82,37 @@ move $(Perl514Lib).def "$(IntDir)" lib /nologo /machine:x86 "/def:$(IntDir)$(Perl514Lib).def" "/out:$(OutDir)\$(Perl514Lib).lib" "$(Perl514Path)\perl\bin\perl.exe" generate_header move irc.pm.h "$(IntDir)" +move xchat.pm.h "$(IntDir)" + + + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;PERL514_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(Perl514Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(OutDir);%(AdditionalLibraryDirectories) + $(Perl514Lib).lib;dirent-win32.lib;%(AdditionalDependencies) + perl.def + $(Perl514Lib).dll;%(DelayLoadDLLs) + + + "$(GendefPath)\gendef" "$(Perl514Path)\perl\bin\$(Perl514Lib).dll" +move $(Perl514Lib).def "$(IntDir)" +lib /nologo /machine:x64 "/def:$(IntDir)$(Perl514Lib).def" "/out:$(OutDir)\$(Perl514Lib).lib" +"$(Perl514Path)\perl\bin\perl.exe" generate_header +move irc.pm.h "$(IntDir)" move xchat.pm.h "$(IntDir)" diff --git a/plugins/perl/perl-516.vcxproj b/plugins/perl/perl-516.vcxproj index 516c1b80..06bf2fbd 100644 --- a/plugins/perl/perl-516.vcxproj +++ b/plugins/perl/perl-516.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {58654438-F674-42F7-88FA-73EF90AD80B1} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(Perl516Output) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -61,6 +82,37 @@ move $(Perl516Lib).def "$(IntDir)" lib /nologo /machine:x86 "/def:$(IntDir)$(Perl516Lib).def" "/out:$(OutDir)\$(Perl516Lib).lib" "$(Perl516Path)\perl\bin\perl.exe" generate_header move irc.pm.h "$(IntDir)" +move xchat.pm.h "$(IntDir)" + + + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;PERL516_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(Perl516Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(OutDir);%(AdditionalLibraryDirectories) + $(Perl516Lib).lib;dirent-win32.lib;%(AdditionalDependencies) + perl.def + $(Perl516Lib).dll;%(DelayLoadDLLs) + + + "$(GendefPath)\gendef" "$(Perl516Path)\perl\bin\$(Perl516Lib).dll" +move $(Perl516Lib).def "$(IntDir)" +lib /nologo /machine:x64 "/def:$(IntDir)$(Perl516Lib).def" "/out:$(OutDir)\$(Perl516Lib).lib" +"$(Perl516Path)\perl\bin\perl.exe" generate_header +move irc.pm.h "$(IntDir)" move xchat.pm.h "$(IntDir)" diff --git a/plugins/python/python.vcxproj b/plugins/python/python.vcxproj index 923eeb92..ef50ee42 100644 --- a/plugins/python/python.vcxproj +++ b/plugins/python/python.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {19C52A0A-A790-409E-A28A-9745FF990F5C} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(PythonOutput) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +76,28 @@ $(DepsRoot)\lib;$(OutDir);$(PythonPath)\libs;%(AdditionalLibraryDirectories) + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) + $(Glib);$(PythonPath)\include;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + python.def + "$(PythonLib).lib";$(DepLibs);dirent-win32.lib;%(AdditionalDependencies) + $(DepsRoot)\lib;$(OutDir);$(PythonPath)\libs;%(AdditionalLibraryDirectories) + + diff --git a/plugins/tcl/tcl.vcxproj b/plugins/tcl/tcl.vcxproj index baa188f6..8820742d 100644 --- a/plugins/tcl/tcl.vcxproj +++ b/plugins/tcl/tcl.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + @@ -29,6 +33,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -36,6 +47,10 @@ + + + + false @@ -43,6 +58,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(TclOutput) + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -65,6 +86,28 @@ $(TclLib).dll;%(DelayLoadDLLs) + + + Level1 + NotUsing + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;TCL_EXPORTS;TCL_DLL="$(TclLib).dll";$(OwnFlags);%(PreprocessorDefinitions) + $(TclPath)\include;..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(TclPath)\lib;%(AdditionalLibraryDirectories) + "$(TclLib).lib";%(AdditionalDependencies) + tcl.def + $(TclLib).dll;%(DelayLoadDLLs) + + diff --git a/plugins/upd/upd.vcxproj b/plugins/upd/upd.vcxproj index 9cf7c017..dc853ff8 100644 --- a/plugins/upd/upd.vcxproj +++ b/plugins/upd/upd.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {461DC24A-A410-4171-8C02-CCDBF3702C2A} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcupd + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +76,28 @@ $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + upd.def + $(DepLibs);%(AdditionalDependencies) + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + diff --git a/plugins/winamp/winamp.vcxproj b/plugins/winamp/winamp.vcxproj index 0a1eb419..2b5f3633 100644 --- a/plugins/winamp/winamp.vcxproj +++ b/plugins/winamp/winamp.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcwinamp + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -53,6 +74,26 @@ winamp.def + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + winamp.def + + diff --git a/plugins/winsys/winsys.vcxproj b/plugins/winsys/winsys.vcxproj index 656f6ee9..bacb5db4 100644 --- a/plugins/winsys/winsys.vcxproj +++ b/plugins/winsys/winsys.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA} @@ -19,6 +23,13 @@ Unicode WDK7 + + DynamicLibrary + false + true + Unicode + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcwinsys + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -56,6 +77,29 @@ comsupp.lib + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;WINSYS_EXPORTS;%(PreprocessorDefinitions) + ..;%(AdditionalIncludeDirectories) + true + false + + + Windows + true + true + true + winsys.def + wbemuuid.lib;vccomsup.lib;%(AdditionalDependencies) + comsupp.lib + + diff --git a/plugins/wmpa/wmpa.vcxproj b/plugins/wmpa/wmpa.vcxproj index 630cef4d..92364dc4 100644 --- a/plugins/wmpa/wmpa.vcxproj +++ b/plugins/wmpa/wmpa.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {E7F4DB0A-510D-41EF-B284-6E1DE1CC450D} @@ -20,6 +24,14 @@ WDK7 Dynamic + + DynamicLibrary + false + false + MultiByte + WDK7 + Dynamic + @@ -27,6 +39,10 @@ + + + + false @@ -34,6 +50,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcwmpa + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +77,27 @@ true + + + Level1 + Create + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;WMPA_EXPORTS;_AFXDLL;_AFX_NO_DAO_SUPPORT;%(PreprocessorDefinitions) + false + + + Windows + true + true + true + wmpa.def + + + true + + diff --git a/plugins/xsasl/xsasl.vcxproj b/plugins/xsasl/xsasl.vcxproj index 7e0c41d7..bec3da94 100644 --- a/plugins/xsasl/xsasl.vcxproj +++ b/plugins/xsasl/xsasl.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {18871EBA-AC85-4652-8919-EB8064B9A714} @@ -19,6 +23,13 @@ MultiByte WDK7 + + DynamicLibrary + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xcxsasl + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +76,28 @@ $(DepLibs);%(AdditionalDependencies) + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;XSASL_EXPORTS;%(PreprocessorDefinitions) + $(Glib);..;%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + xsasl.def + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) + + diff --git a/plugins/xtray/xtray.vcxproj b/plugins/xtray/xtray.vcxproj index 1f7aa5cf..aa455a8f 100644 --- a/plugins/xtray/xtray.vcxproj +++ b/plugins/xtray/xtray.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {3024CF36-85E5-4E00-9608-7002E2C7EF14} @@ -19,6 +23,13 @@ Unicode WDK7 + + DynamicLibrary + false + true + Unicode + WDK7 + @@ -26,12 +37,21 @@ + + + + false $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -53,6 +73,27 @@ ntstc_msvcrt.lib;%(AdditionalDependencies) + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;_STL70_;_STATIC_CPPLIB;%(PreprocessorDefinitions) + true + ..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + xtray.def + ntstc_msvcrt.lib;%(AdditionalDependencies) + + diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj index b57b2ccf..4e95c929 100644 --- a/src/common/common.vcxproj +++ b/src/common/common.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + @@ -82,6 +86,13 @@ MultiByte WDK7 + + StaticLibrary + false + true + MultiByte + WDK7 + @@ -89,11 +100,19 @@ + + + + $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -113,6 +132,25 @@ true + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + + diff --git a/src/dirent/dirent.vcxproj b/src/dirent/dirent.vcxproj index 8ac38f92..5ae75f57 100644 --- a/src/dirent/dirent.vcxproj +++ b/src/dirent/dirent.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + @@ -25,6 +29,13 @@ MultiByte WDK7 + + StaticLibrary + false + true + MultiByte + WDK7 + @@ -32,12 +43,21 @@ + + + + $(ProjectName)-win32 $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + $(ProjectName)-win32 + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -56,6 +76,24 @@ true + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + diff --git a/src/fe-gtk/fe-gtk.vcxproj b/src/fe-gtk/fe-gtk.vcxproj index fce8d3e6..cb102012 100644 --- a/src/fe-gtk/fe-gtk.vcxproj +++ b/src/fe-gtk/fe-gtk.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82} @@ -19,6 +23,13 @@ MultiByte WDK7 + + Application + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xchat + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -55,6 +76,28 @@ mainCRTStartup + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories) + true + + + Windows + true + true + true + $(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories) + $(DepLibs);common.lib;dirent-win32.lib;%(AdditionalDependencies) + mainCRTStartup + + diff --git a/src/fe-text/fe-text.vcxproj b/src/fe-text/fe-text.vcxproj index ac7068ec..e8ed04b0 100644 --- a/src/fe-text/fe-text.vcxproj +++ b/src/fe-text/fe-text.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {E93E1255-95D1-4B08-8FDF-B53CC6A21280} @@ -19,6 +23,13 @@ MultiByte WDK7 + + Application + false + true + MultiByte + WDK7 + @@ -26,6 +37,10 @@ + + + + false @@ -33,6 +48,12 @@ $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + xchat-text + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -54,6 +75,27 @@ $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_CONSOLE;$(OwnFlags);%(PreprocessorDefinitions) + $(DepsRoot)\include;$(Glib);%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + $(DepLibs);"$(OutDir)\common.lib";"$(OutDir)\dirent-win32.lib";%(AdditionalDependencies) + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + diff --git a/src/pixmaps/pixmaps.vcxproj b/src/pixmaps/pixmaps.vcxproj index 3fda0fef..ec33a49b 100644 --- a/src/pixmaps/pixmaps.vcxproj +++ b/src/pixmaps/pixmaps.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642} @@ -19,6 +23,13 @@ MultiByte WDK7 + + Application + false + true + MultiByte + WDK7 + @@ -26,12 +37,21 @@ + + + + false $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level3 @@ -52,6 +72,26 @@ "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + "$(DepsRoot)\bin\gdk-pixbuf-csource" --build-list $(Pixmaps) > "$(SolutionDir)\..\src\pixmaps\inline_pngs.h" + + diff --git a/src/version/version.vcxproj b/src/version/version.vcxproj index b07b8e2a..5a4fe5cc 100644 --- a/src/version/version.vcxproj +++ b/src/version/version.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {6CD3647E-4541-4849-9DD7-C8816665AE42} @@ -19,6 +23,13 @@ MultiByte WDK7 + + Application + false + true + MultiByte + WDK7 + @@ -26,12 +37,21 @@ + + + + false $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + false + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level1 @@ -53,6 +73,27 @@ "$(OutDir)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" + + + Level1 + + + MaxSpeed + true + true + WIN32;_WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + "$(OutDir)\$(TargetName)$(TargetExt)" -r > "$(SolutionDir)\..\resource.h" + + diff --git a/win32/copy/copy.vcxproj b/win32/copy/copy.vcxproj index 5b64ddc6..a68df4a0 100644 --- a/win32/copy/copy.vcxproj +++ b/win32/copy/copy.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {C9B735E4-75BC-45AC-A5E3-39A6D076F912} @@ -18,6 +22,13 @@ MultiByte WDK7 + + Application + false + true + MultiByte + WDK7 + @@ -25,11 +36,19 @@ + + + + $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level3 @@ -112,6 +131,88 @@ copy "$(ProgramFiles)\Codejock Software\ISSkin\ISSkinU.dll" "$(XChatDest)" copy "..\installer\watercolorlite-green.cjstyles" "$(XChatDest)" + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + rmdir /q /s "$(XChatDest)" +mkdir "$(XChatDest)" +echo 2> portable-mode +move portable-mode "$(XChatDest)" +copy "$(OutDir)\xchat.exe" "$(XChatDest)" +copy "$(OutDir)\xchat-text.exe" "$(XChatDest)" +copy "$(DepsRoot)\bin\libatk-1.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libcairo-2.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libexpat-1.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libfontconfig-1.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libfreetype-6.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libgdk_pixbuf-2.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libgdk-win32-2.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libgio-2.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libglib-2.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libgmodule-2.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libgobject-2.0-0.dll" "$(XChatDest) +copy "$(DepsRoot)\bin\libgthread-2.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libgtk-win32-2.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libintl-8.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libpango-1.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libpangocairo-1.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libpangoft2-1.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libpangowin32-1.0-0.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libpng14-14.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\libxml2.dll" "$(XChatDest)" +xcopy /q /s /i "$(DepsRoot)\lib\gtk-2.0\2.10.0\engines" "$(XChatDest)\lib\gtk-2.0\2.10.0\engines" +xcopy /q /s /i "$(DepsRoot)\lib\gtk-2.0\modules\libgail.dll" "$(XChatDest)\lib\gtk-2.0\modules\" +xcopy /q /s /i etc "$(XChatDest)\etc" +xcopy /q /s /i share "$(XChatDest)\share" +copy "..\..\COPYING" "$(XChatDest)" +copy "$(DepsRoot)\LICENSE.OPENSSL" "$(XChatDest)" +copy "$(DepsRoot)\LICENSE.ZLIB" "$(XChatDest)" +copy "$(DepsRoot)\share\gettext\intl\COPYING.LIB-2.0" "$(XChatDest)\LICENSE.GTK" +copy "$(DepsRoot)\share\gettext\intl\COPYING.LIB-2.1" "$(XChatDest)\LICENSE.CAIRO" +copy "$(DepsRoot)\LICENSE.LUA" "$(XChatDest)" +copy "$(DepsRoot)\LICENSE.ENCHANT" "$(XChatDest)" +copy "$(DepsRoot)\LICENSE.LIBXML" "$(XChatDest)" +copy "$(DepsRoot)\bin\libeay32.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\ssleay32.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\zlib1.dll" "$(XChatDest)" +copy "$(DepsRoot)\bin\cert.pem" "$(XChatDest)" +copy "$(DepsRoot)\bin\libenchant.dll" "$(XChatDest)" +xcopy /q /s /i "$(DepsRoot)\lib\enchant\libenchant_myspell.dll" "$(XChatDest)\lib\enchant\" +xcopy /q /s /i "$(OutDir)xcchecksum.dll" "$(XChatDest)\plugins\" +copy "$(OutDir)\xcdns.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcdoat.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcexec.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcfishlim.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xclua.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcmpcinfo.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcperl-512.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcperl-514.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcperl-516.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcpython.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xctcl.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcupd.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcxsasl.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xtray.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcwinamp.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcwinsys.dll" "$(XChatDest)\plugins" +copy "$(OutDir)\xcwmpa.dll" "$(XChatDest)\plugins" +copy "$(DepsRoot)\bin\lua51.dll" "$(XChatDest)" +xcopy /q /s /i "$(OutDir)\locale" "$(XChatDest)\locale" +xcopy /q /s /i "$(DepsRoot)\share\locale" "$(XChatDest)\share\locale" +copy "$(ProgramFiles)\Codejock Software\ISSkin\ISSkinU.dll" "$(XChatDest)" +copy "..\installer\watercolorlite-blue.cjstyles" "$(XChatDest)" + + diff --git a/win32/installer/installer.vcxproj b/win32/installer/installer.vcxproj index 3cb84d56..0fcba484 100644 --- a/win32/installer/installer.vcxproj +++ b/win32/installer/installer.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {5A0F4962-E670-4DA2-9E45-52CC47F26E2F} @@ -18,6 +22,13 @@ MultiByte WDK7 + + Application + false + true + MultiByte + WDK7 + @@ -25,11 +36,19 @@ + + + + $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level3 @@ -55,6 +74,31 @@ type xchat-wdk-x86.skel.iss >> "$(OutDir)\xchat-wdk-x86.iss" "$(ProgramFiles)\Inno Setup 5\compil32" /cc "$(OutDir)\xchat-wdk-x86.iss" + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + echo [Setup] > "$(OutDir)\xchat-wdk-x64.iss" +echo WizardImageFile="$(ProjectDir)\wizardimage.bmp" >> "$(OutDir)\xchat-wdk-x64.iss" +echo WizardSmallImageFile="$(ProjectDir)\wizardsmallimage.bmp" >> "$(OutDir)\xchat-wdk-x64.iss" +"$(OutDir)\version" -a >> "$(OutDir)\xchat-wdk-x64.iss" +"$(OutDir)\version" -v >> "$(OutDir)\xchat-wdk-x64.iss" +"$(OutDir)\version" -i >> "$(OutDir)\xchat-wdk-x64.iss" +"$(OutDir)\version" -o >> "$(OutDir)\xchat-wdk-x64.iss" +echo SetupIconFile="$(SolutionDir)\..\xchat.ico" >> "$(OutDir)\xchat-wdk-x64.iss" +type xchat-wdk-x64.skel.iss >> "$(OutDir)\xchat-wdk-x64.iss" +"$(ProgramFiles)\Inno Setup 5\compil32" /cc "$(OutDir)\xchat-wdk-x64.iss" + + diff --git a/win32/nls/nls.vcxproj b/win32/nls/nls.vcxproj index 10e53bd8..9c0ecff4 100644 --- a/win32/nls/nls.vcxproj +++ b/win32/nls/nls.vcxproj @@ -5,6 +5,10 @@ Release Win32 + + Release + x64 + {B10A2C41-344C-43E0-A32D-B9587C198D8B} @@ -18,6 +22,13 @@ MultiByte WDK7 + + Application + false + true + MultiByte + WDK7 + @@ -25,11 +36,19 @@ + + + + $(SolutionDir)build\$(PlatformName)\bin $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + + $(SolutionDir)build\$(PlatformName)\bin + $(SolutionDir)build\$(PlatformName)\obj\$(ProjectName) + Level3 @@ -53,6 +72,32 @@ mkdir "$(OutDir)\locale" for %%A in (*.po) do ( mkdir "$(OutDir)\locale\%%~nA\LC_MESSAGES" "$(DepsRoot)\bin\msgfmt" -co "$(OutDir)\locale\%%~nA\LC_MESSAGES\xchat.mo" %%A +) + + + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + + + + + cd ..\..\po +rmdir /q /s "$(OutDir)\locale" +mkdir "$(OutDir)\locale" +for %%A in (*.po) do ( +mkdir "$(OutDir)\locale\%%~nA\LC_MESSAGES" +"$(DepsRoot)\bin\msgfmt" -co "$(OutDir)\locale\%%~nA\LC_MESSAGES\xchat.mo" %%A ) diff --git a/win32/xchat.sln b/win32/xchat.sln index 84e1190e..ef7a3000 100644 --- a/win32/xchat.sln +++ b/win32/xchat.sln @@ -121,62 +121,117 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {87554B59-006C-4D94-9714-897B27067BA3}.Release|Win32.ActiveCfg = Release|Win32 {87554B59-006C-4D94-9714-897B27067BA3}.Release|Win32.Build.0 = Release|Win32 + {87554B59-006C-4D94-9714-897B27067BA3}.Release|x64.ActiveCfg = Release|x64 + {87554B59-006C-4D94-9714-897B27067BA3}.Release|x64.Build.0 = Release|x64 {98B56DF9-E4F1-4696-A565-5F7823CF214D}.Release|Win32.ActiveCfg = Release|Win32 {98B56DF9-E4F1-4696-A565-5F7823CF214D}.Release|Win32.Build.0 = Release|Win32 + {98B56DF9-E4F1-4696-A565-5F7823CF214D}.Release|x64.ActiveCfg = Release|x64 + {98B56DF9-E4F1-4696-A565-5F7823CF214D}.Release|x64.Build.0 = Release|x64 {626DA61C-FA8B-474C-B2F5-72AD9DFEE642}.Release|Win32.ActiveCfg = Release|Win32 {626DA61C-FA8B-474C-B2F5-72AD9DFEE642}.Release|Win32.Build.0 = Release|Win32 + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642}.Release|x64.ActiveCfg = Release|x64 + {626DA61C-FA8B-474C-B2F5-72AD9DFEE642}.Release|x64.Build.0 = Release|x64 {6CD3647E-4541-4849-9DD7-C8816665AE42}.Release|Win32.ActiveCfg = Release|Win32 {6CD3647E-4541-4849-9DD7-C8816665AE42}.Release|Win32.Build.0 = Release|Win32 + {6CD3647E-4541-4849-9DD7-C8816665AE42}.Release|x64.ActiveCfg = Release|x64 + {6CD3647E-4541-4849-9DD7-C8816665AE42}.Release|x64.Build.0 = Release|x64 {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}.Release|Win32.ActiveCfg = Release|Win32 {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}.Release|Win32.Build.0 = Release|Win32 + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}.Release|x64.ActiveCfg = Release|x64 + {E4BDB4C8-2335-415A-ACEE-BA88B19BFE82}.Release|x64.Build.0 = Release|x64 {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|Win32.ActiveCfg = Release|Win32 {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|Win32.Build.0 = Release|Win32 + {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|x64.ActiveCfg = Release|x64 + {E93E1255-95D1-4B08-8FDF-B53CC6A21280}.Release|x64.Build.0 = Release|x64 {2773666A-8CFC-4533-A043-EAD59F16A1C7}.Release|Win32.ActiveCfg = Release|Win32 {2773666A-8CFC-4533-A043-EAD59F16A1C7}.Release|Win32.Build.0 = Release|Win32 + {2773666A-8CFC-4533-A043-EAD59F16A1C7}.Release|x64.ActiveCfg = Release|x64 + {2773666A-8CFC-4533-A043-EAD59F16A1C7}.Release|x64.Build.0 = Release|x64 {987E9374-98A1-44BA-946F-D3472D7A7055}.Release|Win32.ActiveCfg = Release|Win32 {987E9374-98A1-44BA-946F-D3472D7A7055}.Release|Win32.Build.0 = Release|Win32 + {987E9374-98A1-44BA-946F-D3472D7A7055}.Release|x64.ActiveCfg = Release|x64 + {987E9374-98A1-44BA-946F-D3472D7A7055}.Release|x64.Build.0 = Release|x64 {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}.Release|Win32.ActiveCfg = Release|Win32 {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}.Release|Win32.Build.0 = Release|Win32 + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}.Release|x64.ActiveCfg = Release|x64 + {C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}.Release|x64.Build.0 = Release|x64 {58654438-F674-42F7-88FA-73EF90AD80B1}.Release|Win32.ActiveCfg = Release|Win32 {58654438-F674-42F7-88FA-73EF90AD80B1}.Release|Win32.Build.0 = Release|Win32 + {58654438-F674-42F7-88FA-73EF90AD80B1}.Release|x64.ActiveCfg = Release|x64 + {58654438-F674-42F7-88FA-73EF90AD80B1}.Release|x64.Build.0 = Release|x64 {19C52A0A-A790-409E-A28A-9745FF990F5C}.Release|Win32.ActiveCfg = Release|Win32 {19C52A0A-A790-409E-A28A-9745FF990F5C}.Release|Win32.Build.0 = Release|Win32 + {19C52A0A-A790-409E-A28A-9745FF990F5C}.Release|x64.ActiveCfg = Release|x64 + {19C52A0A-A790-409E-A28A-9745FF990F5C}.Release|x64.Build.0 = Release|x64 {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|Win32.ActiveCfg = Release|Win32 {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|Win32.Build.0 = Release|Win32 + {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|x64.ActiveCfg = Release|x64 + {646B4316-C8B8-4DB6-B6AE-E586929E5729}.Release|x64.Build.0 = Release|x64 {4980AF24-9D42-427D-A8E6-0DF3B97C455D}.Release|Win32.ActiveCfg = Release|Win32 {4980AF24-9D42-427D-A8E6-0DF3B97C455D}.Release|Win32.Build.0 = Release|Win32 + {4980AF24-9D42-427D-A8E6-0DF3B97C455D}.Release|x64.ActiveCfg = Release|x64 + {4980AF24-9D42-427D-A8E6-0DF3B97C455D}.Release|x64.Build.0 = Release|x64 {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}.Release|Win32.ActiveCfg = Release|Win32 {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}.Release|Win32.Build.0 = Release|Win32 + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}.Release|x64.ActiveCfg = Release|x64 + {5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}.Release|x64.Build.0 = Release|x64 {3786FA8C-3E76-45E3-984E-FCCFF44729C9}.Release|Win32.ActiveCfg = Release|Win32 {3786FA8C-3E76-45E3-984E-FCCFF44729C9}.Release|Win32.Build.0 = Release|Win32 + {3786FA8C-3E76-45E3-984E-FCCFF44729C9}.Release|x64.ActiveCfg = Release|x64 + {3786FA8C-3E76-45E3-984E-FCCFF44729C9}.Release|x64.Build.0 = Release|x64 {17E4BE39-76F7-4A06-AD21-EFD0C5091F76}.Release|Win32.ActiveCfg = Release|Win32 {17E4BE39-76F7-4A06-AD21-EFD0C5091F76}.Release|Win32.Build.0 = Release|Win32 + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76}.Release|x64.ActiveCfg = Release|x64 + {17E4BE39-76F7-4A06-AD21-EFD0C5091F76}.Release|x64.Build.0 = Release|x64 {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}.Release|Win32.ActiveCfg = Release|Win32 {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}.Release|Win32.Build.0 = Release|Win32 + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}.Release|x64.ActiveCfg = Release|x64 + {3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}.Release|x64.Build.0 = Release|x64 {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}.Release|Win32.ActiveCfg = Release|Win32 {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}.Release|Win32.Build.0 = Release|Win32 + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}.Release|x64.ActiveCfg = Release|x64 + {B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}.Release|x64.Build.0 = Release|x64 {461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|Win32.ActiveCfg = Release|Win32 {461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|Win32.Build.0 = Release|Win32 + {461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|x64.ActiveCfg = Release|x64 + {461DC24A-A410-4171-8C02-CCDBF3702C2A}.Release|x64.Build.0 = Release|x64 {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|Win32.ActiveCfg = Release|Win32 {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|Win32.Build.0 = Release|Win32 + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|x64.ActiveCfg = Release|x64 + {E78C0D9A-798E-4BF6-B0CC-6FECB8CA2FCE}.Release|x64.Build.0 = Release|x64 {6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|Win32.ActiveCfg = Release|Win32 {6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|Win32.Build.0 = Release|Win32 + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|x64.ActiveCfg = Release|x64 + {6C0CA980-97C5-427A-BE61-5BCECAFABBDA}.Release|x64.Build.0 = Release|x64 {18871EBA-AC85-4652-8919-EB8064B9A714}.Release|Win32.ActiveCfg = Release|Win32 {18871EBA-AC85-4652-8919-EB8064B9A714}.Release|Win32.Build.0 = Release|Win32 + {18871EBA-AC85-4652-8919-EB8064B9A714}.Release|x64.ActiveCfg = Release|x64 + {18871EBA-AC85-4652-8919-EB8064B9A714}.Release|x64.Build.0 = Release|x64 {3024CF36-85E5-4E00-9608-7002E2C7EF14}.Release|Win32.ActiveCfg = Release|Win32 {3024CF36-85E5-4E00-9608-7002E2C7EF14}.Release|Win32.Build.0 = Release|Win32 + {3024CF36-85E5-4E00-9608-7002E2C7EF14}.Release|x64.ActiveCfg = Release|x64 + {3024CF36-85E5-4E00-9608-7002E2C7EF14}.Release|x64.Build.0 = Release|x64 {E7F4DB0A-510D-41EF-B284-6E1DE1CC450D}.Release|Win32.ActiveCfg = Release|Win32 {E7F4DB0A-510D-41EF-B284-6E1DE1CC450D}.Release|Win32.Build.0 = Release|Win32 + {E7F4DB0A-510D-41EF-B284-6E1DE1CC450D}.Release|x64.ActiveCfg = Release|x64 + {E7F4DB0A-510D-41EF-B284-6E1DE1CC450D}.Release|x64.Build.0 = Release|x64 {B10A2C41-344C-43E0-A32D-B9587C198D8B}.Release|Win32.ActiveCfg = Release|Win32 {B10A2C41-344C-43E0-A32D-B9587C198D8B}.Release|Win32.Build.0 = Release|Win32 + {B10A2C41-344C-43E0-A32D-B9587C198D8B}.Release|x64.ActiveCfg = Release|x64 + {B10A2C41-344C-43E0-A32D-B9587C198D8B}.Release|x64.Build.0 = Release|x64 {C9B735E4-75BC-45AC-A5E3-39A6D076F912}.Release|Win32.ActiveCfg = Release|Win32 {C9B735E4-75BC-45AC-A5E3-39A6D076F912}.Release|Win32.Build.0 = Release|Win32 + {C9B735E4-75BC-45AC-A5E3-39A6D076F912}.Release|x64.ActiveCfg = Release|x64 + {C9B735E4-75BC-45AC-A5E3-39A6D076F912}.Release|x64.Build.0 = Release|x64 {5A0F4962-E670-4DA2-9E45-52CC47F26E2F}.Release|Win32.ActiveCfg = Release|Win32 {5A0F4962-E670-4DA2-9E45-52CC47F26E2F}.Release|Win32.Build.0 = Release|Win32 + {5A0F4962-E670-4DA2-9E45-52CC47F26E2F}.Release|x64.ActiveCfg = Release|x64 + {5A0F4962-E670-4DA2-9E45-52CC47F26E2F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE -- cgit 1.4.1 From c1ed097b46d2679929edc5d35f848c30a6286992 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 15 Jun 2012 22:48:18 +0200 Subject: Add .user files and .gitignore --- .gitignore | 5 +++++ plugins/checksum/checksum.vcxproj.user | 3 +++ plugins/dns/dns.vcxproj.user | 3 +++ plugins/doat/doat.vcxproj.user | 3 +++ plugins/exec/exec.vcxproj.user | 3 +++ plugins/fishlim/fishlim.vcxproj.user | 3 +++ plugins/lua/lua.vcxproj.user | 3 +++ plugins/mpcinfo/mpcinfo.vcxproj.user | 3 +++ plugins/perl/perl-512.vcxproj.user | 3 +++ plugins/perl/perl-514.vcxproj.user | 3 +++ plugins/perl/perl-516.vcxproj.user | 3 +++ plugins/python/python.vcxproj.user | 3 +++ plugins/tcl/tcl.vcxproj.user | 3 +++ plugins/upd/upd.vcxproj.user | 3 +++ plugins/winamp/winamp.vcxproj.user | 3 +++ plugins/winsys/winsys.vcxproj.user | 3 +++ plugins/wmpa/wmpa.vcxproj.user | 3 +++ plugins/xsasl/xsasl.vcxproj.user | 3 +++ plugins/xtray/xtray.vcxproj.user | 3 +++ src/common/common.vcxproj.user | 3 +++ src/dirent/dirent.vcxproj.user | 3 +++ src/fe-gtk/fe-gtk.vcxproj.user | 3 +++ src/fe-text/fe-text.vcxproj.user | 3 +++ src/pixmaps/pixmaps.vcxproj.user | 3 +++ src/version/version.vcxproj.user | 3 +++ win32/copy/copy.vcxproj.user | 3 +++ win32/installer/installer.vcxproj.user | 3 +++ win32/nls/nls.vcxproj.user | 3 +++ 28 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 plugins/checksum/checksum.vcxproj.user create mode 100644 plugins/dns/dns.vcxproj.user create mode 100644 plugins/doat/doat.vcxproj.user create mode 100644 plugins/exec/exec.vcxproj.user create mode 100644 plugins/fishlim/fishlim.vcxproj.user create mode 100644 plugins/lua/lua.vcxproj.user create mode 100644 plugins/mpcinfo/mpcinfo.vcxproj.user create mode 100644 plugins/perl/perl-512.vcxproj.user create mode 100644 plugins/perl/perl-514.vcxproj.user create mode 100644 plugins/perl/perl-516.vcxproj.user create mode 100644 plugins/python/python.vcxproj.user create mode 100644 plugins/tcl/tcl.vcxproj.user create mode 100644 plugins/upd/upd.vcxproj.user create mode 100644 plugins/winamp/winamp.vcxproj.user create mode 100644 plugins/winsys/winsys.vcxproj.user create mode 100644 plugins/wmpa/wmpa.vcxproj.user create mode 100644 plugins/xsasl/xsasl.vcxproj.user create mode 100644 plugins/xtray/xtray.vcxproj.user create mode 100644 src/common/common.vcxproj.user create mode 100644 src/dirent/dirent.vcxproj.user create mode 100644 src/fe-gtk/fe-gtk.vcxproj.user create mode 100644 src/fe-text/fe-text.vcxproj.user create mode 100644 src/pixmaps/pixmaps.vcxproj.user create mode 100644 src/version/version.vcxproj.user create mode 100644 win32/copy/copy.vcxproj.user create mode 100644 win32/installer/installer.vcxproj.user create mode 100644 win32/nls/nls.vcxproj.user (limited to 'src') diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..83f00b41 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# git ignore file +win32/xchat.opensdf +win32/xchat.sdf +win32/xchat.suo +src/pixmaps/inline_pngs.h diff --git a/plugins/checksum/checksum.vcxproj.user b/plugins/checksum/checksum.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/checksum/checksum.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/dns/dns.vcxproj.user b/plugins/dns/dns.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/dns/dns.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/doat/doat.vcxproj.user b/plugins/doat/doat.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/doat/doat.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/exec/exec.vcxproj.user b/plugins/exec/exec.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/exec/exec.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/fishlim/fishlim.vcxproj.user b/plugins/fishlim/fishlim.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/fishlim/fishlim.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/lua/lua.vcxproj.user b/plugins/lua/lua.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/lua/lua.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/mpcinfo/mpcinfo.vcxproj.user b/plugins/mpcinfo/mpcinfo.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/mpcinfo/mpcinfo.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/perl/perl-512.vcxproj.user b/plugins/perl/perl-512.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/perl/perl-512.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/perl/perl-514.vcxproj.user b/plugins/perl/perl-514.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/perl/perl-514.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/perl/perl-516.vcxproj.user b/plugins/perl/perl-516.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/perl/perl-516.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/python/python.vcxproj.user b/plugins/python/python.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/python/python.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/tcl/tcl.vcxproj.user b/plugins/tcl/tcl.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/tcl/tcl.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/upd/upd.vcxproj.user b/plugins/upd/upd.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/upd/upd.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/winamp/winamp.vcxproj.user b/plugins/winamp/winamp.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/winamp/winamp.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/winsys/winsys.vcxproj.user b/plugins/winsys/winsys.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/winsys/winsys.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/wmpa/wmpa.vcxproj.user b/plugins/wmpa/wmpa.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/wmpa/wmpa.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/xsasl/xsasl.vcxproj.user b/plugins/xsasl/xsasl.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/xsasl/xsasl.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/xtray/xtray.vcxproj.user b/plugins/xtray/xtray.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/plugins/xtray/xtray.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/common/common.vcxproj.user b/src/common/common.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/src/common/common.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/dirent/dirent.vcxproj.user b/src/dirent/dirent.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/src/dirent/dirent.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/fe-gtk/fe-gtk.vcxproj.user b/src/fe-gtk/fe-gtk.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/src/fe-gtk/fe-gtk.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/fe-text/fe-text.vcxproj.user b/src/fe-text/fe-text.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/src/fe-text/fe-text.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/pixmaps/pixmaps.vcxproj.user b/src/pixmaps/pixmaps.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/src/pixmaps/pixmaps.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/version/version.vcxproj.user b/src/version/version.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/src/version/version.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/win32/copy/copy.vcxproj.user b/win32/copy/copy.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/win32/copy/copy.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/win32/installer/installer.vcxproj.user b/win32/installer/installer.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/win32/installer/installer.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/win32/nls/nls.vcxproj.user b/win32/nls/nls.vcxproj.user new file mode 100644 index 00000000..695b5c78 --- /dev/null +++ b/win32/nls/nls.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file -- cgit 1.4.1 From 35821f3875e4a718932f7f67debdeacaa8c6cc3d Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 16 Jun 2012 13:01:47 +0200 Subject: Fix string handling for Turkish locale --- src/common/cfgfiles.c | 24 ++++++------ src/common/chanopt.c | 8 ++-- src/common/ctcp.c | 10 ++--- src/common/dcc.c | 14 +++---- src/common/inbound.c | 2 +- src/common/modes.c | 10 ++--- src/common/outbound.c | 88 +++++++++++++++++++++---------------------- src/common/plugin-timer.c | 10 ++--- src/common/plugin.c | 16 ++++---- src/common/proto-irc.c | 10 ++--- src/common/server.c | 18 ++++----- src/common/servlist.c | 10 ++--- src/common/url.c | 8 ++-- src/common/util.c | 4 +- src/common/xchat.h | 4 +- src/fe-gtk/fkeys.c | 6 +-- src/fe-gtk/maingui.c | 4 +- src/fe-gtk/menu.c | 10 ++--- src/fe-gtk/notifygui.c | 2 +- src/fe-gtk/plugingui.c | 6 +-- src/fe-gtk/sexy-spell-entry.c | 4 +- src/fe-gtk/xtext.c | 2 +- 22 files changed, 135 insertions(+), 135 deletions(-) (limited to 'src') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 081137b8..111234e9 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -84,11 +84,11 @@ list_load_from_data (GSList ** list, char *ibuf, int size) { if (*buf != '#') { - if (!strncasecmp (buf, "NAME ", 5)) + if (!g_ascii_strncasecmp (buf, "NAME ", 5)) { safe_strcpy (name, buf + 5, sizeof (name)); } - else if (!strncasecmp (buf, "CMD ", 4)) + else if (!g_ascii_strncasecmp (buf, "CMD ", 4)) { safe_strcpy (cmd, buf + 4, sizeof (cmd)); if (*name) @@ -154,7 +154,7 @@ list_delentry (GSList ** list, char *name) while (alist) { pop = (struct popup *) alist->data; - if (!strcasecmp (name, pop->name)) + if (!g_ascii_strcasecmp (name, pop->name)) { *list = g_slist_remove (*list, pop); free (pop); @@ -174,7 +174,7 @@ cfg_get_str (char *cfg, char *var, char *dest, int dest_len) while (1) { - if (!strncasecmp (buffer, cfg, strlen (var) + 1)) + if (!g_ascii_strncasecmp (buffer, cfg, strlen (var) + 1)) { char *value, t; cfg += strlen (var); @@ -1000,7 +1000,7 @@ cfg_get_bool (char *var) do { - if (!strcasecmp (var, vars[i].name)) + if (!g_ascii_strcasecmp (var, vars[i].name)) { return *((int *) &prefs + vars[i].offset); } @@ -1023,27 +1023,27 @@ cmd_set (struct session *sess, char *tbuf, char *word[], char *word_eol[]) int idx = 2; char *var, *val; - if (strcasecmp (word[2], "-e") == 0) + if (g_ascii_strcasecmp (word[2], "-e") == 0) { idx++; erase = TRUE; } /* turn a bit OFF */ - if (strcasecmp (word[idx], "-off") == 0) + if (g_ascii_strcasecmp (word[idx], "-off") == 0) { idx++; off = TRUE; } /* turn a bit ON */ - if (strcasecmp (word[idx], "-or") == 0 || strcasecmp (word[idx], "-on") == 0) + if (g_ascii_strcasecmp (word[idx], "-or") == 0 || g_ascii_strcasecmp (word[idx], "-on") == 0) { idx++; or = TRUE; } - if (strcasecmp (word[idx], "-quiet") == 0) + if (g_ascii_strcasecmp (word[idx], "-quiet") == 0) { idx++; quiet = TRUE; @@ -1069,7 +1069,7 @@ cmd_set (struct session *sess, char *tbuf, char *word[], char *word_eol[]) if (wild) found = !match (var, vars[i].name); else - found = strcasecmp (var, vars[i].name); + found = g_ascii_strcasecmp (var, vars[i].name); if (found == 0) { @@ -1098,9 +1098,9 @@ cmd_set (struct session *sess, char *tbuf, char *word[], char *word_eol[]) *((int *) &prefs + vars[i].offset) = 1; else *((int *) &prefs + vars[i].offset) = 0; - if (!strcasecmp (val, "YES") || !strcasecmp (val, "ON")) + if (!g_ascii_strcasecmp (val, "YES") || !g_ascii_strcasecmp (val, "ON")) *((int *) &prefs + vars[i].offset) = 1; - if (!strcasecmp (val, "NO") || !strcasecmp (val, "OFF")) + if (!g_ascii_strcasecmp (val, "NO") || !g_ascii_strcasecmp (val, "OFF")) *((int *) &prefs + vars[i].offset) = 0; } else { diff --git a/src/common/chanopt.c b/src/common/chanopt.c index f8e16e8b..198ebe6c 100644 --- a/src/common/chanopt.c +++ b/src/common/chanopt.c @@ -84,9 +84,9 @@ chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[]) if (word[offset][0]) { - if (!strcasecmp (word[offset], "ON")) + if (!g_ascii_strcasecmp (word[offset], "ON")) newval = 1; - else if (!strcasecmp (word[offset], "OFF")) + else if (!g_ascii_strcasecmp (word[offset], "OFF")) newval = 0; else if (word[offset][0] == 'u') newval = SET_DEFAULT; @@ -186,8 +186,8 @@ chanopt_find (char *network, char *channel, gboolean add_new) for (list = chanopt_list; list; list = list->next) { co = list->data; - if (!strcasecmp (co->channel, channel) && - !strcasecmp (co->network, network)) + if (!g_ascii_strcasecmp (co->channel, channel) && + !g_ascii_strcasecmp (co->network, network)) return co; } diff --git a/src/common/ctcp.c b/src/common/ctcp.c index 2bb75746..36952db7 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -73,7 +73,7 @@ ctcp_check (session *sess, char *nick, char *word[], char *word_eol[], while (list) { pop = (struct popup *) list->data; - if (!strcasecmp (ctcp, pop->name)) + if (!g_ascii_strcasecmp (ctcp, pop->name)) { ctcp_reply (sess, nick, word, word_eol, pop->cmd); ret = 1; @@ -97,7 +97,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, ctcp_offset = 3; /* consider DCC to be different from other CTCPs */ - if (!strncasecmp (msg, "DCC", 3)) + if (!g_ascii_strncasecmp (msg, "DCC", 3)) { /* but still let CTCP replies override it */ if (!ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset)) @@ -110,7 +110,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, /* consider ACTION to be different from other CTCPs. Check ignore as if it was a PRIV/CHAN. */ - if (!strncasecmp (msg, "ACTION ", 7)) + if (!g_ascii_strncasecmp (msg, "ACTION ", 7)) { if (is_channel (serv, to)) { @@ -135,7 +135,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (ignore_check (word[1], IG_CTCP)) return; - if (!strcasecmp (msg, "VERSION") && !prefs.hidever) + if (!g_ascii_strcasecmp (msg, "VERSION") && !prefs.hidever) { #ifdef WIN32 snprintf (outbuf, sizeof (outbuf), "VERSION XChat-WDK "PACKAGE_VERSION" [x%d] / %s", @@ -149,7 +149,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (!ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset)) { - if (!strncasecmp (msg, "SOUND", 5)) + if (!g_ascii_strncasecmp (msg, "SOUND", 5)) { po = strchr (word[5], '\001'); if (po) diff --git a/src/common/dcc.c b/src/common/dcc.c index d91b7e8e..4c8724d9 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -572,7 +572,7 @@ dcc_chat_line (struct DCC *dcc, char *line) url_check_line (line, len); - if (line[0] == 1 && !strncasecmp (line + 1, "ACTION", 6)) + if (line[0] == 1 && !g_ascii_strncasecmp (line + 1, "ACTION", 6)) { po = strchr (line + 8, '\001'); if (po) @@ -1940,9 +1940,9 @@ find_dcc (char *nick, char *file, int type) { if (!file[0]) return dcc; - if (!strcasecmp (file, file_part (dcc->file))) + if (!g_ascii_strcasecmp (file, file_part (dcc->file))) return dcc; - if (!strcasecmp (file, dcc->file)) + if (!g_ascii_strcasecmp (file, dcc->file)) return dcc; } } @@ -2406,7 +2406,7 @@ handle_dcc (struct session *sess, char *nick, char *word[], DCC_SIZE size; int psend = 0; - if (!strcasecmp (type, "CHAT")) + if (!g_ascii_strcasecmp (type, "CHAT")) { port = atoi (word[8]); addr = strtoul (word[7], NULL, 10); @@ -2453,7 +2453,7 @@ handle_dcc (struct session *sess, char *nick, char *word[], return; } - if (!strcasecmp (type, "Resume")) + if (!g_ascii_strcasecmp (type, "Resume")) { port = atoi (word[7]); @@ -2497,7 +2497,7 @@ handle_dcc (struct session *sess, char *nick, char *word[], } return; } - if (!strcasecmp (type, "Accept")) + if (!g_ascii_strcasecmp (type, "Accept")) { port = atoi (word[7]); dcc = find_dcc_from_port (port, TYPE_RECV); @@ -2507,7 +2507,7 @@ handle_dcc (struct session *sess, char *nick, char *word[], } return; } - if (!strcasecmp (type, "SEND")) + if (!g_ascii_strcasecmp (type, "SEND")) { char *file = file_part (word[6]); diff --git a/src/common/inbound.c b/src/common/inbound.c index 1c124db4..89899655 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -886,7 +886,7 @@ inbound_notice (server *serv, char *to, char *nick, char *msg, char *ip, int id) if (msg[0] == '[' && (!serv->have_idmsg || id)) { /* guess where chanserv meant to post this -sigh- */ - if (!strcasecmp (nick, "ChanServ") && !find_dialog (serv, nick)) + if (!g_ascii_strcasecmp (nick, "ChanServ") && !find_dialog (serv, nick)) { char *dest = strdup (msg + 1); char *end = strchr (dest, ']'); diff --git a/src/common/modes.c b/src/common/modes.c index 1acf7f54..6eb63f3b 100644 --- a/src/common/modes.c +++ b/src/common/modes.c @@ -789,20 +789,20 @@ inbound_005 (server * serv, char *word[]) } /* use /NICKSERV */ - if (strcasecmp (word[w] + 8, "RusNet") == 0) + if (g_ascii_strcasecmp (word[w] + 8, "RusNet") == 0) serv->nickservtype = 1; - else if (strcasecmp (word[w] + 8, "UniBG") == 0) + else if (g_ascii_strcasecmp (word[w] + 8, "UniBG") == 0) serv->nickservtype = 3; - else if (strcasecmp (word[w] + 8, "QuakeNet") == 0) + else if (g_ascii_strcasecmp (word[w] + 8, "QuakeNet") == 0) serv->nickservtype = 4; } else if (strncmp (word[w], "CASEMAPPING=", 12) == 0) { if (strcmp (word[w] + 12, "ascii") == 0) /* bahamut */ - serv->p_cmp = (void *)strcasecmp; + serv->p_cmp = (void *)g_ascii_strcasecmp; } else if (strncmp (word[w], "CHARSET=", 8) == 0) { - if (strcasecmp (word[w] + 8, "UTF-8") == 0) + if (g_ascii_strcasecmp (word[w] + 8, "UTF-8") == 0) { server_set_encoding (serv, "UTF-8"); } diff --git a/src/common/outbound.c b/src/common/outbound.c index b13a33a1..872ef50b 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -617,13 +617,13 @@ cmd_clear (struct session *sess, char *tbuf, char *word[], char *word_eol[]) GSList *list = sess_list; char *reason = word_eol[2]; - if (strcasecmp (reason, "HISTORY") == 0) + if (g_ascii_strcasecmp (reason, "HISTORY") == 0) { history_free (&sess->history); return TRUE; } - if (strncasecmp (reason, "all", 3) == 0) + if (g_ascii_strncasecmp (reason, "all", 3) == 0) { while (list) { @@ -750,26 +750,26 @@ cmd_dcc (struct session *sess, char *tbuf, char *word[], char *word_eol[]) char *type = word[2]; if (*type) { - if (!strcasecmp (type, "HELP")) + if (!g_ascii_strcasecmp (type, "HELP")) return FALSE; - if (!strcasecmp (type, "CLOSE")) + if (!g_ascii_strcasecmp (type, "CLOSE")) { if (*word[3] && *word[4]) { goodtype = 0; - if (!strcasecmp (word[3], "SEND")) + if (!g_ascii_strcasecmp (word[3], "SEND")) { dcc = find_dcc (word[4], word[5], TYPE_SEND); dcc_abort (sess, dcc); goodtype = TRUE; } - if (!strcasecmp (word[3], "GET")) + if (!g_ascii_strcasecmp (word[3], "GET")) { dcc = find_dcc (word[4], word[5], TYPE_RECV); dcc_abort (sess, dcc); goodtype = TRUE; } - if (!strcasecmp (word[3], "CHAT")) + if (!g_ascii_strcasecmp (word[3], "CHAT")) { dcc = find_dcc (word[4], "", TYPE_CHATRECV); if (!dcc) @@ -789,20 +789,20 @@ cmd_dcc (struct session *sess, char *tbuf, char *word[], char *word_eol[]) } return FALSE; } - if ((!strcasecmp (type, "CHAT")) || (!strcasecmp (type, "PCHAT"))) + if ((!g_ascii_strcasecmp (type, "CHAT")) || (!g_ascii_strcasecmp (type, "PCHAT"))) { char *nick = word[3]; - int passive = (!strcasecmp(type, "PCHAT")) ? 1 : 0; + int passive = (!g_ascii_strcasecmp(type, "PCHAT")) ? 1 : 0; if (*nick) dcc_chat (sess, nick, passive); return TRUE; } - if (!strcasecmp (type, "LIST")) + if (!g_ascii_strcasecmp (type, "LIST")) { dcc_show_list (sess); return TRUE; } - if (!strcasecmp (type, "GET")) + if (!g_ascii_strcasecmp (type, "GET")) { char *nick = word[3]; char *file = word[4]; @@ -820,18 +820,18 @@ cmd_dcc (struct session *sess, char *tbuf, char *word[], char *word_eol[]) } return TRUE; } - if ((!strcasecmp (type, "SEND")) || (!strcasecmp (type, "PSEND"))) + if ((!g_ascii_strcasecmp (type, "SEND")) || (!g_ascii_strcasecmp (type, "PSEND"))) { int i = 3, maxcps; char *nick, *file; - int passive = (!strcasecmp(type, "PSEND")) ? 1 : 0; + int passive = (!g_ascii_strcasecmp(type, "PSEND")) ? 1 : 0; nick = word[i]; if (!*nick) return FALSE; maxcps = prefs.dcc_max_send_cps; - if (!strncasecmp(nick, "-maxcps=", 8)) + if (!g_ascii_strncasecmp(nick, "-maxcps=", 8)) { maxcps = atoi(nick + 8); i++; @@ -1312,7 +1312,7 @@ cmd_menu (struct session *sess, char *tbuf, char *word[], char *word_eol[]) *p = '/'; } - if (!strcasecmp (word[idx], "ADD")) + if (!g_ascii_strcasecmp (word[idx], "ADD")) { if (toggle) { @@ -1327,7 +1327,7 @@ cmd_menu (struct session *sess, char *tbuf, char *word[], char *word_eol[]) return TRUE; } - if (!strcasecmp (word[idx], "DEL")) + if (!g_ascii_strcasecmp (word[idx], "DEL")) { menu_del (tbuf, label); return TRUE; @@ -2045,7 +2045,7 @@ cmd_gui (struct session *sess, char *tbuf, char *word[], char *word_eol[]) case 0xc0851aaa: fe_message (word[3], FE_MSG_INFO|FE_MSG_MARKUP); break; /* MSGBOX */ case 0x0035dafd: fe_ctrl_gui (sess, 1, 0); break; /* SHOW */ case 0x0033155f: /* MENU */ - if (!strcasecmp (word[3], "TOGGLE")) + if (!g_ascii_strcasecmp (word[3], "TOGGLE")) fe_ctrl_gui (sess, 6, 0); else return FALSE; @@ -2247,25 +2247,25 @@ cmd_ignore (struct session *sess, char *tbuf, char *word[], char *word_eol[]) } return TRUE; } - if (!strcasecmp (word[i], "UNIGNORE")) + if (!g_ascii_strcasecmp (word[i], "UNIGNORE")) type |= IG_UNIG; - else if (!strcasecmp (word[i], "ALL")) + else if (!g_ascii_strcasecmp (word[i], "ALL")) type |= IG_PRIV | IG_NOTI | IG_CHAN | IG_CTCP | IG_INVI | IG_DCC; - else if (!strcasecmp (word[i], "PRIV")) + else if (!g_ascii_strcasecmp (word[i], "PRIV")) type |= IG_PRIV; - else if (!strcasecmp (word[i], "NOTI")) + else if (!g_ascii_strcasecmp (word[i], "NOTI")) type |= IG_NOTI; - else if (!strcasecmp (word[i], "CHAN")) + else if (!g_ascii_strcasecmp (word[i], "CHAN")) type |= IG_CHAN; - else if (!strcasecmp (word[i], "CTCP")) + else if (!g_ascii_strcasecmp (word[i], "CTCP")) type |= IG_CTCP; - else if (!strcasecmp (word[i], "INVI")) + else if (!g_ascii_strcasecmp (word[i], "INVI")) type |= IG_INVI; - else if (!strcasecmp (word[i], "QUIET")) + else if (!g_ascii_strcasecmp (word[i], "QUIET")) quiet = 1; - else if (!strcasecmp (word[i], "NOSAVE")) + else if (!g_ascii_strcasecmp (word[i], "NOSAVE")) type |= IG_NOSAVE; - else if (!strcasecmp (word[i], "DCC")) + else if (!g_ascii_strcasecmp (word[i], "DCC")) type |= IG_DCC; else { @@ -2456,12 +2456,12 @@ cmd_load (struct session *sess, char *tbuf, char *word[], char *word_eol[]) #ifdef USE_PLUGIN len = strlen (word[2]); #ifdef WIN32 - if (len > 4 && strcasecmp (".dll", word[2] + len - 4) == 0) + if (len > 4 && g_ascii_strcasecmp (".dll", word[2] + len - 4) == 0) #else #if defined(__hpux) - if (len > 3 && strcasecmp (".sl", word[2] + len - 3) == 0) + if (len > 3 && g_ascii_strcasecmp (".sl", word[2] + len - 3) == 0) #else - if (len > 3 && strcasecmp (".so", word[2] + len - 3) == 0) + if (len > 3 && g_ascii_strcasecmp (".so", word[2] + len - 3) == 0) #endif #endif { @@ -2613,8 +2613,8 @@ cmd_msg (struct session *sess, char *tbuf, char *word[], char *word_eol[]) else { /* mask out passwords */ - if (strcasecmp (nick, "nickserv") == 0 && - strncasecmp (msg, "identify ", 9) == 0) + if (g_ascii_strcasecmp (nick, "nickserv") == 0 && + g_ascii_strncasecmp (msg, "identify ", 9) == 0) msg = "identify ****"; EMIT_SIGNAL (XP_TE_MSGSEND, sess, nick, msg, NULL, NULL, 0); } @@ -2825,7 +2825,7 @@ cmd_reconnect (struct session *sess, char *tbuf, char *word[], char *word_eol[]) prefs.recon_delay = 0; - if (!strcasecmp (word[2], "ALL")) + if (!g_ascii_strcasecmp (word[2], "ALL")) { list = serv_list; while (list) @@ -2997,7 +2997,7 @@ parse_irc_url (char *url, char *server_name[], char *port[], char *channel[], in { char *co; #ifdef USE_OPENSSL - if (strncasecmp ("ircs://", url, 7) == 0) + if (g_ascii_strncasecmp ("ircs://", url, 7) == 0) { *use_ssl = TRUE; *server_name = url + 7; @@ -3005,7 +3005,7 @@ parse_irc_url (char *url, char *server_name[], char *port[], char *channel[], in } #endif - if (strncasecmp ("irc://", url, 6) == 0) + if (g_ascii_strncasecmp ("irc://", url, 6) == 0) { *server_name = url + 6; #ifdef USE_OPENSSL @@ -3076,7 +3076,7 @@ cmd_server (struct session *sess, char *tbuf, char *word[], char *word_eol[]) sess->server->network = NULL; /* dont clear it for /servchan */ - if (strncasecmp (word_eol[1], "SERVCHAN ", 9)) + if (g_ascii_strncasecmp (word_eol[1], "SERVCHAN ", 9)) sess->willjoinchannel[0] = 0; if (channel) @@ -3206,7 +3206,7 @@ cmd_unignore (struct session *sess, char *tbuf, char *word[], { if (ignore_del (mask, NULL)) { - if (strcasecmp (arg, "QUIET")) + if (g_ascii_strcasecmp (arg, "QUIET")) EMIT_SIGNAL (XP_TE_IGNOREREMOVE, sess, mask, NULL, NULL, NULL, 0); } return TRUE; @@ -3222,12 +3222,12 @@ cmd_unload (struct session *sess, char *tbuf, char *word[], char *word_eol[]) len = strlen (word[2]); #ifdef WIN32 - if (len > 4 && strcasecmp (word[2] + len - 4, ".dll") == 0) + if (len > 4 && g_ascii_strcasecmp (word[2] + len - 4, ".dll") == 0) #else #if defined(__hpux) - if (len > 3 && strcasecmp (word[2] + len - 3, ".sl") == 0) + if (len > 3 && g_ascii_strcasecmp (word[2] + len - 3, ".sl") == 0) #else - if (len > 3 && strcasecmp (word[2] + len - 3, ".so") == 0) + if (len > 3 && g_ascii_strcasecmp (word[2] + len - 3, ".so") == 0) #endif #endif by_file = TRUE; @@ -3257,7 +3257,7 @@ find_server_from_hostname (char *hostname) while (list) { serv = list->data; - if (!strcasecmp (hostname, serv->hostname) && serv->connected) + if (!g_ascii_strcasecmp (hostname, serv->hostname) && serv->connected) return serv; list = list->next; } @@ -3310,7 +3310,7 @@ cmd_url (struct session *sess, char *tbuf, char *word[], char *word_eol[]) /* maybe we're already connected to this net */ /* check for "FreeNode" */ - net = servlist_net_find (server_name, NULL, strcasecmp); + net = servlist_net_find (server_name, NULL, g_ascii_strcasecmp); /* check for "irc.eu.freenode.net" */ if (!net) net = servlist_net_find_from_server (server_name); @@ -3705,7 +3705,7 @@ const struct commands xc_cmds[] = { static int command_compare (const void *a, const void *b) { - return strcasecmp (a, ((struct commands *)b)->name); + return g_ascii_strcasecmp (a, ((struct commands *)b)->name); } static struct commands * @@ -4277,7 +4277,7 @@ handle_command (session *sess, char *cmd, int check_spch) while (list) { pop = (struct popup *) list->data; - if (!strcasecmp (pop->name, word[1])) + if (!g_ascii_strcasecmp (pop->name, word[1])) { user_command (sess, tbuf, pop->cmd, word, word_eol); user_cmd = TRUE; diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c index f09074a8..431ce8ab 100644 --- a/src/common/plugin-timer.c +++ b/src/common/plugin-timer.c @@ -4,7 +4,7 @@ #include "xchat-plugin.h" #ifdef WIN32 -#define strcasecmp stricmp +#define g_ascii_strcasecmp stricmp #endif static xchat_plugin *ph; /* plugin handle */ @@ -151,25 +151,25 @@ timer_cb (char *word[], char *word_eol[], void *userdata) return XCHAT_EAT_XCHAT; } - if (strcasecmp (word[2], "-quiet") == 0) + if (g_ascii_strcasecmp (word[2], "-quiet") == 0) { quiet = TRUE; offset++; } - if (strcasecmp (word[2 + offset], "-delete") == 0) + if (g_ascii_strcasecmp (word[2 + offset], "-delete") == 0) { timer_del_ref (atoi (word[3 + offset]), quiet); return XCHAT_EAT_XCHAT; } - if (strcasecmp (word[2 + offset], "-refnum") == 0) + if (g_ascii_strcasecmp (word[2 + offset], "-refnum") == 0) { ref = atoi (word[3 + offset]); offset += 2; } - if (strcasecmp (word[2 + offset], "-repeat") == 0) + if (g_ascii_strcasecmp (word[2 + offset], "-repeat") == 0) { repeat = atoi (word[3 + offset]); offset += 2; diff --git a/src/common/plugin.c b/src/common/plugin.c index 2e81c1f1..0a265d16 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -309,9 +309,9 @@ plugin_kill (char *name, int by_filename) { pl = list->data; /* static-plugins (plugin-timer.c) have a NULL filename */ - if ((by_filename && pl->filename && strcasecmp (name, pl->filename) == 0) || - (by_filename && pl->filename && strcasecmp (name, file_part (pl->filename)) == 0) || - (!by_filename && strcasecmp (name, pl->name) == 0)) + if ((by_filename && pl->filename && g_ascii_strcasecmp (name, pl->filename) == 0) || + (by_filename && pl->filename && g_ascii_strcasecmp (name, file_part (pl->filename)) == 0) || + (!by_filename && g_ascii_strcasecmp (name, pl->name) == 0)) { /* statically linked plugins have a NULL filename */ if (pl->filename != NULL && !pl->fake) @@ -472,12 +472,12 @@ plugin_hook_find (GSList *list, int type, char *name) hook = list->data; if (hook->type == type) { - if (strcasecmp (hook->name, name) == 0) + if (g_ascii_strcasecmp (hook->name, name) == 0) return list; if (type == HOOK_SERVER) { - if (strcasecmp (hook->name, "RAW LINE") == 0) + if (g_ascii_strcasecmp (hook->name, "RAW LINE") == 0) return list; } } @@ -947,8 +947,8 @@ xchat_find_context (xchat_plugin *ph, const char *servname, const char *channel) if (servname == NULL || rfc_casecmp (servname, serv->servername) == 0 || - strcasecmp (servname, serv->hostname) == 0 || - strcasecmp (servname, netname) == 0) + g_ascii_strcasecmp (servname, serv->hostname) == 0 || + g_ascii_strcasecmp (servname, netname) == 0) { if (channel == NULL) return serv->front_session; @@ -1121,7 +1121,7 @@ xchat_get_prefs (xchat_plugin *ph, const char *name, const char **string, int *i do { - if (!strcasecmp (name, vars[i].name)) + if (!g_ascii_strcasecmp (name, vars[i].name)) { switch (vars[i].type) { diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index a5ebc366..d8a6be7c 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -475,12 +475,12 @@ process_numeric (session * sess, int n, } /* use /NICKSERV */ - if (strcasecmp (word[7], "DALnet") == 0 || - strcasecmp (word[7], "BRASnet") == 0) + if (g_ascii_strcasecmp (word[7], "DALnet") == 0 || + g_ascii_strcasecmp (word[7], "BRASnet") == 0) serv->nickservtype = 1; /* use /NS */ - else if (strcasecmp (word[7], "FreeNode") == 0) + else if (g_ascii_strcasecmp (word[7], "FreeNode") == 0) serv->nickservtype = 2; goto def; @@ -1075,9 +1075,9 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[]) { text[len - 1] = 0; text++; - if (strncasecmp (text, "ACTION", 6) != 0) + if (g_ascii_strncasecmp (text, "ACTION", 6) != 0) flood_check (nick, ip, serv, sess, 0); - if (strncasecmp (text, "DCC ", 4) == 0) + if (g_ascii_strncasecmp (text, "DCC ", 4) == 0) /* redo this with handle_quotes TRUE */ process_data_init (word[1], word_eol[1], word, word_eol, TRUE, FALSE); ctcp_handle (sess, to, nick, ip, text, word, word_eol, id); diff --git a/src/common/server.c b/src/common/server.c index 919d9119..c8cc59e0 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -238,17 +238,17 @@ tcp_send_len (server *serv, char *buf, int len) dbuf[len + 1] = 0; /* privmsg and notice get a lower priority */ - if (strncasecmp (dbuf + 1, "PRIVMSG", 7) == 0 || - strncasecmp (dbuf + 1, "NOTICE", 6) == 0) + if (g_ascii_strncasecmp (dbuf + 1, "PRIVMSG", 7) == 0 || + g_ascii_strncasecmp (dbuf + 1, "NOTICE", 6) == 0) { dbuf[0] = 1; } else { /* WHO/MODE get the lowest priority */ - if (strncasecmp (dbuf + 1, "WHO ", 4) == 0 || + if (g_ascii_strncasecmp (dbuf + 1, "WHO ", 4) == 0 || /* but only MODE queries, not changes */ - (strncasecmp (dbuf + 1, "MODE", 4) == 0 && + (g_ascii_strncasecmp (dbuf + 1, "MODE", 4) == 0 && strchr (dbuf, '-') == NULL && strchr (dbuf, '+') == NULL)) dbuf[0] = 0; @@ -319,8 +319,8 @@ server_inline (server *serv, char *line, int len) if (serv->using_irc || /* 1. using CP1252/UTF-8 Hybrid */ (serv->encoding == NULL && prefs.utf8_locale) || /* OR 2. using system default->UTF-8 */ (serv->encoding != NULL && /* OR 3. explicitly set to UTF-8 */ - (strcasecmp (serv->encoding, "UTF8") == 0 || - strcasecmp (serv->encoding, "UTF-8") == 0))) + (g_ascii_strcasecmp (serv->encoding, "UTF8") == 0 || + g_ascii_strcasecmp (serv->encoding, "UTF-8") == 0))) { /* The user has the UTF-8 charset set, either via /charset command or from his UTF-8 locale. Thus, we first try the @@ -1824,10 +1824,10 @@ server_set_encoding (server *serv, char *new_encoding) space[0] = 0; /* server_inline() uses these flags */ - if (!strcasecmp (serv->encoding, "CP1255") || - !strcasecmp (serv->encoding, "WINDOWS-1255")) + if (!g_ascii_strcasecmp (serv->encoding, "CP1255") || + !g_ascii_strcasecmp (serv->encoding, "WINDOWS-1255")) serv->using_cp1255 = TRUE; - else if (!strcasecmp (serv->encoding, "IRC")) + else if (!g_ascii_strcasecmp (serv->encoding, "IRC")) serv->using_irc = TRUE; } } diff --git a/src/common/servlist.c b/src/common/servlist.c index c9d4b6a8..aa32aa4d 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -588,7 +588,7 @@ servlist_connect_by_netname (session *sess, char *network, gboolean join) { net = list->data; - if (strcasecmp (net->name, network) == 0) + if (g_ascii_strcasecmp (net->name, network) == 0) { servlist_connect (sess, net, join); return 1; @@ -733,7 +733,7 @@ servlist_net_find_from_server (char *server_name) while (slist) { serv = slist->data; - if (strcasecmp (serv->hostname, server_name) == 0) + if (g_ascii_strcasecmp (serv->hostname, server_name) == 0) return net; slist = slist->next; } @@ -1018,7 +1018,7 @@ servlist_check_encoding (char *charset) if (c) c[0] = 0; - if (!strcasecmp (charset, "IRC")) /* special case */ + if (!g_ascii_strcasecmp (charset, "IRC")) /* special case */ { if (c) c[0] = ' '; @@ -1093,8 +1093,8 @@ servlist_save (void) fprintf (fp, "J=%s\n", net->autojoin); if (net->nickserv) fprintf (fp, "B=%s\n", net->nickserv); - if (net->encoding && strcasecmp (net->encoding, "System") && - strcasecmp (net->encoding, "System default")) + if (net->encoding && g_ascii_strcasecmp (net->encoding, "System") && + g_ascii_strcasecmp (net->encoding, "System default")) { fprintf (fp, "E=%s\n", net->encoding); if (!servlist_check_encoding (net->encoding)) diff --git a/src/common/url.c b/src/common/url.c index b83732d1..9fa2d75c 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -82,7 +82,7 @@ url_find (char *urltext) { int pos; - if (tree_find (url_tree, urltext, (tree_cmp_func *)strcasecmp, NULL, &pos)) + if (tree_find (url_tree, urltext, (tree_cmp_func *)g_ascii_strcasecmp, NULL, &pos)) return 1; return 0; } @@ -117,7 +117,7 @@ url_add (char *urltext, int len) } if (!url_tree) - url_tree = tree_new ((tree_cmp_func *)strcasecmp, NULL); + url_tree = tree_new ((tree_cmp_func *)g_ascii_strcasecmp, NULL); size = tree_size (url_tree); /* 0 is unlimited */ @@ -186,7 +186,7 @@ url_check_word (char *word, int len) { int j; - /* This is pretty much strncasecmp(). */ + /* This is pretty much g_ascii_strncasecmp(). */ for (j = 0; j < l; j++) { unsigned char c = word[j]; @@ -238,7 +238,7 @@ url_check_word (char *word, int len) const unsigned char *p = &word[len - l]; int j; - /* This is pretty much strncasecmp(). */ + /* This is pretty much g_ascii_strncasecmp(). */ for (j = 0; j < l; j++) { if (tolower(p[j]) != suffix[i].s[j]) diff --git a/src/common/util.c b/src/common/util.c index 73e1b29a..fb4cd23e 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -283,7 +283,7 @@ nocasestrstr (const char *s, const char *wanted) if (len == 0) return (char *)s; - while (rfc_tolower(*s) != rfc_tolower(*wanted) || strncasecmp (s, wanted, len)) + while (rfc_tolower(*s) != rfc_tolower(*wanted) || g_ascii_strncasecmp (s, wanted, len)) if (*s++ == '\0') return (char *)NULL; return (char *)s; @@ -945,7 +945,7 @@ typedef struct static int country_compare (const void *a, const void *b) { - return strcasecmp (a, ((domain_t *)b)->code); + return g_ascii_strcasecmp (a, ((domain_t *)b)->code); } static const domain_t domain[] = diff --git a/src/common/xchat.h b/src/common/xchat.h index 540a7e1a..85c20186 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -41,8 +41,8 @@ void *xchat_realloc (char *old, int len, char *file, int line); #ifdef __EMX__ /* for o/s 2 */ #define OFLAGS O_BINARY -#define strcasecmp stricmp -#define strncasecmp strnicmp +#define g_ascii_strcasecmp stricmp +#define g_ascii_strncasecmp strnicmp #define PATH_MAX MAXPATHLEN #define FILEPATH_LEN_MAX MAXPATHLEN #endif diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index b9690731..4fbbebf6 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -1260,11 +1260,11 @@ key_action_scroll_page (GtkWidget * wid, GdkEventKey * evt, char *d1, if (d1) { - if (!strcasecmp (d1, "up")) + if (!g_ascii_strcasecmp (d1, "up")) type = PAGE_UP; - else if (!strcasecmp (d1, "+1")) + else if (!g_ascii_strcasecmp (d1, "+1")) type = LINE_DOWN; - else if (!strcasecmp (d1, "-1")) + else if (!g_ascii_strcasecmp (d1, "-1")) type = LINE_UP; } diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 0b7f7c43..1ff59354 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -1688,7 +1688,7 @@ mg_dnd_drop_file (session *sess, char *target, char *uri) while (*p) { next = strchr (p, '\r'); - if (strncasecmp ("file:", p, 5) == 0) + if (g_ascii_strncasecmp ("file:", p, 5) == 0) { if (next) *next = 0; @@ -2911,7 +2911,7 @@ mg_tabs_compare (session *a, session *b) if (a->type != SESS_CHANNEL && b->type == SESS_CHANNEL) return 1; - return strcasecmp (a->channel, b->channel); + return g_ascii_strcasecmp (a->channel, b->channel); } static void diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 4760ba93..2a683604 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -484,18 +484,18 @@ menu_create (GtkWidget *menu, GSList *list, char *target, int check_path) { pop = (struct popup *) list->data; - if (!strncasecmp (pop->name, "SUB", 3)) + if (!g_ascii_strncasecmp (pop->name, "SUB", 3)) { childcount = 0; tempmenu = menu_quick_sub (pop->cmd, tempmenu, &subitem, XCMENU_DOLIST|XCMENU_MNEMONIC, -1); - } else if (!strncasecmp (pop->name, "TOGGLE", 6)) + } else if (!g_ascii_strncasecmp (pop->name, "TOGGLE", 6)) { childcount++; menu_toggle_item (pop->name + 7, tempmenu, toggle_cb, pop->cmd, cfg_get_bool (pop->cmd)); - } else if (!strncasecmp (pop->name, "ENDSUB", 6)) + } else if (!g_ascii_strncasecmp (pop->name, "ENDSUB", 6)) { /* empty sub menu due to no programs in PATH? */ if (check_path && childcount < 1) @@ -506,7 +506,7 @@ menu_create (GtkWidget *menu, GSList *list, char *target, int check_path) tempmenu = menu_quick_endsub (); /* If we get here and tempmenu equals menu that means we havent got any submenus to exit from */ - } else if (!strncasecmp (pop->name, "SEP", 3)) + } else if (!g_ascii_strncasecmp (pop->name, "SEP", 3)) { menu_quick_item (0, 0, tempmenu, XCMENU_SHADED, 0, 0); @@ -2190,7 +2190,7 @@ menu_create_main (void *accel_group, int bar, int away, int toplevel, g_object_get (settings, "gtk-key-theme-name", &key_theme, NULL); if (key_theme) { - if (!strcasecmp (key_theme, "Emacs")) + if (!g_ascii_strcasecmp (key_theme, "Emacs")) { close_mask = GDK_SHIFT_MASK | GDK_CONTROL_MASK; mymenu[SEARCH_OFFSET].key = 0; diff --git a/src/fe-gtk/notifygui.c b/src/fe-gtk/notifygui.c index 5acb683a..135a548d 100644 --- a/src/fe-gtk/notifygui.c +++ b/src/fe-gtk/notifygui.c @@ -321,7 +321,7 @@ notifygui_add_cb (GtkDialog *dialog, gint response, gpointer entry) if (text[0] && response == GTK_RESPONSE_ACCEPT) { networks = GTK_ENTRY (g_object_get_data (G_OBJECT (entry), "net"))->text; - if (strcasecmp (networks, "ALL") == 0 || networks[0] == 0) + if (g_ascii_strcasecmp (networks, "ALL") == 0 || networks[0] == 0) notify_adduser (text, NULL); else notify_adduser (text, networks); diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c index 71d2f02e..7d2dc85d 100644 --- a/src/fe-gtk/plugingui.c +++ b/src/fe-gtk/plugingui.c @@ -176,12 +176,12 @@ plugingui_unload (GtkWidget * wid, gpointer unused) len = strlen (file); #ifdef WIN32 - if (len > 4 && strcasecmp (file + len - 4, ".dll") == 0) + if (len > 4 && g_ascii_strcasecmp (file + len - 4, ".dll") == 0) #else #if defined(__hpux) - if (len > 3 && strcasecmp (file + len - 3, ".sl") == 0) + if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".sl") == 0) #else - if (len > 3 && strcasecmp (file + len - 3, ".so") == 0) + if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".so") == 0) #endif #endif { diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index 9483f04b..d6f4ad63 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -976,7 +976,7 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry) enchant_langs = sexy_spell_entry_get_languages(entry); /*for (i = 0; langs[i]; i++) { - if ((g_strncasecmp(langs[i], "C", 1) != 0) && + if ((g_ascii_strncasecmp(langs[i], "C", 1) != 0) && (strlen(langs[i]) >= 2) && enchant_has_lang(langs[i], enchant_langs)) { if ((lastprefix == NULL) || (g_str_has_prefix(langs[i], lastprefix) == FALSE)) @@ -1013,7 +1013,7 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry) lang = (gchar *) g_getenv("LANG"); if (lang != NULL) { - if (g_strncasecmp(lang, "C", 1) == 0) + if (g_ascii_strncasecmp(lang, "C", 1) == 0) lang = NULL; else if (lang[0] == '\0') lang = NULL; diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 6e314f68..547affee 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -198,7 +198,7 @@ nocasestrstr (const char *s, const char *tofind) if (len == 0) return (char *)s; - while (toupper(*s) != toupper(*tofind) || strncasecmp (s, tofind, len)) + while (toupper(*s) != toupper(*tofind) || g_ascii_strncasecmp (s, tofind, len)) if (*s++ == '\0') return (char *)NULL; return (char *)s; -- cgit 1.4.1 From 6bca080d93e73132a7d41977687bffc476cff697 Mon Sep 17 00:00:00 2001 From: Patrick Griffs Date: Sun, 17 Jun 2012 05:45:08 +0200 Subject: Add XChat Theme Manager (TingPing) --- .gitignore | 1 + src/xtm/Main.Designer.cs | 302 +++++++++++++++++++++++++++++++ src/xtm/Main.cs | 269 +++++++++++++++++++++++++++ src/xtm/Main.resx | 287 +++++++++++++++++++++++++++++ src/xtm/Program.cs | 21 +++ src/xtm/Properties/AssemblyInfo.cs | 38 ++++ src/xtm/Properties/Resources.Designer.cs | 63 +++++++ src/xtm/Properties/Resources.resources | Bin 0 -> 180 bytes src/xtm/Properties/Resources.resx | 120 ++++++++++++ src/xtm/Properties/Settings.Designer.cs | 26 +++ src/xtm/Properties/Settings.settings | 7 + src/xtm/README.md | 7 + src/xtm/Resources/xchat.ico | Bin 0 -> 9662 bytes src/xtm/app.config | 3 + src/xtm/xtm.csproj | 163 +++++++++++++++++ win32/copy/copy.vcxproj | 2 + win32/installer/xchat-wdk-x64.skel.iss | 3 + win32/installer/xchat-wdk-x86.skel.iss | 3 + win32/xchat.sln | 7 + 19 files changed, 1322 insertions(+) create mode 100644 src/xtm/Main.Designer.cs create mode 100644 src/xtm/Main.cs create mode 100644 src/xtm/Main.resx create mode 100644 src/xtm/Program.cs create mode 100644 src/xtm/Properties/AssemblyInfo.cs create mode 100644 src/xtm/Properties/Resources.Designer.cs create mode 100644 src/xtm/Properties/Resources.resources create mode 100644 src/xtm/Properties/Resources.resx create mode 100644 src/xtm/Properties/Settings.Designer.cs create mode 100644 src/xtm/Properties/Settings.settings create mode 100644 src/xtm/README.md create mode 100644 src/xtm/Resources/xchat.ico create mode 100644 src/xtm/app.config create mode 100644 src/xtm/xtm.csproj (limited to 'src') diff --git a/.gitignore b/.gitignore index 86b4fbc2..f1e9c0a1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ plugins/wmpa/wmpa_h.h plugins/wmpa/wmpa_i.c src/pixmaps/inline_pngs.h +src/xtm/obj/* win32/build/* win32/ipch/* win32/xchat.opensdf diff --git a/src/xtm/Main.Designer.cs b/src/xtm/Main.Designer.cs new file mode 100644 index 00000000..16d4ebcc --- /dev/null +++ b/src/xtm/Main.Designer.cs @@ -0,0 +1,302 @@ +namespace thememan +{ + partial class XTM + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XTM)); + this.themelist = new System.Windows.Forms.ListBox(); + this.themecolor0 = new System.Windows.Forms.Label(); + this.themecolor1 = new System.Windows.Forms.Label(); + this.themecolor2 = new System.Windows.Forms.Label(); + this.themecolor3 = new System.Windows.Forms.Label(); + this.themecolor4 = new System.Windows.Forms.Label(); + this.themecolor5 = new System.Windows.Forms.Label(); + this.themecolor6 = new System.Windows.Forms.Label(); + this.themecolor7 = new System.Windows.Forms.Label(); + this.themecolor8 = new System.Windows.Forms.Label(); + this.themecolor9 = new System.Windows.Forms.Label(); + this.themecolora = new System.Windows.Forms.Label(); + this.themecolorb = new System.Windows.Forms.Label(); + this.themecolorc = new System.Windows.Forms.Label(); + this.themecolord = new System.Windows.Forms.Label(); + this.themecolore = new System.Windows.Forms.Label(); + this.themecolorf = new System.Windows.Forms.Label(); + this.themecolorfg = new System.Windows.Forms.Label(); + this.themecolortextbg = new System.Windows.Forms.Label(); + this.importbutton = new System.Windows.Forms.Button(); + this.applybutton = new System.Windows.Forms.Button(); + this.themecolorfgmarked = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // themelist + // + this.themelist.FormattingEnabled = true; + this.themelist.Location = new System.Drawing.Point(12, 12); + this.themelist.Name = "themelist"; + this.themelist.Size = new System.Drawing.Size(154, 199); + this.themelist.TabIndex = 0; + this.themelist.SelectedIndexChanged += new System.EventHandler(this.theme_selected); + // + // themecolor0 + // + this.themecolor0.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor0.Location = new System.Drawing.Point(189, 36); + this.themecolor0.Name = "themecolor0"; + this.themecolor0.Size = new System.Drawing.Size(40, 40); + this.themecolor0.TabIndex = 6; + // + // themecolor1 + // + this.themecolor1.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor1.Location = new System.Drawing.Point(239, 36); + this.themecolor1.Name = "themecolor1"; + this.themecolor1.Size = new System.Drawing.Size(40, 40); + this.themecolor1.TabIndex = 10; + // + // themecolor2 + // + this.themecolor2.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor2.Location = new System.Drawing.Point(289, 36); + this.themecolor2.Name = "themecolor2"; + this.themecolor2.Size = new System.Drawing.Size(40, 40); + this.themecolor2.TabIndex = 14; + // + // themecolor3 + // + this.themecolor3.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor3.Location = new System.Drawing.Point(339, 36); + this.themecolor3.Name = "themecolor3"; + this.themecolor3.Size = new System.Drawing.Size(40, 40); + this.themecolor3.TabIndex = 18; + // + // themecolor4 + // + this.themecolor4.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor4.Location = new System.Drawing.Point(189, 87); + this.themecolor4.Name = "themecolor4"; + this.themecolor4.Size = new System.Drawing.Size(40, 40); + this.themecolor4.TabIndex = 4; + // + // themecolor5 + // + this.themecolor5.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor5.Location = new System.Drawing.Point(239, 87); + this.themecolor5.Name = "themecolor5"; + this.themecolor5.Size = new System.Drawing.Size(40, 40); + this.themecolor5.TabIndex = 8; + // + // themecolor6 + // + this.themecolor6.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor6.Location = new System.Drawing.Point(289, 87); + this.themecolor6.Name = "themecolor6"; + this.themecolor6.Size = new System.Drawing.Size(40, 40); + this.themecolor6.TabIndex = 12; + // + // themecolor7 + // + this.themecolor7.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor7.Location = new System.Drawing.Point(339, 87); + this.themecolor7.Name = "themecolor7"; + this.themecolor7.Size = new System.Drawing.Size(40, 40); + this.themecolor7.TabIndex = 16; + // + // themecolor8 + // + this.themecolor8.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor8.Location = new System.Drawing.Point(189, 138); + this.themecolor8.Name = "themecolor8"; + this.themecolor8.Size = new System.Drawing.Size(40, 40); + this.themecolor8.TabIndex = 5; + // + // themecolor9 + // + this.themecolor9.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor9.Location = new System.Drawing.Point(239, 138); + this.themecolor9.Name = "themecolor9"; + this.themecolor9.Size = new System.Drawing.Size(40, 40); + this.themecolor9.TabIndex = 9; + // + // themecolora + // + this.themecolora.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolora.Location = new System.Drawing.Point(289, 138); + this.themecolora.Name = "themecolora"; + this.themecolora.Size = new System.Drawing.Size(40, 40); + this.themecolora.TabIndex = 13; + // + // themecolorb + // + this.themecolorb.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolorb.Location = new System.Drawing.Point(339, 138); + this.themecolorb.Name = "themecolorb"; + this.themecolorb.Size = new System.Drawing.Size(40, 40); + this.themecolorb.TabIndex = 17; + // + // themecolorc + // + this.themecolorc.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolorc.Location = new System.Drawing.Point(189, 189); + this.themecolorc.Name = "themecolorc"; + this.themecolorc.Size = new System.Drawing.Size(40, 40); + this.themecolorc.TabIndex = 7; + // + // themecolord + // + this.themecolord.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolord.Location = new System.Drawing.Point(239, 189); + this.themecolord.Name = "themecolord"; + this.themecolord.Size = new System.Drawing.Size(40, 40); + this.themecolord.TabIndex = 11; + // + // themecolore + // + this.themecolore.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolore.Location = new System.Drawing.Point(289, 189); + this.themecolore.Name = "themecolore"; + this.themecolore.Size = new System.Drawing.Size(40, 40); + this.themecolore.TabIndex = 15; + // + // themecolorf + // + this.themecolorf.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolorf.Location = new System.Drawing.Point(339, 189); + this.themecolorf.Name = "themecolorf"; + this.themecolorf.Size = new System.Drawing.Size(40, 40); + this.themecolorf.TabIndex = 19; + // + // themecolorfg + // + this.themecolorfg.AutoSize = true; + this.themecolorfg.BackColor = System.Drawing.Color.Transparent; + this.themecolorfg.Location = new System.Drawing.Point(190, 18); + this.themecolorfg.Name = "themecolorfg"; + this.themecolorfg.Size = new System.Drawing.Size(66, 13); + this.themecolorfg.TabIndex = 21; + this.themecolorfg.Text = "Sample Text"; + // + // themecolortextbg + // + this.themecolortextbg.Location = new System.Drawing.Point(180, 15); + this.themecolortextbg.Name = "themecolortextbg"; + this.themecolortextbg.Size = new System.Drawing.Size(208, 223); + this.themecolortextbg.TabIndex = 20; + // + // importbutton + // + this.importbutton.Location = new System.Drawing.Point(90, 220); + this.importbutton.Name = "importbutton"; + this.importbutton.Size = new System.Drawing.Size(60, 23); + this.importbutton.TabIndex = 2; + this.importbutton.Text = "Import"; + this.importbutton.UseVisualStyleBackColor = true; + this.importbutton.Click += new System.EventHandler(this.importbutton_Click_1); + // + // applybutton + // + this.applybutton.Location = new System.Drawing.Point(23, 220); + this.applybutton.Name = "applybutton"; + this.applybutton.Size = new System.Drawing.Size(60, 23); + this.applybutton.TabIndex = 1; + this.applybutton.Text = "Apply"; + this.applybutton.UseVisualStyleBackColor = true; + this.applybutton.Click += new System.EventHandler(this.applybutton_Click_1); + // + // themecolorfgmarked + // + this.themecolorfgmarked.AutoSize = true; + this.themecolorfgmarked.Location = new System.Drawing.Point(313, 18); + this.themecolorfgmarked.Name = "themecolorfgmarked"; + this.themecolorfgmarked.Size = new System.Drawing.Size(67, 13); + this.themecolorfgmarked.TabIndex = 22; + this.themecolorfgmarked.Text = "Marked Text"; + // + // XTM + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(397, 248); + this.Controls.Add(this.themecolorfgmarked); + this.Controls.Add(this.themecolorfg); + this.Controls.Add(this.themecolorf); + this.Controls.Add(this.themecolor3); + this.Controls.Add(this.themecolorb); + this.Controls.Add(this.themecolor7); + this.Controls.Add(this.themecolore); + this.Controls.Add(this.themecolor2); + this.Controls.Add(this.themecolora); + this.Controls.Add(this.themecolor6); + this.Controls.Add(this.themecolord); + this.Controls.Add(this.themecolor1); + this.Controls.Add(this.themecolor9); + this.Controls.Add(this.themecolor5); + this.Controls.Add(this.themecolorc); + this.Controls.Add(this.themecolor0); + this.Controls.Add(this.themecolor8); + this.Controls.Add(this.themecolor4); + this.Controls.Add(this.importbutton); + this.Controls.Add(this.applybutton); + this.Controls.Add(this.themelist); + this.Controls.Add(this.themecolortextbg); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "XTM"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "XChat Theme Manager"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListBox themelist; + private System.Windows.Forms.Label themecolor0; + private System.Windows.Forms.Label themecolor1; + private System.Windows.Forms.Label themecolor2; + private System.Windows.Forms.Label themecolor3; + private System.Windows.Forms.Label themecolor4; + private System.Windows.Forms.Label themecolor5; + private System.Windows.Forms.Label themecolor6; + private System.Windows.Forms.Label themecolor7; + private System.Windows.Forms.Label themecolor8; + private System.Windows.Forms.Label themecolor9; + private System.Windows.Forms.Label themecolora; + private System.Windows.Forms.Label themecolorb; + private System.Windows.Forms.Label themecolorc; + private System.Windows.Forms.Label themecolord; + private System.Windows.Forms.Label themecolore; + private System.Windows.Forms.Label themecolorf; + private System.Windows.Forms.Label themecolorfg; + private System.Windows.Forms.Label themecolortextbg; + private System.Windows.Forms.Button importbutton; + private System.Windows.Forms.Button applybutton; + private System.Windows.Forms.Label themecolorfgmarked; + } +} + diff --git a/src/xtm/Main.cs b/src/xtm/Main.cs new file mode 100644 index 00000000..e740e994 --- /dev/null +++ b/src/xtm/Main.cs @@ -0,0 +1,269 @@ +/* XChat Theme Manager + * + * Copyright (C) 2012 Patrick Griffs + * Copyright (C) 2012 Berke Viktor + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + +using System; +using System.Collections.Generic; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +/* using System.IO.Compression; */ +using System.IO.Packaging; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Net; + +namespace thememan +{ + public partial class XTM : Form + { + public string appdata = (Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\X-Chat 2\\"); + public string home = (Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/.xchat2/"); + + public string xchatdir; + public string themedir = "themes\\"; + + OpenFileDialog importDialog; + + public XTM () + { + InitializeComponent (); + + if (File.Exists ("portable-mode")) + xchatdir = ("config\\"); + else if (Directory.Exists (appdata)) + xchatdir = (appdata); + else if (Directory.Exists (home)) { + xchatdir = (home); themedir = "themes/"; + } else + Console.WriteLine("Install not found"); + + ListThemes(); + } + + private void ListThemes() + { + themelist.Items.Clear(); + + if (Directory.Exists(xchatdir + themedir)) + { + foreach (string theme in Directory.GetDirectories(xchatdir + themedir)) + { + themelist.Items.Add(theme.Remove(0, xchatdir.Length + themedir.Length)); + } + } + else + { + Directory.CreateDirectory(xchatdir + themedir); + } + + if (themelist.Items.Count == 0) + { + applybutton.Enabled = false; + } + else + { + themelist.SetSelected(0, true); + } + } + + private void ShowColors(List> themecolors) + { + List labels = this.Controls.OfType