Commit Graph

51 Commits

Author SHA1 Message Date
bd344fee2e Filter by server version and forgotten server's CVars window.
Implemented filtering servers by server's version, related to #27.
This combobox is saved-restored across restarts.

Added forgotten bd04870 server_cvars.go, which is responsible for
showing server's CVars window.
2016-11-26 16:00:17 +05:00
474821ba7b Ooops :) 2016-11-26 09:11:51 +05:00
f32cf4d1f6 "GENERAL INFO" list item isn't needed anymore. 2016-11-26 09:10:57 +05:00
bd04870aa3 Splitted sidebar's list into two and separate CVars window.
Splitted sidebar's list into two separate lists - one for
general server's info (hostname, players, etc.) and one for
players list.

Also, moved CVars list to separate window which can be shown by
clicking approriate button under player's list.
2016-11-26 09:05:48 +05:00
280c65f116 Distinguish bots from humans.
Players column now have three integers - first is real humans
count, second - bots count, and third - maximum players allowed
on this server. Also, sidebar will show bots count as well.
2016-11-26 07:38:26 +05:00
5ca8299714 Show selected server's information on active tab changing.
URTrator will now show information about selected server on
activated tab. E.g. when you switched from "Servers" to
"Favorites", sidebar informational widget will be updated with
server's data for selected server on "Favorites" tab.
2016-11-25 03:12:05 +05:00
5fcbd8536c Update selected server's info in sidebar after updating server's data. 2016-11-23 10:10:11 +05:00
fb7a471aec Shw message in toolbar when updating selected server's data. 2016-11-23 10:02:58 +05:00
8b44d194b5 Hide private servers checkboxes. 2016-11-23 09:49:39 +05:00
3b0a93e63a By default srting players by name as well as cvars in sidebar. 2016-11-23 07:51:41 +05:00
5ef54d943e Removed unneded "Additional information" button. 2016-11-23 07:35:10 +05:00
bfd3f884b3 Automatic profile selection. Fixes #14.
Automatically select first added profile on every profiles list
update. Yes, quick hack. In future we will autodetect profiles
based on server version, and profiles combobox will only be
needed for quick connect.
2016-11-22 18:33:53 +05:00
8b06dff083 Forcing icons for servers lists. 2016-11-22 02:15:07 +05:00
ea8bdde224 Temporary disabled all modals on Linuxes due to mattn/go-gtk#289. 2016-11-22 01:10:31 +05:00
3e89df1009 Missing return definition for functions in prev commit. 2016-11-21 02:52:26 +05:00
c00ff2cea5 Check window position and size and hpane size in glib thread. 2016-11-21 02:49:05 +05:00
b1d38bbdcf Possibly solved crashes on GTK's actions. 2016-11-02 22:28:15 +05:00
a64c842e19 Messageboxes fixes and copy server's creds to clipboard.
Fixed all messageboxes that can use struct object as self name
(e.g. m for messageboxes in mainwindow). Should help to avoid some
errors.

Added possibility to copy server's credentials into clipboard
for ease of sharing.
2016-10-12 19:23:10 +05:00
68bd842c1f First variant of clipboard watching. 2016-10-11 13:14:08 +05:00
3537b05dce Moved windows actions to mainwindow_init_win.go. 2016-10-11 00:14:00 +05:00
2784586f8d More Mac integration works - now it is able to load and use GTK+
themes. Configuration interface on ToDo.

This also indicates that URTrator is now able to perform basic
window theming.
2016-10-10 19:16:51 +05:00
64b87d3a8b Completely fixed favorited servers. You may want to re-edit them. 2016-10-09 01:29:46 +05:00
e12bcdd386 Fixed favorite server addition and saving. 2016-10-09 01:23:38 +05:00
e2a9298f85 One more huge refactoring and quick connect widget working.
Refactored the way URTrator working with profiles - now everything
that could be taken from internal cache will be taken from cache.
The very same as with servers.

Moved all callbacks from callbacks to events, so we achieve full
asynchronity here and can launch anything in goroutines :).

Moved MainWindow-related game launching functions into another
file (mainwindow_launch.go).

Made quick connect widget working. Note, that even if you're on
Favorites and trying to connect to one of favorited servers but
with quick connect - you still have to choose right profile
near Launch button!

Maybe something else I forget.
2016-10-08 19:57:33 +05:00
4421e29695 Fixed handling offline servers.
Fixed handling offline servers and "Hide offline servers" checkbox,
now we will hide servers that was online but went offline properly.
2016-10-08 12:24:03 +05:00
ac57e6376c Fixed favorite servers updating crash when nothing was selected on Servers tab. 2016-10-08 00:01:20 +05:00
e46d203a3c Many fixes and debug prints removed.
Removed debug prints, as we don't really need them now.

Fixed database updating from cache, until now only inserts was working
fine, updates failing. All because of forgotten comma :(.

Reworked handling of icons in servers lists, now they didn't
recreated, but reused from created on application start. Can also
save us much memory for long runs.

Moved gamemode detector to mainwindow_helpers, where it should be.
2016-10-07 22:21:19 +05:00
13e091d52b Refactored mainwindow source, columns size and pos remembering.
Refactored MainWindow source, splitted initialization and
helper functions into separate files.

Now lists headers sizes and positions are remembered and correctly
restored on launch.
2016-10-07 21:14:48 +05:00
296e495fbf About dialog fixes and lists columns upgrades.
About dialog should now be fixed everywhere. Previously it
causes crash on macOS and Windows. See https://github.com/mattn/go-gtk/issues/282

Columns now can be rearranged and resized. No saving or restoring yet.
2016-10-07 17:23:50 +05:00
102891c217 Renamed column which shows private or public from Private to Public. 2016-10-07 14:33:06 +05:00
464946b7f6 Favorites servers fix, one server update and show privates.
Fixed favorites servers - they now correctly added/removed in/from cache,
and also fixed favorite server edition dialog, which now also takes
advantage from server's cache.

Added new toolbar button for updating one server. It works :).

Added new column in servers lists, which shows is server is private or public.
2016-10-07 14:28:44 +05:00
51b23fa68f More debug output and servers refresh fix.
Fixed servers lists refresh. Despite on what list we're updating
(all servers or only favorites) server item should be updated in
both.
2016-10-07 02:50:52 +05:00
baf733f171 Do not crash if we selected server that didn't sent it's info. 2016-10-06 23:05:02 +05:00
5ad43b5613 Fixed show/hide offline servers. 2016-10-06 22:43:45 +05:00
ceaaf67510 Urban Terror launch check on shutdown.
Added checking if Urban Terror launched while trying to shut down
URTrator. If yes - we will show error message and won't quit,
until Urban Terror will be dead.
2016-10-06 22:19:03 +05:00
8cfbca284e Players parsing fixes and short info done.
Fixed players parsing in server's response, now we can show 0 players.

Showr info (kinda) completed, general server info, players and vars
are here. Some work on sorting is in ToDo.
2016-10-06 21:34:14 +05:00
5ba0664964 Server info preview started. 2016-10-06 20:48:35 +05:00
11e3e4edb7 Show server name we connected in toolbar's label.
Also updated screenshot to show how it looks like.
2016-10-06 17:59:10 +05:00
0214ea7fce Toolbar label added.
It will show current operation or why you can't do something.
2016-10-06 17:50:08 +05:00
2efd47c301 Servers updating and ping detection fixes.
On servers updating when all data successfully gathered we're now
properly updating rows in Servers and Favorites lists.

Increased "simultaneous ping limit" for now, but anyway it provides
too bad results. Need to find a way to fix it.
2016-10-06 17:11:36 +05:00
f37dd3adfd Huge refactor regarding concurrency.
Now we have pooler which will pool connections (like pinging),
so there will be no timeouts due to "we have launched 100000 goroutines".

Reworked all code to use events (see Eventer). Still more work about
this to go.

Maybe more fixes I forgot.
2016-10-06 13:55:03 +05:00
dd41537106 Hostname's colorizing is here. Added stub for server info window. 2016-10-05 20:46:02 +05:00
dbf5b60ead Window and elements size and position saving and restore. 2016-10-05 02:16:02 +05:00
8e58104cfa Configuration and tray icon.
Configuration is now properly saved for parameters in Options window.
Also they are restored fine.

Added tray icon with two default actions: show/hide and exit. More
to come.
2016-10-05 01:03:46 +05:00
0f5dd8f236 Editing favorites done. 2016-10-05 00:04:24 +05:00
26a3ead52a Don't rely on current_tab == "some_string", since we might change tab name. 2016-10-04 23:51:37 +05:00
063f6a622a Favorites and fixes.
Favorites functionality done, except editing favorite server.
Note, that game profile defined for favorite server have
higher priority on normal profile selected in combobox near
"Launch!" button. Later WILL be ignored.

Bunch of fixes is added.
2016-10-04 23:39:32 +05:00
d6765501a8 Tooltips to every element! 2016-10-04 19:21:48 +05:00
b7e79ce01b SetHeadersClickable is only allowed with custom go-gtk. 2016-10-04 18:22:27 +05:00
cff72734c6 Urban Terror is now launching, in local X or in another. 2016-10-04 18:09:14 +05:00