~ubuntu-branches/ubuntu/oneiric/unity/oneiric

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/DevicesSettings.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-08-01 19:53:15 UTC
  • mfrom: (1.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20110801195315-mrewa9g7ctnk41oh
Tags: 4.6.0-0ubuntu1
* New upstream release.
  - compiz crashed with SIGSEGV in __strlen_sse2() (LP: #814619)
  - PlacesHomeView::PlacesHomeView leaks memory (LP: #818450)
  - PluginAdapter::MaximizeIfBigEnough leaks memory (LP: #818477)
  - Launcher - Make Launcher left of screen reveal more responsive and less
    prone to false positives (LP: #765819)
  - Launcher - clicking on a App launcher icon incorrectly un-minimizes
    windows (LP: #783434)
  - Unity doesn't get any mouse wheel scroll event in Indicators InputArea
    (LP: #814574)
  - Unity launcher gets cluttered when having multiple partitions and/or
    external volumes attached (LP: #713423)
  - Unity panel menus and indicators slow to respond. Too much lag.
    (LP: #742664)
  - In Unity the distinction between GVolume, GDrive and GMount is a bit
    confusing. (LP: #799890)
  - Launcher - When a item is deleted by dragging to Trash, the trash should
    pulse once before the Launcher disappears (LP: #750311)
  - ccsm needs an option to change launcher opacity (LP: #815032)
  - add a ccsm option to hide volumes in launcher (LP: #794707)
  - scale plugin doesn't work as desired when "Click Desktop To Show
    Desktop" is true (LP: #810315)
  - mute/unmute sound when user clicks on sound applet using scroll button
    or middle mouse button (LP: #609860)
  - Secondary activate (i.e. middle click) support for indicators advanced
    usage (LP: #812933)
* debian/control:
  - dep on latest libunity-misc
  - dep on latest nux
  - add build-dep on libgnome-desktop-3-dev
* debian/rules:
  - bump libunity-core-4.0-4 shlib for ABI break
  - don't ship unity dialogs right now. Not ready for alpha quality
* distro-patch the grey to darker grey (until the blur is done in nux)
* Switch to dpkg-source 3.0 (quilt) format
* debian/patches/01_revert_removed_function_for_unity2d_to_build.patch:
  - revert a removed API making unity-2d not building

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
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: Andrea Azzarone <aazzarone@hotmail.it>
18
 
*/
 
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: Andrea Azzarone <aazzarone@hotmail.it>
 
18
 */
19
19
 
20
20
#ifndef DEVICES_SETTINGS_H
21
21
#define DEVICES_SETTINGS_H
22
22
 
 
23
#include <list>
 
24
#include <string>
 
25
 
23
26
#include <gio/gio.h>
24
 
#include <Nux/Nux.h>
25
 
 
26
 
 
27
 
class DevicesSettings : public nux::Object
 
27
#include <boost/utility.hpp>
 
28
#include <sigc++/sigc++.h>
 
29
#include <UnityCore/GLibWrapper.h>
 
30
 
 
31
namespace unity {
 
32
 
 
33
typedef std::list<std::string> DeviceList;
 
34
 
 
35
class DevicesSettings : boost::noncopyable
28
36
{
29
37
public:
30
38
  typedef enum
36
44
  } DevicesOption;
37
45
 
38
46
  DevicesSettings();
39
 
  ~DevicesSettings();
40
 
 
41
 
  static DevicesSettings* GetDefault();
42
 
 
43
 
  DevicesOption GetDevicesOption();
44
 
 
45
 
  sigc::signal<void, DevicesSettings*> changed;
46
 
 
 
47
  
 
48
  static DevicesSettings& GetDefault();
 
49
 
 
50
  void SetDevicesOption(DevicesOption devices_option);
 
51
  DevicesOption GetDevicesOption() { return devices_option_; };
 
52
 
 
53
  DeviceList const& GetFavorites() { return favorites_; };
 
54
  void AddFavorite(std::string const& uuid);
 
55
  void RemoveFavorite(std::string const& uuid);
 
56
 
 
57
  void Changed(std::string const& key);
 
58
  
 
59
  // Signals
 
60
  sigc::signal<void> changed;
 
61
  
47
62
private:
48
63
  void Refresh();
49
 
  static void Changed(GSettings* settings, gchar* key, DevicesSettings* self);
 
64
  void SaveFavorites(DeviceList const& favorites);
50
65
 
51
 
private:
52
 
  GSettings*    _settings;
53
 
  int           _raw_devices_option;
54
 
  DevicesOption _devices_option;
 
66
  glib::Object<GSettings> settings_;
 
67
  DeviceList favorites_;
 
68
  bool ignore_signals_;
 
69
  DevicesOption devices_option_;
55
70
};
56
71
 
 
72
} // namespace unity
 
73
 
57
74
#endif // DEVICES_SETTINGS_H