Commit Graph

70 Commits (eabca223f5e7c237f5d3bb88183d38a41cb9bced)

Author SHA1 Message Date
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 735f9cc06b C4Landscape: Pull everything private out of the header
Since LTCG is enabled now, we don't have to define every function inside
the headers for ~xXx super speed xXx~, which means we can strip the
headers down to their bare minimum and reduce interdependencies and
therefore recompilation times by a lot.
2016-04-03 13:24:24 +02:00
Günther Brammer 9210c65e85 gtk: Hide usages of X11 behind #ifdef GDK_WINDOWING_X11 2016-01-23 22:02:51 +01:00
Günther Brammer 8257264415 Avoid a gtk runtime warning on empty statusbar text
(openclonk:12546): Gtk-CRITICAL **: gtk_statusbar_push: assertion 'text != NULL' failed
2016-01-17 23:34:29 +01:00
Günther Brammer 39c2a0e18c gtk: Use glib-compile-resources instead of gdk-pixbuf-csource
Yet another deprecated feature replacement. At least this one makes our
code more concise.
2016-01-11 01:52:49 +01:00
Günther Brammer 7613393359 gtk editor: Exchange cursor and time information
The toolbar doesn't have enough space by default, and this way we can use
the GtkStatusbar widget.
2016-01-10 00:19:07 +01:00
Günther Brammer a185cae264 gtk editor: Simplify landscape preview drawing
In earlier versions, DrawPatternedCircle was a fairly complicated function.
Nowadays, it just copies pixels in memory, bounded by a circle. Since we
need to convert our surfaces to a format GTK+ can use anyway, combine that
step with the circle boundaries. Also use a cairo surface instead of a
GdkPixbuf. Cairo uses almost the same pixel format, except for
premultiplied alpha. Ignore this for now.
2016-01-10 00:19:07 +01:00
Günther Brammer ab7f4f0bbf gtk editor: Use GTK+ 3 layout widgets
Specifically, GtkGrid. For most cases, this is an increase in lines of
code, but the landscape tools dialog can now be done with just three layout
widgets.

While at it, use a toolbar and move the mode buttons into it, too.
2016-01-10 00:19:07 +01:00
Günther Brammer 67bf24f1e1 editor: Always remove previous suggestions before adding new ones
9e771ac moved the Win32 ClearInput implementation into SetInputFunctions,
but broke at least GTK while doing that. 9a7d57c0d2 fixed the assertion
failure in GTK that resulted, but failed to restore the removal of the old
completions.

Fix this by folding ClearInput into SetInputFunctions in all implementations.
2016-01-08 15:22:00 +01:00
Armin Burgmeier 4d36f43025 gtk editor: keep scroll position when updating property dialog (#566)
This is still not quite optimal since we need to wait for line validation.
There does not seem to be a way to trigger immediate validation.
2015-11-12 16:04:28 -08:00
Armin Burgmeier ef4ea2d931 Drop support for GTK+ 2
The minimum GTK version is now GTK+ 3.4, which is available since 2012.
It's part of Ubuntu LTS 12.04, and so should be available on any halfway
modern linux distribution.

This should allow getting rid of using deprecated GTK+ API much easier.
2015-10-18 14:45:52 -04:00
Julius Michaelis 9a7d57c0d2 Fix assertion firing in C4ConsoleGUI::SetInputFunctions introduced by 9e771ac 2015-09-30 14:35:50 +02:00
Sven Eberhardt 9e771acfd1 Editor: Add most recently entered script lines to dropdown list.
This also enables easier auto-completion via arrow-down.
2015-09-27 15:28:17 -04:00
Armin Burgmeier fd285f6656 Create mipmaps only for static textures that are expected to be zoomed
Hopefully fixes #1403.
2015-09-18 21:10:39 -04:00
Sven Eberhardt 9f4391ff0a Fix ModeBack initialization on editor startup.
It would be set by state and then immediately reset in Default(). This had the effect that if you used the color picker on sky before ever selecting a background material, the wrong background would be used.
2015-09-17 22:25:46 -04:00
Armin Burgmeier 94ce958e4c editor: sort background textures differently than foreground textures
The sort order in the combo boxes depends on the selected material.
2015-08-04 21:39:23 -04:00
Armin Burgmeier 3ec53c2c40 Update GTK+ editor so that one can draw background materials 2015-08-04 21:21:24 -04:00
Armin Burgmeier b1e9c3924d Make the Map field private in C4Landscape 2015-08-04 21:21:23 -04:00
Armin Burgmeier 56b19ac065 Fix brush preview in GTK+ developer mode
This looks like an artifact from when the alpha channel was inverted.
2014-11-24 16:32:25 -05:00
Kevin Zheng 6a1a551d01 Clean up deprecated headers and functions
"gdk_pixbuf_unref has been deprecated since version 2.0 and should not be
used in newly-written code. Use g_object_unref()."

sys/timeb.h isn't used anymore since 2005.
2014-05-27 00:30:20 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Nicolas Hake ef9f79d815 Fix GTK build 2013-09-04 19:57:26 +02:00
Nicolas Hake 7e70554a04 Use control packet for more editor mode actions
Actions changed include dropping definitions, (de-)selecting objects,
player elimination. This removes some more pre-assembled C4Script code
going across the network unchecked.

Part of #936.
2013-09-04 17:51:55 +02:00
Günther Brammer 2a9d63cb2a gtk: Use higher-resolution logo as window icon
Metacity started to display bigger icons in the window list, so the higher
resolution is now actually useful for me. While at it, use gdk-pixbuf-csource
to generate the .h at build time from the .ico instead of duplicating the
data in the repository.
2013-02-12 01:08:02 +01:00
Günther Brammer 2fded23a1b Editor: Get function autocomplete names from proplists instead of scripts 2012-05-18 17:49:38 +02:00
Günther Brammer 1a29f8625d Reorder engine source file organization a bit
This mostly consists of flattening the hierarchy, splitting the
graphics stuff out of platform, and a few smaller cleanups.
2012-04-27 19:04:43 +02:00
Günther Brammer 7632c823fe gtk: Drop compatibility with GTK versions older than 2.18 2012-04-18 00:37:31 +02:00
Günther Brammer 15ebf70ab1 win32: Move C4GUI::DialogWindow platform code to C4WindowWin32.cpp 2012-04-01 22:16:59 +02:00
Günther Brammer c865021716 gtk: Fold C4GtkWindow into C4Window 2012-04-11 04:15:33 +02:00
Günther Brammer 86a99ce458 C4Window: Introduce a separate WindowKind for the console window 2012-03-28 19:37:13 +02:00
Günther Brammer 3ec624bb7a win32: Clean up some leftover old frontend User Messages 2012-03-04 19:15:16 +01:00
Günther Brammer 9f180dffee Script: Remove ScriptGo, ScriptCounter, goto and the ScriptN callbacks
No scenario uses them, and ScheduleCall provides an alternative.
2011-09-19 21:33:05 +02:00
Günther Brammer 0cd46a2ebc Wrap C4AulFunc::Name in C4AulFunc::GetName() 2011-10-14 00:40:55 +02:00
Günther Brammer 2b6f4432de Rename lpDDraw to pDraw 2011-10-03 16:30:18 +02:00
Günther Brammer 55f6bc8d0f Replace CSurface and C4Surface with just C4Surface
The methods that previously were on C4Surface still are in a separate
file.
2011-10-03 16:06:41 +02:00
Günther Brammer d835ab002a Rename CStdWindow to C4Window 2011-08-27 23:12:01 +02:00
Günther Brammer f4ff47239f Rename CBltTransform, CBltVertex, CBltData, CPattern and CGammaControl 2011-09-30 22:15:51 +02:00
Günther Brammer 8039a35791 Rename CStdApp to C4AbstractApp 2011-08-27 16:20:39 +02:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Nicolas Hake fe747db554 Clean up copyright notices
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +02:00
Tobias Zwick 221aae1bf5 fixed some ridiculous formatting of consts 2011-08-04 01:30:37 +02:00
Günther Brammer c4f16d42ce Initialize some uninitialized variables 2011-07-18 02:12:37 +02:00
Günther Brammer 3c943479ab editor: File/Save creates a savegame when the original scenario was one 2011-05-15 19:38:47 +02:00
Günther Brammer 8bb2afc477 editor: Remove File/Save Game in favor of File/Save Game As
Overwriting a non-savegame scenario with a savegame is too seldomly useful
to feature prominently in the menu.
2011-05-15 18:07:26 +02:00
Günther Brammer e537296829 editor: Change FileSelect abstraction to use StdStrBuf
Of course, windows still uses a buffer on the stack, but at least the other
versions don't.
2011-04-08 23:52:40 +02:00
Günther Brammer 05146718c0 Remove RECT structure from platformindependant code 2011-03-13 20:45:30 +01:00
Günther Brammer 829874e011 editor/gtk: Migrate to non-deprecated APIs 2011-01-23 23:04:40 +01:00
Günther Brammer 8d3692e093 editor/gtk: Ask before overwriting a scenario
Previously, this was commented out because GTK 2.4 did not have the
convenience API, but Clonk requires a newer GTK now.
2011-01-19 02:16:48 +01:00
Günther Brammer d3ddc171ee editor/win32: Remove Components menu in favour of external editors 2011-01-19 02:14:59 +01:00