window: Delegate model creation to CcApplication

In order be able to modify panel information statically,
we need to have access to the CcShellModel from static
functions. CcApplication, thus, is a better place for the
model to live, since we can access it outside any scope
using g_application_get_default().

It also makes sense from the modeling point of view, since
the model is not tied to the shell anymore.
This commit is contained in:
Georges Basile Stavracas Neto 2018-04-08 17:13:42 -03:00
parent b261bcaf99
commit 489a7ae5dd
4 changed files with 81 additions and 30 deletions

View file

@ -19,6 +19,8 @@
#pragma once
#include "cc-shell-model.h"
#include <gtk/gtk.h>
G_BEGIN_DECLS
@ -29,4 +31,6 @@ G_DECLARE_FINAL_TYPE (CcApplication, cc_application, CC, APPLICATION, GtkApplica
GtkApplication *cc_application_new (void);
G_END_DECLS
CcShellModel *cc_application_get_model (CcApplication *self);
G_END_DECLS