Skip to content

Commit

Permalink
Fix vik2vik test program under GTK2
Browse files Browse the repository at this point in the history
Essentially revert previous change to be only for GTK3.
No I don't understand why it works this way.
  • Loading branch information
rnorris committed Feb 9, 2024
1 parent 6eb68c7 commit 612be7b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/vik2vik.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ int main(int argc, char *argv[])
// Seems to work without an $DISPLAY
// Also get lots of warnings about no actual drawing GCs available
// but for file processing this seems to be good enough
VikWindow *vw = vik_window_new_window();
VikLoadType_t lt;
VikAggregateLayer* agg = vik_aggregate_layer_new ();
#if GTK_CHECK_VERSION (3,0,0)
VikWindow *vw = vik_window_new_window();
VikViewport* vp = vik_window_viewport(vw);
#else
VikViewport* vp = vik_viewport_new ();
#endif

lt = a_file_load_stream ( stdin, NULL, agg, vp, NULL, TRUE, FALSE, NULL, "NotUsedName" );
if ( lt < LOAD_TYPE_VIK_FAILURE_NON_FATAL )
Expand Down

0 comments on commit 612be7b

Please sign in to comment.