summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-22 04:22:45 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-22 04:22:45 (EDT)
commitf87eade0e93389d742382b3e75a3a4e1c638b5dd (patch)
treec37c6f686b60937bc47b6e5735b1b09d2621eff5
parent7ee2d9d8402bed2ab361ef0340a7f2a2c89e41fe (diff)
downloadmarquee-f87eade0e93389d742382b3e75a3a4e1c638b5dd.zip
marquee-f87eade0e93389d742382b3e75a3a4e1c638b5dd.tar.gz
marquee-f87eade0e93389d742382b3e75a3a4e1c638b5dd.tar.bz2
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); ^
-rw-r--r--src/application.c2
-rw-r--r--src/window.c3
-rw-r--r--src/window.h4
3 files changed, 6 insertions, 3 deletions
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 <gtk/gtk.h>
#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 <gtk/gtk.h>
+#include "application.h"
+
typedef struct {
GtkWidget *window;
GtkWidget *notebook;
} MqWindow;
MqWindow *
-mq_window_new(gchar **uris);
+mq_window_new(MqApplication *application, gchar **uris);
#endif