From 0053f1e591066d9d4be20c604bb611cf983a2eee Mon Sep 17 00:00:00 2001 From: Mikkel Kamstrup Erlandsen Date: Tue, 1 Feb 2011 13:36:50 +0100 Subject: Wire LauncherController up with the LauncherEntryRemoteModel. It still doesn't sync the incoming data to the LauncherIcons in the LauncherModel, but it's a start (bzr r798.5.8) --- src/LauncherController.cpp | 10 ++++++++++ src/LauncherController.h | 6 ++++++ 2 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/LauncherController.cpp b/src/LauncherController.cpp index cc0c34930..f77194f20 100644 --- a/src/LauncherController.cpp +++ b/src/LauncherController.cpp @@ -53,6 +53,9 @@ LauncherController::LauncherController(Launcher* launcher, CompScreen *screen, n _launcher->request_reorder_smart.connect (sigc::mem_fun (this, &LauncherController::OnLauncherRequestReorderSmart)); _launcher->request_reorder_before.connect (sigc::mem_fun (this, &LauncherController::OnLauncherRequestReorderBefore)); + + _remote_model = LauncherEntryRemoteModel::GetDefault(); + _remote_model->entry_added.connect (sigc::mem_fun (this, &LauncherController::OnLauncerEntryRemoteAdded)); } LauncherController::~LauncherController() @@ -187,6 +190,13 @@ LauncherController::OnIconAdded (LauncherIcon *icon) this->RegisterIcon (icon); } +void +LauncherController::OnLauncerEntryRemoteAdded (LauncherEntryRemote *entry) +{ + g_debug ("LAUNCHER ENTRY ADDED: %s %s", entry->DBusName (), entry->AppUri ()); + // FIXME: Wire the signals on entry up to matching LauncherIcon from the LauncherModel +} + void LauncherController::OnExpoClicked (int button) { diff --git a/src/LauncherController.h b/src/LauncherController.h index fa500aa3e..79c13f9f6 100644 --- a/src/LauncherController.h +++ b/src/LauncherController.h @@ -33,6 +33,9 @@ #include "FavoriteStore.h" #include "PlaceLauncherSection.h" +#include "LauncherEntryRemote.h" +#include "LauncherEntryRemoteModel.h" + #include #include @@ -57,6 +60,7 @@ private: int _sort_priority; PlaceLauncherSection* _place_section; DeviceLauncherSection* _device_section; + LauncherEntryRemoteModel* _remote_model; void SortAndSave (); @@ -64,6 +68,8 @@ private: void OnLauncherRequestReorderBefore (LauncherIcon *icon, LauncherIcon *before, bool save); void OnIconAdded (LauncherIcon *icon); + void OnLauncerEntryRemoteAdded (LauncherEntryRemote *entry); + void InsertExpoAction (); void InsertTrash (); -- cgit v1.2.3