Compare commits

...

611 Commits

Author SHA1 Message Date
cd72f2a55b Python: Use iterator for get_list() 2013-09-25 21:11:24 -04:00
d18a95fda6 Make Python version consistent on both platforms
and don't hardcode 2.7/3.3
2013-09-25 20:53:23 -04:00
c7a00a4aba Only show users country if its not unknown 2013-09-25 17:16:47 -04:00
7bc3317eeb Don't open most windows at mouse position 2013-09-25 02:09:47 -04:00
8028bb7f82 Make join dialog modal 2013-09-25 02:02:26 -04:00
6fc412c4e2 Update installer links to 2013 redist 2013-09-25 00:54:28 -04:00
0749cb1553 Remove hextray 2013-09-24 21:01:16 -04:00
f198581a09 Split long messages at spaces 2013-09-24 19:57:37 -04:00
4c9b193b45 Fix tab completion with utf8 completion char
Closes #738
2013-09-24 17:03:19 -04:00
130be78dbb typo.. 2013-09-23 23:10:31 -04:00
29d6db30ba Update help messages for userlist buttons and user popups 2013-09-23 23:08:56 -04:00
2e6001f1ed Revert menu.c @ ae04663aa9
This caused a few bugs such as improperly setting away/back
and redrawing the channel tree when the menu is opened.
2013-09-23 22:00:07 -04:00
9c4112cda7 Fix /cycle command
- Uses the correct channelkey when called from another tab
- Allows it to be used from any tab in the same server
- Verifies it's a channel you are in
2013-09-23 17:17:35 -04:00
04dbcdffc0 Only underline the channel part if nick prefix 2013-09-23 15:10:00 -04:00
0146a38faa Fix url detection of channel with nick prefix
Closes #769
2013-09-23 14:58:11 -04:00
145ceba124 Strip trailing space from CAP REQ
Mentioned in #770
2013-09-23 12:45:08 -04:00
90ea691b75 Add screenshot to appdata file 2013-09-20 23:01:27 -04:00
51cdcfca82 Fix warning 2013-09-20 17:33:27 -04:00
ae04663aa9 First round of using GTK accessor functions
This is the first step to build with GSEAL_ENABLE
setup.c uses a deprecated fontchooser,
chanview-tabs.c didn't like the conversion, and
I am waiting to do some work on xtext.c before
converting it.
2013-09-20 17:24:39 -04:00
9f8073ab77 Fix messages on networks that have chantypes the same as nick prefixes
Closes #763
2013-09-20 08:59:25 -04:00
bfa199be79 Add /d2Zi+ switch for better debug symbols 2013-09-20 13:11:01 +02:00
36911710fd Make manual reposition after unfullscreen Windows only 2013-09-19 22:01:15 -04:00
267ac71d4f Replace more GDK_* with GDK_KEY 2013-09-19 17:58:10 -04:00
f6ba274134 Add fullscreen to to view menu 2013-09-19 17:52:17 -04:00
cd825ac735 Improve text repositioning when searchbar string is modified. 2013-09-18 15:25:50 -07:00
1007af9506 Add message arguement to /query
Closes #757
2013-09-17 18:19:02 -04:00
b67953c70c Searchbar: Don't show error on empty string 2013-09-16 21:48:04 -04:00
1a67e245ac Fix searchbar loading highlight all pref on start 2013-09-16 21:31:05 -04:00
648de4410c plugins: fishlim: VS2013 comes with a working stdbool.h 2013-09-15 15:08:40 -07:00
b658fca4a7 Convert project files to vs2013 2013-09-15 15:07:46 -07:00
277732e384 Fix xtext crash in rawlog/text events window
Closes #740
2013-09-15 10:44:55 -04:00
f13413c26a Fix logging networks with invalid names on Windows 2013-09-15 07:40:47 -04:00
c9418ffca3 Translate -ize to -ise, favor[ite] to favour[ite], Behavior to Behaviour 2013-09-15 01:28:10 -07:00
ddb3bf05d8 use GDK_KEY 2013-09-15 03:22:04 -04:00
8b463e6b14 Update POTFILES.in 2013-09-15 03:07:45 -04:00
bc8eaf6588 Replace search window with a searchbar 2013-09-15 02:55:18 -04:00
b0b8f40791 Replace search window with a searchbar 2013-09-15 02:51:35 -04:00
aa37686bbd Move optimization settings from all subsequent projects to hexchat.props 2013-09-15 02:45:38 -04:00
4721a3747e Python: return hooks with PyLong_FromVoidPtr
Fixes #685
2013-09-15 02:45:38 -04:00
e5cb69db5d Python: Use keywords for attributes in emit_print() 2013-09-15 02:45:37 -04:00
414b591358 Python: Add support for attributes in hooks 2013-09-15 02:45:37 -04:00
ccd4945504 Merge xchat r1525
Fixes possible crash
2013-09-15 02:45:36 -04:00
59b19bac70 Update tooltip for sound alerts without libcanberra 2013-09-14 12:46:38 -04:00
14b8a77b78 Default spotchat to SASL 2013-09-12 03:55:17 -04:00
a71849db3f Bump Version to 2.9.6 2013-09-11 18:18:19 -04:00
a2eb3325ce Update Translations 2013-09-11 04:50:35 -04:00
b9df78b9c6 Exec: Print help on empty string
... and bump version
2013-09-10 02:24:53 -04:00
9a3c1ccd72 Update transifex config file 2013-09-08 01:28:06 -04:00
68116da5ad Remove about.c from POTFILES.in 2013-09-08 01:17:34 -04:00
68153812f7 Add channelkey to channel lists 2013-09-07 20:17:42 -04:00
bb1062ae2a Merge branch 'saslmech' 2013-09-07 19:00:40 -04:00
bdb18828e3 Disable challangeauth without openssl 2013-09-07 18:59:29 -04:00
a903f16c68 Implement BLOWFISh, AES, and EXTERNAL SASL mechanisms
Closes #657
2013-09-07 18:59:28 -04:00
5feeb717a0 Add appdata file 2013-09-07 02:08:04 -04:00
703316ace6 Merge pull request #733 from hexchat/filedialog
Improve file dialogs
2013-09-06 17:00:55 -07:00
88afa4afa2 Fix detecting utf-8 on some networks 2013-09-06 14:00:53 -04:00
bf269d2e03 Of course mimetype doesn't work on Windows.. 2013-08-31 15:38:29 -04:00
755932c3bc Use mimetypes for audio and images 2013-08-31 15:31:22 -04:00
4c406bce17 Improve file dialogs
- Fixes #314
- Adds file extensions to sound and image browsing
- Some options no longer default to our config dir
- Always add a shortcut to our config dir
- Remove broken 'last_dir' functionality, gtk already knows recent
2013-08-31 11:39:12 -04:00
3a87dedbb5 Merge pull request #731 from NoneGiven/patch-2
Fix colored vhosts
2013-08-28 12:57:18 -07:00
731fd33be2 Update text events, fix colored vhosts 2013-08-28 15:35:46 -04:00
ffc47e8439 Update travis to build theme manager 2013-08-28 13:32:35 -04:00
cc9d6042fd Update htm mime file 2013-08-28 13:22:12 -04:00
012b9c478e Merge pull request #730 from hasufell/mono
BUILD: add --with-theme-manager configure option
2013-08-28 10:21:37 -07:00
5d35ecfaa9 BUILD: update mime and desktop database 2013-08-28 14:30:57 +02:00
21bf0ae998 update desktop file 2013-08-28 14:30:57 +02:00
9d0ea7af4b update gitignore 2013-08-28 14:30:57 +02:00
08fd4f2dd7 BUILD: use thememan.in instead of Makefile echo 2013-08-28 14:30:57 +02:00
8f0d6e85fd BUILD: don't hardcode the install path in the script 2013-08-28 14:30:57 +02:00
7dea09c371 BUILD: fix quoting issue
\"$@\" got malformed and interpreted by the Makefile
2013-08-28 14:30:57 +02:00
ce5653d75c BUILD: add --with-theme-manager configure option 2013-08-28 14:30:57 +02:00
36b84c9af3 Merge pull request #728 from hasufell/master
build system improvements
2013-08-27 02:16:12 -07:00
d13046614e BUILD: use a blacklist rather than a whitelist for python versions 2013-08-27 10:59:03 +02:00
53e30995d6 Merge pull request #729 from hasufell/mime
fix htm desktop file
2013-08-26 22:44:57 -07:00
0c4e343b46 STYLE: tabs, not whitespaces 2013-08-27 00:18:08 +02:00
e6394cafe2 BUILD: consistently use PKG_CONFIG 2013-08-27 00:09:35 +02:00
fabc5bf4b7 STYLE: add missing comma 2013-08-26 23:45:51 +02:00
d601335aa6 fix desktop file 2013-08-26 23:27:29 +02:00
d6dacbe955 BUILD: use pkg-config to detect python 2013-08-26 23:00:47 +02:00
616c669d3b Fix /exec -o on Windows 2013-08-26 12:53:17 -04:00
d52cc1a1bd Add desktop and mimetype file for the Theme Manager 2013-08-26 10:06:34 -04:00
43a2f43090 Handle incoming messages from yourself
These are common for users of bouncers, private messages still need to
be handled.
2013-08-26 09:44:18 -04:00
b3369a4bc4 Sysinfo: Add announce option 2013-08-26 04:31:45 -04:00
b5b547abb6 Sysinfo: Fix gentoo detection 2013-08-26 03:58:36 -04:00
4e775df156 Update CLEAR and MSG help message 2013-08-25 11:16:49 -04:00
bf0ff98385 Update help for close command 2013-08-25 10:52:37 -04:00
66412e4997 Add TinyCrab to network list
Closes #723
2013-08-21 07:36:53 -04:00
77c1edbe13 Handle lists in MONITOR replies 2013-08-20 00:24:20 -04:00
46c32952b0 Make formatting more consistent
#719
2013-08-17 20:39:24 -04:00
41719bd4a8 Merge pull request #719 from Farow/pull
Improve cursor behavior
2013-08-17 17:32:16 -07:00
9629ca3fd9 Improve cursor behavior
- The cursor doesn't turn into a hand for non-url parts of a word
- Removal of unneeded variable str
2013-08-16 23:05:27 +03:00
a3ab5edc59 Merge pull request #718 from Farow/pull
Channel url improvements
2013-08-15 21:36:35 -07:00
8fbcddd2cd Add ObsidianIRC network
#412
2013-08-15 17:59:41 -04:00
73d63ca3da Allow multiple channels in url, fix nick re
- Multiple channels have to be separated by a comma
- Fix #nick becoming a url for nick instead of #nick
2013-08-13 07:39:34 +03:00
721a9965aa Fixed munging of whitespace in sysinfo's matching functions
Closes #712
2013-08-12 23:41:37 -04:00
4f77f046d0 Channel url and cursor fix
- Allow colons in channel urls
- Only add the channel part in the context menu
- Fix cursor not changing between separator and url
2013-08-13 04:19:14 +03:00
0b95c1c444 Merge branch 'pluginreload' 2013-08-10 19:44:38 -04:00
41c0c345cd And free connect command.. 2013-08-10 18:04:56 -04:00
c8f6d2c538 Merge pull request #713 from Farow/master
Make the channel key input larger
2013-08-10 14:32:02 -07:00
b2d2187b20 Only replace variables in connect commands 2013-08-10 16:51:56 -04:00
b8894a468d Update channel key input
- allow up to 23 characters
- make the input bigger
2013-08-10 22:55:17 +03:00
1c30e0c124 Still include old freenode hostname in servlist 2013-08-08 12:01:49 -04:00
4dc600a63c Alphabetical order.. 2013-08-07 06:28:04 -04:00
13bfd060b6 Format Channel URLs
closes #706
2013-08-07 06:14:30 -04:00
1370a49742 Save notify list on close of friends list
for #570
2013-08-06 16:13:10 -04:00
ab6bf4234c Bind esc to close in chanlist 2013-08-05 07:06:04 -04:00
5224c275e8 Destroy utility windows with their parents. 2013-08-05 04:03:26 -04:00
272b3d2f82 Add .patch to gitignore 2013-08-04 07:13:50 -04:00
2528a78593 Remove VS Redistributable update version from installer link 2013-08-04 11:45:08 +02:00
2917a83d7b Update text on reload button 2013-08-04 04:53:40 -04:00
77e9417c7b Add label for website in about dialog 2013-08-04 04:48:45 -04:00
e8456beadc Add reload command for plugins and add to gui 2013-08-04 04:36:10 -04:00
d63a33b6dc Use built-in gtk_about_dialog 2013-08-03 07:11:25 -04:00
bdc814a4a4 Merge pull request #677 from hasufell/master
CONFIGURE: add "--enable-minimal-flags"
2013-08-02 23:25:40 -07:00
ce40e5a111 Merge pull request #700 from orium/url-chan-prefix
Server aware nickname and channel matching
2013-08-02 23:24:50 -07:00
61c9ad08bf Fixed memory leak. 2013-08-02 02:45:54 +01:00
bca0ad8e1e Fix description line for Scroll Page in fkeys.c. 2013-08-01 11:55:22 -07:00
6ec7bfad30 Indentation fix. 2013-08-01 16:39:49 +01:00
0e76283c9a Now nickname and channel matching is server aware: we only match words that
have the prefixes the server uses.

The url regex matching was designed to be more versatile. This was needed to
disambiguate matches between nicks and channels, since they may have common
prefixes now (&+!). In case of ambiguity, when the server supports prefixes that
are common to both channels and nicknames, we choose the nickname (the nickname
only matches if there is a user with that nick in the current session).

Fixes #655.
2013-08-01 16:28:17 +01:00
78a72a6c1e Merge pull request #697 from RichardHitt/topbottom
Scroll-page keybindings:  Add Top (C+HOME), Bottom (C+END)
2013-07-31 22:20:48 -07:00
4a95b07ae7 python: Set VERSION using existing VERSION_MAJOR and VERSION_MINOR macros and some mintor refactoring. 2013-07-30 22:54:57 -07:00
154ea98deb Fix kickbanning opped users 2013-07-30 23:29:25 -04:00
be252e271f Scroll-page keybindings: Add Top (C+HOME), Bottom (C+END) 2013-07-30 13:11:07 -07:00
e2328e7a91 Merge pull request #687 from Mikah89/clear_dcc_list_rebased
Clear button in dcc download manager
2013-07-27 13:19:29 -07:00
942b92c796 Remove #hexchat from default autojoin 2013-07-27 00:23:40 -04:00
3bd2143d9a Have join dialog suggest #hexchat for freenode users 2013-07-27 00:22:57 -04:00
93cfa353e7 Tweak cli output and fix related warnings 2013-07-27 00:03:16 -04:00
2cbe758c80 Fix some warnings 2013-07-26 22:53:01 -04:00
72c6834cc5 Python: Fix callbacks for the "special" print hooks 2013-07-26 19:51:56 -04:00
ac06b74b18 Use system's libsexy by default
It will still fallback to static
2013-07-26 15:03:59 -04:00
1fd94e79b9 Merge pull request #679 from hasufell/libtool
MAKE: backwards compat for old libtool
2013-07-26 11:55:37 -07:00
bb3cb269c2 Upd: Properly handle http errors
Also some cleanup of some old code and comments
2013-07-25 19:54:25 -04:00
715a520c0e Move optimization settings from all subsequent projects to hexchat.props 2013-07-24 20:56:36 +02:00
78d14a2b1e Removed restriction that disabled the clear button if at least one transfer item was selected in dcc download manager. 2013-07-23 23:55:20 +01:00
3d10b9f3e2 Python: return hooks with PyLong_FromVoidPtr
Fixes #685
2013-07-21 16:40:38 -04:00
f97f1a08ae Merge pull request #689 from hexchat/python-attributes
Python: Add support for attributes in hooks
2013-07-21 13:33:47 -07:00
13e9713b72 Merge xchat r1525
Fixes possible crash
2013-07-20 18:00:19 -04:00
bf9276fc5c Python: Use keywords for attributes in emit_print() 2013-07-19 14:14:26 -04:00
fe86c4900f Merge pull request #680 from staticshock/dotless-domains
Permit dot-less domain names
2013-07-19 09:23:52 -07:00
f45487e92c Python: Add support for attributes in hooks 2013-07-19 10:25:46 -04:00
bca972bdc3 Permit dot-less domain names
Fixes #523
2013-07-19 09:01:53 -04:00
a8abba84bd Fixed coding style and clearified some comments, following arnavion suggestions 2013-07-17 09:20:54 +01:00
2e2f4662f3 Updater: fix download links 2013-07-16 12:48:34 -04:00
0c87c49146 Implemented clear functionality for DCC download manager. Created clear button in DCC downloaded manager interface. 2013-07-15 21:34:14 +01:00
6c8d9c2194 Merge pull request #675 from orium/server-time-plugins
Server time plugins
2013-07-14 11:29:24 -07:00
62d52d55b2 Add staticbox network
Also default to SASL on some more networks
2013-07-14 10:20:03 -04:00
3598966069 Forgot to add hexchat_emit_print_attrs() to the macros in hexchat-plugins.h. 2013-07-13 16:50:51 +01:00
ec6f5b011a g_free() should be used for g_malloc(). 2013-07-13 05:33:16 +01:00
9d4a1a3b4f Update docs links 2013-07-12 19:32:10 -04:00
9978ebd853 Removed outdated comment. 2013-07-12 22:52:12 +01:00
18eaccb840 Added functions to create/destroy event_attrs to plugin interface.
Function names were chosen to keep consistency with the rest of the
API.
2013-07-12 22:46:04 +01:00
e63ec01089 MAKE: backwards compat for old libtool 2013-07-12 14:17:30 +02:00
e0fb3d537d Added hexchat_emit_print_attrs() to plugin interface. 2013-07-12 01:33:35 +01:00
19d4356484 CONFIGURE: add "--enable-minimal-flags"
This will turn off automagic adding of flags that might be unwanted
such as "-g" or "-pipe".
2013-07-11 12:36:14 +02:00
be1e6bde65 Fix requesting sasl multiple times 2013-07-11 05:58:10 -04:00
f113008c7f Don't grey out log fliename in preferences
It can still be useful when global logging is disabled
2013-07-10 15:39:45 -04:00
5e240eb259 Indentation fixes and code cleanup. 2013-07-10 00:42:34 +01:00
7101b7b864 Now hexchat_hook_server_attrs() and hexchat_hook_print_attrs() is called
when it should. This should close #661.
2013-07-09 23:11:28 +01:00
98aa62f637 Removed two dummy functions in plugin interface. 2013-07-09 22:04:07 +01:00
798db7368a Added hexchat_hook_server_attrs() and hexchat_hook_print_attrs() to the plugin
interface. This hooks are similar to hexchat_hook_{server,print}() except the
callback passes an extra argument with the (new) structure hexchat_event_attrs.

This structure contains attributes related to the event; by now it only contains
the server_time_utc member which is non-zero if server-time is enabled and the
server used this extension to pass a timestamp.

See issue #661.

(Note: this hooks are still not called by hexchat in this commit.)
2013-07-09 20:21:16 +01:00
4cf61ccedb Fix warning 2013-07-08 16:30:54 -04:00
7f50ee6fd2 Increase upper limit for max DCC speed in preferences
For #672
2013-07-07 15:15:50 -04:00
1544a5d6cb Default to nickserv when using /ghost or /id commands 2013-07-04 18:08:56 -04:00
3284502645 Merge pull request #667 from orium/fe_get-dialogs-transient
fe_get_{int,str}() sets transient for the main window.
2013-07-03 12:00:41 -07:00
4cc03aba75 Now fe_get_{int,str}() sets transient for the main window.
This allows window managers to handle the window in a better way, for instance
xmonad used to open the dialogs in a new tile and now opens a simple float.
2013-07-03 19:48:45 +01:00
286bbc6bde Add another server to 2ch network 2013-07-03 00:42:48 -04:00
d1244d7231 Use URL command for opening in existing
This avoids making a new connection to an already open network.
2013-07-02 12:22:01 -04:00
50219a63ad Fix opening empty channel when url has trailing slash 2013-07-02 12:19:47 -04:00
806c75f051 Add 2ch network
Closes #666
2013-07-02 10:35:06 -04:00
ee621d2435 Update man page 2013-07-01 21:57:38 -04:00
340811da6e Merge pull request #665 from orium/freebsd-fixes
Freebsd fixes
2013-07-01 18:51:51 -07:00
4b40597c76 Fixed get_timezone() to work on windows. 2013-07-02 02:22:41 +01:00
9a789bc9e7 Now handle_message_tag_time() doesn't use "timezone" since it is not defined
in *BSD.
2013-07-02 01:54:18 +01:00
4886cc8258 Don't use G_VALUE_INIT since it was introduced in glib 2.30, and our minimum
requirement is glib 2.28. This was giving a compilation error in FreeBSD 9.1,
since it uses glib 2.28.
2013-07-02 01:54:11 +01:00
82277a80ea Fix urls with --existing 2013-07-01 14:53:47 -04:00
22064278df Update fe-text's help message 2013-07-01 14:36:15 -04:00
932bfa3482 Don't use popup dialogs for help 2013-07-01 14:28:26 -04:00
5de5d6d00b Improve help message 2013-07-01 14:11:24 -04:00
aab55d8cff Handle extraneous cli args as urls 2013-07-01 13:43:58 -04:00
73c9321361 Fixed server-time timestamps issue regarding local time. 2013-06-30 15:00:38 +01:00
25288120be Fixed another bug in handle_message_tag_time(): tm_mon is between 0 and 11. 2013-06-28 23:42:11 +01:00
d99d951f7f Fixed bug in handle_message_tag_time(). 2013-06-28 22:08:35 +01:00
00e15828a1 Also support znc.in/server-time-iso 2013-06-28 13:33:08 -04:00
ad926e9b07 Merge pull request #656 from orium/server-time
Closes #499
2013-06-28 11:59:33 -04:00
059cbcd406 Fixed compilation error in VS. 2013-06-28 16:29:39 +01:00
dcdb11a78b Added preferences options to enable the server-time extension when available.
(Internationalization messages missing.)
2013-06-28 16:15:15 +01:00
aef9e3922e Fixed a few null pointer derefs caused by dummy code that somehow I
forgot about.
2013-06-28 16:08:03 +01:00
ce6fef3d0a A few messages missing regarding server-time. 2013-06-28 16:07:42 +01:00
4057b7dd58 Now inbound_cap_ls() can enable extensions when a bouncer uses a namespace for
the extension server-time.
2013-06-28 16:07:24 +01:00
d1725e3f44 server-time for all numerical messages. 2013-06-28 16:04:32 +01:00
42da8fe3ef server-time supported in all named servermsg: ping, error, notice and
authenticate.

The only thing left to do for server-time are the numeric messages.
2013-06-28 16:04:16 +01:00
a01bd83c64 Organized cap inbound code in inbound.c instead of proto-irc.c. 2013-06-28 16:04:06 +01:00
6a0240aa18 server-time supported in most named messages. 2013-06-28 16:03:37 +01:00
179747a7bc Implemented handle_message_tag_time() for time-server messages. 2013-06-28 16:03:20 +01:00
94186f7888 First step towards message tags extension support
(see http://ircv3.atheme.org/specification/message-tags-3.2).

In particular this commit implements a (very) dummy implementation
sketch of the server-time extension
(see http://ircv3.atheme.org/specification/message-tags-3.2 and #499).
2013-06-28 16:03:12 +01:00
ac5771377e fe-gtk: Only escape notification bodies for notification servers that support "body-markup". 2013-06-28 00:14:54 -07:00
863dc2e841 docs: Typo. 2013-06-27 10:53:29 -07:00
59b9ee3417 plugins: Implemented get_info("password") and re-added get_info("nickserv") as an alias to that. 2013-06-23 11:39:12 -07:00
3285934703 Update hacking.md 2013-06-23 07:29:26 -03:00
c7d1102c61 perl: Fixed get_list('networks') to work with new servlist.conf syntax for autojoin channels. 2013-06-22 22:06:49 -07:00
6e3f05fcc7 Fixed indent: spaces -> tabs. 2013-06-20 19:03:26 +01:00
d8286a63ec Add more uri schemes 2013-06-19 18:57:52 -03:00
9854b100fb Detect Spotify URIs 2013-06-19 05:07:45 -04:00
ef5588b9c0 Use chat.freenode.net 2013-06-18 22:38:10 -03:00
64ba92593e fix merge conflict 2013-06-18 20:40:07 -04:00
33b5dc1c75 Use tabs 2013-06-18 21:20:09 -03:00
02139fbb79 Handle IPv6 addresses correcly in fe_open_url_locale(). 2013-06-19 00:15:47 +01:00
9ef1d1db96 Now WORD_HOST6 is handled the same way as WORD_HOST. 2013-06-18 23:30:38 +01:00
225acd0ce2 Merge pull request #649 from RichardHitt/urlgrabber
Fix urlgrabber right click selection.
2013-06-18 15:08:56 -07:00
b4496216db Fix urlgrabber right click selection. 2013-06-18 14:53:18 -07:00
d88c4ad411 Added a few more useful url schemes. 2013-06-18 12:32:55 +01:00
8b217981ed Removed unused argument of make_re(). 2013-06-18 12:07:46 +01:00
8ce8a359c1 Now url_check_word() returns WORD_HOST6 when a ipv6 address is matched. 2013-06-18 12:01:39 +01:00
55734baed8 Fix IPv6 addr matching in url: must be enclosed in []. 2013-06-17 22:43:18 +01:00
52ce55341b Fix Open Data Folder on unix
Mentioned in #646
2013-06-16 16:20:06 -03:00
e4b6f4b375 Refined IPv6 address matching in url.c. 2013-06-16 20:16:58 +01:00
32dee82c58 Added support for passwords in userinfo of urls. 2013-06-16 20:00:35 +01:00
2870586cf9 Fixed irc:// and ircs:// url matching: irc://freenode was not working because
"freenode" doesn't match a hostname.
2013-06-16 19:11:26 +01:00
cb1975f450 Fixed file:// url matching. 2013-06-16 19:09:50 +01:00
805b33552b Rework url matching to make it easier to add schemes.
The new way allows great control of what a url is composed of.

Added a bunch of new schemes.
2013-06-16 15:36:52 +01:00
6bc05a8bc8 Improved host matching in url:
* Refined ipv4 addr
 * Added ipv6 addr
2013-06-16 04:22:28 +01:00
3ffae231de Fix building with static spell 2013-06-15 21:52:04 -03:00
6a7557da01 Merge branch 'master' of http://github.com/hexchat/hexchat 2013-06-15 17:26:13 -07:00
d7045e2b61 Fix Fedora-19 Segmentation fault, bugid 968817. 2013-06-15 17:21:55 -07:00
e68635b8e4 Add configure patch from gentoo 2013-06-15 17:26:10 -03:00
7ef8d0d443 More autojoin wording tweaks 2013-06-13 20:53:55 -04:00
9b958ed393 Use snprintf 2013-06-13 18:38:59 -03:00
84e8c658f6 Tweak travis template 2013-06-13 15:33:25 -04:00
21a5eb2702 Formatting 2013-06-13 16:20:58 -03:00
1d62465e5b Add irc notifications to travis 2013-06-13 15:08:35 -04:00
cb1b1c6e1c Tweak autojoin wording 2013-06-13 15:55:38 -03:00
8be56d7003 Don't open libcanberra connection for every event
Closes #645
2013-06-12 10:41:52 -04:00
8ce1a9476d Merge pull request #640 from orium/default-language
Default language
2013-06-09 14:10:55 -07:00
0689b54827 Add irc_ban_type to preferences 2013-06-09 16:51:57 -03:00
b569943059 Specify what for completion amount 2013-06-09 16:01:00 -03:00
eb001433e4 Emit FOUNDIP in server session 2013-06-09 15:55:56 -03:00
a591c875ae Add completion_amount to prefs
... and remove completion_auto which is confusing to say the least.
2013-06-09 15:48:42 -03:00
08cd36bef0 Fix printing ipv6 addresses with identd
Closes #639
2013-06-09 10:42:42 -03:00
5d0599976e Add more mnemonics to the menu 2013-06-08 20:09:22 -04:00
2e014bbc72 Merge pull request #641 from orium/possible-buffer-overflow-fix
Fixed possible overflow in create_mask().
2013-06-08 02:45:00 -07:00
88e9611444 Minor cosmetic changes 2013-06-08 03:14:24 +01:00
97e88b885a Renamed tbuf to buf in create_mask() to avoid confusion. 2013-06-08 03:01:36 +01:00
f84476cf87 Fixed possible overflow in create_mask(). 2013-06-08 02:56:36 +01:00
473ab16739 Now the default configuration tries to set the language from the system
locale, and defaults to english if no language match.

This closes #473.
2013-06-08 02:34:01 +01:00
951292abe1 Change default irc_ban_type to 1 2013-06-07 09:55:56 -03:00
612032c9f8 Add QUIET command 2013-06-07 08:24:13 -04:00
0dd9ac2e44 Take two at fixing xtext copying to secondary clipboard 2013-06-07 08:20:36 -03:00
8f551de4f4 Merge pull request #636 from Remmy/master
Addition to the list of available IRC networks. Serenity-IRC is a small friendly network which has been around since 2003.
2013-06-07 01:31:41 -07:00
0c2e08cf2b Add Serenity-IRC to the list of networks available by default. 2013-06-07 04:58:34 +02:00
0e420fbee8 Save chanopt after any changes 2013-06-06 19:16:50 -04:00
cf505b850b Add chanopt for stripping colors 2013-06-06 17:47:01 -04:00
fd762303b0 Add autoconnect option to menu of networks 2013-06-06 16:49:57 -04:00
a6f05db34b Make autojoin a toggle menu 2013-06-06 16:12:59 -04:00
df0ee53765 Handle /CAP LIST output
Closes #635
2013-06-05 13:35:30 -03:00
d0b3476839 update help message for /menu 2013-06-05 08:27:16 -04:00
4d16f5bf28 Add missing gtk_tree_path_free() 2013-06-04 12:32:51 -03:00
c45cc78548 Add copy option to right click in banlist
Closes #626
2013-06-04 12:25:12 -03:00
d16aedf6c4 Merge pull request #634 from youknowone/ipv6
Retrieve reachable addresses only.
2013-06-04 05:04:48 -07:00
d3a27947fe Retrieve reachable addresses only.
AI_ADDRCONFIG helps not to try to connect unreachable ipv6 address if
user doesn't have ipv6 network stack.
2013-06-04 20:19:37 +09:00
42e3587fd5 copy xtext selection to all clipboards 2013-06-04 07:00:08 -03:00
e3f699a9d8 Improve error message from /load -e 2013-06-04 06:34:15 -03:00
5201f0fd06 Python: revert 43bd9483ce
Will possibly come back to this at a later time...
2013-06-04 06:13:28 -03:00
df0e97550b fix loading startup.txt automatically 2013-06-04 06:07:51 -03:00
983b4ace89 treat banlist event as a generic list event (for quiets etc) 2013-06-03 08:19:27 -04:00
f0684dc74e translate servlist tabs 2013-06-02 20:50:43 -04:00
39923e05f3 Rename favorite channels to autojoin channels 2013-06-02 20:44:05 -04:00
51bf9165b2 Merge pull request #633 from FionnK/master
Add IRCNode to network list
2013-06-02 17:27:50 -07:00
f1735f3ae1 Remove IPv6 check for IRCNode entry in server list. 2013-06-03 02:21:42 +02:00
2ba785f648 Add IRCNode to the server list. 2013-06-03 02:10:44 +02:00
c9b7a3f86e Python: return true/false from set/del_pluginpref 2013-06-02 00:29:34 -03:00
43bd9483ce Python: Save pluginprefs to seperate files 2013-06-02 00:22:00 -03:00
1277b4c30f be more specific about sysinfo menu entry 2013-06-01 19:06:58 -04:00
e1ce1c90f7 configure.ac: Use pkg-config's CFLAGS for libxml2 instead of guessing our own. 2013-06-01 13:46:33 -07:00
f45c2dd061 Add valleynode to network list
Closes #631
2013-05-31 20:12:21 -03:00
855c20501b fix crash 2013-05-30 22:23:00 -03:00
945251c6b8 add .js to list of loadable filetypes 2013-05-29 01:55:41 -03:00
e47dd3eb89 Don't send previous session's password
closes #616
2013-05-25 20:47:16 -03:00
c9c8993b9d Merge pull request #625 from orium/network-name-improve
Improved server_get_network()
2013-05-25 16:31:51 -07:00
d934e60c2b Improved server_get_network(): if we don't have the current network in the
network list use the server name in received in event 005.
(This fixes the problem that the network (%n) in the log file names would be
"NETWORK" instead of the real network name (this happened if the network was
not in the network list).)
2013-05-25 22:31:45 +01:00
11478719cd Merge pull request #624 from Niichan/master
PonyChat added to network list
2013-05-24 21:12:00 -07:00
7284addb09 Added PonyChat to network list 2013-05-24 21:01:06 -07:00
270cde42f1 Merge pull request #590 from orium/run-as-root-589-504
Now hexchat doesn't abnormally terminate when started as root.
2013-05-24 15:01:27 -07:00
b690098941 Merge pull request #622 from orium/null-ptr-favchan-fix
Fixed null pointer deref when we try to autojoin a channel
2013-05-24 14:07:14 -07:00
fffe9f4bd9 Restored inbound.c to make the pull request cleaner. 2013-05-24 22:04:34 +01:00
7353bf2698 Followed richtroye suggestion and implemented the net == NULL guard in
servlist_favchan_find().
2013-05-24 21:49:46 +01:00
133b0f7d94 Fixed null pointer deref when we try to autojoin a channel of a network not
in the network list.
2013-05-24 20:29:15 +01:00
4878012065 Merge pull request #621 from orium/dictionaries-update-fix
Spell check dictionaries were not being updated when changed
2013-05-24 08:53:48 -07:00
4402ea34de Fixed mistake in last commit. 2013-05-24 16:46:35 +01:00
faa53a5335 Spell check dictionaries were not being updated when changed. 2013-05-24 00:01:25 +01:00
44a88fc1ab Merge pull request #618 from orium/server-command-password-fix
Fix issue with /server command
2013-05-23 07:28:58 -07:00
d3ce4f64f6 Passing a password to the /server command was ignored because the login method
was not set.
2013-05-23 13:22:34 +01:00
fcdd85ae5e Merge pull request #603 from orium/lag-meter-stuck
Fix an issue where the lag meter could get stuck after reconnect
2013-05-22 17:17:28 -07:00
fd71bb768a Python: Allow unhooking commands and prints by name 2013-05-22 19:30:49 -03:00
66bb79ef10 Improve sort keybinding in servlist
also disable auto sorting on fav channels, closes #606
2013-05-20 13:19:20 -03:00
3b4cc9d806 Use png instead of svg 2013-05-20 15:59:41 +02:00
79221c403b Temporary workaround for reconnect crashes on win32
Yes, we really need to fix this ASAP
2013-05-20 14:39:24 +02:00
0ab11cc09a Add structs and use treeview 2013-05-20 13:21:27 +02:00
1432ecfb33 Sample code docs for challengeauth_response() 2013-05-20 12:38:50 +02:00
341cfbb527 Set up Doxyfile 2013-05-20 12:31:09 +02:00
78573ae0c9 Add default Doxyfile 2013-05-20 12:24:25 +02:00
8a9d3e21f2 Update dirent.h win32 implementation 2013-05-20 00:22:20 +02:00
8655c4b007 Reorganize Preferences 2013-05-19 20:43:21 +02:00
5fa23341b3 Avoid useless strdup() and free() calls 2013-05-19 12:17:37 +02:00
67274f91e9 Add default connect commands for networks with obscure login methods
Yeah, QuakeNet is an exception
2013-05-19 12:15:31 +02:00
c0cc6a2c93 Cosmetics 2013-05-19 11:49:27 +03:00
b2fec642fe Login type cleanup 2013-05-19 05:17:13 +02:00
d60cecb8d3 Add custom login type to avoid collisions 2013-05-19 04:34:20 +02:00
c168a9adc6 Add variables for user credentials in connect commands 2013-05-19 03:30:45 +02:00
f778245a86 Simplify SASL auth string generation code 2013-05-19 01:21:27 +02:00
5701ba287b Translate search window tooltips 2013-05-18 17:40:35 -04:00
c471388021 Don't use popup when search is not found 2013-05-18 17:32:41 -04:00
9d717ffee9 Fix text event for erroneous nicks 2013-05-18 22:09:44 +02:00
bac96d1fa8 Add FurryLand 2013-05-18 21:40:42 +02:00
f313a83474 Update Perl library name 2013-05-18 21:33:22 +02:00
9891f94e41 Rebrand python about message 2013-05-18 15:42:30 -03:00
a22ae9f39a Support time lists via python 2013-05-18 15:13:05 -03:00
02298c8e76 Fix prototype, return value is used by joindelay_tag 2013-05-18 19:48:54 +02:00
73badc67ff Fix warning from hwmon.c in plugins/sysinfo 2013-05-17 21:51:34 -07:00
1181b56211 Add omsg user command 2013-05-17 06:17:16 -03:00
78eb3e7522 Handle limited channel messages
Maybe improved later to signify they are limited messages. closes #315
2013-05-17 06:10:02 -03:00
57b74c3de9 Increase default irc_join_delay to 5 2013-05-17 05:32:53 -03:00
c83ca8f85a Respect irc_join_delay if connect command set 2013-05-17 05:28:45 -03:00
ef58a267b0 Omit CHALLENGE hashes in the server tab 2013-05-17 02:48:32 +02:00
4130954c15 Fix removing keys from favorites 2013-05-17 02:24:47 +02:00
0a2af0ab62 Fix crash when using global username for QuakeNet 2013-05-17 02:08:34 +02:00
a1a94ed319 Add support for QuakeNet /CHALLENGEAUTH, remove legacy /AUTH 2013-05-17 01:40:07 +02:00
096d0660e2 Merge pull request #594 from Tux/master
Allow the special colors 32..41 in %Cfg,bg
2013-05-16 10:50:43 -07:00
b28734c4a8 Merge pull request #581 from orium/numeric-session-with-open-query
Session of numeric events passed to text_emit() for nicks with open query dialogs
2013-05-16 09:21:02 -07:00
69c2893234 Merge pull request #586 from bviktor/authcleanup
Login and network list cleanup
2013-05-16 09:07:38 -07:00
89078eb3b3 Fix an issue where the lag meter would be stuck after a reconnect caused by a
ping timeout.
2013-05-16 15:11:52 +01:00
26cefd0587 Have rawlog properly handle newlines
This is most noticable with /cycle or the missing USER command on connect.
2013-05-16 09:21:55 +00:00
8ccd11ee4b Remove comment 2013-05-16 00:08:43 +02:00
fd1b276aab Make sure the created favchannel instances have a NULL key when the session's key is empty 2013-05-16 00:04:58 +02:00
2ff8e74061 Omit filler keys if no channel's using them 2013-05-15 23:52:14 +02:00
0020f81e79 Fix reconnect keys 2013-05-15 18:26:54 +02:00
6f09752db4 Cosmetics 2013-05-15 11:48:37 +02:00
8cf025f18d Fix autojoins for sessions 2013-05-15 11:43:38 +02:00
81990ce53b Change prototype 2013-05-15 08:49:28 +02:00
12cdb7704c Fix command splitting when the channel list is too long 2013-05-14 18:20:05 +02:00
947dd45294 Fix warnings 2013-05-14 16:52:16 +02:00
a435e8648f Fix initial autojoins and some erroneous copies/frees 2013-05-14 16:40:32 +02:00
25d0793766 Merge pull request #596 from Arnavion/python3-allow-unhook-within-hook
python: Hold a reference to plugin instead of dereferencing hook to get to it.
2013-05-14 01:33:50 -07:00
5c9652bf13 python: Hold a reference to plugin instead of dereferencing hook to get to it.
hook might have been free'd by the callback via hexchat.unhook().
2013-05-14 01:25:01 -07:00
7a242a8331 Allow the special colors 32..41 in %Cfg,bg
Text events allow %Cfg,bg as decribed in "Theming" on
https://hexchat.readthedocs.org/en/latest/appearance.html?#theming

That section describes mIRC colors 0-15 and local colors 16-31, but
when selecting background colors, the 9 special internal colors are
extremely useful, like %C20,33 will do bright red on the selected
text background color.

As the documentation is on-line, this patch has no doc-change.
Ideally, the color-codes should show in the colored squares in the
preferences color-dialog just as with colors 0-31

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
2013-05-13 15:26:33 +02:00
7cdfeff204 Add note about preferred tab size 2013-05-13 13:38:01 +02:00
83107ee222 Use macros instead of raw numbers for login type 2013-05-13 13:22:25 +02:00
d9d05e83ba Restructured a fair bit of cfgfiles.c. Besides making the code cleaner this allows
for better error handling (in fact the error message of check_prefs_dir () whould
make hexchat abort).
2013-05-13 01:58:08 +01:00
631664645d Add "#define GLIB_DISABLE_DEPRECATION_WARNINGS" to eliminate a warning message 2013-05-12 17:25:43 -07:00
61ed0829bd Forget to put an empty line after a function definition 2013-05-12 23:33:44 +01:00
f023de0faf Removed unnecessary call to check_prefs_dir() in load_config().
This function is called in save_config(), where it is actually needed.
2013-05-12 23:25:36 +01:00
7238853f0f Factored locale related code in main() to a new function. 2013-05-12 23:15:23 +01:00
6a8cad6f94 Now hexchat doesn't abnormally terminal when started as root.
This fixes #589/#504.
2013-05-12 16:37:38 +01:00
2c15270be1 Remember selected tab 2013-05-12 16:59:21 +02:00
c044bdfe32 Fix warning 2013-05-12 16:38:31 +02:00
aac7079562 Add code for migrating existing configs 2013-05-12 16:38:21 +02:00
cadcfc553c Cosmetics 2013-05-12 16:37:32 +02:00
5df669a329 Make the order consistent for load and save 2013-05-12 16:02:26 +02:00
4c307f6ac9 Add auto-reconnect to preferences 2013-05-12 04:08:01 -04:00
37aa38617e Merge pull request #588 from Repentinus/patch-2
Fixed misleading comments identifying the colours
2013-05-12 00:00:08 -07:00
07acb6f7b6 Fixed misleading comments identifying the colours
Replaced incorrect numbers (16 to 31) for mIRC colours with the correct ones (0 to 15).
2013-05-12 05:50:52 +00:00
9c96528a98 Remove unused variable 2013-05-12 06:19:42 +02:00
9327a5c71f Reduce GLib requirement 2013-05-12 06:16:26 +02:00
171dbcdedf Remove dead GLib code 2013-05-12 05:58:16 +02:00
de819e12bf g_slist_copy_deep() requires GLib 2.34 2013-05-12 05:55:14 +02:00
198dc9eb43 Fix favorite channels except in inbound.c 2013-05-12 05:44:32 +02:00
04d282fae3 Fix crash when quickly attaching/detaching tabs 2013-05-11 23:07:42 -03:00
bb86771425 Add explanation as well 2013-05-11 20:47:39 +02:00
791e0fc11f Make login type more intuitive and disable unused /NS 2013-05-11 20:42:29 +02:00
0badd9b874 Remove dead code 2013-05-11 20:09:07 +02:00
af03fa3c7c Fix connect commands 2013-05-11 20:06:22 +02:00
4d30512e05 Fix layout when resized 2013-05-11 16:30:45 +02:00
d5e8fa47f0 Allocate all extra vertical space to the treeviews 2013-05-11 16:21:38 +02:00
85c7e07351 Set up window sizes correctly 2013-05-11 15:58:52 +02:00
fde85c79df Reorganize the network editor 2013-05-11 15:22:28 +02:00
712eb5428e GtkComboBoxText requires GTK+ 2.24, dump code for older versions 2013-05-11 13:06:25 +02:00
5c663adf35 Reorganize a bit and fix spacing 2013-05-11 12:56:26 +02:00
68fa033483 Re-enable resize 2013-05-11 11:54:42 +02:00
b33f70571e fix error 2013-05-11 09:31:56 -04:00
cdc2bb0216 serverlistgui cleanup 2013-05-11 09:20:03 -04:00
250d9b565c Merge pull request #582 from Repentinus/patch-1
Support for away tracking regardless of channel size
2013-05-11 02:10:42 -07:00
6e7c0395e1 Merge pull request #585 from rahatarmanahmed/master
Added help text to sysinfo
2013-05-10 21:38:10 -07:00
be35154376 Added help text for sysinfo plugin. 2013-05-10 23:32:29 -05:00
de2fdc093a Cosmetics 2013-05-11 04:19:18 +02:00
3679dfe93e Make logmask consistent with scrollback mask 2013-05-11 04:18:44 +02:00
2e1425451d Remove some redundancy 2013-05-11 03:13:50 +02:00
0e1da0d33d Also disable labels, not just entries 2013-05-11 03:02:31 +02:00
7b0b86c9f7 Nuke nickserv password field and some cosmetics 2013-05-11 02:40:08 +02:00
a98b95923b Get rid of this unnecessary buffer 2013-05-11 02:00:32 +02:00
cf3d1ebb8b Skeleton for tabbed ui 2013-05-11 01:20:53 +02:00
5db1541f95 Reorganize the network list 2013-05-11 00:49:04 +02:00
873a3ef047 Replace various network options with universal login method option 2013-05-10 23:52:47 +02:00
beb3ab506d Import hexchat automatically when calling /py exec 2013-05-09 23:45:04 -03:00
494364d437 Fix returning gtkwin_ptr from python api 2013-05-09 22:55:06 -03:00
2f1f2c6a85 Added support for marking nicks that are away in different colour when away_size_max = 0, but tracking enabled. 2013-05-09 23:04:46 +00:00
66853d9715 Add option to support away tracking regardless of channel size
As there is option to disable away tracking, it would make sense to treat channel size limit of 0 as infinity for away tracking purposes. These changes attempt to implement this.
2013-05-09 21:11:58 +00:00
cf59ad2c76 Now process_numeric() passes the right session context to text_emit() when an
numeric event occurs regarding a nick with a open dialog.

Since this session context is potentially passed to plugins this can change the
behavior of plugins, but I think this is the intended semantics
(http://docs.hexchat.org/en/latest/script_python.html#context-theory).

Another consequence is that event messages will be displayed in the query dialog
of the nick in question (if a query dialog is open, of course), which I think is
sensible. (The initial intention of this patch was actually to report the
"No such nick" message in the query dialog when sending a message to a user that
has quit.)
2013-05-09 20:32:05 +01:00
dba9c42473 stop using gconf 2013-05-08 23:41:52 -04:00
f8556360ca Merge pull request #580 from hasufell/master
Build failure: fix undefined reference to `g_type_init'
2013-05-08 20:33:40 -07:00
28fe051aa5 Fix server tab changing color when active 2013-05-08 23:56:03 -03:00
607e5a567c CONFIGURE: fix undefined reference to `g_type_init'
These two assignments have no place here and will overwrite the
previous COMMON_LIBS="$COMMON_LIBS -lgmodule-2.0 -lgobject-2.0".
This can lead to build failure during linking stage depending on
the chosen configure options.
2013-05-09 01:48:10 +02:00
df31e239a9 add pkgconfig file to gitignore 2013-05-08 19:22:04 -03:00
df7a15e910 Show hours for last seen in friends list
closes #579
2013-05-08 19:08:37 -03:00
860ef759f5 Have gui_input_icon depend on gui_input_nick in prefs 2013-05-07 23:28:59 -03:00
4ba79fd489 Clean up IRCNet 2013-05-06 00:53:07 -03:00
fb01d4e9ab Replace g_strdup_printf with g_build_filename where possible 2013-05-04 18:21:48 +02:00
b2317d8800 Typofix 2013-05-04 17:40:48 +02:00
3283c71936 Use system include syntax 2013-05-04 17:40:23 +02:00
22a0d5a3fb Add Python major version to plugin description 2013-05-04 17:39:24 +02:00
46443cbd1c python: fully delete failed plugins 2013-05-04 02:02:10 -03:00
efd21ce982 fix possible crash 2013-05-04 00:00:48 -03:00
c4e96dd481 Fix output name 2013-05-04 02:57:03 +02:00
65e384523a Make copy depend on python3 as well 2013-05-04 02:41:53 +02:00
80aee2af6c Fix VS edition 2013-05-04 02:35:38 +02:00
1f525a6f4b Merge branch 'py3k' of git://github.com/TingPing/hexchat 2013-05-03 20:32:23 -04:00
ffa1ea7358 Add python3 plugin 2013-05-03 20:26:58 -04:00
ce7eb02601 Consistency 2013-05-04 03:24:30 +03:00
ce80e571f2 comma 2013-05-03 17:14:31 -03:00
11044c6264 update gamesurge's default nickserv type 2013-05-03 17:13:35 -03:00
7243f5bc2c Merge pull request #565 from bviktor/nickservtype
Make NickServ registration configurable per-network
2013-05-03 09:19:01 -07:00
863ff811e6 Don't make assumptions about the function being called 2013-05-03 18:12:36 +02:00
414ab39db5 Add Italian GenericName 2013-05-03 13:08:03 -03:00
ba78c0527f Fix QuakeNet registration 2013-05-03 18:00:30 +02:00
fb696b7a68 Provide default NickServ types where necessary 2013-05-03 17:23:36 +02:00
295da18414 Merge pull request #571 from amalmurali/master
Update textevents.in
2013-05-03 07:26:42 -07:00
8272df5ec2 Fix desktop translations
closes #567
2013-05-03 11:24:12 -03:00
99fed089cf Line breaks and typofix 2013-05-03 15:54:18 +02:00
e3fd501057 Do save_config() on Channel List window min, max changes
#570
2013-05-01 12:47:53 -07:00
7403dfa9aa Do save_config() on Search-window checkbox change
#570
2013-05-01 12:25:29 -07:00
b08d9cfb56 Fix warning about g_type_init() in dbus/example.c 2013-05-01 12:12:05 -07:00
1969db5f94 Save nicks when closing network list
#570
2013-05-01 10:36:16 -03:00
866299b508 Update textevents.in
Corrected text events for Channel Invite and Channel Remove Invite
2013-05-01 13:53:10 +05:30
c4384265e4 remove incorrect notice help info 2013-04-30 21:27:41 -03:00
b4c885861d Remove away announce 2013-04-28 17:19:26 -04:00
d9be5e098f Remove useless slash 2013-04-28 21:32:47 +02:00
0a54efdd0c Make NickServ registration configurable per-network
Fixes #394
2013-04-28 21:24:53 +02:00
708c5a7347 Make /msg nickserv the default registration type
Fixes #394 and hopefully doesn't break others
2013-04-28 17:03:41 +02:00
50373f4ff9 Get rid of some hardcoded network recognition 2013-04-28 17:01:37 +02:00
2df866bdf8 Don't autoload WMPA, it's dead in the water 2013-04-28 16:50:19 +02:00
5b8567919d Install a pkgconfig .pc file. This allows external plugins to find
where the header file is located, where Hexchat expects to find
plugins so it can load them at startup and which version of
Hexchat is installed. The path where pkgconfig files are stored
is determined by a macro available in newer versions of pkgconfig
which can be overridden by the --with-pkgconfig= configure switch.
However, if this macro is unavailable (older versions of
pkgconfig) then m4ifdef will make it fallback to simply use
${libdir}/pkgconfig (which is the default).

	modified:   configure.ac
	modified:   share/Makefile.am
	new file:   share/pkgconfig/Makefile.am
	new file:   share/pkgconfig/hexchat-plugin.pc.in
2013-04-28 16:48:32 +02:00
77cad8e716 Don't hardcode "plugins" as the subdirectory for plugins in many
places.

	modified:   config-win32.h
	modified:   configure.ac
	modified:   plugins/checksum/Makefile.am
	modified:   plugins/doat/Makefile.am
	modified:   plugins/fishlim/Makefile.am
	modified:   plugins/perl/Makefile.am
	modified:   plugins/python/Makefile.am
	modified:   plugins/sysinfo/Makefile.am
	modified:   plugins/xdcc/Makefile.am
	modified:   src/common/plugin.c
	modified:   src/fe-text/fe-text.c
2013-04-28 16:42:48 +02:00
700d699f5b Cosmetics 2013-04-28 15:30:08 +03:00
87413e9d3c Add hints about the beep file 2013-04-28 05:31:45 +02:00
dbe6deab45 Rename Sound to Sounds and reorder Chatting pages 2013-04-28 04:57:01 +02:00
b2ae3b9dd1 Update gtkrc 2013-04-28 05:47:20 +03:00
92dca50dfc Eliminate compiler warning
free() requires stdlib.h
2013-04-28 04:19:31 +02:00
a3ba8d575e Store just the filename if the sound file comes from the default sound dir
And get rid of some hardcoding while we're at it
2013-04-28 04:12:00 +02:00
ea48d18130 Fix spacing 2013-04-28 03:06:02 +02:00
4547719358 Update .travis.yml 2013-04-27 21:29:33 -03:00
bb878848f7 Use regular canberra not gtk 2013-04-27 20:28:39 -04:00
5bb284267b Remove dead code for sound_command 2013-04-28 01:57:00 +02:00
7e3c8c461e Escape all the things 2013-04-27 20:38:39 -03:00
24034b5b8b More cleanup 2013-04-27 20:35:04 -03:00
78f9f3f87c clean up canberra code 2013-04-27 20:29:28 -03:00
bc1169e979 Use canberra for files 2013-04-27 20:02:27 -03:00
012105e115 Let's just say the word 2013-04-28 00:56:24 +02:00
5c5eb1df14 udpate travis build w/ canberra 2013-04-27 19:19:26 -03:00
e714c7d53f Remove extra omitalerts check 2013-04-27 19:16:34 -03:00
78e39bfb1c use libcanberra for beeps 2013-04-27 18:05:05 -04:00
7323f7c561 Fix unused variable 2013-04-27 23:28:24 +02:00
c6513ea7a2 Use "Instant Message Notification" system sound on Windows, use gdk_beep() on Unix
Note: gdk_beep() is expected to be replaced with libcanberra stuff.
2013-04-27 23:26:26 +02:00
6001ceff9f Get rid of bundled beep 2013-04-27 23:00:18 +02:00
8e3db00dac Don't include if unused 2013-04-27 21:38:13 +02:00
d20dccbe02 Some crucial cosmetics 2013-04-27 21:35:19 +02:00
e834783cb8 Fix compiler warning 2013-04-27 21:31:54 +02:00
01f24aae07 Don't use external players on Windows 2013-04-27 21:07:34 +02:00
584dc6a626 typo 2013-04-27 15:52:18 -03:00
756080831d fix url opening on osx
oops
2013-04-27 15:47:40 -03:00
ffce6c5788 Clean up old url handling on unix 2013-04-27 15:30:40 -03:00
565a492724 Reverts commit d964af8142 2013-04-27 06:32:30 -04:00
6982bbfef9 fix false positives when checking chanopts 2013-04-26 09:37:14 -03:00
07bc467d03 win32: Moved PlatformToolset configuration to individual project files. It should be set before setting other properties or importing other props.
This fixes the broken GUI Platform Toolset indicator, as well as VS compilation itself if another version such as 2010 was also installed.
2013-04-25 21:03:03 -07:00
a39f8ea71f Do not allow blank realname in preferences 2013-04-25 04:51:19 -03:00
4ad9a69aeb Early on, call g_type_init() unless deprecated 2013-04-24 14:33:05 -07:00
ee200b97aa Fix left-click of URL/HOST by tidying what we pass to fe_open_url() 2013-04-24 13:18:34 -07:00
fc659a67f0 Merge pull request #561 from RichardHitt/no-depr-decl
Add '#define GLIB_DISABLE_DEPRECATION_WARNINGS' to fix fkeys.c warnings
2013-04-24 12:27:53 -07:00
de0b0b9467 Merge pull request #560 from RichardHitt/warning-fix
Add '(void)'  to fix perl.c unused-value warning message
2013-04-23 18:33:49 -07:00
eef74ed263 Add '#define GLIB_DISABLE_DEPRECATION_WARNINGS' to fix fkeys.c warnings 2013-04-23 12:46:32 -07:00
facf0ab9c4 Add '(void)' to fix perl.c unused-value warning message 2013-04-23 12:09:05 -07:00
5318c953ed reduce abuse of ternary operator
The ?: operator should not be used as a generic shorthand for if/else.
(Which isn't needed here either...)
2013-04-23 01:09:58 -04:00
2550a94f05 fix omitting custom sounds 2013-04-23 00:45:37 -04:00
bd73c80152 Clean up balloon formatting 2013-04-22 20:13:34 -03:00
43cbe83d61 fix warning in new glib 2013-04-22 18:04:26 -03:00
075c5dfad6 Merge pull request #556 from RichardHitt/ignore-unused
Fix Ubuntu build warnings by using gcc flag -Wno-unused-result
2013-04-22 13:54:45 -07:00
ba1dfabf11 Fix Ubuntu build warnings by using gcc flag -Wno-unused-result 2013-04-22 11:22:04 -07:00
9603248a5b Fall back to global username for sasl 2013-04-22 07:30:33 -03:00
4e891102f2 Merge pull request #550 from RichardHitt/issue440a
In do_an_re() put WORD_CHANNEL before WORD_HOST.  fixes #440
2013-04-20 17:05:18 -07:00
bc1c84347d fix install error 2013-04-20 18:37:30 -03:00
2db01371b3 Build with travis 2013-04-19 15:55:14 -04:00
e17a9c6503 In do_an_re() put WORD_CHANNEL before WORD_HOST. fixes #440 2013-04-19 12:41:49 -07:00
3994126a09 Add english generic name 2013-04-18 01:21:12 -03:00
70174be823 Fix a typo.
modified:   share/misc/hexchat.desktop
2013-04-18 00:14:40 -04:00
9254f9284c Add GTK and IRCClient to Categories. This is Based on:
http://standards.freedesktop.org/menu-spec/latest

	modified:   share/misc/hexchat.desktop
2013-04-18 00:11:17 -04:00
c819adf830 Translate Comment in french, german, italian and norwegian bokmål
modified:   share/misc/hexchat.desktop
2013-04-18 00:10:54 -04:00
13c717159d Change "no" to "nb" for Norsk Bokmål. In norway there is not only
one official language but two.

	modified:   share/misc/hexchat.desktop
2013-04-18 00:10:14 -04:00
4c90a9b2d5 Change most Comment lines to be GenericName. GenericName should be
used when only one IRC client in installed.

	modified:   share/misc/hexchat.desktop
2013-04-18 00:09:52 -04:00
a14bd119b7 typo 2013-04-17 22:45:08 -03:00
f9cf25f797 Use more useful example for url handler 2013-04-17 22:39:50 -03:00
450b92f6c0 add paplay 2013-04-17 06:13:34 -03:00
9790151ec0 beep sound is gtk only 2013-04-17 06:02:17 -03:00
3fbea449b5 g_file requires gio 2013-04-17 05:45:51 -03:00
02cdc57eb5 Install sound file on unix
for #542
2013-04-17 03:45:41 -04:00
d7571ce1e3 Update installers as well 2013-04-16 11:35:22 +02:00
ccc8601624 Move beep to proper place 2013-04-16 11:32:58 +02:00
7e2ae20ecf only 1 2013-04-15 22:10:25 -03:00
b856065167 fix warning 2013-04-15 22:03:03 -03:00
f3efdaf40f finish removing sound_dir 2013-04-15 18:16:51 -03:00
86564c8741 Merge pull request #545 from RichardHitt/issue522
Fix broken logic in mg_word_clicked().  fixes #522
2013-04-15 13:54:00 -07:00
a5eb7784c6 Fix broken logic in mg_word_clicked(). fixes #522 2013-04-15 12:05:53 -07:00
f0d0f90e13 no error on beeps 2013-04-15 00:12:06 -03:00
27d828172d try play first. 2013-04-14 17:54:28 -03:00
a7ffdf3d65 Remove one warning bypass 2013-04-14 13:19:49 +02:00
dd624950c6 Eliminate compiler warning 2013-04-14 13:15:10 +02:00
b407bfa168 Fix missing first letter in busy server error popup 2013-04-14 13:11:35 +02:00
069a6adb19 If no path given, try to load plugins from config dir, not from install dir 2013-04-14 12:55:02 +02:00
9dd2c85df4 Load connect commands from config dir 2013-04-14 12:31:27 +02:00
b7f0f6abc8 Fix tabulation 2013-04-14 12:11:38 +02:00
ea0479998a Use bundled beep file for beep alerts 2013-04-14 11:56:50 +02:00
9272eb4325 G_FILE_COPY_TARGET_DEFAULT_PERMS requires GLib 2.20+ 2013-04-14 11:00:01 +02:00
4e601cf14c Browse into the sounds folder by default 2013-04-14 10:52:34 +02:00
db582a4e5c Remove sound_dir, it's pointless 2013-04-14 10:47:37 +02:00
059e4ec9c8 Add default beep sound, deploy on Windows
FIXME on Unix yet
2013-04-14 10:30:51 +02:00
a96be226b2 Really relocate 2013-04-14 10:15:52 +02:00
bed00e525d Relocate plugin icons 2013-04-14 10:14:17 +02:00
096e837ece Add accounts to users in get_list 2013-04-14 00:33:03 -03:00
e67371d269 Add option for omitting alerts while focused 2013-04-13 23:03:54 -04:00
a996549577 Rewrite desensitizing options in preferences 2013-04-13 20:54:42 -04:00
9917b7e3df hook reload command 2013-04-13 02:02:57 -03:00
541f221a61 fix crash after reloading script 2013-04-13 02:01:04 -03:00
44a2ed5a97 Fix possible crash
Thanks to - http://forum.xchat.org/viewtopic.php?f=5&t=7558
2013-04-12 23:08:02 -03:00
ba3f4daee8 Rebrand object types 2013-04-12 22:58:29 -03:00
2d3d4db16b Nuke last Tcl and SASL remnants 2013-04-13 04:27:10 +03:00
0c351c9cbc Nuke WMPA, not supported by Express 2013-04-13 02:38:44 +02:00
cc1f2b2d27 Fix last filename
Left here to make changes trackable
2013-04-13 02:27:02 +02:00
6ee3a4a978 Get rid of multiple Perl versions 2013-04-13 02:27:01 +02:00
5326f76a40 Fix tray not respecting away_omit_alerts 2013-04-12 19:59:46 -03:00
7f86fbad1e We ship bundles, this is unnecessary too 2013-04-12 18:05:54 +02:00
30fa189cbb We don't release git head anymore, github does that for us 2013-04-12 18:05:28 +02:00
2fdb2a8b6f Revert "win32: Fixed YourDepsPath."
This reverts commit b07e5fafaf.
2013-04-12 18:04:22 +02:00
b07e5fafaf win32: Fixed YourDepsPath. 2013-04-11 21:59:58 -07:00
ba1a1ab28d Don't call it package, it causes line break 2013-04-11 17:44:33 +02:00
a9643234ae It's official: VS2012.2 needs VS2012.1 redist 2013-04-11 14:03:27 +02:00
7870c8028f warning 2013-04-10 15:41:29 -03:00
6510e8961e Delete left over themes 2013-04-10 14:39:43 -03:00
6e8b7367d7 comma 2013-04-10 13:43:22 -03:00
feb5b41642 Readd irc charset to the list 2013-04-10 13:27:53 -03:00
36694afe0e Don't send ping's to the server if we are still waiting for a pong.
If the server don't respond in 30s just report the lag as +30s.

This fixes the bug where hexchat reset the lag meter every time a ping
was sent and no pong was received.
2013-04-09 19:14:46 -07:00
a99111172d Merge pull request #527 from grawity/cap-req-sasl
Request 'sasl' even if it's the only recognized cap
2013-04-09 17:50:26 -07:00
780c3d29c7 Request 'sasl' even if it's the only recognized cap 2013-04-10 02:43:09 +03:00
1a7831df2a Fix spelling checkbox with libsexy 2013-04-09 12:28:44 -03:00
924178cde7 cosmetics 2013-04-09 03:08:26 +02:00
77fa72924b readme cleanup 2013-04-09 03:06:07 +02:00
b90633d406 Fix deps path 2013-04-08 22:39:35 +02:00
cd64e02096 Use EAT_HEXCHAT on hexchat module 2013-04-08 17:23:07 -03:00
ad820cef8a Give both modules the version too. 2013-04-08 17:16:32 -03:00
68de2bcb00 Add constants to both modules 2013-04-08 17:09:36 -03:00
68b6be11d6 Add hexchat module to python interface 2013-04-08 17:07:13 -03:00
d13ae114a2 Handle numeric 900 2013-04-08 16:52:14 -03:00
3a6103564e Merge pull request #516 from Misdre/optout-extra-alerts
Closes #290 - opt-out for extra alerts now working
2013-04-08 10:35:53 -07:00
0424e5a329 Closes #290 - opt-out for extra alerts now working 2013-04-08 19:19:55 +02:00
561ad635cd Merge pull request #515 from Misdre/optin-optout-scrollback
fix issue #491 - opt-in/opt-out of scrollback per channel
2013-04-08 08:04:48 -07:00
2427c095e5 fix issue #491 - opt-in/opt-out of scrollback per channel 2013-04-08 15:07:58 +02:00
ed27009285 Notify away status of friends 2013-04-07 20:41:29 -04:00
92654bdd9b Make copy depend on perl-5.18, not perl-5.16 2013-04-08 02:31:47 +02:00
fdf7ec22f5 I might regret this, but let's do the brave jump 2013-04-08 01:12:19 +02:00
3c4a154f0a Add events for quiet 2013-04-07 17:49:30 -04:00
c766b24920 Merge pull request #508 from Misdre/split-long-action-notice
Long ctcp action/notice split
2013-04-07 12:40:29 -07:00
af652a6639 Merge pull request #510 from RichardHitt/allownick
Allow nick starting with digit despite rfc 2812 violation
2013-04-06 15:53:21 -07:00
812628acb2 Update textevents.in 2013-04-06 17:30:19 -03:00
6b86940b7b Allow nick starting with digit despite rfc 2812 violation 2013-04-06 11:51:22 -07:00
08d948435d split cmd_msg too 2013-04-06 01:11:28 +02:00
5004f69b5e 'splitted' is'nt a word 2013-04-06 00:11:45 +02:00
bc5d16c4fb split long message on action and notice 2013-04-05 23:14:51 +02:00
c2a5b4fb7d Disable esc keybinding on tabbed utils 2013-04-05 17:33:35 -03:00
cca8ab4640 Fix esc closing detached util tabs 2013-04-05 16:56:57 -03:00
d964af8142 Fix root user warning running before g_type_init
closes #504
2013-04-05 10:12:33 -04:00
7746ff9a12 Fix manpage EOL 2013-04-05 06:38:12 +02:00
c4cf67bee4 Merge pull request #501 from gusnan/master
Minor spelling fix
2013-04-04 08:20:29 -07:00
a1daf03538 Fix spelling seperate/separate 2013-04-04 17:11:05 +02:00
2be0530c34 get account from whois 2013-04-04 10:29:15 -03:00
b0d1c884e0 regular who doesn't send account 2013-04-04 05:07:42 -04:00
e0a7f0ae59 Fixed compiler error. 2013-04-04 01:56:40 -07:00
5779691efb Update hiding menu text 2013-04-03 20:35:42 -03:00
496ed18e85 Add MONITOR support 2013-04-03 18:51:54 -04:00
86cf7de430 add %u to userlist popups for account 2013-04-03 18:10:14 -04:00
477d7470c1 renable irc_who_join by default 2013-04-03 18:35:40 -03:00
3706b51159 Fix realname 2013-04-03 18:28:00 -03:00
b4c8d53394 Support account-notify and extended-join capabilities 2013-04-03 17:10:09 -04:00
4c217d4ba3 Merge pull request #448 from TingPing/awaynotify2
Add away-notify support
2013-04-03 12:12:26 -07:00
23b2081385 update man page
Close #498
2013-04-03 15:11:43 -03:00
0534b54e51 Remove strlutil 2013-04-03 16:48:03 +02:00
faf4575e9a Enable cast checks 2013-04-02 23:58:43 -07:00
52efe3abff Add missing declaration 2013-04-02 23:57:43 -07:00
59510cf8a1 Move Perl from hexchat to gtk-win32 2013-04-03 08:05:26 +02:00
905705910b Remove hardcoded clear keybinding
You can re-add this easily in settings > keyboard shortcuts
2013-04-03 02:50:57 -03:00
bb78d8dd59 Add new window keybinding 2013-04-03 02:41:59 -03:00
8b72d53dcc Merge pull request #496 from bviktor/toplevel-includes
Only include top level includes from GTK+, GLib and GDK-PixBuf Closes #486
2013-04-02 22:39:17 -07:00
ef4aa16730 Apply to fe-text too 2013-04-02 22:37:24 -07:00
14b089ef90 Set up CFLAGS on Unix too 2013-04-02 22:35:42 -07:00
b5fef8d0e2 gtk_show_uri() requires GTK+ 2.14 2013-04-03 06:49:57 +02:00
561f3044d6 update --url help string 2013-04-03 01:36:52 -03:00
9c49254abd Only include top level includes from GTK+, GLib and GDK-PixBuf 2013-04-02 20:39:37 -07:00
5e59578e28 Remove most of HexTray and one instance
You can still build HexTray manually if you want to try fixing it
2013-04-02 11:56:08 -07:00
7317535c28 Fix textfe with dbus disabled 2013-04-02 09:06:47 -03:00
920839cf1c fix strptime on bsd 2013-04-02 08:06:38 -03:00
d8eec06473 Missing include
#492
2013-04-02 07:50:08 -03:00
4748405277 This is useless too 2013-04-01 21:28:54 -07:00
13d574b455 Revert XP version check; as it turned out, it's completely irrelevant now
This reverts commit cd2f775fe4.
2013-04-01 21:15:46 -07:00
2b13d0f527 Apparently XP won't work anymore, Uniscribe problem with the redistributable 2013-04-01 20:51:40 -07:00
e054a6512f We all knew I'll forget something, right? 2013-04-01 18:33:12 -07:00
eb5313f850 Clean up away-notify patch 2013-03-12 23:54:55 -04:00
bf0fb9f327 Add away-notify support 2013-03-12 02:21:18 -04:00
312 changed files with 104114 additions and 107816 deletions

8
.gitignore vendored
View File

@ -20,6 +20,8 @@ config.sub
configure
configure.tmp
depcomp
doxygen*.tmp
html/
install-sh
intl/
libtool
@ -32,6 +34,7 @@ po/Makefile.in.in
po/POTFILES
po/remove-potcdate.sed
po/stamp-po
share/pkgconfig/hexchat-plugin.pc
src/common/dbus/example
src/common/dbus/marshallers.h
src/common/dbus/org.hexchat.service.service
@ -41,7 +44,11 @@ src/common/textenums.h
src/common/textevents.h
src/fe-gtk/hexchat
src/fe-text/hexchat-text
src/htm/Main.resources
src/htm/thememan.exe
src/htm/thememan.exe.config
src/htm/thememan.exe.mdb
src/htm/thememan
stamp-h1
*.a
*.o
@ -50,6 +57,7 @@ stamp-h1
*.gmo
*.mo
*.po~
*.patch
# Win32 generated files
plugins/wmpa/wmpa_h.h
plugins/wmpa/wmpa_i.c

14
.travis.yml Normal file
View File

@ -0,0 +1,14 @@
language: c
compiler: gcc
before_script:
- sudo apt-get build-dep -qq xchat
- sudo apt-get install -qq libnotify-dev libproxy-dev libpci-dev libcanberra-dev monodevelop
script:
- ./autogen.sh
- ./configure --enable-textfe --with-theme-manager
- make
notifications:
irc:
channels: "chat.freenode.net#hexchat-devel"
template: "Build #%{build_number} (%{commit}) by %{author}: %{message}"
on_success: change

View File

@ -1,9 +1,8 @@
[main]
host = https://www.transifex.com
[hexchat.main]
file_filter = po\<lang>.po
source_file = po\hexchat.pot
source_lang = en
type = PO
[main]
host = https://www.transifex.com
[hexchat.main]
file_filter = po/<lang>.po
source_file = po/hexchat.pot
source_lang = en
type = PO

1904
Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,7 @@
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = po intl src plugins man share
EXTRA_DIST = autogen.sh

View File

@ -78,7 +78,7 @@ if test "$?" != "0"; then
exit 2
fi
echo running libtoolize...
libtoolize --force
libtoolize --copy --force --install
if test "$?" != "0"; then
echo libtoolize failed, stopping.
exit 3
@ -90,7 +90,7 @@ if test "$?" != "0"; then
exit 4
fi
echo running $AUTOMAKE...
$AUTOMAKE -a
$AUTOMAKE -a -c
if test "$?" != "0"; then
echo automake failed, stopping.
exit 5

View File

@ -7,12 +7,12 @@
#define USE_IPV6
#define HAVE_ISO_CODES
#define PACKAGE_NAME "hexchat"
#define PACKAGE_VERSION "2.9.5"
#define HEXCHATLIBDIR "."
#define PACKAGE_VERSION "2.9.6"
#define HEXCHATLIBDIR ".\\plugins"
#define HEXCHATSHAREDIR "."
#define OLD_PERL
#define GETTEXT_PACKAGE "hexchat"
#define PACKAGE_TARNAME "hexchat-2.9.5"
#define PACKAGE_TARNAME "hexchat-2.9.6"
#ifndef USE_IPV6
#define socklen_t int
#endif

View File

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT([HexChat],[2.9.5])
AC_INIT([HexChat],[2.9.6])
AC_PREREQ([2.60])
AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
@ -8,8 +8,9 @@ AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([configure.ac])
AM_INIT_AUTOMAKE([1.11 dist-bzip2 subdir-objects no-define foreign])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 dist-bzip2 subdir-objects no-define foreign])
AM_SILENT_RULES([yes])
AC_USE_SYSTEM_EXTENSIONS
@ -20,6 +21,7 @@ AC_PROG_CPP
AM_PROG_AS
AM_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PATH_PROG(MDTOOL, mdtool, no)
dnl -----------------------------------------------------------
dnl Language Support
@ -45,6 +47,7 @@ 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_LIBCANBERRA],[#undef USE_LIBCANBERRA])
AH_VERBATIM([USE_IPV6],[#undef USE_IPV6])
AH_VERBATIM([USE_MMX],[#undef USE_MMX])
AH_VERBATIM([USE_OPENSSL],[#undef USE_OPENSSL])
@ -114,21 +117,18 @@ AC_ARG_ENABLE(xlib,
xlib=$enableval, xlib=yes)
AC_ARG_ENABLE(python,
[AS_HELP_STRING([--enable-python=pythonversion],[build the python plugin (default on, python2)])],
[AS_HELP_STRING([--enable-python=pythonversion],[build the python plugin; possible values: "python2", "python3" or specific such as "python3.3" (default on, python2)])],
python=$enableval, python=python2)
AS_IF([test "x$python" = "xyes"], [python=python2])
AC_ARG_ENABLE(perl,
[AS_HELP_STRING([--disable-perl],[don't build the perl plugin])],
[AS_HELP_STRING([--disable-perl],[don\'t build the perl plugin])],
perl=$enableval, perl=yes)
AC_ARG_ENABLE(perl_old,
[AS_HELP_STRING([--disable-perl_old],[no backwards compatibility for perl plugin])],
perl_old=$enableval, perl_old=yes)
dnl AC_ARG_ENABLE(tcl,
dnl [AS_HELP_STRING([--enable-tcl[=PATH]],[directory with Tcl config file: tclConfig.sh])],
dnl tcl=$enableval, tcl=yes)
AC_ARG_ENABLE(plugin,
[AS_HELP_STRING([--disable-plugin],[disable plugin support])],
plugin=$enableval, plugin=yes)
@ -145,10 +145,6 @@ AC_ARG_ENABLE(fishlim,
[AS_HELP_STRING([--disable-fishlim],[disable the FiSHLiM plugin])],
fishlim=$enableval, fishlim=yes)
dnl AC_ARG_ENABLE(sasl,
dnl [AS_HELP_STRING([--disable-sasl],[disable the SASL plugin])],
dnl sasl=$enableval, sasl=yes)
AC_ARG_ENABLE(sysinfo,
[AS_HELP_STRING([--disable-sysinfo],[disable the SysInfo plugin])],
sysinfo=$enableval, sysinfo=yes)
@ -161,6 +157,11 @@ AC_ARG_ENABLE(libnotify,
[AS_HELP_STRING([--disable-libnotify],[disable libnotify support])],
libnotify=$enableval, libnotify=yes)
AC_ARG_ENABLE(libcanberra,
[AS_HELP_STRING([--disable-libcanberra],[disable libcanberra support])],
libcanberra=$enableval, libcanberra=yes)
AC_ARG_ENABLE(mmx,
[AS_HELP_STRING([--disable-mmx],[disable MMX assembly routines])],
mmx=$enableval, mmx=yes)
@ -171,29 +172,49 @@ AC_ARG_ENABLE(shm,
AC_ARG_ENABLE(spell,
[AS_HELP_STRING([--enable-spell=type],[enable spelling type: none static libsexy gtkspell])],
spell=$enableval, spell=static)
spell=$enableval, spell=libsexy)
AC_ARG_ENABLE(ntlm,
[AS_HELP_STRING([--enable-ntlm],[enable Microsoft's NTLM auth (libntlm) library support (default: no)])],
[AS_HELP_STRING([--enable-ntlm],[enable Microsoft\'s NTLM auth (libntlm) library support (default: no)])],
ntlm=$enableval, ntlm=no)
AC_ARG_ENABLE(libproxy,
[AS_HELP_STRING([--disable-libproxy],[disable libproxy support (default: auto)])],
libproxy=$enableval, libproxy=auto)
AC_ARG_ENABLE(minimal-flags,
[AS_HELP_STRING([--enable-minimal-flags],[only add those CFLAGS that are really needed or not intrusive (default: no)])],
minimalflags=$enableval, minimalflags=no)
AC_ARG_WITH(theme-manager,
[AS_HELP_STRING([--with-theme-manager],[compile theme manager (needs monodevelop, default: off)])],
theme_manager=$withval, theme_manager=no)
dnl *********************************************************************
dnl ** THEME-MANAGER ****************************************************
dnl *********************************************************************
if test "x$theme_manager" != "xno" ; then
if test "x$MDTOOL" = "xno"; then
AC_MSG_ERROR([No "mdtool" found, you need to install monodevelop!])
fi
fi
dnl *********************************************************************
dnl ** GLIB *************************************************************
dnl *********************************************************************
AM_PATH_GLIB_2_0(2.14.0, glib=yes, glib=no)
AM_PATH_GLIB_2_0(2.28.0, glib=yes, glib=no)
if test "$glib" = no; then
AC_MSG_ERROR(Cannot find GLib!)
fi
COMMON_CFLAGS="$GLIB_CFLAGS"
COMMON_LIBS="$GLIB_LIBS"
COMMON_LIBS="$COMMON_LIBS -lgmodule-2.0"
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0], [], [AC_MSG_ERROR(Cannot find gobject-2.0!)])
COMMON_CFLAGS="$GLIB_CFLAGS $GOBJECT_CFLAGS -DG_DISABLE_SINGLE_INCLUDES"
COMMON_LIBS="$GLIB_LIBS $GOBJECT_LIBS -lgmodule-2.0"
dnl *********************************************************************
dnl ** GTK **************************************************************
@ -201,7 +222,7 @@ dnl *********************************************************************
# we might get undefined macro without this test
if test "$gtkfe" = yes ; then
AM_PATH_GTK_2_0(2.10.0, havegtk=yes, havegtk=no)
AM_PATH_GTK_2_0(2.24.0, havegtk=yes, havegtk=no)
if test "$havegtk" = no; then
gtkfe=no
@ -213,8 +234,6 @@ fi
if test "$gtkfe" != yes; then
gnome=no
COMMON_LIBS="$GLIB_LIBS"
COMMON_CFLAGS="$GLIB_CFLAGS"
fi
dnl *********************************************************************
@ -222,18 +241,17 @@ dnl ** GNOME ************************************************************
dnl *********************************************************************
GUI_LIBS="$GUI_LIBS $GTK_LIBS"
GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS"
GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
#if test "$gnome" = yes; then
# AC_PATH_PROG(pkgconfigpath, pkg-config)
# AC_MSG_CHECKING(Gnome2 compile flags)
# GNOME_CFLAGS="`$pkgconfigpath libgnome-2.0 --cflags 2>/dev/null`"
# GNOME_CFLAGS="`$PKG_CONFIG libgnome-2.0 --cflags 2>/dev/null`"
# if test "_$GNOME_CFLAGS" = _ ; then
# gnome=no
# AC_MSG_RESULT([Gnome not found, building without it.])
# else
# GNOME_VER="`$pkgconfigpath libgnome-2.0 --modversion`"
# GUI_LIBS="$GUI_LIBS `$pkgconfigpath libgnome-2.0 --libs`"
# GNOME_VER="`$PKG_CONFIG libgnome-2.0 --modversion`"
# GUI_LIBS="$GUI_LIBS `$PKG_CONFIG libgnome-2.0 --libs`"
# GUI_CFLAGS="$GUI_CFLAGS $GNOME_CFLAGS"
# AC_DEFINE(USE_GNOME)
# AC_MSG_RESULT(ok)
@ -241,21 +259,20 @@ GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS"
#fi
# GConf
if test "$gnome" != no ; then
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
else
GCONFTOOL=no
fi
#if test "$gnome" != no ; then
# AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
#else
# GCONFTOOL=no
#fi
dnl *********************************************************************
dnl ** XFT **************************************************************
dnl *********************************************************************
if test "$xft" = yes; then
AC_PATH_PROG(pkgconfigpath, pkg-config)
if $pkgconfigpath xft --exists; then
GUI_CFLAGS="$GUI_CFLAGS `$pkgconfigpath xft --cflags`"
GUI_LIBS="$GUI_LIBS `$pkgconfigpath xft --libs`"
if $PKG_CONFIG xft --exists; then
GUI_CFLAGS="$GUI_CFLAGS `$PKG_CONFIG xft --cflags`"
GUI_LIBS="$GUI_LIBS `$PKG_CONFIG xft --libs`"
else
xft=no
oldCPPFLAGS=$CPPFLAGS
@ -335,70 +352,29 @@ dnl ** PYTHON ***********************************************************
dnl *********************************************************************
if test "x$python" != xno ; then
if test "$python" = yes ; then
# default
python="python2"
fi
AC_PATH_PROG(pythonpath, $python)
if test "_$pythonpath" = _ ; then
AC_PATH_PROG(pythonpath, python)
fi
if test "_$pythonpath" = _ ; then
python=no
else
AC_MSG_CHECKING(Python version)
changequote(<<, >>)dnl
PY_VER=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("VERSION")[0]);'`
PY_LIB=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(standard_lib=1));'`
PY_INC=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());'`
PYPLAT_INC=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc(plat_specific=True));'`
changequote([, ])dnl
AC_MSG_RESULT($PY_VER)
$pythonpath -c "import sys; float(sys.version[[:3]]) >= 2.2 and int(sys.version[[0]]) < 3 or sys.exit(1)"
if test "$?" != "1"; then
AC_MSG_CHECKING(Python compile flags)
PY_PREFIX=`$pythonpath -c 'import sys; print(sys.prefix)'`
PY_EXEC_PREFIX=`$pythonpath -c 'import sys; print(sys.exec_prefix)'`
if test -f $PY_INC/Python.h || test -f $PYPLAT_INC/Python.h; then
PY_LIBS="-L$PY_LIB/config -lpython$PY_VER -lpthread -lutil"
PY_CFLAGS="-I$PY_INC -I$PYPLAT_INC"
AC_MSG_RESULT(ok)
else
python=no
AC_MSG_RESULT([Can't find Python.h])
fi
else
echo "Python is too old or too new. Only 2.2-2.7 are supported."
python=no
fi
fi
case $python in
dnl set python2 default here
python2)
PKG_CHECK_MODULES([PY], [python-2.7], [], [AC_MSG_ERROR(Cannot find python-2.7!)])
PY_VER="`$PKG_CONFIG --modversion python-2.7`";;
dnl set python3 default here
python3)
PKG_CHECK_MODULES([PY], [python-3.3], [], [AC_MSG_ERROR(Cannot find python-3.3!)])
PY_VER="`$PKG_CONFIG --modversion python-3.3`";;
dnl add broken versions here
python2.5|python2.6|python3.1|python3.2)
AC_MSG_ERROR(Unsupported Python version ${python}!);;
python*)
python="python-${python#python}" # stay posix compliant
PKG_CHECK_MODULES([PY], [${python}], [], [AC_MSG_ERROR(Cannot find "${python}.pc"!)])
PY_VER="`$PKG_CONFIG --modversion ${python}`";;
*)
AC_MSG_ERROR(Unsupported Python ${python}!)
esac
AC_MSG_CHECKING(Python version)
AC_MSG_RESULT($PY_VER)
fi
dnl *********************************************************************
dnl ** TCL **************************************************************
dnl *********************************************************************
dnl AC_MSG_CHECKING(for location of tclConfig.sh)
dnl dirs="$tcl /lib /usr/lib /usr/tcl/lib /usr/lib/tcl8.4 /usr/local/lib /usr/local/tcl-8.4/lib /usr/local/tcl/lib /opt/lib /usr/lib/tcl8.3"
dnl found=0
dnl if test "$tcl" != "no"; then
dnl tcl=no
dnl for try in $dirs; do
dnl if test -f $try/tclConfig.sh; then
dnl found=1
dnl . $try/tclConfig.sh
dnl TCL_LIBS="$TCL_LIB_SPEC $TCL_LIBS"
dnl TCL_CFLAGS="-I${TCL_PREFIX}/include $TCL_INCLUDE_SPEC"
dnl tcl=yes
dnl AC_MSG_RESULT($try/tclConfig.sh)
dnl break
dnl fi
dnl done
dnl if test "$found" -eq 0 ; then
dnl AC_MSG_RESULT([tclConfig.sh not found - use the --enable-tcl option])
dnl fi
dnl fi
dnl *********************************************************************
dnl ** IPv6 *************************************************************
dnl *********************************************************************
@ -431,11 +407,10 @@ dnl *********************************************************************
retry=no
if test "$openssl" != no; then
AC_PATH_PROG(pkgconfigpath, pkg-config)
AC_MSG_CHECKING(for openssl through pkg-config)
if $pkgconfigpath openssl --exists; then
CPPFLAGS="$CPPFLAGS `$pkgconfigpath openssl --cflags`"
LIBS="$LIBS `$pkgconfigpath openssl --libs`"
if $PKG_CONFIG openssl --exists; then
CPPFLAGS="$CPPFLAGS `$PKG_CONFIG openssl --cflags`"
LIBS="$LIBS `$PKG_CONFIG openssl --libs`"
AC_DEFINE(USE_OPENSSL)
AC_MSG_RESULT(yes)
openssl=yes
@ -511,9 +486,8 @@ if test "$plugin" = yes; then
fi
if test "$have_dl" = yes; then
AC_DEFINE(USE_PLUGIN)
AC_PATH_PROG(pkgconfigpath, pkg-config)
dnl we just need the -Wl,--export-dynamic, but not -lgmodule-2.0
RDYNAMIC_FLAGS="`$pkgconfigpath gmodule-2.0 --libs | $sedpath 's/ -lgmodule-2.0//'`"
RDYNAMIC_FLAGS="`$PKG_CONFIG gmodule-2.0 --libs | $sedpath 's/ -lgmodule-2.0//'`"
LIBS="$LIBS $RDYNAMIC_FLAGS"
if test "$LD" = ""; then
VS="`ld --help | grep version-script 2> /dev/null`"
@ -585,21 +559,6 @@ if test "$fishlim" != "no"; then
fi
fi
dnl *********************************************************************
dnl ** SASL *************************************************************
dnl *********************************************************************
dnl if test "$sasl" != "no"; then
dnl AC_MSG_CHECKING(for plugin interface used by SASL)
dnl sasl=no
dnl if test "$plugin" = yes; then
dnl sasl=yes
dnl AC_MSG_RESULT([yes])
dnl else
dnl AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SASL])
dnl fi
dnl fi
dnl *********************************************************************
dnl ** SYSINFO **********************************************************
dnl *********************************************************************
@ -653,6 +612,21 @@ if test "x$libnotify" = "xyes" ; then
fi
fi
dnl *********************************************************************
dnl ** LIBCANBERRA ******************************************************
dnl *********************************************************************
if test "x$libcanberra" = "xyes" ; then
PKG_CHECK_MODULES(LIBCANBERRA, libcanberra >= 0.22, [], [
libcanberra=no
])
if test "$libcanberra" != "no" ; then
COMMON_LIBS="$COMMON_LIBS $LIBCANBERRA_LIBS"
COMMON_CFLAGS="$COMMON_CFLAGS $LIBCANBERRA_CFLAGS"
AC_DEFINE(USE_LIBCANBERRA)
fi
fi
dnl *********************************************************************
dnl ** SPELL ************************************************************
dnl *********************************************************************
@ -684,7 +658,7 @@ 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"
GUI_CFLAGS="$GUI_CFLAGS $LIBXML2_CFLAGS"
LIBS="$LIBS -lxml2"
], [
AC_MSG_ERROR(Cannot find libxml2!)
@ -698,19 +672,19 @@ dnl *********************************************************************
AM_CONDITIONAL(USE_OPENSSL, test "x$openssl" = "xyes")
AM_CONDITIONAL(USE_LIBSEXY, test "x$spell" = "xstatic")
AM_CONDITIONAL(USE_LIBNOTIFY, test "x$libnotify" = "xyes")
AM_CONDITIONAL(USE_LIBCANBERRA, test "x$libcanberra" = "xyes")
AM_CONDITIONAL(DO_TEXT, test "x$textfe" = "xyes")
AM_CONDITIONAL(DO_GTK, test "x$gtkfe" = "xyes")
AM_CONDITIONAL(DO_PERL, test "x$perl" = "xyes")
AM_CONDITIONAL(DO_PYTHON, test "x$python" != "xno")
dnl AM_CONDITIONAL(DO_TCL, test "x$tcl" = "xyes")
AM_CONDITIONAL(DO_PLUGIN, test "x$plugin" = "xyes")
AM_CONDITIONAL(DO_CHECKSUM, test "x$checksum" = "xyes")
AM_CONDITIONAL(DO_DOAT, test "x$doat" = "xyes")
AM_CONDITIONAL(DO_FISHLIM, test "x$fishlim" = "xyes")
dnl AM_CONDITIONAL(DO_SASL, test "x$sasl" = "xyes")
AM_CONDITIONAL(DO_SYSINFO, test "x$sysinfo" = "xyes")
AM_CONDITIONAL(USE_DBUS, test "x$dbus" = "xyes")
AM_CONDITIONAL(DO_GCONF, test "x$GCONFTOOL" != "xno")
#AM_CONDITIONAL(DO_GCONF, test "x$GCONFTOOL" != "xno")
AM_CONDITIONAL(WITH_TM, test "x$theme_manager" != "xno")
dnl *********************************************************************
dnl ** SOCKS5 ***********************************************************
@ -750,8 +724,8 @@ dnl *********************************************************************
if test "$shm" = yes; then
oldl=$LIBS
oldc=$CPPFLAGS
LIBS="$LIBS `$pkgconfigpath --libs-only-L xft`"
CPPFLAGS="$CPPFLAGS `$pkgconfigpath --cflags-only-I xft`"
LIBS="$LIBS `$PKG_CONFIG --libs-only-L xft`"
CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags-only-I xft`"
shm=no
AC_CHECK_LIB(Xext, XShmAttach, shm=yes)
if test "$shm" = yes; then
@ -765,7 +739,7 @@ if test "$shm" = yes; then
LIBS=$oldl
if test "$shm" = yes; then
GUI_LIBS="$GUI_LIBS `$pkgconfigpath --libs-only-L xft` -lX11 -lXext"
GUI_LIBS="$GUI_LIBS `$PKG_CONFIG --libs-only-L xft` -lX11 -lXext"
AC_DEFINE(USE_SHM)
else
CPPFLAGS=$oldc
@ -807,13 +781,16 @@ if test "x$GCC" = "xyes"; then
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -Wall"
fi
if test "$system" = "Linux" -o "$system" = "FreeBSD"; then
if test -z "`echo "$CFLAGS" | grep "\-pipe" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -pipe"
dnl these flags might be unwanted
if test x$minimalflags != xyes; then
if test "$system" = "Linux" -o "$system" = "FreeBSD"; then
if test -z "`echo "$CFLAGS" | grep "\-pipe" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -pipe"
fi
fi
if test -z "`echo "$CFLAGS" | grep "\-g " 2> /dev/null`" ; then
CFLAGS="$CFLAGS -g"
fi
fi
if test -z "`echo "$CFLAGS" | grep "\-g " 2> /dev/null`" ; then
CFLAGS="$CFLAGS -g"
fi
fi
@ -861,12 +838,34 @@ if test x$unsigned_char = xyes; then
CFLAGS="$CFLAGS -funsigned-char"
fi
dnl does this compiler support -Wno-unused-result ?
AC_MSG_CHECKING([if gcc accepts -Wno-unused-result ])
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-unused-result"
AC_TRY_COMPILE(, [
int main () { return 0 ; }
],
[
no_unused_result=yes
AC_MSG_RESULT([yes])
], [
no_unused_result=no
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
if test x$no_unused_result = xyes; then
CFLAGS="$CFLAGS -Wno-unused-result"
fi
dnl *********************************************************************
dnl ** FUNCTIONS/LIBS/CFLAGS ********************************************
dnl *********************************************************************
AC_MSG_CHECKING(for modern sigaction)
dnl libc5 on linux and FreeBSD 3.x doesn't have siginfo_t
dnl libc5 on linux and FreeBSD 3.x doesn\'t have siginfo_t
dnl and the sa_sigation field.
AC_TRY_COMPILE(
[#include <signal.h>],
@ -885,7 +884,7 @@ if test "$gtkfe" != no -a "_$gdkpixbufcsourcepath" = _; then
AC_MSG_ERROR(Cannot find gdk-pixbuf-csource: Install GTK+ 2.0!)
fi
dnl if we don't have this, use g_snprintf instead
dnl if we don\'t have this, use g_snprintf instead
AC_CHECK_FUNCS(snprintf vsnprintf memrchr strtoull)
AC_CHECK_FUNC(gethostbyname, ,
@ -933,11 +932,10 @@ AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_LDFLAGS)
AC_SUBST(PY_CFLAGS)
AC_SUBST(PY_LIBS)
dnl AC_SUBST(TCL_LIBS)
dnl AC_SUBST(TCL_CFLAGS)
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
PLUGIN_INCLUDES='-I$(top_srcdir)/plugins'
AC_SUBST(PLUGIN_INCLUDES)
@ -948,14 +946,14 @@ test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
AS_AC_EXPAND(HEXCHATLIBDIR, "${libdir}/hexchat")
AS_AC_EXPAND(HEXCHATLIBDIR, "${libdir}/hexchat/plugins")
AC_DEFINE_UNQUOTED(HEXCHATLIBDIR, "$HEXCHATLIBDIR")
AS_AC_EXPAND(HEXCHATSHAREDIR, "$datadir")
AC_DEFINE_UNQUOTED(HEXCHATSHAREDIR, "$HEXCHATSHAREDIR")
dnl for plugins/xxx/Makefile.am
hexchatlibdir=${libdir}/hexchat
hexchatlibdir=${libdir}/hexchat/plugins
AC_SUBST(hexchatlibdir)
AC_CONFIG_FILES([
@ -963,11 +961,15 @@ Makefile
share/Makefile
share/icons/Makefile
share/misc/Makefile
share/pkgconfig/Makefile
share/pkgconfig/hexchat-plugin.pc
src/Makefile
src/common/Makefile
src/common/dbus/Makefile
src/fe-text/Makefile
src/fe-gtk/Makefile
src/htm/Makefile
src/htm/thememan
src/pixmaps/Makefile
plugins/Makefile
plugins/python/Makefile
@ -980,8 +982,6 @@ intl/Makefile
po/Makefile.in
man/Makefile
])
dnl plugins/tcl/Makefile
dnl plugins/sasl/Makefile
AC_OUTPUT
@ -990,6 +990,7 @@ echo HexChat $VERSION
echo
echo GTK+ interface ........ : $gtkfe
echo Text interface ........ : $textfe
echo Theme manager ......... : $theme_manager
echo
echo MMX tinting ........... : $mmx
echo XShm tinting .......... : $shm
@ -1001,6 +1002,7 @@ fi
echo OpenSSL support ....... : $openssl
echo D-Bus support ......... : $dbus
echo libnotify support ..... : $libnotify
echo libcanberra support ... : $libcanberra
echo Spelling .............. : $spell
echo Plugin interface ...... : $plugin
echo NLS/gettext ........... : $USE_NLS
@ -1009,13 +1011,11 @@ echo MS Proxy NTLM \(ISA\) ... : $have_ntlm
echo libproxy support ...... : $libproxy
echo
echo Perl .................. : $perl
echo Python ................ : $python
dnl echo Tcl ................... : $tcl
echo Python ................ : python-$PY_VER
echo
echo Checksum .............. : $checksum
echo Do At ................. : $doat
echo FiSHLiM ............... : $fishlim
dnl echo SASL .................. : $sasl
echo SysInfo ............... : $sysinfo
echo
echo The binary will be installed in $prefix/bin

View File

@ -1,55 +1,55 @@
.TH HEXCHAT "1" "April 2013" "HexChat 2.9.5" "User Commands"
.SH NAME
HexChat \- manual page for HexChat 2.9.5
.SH DESCRIPTION
.SS "Usage:"
.IP
hexchat [OPTION...]
.SS "Help Options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Show help options
.TP
\fB\-\-help\-all\fR
Show all help options
.TP
\fB\-\-help\-gtk\fR
Show GTK+ Options
.SS "Application Options:"
.TP
\fB\-a\fR, \fB\-\-no\-auto\fR
Don't auto connect to servers
.TP
\fB\-d\fR, \fB\-\-cfgdir\fR=\fIPATH\fR
Use a different config directory
.TP
\fB\-n\fR, \fB\-\-no\-plugins\fR
Don't auto load any plugins
.TP
\fB\-p\fR, \fB\-\-plugindir\fR
Show plugin auto\-load directory
.TP
\fB\-u\fR, \fB\-\-configdir\fR
Show user config directory
.TP
\fB\-\-url\fR=\fIURL\fR
Open an irc://server:port/channel URL
.TP
\fB\-c\fR, \fB\-\-command\fR=\fICOMMAND\fR
Execute command:
.TP
\fB\-e\fR, \fB\-\-existing\fR
Open URL or execute command in an existing HexChat
.TP
\fB\-\-minimize\fR=\fIlevel\fR
Begin minimized. Level 0=Normal 1=Iconified 2=Tray
.TP
\fB\-v\fR, \fB\-\-version\fR
Show version information
.TP
\fB\-\-display\fR=\fIDISPLAY\fR
X display to use
.SH AUTHOR
This manual page was written by Davide Puricelli <evo@debian.org> for the Debian GNU/Linux system (but
may be used by others).
.TH HEXCHAT "1" "April 2013" "HexChat 2.9.6" "User Commands"
.SH NAME
HexChat \- IRC Client
.SH DESCRIPTION
.SS "Usage:"
.IP
hexchat [OPTION...] URL
.SS "Help Options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Show help options
.TP
\fB\-\-help\-all\fR
Show all help options
.TP
\fB\-\-help\-gtk\fR
Show GTK+ Options
.SS "Application Options:"
.TP
\fB\-a\fR, \fB\-\-no\-auto\fR
Don't auto connect to servers
.TP
\fB\-d\fR, \fB\-\-cfgdir\fR=\fIPATH\fR
Use a different config directory
.TP
\fB\-n\fR, \fB\-\-no\-plugins\fR
Don't auto load any plugins
.TP
\fB\-p\fR, \fB\-\-plugindir\fR
Show plugin auto\-load directory
.TP
\fB\-u\fR, \fB\-\-configdir\fR
Show user config directory
.TP
\fB\-\-url\fR=\fIURL\fR
Open an irc://server:port/channel?key URL
.TP
\fB\-c\fR, \fB\-\-command\fR=\fICOMMAND\fR
Execute command:
.TP
\fB\-e\fR, \fB\-\-existing\fR
Open URL or execute command in an existing HexChat
.TP
\fB\-\-minimize\fR=\fIlevel\fR
Begin minimized. Level 0=Normal 1=Iconified 2=Tray
.TP
\fB\-v\fR, \fB\-\-version\fR
Show version information
.TP
\fB\-\-display\fR=\fIDISPLAY\fR
X display to use
.SH AUTHOR
This manual page was written by Davide Puricelli <evo@debian.org> for the Debian GNU/Linux system (but
may be used by others).

View File

@ -1,4 +1,4 @@
libdir = $(hexchatlibdir)/plugins
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = checksum.la
checksum_la_SOURCES = checksum.c

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -77,7 +79,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -77,7 +79,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -1,4 +1,4 @@
libdir = $(hexchatlibdir)/plugins
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = doat.la
doat_la_SOURCES = doat.c

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -75,7 +77,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -28,7 +28,7 @@
static hexchat_plugin *ph; /* plugin handle */
static char name[] = "Exec";
static char desc[] = "Execute commands inside HexChat";
static char version[] = "1.1";
static char version[] = "1.2";
static int
run_command (char *word[], char *word_eol[], void *userdata)
@ -41,6 +41,10 @@ run_command (char *word[], char *word_eol[], void *userdata)
time_t start;
double timeElapsed;
char *token;
char *context = NULL;
int announce = 0;
HANDLE readPipe;
HANDLE writePipe;
STARTUPINFO sInfo;
@ -59,9 +63,8 @@ run_command (char *word[], char *word_eol[], void *userdata)
if (!stricmp("-O", word[2]))
{
/*strcat (commandLine, word_eol[3]);*/
hexchat_printf (ph, "Printing Exec output to others is not supported yet.\n");
return HEXCHAT_EAT_HEXCHAT;
strcat (commandLine, word_eol[3]);
announce = 1;
}
else
{
@ -90,7 +93,19 @@ run_command (char *word[], char *word_eol[], void *userdata)
{
/* avoid garbage */
buffer[dwRead] = '\0';
hexchat_printf (ph, "%s", buffer);
if (announce)
{
/* Say each line seperately, TODO: improve... */
token = strtok_s (buffer, "\n", &context);
while (token != NULL)
{
hexchat_commandf (ph, "SAY %s", token);
token = strtok_s (NULL, "\n", &context);
}
}
else
hexchat_printf (ph, "%s", buffer);
}
}
else
@ -100,20 +115,25 @@ run_command (char *word[], char *word_eol[], void *userdata)
}
timeElapsed = difftime (time (0), start);
}
/* display a newline to separate things */
if (!announce)
hexchat_printf (ph, "\n");
if (timeElapsed >= 10)
{
hexchat_printf (ph, "Command took too much time to run, execution aborted.\n");
}
CloseHandle (readPipe);
CloseHandle (pInfo.hProcess);
CloseHandle (pInfo.hThread);
}
/* display a newline to separate things */
hexchat_printf (ph, "\n");
if (timeElapsed >= 10)
else
{
hexchat_printf (ph, "Command took too much time to run, execution aborted.\n");
hexchat_command (ph, "help exec");
}
CloseHandle (readPipe);
CloseHandle (pInfo.hProcess);
CloseHandle (pInfo.hThread);
return HEXCHAT_EAT_HEXCHAT;
}

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -75,7 +77,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -1,6 +1,6 @@
EXTRA_DIST = INSTALL LICENSE README
libdir = $(hexchatlibdir)/plugins
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = fishlim.la
fishlim_la_SOURCES = fish.c irc.c keystore.c misc.c plugin_hexchat.c

View File

@ -1,5 +0,0 @@
/* stdbool.h replacement for MSVC */
#define false 0
#define true 1
#define bool _Bool
typedef int _Bool;

View File

@ -25,11 +25,7 @@
#ifndef FISH_H
#define FISH_H
#ifdef _MSC_VER
#include "bool.h"
#else
#include <stdbool.h>
#endif
#include <stddef.h>
char *fish_encrypt(const char *key, size_t keylen, const char *message);

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -77,7 +79,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -25,11 +25,7 @@
#ifndef IRC_H
#define IRC_H
#ifdef _MSC_VER
#include "bool.h"
#else
#include <stdbool.h>
#endif
#include <stddef.h>
bool irc_parse_message(const char *words[],

View File

@ -25,11 +25,7 @@
#ifndef KEYSTORE_H
#define KEYSTORE_H
#ifdef _MSC_VER
#include "bool.h"
#else
#include <stdbool.h>
#endif
#include <stddef.h>
char *keystore_get_key(const char *nick);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,734 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define _WIN32_IE 0x0601
#include <windows.h>
#include <stdio.h>
#include <commctrl.h>
#include <tchar.h>
#include "hexchat-plugin.h"
#include "utility.h"
#include "hextray.h"
#include "hexchat.h"
#include "callbacks.h"
#include "resource.h"
#include "sdTray.h"
#include "sdAlerts.h"
HWND g_hPrefTabEvents;
HWND g_hPrefTabSettings;
HWND g_hPrefTabAlerts;
HWND g_hPrefTabAbout;
bool g_bCanQuit;
int g_iIsActive = 1;
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
TCHAR szTitle[10];
GetWindowText(hWnd, szTitle, 9);
if(_tcsstr(szTitle, _T("HexChat [")))
{
g_hXchatWnd = hWnd;
return false;
}
return true;
}
/***********************************************************************************************/
/******* our HexChat event call back, get the name and info for each event and save it *********/
/******* for our alerts later ******************************************************************/
/***********************************************************************************************/
int event_cb(char *word[], void *userdata)
{
int iEvent = (int)userdata;
if(iEvent > 10 && iEvent != 21)
return HEXCHAT_EAT_NONE;
/***************************************************************************************/
/***** if the window is minimized or if we're allowed to show alerts when its not **/
/***** and if the option to show the specified alert is true and if we're even **/
/***** allowed to show alerts at all then we show them (a bit confusing but it works) **/
/***************************************************************************************/
if(((g_iIsActive == 0) || !(g_dwPrefs & (1<<PREF_OSBWM))) && (g_dwPrefs & (1<<PREF_AMAE)) && (g_dwPrefs & (1<<iEvent)))
{
/*********************************/
/*********** Our Buffers *********/
/*********************************/
char szInfo[512];
char szName[64];
DWORD dwInfoFlags;
int iTime = g_iTime*1000;
char *szTemp = NULL;
if(g_dwPrefs & (1<<PREF_KAOI))
{
iTime = 0;
}
switch(iEvent)
{
case CHAN_HILIGHT:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Highlight: %s", hexchat_get_info (ph, "channel"));
dwInfoFlags = NIIF_INFO;
break;
case CHAN_MESSAGE:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Channel Message: %s", hexchat_get_info (ph, "channel"));
dwInfoFlags = NIIF_INFO;
break;
case CHAN_TOPIC_CHANGE:
_snprintf(szInfo, 512, "%s has changed the topic to %s", word[1], word[2]);
_snprintf(szName, 64, "Topic Change: %s", word[3]);
dwInfoFlags = NIIF_INFO;
break;
case CHAN_INVITE:
_snprintf(szInfo, 512, "%s has invited you into %s", word[1], word[2]);
_snprintf(szName, 64, "Invite");
dwInfoFlags = NIIF_INFO;
break;
case CHAN_KICKED:
_snprintf(szInfo, 512, "Kicked from %s by %s:\r\n%s", word[2], word[3], word[4]);
_snprintf(szName, 64, "Kick");
dwInfoFlags = NIIF_WARNING;
break;
case CHAN_BANNED:
_snprintf(szInfo, 512, "Cannot join %s You are banned.", word[1]);
_snprintf(szName, 64, "Banned");
dwInfoFlags = NIIF_WARNING;
break;
case CTCP_GENERIC:
_snprintf(szInfo, 512, "%s:\r\nCTCP %s", word[2], word[1]);
_snprintf(szName, 64, "CTCP");
dwInfoFlags = NIIF_INFO;
break;
case PMSG_RECEIVE:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Private Message");
dwInfoFlags = NIIF_INFO;
break;
case SERV_DISCONNECT:
_snprintf(szInfo, 512, "Disconnected\r\nError: %s", word[1]);
_snprintf(szName, 64, "Disconnect");
dwInfoFlags = NIIF_ERROR;
break;
case SERV_KILLED:
_snprintf(szInfo, 512, "Killed(%s(%s))", word[1], word[2]);
_snprintf(szName, 64, "Server Admin has killed you");
dwInfoFlags = NIIF_ERROR;
break;
case SERV_NOTICE:
_snprintf(szInfo, 512, "Notice:\r\n%s: %s", word[1], word[2]);
_snprintf(szName, 64, "Notice");
dwInfoFlags = NIIF_INFO;
break;
case 11:
_snprintf(szInfo, 512, ":\r\n%s: %s", word[1], word[2]);
_snprintf(szName, 64, "Notice");
dwInfoFlags = NIIF_INFO;
break;
}
/**************************************************************************************/
/***** Use windows instead of balloons, and if its a window should we keep it open ****/
/***** indefinitely? ****/
/**************************************************************************************/
szTemp = hexchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_UWIOB))
{
sdSystemAlert((HINSTANCE)g_hInstance, IDD_ALERT, szTemp, szName, iTime);
}
else
{
ShowBalloon(g_hXchatWnd, 1, szTemp, szName, iTime, dwInfoFlags);
}
free(szTemp);
}
if(g_dwPrefs & (1<<PREF_BLINK) && (g_dwPrefs & (1<<iEvent)))
{
BlinkIcon(g_hXchatWnd, 1, g_hIcons[0], g_hIcons[(iEvent+1)], 700, 5);
}
/***********************************/
/***** pass the events to HexChat **/
/***********************************/
return HEXCHAT_EAT_NONE;
}
int command_cb(char *word[], char *word_eol[], void *userdata)
{
char szInfo[512];
char *szTemp = NULL;
int iTime = g_iTime*1000;
_snprintf(szInfo, 512, word_eol[2]);
szTemp = hexchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_KAOI))
{
iTime = 0;
}
if(((g_iIsActive == 0) || !(g_dwPrefs & (1<<PREF_OSBWM))) && (g_dwPrefs & (1<<PREF_AMAE)))
{
if(g_dwPrefs & (1<<PREF_UWIOB))
{
sdSystemAlert((HINSTANCE)g_hInstance, IDD_ALERT, szTemp, "Alert", iTime);
}
else
{
ShowBalloon(g_hXchatWnd, 1, szTemp, "Alert", iTime, NIIF_INFO);
}
}
free(szTemp);
return HEXCHAT_EAT_ALL;
}
LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
{
if((g_dwPrefs & (1<<PREF_MIOC)) && (g_bCanQuit == false))
{
/*******************************************/
/**** to autoaway or not to autoaway... ***/
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
hexchat_globally_away(g_szAway);
}
/**************************************************/
/**** Win32 API call to hide the window and **/
/**** save the fact that its minimized for later **/
/**************************************************/
g_iIsActive = 0;
ShowWindow(hWnd, SW_HIDE);
return 0;
}
else
{
if(g_hPrefDlg != NULL)
{
DestroyWindow(g_hPrefDlg);
}
StopBlink(hWnd, 1, g_hIcons[0]);
if(sdAlertNum())
{
sdCloseAlerts();
HoldClose();
return 0;
}
}
}
break;
case WM_SIZE:
{
/******************************************/
/***** User wants to minimize HexChat, ****/
/***** are we allowed to go to tray? ******/
/******************************************/
if((g_dwPrefs & (1<<PREF_TOT)) && (wparam == SIZE_MINIMIZED))
{
/*******************************************/
/**** to autoaway or not to autoaway... ***/
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
hexchat_globally_away(g_szAway);
}
/**************************************************/
/**** Win32 API call to hide the window and **/
/**** save the fact that its minimized for later **/
/**************************************************/
g_iIsActive = 0;
ShowWindow(hWnd, SW_HIDE);
}
}
break;
/**********************************/
/*** user clicked the tray icon ***/
/**********************************/
case WM_TRAYMSG:
{
switch(lparam)
{
case WM_LBUTTONDOWN:
{
if(!g_iIsActive)
{
/*********************************************************/
/*** 0: its hiden, restore it and show it, if autoaway ***/
/*** is on, set us as back ***/
/*********************************************************/
SendMessage(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(hWnd);
g_iIsActive = 1;
if(g_dwPrefs & (1<<PREF_AOM))
{
hexchat_globally_back();
}
}
else
{
SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
}
}
break;
case WM_RBUTTONDOWN:
{
/******************************************/
/*** user wants to see the menu find out **/
/*** where the mouse is and show it **/
/******************************************/
POINT pt;
int iRet;
GetCursorPos(&pt);
SetForegroundWindow(hWnd);
ModifyMenu(g_hTrayMenu, 2, (MF_POPUP | MF_BYPOSITION), (UINT)setServerMenu(), _T("Away"));
Sleep(175);
iRet = TrackPopupMenuEx(g_hTrayMenu, (TPM_RETURNCMD | TPM_LEFTALIGN), pt.x, pt.y, hWnd, NULL);
/***********************************/
/*** nRet is the users selection, **/
/*** process it **/
/***********************************/
sdTrayProc(hWnd, iRet);
}
break;
}
}
break;
default:
{
/*****************************************************/
/*** the taskbar has been restarted, re-add our icon */
/*****************************************************/
if(msg == RegisterWindowMessage(_T("TaskbarCreated")))
{
char szVersion[64];
_snprintf(szVersion, 64, "HexChat [%s]", hexchat_get_info(ph, "version"));
AddIcon(g_hXchatWnd, 1, g_hIcons[0], szVersion, (NIF_ICON | NIF_MESSAGE | NIF_TIP), WM_TRAYMSG);
}
}
break;
}
return CallWindowProc(g_hOldProc, hWnd, msg, wparam, lparam);
}
/****************************************************/
/*** process messages from the tray menu ************/
/****************************************************/
LRESULT CALLBACK sdTrayProc(HWND hWnd, int msg)
{
switch(msg)
{
case ACT_EXIT:
{
g_bCanQuit = true;
PostMessage(hWnd, WM_CLOSE, 0, 0);
}
break;
case ACT_RESTORE:
{
/*************************************************/
/** user wants us to restore the HexChat window **/
/** and of autoaway is on, set as back ******** **/
/*************************************************/
SendMessage(g_hXchatWnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(hWnd);
if((!g_iIsActive) && (g_dwPrefs & (1<<PREF_AOM)))
{
hexchat_globally_back();
g_iIsActive = 1;
}
}
break;
case ACT_SETTINGS:
{
ShowWindow(g_hPrefDlg, SW_SHOW);
}
break;
case ACT_AWAY:
{
hexchat_globally_away(g_szAway);
}
break;
case ACT_BACK:
{
hexchat_globally_back();
}
break;
default:
{
if(msg > 0)
{
hexchat_set_context(ph, hexchat_find_server(msg-1));
if(!hexchat_get_info(ph, "away"))
{
hexchat_away(g_szAway);
}
else
{
hexchat_back();
}
}
}
break;
}
return 1;
}
int CALLBACK PrefProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_INITDIALOG:
{
TCITEM tci1;
TCITEM tci2;
TCITEM tci3;
TCITEM tci4;
tci1.mask = TCIF_TEXT;
tci1.pszText = _T("Settings");
tci1.cchTextMax = strlen("Settings");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 0, (LPARAM)&tci1);
tci2.mask = TCIF_TEXT;
tci2.pszText = _T("Alerts");
tci2.cchTextMax = strlen("Alerts");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 1, (LPARAM)&tci2);
tci3.mask = TCIF_TEXT;
tci3.pszText = _T("Events");
tci3.cchTextMax = strlen("Events");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 2, (LPARAM)&tci3);
tci4.mask = TCIF_TEXT;
tci4.pszText = _T("About");
tci4.cchTextMax = strlen("About");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 3, (LPARAM)&tci4);
/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/
g_hPrefTabSettings = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_SETTINGS),
hWnd,
(DLGPROC)SettingsProc);
SetDialog(g_hPrefTabSettings, IDD_SETTINGS);
g_hPrefTabAlerts = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_ALERTS),
hWnd,
(DLGPROC)AlertsProc);
SetDialog(g_hPrefTabAlerts, IDD_ALERTS);
g_hPrefTabEvents = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_EVENTS),
hWnd,
(DLGPROC)EventsProc);
SetDialog(g_hPrefTabEvents, IDD_EVENTS);
g_hPrefTabAbout = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_ABOUT),
hWnd,
(DLGPROC)AboutProc);
}
break;
case WM_SHOWWINDOW:
{
if(wparam)
{
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_SETCURSEL, 0, 0);
ShowWindow(g_hPrefTabSettings, SW_SHOW);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
}
break;
case WM_NOTIFY:
{
NMHDR *pData = (NMHDR *)lparam;
switch(pData->code)
{
case TCN_SELCHANGE:
{
switch(SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_GETCURSEL, 0, 0))
{
case 0:
{
ShowWindow(g_hPrefTabSettings, SW_SHOW);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 1:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_SHOW);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 2:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_SHOW);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 3:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_SHOW);
}
break;
}
}
break;
}
}
break;
case WM_CLOSE:
{
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case WM_COMMAND:
{
switch(wparam)
{
case IDC_PREF_OK:
{
CheckPrefs(g_hPrefTabEvents, IDD_EVENTS);
CheckPrefs(g_hPrefTabSettings, IDD_SETTINGS);
CheckPrefs(g_hPrefTabAlerts, IDD_ALERTS);
SavePrefs(0);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case IDC_PREF_CANCEL:
{
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case IDC_PREF_APPLY:
{
CheckPrefs(g_hPrefTabEvents, IDD_EVENTS);
CheckPrefs(g_hPrefTabSettings, IDD_SETTINGS);
CheckPrefs(g_hPrefTabAlerts, IDD_ALERTS);
SavePrefs(0);
return FALSE;
}
break;
}
}
break;
case WM_DESTROY:
{
SendMessage(g_hPrefTabEvents, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabSettings, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabAbout, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabAlerts, WM_CLOSE, 0, 0);
}
break;
}
return FALSE;
}
/****************************************************/
/****************************************************/
/****************************************************/
LRESULT CALLBACK AlertsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
{
DestroyWindow(hWnd);
return TRUE;
break;
}
break;
case WM_COMMAND:
{
switch(LOWORD(wparam))
{
case PREF_AMAE:
{
SetToggle(hWnd, PREF_OSBWM, PREF_AMAE, TRUE);
SetToggle(hWnd, PREF_UWIOB, PREF_AMAE, TRUE);
SetToggle(hWnd, PREF_KAOI, PREF_AMAE, TRUE);
if(IsDlgButtonChecked(hWnd, PREF_AMAE))
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME, PREF_KAOI, FALSE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_KAOI, FALSE);
}
else
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_AMAE, TRUE);
}
}
break;
case PREF_UWIOB:
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_UWIOB, TRUE);
}
break;
case PREF_KAOI:
{
SetToggle(hWnd, IDC_ALERT_TIME, PREF_KAOI, FALSE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_KAOI, FALSE);
}
break;
}
break;
}
}
return FALSE;
}
/****************************************************/
/****************************************************/
/****************************************************/
LRESULT CALLBACK AboutProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** Process the events for our event dialog **********/
/*****************************************************/
LRESULT CALLBACK EventsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** Process the events for our settings dialog this **/
/** is alot more complicated because options are **/
/** enabled/disabled based on the state of others **/
/*****************************************************/
LRESULT CALLBACK SettingsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** this is the hotkey message processing function **/
/** this window is always open and ready to be told **/
/** if someone has hit the hotkey, if they did, we **/
/** need to close out all of the tray alerts, for **/
/** this I wrote sdCloseAlerts, more info there **/
/*****************************************************/
LRESULT CALLBACK HotKeyProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
else if(msg == WM_HOTKEY)
{
sdCloseAlerts();
}
return FALSE;
}

View File

@ -1,37 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _H_CALLBACKS_H
#define _H_CALLBACKS_H
int event_cb (char *word[], void *userdata);
int command_cb (char *word[], char *word_eol[], void *userdata);
LRESULT CALLBACK WindowProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
BOOL CALLBACK EnumWindowsProc (HWND hWnd, LPARAM lParam);
LRESULT CALLBACK sdTrayProc (HWND hwnd, int msg);
LRESULT CALLBACK AlertProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK HotKeyProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK EventsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK AboutProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK AlertsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK SettingsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
int CALLBACK PrefProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
#endif

View File

@ -1,320 +0,0 @@
/* X-Tray
* Copyright (C) 1998, 2005 Peter Zelezny, Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windows.h>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <tchar.h>
#include "hexchat-plugin.h"
#include "hextray.h"
#include "resource.h"
#include "hexchat.h"
#include "utility.h"
// from util.c of HexChat source code ( slightly modified to fit HexTray Syntax )
char *hexchat_strip_color (char *text)
{
int nc = 0;
int i = 0;
int col = 0;
int len = strlen(text);
char *new_str = (char *)malloc(len + 2);
while (len > 0)
{
if ((col && isdigit(*text) && (nc < 2)) || (col && isdigit(*(text+1)) && (nc < 3) && (*text == ',')))
{
nc++;
if(*text == ',')
{
nc = 0;
}
}
else
{
col = 0;
switch (*text)
{
case '\003': /*ATTR_COLOR: */
{
col = 1;
nc = 0;
}
break;
case '\007': /*ATTR_BEEP: */
case '\017': /*ATTR_RESET: */
case '\026': /*ATTR_REVERSE: */
case '\002': /*ATTR_BOLD: */
case '\037': /*ATTR_UNDERLINE: */
break;
default:
{
new_str[i] = *text;
i++;
}
break;
}
}
text++;
len--;
}
new_str[i] = 0;
return new_str;
}
void check_special_chars (char *cmd)
{
int occur = 0;
int len = strlen (cmd);
int i = 0, j = 0;
char *buf;
if (!len)
return;
buf = (char *)malloc (len + 1);
if (buf)
{
while (cmd[j])
{
switch (cmd[j])
{
case '%':
{
occur++;
switch (cmd[j + 1])
{
case 'R':
buf[i] = '\026';
break;
case 'U':
buf[i] = '\037';
break;
case 'B':
buf[i] = '\002';
break;
case 'C':
buf[i] = '\003';
break;
case 'O':
buf[i] = '\017';
break;
case '%':
buf[i] = '%';
break;
default:
buf[i] = '%';
j--;
break;
}
j++;
}
break;
default:
{
buf[i] = cmd[j];
}
break;
}
j++;
i++;
}
buf[i] = 0;
if (occur)
strcpy (cmd, buf);
free (buf);
}
}
void hexchat_globally_away(TCHAR *tszAway)
{
char szTemp[512];
char szAway[512];
ConvertString(tszAway, szAway, 512);
_snprintf(szTemp, 512, "ALLSERV AWAY %s\0", szAway);
check_special_chars(szTemp);
hexchat_exec(szTemp);
}
void hexchat_away(TCHAR *tszAway)
{
char szTemp[512];
char szAway[512];
ConvertString(tszAway, szAway, 512);
_snprintf(szTemp, 512, szAway);
check_special_chars(szTemp);
hexchat_commandf(ph, "AWAY %s\0", szTemp);
}
void hexchat_globally_back()
{
std::vector<int> xs;
std::vector<int>::iterator xsi;
hexchat_list *xl = hexchat_list_get(ph, "channels");
if(xl)
{
while(hexchat_list_next(ph, xl))
{
xsi = std::find(xs.begin(), xs.end(), hexchat_list_int(ph, xl, "id"));
if((xsi == xs.end()) &&
((strlen(hexchat_list_str(ph, xl, "server")) > 0) ||
(strlen(hexchat_list_str(ph, xl, "channel")) > 0)))
{
xs.push_back(hexchat_list_int(ph, xl, "id"));
hexchat_set_context(ph, (hexchat_context *)hexchat_list_str(ph, xl, "context"));
hexchat_back();
}
}
hexchat_list_free(ph, xl);
}
}
void hexchat_back()
{
if(hexchat_get_info(ph, "away"))
{
hexchat_command(ph, "BACK");
}
}
HMENU setServerMenu()
{
HMENU sTemp = CreateMenu();
TCHAR wszServer[128];
TCHAR wszNick[128];
TCHAR wszMenuEntry[256];
std::vector<int> xs;
std::vector<int>::iterator xsi;
hexchat_list *xl = hexchat_list_get(ph, "channels");
AppendMenu(sTemp, MF_STRING, ACT_AWAY, _T("Set Globally Away"));
AppendMenu(sTemp, MF_STRING, ACT_BACK, _T("Set Globally Back"));
AppendMenu(sTemp, MF_SEPARATOR, 0, NULL);
if(xl)
{
while(hexchat_list_next(ph, xl))
{
xsi = std::find(xs.begin(), xs.end(), hexchat_list_int(ph, xl, "id"));
if( (xsi == xs.end()) &&
((strlen(hexchat_list_str(ph, xl, "server")) > 0) ||
(strlen(hexchat_list_str(ph, xl, "channel")) > 0)))
{
hexchat_set_context(ph, (hexchat_context *)hexchat_list_str(ph, xl, "context"));
xs.push_back(hexchat_list_int(ph, xl, "id"));
char *network = _strdup(hexchat_list_str(ph, xl, "network"));
char *server = _strdup(hexchat_list_str(ph, xl, "server"));
char *nick = _strdup(hexchat_get_info(ph, "nick"));
if(network != NULL)
{
ConvertString(network, wszServer, 128);
}
else
{
ConvertString(server, wszServer, 128);
}
if(server != NULL)
{
ConvertString(nick, wszNick, 128);
_sntprintf(wszMenuEntry, 256, _T("%s @ %s\0"), wszNick, wszServer);
if(!hexchat_get_info(ph, "away"))
{
AppendMenu(sTemp, MF_STRING, (hexchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
}
else
{
AppendMenu(sTemp, (MF_CHECKED | MF_STRING), (hexchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
}
}
free(network);
free(server);
free(nick);
}
}
hexchat_list_free(ph, xl);
}
return sTemp;
}
struct _hexchat_context *hexchat_find_server(int find_id)
{
hexchat_context *xc;
hexchat_list *xl = hexchat_list_get(ph, "channels");
int id;
if(!xl)
return NULL;
while(hexchat_list_next(ph, xl))
{
id = hexchat_list_int(ph, xl, "id");
if(id == -1)
{
return NULL;
}
else if(id == find_id)
{
xc = (hexchat_context *)hexchat_list_str(ph, xl, "context");
hexchat_list_free(ph, xl);
return xc;
}
}
hexchat_list_free(ph, xl);
return NULL;
}
void hexchat_exec(char *command)
{
hexchat_set_context(ph, hexchat_find_context(ph, NULL, NULL));
hexchat_command(ph, command);
}

View File

@ -1,32 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _H_XCHAT_H
#define _H_XCHAT_H
void hexchat_exec (char *);
char *hexchat_strip_color (char *);
void hexchat_parse (char *);
struct _hexchat_context *hexchat_find_server (int);
void hexchat_globally_away (TCHAR *);
void hexchat_away (TCHAR *);
void hexchat_globally_back ();
void hexchat_back ();
HMENU setServerMenu ();
#endif

View File

@ -1,246 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define _WIN32_IE 0x0601
#include <windows.h>
#include <list>
#include <string>
#include <shobjidl.h>
#include "hexchat-plugin.h"
#include "resource.h"
#include "callbacks.h"
#include "utility.h"
#include "hextray.h"
#include "sdTray.h"
#include "sdAlerts.h"
/*****************************************************/
/**** Don't want to pollute the namespace do we? *****/
/*****************************************************/
std::list<hexchat_hook *> g_vHooks;
/*****************************************************/
/************ Global Identifiers *********************/
/*****************************************************/
WNDPROC g_hOldProc;
hexchat_plugin *ph;
/*****************************************************/
/***************** Resources *************************/
/*****************************************************/
HWND g_hXchatWnd;
HWND g_hHotkeyWnd;
HWND g_hPrefDlg;
HMENU g_hTrayMenu;
HICON g_hIcons[24];
HANDLE g_hInstance;
/*****************************************************/
/***************** Preferences ***********************/
/*****************************************************/
unsigned int g_dwPrefs;
TCHAR g_szAway[512];
int g_iTime;
BOOL WINAPI DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpVoid)
{
if((fdwReason == DLL_PROCESS_ATTACH) || (fdwReason == DLL_THREAD_ATTACH))
{
g_hInstance = hModule;
}
return TRUE;
}
int hexchat_plugin_init(hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
*plugin_name = "HexTray";
*plugin_desc = "Minimize HexChat to the Windows system tray";
*plugin_version = "1.3.0";
char buffer[256];
/***************************************************************************************************************************/
/************************* Initialize our preferences if they don't exist yet **********************************************/
/***************************************************************************************************************************/
if (hexchat_pluginpref_get_int (ph, "settings") == -1)
{
hexchat_pluginpref_set_int (ph, "settings", HT_DEF_SET);
}
if (hexchat_pluginpref_get_int (ph, "aot") == -1)
{
hexchat_pluginpref_set_int (ph, "aot", HT_DEF_AOT);
}
if (hexchat_pluginpref_get_int (ph, "key") == -1)
{
hexchat_pluginpref_set_int (ph, "key", HT_DEF_KEY);
}
if (hexchat_pluginpref_get_int (ph, "mod") == -1)
{
hexchat_pluginpref_set_int (ph, "mod", HT_DEF_MOD);
}
if (hexchat_pluginpref_get_str (ph, "away", buffer) == 0)
{
hexchat_pluginpref_set_str (ph, "away", "");
}
/***************************************************************************************************************************/
/************************* Load our preferences ****************************************************************************/
/***************************************************************************************************************************/
LoadPrefs();
/***************************************************************************************************************************/
/************************* Finds the HexChat window and saves it for later use *********************************************/
/***************************************************************************************************************************/
g_hXchatWnd = (HWND)hexchat_get_info(ph, "win_ptr");
if(g_hXchatWnd == NULL)
{
EnumThreadWindows(GetCurrentThreadId(), EnumWindowsProc, 0);
}
g_hOldProc = (WNDPROC)GetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC);
SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)WindowProc);
/***************************************************************************************************************************/
/************************* Grab the HexChat Icon, Load our menu, create the window to receive the hotkey messages *********/
/************************* and register the windows message so we know if explorer crashes ***********/
/***************************************************************************************************************************/
g_hTrayMenu = GetSubMenu(LoadMenu((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDR_TRAY_MENU)), 0);
g_hHotkeyWnd = CreateDialog((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_ALERT), NULL, (DLGPROC)HotKeyProc);
g_hPrefDlg = CreateDialog((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_PREF), g_hXchatWnd, (DLGPROC)PrefProc);
g_hIcons[0] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_XCHAT), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[2] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_HIGHLIGHT), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[5] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_BANNED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[6] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_KICKED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[8] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_PMSG), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[10]= (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_SNOTICE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[11]= (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_DISCONNECTED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[22] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_CHANMSG), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
/***************************************************************************************************************************/
/************************* Add our icon to the tray ************************************************************************/
/***************************************************************************************************************************/
char szVersion[64];
_snprintf(szVersion, 64, "HexChat %s", hexchat_get_info(ph, "version"));
AddIcon(g_hXchatWnd, 1, g_hIcons[0], szVersion, (NIF_ICON | NIF_MESSAGE | NIF_TIP), WM_TRAYMSG);
/***************************************************************************************************************************/
/***************************************************************************************************************************/
/***************************************************************************************************************************/
if(g_dwPrefs & (1<<PREF_DNSIT))
{
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle |= (1<<WS_CHILD);
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, (LONG_PTR)g_hHotkeyWnd);
}
/***************************************************************************************************************************/
/************************* Set our hooks and save them for later so we can unhook them *************************************/
/***************************************************************************************************************************/
g_vHooks.push_back(hexchat_hook_print(ph, "Channel Msg Hilight", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT));
g_vHooks.push_back(hexchat_hook_print(ph, "Channel Message", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_MESSAGE));
g_vHooks.push_back(hexchat_hook_print(ph, "Topic Change", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_TOPIC_CHANGE));
g_vHooks.push_back(hexchat_hook_print(ph, "Channel Action Hilight", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT));
g_vHooks.push_back(hexchat_hook_print(ph, "Channel INVITE", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_INVITE));
g_vHooks.push_back(hexchat_hook_print(ph, "You Kicked", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_KICKED));
g_vHooks.push_back(hexchat_hook_print(ph, "Banned", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_BANNED));
g_vHooks.push_back(hexchat_hook_print(ph, "CTCP Generic", HEXCHAT_PRI_NORM, event_cb, (void *)CTCP_GENERIC));
g_vHooks.push_back(hexchat_hook_print(ph, "Private Message", HEXCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE));
g_vHooks.push_back(hexchat_hook_print(ph, "Private Message to Dialog", HEXCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE));
g_vHooks.push_back(hexchat_hook_print(ph, "Disconnected", HEXCHAT_PRI_NORM, event_cb, (void *)SERV_DISCONNECT));
g_vHooks.push_back(hexchat_hook_print(ph, "Killed", HEXCHAT_PRI_NORM, event_cb, (void *)SERV_KILLED));
g_vHooks.push_back(hexchat_hook_print(ph, "Notice", HEXCHAT_PRI_NORM, event_cb, (void *)SERV_NOTICE));
g_vHooks.push_back(hexchat_hook_command(ph, "tray_alert", HEXCHAT_PRI_NORM, command_cb, "Create an Alert", NULL));
return 1;
}
int hexchat_plugin_deinit(hexchat_plugin *plugin_handle)
{
/******************************************/
/****** Remove the Icon from the tray *****/
/******************************************/
StopBlink(g_hXchatWnd, 1, g_hIcons[0]);
RemoveIcon(g_hXchatWnd, 1);
/*******************************************/
/*******************************************/
/*******************************************/
if(g_dwPrefs & (1<<PREF_DNSIT))
{
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle &= ~(1<<WS_CHILD);
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, NULL);
}
/******************************************/
/****** Unload our resources **************/
/******************************************/
DestroyMenu(g_hTrayMenu);
for(int i = 0; i <= 11; i++)
{
DestroyIcon(g_hIcons[i]);
}
/******************************************/
/****** Remove our window hook ************/
/******************************************/
SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)g_hOldProc);
/******************************************/
/****** Remove our hotkey, and destroy ****/
/****** the window that receives its ****/
/****** messages ****/
/******************************************/
UnregisterHotKey(g_hHotkeyWnd, 1);
DestroyWindow(g_hHotkeyWnd);
DestroyWindow(g_hPrefDlg);
/******************************************/
/************* Clean up Isle 7 ************/
/******************************************/
if(sdAlertNum())
{
sdCloseAlerts();
}
/******************************************/
/****** remove our hexchat_hook_*s **********/
/******************************************/
while(!g_vHooks.empty())
{
if(g_vHooks.back() != NULL)
{
hexchat_unhook(ph, g_vHooks.back());
}
g_vHooks.pop_back();
}
return 1;
}

View File

@ -1,3 +0,0 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -1,83 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _XTRAY_H
#define _XTRAY_H
/******************** Default settings*****************/
#define HT_DEF_SET 13814
#define HT_DEF_AOT 5
#define HT_DEF_KEY 84
#define HT_DEF_MOD 6
/******************** Globals *************************/
extern HWND g_hXchatWnd;
extern HWND g_hHotkeyWnd;
extern HWND g_hPrefDlg;
extern HMENU g_hTrayMenu;
extern HICON g_hIcons[24];
extern HANDLE g_hInstance;
extern unsigned int g_dwPrefs;
extern TCHAR g_szAway[512];
extern int g_iTime;
extern WNDPROC g_hOldProc;
extern struct _hexchat_plugin *ph;
/******************************************************/
/******************** Messages ************************/
#define WM_TRAYMSG WM_APP
/******************************************************/
/********************* Events *************************/
#define CHAN_HILIGHT 1
#define CHAN_INVITE 2
#define CHAN_TOPIC_CHANGE 3
#define CHAN_BANNED 4
#define CHAN_KICKED 5
#define CTCP_GENERIC 6
#define PMSG_RECEIVE 7
#define SERV_KILLED 8
#define SERV_NOTICE 9
#define SERV_DISCONNECT 10
/* new events */
#define CHAN_MESSAGE 21
#define PREF_AOM 11 // away on minimize
#define PREF_TOT 12 // Tray on Taskbar
#define PREF_AMAE 13 // alert me about events
#define PREF_OSBWM 14 // Only Show Balloon When Minimized
#define PREF_UWIOB 15 // Use Window Instead of Balloon
#define PREF_KAOI 16 // Keep alerts open indefinitely
#define PREF_MIOC 17 // Minimize instead of close
#define PREF_BLINK 18 // blink icon
#define PREF_CICO 19 // change icon - not implemented
#define PREF_DNSIT 20 // Do not show in taskbar
/******************************************************/
#endif
#ifdef _WIN64
/* use replacement with the same value, and use SetWindowLongPtr instead
of SetWindowLong. more info:
http://msdn.microsoft.com/en-us/library/ms633591.aspx
http://msdn.microsoft.com/en-us/library/ms644898.aspx */
#define GWL_HWNDPARENT GWLP_HWNDPARENT
#endif

View File

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Resource Files\bitmaps">
<UniqueIdentifier>{448b49a5-e68b-451e-bfbc-0855da024b2e}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\icons">
<UniqueIdentifier>{8345128a-0635-43d6-9115-a85ad9c77ee2}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="hextray.def">
<Filter>Resource Files</Filter>
</None>
<None Include="bitmaps\sd.bmp">
<Filter>Resource Files\bitmaps</Filter>
</None>
<None Include="icons\ban.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\disconnect.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\highlight.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\kick.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\message.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\sd.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\notice.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\hexchat.ico">
<Filter>Resource Files\icons</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="callbacks.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sdAlerts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sdTray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="utility.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hexchat.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hextray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="callbacks.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sdAlerts.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sdTray.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="utility.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hexchat.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hextray.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,47 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by resource.rc
//
#define IDD_ALERTS 104
#define IDD_EVENTS 105
#define IDD_SETTINGS 106
#define IDD_ALERT 107
#define IDD_PREF 108
#define IDD_ABOUT 109
#define IDR_TRAY_MENU 110
#define ICO_XCHAT 111
#define ICO_BANNED 112
#define ICO_CHANMSG 113
#define ICO_DISCONNECTED 114
#define ICO_HIGHLIGHT 115
#define ICO_KICKED 116
#define ICO_PMSG 117
#define ICO_SNOTICE 118
#define IDB_SD_LOGO 119
#define IDC_PREF_OK 1014
#define IDC_PREF_CANCEL 1015
#define IDC_PREF_APPLY 1016
#define IDC_AWAY_MSG 1017
#define IDC_ALERT_TIME 1018
#define IDC_TAB_CONTROL 1019
#define IDC_ALERT_HOTKEY 1020
#define IDC_ALERT_MSG 1021
#define IDC_ALERT_HOTKEY_TEXT 1022
#define IDC_ALERT_TIME_TEXT 1023
#define ACT_EXIT 40001
#define ACT_SETTINGS 40002
#define ACT_AWAY 40003
#define ACT_BACK 40004
#define ACT_RESTORE 40005
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 120
#define _APS_NEXT_COMMAND_VALUE 40006
#define _APS_NEXT_CONTROL_VALUE 1024
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -1,309 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_EVENTS DIALOGEX 8, 20, 216, 143
STYLE DS_SETFONT | DS_SETFOREGROUND | WS_CHILD
FONT 8, "Tahoma", 0, 0, 0x0
BEGIN
GROUPBOX "HexChat Events",IDC_STATIC,5,5,205,77
CONTROL "Banned",4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,18,49,10
CONTROL "Kicked",5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,32,49,10
CONTROL "Killed",8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,46,49,10
CONTROL "Disconnect",10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,60,49,10
CONTROL "Private Message",7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,18,69,10
CONTROL "Channel Message",21,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,32,69,10
CONTROL "Highlight",1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,46,69,10
CONTROL "CTCP",6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,60,69,10
CONTROL "Topic Change",3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,18,55,10
CONTROL "Server Notice",9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,32,55,10
CONTROL "Invite",2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,46,55,10
END
IDD_SETTINGS DIALOGEX 8, 20, 216, 143
STYLE DS_SETFONT | WS_CHILD
FONT 8, "Tahoma", 0, 0, 0x0
BEGIN
GROUPBOX "Options",IDC_STATIC,5,5,205,135
CONTROL "Auto away on minimize",11,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,16,60,100,10
CONTROL "Minimize HexChat to the system tray",12,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,16,18,133,10
CONTROL "Minimize to the tray instead of closing",17,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,16,32,174,9
EDITTEXT IDC_AWAY_MSG,33,86,169,50,ES_AUTOHSCROLL
LTEXT "Away Msg:",IDC_STATIC,27,72,35,8
CONTROL "Remove HexChat from the taskbar (only show in tray)",
20,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,46,191,9
END
IDD_ALERT DIALOGEX 0, 0, 151, 28
STYLE DS_LOCALEDIT | DS_SETFONT | DS_NOIDLEMSG | DS_CENTER | WS_CAPTION |
WS_SYSMENU
EXSTYLE WS_EX_NOPARENTNOTIFY | WS_EX_ACCEPTFILES | WS_EX_TOOLWINDOW
CAPTION "Event Name"
FONT 8, "Tahoma", 0, 0, 0x1
BEGIN
LTEXT "Event Text",IDC_ALERT_MSG,3,0,147,27
END
IDD_PREF DIALOGEX 0, 0, 233, 190
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "HexTray Preferences"
FONT 8, "Tahoma", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "Ok",IDC_PREF_OK,57,173,50,14
PUSHBUTTON "Cancel",IDC_PREF_CANCEL,115,173,50,14
PUSHBUTTON "Apply",IDC_PREF_APPLY,175,173,50,14
CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",0x0,7,7,218,159
END
IDD_ABOUT DIALOGEX 8, 20, 216, 143
STYLE DS_SETFONT | WS_CHILD
FONT 8, "Tahoma", 0, 0, 0x0
BEGIN
CONTROL 119,IDC_STATIC,"Static",SS_BITMAP | SS_SUNKEN |
WS_BORDER,3,6,88,81
CTEXT "HexTray\r\nBy: Michael Hotaling\r\n www.SinisterDevelopments.com",
IDC_STATIC,95,33,118,30
LTEXT "Folken\r\nBasket\r\nDonatzsky\r\nDaemon404",IDC_STATIC,
15,103,64,33
GROUPBOX "Special Thanks To:",IDC_STATIC,3,91,89,50
GROUPBOX "Version Information:",IDC_STATIC,101,92,109,49
LTEXT "1.3.0",IDC_STATIC,170,105,33,8,0,WS_EX_RIGHT
LTEXT "Compiled In: ",IDC_STATIC,110,117,54,8
LTEXT "2012",IDC_STATIC,170,117,33,8,0,WS_EX_RIGHT
LTEXT "Version Number:",IDC_STATIC,110,105,54,8
END
IDD_ALERTS DIALOGEX 8, 20, 216, 143
STYLE DS_SETFONT | WS_CHILD
FONT 8, "Tahoma", 0, 0, 0x0
BEGIN
GROUPBOX "Alerts",IDC_STATIC,5,5,205,117
CONTROL "Only show alerts while minimized",14,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,27,46,117,10
CONTROL "Use tray alerts to notify me about events",13,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,16,32,152,10
CONTROL "Use window instead of balloons",15,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,27,60,141,11
EDITTEXT IDC_ALERT_TIME,137,101,61,12,ES_AUTOHSCROLL | ES_NUMBER,
WS_EX_RIGHT
LTEXT "Show alert for x seconds:",IDC_ALERT_TIME_TEXT,40,103,
83,9
CONTROL "Alert Hotkey",IDC_ALERT_HOTKEY,"msctls_hotkey32",
WS_BORDER | WS_TABSTOP,137,74,61,13
LTEXT "Close all alerts hotkey:",IDC_ALERT_HOTKEY_TEXT,39,75,
76,10
CONTROL "Leave alerts open indefinitely",16,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,27,88,115,11
CONTROL "Blink Icon to alert me about events",18,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,16,18,127,10
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_EVENTS, DIALOG
BEGIN
BOTTOMMARGIN, 56
END
IDD_SETTINGS, DIALOG
BEGIN
BOTTOMMARGIN, 66
END
IDD_ALERT, DIALOG
BEGIN
RIGHTMARGIN, 150
BOTTOMMARGIN, 26
END
IDD_PREF, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 232
TOPMARGIN, 7
BOTTOMMARGIN, 176
END
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 209
TOPMARGIN, 7
BOTTOMMARGIN, 136
END
IDD_ALERTS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 136
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"hextray.h\0"
END
4 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,0,0
PRODUCTVERSION 1,3,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "SinisterDevelopments"
VALUE "FileDescription", "HexTray"
VALUE "FileVersion", "1,3,0,0"
VALUE "InternalName", "HexTray"
VALUE "LegalCopyright", "Copyright <20> 2005"
VALUE "OriginalFilename", "hchextray.dll"
VALUE "ProductName", "HexTray - HexChat Win32 System Tray Plugin"
VALUE "ProductVersion", "1,3,0,0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_TRAY_MENU MENU
BEGIN
POPUP "TRAY"
BEGIN
MENUITEM "Restore", ACT_RESTORE
MENUITEM SEPARATOR
MENUITEM "Away", 65535
MENUITEM "Settings", ACT_SETTINGS
MENUITEM SEPARATOR
MENUITEM "Exit", ACT_EXIT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
ICO_XCHAT ICON "icons\\hexchat.ico"
ICO_BANNED ICON "icons\\ban.ico"
ICO_CHANMSG ICON "icons\\message.ico"
ICO_HIGHLIGHT ICON "icons\\highlight.ico"
ICO_KICKED ICON "icons\\kick.ico"
ICO_PMSG ICON "icons\\message.ico"
ICO_SNOTICE ICON "icons\\notice.ico"
ICO_DISCONNECTED ICON "icons\\disconnect.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_SD_LOGO BITMAP "bitmaps\\sd.bmp"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
hextray.h
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,109 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windows.h>
#include <winuser.h>
#include <stdio.h>
#include "utility.h"
#include "resource.h"
#include "sdAlerts.h"
int g_iAlerts = 0;
void sdSystemAlert(HINSTANCE hModule, UINT uiDialog, char *szMsg, char *szName, unsigned int iTime)
{
TCHAR wszMsg[256];
TCHAR wszName[64];
HWND hDialog;
RECT rcWorkArea, rcDlg;
int ixPos, iyPos;
int iNumPerCol;
hDialog = CreateDialog(hModule, MAKEINTRESOURCE(uiDialog), NULL, (DLGPROC)sdAlertProc);
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, 0);
GetWindowRect(hDialog, &rcDlg);
iNumPerCol = ((rcWorkArea.bottom - rcWorkArea.top) / (rcDlg.bottom - rcDlg.top));
ixPos = rcWorkArea.right - (rcDlg.right - rcDlg.left) + 1;
iyPos = rcWorkArea.bottom - (rcDlg.bottom - rcDlg.top);
if((g_iAlerts >= iNumPerCol) && (iNumPerCol > 0))
{
ixPos -= ((g_iAlerts / iNumPerCol) * (rcDlg.right - rcDlg.left));
iyPos -= ((g_iAlerts - (iNumPerCol * (g_iAlerts / iNumPerCol))) * (rcDlg.bottom - rcDlg.top));
}
else
{
iyPos -= (g_iAlerts * (rcDlg.bottom - rcDlg.top));
}
SetWindowPos(hDialog, HWND_TOPMOST, ixPos, iyPos, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE);
ConvertString(szName, wszName, 64);
ConvertString(szMsg, wszMsg, 256);
SetWindowText(hDialog, wszName);
SetDlgItemText(hDialog, IDC_ALERT_MSG, wszMsg);
ShowWindow(hDialog, SW_SHOWNA);
if(iTime > 0)
{
SetTimer(hDialog, 1, iTime, NULL);
}
g_iAlerts++;
}
void sdCloseAlerts()
{
PostMessage(HWND_BROADCAST, RegisterWindowMessage(TEXT("xTray:CloseAllAlertWindows")), 0, 0);
}
LRESULT CALLBACK sdAlertProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
if(g_iAlerts > 0){ g_iAlerts--; }
DestroyWindow(hwnd);
return TRUE;
break;
case WM_TIMER:
if(g_iAlerts > 0){ g_iAlerts--; }
AnimateWindow(hwnd, 600, AW_SLIDE | AW_HIDE | AW_VER_POSITIVE);
DestroyWindow(hwnd);
return TRUE;
break;
default:
if(msg == RegisterWindowMessage(TEXT("xTray:CloseAllAlertWindows")))
{
if(g_iAlerts > 0){ g_iAlerts--; }
DestroyWindow(hwnd);
return TRUE;
}
break;
}
return FALSE;
}
int sdAlertNum()
{
return g_iAlerts;
}

View File

@ -1,26 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _H_SDALERTS_H
#define _H_SDALERTS_H
void sdSystemAlert (HINSTANCE, UINT, char *, char *, UINT);
LRESULT CALLBACK sdAlertProc (HWND, UINT, WPARAM, LPARAM);
int sdAlertNum ();
void sdCloseAlerts ();
#endif

View File

@ -1,207 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define _WIN32_IE 0x601
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include "sdTray.h"
#include "utility.h"
HANDLE hThread;
iBlink *tData = NULL;
int AddIcon(HWND hwnd, UINT id, HICON hicon, char *szTip, unsigned short flags, unsigned int cbMsg)
{
NOTIFYICONDATA nidata;
nidata.cbSize = NOTIFYICONDATA_V2_SIZE;
nidata.hIcon = hicon;
nidata.hWnd = hwnd;
nidata.uCallbackMessage = cbMsg;
nidata.uFlags = flags;
nidata.uID = id;
if(szTip != NULL)
{
TCHAR *szTemp = new TCHAR[64];
ConvertString(szTip, szTemp, 64);
_tcsncpy(nidata.szTip, szTemp, 64);
delete[] szTemp;
}
return Shell_NotifyIcon(NIM_ADD, &nidata);
}
int RemoveIcon(HWND hwnd, UINT id)
{
if(hThread != NULL)
{
TerminateThread(hThread, 0);
hThread = NULL;
delete tData;
}
NOTIFYICONDATA nidata;
nidata.cbSize = NOTIFYICONDATA_V2_SIZE;
nidata.hWnd = hwnd;
nidata.uID = id;
return Shell_NotifyIcon(NIM_DELETE, &nidata);
}
int SetIcon(HWND hwnd, UINT id, HICON hicon)
{
NOTIFYICONDATA nidata;
nidata.cbSize = NOTIFYICONDATA_V2_SIZE;
nidata.hWnd = hwnd;
nidata.uID = id;
nidata.hIcon = hicon;
nidata.uFlags = NIF_ICON;
return Shell_NotifyIcon(NIM_MODIFY, &nidata);
}
int SetTooltip(HWND hwnd, UINT id, char *szTip)
{
NOTIFYICONDATA nidata;
nidata.cbSize = NOTIFYICONDATA_V2_SIZE;
nidata.hWnd = hwnd;
nidata.uID = id;
nidata.uFlags = NIF_TIP;
if(szTip != NULL)
{
TCHAR *szTemp = new TCHAR[64];
ConvertString(szTip, szTemp, 64);
_tcsncpy(nidata.szTip, szTemp, 64);
delete[] szTemp;
}
return Shell_NotifyIcon(NIM_MODIFY, &nidata);
}
int ShowBalloon(HWND hwnd, UINT id, char *szInfo, char *szTitle, UINT time, UINT infoFlags)
{
NOTIFYICONDATA nidata;
nidata.cbSize = NOTIFYICONDATA_V2_SIZE;
nidata.hWnd = hwnd;
nidata.uID = id;
nidata.uFlags = NIF_INFO;
nidata.dwInfoFlags = infoFlags;
if(time > 0)
nidata.uTimeout = time;
else
nidata.uTimeout = 500000;
if(szInfo != NULL)
{
TCHAR *szTemp = new TCHAR[255];
ConvertString(szInfo, szTemp, 251);
szTemp[250] = 0;
if(strlen(szInfo) > 255)
{
_sntprintf(szTemp, 255, _T("%s..."), szTemp);
}
_tcsncpy(nidata.szInfo, szTemp, 255);
delete[] szTemp;
}
if(szTitle != NULL)
{
TCHAR *wszTitle = new TCHAR[64];
ConvertString(szTitle, wszTitle, 64);
_tcsncpy(nidata.szInfoTitle, wszTitle, 64);
delete[] wszTitle;
}
return Shell_NotifyIcon(NIM_MODIFY, &nidata);
}
DWORD WINAPI BlinkThread(LPVOID lpParam)
{
NOTIFYICONDATA nidata;
nidata.cbSize = NOTIFYICONDATA_V2_SIZE;
nidata.hWnd = tData->hwnd;
nidata.uID = tData->id;
nidata.uFlags = NIF_ICON;
for(UINT i = 0; i < tData->num; i++)
{
nidata.hIcon = tData->hBlink;
Shell_NotifyIcon(NIM_MODIFY, &nidata);
Sleep(tData->time);
nidata.hIcon = tData->hBase;
Shell_NotifyIcon(NIM_MODIFY, &nidata);
Sleep(tData->time);
}
delete tData;
hThread = NULL;
return 0;
}
int BlinkIcon(HWND hwnd, UINT id, HICON hBase, HICON hBlink, UINT time, UINT num)
{
if(hThread != NULL)
{
StopBlink(hwnd, id, hBase);
}
DWORD dwThreadID;
tData = new iBlink;
tData->hwnd = hwnd;
tData->id = id;
tData->hBase = hBase;
tData->hBlink = hBlink;
tData->time = time;
tData->num = num;
hThread = CreateThread(NULL, 0, BlinkThread, tData, 0, &dwThreadID);
return 0;
}
void StopBlink(HWND hwnd, UINT id, HICON hBase)
{
if(hThread != NULL)
{
TerminateThread(hThread, 0);
hThread = NULL;
delete tData;
}
SetIcon(hwnd, id, hBase);
}

View File

@ -1,39 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _H_SDTRAY_H
#define _H_SDTRAY_H
int AddIcon (HWND, UINT, HICON, char *, unsigned short, UINT);
int ShowBalloon (HWND, UINT, char *, char *, UINT, UINT);
int BlinkIcon (HWND, UINT, HICON, HICON, UINT, UINT);
int SetTooltip (HWND, UINT, char *);
int SetIcon (HWND, UINT, HICON);
void StopBlink (HWND, UINT, HICON);
int RemoveIcon (HWND, UINT);
typedef struct IBLINK
{
HICON hBase;
HICON hBlink;
HWND hwnd;
UINT id;
UINT time;
UINT num;
}iBlink;
#endif

View File

@ -1,410 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windows.h>
#include <stdio.h>
#include <commctrl.h>
#include <tchar.h>
#include "hexchat-plugin.h"
#include "utility.h"
#include "hextray.h"
#include "callbacks.h"
#include "resource.h"
struct HOTKEY g_hHotKey;
/* we need to convert ALT and SHIFT modifiers
// from <winuser.h>
#define MOD_ALT 0x0001
#define MOD_CONTROL 0x0002
#define MOD_SHIFT 0x0004
// from <commctrl.h>
#define HOTKEYF_SHIFT 0x01
#define HOTKEYF_CONTROL 0x02
#define HOTKEYF_ALT 0x04
*/
WORD HotkeyfToMod(WORD modifiers)
{
WORD newmods = 0;
if (modifiers & HOTKEYF_SHIFT)
newmods |= MOD_SHIFT;
if (modifiers & HOTKEYF_CONTROL)
newmods |= MOD_CONTROL;
if (modifiers & HOTKEYF_ALT)
newmods |= MOD_ALT;
return newmods;
}
WORD ModToHotkeyf(WORD modifiers)
{
WORD newmods = 0;
if (modifiers & MOD_SHIFT)
newmods |= HOTKEYF_SHIFT;
if (modifiers & MOD_CONTROL)
newmods |= HOTKEYF_CONTROL;
if (modifiers & MOD_ALT)
newmods |= HOTKEYF_ALT;
return newmods;
}
void SavePrefs(int iDlg)
{
hexchat_pluginpref_set_int (ph, "settings", g_dwPrefs);
hexchat_pluginpref_set_int (ph, "aot", g_iTime);
hexchat_pluginpref_set_int (ph, "key", g_hHotKey.key);
hexchat_pluginpref_set_int (ph, "mod", g_hHotKey.mod);
hexchat_pluginpref_set_str (ph, "away", (const char*) g_szAway);
}
void LoadPrefs()
{
/**************************************************************************************************/
/*********************** Our Settings Section *****************************************************/
/**************************************************************************************************/
/**************************************************************************************************/
/*************************** Get the value for each of our preferances ****************************/
/**************************************************************************************************/
g_dwPrefs = hexchat_pluginpref_get_int (ph, "settings");
g_iTime = hexchat_pluginpref_get_int (ph, "aot");
g_hHotKey.key = hexchat_pluginpref_get_int (ph, "key");
g_hHotKey.mod = hexchat_pluginpref_get_int (ph, "mod");
hexchat_pluginpref_get_str (ph, "away", (char *) g_szAway);
/**************************************************************************************************/
/******************************** Register our hotkey with windows ********************************/
/**************************************************************************************************/
if(g_dwPrefs & (1<<PREF_UWIOB))
{
RegisterHotKey(g_hHotkeyWnd, 1, g_hHotKey.mod, g_hHotKey.key);
}
}
void CheckPrefs(HWND hwnd, int iDlg)
{
/**************************************************************************************************/
/**************** save the preferances based on the checkmarks/options ****************************/
/**************************************************************************************************/
switch(iDlg)
{
case IDD_EVENTS:
{
SetOption(hwnd, CHAN_HILIGHT, CHAN_HILIGHT);
SetOption(hwnd, CHAN_INVITE, CHAN_INVITE);
SetOption(hwnd, CHAN_TOPIC_CHANGE, CHAN_TOPIC_CHANGE);
SetOption(hwnd, CHAN_BANNED, CHAN_BANNED);
SetOption(hwnd, CHAN_KICKED, CHAN_KICKED);
SetOption(hwnd, CTCP_GENERIC, CTCP_GENERIC);
SetOption(hwnd, PMSG_RECEIVE, PMSG_RECEIVE);
SetOption(hwnd, SERV_KILLED, SERV_KILLED);
SetOption(hwnd, SERV_NOTICE, SERV_NOTICE);
SetOption(hwnd, SERV_DISCONNECT, SERV_DISCONNECT);
SetOption(hwnd, CHAN_MESSAGE, CHAN_MESSAGE);
}
break;
case IDD_ALERTS:
{
SetOption(hwnd, PREF_AMAE, PREF_AMAE);
SetOption(hwnd, PREF_OSBWM, PREF_OSBWM);
SetOption(hwnd, PREF_UWIOB, PREF_UWIOB);
SetOption(hwnd, PREF_KAOI, PREF_KAOI);
SetOption(hwnd, PREF_BLINK, PREF_BLINK);
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
TCHAR tTime[512];
GetWindowText(GetDlgItem(hwnd, IDC_ALERT_TIME), tTime, 511);
g_iTime = _tstoi(tTime);
/**************************************************************************/
/**************** Get our Hotkey and save it **********/
/**************** then remove the old hotkey and add the new one **********/
/**************************************************************************/
DWORD hHotkey;
hHotkey = SendDlgItemMessage(hwnd, IDC_ALERT_HOTKEY, HKM_GETHOTKEY, 0, 0);
g_hHotKey.key = LOBYTE(hHotkey);
g_hHotKey.mod = HotkeyfToMod(HIBYTE(hHotkey));
if(IsDlgButtonChecked(hwnd, PREF_UWIOB) == BST_CHECKED)
{
UnregisterHotKey(g_hHotkeyWnd, 1);
RegisterHotKey(g_hHotkeyWnd, 1, g_hHotKey.mod, g_hHotKey.key);
}
else
{
UnregisterHotKey(g_hHotkeyWnd, 1);
}
/*************************************************************************/
/*********** Get and save the away msg and alert time ********************/
/*************************************************************************/
}
break;
case IDD_SETTINGS:
{
SetOption(hwnd, PREF_AOM, PREF_AOM);
SetOption(hwnd, PREF_TOT, PREF_TOT);
SetOption(hwnd, PREF_MIOC, PREF_MIOC);
SetOption(hwnd, PREF_DNSIT, PREF_DNSIT);
GetDlgItemText(hwnd, IDC_AWAY_MSG, g_szAway, 511);
if(g_dwPrefs & (1<<PREF_DNSIT))
{
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle |= (1<<WS_CHILD);
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, (LONG_PTR)g_hHotkeyWnd);
}
else
{
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle &= ~(1<<WS_CHILD);
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, NULL);
}
}
break;
}
}
void SetDialog(HWND hwnd, int iDlg)
{
switch(iDlg)
{
case IDD_EVENTS:
{
SetCheck(hwnd, CHAN_HILIGHT, CHAN_HILIGHT);
SetCheck(hwnd, CHAN_INVITE, CHAN_INVITE);
SetCheck(hwnd, CHAN_TOPIC_CHANGE, CHAN_TOPIC_CHANGE);
SetCheck(hwnd, CHAN_BANNED, CHAN_BANNED);
SetCheck(hwnd, CHAN_KICKED, CHAN_KICKED);
SetCheck(hwnd, CTCP_GENERIC, CTCP_GENERIC);
SetCheck(hwnd, PMSG_RECEIVE, PMSG_RECEIVE);
SetCheck(hwnd, SERV_KILLED, SERV_KILLED);
SetCheck(hwnd, SERV_NOTICE, SERV_NOTICE);
SetCheck(hwnd, SERV_DISCONNECT, SERV_DISCONNECT);
SetCheck(hwnd, CHAN_MESSAGE, CHAN_MESSAGE);
}
break;
case IDD_SETTINGS:
{
SetCheck(hwnd, PREF_TOT, PREF_TOT);
SetCheck(hwnd, PREF_MIOC, PREF_MIOC);
SetCheck(hwnd, PREF_AOM, PREF_AOM);
SetCheck(hwnd, PREF_DNSIT, PREF_DNSIT);
SetDlgItemText(hwnd, IDC_AWAY_MSG, g_szAway);
}
break;
case IDD_ALERTS:
{
SetCheck(hwnd, PREF_BLINK, PREF_BLINK);
SetCheck(hwnd, PREF_OSBWM, PREF_OSBWM);
SetCheck(hwnd, PREF_UWIOB, PREF_UWIOB);
SetCheck(hwnd, PREF_KAOI, PREF_KAOI);
/**********************************************************/
/**********************************************************/
/**********************************************************/
if(SetCheck(hwnd, PREF_AMAE, PREF_AMAE) == false)
{
SetToggle(hwnd, PREF_OSBWM, PREF_AMAE, TRUE);
SetToggle(hwnd, PREF_UWIOB, PREF_AMAE, TRUE);
SetToggle(hwnd, PREF_KAOI, PREF_AMAE, TRUE);
SetToggle(hwnd, IDC_ALERT_TIME, PREF_AMAE, TRUE);
SetToggle(hwnd, IDC_ALERT_TIME_TEXT, PREF_AMAE, TRUE);
SetToggle(hwnd, IDC_ALERT_HOTKEY, PREF_AMAE, TRUE);
SetToggle(hwnd, IDC_ALERT_HOTKEY_TEXT, PREF_AMAE, TRUE);
}
else
{
SetToggle(hwnd, IDC_ALERT_HOTKEY, PREF_UWIOB, TRUE);
SetToggle(hwnd, IDC_ALERT_HOTKEY_TEXT, PREF_UWIOB, TRUE);
SetToggle(hwnd, IDC_ALERT_TIME, PREF_KAOI, FALSE);
SetToggle(hwnd, IDC_ALERT_TIME_TEXT, PREF_KAOI, FALSE);
}
/**********************************************************/
/**********************************************************/
/**********************************************************/
TCHAR tTime[255];
SendDlgItemMessage(hwnd, IDC_ALERT_TIME, WM_SETTEXT, 0, (LPARAM)_itot(g_iTime, tTime, 10));
SendDlgItemMessage(hwnd, IDC_ALERT_HOTKEY, HKM_SETHOTKEY, MAKEWORD(g_hHotKey.key, ModToHotkeyf(g_hHotKey.mod)), 0);
}
break;
}
}
int SetCheck(HWND hDialog, unsigned int uiCheckBox, unsigned int uiPref)
{
if((g_dwPrefs & (1<<uiPref)))
{
CheckDlgButton(hDialog, uiCheckBox, BST_CHECKED);
return 1;
}
else
{
CheckDlgButton(hDialog, uiCheckBox, BST_UNCHECKED);
return 0;
}
return 0;
}
int SetToggle(HWND hDialog, unsigned int uiCheckBox, unsigned int uiTestbox, bool offeqoff)
{
/**************************************************************************************************/
/*********************** if(true) then if option is off turn toggle off ***************************/
/*********************** if(false) then if option is off turn toggle on ***************************/
/**************************************************************************************************/
if(offeqoff)
{
if(IsDlgButtonChecked(hDialog, uiTestbox) == BST_CHECKED)
{
EnableWindow(GetDlgItem(hDialog, uiCheckBox), TRUE);
return 1;
}
else
{
EnableWindow(GetDlgItem(hDialog, uiCheckBox), FALSE);
return 0;
}
}
else
{
if(IsDlgButtonChecked(hDialog, uiTestbox) == BST_CHECKED)
{
EnableWindow(GetDlgItem(hDialog, uiCheckBox), FALSE);
return 1;
}
else
{
EnableWindow(GetDlgItem(hDialog, uiCheckBox), TRUE);
return 0;
}
}
return 0;
}
int SetOption(HWND hDialog, unsigned int uiCheckBox, unsigned int uiPref)
{
if(IsDlgButtonChecked(hDialog, uiCheckBox) == BST_CHECKED)
{
g_dwPrefs |= (1<<uiPref);
}
else
{
g_dwPrefs &= ~(1<<uiPref);
}
return (g_dwPrefs & (1<<uiPref));
}
// For cleanup ( Closing windows and the such )
void HoldClose()
{
HANDLE hcThread;
DWORD dwThreadID;
hcThread = CreateThread(NULL, 0, HoldCloseThread, 0, 0, &dwThreadID);
}
DWORD WINAPI HoldCloseThread(LPVOID lpParam)
{
Sleep(1000);
PostMessage(g_hXchatWnd, WM_CLOSE, 0, 0);
return 0;
}
bool FileExists(TCHAR *file)
{
HANDLE hTemp = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
int nRet = GetLastError();
CloseHandle(hTemp);
if(nRet == 0)
{
return true;
}
else
{
return false;
}
return false;
}
void ConvertString(const char *in, wchar_t *out, int size)
{
MultiByteToWideChar(CP_UTF8, 0, in, -1, out, size);
}
void ConvertString(const wchar_t *in, char *out, int size)
{
WideCharToMultiByte(CP_UTF8, 0, in, (size - 1), out, size, NULL, NULL);
}
void ConvertString(const char *in, char *out, int size)
{
strncpy(out, in, size);
}
void ErrorDebug(LPTSTR lpszFunction)
{
TCHAR szBuf[80];
LPVOID lpMsgBuf;
DWORD dw = GetLastError();
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0, NULL );
_stprintf(szBuf,
_T("%s failed with error %d: %s"),
lpszFunction, dw, lpMsgBuf);
MessageBox(NULL, szBuf, _T("Error"), MB_OK);
LocalFree(lpMsgBuf);
}

View File

@ -1,46 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray 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.
*
* X-Tray 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 X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _H_UTILITY_H
#define _H_UTILITY_H
WORD HotkeyfToMod (WORD);
WORD ModToHotkeyf (WORD);
int SetOption (HWND, unsigned int, unsigned int);
int SetCheck (HWND, unsigned int, unsigned int);
int SetToggle (HWND, unsigned int, unsigned int, bool);
void ErrorDebug (LPTSTR lpszFunction);
void SetDialog (HWND, int);
void CheckPrefs (HWND, int);
bool FileExists (TCHAR *);
DWORD WINAPI HoldCloseThread (LPVOID);
void SavePrefs (int);
void LoadPrefs ();
void HoldClose ();
void ConvertString(const char *in, wchar_t *out, int size);
void ConvertString(const wchar_t *in, char *out, int size);
void ConvertString(const char *in, char *out, int size);
struct HOTKEY
{
WORD key;
WORD mod;
};
#endif

View File

@ -131,11 +131,11 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle, char **plugin_name, char
hexchat_hook_command(ph, "mpc", HEXCHAT_PRI_NORM, mpc_tell,"no help text", 0);
hexchat_hook_command(ph, "mpc_themes", HEXCHAT_PRI_NORM, print_themes,"no help text", 0);
hexchat_hook_command(ph, "mpc_reloadthemes", HEXCHAT_PRI_NORM, mpc_themeReload,"no help text", 0);
hexchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\"");
hexchat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\"");
themeInit();
loadThemes();
hexchat_printf(ph, "%s %s plugin loaded\n",*plugin_name, VERSION);
hexchat_printf(ph, "%s plugin loaded\n", *plugin_name);
return 1;
}

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -75,7 +77,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -2,7 +2,7 @@
EXTRA_DIST=alt_completion.pl generate_header lib/Xchat.pm lib/Xchat/Embed.pm lib/Xchat/List/Network.pm \
lib/Xchat/List/Network/Entry.pm lib/Xchat/List/Network/AutoJoin.pm lib/IRC.pm
libdir = $(hexchatlibdir)/plugins
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = perl.la
perl_la_SOURCES = perl.c

View File

@ -10,28 +10,26 @@ use overload
sub new {
my $class = shift;
my $line = shift;
my @autojoins;
if ( $line ) {
my ( $channels, $keys ) = split / /, $line, 2;
my @channels = split /,/, $channels;
my @keys = split /,/, ($keys || '');
for my $channel ( @channels ) {
my $key = shift @keys;
$key = '' unless defined $key;
push @autojoins, {
channel => $channel,
key => $key,
};
}
}
return bless \@autojoins, $class;
}
sub add {
my $self = shift;
my $line = shift;
my ( $channel, $key ) = split /,/, $line, 2;
$key = $key || '';
push @$self, {
channel => $channel,
key => $key,
};
}
sub channels {
my $self = shift;

View File

@ -39,6 +39,8 @@ sub parse {
my @fields = split /\n/, $data;
chomp @fields;
$entry->{ autojoins } = Xchat::List::Network::AutoJoin->new();
for my $field ( @fields ) {
SWITCH: for ( $field ) {
/^($letter_key_re)=(.*)/ && do {
@ -47,8 +49,7 @@ sub parse {
};
/^J.(.*)/ && do {
$entry->{ autojoins } =
Xchat::List::Network::AutoJoin->new( $1 );
$entry->{ autojoins }->add( $1 );
};
/^F.(.*)/ && do {

View File

@ -1,124 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{58654438-F674-42F7-88FA-73EF90AD80B1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>perl516</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl516Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl516Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL516_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Perl516Path)\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl516Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl516Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl516Path)\bin\$(Perl516Lib).dll"
move $(Perl516Lib).def "$(IntDir)"
lib /nologo /machine:x86 "/def:$(IntDir)$(Perl516Lib).def" "/out:$(OutDir)\$(Perl516Lib).lib"
"$(Perl516Path)\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PERL516_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Perl516Path)\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl516Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl516Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl516Path)\bin\$(Perl516Lib).dll"
move $(Perl516Lib).def "$(IntDir)"
lib /nologo /machine:x64 "/def:$(IntDir)$(Perl516Lib).def" "/out:$(OutDir)\$(Perl516Lib).lib"
"$(Perl516Path)\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="perl.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="perl.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -296,7 +296,7 @@ list_item_to_sv ( hexchat_list *list, const char *const *fields )
default:
field_value = &PL_sv_undef;
}
hv_store (hash, field_name, name_len, field_value, 0);
(void)hv_store (hash, field_name, name_len, field_value, 0);
field_index++;
}
return sv_2mortal (newRV_noinc ((SV *) hash));
@ -1520,7 +1520,7 @@ perl_command_unload (char *word[], char *word_eol[], void *userdata)
}
static int
perl_command_reload (char *word[], char *word_eol[], void *userdata)
perl_command_reload (char *word[], char *word_eol[], void *eat)
{
char *file = get_filename (word, word_eol);
@ -1529,7 +1529,10 @@ perl_command_reload (char *word[], char *word_eol[], void *userdata)
return HEXCHAT_EAT_HEXCHAT;
}
return HEXCHAT_EAT_HEXCHAT;
if (eat)
return HEXCHAT_EAT_HEXCHAT;
else
return HEXCHAT_EAT_NONE;
}
void
@ -1570,7 +1573,7 @@ hexchat_plugin_init (hexchat_plugin * plugin_handle, char **plugin_name,
hexchat_hook_command (ph, "reload", HEXCHAT_PRI_NORM, perl_command_reload, 0,
0);
hexchat_hook_command (ph, "pl_reload", HEXCHAT_PRI_NORM, perl_command_reload, 0,
0);
(int*)1);
hexchat_hook_command (ph, "unloadall", HEXCHAT_PRI_NORM,
perl_command_unloadall, 0, 0);
hexchat_hook_command (ph, "reloadall", HEXCHAT_PRI_NORM,

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -42,13 +45,13 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl518Output)</TargetName>
<TargetName>$(PerlOutput)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl518Output)</TargetName>
<TargetName>$(PerlOutput)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
@ -56,11 +59,10 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL518_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Perl518Path)\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(PerlPath)\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
@ -69,15 +71,15 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl518Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(PerlLib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl518Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<DelayLoadDLLs>$(PerlLib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl518Path)\bin\$(Perl518Lib).dll"
move $(Perl518Lib).def "$(IntDir)"
lib /nologo /machine:x86 "/def:$(IntDir)$(Perl518Lib).def" "/out:$(OutDir)\$(Perl518Lib).lib"
"$(Perl518Path)\bin\perl.exe" generate_header
<Command>"$(GendefPath)\gendef" "$(PerlPath)\bin\$(PerlLib).dll"
move $(PerlLib).def "$(IntDir)"
lib /nologo /machine:x86 "/def:$(IntDir)$(PerlLib).def" "/out:$(OutDir)\$(PerlLib).lib"
"$(PerlPath)\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
@ -86,11 +88,10 @@ move xchat.pm.h "$(IntDir)"</Command>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PERL518_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Perl518Path)\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(PerlPath)\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
@ -99,15 +100,15 @@ move xchat.pm.h "$(IntDir)"</Command>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl518Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(PerlLib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl518Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<DelayLoadDLLs>$(PerlLib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl518Path)\bin\$(Perl518Lib).dll"
move $(Perl518Lib).def "$(IntDir)"
lib /nologo /machine:x64 "/def:$(IntDir)$(Perl518Lib).def" "/out:$(OutDir)\$(Perl518Lib).lib"
"$(Perl518Path)\bin\perl.exe" generate_header
<Command>"$(GendefPath)\gendef" "$(PerlPath)\bin\$(PerlLib).dll"
move $(PerlLib).def "$(IntDir)"
lib /nologo /machine:x64 "/def:$(IntDir)$(PerlLib).def" "/out:$(OutDir)\$(PerlLib).lib"
"$(PerlPath)\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>

View File

@ -1,6 +1,6 @@
EXTRA_DIST =
libdir = $(hexchatlibdir)/plugins
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = python.la
python_la_SOURCES = python.c

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -13,7 +16,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{19C52A0A-A790-409E-A28A-9745FF990F5C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>python</RootNamespace>
<RootNamespace>python2</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@ -42,13 +45,13 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(PythonOutput)</TargetName>
<TargetName>$(Python2Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(PythonOutput)</TargetName>
<TargetName>$(Python2Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
@ -56,11 +59,10 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(PythonPath)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Glib);$(Python2Path)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
@ -69,19 +71,18 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>python.def</ModuleDefinitionFile>
<AdditionalDependencies>"$(PythonLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);$(PythonPath)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>"$(Python2Lib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);$(Python2Path)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(PythonPath)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Glib);$(Python2Path)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
@ -90,8 +91,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>python.def</ModuleDefinitionFile>
<AdditionalDependencies>"$(PythonLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);$(PythonPath)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>"$(Python2Lib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);$(Python2Path)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -11,9 +14,9 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3024CF36-85E5-4E00-9608-7002E2C7EF14}</ProjectGuid>
<ProjectGuid>{C2321A03-0BA7-45B3-8740-ABD82B36B0BF}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>hextray</RootNamespace>
<RootNamespace>python3</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@ -42,85 +45,61 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Python3Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<TargetName>hchextray</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Python3Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<TargetName>hchextray</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(Python3Path)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>hextray.def</ModuleDefinitionFile>
<ModuleDefinitionFile>python.def</ModuleDefinitionFile>
<AdditionalDependencies>"$(Python3Lib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);$(Python3Path)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(Python3Path)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>hextray.def</ModuleDefinitionFile>
<ModuleDefinitionFile>python.def</ModuleDefinitionFile>
<AdditionalDependencies>"$(Python3Lib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);$(Python3Path)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="bitmaps\sd.bmp" />
<None Include="icons\ban.ico" />
<None Include="icons\disconnect.ico" />
<None Include="icons\highlight.ico" />
<None Include="icons\kick.ico" />
<None Include="icons\message.ico" />
<None Include="icons\sd.ico" />
<None Include="icons\notice.ico" />
<None Include="icons\hexchat.ico" />
<None Include="hextray.def" />
<None Include="python.def" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource.rc" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="callbacks.cpp" />
<ClCompile Include="sdAlerts.cpp" />
<ClCompile Include="sdTray.cpp" />
<ClCompile Include="utility.cpp" />
<ClCompile Include="hexchat.cpp" />
<ClCompile Include="hextray.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="callbacks.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="sdAlerts.h" />
<ClInclude Include="sdTray.h" />
<ClInclude Include="utility.h" />
<ClInclude Include="hexchat.h" />
<ClInclude Include="hextray.h" />
<ClCompile Include="python.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -2,22 +2,20 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
<UniqueIdentifier>{f4eaf231-f095-42d3-8427-b2b6006cacb1}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
<UniqueIdentifier>{0166c0f9-7968-4a09-9ef5-a5179c7746eb}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="perl.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="perl.c">
<ClCompile Include="python.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="python.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
libdir = $(hexchatlibdir)/plugins
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = sysinfo.la
sysinfo_la_SOURCES = hwmon.c match.c parse.c pci.c xsys.c

View File

@ -34,6 +34,7 @@ int hwmon_chip_present()
return 0;
}
#if 0
void get_hwmon_chip_name(char *name)
{
char *position, buffer[bsize];
@ -47,6 +48,7 @@ void get_hwmon_chip_name(char *name)
fclose(fp);
}
}
#endif
void get_hwmon_temp(unsigned int *value, unsigned int *sensor)
{

View File

@ -65,14 +65,31 @@ char *pretty_freespace(const char *desc, unsigned long long *free_k, unsigned lo
return result;
}
void remove_leading_whitespace(char *buffer)
{
char *pos;
while((pos = memchr(buffer, 0x20, 1)))
char *buffer2 = NULL;
int i = 0, j = 0, ews = 0;
buffer2 = (char*)malloc(strlen(buffer) * sizeof(char));
if (buffer2 == NULL)
return;
memset (buffer2, (char)0, strlen(buffer));
while (i < strlen(buffer))
{
pos += 1;
strcpy(buffer, pos);
/* count tabs, spaces as whitespace. */
if (!(buffer[i] == (char)32 || buffer[i] == (char)9) || ews == 1)
{
ews = 1;
buffer2[j] = buffer[i];
j++;
}
i++;
}
memset (buffer, (char)0, strlen(buffer));
strcpy (buffer, buffer2);
free (buffer2);
}
char *decruft_filename(char *buffer)

View File

@ -378,22 +378,9 @@ int xs_parse_distro(char *name)
{
FILE *fp = NULL;
char buffer[bsize], *pos = NULL;
if((fp = fopen("/etc/lsb-release", "r")) != NULL)
{
char id[bsize], codename[bsize], release[bsize];
strcpy(id, "?");
strcpy(codename, "?");
strcpy(release, "?");
while(fgets(buffer, bsize, fp) != NULL)
{
find_match_char(buffer, "DISTRIB_ID", id);
find_match_char(buffer, "DISTRIB_CODENAME", codename);
find_match_char(buffer, "DISTRIB_RELEASE", release);
}
snprintf(buffer, bsize, "%s \"%s\" %s", id, codename, release);
}
else if((fp = fopen("/etc/make.conf", "r")) != NULL)
if((fp = fopen("/etc/portage/make.conf", "r")) != NULL ||
(fp = fopen("/etc/make.conf", "r")) != NULL)
{
char keywords[bsize];
while(fgets(buffer, bsize, fp) != NULL)
@ -403,7 +390,7 @@ int xs_parse_distro(char *name)
snprintf(buffer, bsize, "Gentoo Linux (stable)");
else
snprintf(buffer, bsize, "Gentoo Linux %s", keywords);
}
}
else if((fp = fopen("/etc/redhat-release", "r")) != NULL)
fgets(buffer, bsize, fp);
else if((fp = fopen("/etc/mageia-release", "r")) != NULL)
@ -424,6 +411,20 @@ int xs_parse_distro(char *name)
fgets(buffer, bsize, fp);
else if((fp = fopen("/etc/arch-release", "r")) != NULL)
snprintf(buffer, bsize, "ArchLinux");
else if((fp = fopen("/etc/lsb-release", "r")) != NULL)
{
char id[bsize], codename[bsize], release[bsize];
strcpy(id, "?");
strcpy(codename, "?");
strcpy(release, "?");
while(fgets(buffer, bsize, fp) != NULL)
{
find_match_char(buffer, "DISTRIB_ID", id);
find_match_char(buffer, "DISTRIB_CODENAME", codename);
find_match_char(buffer, "DISTRIB_RELEASE", release);
}
snprintf(buffer, bsize, "%s \"%s\" %s", id, codename, release);
}
else
snprintf(buffer, bsize, "Unknown Distro");
if(fp != NULL) fclose(fp);
@ -438,8 +439,10 @@ int xs_parse_hwmon_chip(char *chip)
{
if (!hwmon_chip_present())
return 1;
#if 0
else
get_hwmon_chip_name(chip);
#endif
return 0;
}

View File

@ -31,6 +31,7 @@ static hexchat_plugin *ph; /* plugin handle */
static char name[] = "SysInfo";
static char desc[] = "Display info about your hardware and OS";
static char version[] = "1.1";
static char helptext[] = "USAGE: /sysinfo - Sends info about your hardware and OS to current channel.";
static int firstRun;
static char *wmiOs;
static char *wmiCpu;
@ -397,8 +398,8 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
firstRun = 1;
hexchat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, printInfo, NULL, NULL);
hexchat_command (ph, "MENU -ietc\\system.png ADD \"Window/Display System Info\" \"SYSINFO\"");
hexchat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, printInfo, helptext, NULL);
hexchat_command (ph, "MENU -ishare\\system.png ADD \"Window/Send System Info\" \"SYSINFO\"");
hexchat_printf (ph, "%s plugin loaded\n", name);

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SYSINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -78,7 +80,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;SYSINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -35,6 +35,7 @@
#define DEFAULT_FORMAT "%B%1:%B %2 **"
#define DEFAULT_PERCENT 1
#define DEFAULT_ANNOUNCE 1
#define DEFAULT_PCIIDS "/usr/share/hwdata/pci.ids"
static hexchat_plugin *ph; /* plugin handle */
@ -43,7 +44,7 @@ static int error_printed = 0; /* semaphore, make sure not to print the same erro
static char name[] = "SysInfo";
static char desc[] = "Display info about your hardware and OS";
static char version[] = "3.0";
static char sysinfo_help[] = "SysInfo Usage:\n /SYSINFO [OS|DISTRO|CPU|RAM|DISK|VGA|SOUND|ETHERNET|UPTIME], print various details about your system or print a summary without arguments\n /SYSINFO LIST, print current settings\n /SYSINFO SET <variable>, update given setting\n /SYSINFO RESET, reset settings to defaults\n /NETDATA <iface>, show transmitted data on given interface\n /NETSTREAM <iface>, show current bandwidth on given interface\n";
static char sysinfo_help[] = "SysInfo Usage:\n /SYSINFO [-e|-o] [OS|DISTRO|CPU|RAM|DISK|VGA|SOUND|ETHERNET|UPTIME], print various details about your system or print a summary without arguments\n /SYSINFO LIST, print current settings\n /SYSINFO SET <variable>, update given setting\n /SYSINFO RESET, reset settings to defaults\n /NETDATA <iface>, show transmitted data on given interface\n /NETSTREAM <iface>, show current bandwidth on given interface\n";
void
sysinfo_get_pciids (char* dest)
@ -57,6 +58,12 @@ sysinfo_get_percent ()
return hexchat_pluginpref_get_int (ph, "percent");
}
int
sysinfo_get_announce ()
{
return hexchat_pluginpref_get_int (ph, "announce");
}
void
sysinfo_print_error (const char* msg)
{
@ -705,13 +712,15 @@ reset_settings ()
hexchat_pluginpref_set_str (ph, "pciids", DEFAULT_PCIIDS);
hexchat_pluginpref_set_str (ph, "format", DEFAULT_FORMAT);
hexchat_pluginpref_set_int (ph, "percent", DEFAULT_PERCENT);
hexchat_pluginpref_set_int (ph, "announce", DEFAULT_ANNOUNCE);
}
static int
sysinfo_cb (char *word[], char *word_eol[], void *userdata)
{
error_printed = 0;
int announce = 0;
int announce = sysinfo_get_announce ();
int offset = 0;
int buffer;
char format[bsize];
@ -721,36 +730,49 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata)
return HEXCHAT_EAT_ALL;
}
if (hexchat_list_int (ph, NULL, "type") >= 2)
/* Cannot send to server tab */
if (hexchat_list_int (ph, NULL, "type") == 1)
{
announce = 1;
announce = 0;
}
if (!g_ascii_strcasecmp ("HELP", word[2]))
/* Allow overriding global announce setting */
if (!strcmp ("-e", word[2]))
{
announce = 0;
offset++;
}
else if (!strcmp ("-o", word[2]))
{
announce = 1;
offset++;
}
if (!g_ascii_strcasecmp ("HELP", word[2+offset]))
{
hexchat_printf (ph, sysinfo_help);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("LIST", word[2]))
else if (!g_ascii_strcasecmp ("LIST", word[2+offset]))
{
list_settings ();
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("SET", word[2]))
else if (!g_ascii_strcasecmp ("SET", word[2+offset]))
{
if (!g_ascii_strcasecmp ("", word_eol[4]))
if (!g_ascii_strcasecmp ("", word_eol[4+offset]))
{
hexchat_printf (ph, "%s\tEnter a value!\n", name);
return HEXCHAT_EAT_ALL;
}
if (!g_ascii_strcasecmp ("format", word[3]))
if (!g_ascii_strcasecmp ("format", word[3+offset]))
{
hexchat_pluginpref_set_str (ph, "format", word_eol[4]);
hexchat_printf (ph, "%s\tformat is set to: %s\n", name, word_eol[4]);
hexchat_pluginpref_set_str (ph, "format", word_eol[4+offset]);
hexchat_printf (ph, "%s\tformat is set to: %s\n", name, word_eol[4+offset]);
}
else if (!g_ascii_strcasecmp ("percent", word[3]))
else if (!g_ascii_strcasecmp ("percent", word[3+offset]))
{
buffer = atoi (word[4]); /* don't use word_eol, numbers must not contain spaces */
buffer = atoi (word[4+offset]); /* don't use word_eol, numbers must not contain spaces */
if (buffer > 0 && buffer < INT_MAX)
{
@ -762,10 +784,25 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata)
hexchat_printf (ph, "%s\tInvalid input!\n", name);
}
}
else if (!g_ascii_strcasecmp ("pciids", word[3]))
else if (!g_ascii_strcasecmp ("announce", word[3+offset]))
{
hexchat_pluginpref_set_str (ph, "pciids", word_eol[4]);
hexchat_printf (ph, "%s\tpciids is set to: %s\n", name, word_eol[4]);
buffer = atoi (word[4+offset]); /* don't use word_eol, numbers must not contain spaces */
if (buffer > 0)
{
hexchat_pluginpref_set_int (ph, "announce", 1);
hexchat_printf (ph, "%s\tannounce is set to: On\n", name);
}
else
{
hexchat_pluginpref_set_int (ph, "announce", 0);
hexchat_printf (ph, "%s\tannounce is set to: Off\n", name);
}
}
else if (!g_ascii_strcasecmp ("pciids", word[3+offset]))
{
hexchat_pluginpref_set_str (ph, "pciids", word_eol[4+offset]);
hexchat_printf (ph, "%s\tpciids is set to: %s\n", name, word_eol[4+offset]);
}
else
{
@ -775,58 +812,58 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata)
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("RESET", word[2]))
else if (!g_ascii_strcasecmp ("RESET", word[2+offset]))
{
reset_settings ();
hexchat_printf (ph, "%s\tSettings have been restored to defaults.\n", name);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("OS", word[2]))
else if (!g_ascii_strcasecmp ("OS", word[2+offset]))
{
print_os (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("DISTRO", word[2]))
else if (!g_ascii_strcasecmp ("DISTRO", word[2+offset]))
{
print_distro (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("CPU", word[2]))
else if (!g_ascii_strcasecmp ("CPU", word[2+offset]))
{
print_cpu (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("RAM", word[2]))
else if (!g_ascii_strcasecmp ("RAM", word[2+offset]))
{
print_ram (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("DISK", word[2]))
else if (!g_ascii_strcasecmp ("DISK", word[2+offset]))
{
print_disk (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("VGA", word[2]))
else if (!g_ascii_strcasecmp ("VGA", word[2+offset]))
{
print_vga (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("SOUND", word[2]))
else if (!g_ascii_strcasecmp ("SOUND", word[2+offset]))
{
print_sound (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("ETHERNET", word[2]))
else if (!g_ascii_strcasecmp ("ETHERNET", word[2+offset]))
{
print_ethernet (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("UPTIME", word[2]))
else if (!g_ascii_strcasecmp ("UPTIME", word[2+offset]))
{
print_uptime (announce, format);
return HEXCHAT_EAT_ALL;
}
else if (!g_ascii_strcasecmp ("", word[2]))
else if (!g_ascii_strcasecmp ("", word[2+offset]))
{
print_summary (announce, format);
return HEXCHAT_EAT_ALL;
@ -867,7 +904,12 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
hexchat_pluginpref_set_int (ph, "percent", DEFAULT_PERCENT);
}
hexchat_command (ph, "MENU ADD \"Window/Display System Info\" \"SYSINFO\"");
if (hexchat_pluginpref_get_int (ph, "announce") == -1)
{
hexchat_pluginpref_set_int (ph, "announce", DEFAULT_ANNOUNCE);
}
hexchat_command (ph, "MENU ADD \"Window/Send System Info\" \"SYSINFO\"");
hexchat_printf (ph, "%s plugin loaded\n", name);
return 1;
}

View File

@ -27,74 +27,19 @@
#include "hexchat-plugin.h"
#define DEFAULT_DELAY 10 /* 10 seconds */
#define DEFAULT_DELAY 30 /* 30 seconds */
#define DEFAULT_FREQ 360 /* 6 hours */
#define DOWNLOAD_URL "http://dl.hexchat.net/hexchat"
static hexchat_plugin *ph; /* plugin handle */
static char name[] = "Update Checker";
static char desc[] = "Check for HexChat updates automatically";
static char version[] = "4.0";
static const char upd_help[] = "Update Checker Usage:\n /UPDCHK, check for HexChat updates\n /UPDCHK SET delay|freq, set startup delay or check frequency\n";
static int legacy_os = 0;
static char*
check_version ()
{
#if 0
HINTERNET hINet, hFile;
hINet = InternetOpen ("Update Checker", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
if (!hINet)
{
return "Unknown";
}
hFile = InternetOpenUrl (hINet,
"https://raw.github.com/hexchat/hexchat/master/win32/version.txt",
NULL,
0,
INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD,
0);
if (hFile)
{
static char buffer[1024];
DWORD dwRead;
while (InternetReadFile (hFile, buffer, 1023, &dwRead))
{
if (dwRead == 0)
{
break;
}
buffer[dwRead] = 0;
}
InternetCloseHandle (hFile);
InternetCloseHandle (hINet);
if (strlen (buffer) == 5)
return buffer;
else
return "Unknown";
}
InternetCloseHandle (hINet);
return "Unknown";
#endif
/* Google Code's messing up with requests, use HTTP/1.0 as suggested. More info:
http://code.google.com/p/support/issues/detail?id=6095
Of course it would be still too simple, coz IE will override settings, so
you have to disable HTTP/1.1 manually and globally. More info:
http://support.microsoft.com/kb/258425
So this code's basically useless since disabling HTTP/1.1 will work with the
above code too.
Update: a Connection: close header seems to disable chunked encoding.
*/
HINTERNET hOpen, hConnect, hResource;
hOpen = InternetOpen (TEXT ("Update Checker"),
@ -121,30 +66,14 @@ check_version ()
return "Unknown";
}
if (legacy_os)
{
hResource = HttpOpenRequest (hConnect,
TEXT ("GET"),
TEXT ("/hexchat/hexchat/master/win32/version-xp.txt"),
TEXT ("HTTP/1.0"),
NULL,
NULL,
INTERNET_FLAG_SECURE | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_AUTH,
0);
}
else
{
hResource = HttpOpenRequest (hConnect,
TEXT ("GET"),
TEXT ("/hexchat/hexchat/master/win32/version.txt"),
TEXT ("HTTP/1.0"),
NULL,
NULL,
INTERNET_FLAG_SECURE | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_AUTH,
0);
}
hResource = HttpOpenRequest (hConnect,
TEXT ("GET"),
TEXT ("/hexchat/hexchat/master/win32/version.txt"),
TEXT ("HTTP/1.0"),
NULL,
NULL,
INTERNET_FLAG_SECURE | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_AUTH,
0);
if (!hResource)
{
InternetCloseHandle (hConnect);
@ -154,7 +83,11 @@ check_version ()
else
{
static char buffer[1024];
char infobuffer[32];
int statuscode;
DWORD dwRead;
DWORD infolen = sizeof(infobuffer);
HttpAddRequestHeaders (hResource, TEXT ("Connection: close\r\n"), -1L, HTTP_ADDREQ_FLAG_ADD); /* workaround for GC bug */
HttpSendRequest (hResource, NULL, 0, NULL, 0);
@ -168,10 +101,18 @@ check_version ()
buffer[dwRead] = 0;
}
HttpQueryInfo(hResource,
HTTP_QUERY_STATUS_CODE,
&infobuffer,
&infolen,
NULL);
InternetCloseHandle (hResource);
InternetCloseHandle (hConnect);
InternetCloseHandle (hOpen);
if (strlen (buffer) == 5)
statuscode = atoi(infobuffer);
if (statuscode == 200)
return buffer;
else
return "Unknown";
@ -250,9 +191,9 @@ print_version (char *word[], char *word_eol[], void *userdata)
else
{
#ifdef _WIN64 /* use this approach, the wProcessorArchitecture method always returns 0 (=x86) for some reason */
hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\nhttp://dl.hexchat.org/hexchat/HexChat%%20%s%%20x64.exe\n", name, version);
hexchat_printf (ph, "%s:\tA HexChat update is available! You can download it from here:\n%s/HexChat%%20%s%%20x64.exe\n", name, DOWNLOAD_URL, version);
#else
hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\nhttp://dl.hexchat.org/hexchat/HexChat%%20%s%%20x86.exe\n", name, version);
hexchat_printf (ph, "%s:\tA HexChat update is available! You can download it from here:\n%s/HexChat%%20%s%%20x86.exe\n", name, DOWNLOAD_URL, version);
#endif
}
return HEXCHAT_EAT_HEXCHAT;
@ -273,9 +214,9 @@ print_version_quiet (void *userdata)
if (!(strcmp (version, hexchat_get_info (ph, "version")) == 0) && !(strcmp (version, "Unknown") == 0))
{
#ifdef _WIN64 /* use this approach, the wProcessorArchitecture method always returns 0 (=x86) for plugins for some reason */
hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\nhttps://github.com/downloads/hexchat/hexchat/HexChat%%20%s%%20x64.exe\n", name, version);
hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\n%s/HexChat%%20%s%%20x64.exe\n", name, DOWNLOAD_URL, version);
#else
hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\nhttps://github.com/downloads/hexchat/hexchat/HexChat%%20%s%%20x86.exe\n", name, version);
hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\n%s/HexChat%%20%s%%20x86.exe\n", name, DOWNLOAD_URL, version);
#endif
/* print update url once, then stop the timer */
return 0;
@ -303,21 +244,12 @@ int
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
int delay;
OSVERSIONINFOEX osvi;
ph = plugin_handle;
*plugin_name = name;
*plugin_desc = desc;
*plugin_version = version;
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
GetVersionEx ((OSVERSIONINFO*) &osvi);
if (osvi.dwMajorVersion == 5)
{
legacy_os = 1;
}
/* these are required for the very first run */
delay = hexchat_pluginpref_get_int (ph, "delay");
if (delay == -1)
@ -333,7 +265,7 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
hexchat_hook_command (ph, "UPDCHK", HEXCHAT_PRI_NORM, print_version, upd_help, NULL);
hexchat_hook_timer (ph, delay * 1000, delayed_check, NULL);
hexchat_command (ph, "MENU -ietc\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
hexchat_command (ph, "MENU -ishare\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
hexchat_printf (ph, "%s plugin loaded\n", name);
return 1; /* return 1 for success */

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -77,7 +79,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -173,7 +173,7 @@ hexchat_plugin_init(hexchat_plugin *plugin_handle,
*plugin_version = "0.5";
hexchat_hook_command (ph, "WINAMP", HEXCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
hexchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
hexchat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
hexchat_print (ph, "Winamp plugin loaded\n");

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
@ -56,7 +59,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -75,7 +77,6 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -1,70 +0,0 @@
========================================================================
MICROSOFT FOUNDATION CLASS LIBRARY : wmpa
========================================================================
AppWizard has created this wmpa DLL for you. This DLL not only
demonstrates the basics of using the Microsoft Foundation classes but
is also a starting point for writing your DLL.
This file contains a summary of what you will find in each of the files that
make up your wmpa DLL.
wmpa.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
wmpa.h
This is the main header file for the DLL. It declares the
CWmpaApp class.
wmpa.cpp
This is the main DLL source file. It contains the class CWmpaApp.
It also contains the OLE entry points required of inproc servers.
wmpa.odl
This file contains the Object Description Language source code for the
type library of your DLL.
wmpa.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
wmpa.clw
This file contains information used by ClassWizard to edit existing
classes or add new classes. ClassWizard also uses this file to store
information needed to create and edit message maps and dialog data
maps and to create prototype member functions.
res\wmpa.rc2
This file contains resources that are not edited by Microsoft
Visual C++. You should place all resources not editable by
the resource editor in this file.
wmpa.def
This file contains information about the DLL that must be
provided to run with Microsoft Windows. It defines parameters
such as the name and description of the DLL. It also exports
functions from the DLL.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named wmpa.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////

View File

@ -1,8 +0,0 @@
// stdafx.cpp : source file that includes just the standard includes
// wmpa.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@ -1,62 +0,0 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__33D7BD1A_A9B6_4BDE_B867_5278529B95B2__INCLUDED_)
#define AFX_STDAFX_H__33D7BD1A_A9B6_4BDE_B867_5278529B95B2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC Automation classes
#endif // _AFX_NO_OLE_SUPPORT
#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT
#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
/******************************************************************
* Includes
******************************************************************/
#include "wmpcdrom.h"
#include "wmpcdromcollection.h"
#include "wmpclosedcaption.h"
#include "wmpcontrols.h"
#include "wmpdvd.h"
#include "wmperror.h"
#include "wmperroritem.h"
#include "wmpmedia.h"
#include "wmpmediacollection.h"
#include "wmpnetwork.h"
#include "wmpplayer4.h"
#include "wmpplayerapplication.h"
#include "wmpplaylist.h"
#include "wmpplaylistarray.h"
#include "wmpplaylistcollection.h"
#include "wmpsettings.h"
#include "wmpstringcollection.h"
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__33D7BD1A_A9B6_4BDE_B867_5278529B95B2__INCLUDED_)

View File

@ -1,590 +0,0 @@
/******************************************************************
* $Id$
*
* $Log$
*
* Copyright <20> 2005 David Cullen, All rights reserved
*
******************************************************************/
#include "stdafx.h"
#include "hexchat-plugin.h"
#include <windows.h>
#include <tchar.h>
#include "wmpa.h"
#include "WMPADialog.h"
#define XMMS_SESSION 0
/******************************************************************
* Globalss
******************************************************************/
hexchat_plugin *ph = NULL;
CWMPPlayer4 *wmp;
static const char subKey[] = "Software\\FlowerSoft\\WMPA";
/******************************************************************
* hexchat_plugin_init
******************************************************************/
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,
char *arg)
{
BOOL success;
ph = plugin_handle;
*plugin_name = "WMPA";
*plugin_desc = "Announce the current song from Windows Media Player.";
*plugin_version = VER_STRING;
// Show the song browser
success = StartWindowsMediaPlayer();
if (!success) {
hexchat_printf(ph, "WMPA: Failed to show the song browser.");
hexchat_printf(ph, "WMPA: Could not load plug-in version %s.", VER_STRING);
return(E_FAIL);
}
// Get a pointer to the Windows Media Player control
wmp = GetWindowsMediaPlayer();
if (wmp == NULL) {
hexchat_printf(ph, "WMPA: Failed to get a pointer to the Windows Media Player interface.");
hexchat_printf(ph, "WMPA: Could not load plug-in version %s.", VER_STRING);
return(E_POINTER);
}
// Restore the settings (need wmp first)
success = wmpaRestoreSettings();
if (!success) {
hexchat_printf(ph, "WMPA: Failed to restore the settings.");
}
hexchat_hook_command(ph, "auto", HEXCHAT_PRI_NORM, wmpaAuto, 0, 0);
hexchat_hook_command(ph, "curr", HEXCHAT_PRI_NORM, wmpaCurr, 0, 0);
hexchat_hook_command(ph, "find", HEXCHAT_PRI_NORM, wmpaFind, 0, 0);
hexchat_hook_command(ph, "slist", HEXCHAT_PRI_NORM, wmpaList, 0, 0);
hexchat_hook_command(ph, "next", HEXCHAT_PRI_NORM, wmpaNext, 0, 0);
hexchat_hook_command(ph, "play", HEXCHAT_PRI_NORM, wmpaPlay, 0, 0);
hexchat_hook_command(ph, "pause", HEXCHAT_PRI_NORM, wmpaPause, 0, 0);
hexchat_hook_command(ph, "prev", HEXCHAT_PRI_NORM, wmpaPrev, 0, 0);
hexchat_hook_command(ph, "song", HEXCHAT_PRI_NORM, wmpaSong, 0, 0);
hexchat_hook_command(ph, "stop", HEXCHAT_PRI_NORM, wmpaStop, 0, 0);
hexchat_hook_command(ph, "volume", HEXCHAT_PRI_NORM, wmpaVolume, 0, 0);
hexchat_hook_command(ph, "wmpahelp", HEXCHAT_PRI_NORM, wmpaHelp, 0, 0);
hexchat_printf(ph, "WMPA %s successfully loaded.", VER_STRING);
wmpaCommands();
hexchat_printf(ph, "WMPA: e-mail me if you find any bugs: dcullen@intergate.com");
return 1;
}
/******************************************************************
* hexchat_plugin_deinit
******************************************************************/
int hexchat_plugin_deinit(void)
{
BOOL success;
hexchat_printf(ph, "WMPA %s is unloading.", VER_STRING);
// Save the settings
success = wmpaSaveSettings();
if (!success) {
hexchat_printf(ph, "WMPA: Failed to save the settings.");
}
wmp = NULL;
BOOL result = StopWindowsMediaPlayer();
if (!result) {
hexchat_printf(ph, "WMPA could not shut down Windows Media Player.");
}
hexchat_printf(ph, "WMPA %s has unloaded.", VER_STRING);
return 1;
}
/******************************************************************
* hexchat_plugin_get_info
******************************************************************/
void hexchat_plugin_get_info(char **name, char **desc, char **version, void **reserved)
{
*name = "WMPA";
*desc = "Announce the current song from Windows Media Player.";
*version = VER_STRING;
if (reserved) *reserved = NULL;
}
/******************************************************************
* wmpaCommands
******************************************************************/
void wmpaCommands(void)
{
hexchat_printf(ph, "WMPA: /auto [on/off] : Turn on/off auto announce of the current song or display the current setting");
hexchat_printf(ph, "WMPA: /curr : Tell what song is currently playing");
hexchat_printf(ph, "WMPA: /find [word] : Find songs with \"word\" in their title, create a new playlist, and play it");
hexchat_printf(ph, "WMPA: /slist [word] : List songs with \"word\" in their title");
hexchat_printf(ph, "WMPA: /next : Play the next song");
hexchat_printf(ph, "WMPA: /play : Play the current song");
hexchat_printf(ph, "WMPA: /pause : Pause the current song");
hexchat_printf(ph, "WMPA: /prev : Play the previous song");
hexchat_printf(ph, "WMPA: /song : Announce the current song from Windows Media Player in HexChat");
hexchat_printf(ph, "WMPA: /stop : Stop the current song");
hexchat_printf(ph, "WMPA: /volume [volume] : Set the volume (0 to 100) or display the current volume");
hexchat_printf(ph, "WMPA: /wmpahelp : Display this help.");
}
/******************************************************************
* wmpaAuto
******************************************************************/
int wmpaAuto(char *word[], char *word_eol[], void *user_data)
{
CWMPADialog *pDialog;
char *state;
pDialog = GetWMPADialog();
if (pDialog == NULL) return(HEXCHAT_EAT_ALL);
if (CString(word[2]).IsEmpty()) {
if (pDialog->autoAnnounce) {
state = "on";
}
else {
state = "off";
}
}
else {
state = word[2];
if (CString(state) == "on") {
pDialog->autoAnnounce = TRUE;
}
if (CString(state) == "off") {
pDialog->autoAnnounce = FALSE;
}
wmpaSaveSettings();
}
hexchat_printf(ph, "WMPA: auto is %s", state);
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaCurr
******************************************************************/
int wmpaCurr(char *word[], char *word_eol[], void *user_data)
{
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaFind
******************************************************************/
int wmpaFind(char *word[], char *word_eol[], void *user_data)
{
long index;
long count;
long found;
if (wmp != NULL) {
CWMPMediaCollection mc = wmp->GetMediaCollection();
CWMPPlaylist all = mc.getAll();
CWMPPlaylistCollection pc = wmp->GetPlaylistCollection();
CWMPPlaylistArray pa = pc.getAll();
CWMPPlaylist playlist;
CWMPMedia media;
for (index = 0; index < pc.getAll().GetCount(); index++) {
if (pc.getAll().Item(index).GetName() == CString(word_eol[2])) {
playlist = pc.getAll().Item(index);
pc.remove(playlist);
}
}
playlist = pc.newPlaylist(word_eol[2]);
count = all.GetCount();
found = 0;
for (index = 0; index < count; index++) {
media = all.GetItem(index);
CString artist = media.getItemInfo("Artist");
CString title = media.getItemInfo("Title");
CString album = media.getItemInfo("Album");
if ( (artist.Find(word_eol[2]) != -1) ||
(title.Find(word_eol[2]) != -1) ||
(album.Find(word_eol[2]) != -1) ) {
playlist.appendItem(media);
found++;
}
}
if (found > 0) {
hexchat_printf(ph, "WMPA: Found %d songs with \"%s\" in them", found, word_eol[2]);
wmp->SetCurrentPlaylist(playlist);
wmp->GetControls().play();
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
CWMPADialog *dialog = GetWMPADialog();
if (dialog != NULL) {
dialog->UpdateSongList();
dialog->SelectCurrentSong();
dialog->UpdatePlayLists();
}
}
else {
hexchat_printf(ph, "WMPA: Could not find %s", word_eol[2]);
}
}
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaList
******************************************************************/
int wmpaList(char *word[], char *word_eol[], void *user_data)
{
long index;
long count;
long found;
if (wmp != NULL) {
hexchat_printf(ph, "WMPA: Listing songs with \"%s\" in them", word_eol[2]);
CWMPMediaCollection mc = wmp->GetMediaCollection();
CWMPPlaylist all = mc.getAll();
CWMPMedia media;
count = all.GetCount();
found = 0;
for (index = 0; index < count; index++) {
media = all.GetItem(index);
CString artist = media.getItemInfo("Artist");
CString title = media.getItemInfo("Title");
CString album = media.getItemInfo("Album");
if ( (artist.Find(word_eol[2]) != -1) ||
(title.Find(word_eol[2]) != -1) ||
(album.Find(word_eol[2]) != -1) ) {
hexchat_printf(ph, "WMPA: Found \"%s - %s (%s)\"", artist, title, album);
found++;
}
}
if (found > 0) {
if (found == 1)
hexchat_printf(ph, "WMPA: Found %d song with \"%s\" in it", found, word_eol[2]);
else
hexchat_printf(ph, "WMPA: Found %d songs with \"%s\" in them", found, word_eol[2]);
}
else {
hexchat_printf(ph, "WMPA: Could not find any songs with \"%s\" in them", word_eol[2]);
}
}
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaNext
******************************************************************/
int wmpaNext(char *word[], char *word_eol[], void *user_data)
{
if (wmp != NULL) {
wmp->GetControls().next();
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
}
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaPlay
******************************************************************/
int wmpaPlay(char *word[], char *word_eol[], void *user_data)
{
if (wmp != NULL) {
wmp->GetControls().play();
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
}
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaPause
******************************************************************/
int wmpaPause(char *word[], char *word_eol[], void *user_data)
{
if (wmp != NULL) {
wmp->GetControls().pause();
hexchat_printf(ph, "WMPA: Pausing %s", (LPCTSTR) wmpaGetSongTitle());
}
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaPrev
******************************************************************/
int wmpaPrev(char *word[], char *word_eol[], void *user_data)
{
if (wmp != NULL) {
wmp->GetControls().previous();
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
}
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaSong
******************************************************************/
int wmpaSong(char *word[], char *word_eol[], void *user_data)
{
CString songTitle = wmpaGetSongTitle();
hexchat_commandf(ph, "me is playing %s", (LPCTSTR) songTitle);
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaStop
******************************************************************/
int wmpaStop(char *word[], char *word_eol[], void *user_data)
{
if (wmp != NULL) {
wmp->GetControls().stop();
hexchat_printf(ph, "WMPA: Stopping %s", (LPCTSTR) wmpaGetSongTitle());
}
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaHelp
******************************************************************/
int wmpaHelp(char *word[], char *word_eol[], void *user_data)
{
hexchat_printf(ph, "\n");
hexchat_printf(ph, "WMPA %s Help", VER_STRING);
wmpaCommands();
hexchat_printf(ph, "\n");
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaVolume
******************************************************************/
int wmpaVolume(char *word[], char *word_eol[], void *user_data)
{
char *endPtr;
long volume;
if (CString(word[2]).IsEmpty()) {
volume = wmp->GetSettings().GetVolume();
}
else {
volume = strtol(word[2], &endPtr, 10);
if ((wmp != NULL) && (volume >= 0) && (volume <= 100)) {
wmp->GetSettings().SetVolume(volume);
wmpaSaveSettings();
}
}
hexchat_printf(ph, "WMPA: volume is %d", volume);
return(HEXCHAT_EAT_ALL);
}
/******************************************************************
* wmpaRestoreSettings
******************************************************************/
BOOL wmpaRestoreSettings(void)
{
CWMPADialog *pDialog;
DWORD type;
int volume;
BOOL autoAnnounce;
DWORD size;
BOOL result;
if (wmp == NULL) return(FALSE);
volume = 50;
result = GetSetting("Volume", &type, (LPBYTE) &volume, &size);
wmp->GetSettings().SetVolume(volume);
autoAnnounce = FALSE;
pDialog = GetWMPADialog();
if (pDialog != NULL) {
result = result && GetSetting("Auto", &type, (LPBYTE) &autoAnnounce, &size);
pDialog->autoAnnounce = autoAnnounce;
}
else {
result = FALSE;
}
return(result);
}
/******************************************************************
* wmpaSaveSettings
******************************************************************/
BOOL wmpaSaveSettings(void)
{
CWMPADialog *pDialog;
int volume;
BOOL autoAnnounce;
BOOL result;
if (wmp == NULL) return(FALSE);
volume = wmp->GetSettings().GetVolume();
result = SaveSetting("Volume", REG_DWORD, (CONST BYTE *) &volume, sizeof(volume));
pDialog = GetWMPADialog();
if (pDialog != NULL) {
autoAnnounce = pDialog->autoAnnounce;
result = result && SaveSetting("Auto", REG_DWORD, (CONST BYTE *) &autoAnnounce, sizeof(autoAnnounce));
}
else {
result = FALSE;
}
return(result);
}
/******************************************************************
* wmpaGetSongTitle
******************************************************************/
CString wmpaGetSongTitle(void)
{
char buffer[32];
if (wmp == NULL) return(CString());
CWMPMedia media = wmp->GetCurrentMedia();
if (media == NULL) {
hexchat_printf(ph, "WMPA: Could not get current media");
return(CString ("%d", HEXCHAT_EAT_ALL));
}
CString artist = media.getItemInfo("Artist");
CString title = media.getItemInfo("Title");
CString album = media.getItemInfo("Album");
CString bitrate = media.getItemInfo("Bitrate");
CString duration = media.GetDurationString();
long krate = strtoul((LPCTSTR) bitrate, NULL, 10) / 1000;
_ultoa(krate, buffer, 10);
bitrate = CString(buffer);
// Creatte the song title
CString songTitle("");
songTitle += artist;
if (songTitle.IsEmpty()) songTitle += "Various";
songTitle += " - ";
songTitle += title;
songTitle += " (";
songTitle += album;
songTitle += ") [";
songTitle += duration;
songTitle += "/";
songTitle += bitrate;
songTitle += "Kbps]";
return(songTitle);
}
/******************************************************************
* SaveSetting
******************************************************************/
BOOL SaveSetting(LPCTSTR name, DWORD type, CONST BYTE *value, DWORD size)
{
HKEY hKey;
DWORD disposition;
LONG result;
if (wmp == NULL) return(FALSE);
if (name == NULL) return(FALSE);
result = RegOpenKeyEx(HKEY_CURRENT_USER,
subKey,
0,
KEY_WRITE,
&hKey);
if (result != ERROR_SUCCESS) {
result = RegCreateKeyEx(HKEY_CURRENT_USER,
subKey,
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE,
NULL,
&hKey,
&disposition);
if (result != ERROR_SUCCESS) return(FALSE);
}
result = RegSetValueEx(hKey,
name,
0,
type,
value,
size);
if (result == ERROR_SUCCESS) {
RegCloseKey(hKey);
return(TRUE);
}
RegCloseKey(hKey);
return(FALSE);
}
/******************************************************************
* GetSetting
******************************************************************/
BOOL GetSetting(LPCTSTR name, DWORD *type, LPBYTE value, DWORD *size)
{
HKEY hKey;
LONG result;
if (wmp == NULL) return(FALSE);
if (type == NULL) return(FALSE);
if (value == NULL) return(FALSE);
if (size == NULL) return(FALSE);
result = RegOpenKeyEx(HKEY_CURRENT_USER,
subKey,
0,
KEY_READ,
&hKey);
if (result != ERROR_SUCCESS) return(FALSE);
result = RegQueryValueEx(hKey,
name,
0,
type,
value,
size);
RegCloseKey(hKey);
if (result == ERROR_SUCCESS) {
return(TRUE);
}
RegCloseKey(hKey);
return(FALSE);
}

View File

@ -1,361 +0,0 @@
/* You can distribute this header with your plugins for easy compilation */
#ifndef HEXCHAT_PLUGIN_H
#define HEXCHAT_PLUGIN_H
#define VER_STRING _T("1.0.2 (BETA)")
#include "stdafx.h"
#include <windows.h>
#include <time.h>
#include <tchar.h>
#define HEXCHAT_PRI_HIGHEST 127
#define HEXCHAT_PRI_HIGH 64
#define HEXCHAT_PRI_NORM 0
#define HEXCHAT_PRI_LOW (-64)
#define HEXCHAT_PRI_LOWEST (-128)
#define HEXCHAT_FD_READ 1
#define HEXCHAT_FD_WRITE 2
#define HEXCHAT_FD_EXCEPTION 4
#define HEXCHAT_FD_NOTSOCKET 8
#define HEXCHAT_EAT_NONE 0 /* pass it on through! */
#define HEXCHAT_EAT_HEXCHAT 1 /* don't let HexChat see this event */
#define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */
#define HEXCHAT_EAT_ALL (HEXCHAT_EAT_HEXCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _hexchat_plugin hexchat_plugin;
typedef struct _hexchat_list hexchat_list;
typedef struct _hexchat_hook hexchat_hook;
#ifndef PLUGIN_C
typedef struct _hexchat_context hexchat_context;
#endif
#ifndef PLUGIN_C
struct _hexchat_plugin {
/* these are only used on win32 */
hexchat_hook *(*hexchat_hook_command) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
const char *help_text,
void *userdata);
hexchat_hook *(*hexchat_hook_server) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_print) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_timer) (hexchat_plugin *ph,
int timeout,
int (*callback) (void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_fd) (hexchat_plugin *ph,
int fd,
int flags,
int (*callback) (int fd, int flags, void *user_data),
void *userdata);
void *(*hexchat_unhook) (hexchat_plugin *ph,
hexchat_hook *hook);
void (*hexchat_print) (hexchat_plugin *ph,
const char *text);
void (*hexchat_printf) (hexchat_plugin *ph,
const char *format, ...);
void (*hexchat_command) (hexchat_plugin *ph,
const char *command);
void (*hexchat_commandf) (hexchat_plugin *ph,
const char *format, ...);
int (*hexchat_nickcmp) (hexchat_plugin *ph,
const char *s1,
const char *s2);
int (*hexchat_set_context) (hexchat_plugin *ph,
hexchat_context *ctx);
hexchat_context *(*hexchat_find_context) (hexchat_plugin *ph,
const char *servname,
const char *channel);
hexchat_context *(*hexchat_get_context) (hexchat_plugin *ph);
const char *(*hexchat_get_info) (hexchat_plugin *ph,
const char *id);
int (*hexchat_get_prefs) (hexchat_plugin *ph,
const char *name,
const char **string,
int *integer);
hexchat_list * (*hexchat_list_get) (hexchat_plugin *ph,
const char *name);
void (*hexchat_list_free) (hexchat_plugin *ph,
hexchat_list *xlist);
const char * const * (*hexchat_list_fields) (hexchat_plugin *ph,
const char *name);
int (*hexchat_list_next) (hexchat_plugin *ph,
hexchat_list *xlist);
const char * (*hexchat_list_str) (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
int (*hexchat_list_int) (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
void * (*hexchat_plugingui_add) (hexchat_plugin *ph,
const char *filename,
const char *name,
const char *desc,
const char *version,
char *reserved);
void (*hexchat_plugingui_remove) (hexchat_plugin *ph,
void *handle);
int (*hexchat_emit_print) (hexchat_plugin *ph,
const char *event_name, ...);
int (*hexchat_read_fd) (hexchat_plugin *ph,
void *src,
char *buf,
int *len);
time_t (*hexchat_list_time) (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
char *(*hexchat_gettext) (hexchat_plugin *ph,
const char *msgid);
void (*hexchat_send_modes) (hexchat_plugin *ph,
const char **targets,
int ntargets,
int modes_per_line,
char sign,
char mode);
char *(*hexchat_strip) (hexchat_plugin *ph,
const char *str,
int len,
int flags);
void (*hexchat_free) (hexchat_plugin *ph,
void *ptr);
};
#endif
hexchat_hook *
hexchat_hook_command (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
const char *help_text,
void *userdata);
hexchat_hook *
hexchat_hook_server (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_print (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_timer (hexchat_plugin *ph,
int timeout,
int (*callback) (void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_fd (hexchat_plugin *ph,
int fd,
int flags,
int (*callback) (int fd, int flags, void *user_data),
void *userdata);
void *
hexchat_unhook (hexchat_plugin *ph,
hexchat_hook *hook);
void
hexchat_print (hexchat_plugin *ph,
const char *text);
void
hexchat_printf (hexchat_plugin *ph,
const char *format, ...);
void
hexchat_command (hexchat_plugin *ph,
const char *command);
void
hexchat_commandf (hexchat_plugin *ph,
const char *format, ...);
int
hexchat_nickcmp (hexchat_plugin *ph,
const char *s1,
const char *s2);
int
hexchat_set_context (hexchat_plugin *ph,
hexchat_context *ctx);
hexchat_context *
hexchat_find_context (hexchat_plugin *ph,
const char *servname,
const char *channel);
hexchat_context *
hexchat_get_context (hexchat_plugin *ph);
const char *
hexchat_get_info (hexchat_plugin *ph,
const char *id);
int
hexchat_get_prefs (hexchat_plugin *ph,
const char *name,
const char **string,
int *integer);
hexchat_list *
hexchat_list_get (hexchat_plugin *ph,
const char *name);
void
hexchat_list_free (hexchat_plugin *ph,
hexchat_list *xlist);
const char * const *
hexchat_list_fields (hexchat_plugin *ph,
const char *name);
int
hexchat_list_next (hexchat_plugin *ph,
hexchat_list *xlist);
const char *
hexchat_list_str (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
int
hexchat_list_int (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
time_t
hexchat_list_time (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
void *
hexchat_plugingui_add (hexchat_plugin *ph,
const char *filename,
const char *name,
const char *desc,
const char *version,
char *reserved);
void
hexchat_plugingui_remove (hexchat_plugin *ph,
void *handle);
int
hexchat_emit_print (hexchat_plugin *ph,
const char *event_name, ...);
char *
hexchat_gettext (hexchat_plugin *ph,
const char *msgid);
void
hexchat_send_modes (hexchat_plugin *ph,
const char **targets,
int ntargets,
int modes_per_line,
char sign,
char mode);
char *
hexchat_strip (hexchat_plugin *ph,
const char *str,
int len,
int flags);
void
hexchat_free (hexchat_plugin *ph,
void *ptr);
#if !defined(PLUGIN_C) && defined(WIN32)
#ifndef HEXCHAT_PLUGIN_HANDLE
#define HEXCHAT_PLUGIN_HANDLE (ph)
#endif
#define hexchat_hook_command ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_command)
#define hexchat_hook_server ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_server)
#define hexchat_hook_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_print)
#define hexchat_hook_timer ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_timer)
#define hexchat_hook_fd ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_fd)
#define hexchat_unhook ((HEXCHAT_PLUGIN_HANDLE)->hexchat_unhook)
#define hexchat_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_print)
#define hexchat_printf ((HEXCHAT_PLUGIN_HANDLE)->hexchat_printf)
#define hexchat_command ((HEXCHAT_PLUGIN_HANDLE)->hexchat_command)
#define hexchat_commandf ((HEXCHAT_PLUGIN_HANDLE)->hexchat_commandf)
#define hexchat_nickcmp ((HEXCHAT_PLUGIN_HANDLE)->hexchat_nickcmp)
#define hexchat_set_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_set_context)
#define hexchat_find_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_find_context)
#define hexchat_get_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_context)
#define hexchat_get_info ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_info)
#define hexchat_get_prefs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_prefs)
#define hexchat_list_get ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_get)
#define hexchat_list_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_free)
#define hexchat_list_fields ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_fields)
#define hexchat_list_str ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_str)
#define hexchat_list_int ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_int)
#define hexchat_list_time ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_time)
#define hexchat_list_next ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_next)
#define hexchat_plugingui_add ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_add)
#define hexchat_plugingui_remove ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_remove)
#define hexchat_emit_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_emit_print)
#define hexchat_gettext ((HEXCHAT_PLUGIN_HANDLE)->hexchat_gettext)
#define hexchat_send_modes ((HEXCHAT_PLUGIN_HANDLE)->hexchat_send_modes)
#define hexchat_strip ((HEXCHAT_PLUGIN_HANDLE)->hexchat_strip)
#define hexchat_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_free)
#endif
#ifdef __cplusplus
}
#endif
/******************************************************************
* Globals
******************************************************************/
extern hexchat_plugin *ph;
/******************************************************************
* Prototypes
******************************************************************/
void wmpaCommands(void);
int wmpaAuto(char *word[], char *word_eol[], void *user_data);
int wmpaCurr(char *word[], char *word_eol[], void *user_data);
int wmpaFind(char *word[], char *word_eol[], void *user_data);
int wmpaList(char *word[], char *word_eol[], void *user_data);
int wmpaNext(char *word[], char *word_eol[], void *user_data);
int wmpaPlay(char *word[], char *word_eol[], void *user_data);
int wmpaPause(char *word[], char *word_eol[], void *user_data);
int wmpaPrev(char *word[], char *word_eol[], void *user_data);
int wmpaSong(char *word[], char *word_eol[], void *user_data);
int wmpaStop(char *word[], char *word_eol[], void *user_data);
int wmpaVolume(char *word[], char *word_eol[], void *user_data);
int wmpaHelp(char *word[], char *word_eol[], void *user_data);
BOOL wmpaRestoreSettings(void);
BOOL wmpaSaveSettings(void);
CString wmpaGetSongTitle(void);
BOOL SaveSetting(LPCTSTR name, DWORD type, CONST BYTE *value, DWORD size);
BOOL GetSetting(LPCTSTR name, DWORD *type, LPBYTE value, DWORD *size);
#endif /* HEXCHAT_PLUGIN_H */

View File

@ -1,13 +0,0 @@
//
// WMPA.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////

View File

@ -1,22 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by wmpa.rc
//
#define IDD_WMPADIALOG 2000
#define IDC_PLAYLIST 2001
#define IDC_STATIC1 2002
#define IDC_WMP 2005
#define IDI_XCHAT 2005
#define IDC_SONGLIST 2006
#define IDC_STATIC2 2007
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 2006
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2008
#define _APS_NEXT_SYMED_VALUE 2000
#endif
#endif

View File

@ -1,212 +0,0 @@
/******************************************************************
* $Id$
*
* $Log$
*
* Copyright <20> 2005 David Cullen, All rights reserved
*
******************************************************************/
#include "stdafx.h"
#include "wmpa.h"
#include "WMPADialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
// Note!
//
// If this DLL is dynamically linked against the MFC
// DLLs, any functions exported from this DLL which
// call into MFC must have the AFX_MANAGE_STATE macro
// added at the very beginning of the function.
//
// For example:
//
// extern "C" BOOL PASCAL EXPORT ExportedFunction()
// {
// AFX_MANAGE_STATE(AfxGetStaticModuleState());
// // normal function body here
// }
//
// It is very important that this macro appear in each
// function, prior to any calls into MFC. This means that
// it must appear as the first statement within the
// function, even before any object variable declarations
// as their constructors may generate calls into the MFC
// DLL.
//
// Please see MFC Technical Notes 33 and 58 for additional
// details.
//
/////////////////////////////////////////////////////////////////////////////
// CWmpaApp
BEGIN_MESSAGE_MAP(CWmpaApp, CWinApp)
//{{AFX_MSG_MAP(CWmpaApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWmpaApp construction
CWmpaApp::CWmpaApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
m_pDialog = NULL;
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CWmpaApp object
CWmpaApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CWmpaApp initialization
BOOL CWmpaApp::InitInstance()
{
// Register all OLE server (factories) as running. This enables the
// OLE libraries to create objects from other applications.
COleObjectFactory::RegisterAll();
// WARNING: This function enables the ActiveX control container
// Without this function you will not be able to load the WMP
// In fact you will get the following error:
// >>> If this dialog has OLE controls:
// >>> AfxEnableControlContainer has not been called yet.
// >>> You should call it in your app's InitInstance function.
AfxEnableControlContainer();
// WARNING: This function initializes the COM library for use
// Without this function you will not be able to load the WMP
// In fact you will get the following error:
// CoCreateInstance of OLE control {6BF52A52-394A-11D3-B153-00C04F79FAA6} failed.
// >>> Result code: 0x800401f0
// >>> Is the control is properly registered?
// The Error Lookup tool will tell you result code 0x800401F0 means
// CoInitialize has not been called.
CoInitialize(NULL);
return TRUE;
}
/******************************************************************
* ShowWMPA
******************************************************************/
BOOL CWmpaApp::ShowWMPA(void)
{
HRESULT result = FALSE;
BOOL created;
// WARNING: The following two funcions make sure we look for
// our resources in our DLL not in the calling EXE
// Without these functions you will not be able to load the
// Windows Media Player
HMODULE hModule = GetModuleHandle("WMPA.DLL");
AfxSetResourceHandle((HINSTANCE) hModule);
if (m_pDialog == NULL) m_pDialog = new CWMPADialog;
created = m_pDialog->Create(IDD_WMPADIALOG, m_pDialog);
if (!created) return(E_FAIL);
m_pDialog->m_hIcon = LoadIcon(IDI_XCHAT);
m_pDialog->SetIcon(m_pDialog->m_hIcon, TRUE);
result = m_pDialog->ShowWindow(SW_SHOWNORMAL);
return(created);
}
/////////////////////////////////////////////////////////////////////////////
// Special entry points required for inproc servers
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllGetClassObject(rclsid, riid, ppv);
}
STDAPI DllCanUnloadNow(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllCanUnloadNow();
}
// by exporting DllRegisterServer, you can use regsvr.exe
STDAPI DllRegisterServer(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
COleObjectFactory::UpdateRegistryAll();
return(S_OK);
}
/******************************************************************
* DestroyWMPA
******************************************************************/
BOOL CWmpaApp::DestroyWMPA(void)
{
if (theApp.m_pDialog == NULL) return(FALSE);
theApp.m_pDialog->m_WMP.GetControls().stop();
theApp.m_pDialog->DeleteTrayIcon();
theApp.m_pDialog->DestroyWindow();
return(TRUE);
}
/******************************************************************
* StartWindowsMediaPlayer
******************************************************************/
BOOL StartWindowsMediaPlayer(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
BOOL result = theApp.ShowWMPA();
return(result);
}
/******************************************************************
* StopWindowsMediaPlayer
******************************************************************/
BOOL StopWindowsMediaPlayer(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
BOOL result = theApp.DestroyWMPA();
return(result);
}
/******************************************************************
* GetWindowsMediaPlayer
******************************************************************/
CWMPPlayer4 *GetWindowsMediaPlayer(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
if (theApp.m_pDialog == NULL) return(NULL);
return(&(theApp.m_pDialog->m_WMP));
}
/******************************************************************
* GetWMPADialog
******************************************************************/
CWMPADialog *GetWMPADialog(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
if (theApp.m_pDialog == NULL) return(NULL);
return(theApp.m_pDialog);
}

View File

@ -1,15 +0,0 @@
; wmpa.def : Declares the module parameters for the DLL.
LIBRARY "hcwmpa"
EXPORTS
; Explicit exports can go here
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllRegisterServer PRIVATE
hexchat_plugin_init
hexchat_plugin_deinit
hexchat_plugin_get_info
StartWindowsMediaPlayer
GetWindowsMediaPlayer
GetWMPADialog

View File

@ -1,61 +0,0 @@
/******************************************************************
* $Id$
*
* $Log$
*
* Copyright <20> 2005 David Cullen, All rights reserved
*
******************************************************************/
#if !defined(AFX_WMPA_H__11200FE3_F137_48DD_8020_91CF7BBB283B__INCLUDED_)
#define AFX_WMPA_H__11200FE3_F137_48DD_8020_91CF7BBB283B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#include "WMPADialog.h"
/////////////////////////////////////////////////////////////////////////////
// CWmpaApp
// See wmpa.cpp for the implementation of this class
//
class CWmpaApp : public CWinApp
{
public:
CWmpaApp();
BOOL ShowWMPA(void);
BOOL DestroyWMPA(void);
CWMPADialog *m_pDialog;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CWmpaApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
//{{AFX_MSG(CWmpaApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
BOOL StartWindowsMediaPlayer(void);
BOOL StopWindowsMediaPlayer(void);
CWMPPlayer4 *GetWindowsMediaPlayer(void);
CWMPADialog *GetWMPADialog(void);
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WMPA_H__11200FE3_F137_48DD_8020_91CF7BBB283B__INCLUDED_)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,44 +0,0 @@
// wmpa.odl : type library source for wmpa.dll
// This file will be processed by the MIDL compiler to produce the
// type library (wmpa.tlb).
[ uuid(2D225385-EFD3-4DD8-9377-A7F244C522D0), version(1.0) ]
library Wmpa
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
// Primary dispatch interface for CWMPADIALOG
[ uuid(01C1B3AA-C7FC-4023-89A5-C814E1B62B9B) ]
dispinterface IWMPADIALOG
{
properties:
// NOTE - ClassWizard will maintain property information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_PROP(CWMPADIALOG)
//}}AFX_ODL_PROP
methods:
// NOTE - ClassWizard will maintain method information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_METHOD(CWMPADIALOG)
//}}AFX_ODL_METHOD
};
// Class information for CWMPADIALOG
[ uuid(9007B1B4-0006-453D-A799-DB8CBA1AE22A) ]
coclass WMPADIALOG
{
[default] dispinterface IWMPADIALOG;
};
//{{AFX_APPEND_ODL}}
//}}AFX_APPEND_ODL}}
};

View File

@ -1,207 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\wmpa.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "wmpa DLL\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "wmpa\0"
VALUE "LegalCopyright", "Copyright (C) 2005\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "wmpa.DLL\0"
VALUE "ProductName", "wmpa Dynamic Link Library\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "OLESelfRegister", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_WMPADIALOG DIALOG DISCARDABLE 0, 0, 317, 236
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Unitialized"
FONT 8, "MS Sans Serif"
BEGIN
LISTBOX IDC_PLAYLIST,165,15,145,145,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
LTEXT "Play Lists (Double-click to play)",IDC_STATIC1,165,5,
145,10
CONTROL "",IDC_WMP,"{6BF52A52-394A-11D3-B153-00C04F79FAA6}",
WS_TABSTOP,5,5,155,155
LISTBOX IDC_SONGLIST,5,175,305,55,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Song List (Double-click to play)",IDC_STATIC2,5,165,305,
10
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_WMPADIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 310
TOPMARGIN, 7
BOTTOMMARGIN, 229
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
IDD_WMPADIALOG DLGINIT
BEGIN
IDC_WMP, 0x376, 166, 0
0x0000, 0x0000, 0x0300, 0x0000, 0x0008, 0x0000, 0x0000, 0x0005, 0x0000,
0x0000, 0x0000, 0x3ff0, 0x0003, 0x0000, 0x0000, 0x0005, 0x0000, 0x0000,
0x0000, 0x0000, 0x0008, 0x0002, 0x0000, 0x0000, 0x0003, 0x0001, 0x0000,
0x000b, 0xffff, 0x0003, 0x0000, 0x0000, 0x000b, 0xffff, 0x0008, 0x0002,
0x0000, 0x0000, 0x0003, 0x0032, 0x0000, 0x000b, 0x0000, 0x0008, 0x000a,
0x0000, 0x0066, 0x0075, 0x006c, 0x006c, 0x0000, 0x000b, 0x0000, 0x000b,
0x0000, 0x000b, 0xffff, 0x000b, 0xffff, 0x000b, 0x0000, 0x0008, 0x0002,
0x0000, 0x0000, 0x0008, 0x0002, 0x0000, 0x0000, 0x0008, 0x0002, 0x0000,
0x0000, 0x0008, 0x0002, 0x0000, 0x0000, 0x000b, 0x0000, 0x1815, 0x0000,
0x1a0c, 0x0000,
0
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
//
// the WMP icon comes from here:
// http://www.iconarchive.com/show/phuzion-icons-by-kyo-tux/Applic-WMP-icon.html
IDI_XCHAT ICON DISCARDABLE "wmpa.ico"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\wmpa.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wmpa", "wmpa.vcxproj", "{08AD7C4D-DDDC-9545-A8D7-1808E6056143}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08AD7C4D-DDDC-9545-A8D7-1808E6056143}.Release|Win32.ActiveCfg = Release|Win32
{08AD7C4D-DDDC-9545-A8D7-1808E6056143}.Release|Win32.Build.0 = Release|Win32
{08AD7C4D-DDDC-9545-A8D7-1808E6056143}.Release|x64.ActiveCfg = Release|x64
{08AD7C4D-DDDC-9545-A8D7-1808E6056143}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,160 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E7F4DB0A-510D-41EF-B284-6E1DE1CC450D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>wmpa</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcwmpa</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcwmpa</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Create</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WMPA_EXPORTS;_AFXDLL;_AFX_NO_DAO_SUPPORT;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>wmpa.def</ModuleDefinitionFile>
</Link>
<Midl>
<MkTypLibCompatible>true</MkTypLibCompatible>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Create</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;WMPA_EXPORTS;_AFXDLL;_AFX_NO_DAO_SUPPORT;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>wmpa.def</ModuleDefinitionFile>
</Link>
<Midl>
<MkTypLibCompatible>true</MkTypLibCompatible>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="StdAfx.cpp" />
<ClCompile Include="wmpa.cpp" />
<ClCompile Include="wmpadialog.cpp" />
<ClCompile Include="wmpcdrom.cpp" />
<ClCompile Include="wmpcdromcollection.cpp" />
<ClCompile Include="wmpclosedcaption.cpp" />
<ClCompile Include="wmpcontrols.cpp" />
<ClCompile Include="wmpdvd.cpp" />
<ClCompile Include="wmperror.cpp" />
<ClCompile Include="wmperroritem.cpp" />
<ClCompile Include="wmpmedia.cpp" />
<ClCompile Include="wmpmediacollection.cpp" />
<ClCompile Include="wmpnetwork.cpp" />
<ClCompile Include="wmpplayer4.cpp" />
<ClCompile Include="wmpplayerapplication.cpp" />
<ClCompile Include="wmpplaylist.cpp" />
<ClCompile Include="wmpplaylistarray.cpp" />
<ClCompile Include="wmpplaylistcollection.cpp" />
<ClCompile Include="wmpsettings.cpp" />
<ClCompile Include="wmpstringcollection.cpp" />
<ClCompile Include="hexchat-plugin.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
<ClInclude Include="StdAfx.h" />
<ClInclude Include="wmpa.h" />
<ClInclude Include="wmpadialog.h" />
<ClInclude Include="wmpcdrom.h" />
<ClInclude Include="wmpcdromcollection.h" />
<ClInclude Include="wmpclosedcaption.h" />
<ClInclude Include="wmpcontrols.h" />
<ClInclude Include="wmpdvd.h" />
<ClInclude Include="wmperror.h" />
<ClInclude Include="wmperroritem.h" />
<ClInclude Include="wmpmedia.h" />
<ClInclude Include="wmpmediacollection.h" />
<ClInclude Include="wmpnetwork.h" />
<ClInclude Include="wmpplayer4.h" />
<ClInclude Include="wmpplayerapplication.h" />
<ClInclude Include="wmpplaylist.h" />
<ClInclude Include="wmpplaylistarray.h" />
<ClInclude Include="wmpplaylistcollection.h" />
<ClInclude Include="wmpsettings.h" />
<ClInclude Include="wmpstringcollection.h" />
<ClInclude Include="hexchat-plugin.h" />
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
<None Include="res\wmpa.rc2" />
<None Include="wmpa.aps" />
<None Include="wmpa.def" />
<None Include="wmpa.ico" />
</ItemGroup>
<ItemGroup>
<Midl Include="wmpa.odl" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="wmpa.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,180 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Resource Files\res">
<UniqueIdentifier>{c54ddc93-06ab-4a74-854a-9ec976b7bfd0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="StdAfx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpa.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpadialog.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpcdrom.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpcdromcollection.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpclosedcaption.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpcontrols.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpdvd.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmperror.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmperroritem.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpmedia.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpmediacollection.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpnetwork.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpplayer4.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpplayerapplication.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpplaylist.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpplaylistarray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpplaylistcollection.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpsettings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wmpstringcollection.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hexchat-plugin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="StdAfx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpadialog.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpcdrom.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpcdromcollection.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpclosedcaption.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpcontrols.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpdvd.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmperror.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmperroritem.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpmedia.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpmediacollection.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpnetwork.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpplayer4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpplayerapplication.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpplaylist.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpplaylistarray.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpplaylistcollection.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpsettings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wmpstringcollection.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hexchat-plugin.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="wmpa.aps">
<Filter>Resource Files</Filter>
</None>
<None Include="wmpa.def">
<Filter>Resource Files</Filter>
</None>
<None Include="wmpa.ico">
<Filter>Resource Files</Filter>
</None>
<None Include="ReadMe.txt">
<Filter>Resource Files</Filter>
</None>
<None Include="res\wmpa.rc2">
<Filter>Resource Files\res</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Midl Include="wmpa.odl">
<Filter>Resource Files</Filter>
</Midl>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="wmpa.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -1,375 +0,0 @@
/******************************************************************
* $Id$
*
* $Log$
*
* Copyright <20> 2005 David Cullen, All rights reserved
*
******************************************************************/
#include "stdafx.h"
#include "wmpa.h"
#include "WMPADialog.h"
#include "shellapi.h"
#include "hexchat-plugin.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define ID_TRAY_ICON 1000
#define WM_TRAY_ICON (WM_APP + 1)
/////////////////////////////////////////////////////////////////////////////
// CWMPADialog dialog
CWMPADialog::CWMPADialog(CWnd* pParent /*=NULL*/)
: CDialog(CWMPADialog::IDD, pParent)
{
EnableAutomation();
//{{AFX_DATA_INIT(CWMPADialog)
//}}AFX_DATA_INIT
}
void CWMPADialog::OnFinalRelease()
{
// When the last reference for an automation object is released
// OnFinalRelease is called. The base class will automatically
// deletes the object. Add additional cleanup required for your
// object before calling the base class.
CDialog::OnFinalRelease();
}
void CWMPADialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWMPADialog)
DDX_Control(pDX, IDC_SONGLIST, m_SongListBox);
DDX_Control(pDX, IDC_PLAYLIST, m_PlaylistBox);
DDX_Control(pDX, IDC_WMP, m_WMP);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CWMPADialog, CDialog)
//{{AFX_MSG_MAP(CWMPADialog)
ON_LBN_DBLCLK(IDC_PLAYLIST, OnDblclkPlaylist)
ON_WM_SHOWWINDOW()
ON_WM_CLOSE()
ON_LBN_DBLCLK(IDC_SONGLIST, OnDblclkSonglist)
ON_WM_DESTROY()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CWMPADialog, CDialog)
//{{AFX_DISPATCH_MAP(CWMPADialog)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
// Note: we add support for IID_IWMPADialog to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {01C1B3AA-C7FC-4023-89A5-C814E1B62B9B}
static const IID IID_IWMPADialog =
{ 0x1c1b3aa, 0xc7fc, 0x4023, { 0x89, 0xa5, 0xc8, 0x14, 0xe1, 0xb6, 0x2b, 0x9b } };
BEGIN_INTERFACE_MAP(CWMPADialog, CDialog)
INTERFACE_PART(CWMPADialog, IID_IWMPADialog, Dispatch)
END_INTERFACE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWMPADialog message handlers
void CWMPADialog::OnDblclkPlaylist()
{
// TODO: Add your control notification handler code here
long index;
// Get the playlist name
index = m_PlaylistBox.GetCurSel();
CString playlistName;
m_PlaylistBox.GetText(index, playlistName);
// Get the playlist
CWMPPlaylistCollection pc = m_WMP.GetPlaylistCollection();
CWMPPlaylistArray pa = pc.getByName((LPCTSTR) playlistName);
CWMPPlaylist playlist = pa.Item(0);
m_WMP.SetCurrentPlaylist(playlist);
// Set the song list
UpdateSongList();
m_WMP.GetControls().play();
if (autoAnnounce) {
hexchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());
}
else {
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
}
}
void CWMPADialog::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
// TODO: Add your message handler code here
if (bShow) {
if (!trayInit) {
ZeroMemory(&nid, sizeof(nid));
nid.cbSize = sizeof(nid);
nid.hWnd = m_hWnd;
nid.uID = ID_TRAY_ICON;
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nid.uCallbackMessage = WM_TRAY_ICON;
nid.hIcon = m_hIcon;
strcpy(nid.szTip, "WMPA");
strcat(nid.szTip, VER_STRING);
strcat(nid.szTip, "\nWindows Media\nPlayer Announcer");
nid.dwState = 0;
nid.dwStateMask = 0;
strcpy(nid.szInfo, "WMPA ");
strcat(nid.szInfo, VER_STRING);
nid.uTimeout = 10000; // 10 second time out
strcat(nid.szInfoTitle, "WMPA");
nid.dwInfoFlags = 0;
trayInit = TRUE;
}
}
}
void CWMPADialog::PostNcDestroy()
{
// TODO: Add your specialized code here and/or call the base class
delete this;
CDialog::PostNcDestroy();
}
BOOL CWMPADialog::OnInitDialog()
{
CDialog::OnInitDialog();
CString title = "WMPA";
title += " ";
title += VER_STRING;
SetWindowText((LPCTSTR) title);
UpdatePlayLists();
autoAnnounce = FALSE;
trayInit = FALSE;
trayClicked = FALSE;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CWMPADialog::OnClose()
{
// TODO: Add your message handler code here and/or call default
Shell_NotifyIcon(NIM_ADD, &nid);
ShowWindow(SW_HIDE);
// Don't let the user close the dialog
// CDialog::OnClose();
}
void CWMPADialog::OnCancel()
{
// this->DestroyWindow();
}
void CWMPADialog::OnDblclkSonglist()
{
// TODO: Add your control notification handler code here
int index = m_SongListBox.GetCurSel();
m_WMP.GetControls().playItem(m_WMP.GetCurrentPlaylist().GetItem(index));
if (autoAnnounce) {
hexchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());
}
else {
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
}
}
BEGIN_EVENTSINK_MAP(CWMPADialog, CDialog)
//{{AFX_EVENTSINK_MAP(CWMPADialog)
ON_EVENT(CWMPADialog, IDC_WMP, 5806 /* CurrentItemChange */, OnCurrentItemChangeWmp, VTS_DISPATCH)
ON_EVENT(CWMPADialog, IDC_WMP, 5101 /* PlayStateChange */, OnPlayStateChangeWmp, VTS_I4)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()
void CWMPADialog::OnCurrentItemChangeWmp(LPDISPATCH pdispMedia)
{
// TODO: Add your control notification handler code here
int state = m_WMP.GetPlayState();
if (state == 3) { // Playing
if (autoAnnounce) {
hexchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());
}
else {
hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
}
}
SelectCurrentSong();
}
void CWMPADialog::OnDestroy()
{
CDialog::OnDestroy();
// TODO: Add your message handler code here
}
void CWMPADialog::UpdateSongList()
{
char buffer[32];
CString name;
CString artist;
CString title;
CString album;
CString bitrate;
CString duration;
CString song;
long index;
long count;
m_SongListBox.ResetContent();
CWMPPlaylist playlist = m_WMP.GetCurrentPlaylist();
count = playlist.GetCount();
m_SongListBox.ResetContent();
for (index = 0; index < count; index++) {
name = playlist.GetItem(index).GetName();
artist = playlist.GetItem(index).getItemInfo("Artist");
title = playlist.GetItem(index).getItemInfo("Title");
album = playlist.GetItem(index).getItemInfo("Album");
bitrate = playlist.GetItem(index).getItemInfo("Bitrate");
duration = playlist.GetItem(index).GetDurationString();
long krate = strtoul((LPCTSTR) bitrate, NULL, 10) / 1000;
_ultoa(krate, buffer, 10);
bitrate = CString(buffer);
if (album.IsEmpty()) {
playlist.removeItem(playlist.GetItem(index));
count = playlist.GetCount();
}
else {
song = "";
song += artist;
if (song.IsEmpty()) song = "Various";
song += " - ";
song += title;
song += " (";
song += album;
song += ") [";
song += duration;
song += "/";
song += bitrate;
song += "Kbps]";
m_SongListBox.AddString((LPCTSTR) song);
}
}
m_SongListBox.SetCurSel(0);
}
void CWMPADialog::SelectCurrentSong()
{
CWMPMedia media;
long index;
long count;
count = m_WMP.GetCurrentPlaylist().GetCount();
for (index = 0; index < count; index++) {
media = m_WMP.GetCurrentPlaylist().GetItem(index);
if (m_WMP.GetCurrentMedia().GetIsIdentical(media)) {
m_SongListBox.SetCurSel(index);
}
}
}
void CWMPADialog::UpdatePlayLists()
{
// TODO: Add extra initialization here
CWMPPlaylistCollection pc = m_WMP.GetPlaylistCollection();
CWMPPlaylistArray pa = pc.getAll();
CWMPPlaylist playlist;
int index;
int count = pa.GetCount();
m_PlaylistBox.ResetContent();
for (index = 0; index < count; index++) {
playlist = pa.Item(index);
m_PlaylistBox.AddString((LPCTSTR) playlist.GetName());
}
}
void CWMPADialog::OnPlayStateChangeWmp(long NewState)
{
// TODO: Add your control notification handler code here
}
void CWMPADialog::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
switch (nType) {
case SIZE_MINIMIZED:
break;
case SIZE_RESTORED:
Shell_NotifyIcon(NIM_DELETE, &nid);
break;
default:
break;
}
}
LRESULT CWMPADialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
switch (message) {
case WM_TRAY_ICON:
switch (lParam) {
case WM_LBUTTONDBLCLK:
trayClicked = TRUE;
break;
case WM_LBUTTONUP:
if (trayClicked == TRUE) {
ShowWindow(SW_RESTORE);
}
break;
default:
trayClicked = FALSE;
break;
}
return(TRUE);
break;
default:
return CDialog::WindowProc(message, wParam, lParam);
break;
}
}
void CWMPADialog::DeleteTrayIcon()
{
Shell_NotifyIcon(NIM_DELETE, &nid);
}

View File

@ -1,91 +0,0 @@
/******************************************************************
* $Id$
*
* $Log$
*
* Copyright <20> 2005 David Cullen, All rights reserved
*
******************************************************************/
//{{AFX_INCLUDES()
#include "wmpplayer4.h"
//}}AFX_INCLUDES
#if !defined(AFX_WMPADIALOG_H__D3838BCC_9E26_4FC0_BD42_C8D8EDF057E3__INCLUDED_)
#define AFX_WMPADIALOG_H__D3838BCC_9E26_4FC0_BD42_C8D8EDF057E3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// WMPADialog.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CWMPADialog dialog
class CWMPADialog : public CDialog
{
// Construction
public:
CWMPADialog(CWnd* pParent = NULL); // standard constructor
virtual void OnCancel();
void UpdatePlayLists();
void UpdateSongList();
void SelectCurrentSong();
void DeleteTrayIcon();
BOOL autoAnnounce;
HICON m_hIcon;
private:
BOOL trayInit;
BOOL trayClicked;
NOTIFYICONDATA nid;
public:
// Dialog Data
//{{AFX_DATA(CWMPADialog)
enum { IDD = IDD_WMPADIALOG };
CListBox m_SongListBox;
CListBox m_PlaylistBox;
CWMPPlayer4 m_WMP;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CWMPADialog)
public:
virtual void OnFinalRelease();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void PostNcDestroy();
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CWMPADialog)
afx_msg void OnDblclkPlaylist();
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
virtual BOOL OnInitDialog();
afx_msg void OnClose();
afx_msg void OnDblclkSonglist();
afx_msg void OnCurrentItemChangeWmp(LPDISPATCH pdispMedia);
afx_msg void OnDestroy();
afx_msg void OnPlayStateChangeWmp(long NewState);
afx_msg void OnSize(UINT nType, int cx, int cy);
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Generated OLE dispatch map functions
//{{AFX_DISPATCH(CWMPADialog)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
DECLARE_INTERFACE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WMPADIALOG_H__D3838BCC_9E26_4FC0_BD42_C8D8EDF057E3__INCLUDED_)

View File

@ -1,37 +0,0 @@
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "wmpcdrom.h"
// Dispatch interfaces referenced by this interface
#include "wmpplaylist.h"
/////////////////////////////////////////////////////////////////////////////
// CWMPCdrom properties
/////////////////////////////////////////////////////////////////////////////
// CWMPCdrom operations
CString CWMPCdrom::GetDriveSpecifier()
{
CString result;
InvokeHelper(0xfb, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
CWMPPlaylist CWMPCdrom::GetPlaylist()
{
LPDISPATCH pDispatch;
InvokeHelper(0xfc, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
return CWMPPlaylist(pDispatch);
}
void CWMPCdrom::eject()
{
InvokeHelper(0xfd, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

View File

@ -1,39 +0,0 @@
#if !defined(AFX_WMPCDROM_H__B7B13CE9_E69E_4D54_9370_CCA2D4A42532__INCLUDED_)
#define AFX_WMPCDROM_H__B7B13CE9_E69E_4D54_9370_CCA2D4A42532__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
// Dispatch interfaces referenced by this interface
class CWMPPlaylist;
/////////////////////////////////////////////////////////////////////////////
// CWMPCdrom wrapper class
class CWMPCdrom : public COleDispatchDriver
{
public:
CWMPCdrom() {} // Calls COleDispatchDriver default constructor
CWMPCdrom(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
CWMPCdrom(const CWMPCdrom& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
CString GetDriveSpecifier();
CWMPPlaylist GetPlaylist();
void eject();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WMPCDROM_H__B7B13CE9_E69E_4D54_9370_CCA2D4A42532__INCLUDED_)

View File

@ -1,45 +0,0 @@
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "wmpcdromcollection.h"
// Dispatch interfaces referenced by this interface
#include "WMPCdrom.h"
/////////////////////////////////////////////////////////////////////////////
// CWMPCdromCollection properties
/////////////////////////////////////////////////////////////////////////////
// CWMPCdromCollection operations
long CWMPCdromCollection::GetCount()
{
long result;
InvokeHelper(0x12d, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
CWMPCdrom CWMPCdromCollection::Item(long lIndex)
{
LPDISPATCH pDispatch;
static BYTE parms[] =
VTS_I4;
InvokeHelper(0x12e, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
lIndex);
return CWMPCdrom(pDispatch);
}
CWMPCdrom CWMPCdromCollection::getByDriveSpecifier(LPCTSTR bstrDriveSpecifier)
{
LPDISPATCH pDispatch;
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x12f, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
bstrDriveSpecifier);
return CWMPCdrom(pDispatch);
}

View File

@ -1,39 +0,0 @@
#if !defined(AFX_WMPCDROMCOLLECTION_H__35F03E65_DBA5_47A8_84C1_DAA3D624A4D3__INCLUDED_)
#define AFX_WMPCDROMCOLLECTION_H__35F03E65_DBA5_47A8_84C1_DAA3D624A4D3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
// Dispatch interfaces referenced by this interface
class CWMPCdrom;
/////////////////////////////////////////////////////////////////////////////
// CWMPCdromCollection wrapper class
class CWMPCdromCollection : public COleDispatchDriver
{
public:
CWMPCdromCollection() {} // Calls COleDispatchDriver default constructor
CWMPCdromCollection(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
CWMPCdromCollection(const CWMPCdromCollection& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
long GetCount();
CWMPCdrom Item(long lIndex);
CWMPCdrom getByDriveSpecifier(LPCTSTR bstrDriveSpecifier);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WMPCDROMCOLLECTION_H__35F03E65_DBA5_47A8_84C1_DAA3D624A4D3__INCLUDED_)

View File

@ -1,75 +0,0 @@
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "wmpclosedcaption.h"
/////////////////////////////////////////////////////////////////////////////
// CWMPClosedCaption properties
/////////////////////////////////////////////////////////////////////////////
// CWMPClosedCaption operations
CString CWMPClosedCaption::GetSAMIStyle()
{
CString result;
InvokeHelper(0x3b7, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void CWMPClosedCaption::SetSAMIStyle(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x3b7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
CString CWMPClosedCaption::GetSAMILang()
{
CString result;
InvokeHelper(0x3b8, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void CWMPClosedCaption::SetSAMILang(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x3b8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
CString CWMPClosedCaption::GetSAMIFileName()
{
CString result;
InvokeHelper(0x3b9, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void CWMPClosedCaption::SetSAMIFileName(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x3b9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
CString CWMPClosedCaption::GetCaptioningId()
{
CString result;
InvokeHelper(0x3ba, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void CWMPClosedCaption::SetCaptioningId(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x3ba, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}

View File

@ -1,40 +0,0 @@
#if !defined(AFX_WMPCLOSEDCAPTION_H__FC0A9836_7517_4898_B25C_74C76E80CE3D__INCLUDED_)
#define AFX_WMPCLOSEDCAPTION_H__FC0A9836_7517_4898_B25C_74C76E80CE3D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
/////////////////////////////////////////////////////////////////////////////
// CWMPClosedCaption wrapper class
class CWMPClosedCaption : public COleDispatchDriver
{
public:
CWMPClosedCaption() {} // Calls COleDispatchDriver default constructor
CWMPClosedCaption(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
CWMPClosedCaption(const CWMPClosedCaption& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
CString GetSAMIStyle();
void SetSAMIStyle(LPCTSTR lpszNewValue);
CString GetSAMILang();
void SetSAMILang(LPCTSTR lpszNewValue);
CString GetSAMIFileName();
void SetSAMIFileName(LPCTSTR lpszNewValue);
CString GetCaptioningId();
void SetCaptioningId(LPCTSTR lpszNewValue);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WMPCLOSEDCAPTION_H__FC0A9836_7517_4898_B25C_74C76E80CE3D__INCLUDED_)

View File

@ -1,123 +0,0 @@
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "wmpcontrols.h"
// Dispatch interfaces referenced by this interface
#include "wmpmedia.h"
/////////////////////////////////////////////////////////////////////////////
// CWMPControls properties
/////////////////////////////////////////////////////////////////////////////
// CWMPControls operations
BOOL CWMPControls::GetIsAvailable(LPCTSTR bstrItem)
{
BOOL result;
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x3e, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, parms,
bstrItem);
return result;
}
void CWMPControls::play()
{
InvokeHelper(0x33, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPControls::stop()
{
InvokeHelper(0x34, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPControls::pause()
{
InvokeHelper(0x35, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPControls::fastForward()
{
InvokeHelper(0x36, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPControls::fastReverse()
{
InvokeHelper(0x37, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
double CWMPControls::GetCurrentPosition()
{
double result;
InvokeHelper(0x38, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL);
return result;
}
void CWMPControls::SetCurrentPosition(double newValue)
{
static BYTE parms[] =
VTS_R8;
InvokeHelper(0x38, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
newValue);
}
CString CWMPControls::GetCurrentPositionString()
{
CString result;
InvokeHelper(0x39, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void CWMPControls::next()
{
InvokeHelper(0x3a, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPControls::previous()
{
InvokeHelper(0x3b, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
CWMPMedia CWMPControls::GetCurrentItem()
{
LPDISPATCH pDispatch;
InvokeHelper(0x3c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
return CWMPMedia(pDispatch);
}
void CWMPControls::SetCurrentItem(LPDISPATCH newValue)
{
static BYTE parms[] =
VTS_DISPATCH;
InvokeHelper(0x3c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
newValue);
}
long CWMPControls::GetCurrentMarker()
{
long result;
InvokeHelper(0x3d, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
void CWMPControls::SetCurrentMarker(long nNewValue)
{
static BYTE parms[] =
VTS_I4;
InvokeHelper(0x3d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
nNewValue);
}
void CWMPControls::playItem(LPDISPATCH pIWMPMedia)
{
static BYTE parms[] =
VTS_DISPATCH;
InvokeHelper(0x3f, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
pIWMPMedia);
}

View File

@ -1,52 +0,0 @@
#if !defined(AFX_WMPCONTROLS_H__234DACEF_6ED9_481D_B7E8_03653189E9B2__INCLUDED_)
#define AFX_WMPCONTROLS_H__234DACEF_6ED9_481D_B7E8_03653189E9B2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
// Dispatch interfaces referenced by this interface
class CWMPMedia;
/////////////////////////////////////////////////////////////////////////////
// CWMPControls wrapper class
class CWMPControls : public COleDispatchDriver
{
public:
CWMPControls() {} // Calls COleDispatchDriver default constructor
CWMPControls(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
CWMPControls(const CWMPControls& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
BOOL GetIsAvailable(LPCTSTR bstrItem);
void play();
void stop();
void pause();
void fastForward();
void fastReverse();
double GetCurrentPosition();
void SetCurrentPosition(double newValue);
CString GetCurrentPositionString();
void next();
void previous();
CWMPMedia GetCurrentItem();
void SetCurrentItem(LPDISPATCH newValue);
long GetCurrentMarker();
void SetCurrentMarker(long nNewValue);
void playItem(LPDISPATCH pIWMPMedia);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WMPCONTROLS_H__234DACEF_6ED9_481D_B7E8_03653189E9B2__INCLUDED_)

View File

@ -1,52 +0,0 @@
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "wmpdvd.h"
/////////////////////////////////////////////////////////////////////////////
// CWMPDVD properties
/////////////////////////////////////////////////////////////////////////////
// CWMPDVD operations
BOOL CWMPDVD::GetIsAvailable(LPCTSTR bstrItem)
{
BOOL result;
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x3e9, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, parms,
bstrItem);
return result;
}
CString CWMPDVD::GetDomain()
{
CString result;
InvokeHelper(0x3ea, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void CWMPDVD::topMenu()
{
InvokeHelper(0x3eb, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPDVD::titleMenu()
{
InvokeHelper(0x3ec, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPDVD::back()
{
InvokeHelper(0x3ed, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CWMPDVD::resume()
{
InvokeHelper(0x3ee, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

Some files were not shown because too many files have changed in this diff Show More