From f87eade0e93389d742382b3e75a3a4e1c638b5dd Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 22 Sep 2017 04:22:45 -0400 Subject: mq_window_new(): Accept MqApplication argument Breaks build due to types not being defined soon enough in circularly dependent headers: CC src/marquee-main.o In file included from src/application.h:27:0, from src/main.c:30: src/window.h:35:15: error: unknown type name ‘MqApplication’ mq_window_new(MqApplication *application, gchar **uris); ^ --- (limited to 'src') diff --git a/src/application.c b/src/application.c index 1727ad3..f836ec1 100644 --- a/src/application.c +++ b/src/application.c @@ -55,7 +55,7 @@ mq_application_add_window(MqApplication *application, gchar **uris) { MqWindow *window; - window = mq_window_new(uris); + window = mq_window_new(application, uris); ++application->window_count; diff --git a/src/window.c b/src/window.c index cd61118..d2cf6cb 100644 --- a/src/window.c +++ b/src/window.c @@ -24,6 +24,7 @@ #include #include "window.h" +#include "application.h" #include "tab.h" static void @@ -59,7 +60,7 @@ update_positions(GtkNotebook __attribute__((unused)) *notebook, } MqWindow * -mq_window_new(gchar **uris) +mq_window_new(MqApplication *application, gchar **uris) { MqWindow *window; guint i; diff --git a/src/window.h b/src/window.h index 8e243bb..8651355 100644 --- a/src/window.h +++ b/src/window.h @@ -24,12 +24,14 @@ #include +#include "application.h" + typedef struct { GtkWidget *window; GtkWidget *notebook; } MqWindow; MqWindow * -mq_window_new(gchar **uris); +mq_window_new(MqApplication *application, gchar **uris); #endif -- cgit v0.9.1