19
19
#ifndef _DEVICE_LAUNCHER_SECTION_H_
20
20
#define _DEVICE_LAUNCHER_SECTION_H_
22
25
#include <sigc++/sigc++.h>
23
26
#include <sigc++/signal.h>
26
#include "LauncherIcon.h"
27
#include "DevicesSettings.h"
27
#include <UnityCore/GLibWrapper.h>
29
#include "DeviceLauncherIcon.h"
31
36
class DeviceLauncherSection : public sigc::trackable
40
45
static bool PopulateEntries(DeviceLauncherSection* self);
41
static void OnVolumeAdded(GVolumeMonitor* monitor,
47
static void OnVolumeAdded(GVolumeMonitor* monitor,
43
49
DeviceLauncherSection* self);
44
static void OnVolumeRemoved(GVolumeMonitor* monitor,
51
static void OnVolumeRemoved(GVolumeMonitor* monitor,
46
53
DeviceLauncherSection* self);
47
static void OnMountAdded(GVolumeMonitor* monitor,
55
static void OnMountAdded(GVolumeMonitor* monitor,
49
57
DeviceLauncherSection* self);
52
GVolumeMonitor* _monitor;
59
static void OnMountPreUnmount(GVolumeMonitor* monitor,
61
DeviceLauncherSection* self);
56
gulong _on_volume_added_handler_id;
57
gulong _on_volume_removed_handler_id;
58
gulong _on_mount_added_handler_id;
59
gulong _on_device_populate_entry_id;
65
glib::Object<GVolumeMonitor> monitor_;
66
std::map<GVolume*, DeviceLauncherIcon*> map_;
67
gulong on_volume_added_handler_id_;
68
gulong on_volume_removed_handler_id_;
69
gulong on_mount_added_handler_id_;
70
gulong on_mount_pre_unmount_handler_id_;
71
gulong on_device_populate_entry_id_;
62
76
#endif // _DEVICE_LAUNCHER_SECTION_H_