391 Commits

Author SHA1 Message Date
Charles Dang
0c36463d3a Updated CB projectfile 2016-10-17 11:35:53 +11:00
Charles Dang
b6ea5106ca Moved marked-up_text.*pp to font/ 2016-10-16 22:54:07 +11:00
Charles Dang
b5d6186ea2 Move some pango formatting-related functions to their own file 2016-10-16 22:06:46 +11:00
Charles Dang
c2f01ce228 Updated CB projectfile 2016-10-16 12:16:28 +11:00
Charles Dang
7748822248 Removed unused GUI1 progressbar widget 2016-10-13 15:15:29 +11:00
Ignacio R. Morelle
4915f0349c desktop: Add functionality to enumerate paths of interest
This allows querying things such as the user's home dir, drive letters
(Windows-only), and game paths such as the data dir, preferences, user
data, and binaries. The results are presented in a format that's
suitable for UI use, with translatable labels used wherever applicable.

At some point there'll be support for listing user-defined bookmarks as
well.
2016-10-12 03:11:01 -03:00
Ignacio R. Morelle
285bbe7237 gui: Remove GUI1 filechooser
This switches all existing callsites to using gui2::tfile_dialog, and
fixes a build issue due to editor/controller/editor_controller.cpp
relying on an indirect include from gui/dialogs/editor/custom_tod.hpp
for a full type declaration.
2016-10-05 03:06:43 -03:00
Ignacio R. Morelle
6e1f6bb686 gui2/tfile_dialog: Initial port of the filechooser dialog to GUI2
This provides, as far as I can tell, all the filechooser functionality
that is actually in use in Open File mode except for the "type-ahead"
option that is used to set filename extension hints.

There's some newly-introduced border cases courtesy of Boost.Filesystem
that I really feel we shouldn't worry about for now:

 * // is handled weirdly thanks to BFS honoring the POSIX provision for
   implementation-defined behavior regarding it.
 * UNCs on Windows are not supported. Just like in mostly everywhere
   else in Wesnoth. Same applies to \\.\, \\?\ and \??\.
 * Non-directory path components on Windows are not handled very
   gracefully (particularly obvious with volumes mounted as NTFS
   junction points, or symbolic links for the Documents folder on
   Wine) due to quirks in BFS's path::canonical() method and how it
   relies on dereferencing individual path components to resolve dot
   entries.

Haven't tested all callers yet, they are still using the original
filechooser entry points for now. I need to remove those and make
everyone use gui2::tfile_dialog directly before this can be merged to
master.
2016-10-05 03:06:43 -03:00
Ignacio R. Morelle
ea9d077b89 fs: Add utility functions for the new file dialog
These include an alternate mode of normalize_path() that enforces the
platform's preferred path delimiter (i.e. backslash on Windows) on the
output, and a function to detect whether a path refers to a root
directory.

Unfortunately, the last bit requires introducing a new link-time
dependency on Windows, against a system library. It's guaranteed to be
always there but it seems kind of a waste. The alternative would be to
hand-parse the string but that seems even more of a waste. And no,
Boost.Filesystem can't do this in a straightforward fashion right now.
2016-10-05 03:06:43 -03:00
Charles Dang
45ea8c6a43 Added GUI2 MP Join Game dialog
Note the faction select dialog doesn't appear for some reason.
2016-10-01 02:09:20 +11:00
Charles Dang
9ccc4300b9 Update CB projfile 2016-09-26 04:02:52 +11:00
Charles Dang
2657a323fb Removed custom scoped resource implementation
As mentioned before, std::unique_ptr or std::shared_ptr can now be used in place of this.
2016-09-24 17:52:53 +11:00
Charles Dang
55ba8c95bc Cleaned up handling of basic alpha setting
This does a few things:
* Refactored adjust_surface_alpha to use SDL_SetSurfaceAlphaMod
* Made all uses of the legacy SDL_SetAlpha use adjust_surface_alpha
* Made adjust_surface_alpha now take a non-const reference and perform the operation on the surface directly.
2016-09-24 17:31:08 +11:00
Charles Dang
7a915f9035 Slight readme update 2016-09-24 02:55:28 +11:00
Charles Dang
86e3161b29 Updated CB projfile (missing wesnothd source and Boost 1.61 linker target) 2016-09-24 00:39:35 +11:00
Charles Dang
9721910d98 Initial implementation of GUI2 MP Staging dialog (Connect + Wait) 2016-09-20 05:34:31 +11:00
Celtic Minstrel
1816e1147f Remove asserts.hpp
This file seemed to be some sort of reimplementation of <cassert> except
with some "feature" of trying to force the debugger to hit a breakpoint.
However, any decent debugger already hits a breakpoint with a standard
assert(), and this file really only served to make it harder to see the
actual error when using a Windows console.

Some instances of these macros were replaced with assert(), others with
VALIDATE() which instead throws an exception (and possibly puts up a
dialog, if the exception is caught before main()).

A few other related changes that got mixed in:
- Several error conditions now have a better error message (or indeed
  any error message at all)
- Removed an unnecessary use of std::distance on a Boost iterator range.
- Removed a large chunk of code which did nothing but construct a widget
  builder and then crash; the code was unreachable since an earlier loop
  did the same thing (without crashing), and the comment seems to suggest
  that it was a (seemingly no longer necessary) workaround for some buggy
  compilers / linkers.
- noreturn added to the list of compatibilty C++11 features in global.hpp
  (Of supported compilers, only VC12 lacks the new [[attribute]] syntax.)
- Fix detection of GCC in global.hpp

# Conflicts:
#	src/gui/widgets/settings.cpp
2016-09-18 15:57:47 -04:00
Charles Dang
1fb26d9e1c Convert remaining SDL1.2 defines to their SDL2 counterparts and dropped compat layer 2016-09-15 15:55:09 +11:00
Charles Dang
d0cae514ff Added basic GUI2 end credits dialog (incomplete) 2016-09-11 18:55:38 +11:00
Charles Dang
b07810608a Renamed the mp_chatbox widget simply "chatbox" 2016-09-09 08:25:04 +11:00
Charles Dang
7950fafba6 Updated CB projectfile 2016-09-09 07:23:09 +11:00
Charles Dang
ba81174ade Updated CB projfile 2016-09-07 10:48:26 +11:00
Charles Dang
7c663bc0a9 Added an helper function for creating bound status labels 2016-09-05 14:34:59 +11:00
Charles Dang
56e8222bb0 Converted Generator Settings dialog to GUI2 2016-09-03 12:41:29 +11:00
Charles Dang
423fc10437 CodeBlocks: explicitly added -Wunused-parameter flag 2016-09-02 09:56:07 +11:00
Charles Dang
faed98a651 Added standalone options configuration dialog for GUI2 2016-09-02 09:28:30 +11:00
Charles Dang
725df26dd2 MP Create: split options handling into a helper class
This is so the same code can be used for an option-only configure dialog in SP.
2016-09-02 03:23:04 +11:00
Charles Dang
507d00d9d9 Refactored out wmi_pager
This is no longer needed after switching right-click menus to GUI2, since they have built-in
scrolling capability. This also removes the max_wml_menu_items preference.
2016-08-29 15:38:52 +11:00
Charles Dang
2bffd4af56 Convert Select Faction (FLG) dialog to GUI2 2016-08-29 05:33:15 +11:00
Charles Dang
b570c56354 Updated build files for PR 744 2016-08-25 00:44:07 +11:00
Charles Dang
14752e1bdb Updated CB projectfile 2016-08-23 10:52:17 +11:00
Celtic Minstrel
396f5dfc4c Rename combobox -> menu_button 2016-08-22 19:37:14 -04:00
Charles Dang
e04be90254 Updated CB projectfile 2016-08-11 05:47:16 +11:00
Charles Dang
ebf90fbd94 Update CB projectfile 2016-08-10 13:18:48 +11:00
Charles Dang
79de5a8ae8 Convert Scenario Status/Settings dialog pair to GUI2 2016-08-09 22:01:14 -04:00
Celtic Minstrel
8a9a466a29 Revert "Convert Scenario Status/Settings dialog pair to GUI2"
This reverts commit bb49be8428d4226b7a6fa7343f0d45af4558c3ed.
2016-08-09 21:58:48 -04:00
Charles Dang
bb49be8428 Convert Scenario Status/Settings dialog pair to GUI2 2016-08-10 12:52:26 +11:00
Charles Dang
9c683576d9 Added GUI2 Unit List dialog (unused yet) 2016-08-08 04:36:40 +11:00
Charles Dang
105fbe6bc6 Converted Recall dialog to GUI2
This also includes  the appropriate expansions and design updates to the unit_preview_pane widget.
2016-08-02 09:13:07 +11:00
Charles Dang
fcd90d0533 Removed floating_point_emulation.hpp from CB projfile 2016-07-27 03:23:53 +11:00
Charles Dang
7a8f3ff110 Refactored formula's use of boost::intrusive_ptr
This removes all the custom reference counting code from the
formula variant class, and also removes the WFL refcount() function.
The reference counting base class is also removed, since it is no longer used.
2016-07-24 23:43:58 -04:00
Charles Dang
34d78f2a2a Updated CB projfile 2016-07-20 01:02:19 +11:00
Charles Dang
fc586ea796 Updated CB projfile 2016-06-21 22:56:43 +11:00
Charles Dang
709b078a7a CB: removed thread.*pp from main binary 2016-06-12 05:10:45 +11:00
Charles Dang
2d6ce5e523 Updated CB projfile 2016-06-07 13:17:42 +11:00
Charles Dang
c3d379e394 Updated CB projfile so it no longer links with SDL_net
Also cleans up a few broken includes in the project.
2016-06-06 05:58:00 +11:00
Charles Dang
7f3fee88c5 Updated build files for 9af918b361c3 2016-06-06 01:52:20 +11:00
Charles Dang
e96c31d577 Updated CB projfile 2016-06-06 01:43:35 +11:00
Charles Dang
dc9db2e830 Updated CB projfiles 2016-06-01 19:06:58 +11:00
Charles Dang
0ffccf6f11 Updated CB projectfile 2016-04-23 19:26:36 +11:00