~jamespharaoh/ubuntu/oneiric/unity/fix-for-880672

« back to all changes in this revision

Viewing changes to .pc/debian-changes-4.8.2-0ubuntu3/plugins/unityshell/src/TrashLauncherIcon.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-08-19 18:53:28 UTC
  • Revision ID: james.westby@ubuntu.com-20110819185328-qaxk9eepjaghewu9
Tags: 4.8.2-0ubuntu4
Backport another trunk commit to fix an alt-tab segfault

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
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
 
 
23
 
#include "SimpleLauncherIcon.h"
24
 
 
25
 
class TrashLauncherIcon : public SimpleLauncherIcon
26
 
{
27
 
 
28
 
public:
29
 
  TrashLauncherIcon(Launcher* launcher);
30
 
  ~TrashLauncherIcon();
31
 
 
32
 
  virtual nux::Color BackgroundColor();
33
 
  virtual nux::Color GlowColor();
34
 
 
35
 
protected:
36
 
  void UpdateTrashIcon();
37
 
 
38
 
  nux::DndAction OnQueryAcceptDrop(std::list<char*> uris);
39
 
  void OnAcceptDrop(std::list<char*> uris);
40
 
 
41
 
private:
42
 
  gulong _on_trash_changed_handler_id;
43
 
  gulong _on_confirm_dialog_close_id;
44
 
  GFileMonitor* m_TrashMonitor;
45
 
  gboolean _empty;
46
 
  GtkWidget*   _confirm_dialog;
47
 
 
48
 
  void ActivateLauncherIcon(ActionArg arg);
49
 
  std::list<DbusmenuMenuitem*> GetMenus();
50
 
 
51
 
  static void UpdateTrashIconCb(GObject* source, GAsyncResult* res, gpointer data);
52
 
  static void OnTrashChanged(GFileMonitor* monitor, GFile* file, GFile* other_file,
53
 
                             GFileMonitorEvent event_type, gpointer data);
54
 
  static void OnEmptyTrash(DbusmenuMenuitem* item, int time, TrashLauncherIcon* self);
55
 
  static void OnConfirmDialogClose(GtkDialog* dialog, gint response, gpointer user_data);
56
 
  static void EmptyTrashAction();
57
 
  static void RecursiveDelete(GFile* location);
58
 
 
59
 
};
60
 
 
61
 
#endif // TRASHLAUNCHERICON_H