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:
parent
b261bcaf99
commit
489a7ae5dd
4 changed files with 81 additions and 30 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
#include "cc-shell.h"
|
||||
#include "cc-shell-model.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -30,7 +31,8 @@ G_BEGIN_DECLS
|
|||
|
||||
G_DECLARE_FINAL_TYPE (CcWindow, cc_window, CC, WINDOW, GtkApplicationWindow)
|
||||
|
||||
CcWindow *cc_window_new (GtkApplication *application);
|
||||
CcWindow *cc_window_new (GtkApplication *application,
|
||||
CcShellModel *model);
|
||||
|
||||
void cc_window_set_search_item (CcWindow *center,
|
||||
const char *search);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue