702.3.1
by Michael Terry
add modelines and fix up some inconsistent tabbings |
1 |
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
|
624.1.1
by Jason Smith
Implement trash can |
2 |
/*
|
3 |
* Copyright (C) 2010 Canonical Ltd
|
|
4 |
*
|
|
5 |
* This program is free software: you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License version 3 as
|
|
7 |
* published by the Free Software Foundation.
|
|
8 |
*
|
|
9 |
* This program is distributed in the hope that it will be useful,
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
* GNU General Public License for more details.
|
|
13 |
*
|
|
14 |
* You should have received a copy of the GNU General Public License
|
|
15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16 |
*
|
|
17 |
* Authored by: Jason Smith <jason.smith@canonical.com>
|
|
18 |
*/
|
|
19 |
||
20 |
#ifndef TRASHLAUNCHERICON_H
|
|
21 |
#define TRASHLAUNCHERICON_H
|
|
22 |
||
1396.1.1
by Andrea Azzarone
Uses the nautilus3 dbus interface to fix bug #808162. |
23 |
#include <gio/gio.h> |
24 |
#include <UnityCore/GLibWrapper.h> |
|
2541.1.1
by Andrea Azzarone
Cherrypick rev 2539 from lp:~3v1n0/unity/launcher-icon-construction-type. Thank you Marco. |
25 |
#include <UnityCore/GLibSignal.h> |
1396.1.1
by Andrea Azzarone
Uses the nautilus3 dbus interface to fix bug #808162. |
26 |
|
1346.5.1
by Andrea Azzarone
Uses DNDCollectionWindow to read drag information before mouse enters launcher x window. |
27 |
#include "DndData.h" |
624.1.1
by Jason Smith
Implement trash can |
28 |
#include "SimpleLauncherIcon.h" |
3008.162.1
by Marco Trevisan (Treviño)
TrashLauncherIcon: use FileManagerOpener to open it with correct event timestamp |
29 |
#include "FileManagerOpener.h" |
624.1.1
by Jason Smith
Implement trash can |
30 |
|
1635.1.31
by Tim Penhey
A few tweaks to get it to compile. |
31 |
namespace unity |
32 |
{
|
|
33 |
namespace launcher |
|
34 |
{
|
|
1396.1.1
by Andrea Azzarone
Uses the nautilus3 dbus interface to fix bug #808162. |
35 |
|
624.1.1
by Jason Smith
Implement trash can |
36 |
class TrashLauncherIcon : public SimpleLauncherIcon |
37 |
{
|
|
38 |
||
39 |
public: |
|
3008.162.1
by Marco Trevisan (Treviño)
TrashLauncherIcon: use FileManagerOpener to open it with correct event timestamp |
40 |
TrashLauncherIcon(FileManagerOpener::Ptr const& = nullptr); |
1307
by Neil Jagdish Patel
Update formatting to match style (as close as possible) |
41 |
~TrashLauncherIcon(); |
42 |
||
624.1.1
by Jason Smith
Implement trash can |
43 |
protected: |
1307
by Neil Jagdish Patel
Update formatting to match style (as close as possible) |
44 |
void UpdateTrashIcon(); |
45 |
||
2332.2.1
by Andrea Azzarone
Fixes bug #880798. |
46 |
nux::DndAction OnQueryAcceptDrop(DndData const& dnd_data); |
47 |
bool OnShouldHighlightOnDrag(DndData const& dnd_data); |
|
48 |
void OnAcceptDrop(DndData const& dnd_data); |
|
49 |
||
1882.2.14
by Thomi Richards
Refactor of launcher icon classes. |
50 |
std::string GetName() const; |
675
by Alex Launi
Bring back set trash icon depending on whether there are files in the trash or not |
51 |
|
52 |
private: |
|
1307
by Neil Jagdish Patel
Update formatting to match style (as close as possible) |
53 |
void ActivateLauncherIcon(ActionArg arg); |
2547.2.14
by Marco Trevisan (Treviño)
sed s/MenuItemsList/MenuItemsVector/g |
54 |
MenuItemsVector GetMenus(); |
1307
by Neil Jagdish Patel
Update formatting to match style (as close as possible) |
55 |
|
56 |
static void UpdateTrashIconCb(GObject* source, GAsyncResult* res, gpointer data); |
|
2541.1.1
by Andrea Azzarone
Cherrypick rev 2539 from lp:~3v1n0/unity/launcher-icon-construction-type. Thank you Marco. |
57 |
|
3008.162.1
by Marco Trevisan (Treviño)
TrashLauncherIcon: use FileManagerOpener to open it with correct event timestamp |
58 |
bool empty_; |
59 |
FileManagerOpener::Ptr file_manager_; |
|
2541.1.1
by Andrea Azzarone
Cherrypick rev 2539 from lp:~3v1n0/unity/launcher-icon-construction-type. Thank you Marco. |
60 |
glib::Object<GCancellable> cancellable_; |
61 |
glib::Object<GFileMonitor> trash_monitor_; |
|
62 |
glib::Signal<void, GFileMonitor*, GFile*, GFile*, GFileMonitorEvent> trash_changed_signal_; |
|
3008.162.1
by Marco Trevisan (Treviño)
TrashLauncherIcon: use FileManagerOpener to open it with correct event timestamp |
63 |
glib::Signal<void, DbusmenuMenuitem*, unsigned> empty_activated_signal_; |
624.1.1
by Jason Smith
Implement trash can |
64 |
};
|
65 |
||
1635.1.31
by Tim Penhey
A few tweaks to get it to compile. |
66 |
}
|
1396.1.1
by Andrea Azzarone
Uses the nautilus3 dbus interface to fix bug #808162. |
67 |
} // namespace unity |
68 |
||
624.1.1
by Jason Smith
Implement trash can |
69 |
#endif // TRASHLAUNCHERICON_H |