Move the functionality down into just FrameContainer. Callers can use
isWritable() to determine if the FrameContainer is writable, instead
of horrible instanceof/casting logic.
Change-Id: Iab58f1d2b9275ee3fc60d79e433e158bae784911
Depends-On: I52a09d5f5ad69c2bebafa58582a173f706515fa6
Reviewed-on: http://gerrit.dmdirc.com/3426
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Pass in a ScheduledExecutorService and use it for who timers and
reconnect timers.
Only run the who timer when we're connected, not the whole time.
This stops the Server ctor starting a timer.
Change-Id: Iea92d7046f33eda7666b8a2b739374345e8ea20d
Reviewed-on: http://gerrit.dmdirc.com/3419
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Makes more sense to just bite the bullet and have FrameContainers
require a URLBuilder so they can make an IconManager, rather than
have every caller pass one in.
Also removes the silly map which would've only ever had one entry,
and stops us making 19 million icon managers for giggles.
Change-Id: I3b95185db3f7e6ef09a6c4f91cd28c88d2c601ba
Depends-On: Ida8887d4065db2f26080986a4c426c6de700d65c
Reviewed-on: http://gerrit.dmdirc.com/3107
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Introduces a ConfigProviderMigrator interface, which allows
migration of a ConfigProvider. This allows the owner of
the provider to migrate it, and pass around an instance,
while prevent any other user accidentally migrating it.
e.g. Server can own a ConfigProviderMigrator, and only
expose the inner ConfigProvider, so noone else can migrate
it to a different target.
Change-Id: I2a78947f60ba42c6877433c897ef458cead6a3e3
Fixes-Issue: CLIENT-408
Reviewed-on: http://gerrit.dmdirc.com/2828
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Constructors shouldn't be leaking references to themselves all over
the place.
Change-Id: I4568a354e5dbd2561c247ff4b80badb781394662
Reviewed-on: http://gerrit.dmdirc.com/2808
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Make Servers use it to break their dependency on AliasWrapper,
which was odd and annoying.
Change-Id: I1c515b65d88049bd9288e1334e5ebe5fa9c31a80
Reviewed-on: http://gerrit.dmdirc.com/2792
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Move static factory methods into IdentityFactory, and replace
almost every use of Identity with ConfigProvider.
Depends-On: I6a32f3592cb5fc3df99a23eee62ae961ce0fc143
Change-Id: I66b382d54b77ef030d88448e456a83eb98aca216
Reviewed-on: http://gerrit.dmdirc.com/2777
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Remove all static/singleton references in the constructor so that
Servers can be instansiated sensibly without all the client existing.
Also change everything that creates a Server to use the appropriate
method in the ServerManager instead of doing it manually.
Depends-On: I3fff818d6e6694163660a36f47d60271d8f0e68e
Change-Id: I9842c20b4e4ff846c9bbf4858da794a843c3b053
Reviewed-on: http://gerrit.dmdirc.com/2655
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Don't ask Main for the config directory.
Remove getMain() from Main.
Everything that needs a main now either gets given it, or asks something else.
Unfortunately, a few more dependencies on the static IdentityManager.getIdentityManager()
were introduced, but they can be tackled separately.
Fix unit tests for the above.
Change-Id: I9e42ac7f74453b739209a681d0a31f50c1be2a04
Depends-On: Ib5a9fdea5a2e25d5471d0b849f4f65fa0286d1f8
Reviewed-on: http://gerrit.dmdirc.com/2520
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Ignore or remove tests that fail in a headless env
These need to be rewritten so the dependencies are mocked out
Change-Id: Id8890637da5483efaa112db7613e61fba366e878
Reviewed-on: http://gerrit.dmdirc.com/2378
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
UpdateCopyright.sh now works out the year automatically.
UpdateCopyright.sh now ignores .git aswell as .svn
UpdateCopyright.sh now excludes Binary Files from being matched during the initial search, rather than as an afterthought.
Change-Id: I2cfc56851a4217a4c85cbc7361c7a90421aae717
Reviewed-on: http://gerrit.dmdirc.com/202
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
Tested-by: Shane Mc Cormack <shane@dmdirc.com>