Commit Graph

334 Commits

Author SHA1 Message Date
nathan
cb2702922a Fixed typo with loading libappindicator1, added comments 2016-12-12 01:08:34 +01:00
nathan
82b148e32b Updated comments 2016-12-11 23:42:14 +01:00
nathan
c57533dde8 Added extra checks in case XDG_CURRENT_DESKTOP is not available as a
system environment
2016-12-11 23:37:45 +01:00
nathan
51615c9961 Fixed issues with SWT+Swing on MacOSX (by forcing native menus in
that combo. They cannot work together by design)
2016-12-11 00:49:03 +01:00
nathan
80c451b807 Tweaked var name 2016-12-11 00:46:24 +01:00
nathan
9c2e9229ab Fixed issue with SWT onShutdown hook 2016-12-11 00:04:01 +01:00
nathan
9591362580 SWT behaves better on linux now. Added Swt.isEventThread method 2016-12-10 23:38:45 +01:00
nathan
39ddd235f6 Fixed logging if we cannot init javaFX 2016-12-10 23:38:08 +01:00
nathan
54fb3a0d1d Fixed issues around java7/8 with macOSX and JavaFX 2016-12-10 22:14:15 +01:00
nathan
26e985e032 Added warnings if incompatible javaFX + MacOSX versions detection
(with options)
2016-12-10 21:55:53 +01:00
nathan
760913491f Fixed issue with macOSX right click bug 2016-12-10 21:55:18 +01:00
nathan
d9c54ccd86 Removed extra ; 2016-12-10 19:56:59 +01:00
nathan
9c52309c06 Fixed typo in mac class 2016-12-10 01:33:16 +01:00
nathan
06b3da9831 Fixed issues with EDT & mac with image utils 2016-12-10 00:56:53 +01:00
nathan
28ce208594 Updated comments 2016-10-31 12:17:55 +01:00
nathan
fef02fba79 Code cleanup/polish. Can now add JMenu, JCheckboxMenuItem,
JSeparator, and JMenuItem as components that will get converted and
added to our menu.
2016-10-31 11:32:49 +01:00
nathan
568fb95ee6 Cleaned up caching - now is based on file hash, instead of cache
names, which could lead to heisenbugs. Everything always caches now
based on hash of input
2016-10-24 02:39:40 +02:00
nathan
3fe57cd10d Set tray back to auto-detect 2016-10-24 01:52:49 +02:00
nathan
3c5f05146d Added comments 2016-10-24 01:50:16 +02:00
nathan
599dabf4ef Code polish, documentation, cleanup for API changes 2016-10-24 01:43:32 +02:00
nathan
daff5a8e48 Fininshed round 2 of API changes (native/swing UI finished) 2016-10-23 23:27:13 +02:00
nathan
d665f29f28 new API front-end + bound backend for SwingUI 2016-10-21 12:36:55 +02:00
nathan
86d031ed7c Added better detection for click-jack detection on MacOS. 2016-10-17 12:07:56 +02:00
nathan
a07c5e8ab8 Changed action callback to ActionListener. Added checkbox. 2016-10-17 11:47:25 +02:00
nathan
4e47c5d263 Cleaned up comments 2016-10-16 21:26:39 +02:00
nathan
5bed7ea659 Cleaned up comments 2016-10-16 21:22:56 +02:00
nathan
2f63829139 Moved system-properties debug output. Fixed "fixMacClick" logic 2016-10-16 21:21:24 +02:00
nathan
6d256c8346 Mac SystemTray now correctly overwrites the button click when it was
a re-dispatched click (to support using both left+right mouse clicks)
2016-10-16 21:19:17 +02:00
nathan
c01b560c06 code cleanup, Fixed MacOS SystemTray popup trigger (it now will show
on left and right click, but THERE IS NO DISTINCTION between which
button caused it to show, it will always say it was left mouse)
2016-10-16 21:07:30 +02:00
nathan
a26522411e Code cleanup, GTK.dispatchAndWait refactor, fixed issue with hiding
the tray icon in MacOSx.
2016-10-16 15:58:02 +02:00
nathan
e52591a388 Code polish, cleaned up comments, can recreate after shutdown 2016-10-15 14:16:56 +02:00
nathan
4ad6aa2632 GnomeShell extension provider for the systemTray (code not removed
because functionality will be part of UI options for app).
2016-10-15 14:15:41 +02:00
nathan
bdd3bbf671 Fixed GTK display issues and race conditions in certain Linux
configurations
2016-10-15 14:14:11 +02:00
nathan
0f7ffe1866 Removed no-longer needed debug 2016-10-15 14:13:21 +02:00
nathan
17fad2acfd gnome shell extension will only try to copy over if it doesn't
already exist
2016-10-12 20:42:53 +02:00
nathan
2f96eb21d9 Added exception for when the gnome shell extension.js file is not found 2016-10-12 20:38:08 +02:00
nathan
313ad5a127 More info to DEBUG + docs 2016-10-12 20:33:25 +02:00
nathan
109def7db2 WIP: Getting windows DPI checks in order. 2016-10-12 19:14:44 +02:00
nathan
01f3e0e90a Fixed logic for AWT tray implelmentions 2016-10-12 18:18:21 +02:00
nathan
c6ade0a371 Added comments 2016-10-12 18:13:33 +02:00
nathan
59669bc867 Fixed issues when running JavaFX or SWT on the swing EDT. 2016-10-12 18:09:17 +02:00
nathan
bc4d22c586 useNativeMenus is now a parameter for init 2016-10-12 15:27:13 +02:00
nathan
ecf349f189 SystemTray.get() is now swing UI 2016-10-12 15:23:00 +02:00
nathan
7a2909abca WIP: native + swing menus 2016-10-11 15:23:58 +02:00
nathan
7e3fba9157 Removed dead code 2016-10-10 23:48:13 +02:00
nathan
d08904d634 Code cleanup 2016-10-10 22:42:36 +02:00
nathan
09143f7630 API cleanup, WIP adding widgets to the menu (on pause because of
problems with the enter key not responding after this). Updated test
examples.
2016-10-10 22:40:39 +02:00
nathan
84a7fb77af Added more comments 2016-10-10 22:08:54 +02:00
nathan
96a89a3f44 Code polish. Fixed focus change issues when adding widgets 2016-10-10 17:10:59 +02:00
nathan
89405a6cd1 Cleaned heirarchy, fixed shutdown methods 2016-10-10 11:07:01 +02:00
nathan
85f47eee6a Removed unnecessary code 2016-10-10 01:16:12 +02:00
nathan
919120701d Added SystemTray.setEnabled(). Updated test examples. 2016-10-10 01:15:32 +02:00
nathan
53a9110605 Clean API 2016-10-10 00:30:40 +02:00
nathan
68a9e4edd7 Comments 2016-10-09 23:11:55 +02:00
nathan
2e9201f692 Code polish/refactor. Removed GTK menu stuff 2016-10-09 22:42:44 +02:00
nathan
fbf528d0ca WIP AppIndicators using swing menu 2016-10-09 20:20:23 +02:00
nathan
b936a4cd76 Migrated GtkStatusIcon to use swing menus instead of GTK menus. The
swing menus are the "golden standard", becuase we can controll 100%
of it.
2016-10-09 16:28:32 +02:00
nathan
0e56ca199a Organized swing menu logic 2016-10-09 15:56:58 +02:00
nathan
b976338b46 Removed unneeded API 2016-10-09 15:42:01 +02:00
nathan
e7b98d9f1c Fixed obliterate for sub-menus 2016-10-09 15:41:42 +02:00
nathan
11c3dd6296 Import order 2016-10-09 15:33:03 +02:00
nathan
1a35cb8726 API CHANGE (setIcon -> setImage) for API consistency with how
menus/entries get their image set. Class heirarchy is now consistent
with all menu types (system tray + sub-menus)
2016-10-08 23:54:45 +02:00
nathan
87222f8483 AppIndicator does not support BOLD text in menus, since we cater to
the lowest common denominator, we remove bold text for status. We
change to use a menu separator to define a "status" at the top of the
 menu
2016-10-08 23:32:21 +02:00
nathan
82ab3fc7bd Code polish, cleaned up comments 2016-10-08 21:53:43 +02:00
nathan
381e629e72 Code polish 2016-10-08 21:50:37 +02:00
nathan
000d069bfc windows/mac swing menus working with keyboard navigation/mnemonics 2016-10-08 21:47:53 +02:00
nathan
d4ac42d21f WIP adding mnemonic support for windows/mac 2016-10-08 17:42:05 +02:00
nathan
f0fe9fa9a2 Fixed issue with keyboard navigation/mnemonics on popup window. 2016-10-08 17:41:21 +02:00
nathan
f2065a59fa Added mnemonic support for linux 2016-10-08 00:18:17 +02:00
nathan
bdf76e13fd Added extra configuration checks when running windows/mac for
unsupported tray types.
2016-10-05 11:58:33 +02:00
nathan
53ece33ac5 Adjusted scaling factor for mac 2016-10-05 11:54:28 +02:00
nathan
42d053398f Fixed issues with windows/mac 2016-10-04 16:59:22 +02:00
nathan
62c73e8f32 Fixed gtk entry/sub-menu removal for SWT. code polish 2016-10-04 15:36:00 +02:00
nathan
b8cd5c875f Code polish 2016-10-04 00:21:40 +02:00
nathan
049d5b2109 Fixed issue with new dispatch methods + SWT 2016-10-04 00:21:29 +02:00
nathan
af131eb805 Fixed issue when obliterating menus (via swt). It is now "correct" in
that it won't try to create/delete menus when obliterating
 them+children
2016-10-04 00:20:55 +02:00
nathan
6f11bb9e9a Fixed typo in instructions 2016-10-04 00:18:23 +02:00
nathan
4bbe713519 Updated examples to include new functionality 2016-10-03 23:58:25 +02:00
nathan
7e2834c0cb Added setEnabled() for menu+entries, misc bug fixes for windows 2016-10-03 23:12:00 +02:00
nathan
ad8cd3709c Consolidated gtk menu (so the menuentry has the entry+menu) 2016-10-03 22:29:33 +02:00
nathan
b1398392c7 Fixed windows problem 2016-10-03 22:28:24 +02:00
nathan
b41c62c898 WIP menu cleanup 2016-10-03 20:14:09 +02:00
nathan
14ff3fae06 Fixed issues with submenu's and our popup auto-hide tracker 2016-09-29 13:07:58 +02:00
nathan
05231587d2 Code polish, fixed newly craeted JPopupMenu border + margin info. 2016-09-29 03:23:33 +02:00
nathan
b354daab68 WIP swing submenus 2016-09-29 03:00:29 +02:00
nathan
7509d7c960 Code polish 2016-09-29 02:59:59 +02:00
nathan
8d564675f8 Code polish 2016-09-29 02:07:43 +02:00
nathan
bf3cb8de11 Refactored out Menu object (from the SystemTray object). Converted
SystemTray into a crossPlatform proxy. WIP submenus
2016-09-29 01:44:11 +02:00
nathan
de8d1d8b07 Fixed swing border/margins for menus/entries 2016-09-28 18:35:25 +02:00
nathan
4b10ff9eac Added comments 2016-09-28 18:34:38 +02:00
nathan
3673ed878c Fixed "Status" menu entries so they are consistent with all other
entries (in terms of x-platform/type)
2016-09-28 18:34:27 +02:00
nathan
2fdad344c1 Code polish 2016-09-28 18:33:45 +02:00
nathan
e30033c7ff Fixed order of destroying widgets 2016-09-28 18:33:29 +02:00
nathan
280da3b0b0 Code polish 2016-09-28 17:20:13 +02:00
nathan
e1e0bafd01 Added comments 2016-09-28 17:19:48 +02:00
nathan
83c865a51c Added setImage from a file 2016-09-28 17:01:11 +02:00
nathan
ddcec4cb68 Refactored out the "menu", on preparation for submenus 2016-09-28 15:33:22 +02:00
nathan
a26bfb3639 Fixed for appIndicators 2016-09-28 14:43:32 +02:00
nathan
cfa9110f9a Better adding events to GTK 2016-09-28 14:37:22 +02:00
nathan
1885e5c0fd Tweaked debug logs 2016-09-28 14:35:43 +02:00
nathan
c9b0cce1e3 Refactored status entries, added spacers to menu 2016-09-28 02:51:06 +02:00
nathan
9fdee240f8 Code polish 2016-09-27 13:55:49 +02:00
nathan
bb03e870c7 Added better image scaling options to ImageUtils (for windows) based
on detected Windows version. (IE: XP is max 16x16, Win10 is max
256x256. We limit that to 128, but always a power of 2 (so image
scaling won't get TOO bunged up, except for the VERY INSANE
resolution displays, which are likely in the 1% of users)
2016-09-27 01:33:49 +02:00
nathan
9d46adf3f1 Added proper logging for exceptions. Code polish 2016-09-27 00:51:28 +02:00
nathan
34588de6b7 Added 'hasImage()' to menu-entry. Fixed text entry alignment issues
for GTK menus
2016-09-27 00:50:51 +02:00
nathan
27fa213fc1 Changed to g_idle_add_full, GTK dispatch now waits for a short time +
checks event queue before starting up. AppIndicator now starts up
 with a transparent icon
2016-09-26 23:39:17 +02:00
nathan
77b0fc4691 Added vounds checking for FORCE_TRAY_TYPE 2016-09-26 23:38:04 +02:00
nathan
36229e8aaa Increased library logging for appindicator 2016-09-26 23:32:16 +02:00
nathan
20653c92dd Fixed issue with cached image extension. Added transparent image
generation for menu offset
2016-09-26 23:28:00 +02:00
nathan
de6ef1c038 Added "isDispatch" flag for determining if we are on the dispatch
thread or not for GTK applications. This is necessary to prevent bugs
 in some linux distributions.
2016-09-26 21:47:32 +02:00
nathan
180d66a7c1 Cleaned up removing menu entry, added exception throwing 2016-09-26 21:46:41 +02:00
nathan
19eb4df547 Added comments 2016-09-26 21:45:37 +02:00
nathan
6a9b606e51 Fixed image scaling query for Ubuntu 16.06, changed all debug logs to
'debug'. Added a separate menu entry size (independent of tray size)
2016-09-26 20:56:42 +02:00
nathan
49b0ec0ff2 Prep for release 2016-09-26 03:01:13 +02:00
nathan
ffb5657f61 Code polish 2016-09-26 02:44:36 +02:00
nathan
fb8c5c2378 Fixed JavaFX issues with gnome-shell 2016-09-26 02:43:10 +02:00
nathan
a1fe34992d Fixed for java 1.6 2016-09-26 02:31:23 +02:00
nathan
ae8177ce07 Use of IO for closing/copying streams 2016-09-26 02:20:36 +02:00
nathan
ad066c6e42 Image scaling + caching + error-icon if problems, fix for windows
'auto'
scaling
2016-09-26 02:06:27 +02:00
nathan
107757ff68 Cleaned up comments. Fixed gnome-shell detection (accidentally broke it) 2016-09-23 14:26:29 +02:00
nathan
18aa47ae5b trying to get GTK errors solved. ugh. 2016-09-23 14:24:37 +02:00
nathan
8dc2d9a82a changed \"\ to \'\ in extension 2016-09-23 14:24:04 +02:00
nathan
f62cb4f4f2 Removed SHELL_RESTART_TIMEOUT_MILLIS 2016-09-23 14:23:40 +02:00
nathan
92ecb56bdc Added more logging to gnome-shell extension installer 2016-09-23 13:30:52 +02:00
nathan
de46409b8f Added more detection for specified tray types 2016-09-23 13:28:23 +02:00
nathan
57450fa35b Cleaned up comments 2016-09-23 13:27:58 +02:00
nathan
488ca5564d Fixed issues with deteching/loading gnome-shell extension 2016-09-23 13:26:18 +02:00
nathan
619edcb3fe Cleaned up checks if javaFX/swt is loaded. Added SWT to build process
(removed pre-compiled jars)
2016-09-23 13:19:33 +02:00
nathan
3d8459ecc3 Refactored out JavaFX (similar to how SWT was done) so that we can
compile to Java 1.6
2016-09-22 23:56:39 +02:00
nathan
efeda2fac3 Better support for JavaFX/SWT/GTK2/GTK3/AppIndicators. Fixed various
GTK error messages during initialization.
2016-09-22 22:36:04 +02:00
nathan
3488646034 Added dispatch method for SWT 2016-09-22 22:33:16 +02:00
nathan
6c9aff3529 Removed debug from gnome extension 2016-09-22 22:31:54 +02:00
nathan
eb5315580d Gnome shell extension can now be reinstalled based on
GNOME/SystemTray versions (if they are different, the extension will
re-install)
2016-09-22 22:30:59 +02:00
nathan
fc54a938c0 Updated comments 2016-09-22 20:16:22 +02:00
nathan
5b469b65ed Added comments for bugs on linux 2016-09-22 15:33:02 +02:00
nathan
8c0bfee100 Updated comments for gnome and possible errors 2016-09-22 13:08:07 +02:00
nathan
416d20fbc7 Added debug info for appindicator library loading 2016-09-22 13:06:18 +02:00
nathan
b4f27f97d0 Added debug statements, cleaned up comments 2016-09-22 13:05:31 +02:00
nathan
1c4316b5fc Added debuggig statements 2016-09-22 13:04:14 +02:00
nathan
83cea322f1 Works in UbuntuGnome 2016-09-21 22:32:33 +02:00
nathan
ad509db696 Extra logging, better detection if running gnome-shell and if running
javaFX app
2016-09-08 17:22:22 +02:00
nathan
9d22bf9736 Added extra logging. Added extra checks to see if JavaFX GTK3 is enabled 2016-09-08 17:20:18 +02:00
nathan
610f9c8eef Added extra logging 2016-09-07 23:35:11 +02:00
nathan
87fa6543d3 Updated version 2016-05-31 02:21:42 +02:00
nathan
ca4774b253 updated version 2016-05-08 16:57:40 +02:00
nathan
495973d3a7 Switched JNA mode from Proxy -> Direct-Mapping. Direct-Mapping is
significantly faster than Proxy, approaching that of JNI performance.
2016-05-08 15:51:07 +02:00
nathan
33cc61c920 Updated version 2016-04-28 14:36:53 +02:00
nathan
167031aceb updated version 2016-04-24 17:54:05 +02:00
nathan
189ec064fa Updated GTK threading model to *correctly* execute GTK methods on the
GTK thread. Solves problems (unsurprisingly) with race conditions
 against the native GTK thread.
2016-04-24 17:32:07 +02:00
nathan
4eb2e89d38 Added ability to debug failures during system-tray detection 2016-04-24 17:30:33 +02:00
nathan
d00c99fb4f Fixed system tray UID to match GNOME extension 2016-04-24 17:28:34 +02:00
nathan
f7e9660233 Now compares gnome shell version w/ installed plugin and auto-updates
gnome extension during run if necessary
2016-04-23 22:47:08 +02:00
nathan
af1fdcca2c Cleaned up the gnome shell extension installer 2016-04-14 01:15:48 +02:00
nathan
88b0ef8bcd Updated version 2016-04-05 14:35:13 +02:00
nathan
62740a0d5a Added TIMEOUT property to adjust how long to wait for the event
dispatch queue to complete.
2016-04-05 14:19:13 +02:00
nathan
6fdbe8ac83 Abstracted 'dispatch(Runnable)' so that all updates to the SystemTray
occur on the dispatch thread. This will resolve any race condition
 issues when creating, then (before it's actually created) trying to
 modify a menu entry.
2016-04-05 14:07:41 +02:00
nathan
077aca538c Added more to javadocs for SWT class 2016-04-05 14:06:17 +02:00
nathan
925394fd2e Updated version 2016-03-22 00:56:23 +01:00
nathan
44d6fdb1f1 Updated version 2016-03-13 17:37:42 +01:00
nathan
9a7b438f93 updated version 2016-02-21 02:07:37 +01:00
nathan
3add3419a8 Put getExtension back into ImageUtil. There were too many dependencies necessary when including FileUtil in the build process 2016-02-21 01:52:55 +01:00
nathan
dc41acbbed Added Headless Exception if we are running in headless mode 2016-02-21 00:58:03 +01:00
nathan
a2a1c092cb Fixed issue with icon scaling in popup menu 2016-02-21 00:56:30 +01:00
nathan
3d22f97026 Added movement delta for hiding popup 2016-02-21 00:56:14 +01:00
nathan
5c2dc1fdc6 code polish 2016-02-21 00:55:54 +01:00
nathan
3916f2cd1d Moved getExtension back to FileUtil 2016-02-21 00:54:51 +01:00
nathan
a68c79182d Cleaned up memory leaks. Added SystemTray.getStatus(). Cleaned up support for SWT. 2016-02-15 13:27:33 +01:00
nathan
e129fd4e75 Updated documentation 2016-02-15 01:04:52 +01:00
nathan
85ba4c9380 Added support (and configuration info) for using the SystemTray with SWT 2016-02-15 00:55:03 +01:00
nathan
6fac9be88e Copied over SWT accessor bytecode for adding a shutdown hook 2016-02-15 00:17:38 +01:00
nathan
05b9a6a715 Removed SWT based system tray (SWT doesn't support appindicators, so it DOES NOT work on systems that only accept appindicators) 2016-02-15 00:13:21 +01:00
nathan
444562f3c6 Added SWT compatible tray type (it is just a wrapper for SWT SystemTray) 2016-02-14 21:54:21 +01:00
nathan
bb0eb87e90 Added objdump info 2016-02-14 20:41:39 +01:00
nathan
eb8092677d Moved JNA libraries into SystemTray project (it made no sense to have them inside the utils project) 2016-02-14 20:22:55 +01:00
nathan
db19374bfc Fixed initialization order 2016-02-14 18:42:42 +01:00
nathan
c992049280 updated released version 2016-02-14 18:02:22 +01:00
nathan
3507869c35 Removed checked expections (now they are unchecked). Added better detection of JavaFX. 2016-02-14 17:51:35 +01:00
nathan
5db79ed563 updated build 2016-02-14 14:53:44 +01:00
nathan
010a91ca68 Added support for detecting if javaFX already started the GTK event loop (and hooking into the right places for shutdown if it does). 2016-02-14 12:58:45 +01:00
nathan
923da17502 Updated builds + build system 2016-02-13 18:51:13 +01:00
nathan
8c3a2a2c0c Updated documentation 2016-02-13 17:47:18 +01:00
nathan
c1b6c1a723 Added GTK3 support (now libappindicator3 works correctly with regards to showing menu icons). Added support for setting icons via URL and InputStream. Moved all GTK operations to a single thread. Moved error logs from System.err -> logger. Made SystemTray a singleton (it will no longer have the java-side get accidentally garbage collected). Update documentation 2016-02-13 15:06:19 +01:00
nathan
8b109f6d1c Converted SystemTray to use a singleton pattern for ease of use. Icon *must* be set to see it (obviously). Updated Readme.md example. 2016-02-12 02:30:33 +01:00
nathan
801baad635 Added SystemTray.getVersion(), added URL and InputStream (to all methods that previous accepted String) for setting images in the menu/tray. Moved package out of util. 2016-02-12 01:51:15 +01:00