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

« back to all changes in this revision

Viewing changes to UnityCore/Lens.cpp

  • 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
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
 
2
/*
 
3
 * Copyright (C) 2011 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: Neil Jagdish Patel <neil.patel@canonical.com>
 
18
 */
 
19
 
 
20
#include "Lens.h"
 
21
 
 
22
#include <gio/gio.h>
 
23
#include <glib.h>
 
24
#include <NuxCore/Logger.h>
 
25
 
 
26
#include "config.h"
 
27
#include "GLibWrapper.h"
 
28
 
 
29
 
 
30
namespace unity
 
31
{
 
32
namespace dash
 
33
{
 
34
 
 
35
namespace
 
36
{
 
37
nux::logging::Logger logger("unity.dash.lens");
 
38
}
 
39
 
 
40
using std::string;
 
41
 
 
42
class Lens::Impl
 
43
{
 
44
public:
 
45
  Impl(Lens* owner,
 
46
       string const& id,
 
47
       string const& dbus_name,
 
48
       string const& dbus_path,
 
49
       string const& name,
 
50
       string const& icon,
 
51
       string const& description,
 
52
       string const& search_hint,
 
53
       bool visible,
 
54
       string const& shortcut);
 
55
 
 
56
  string const& id();
 
57
  string const& dbus_name();
 
58
  string const& dbus_path();
 
59
  string const& name();
 
60
  string const& icon();
 
61
  string const& description();
 
62
  string const& search_hint();
 
63
  bool visible();
 
64
  string const& shortcut();
 
65
 
 
66
 
 
67
  ~Impl();
 
68
 
 
69
  Lens* owner_;
 
70
 
 
71
  string id_;
 
72
  string dbus_name_;
 
73
  string dbus_path_;
 
74
  string name_;
 
75
  string icon_;
 
76
  string description_;
 
77
  string search_hint_;
 
78
  bool visible_;
 
79
  string shortcut_;
 
80
};
 
81
 
 
82
Lens::Impl::Impl(Lens* owner,
 
83
                 string const& id,
 
84
                 string const& dbus_name,
 
85
                 string const& dbus_path,
 
86
                 string const& name,
 
87
                 string const& icon,
 
88
                 string const& description,
 
89
                 string const& search_hint,
 
90
                 bool visible,
 
91
                 string const& shortcut)
 
92
  : owner_(owner)
 
93
  , id_(id)
 
94
  , dbus_name_(dbus_name)
 
95
  , dbus_path_(dbus_path)
 
96
  , name_(name)
 
97
  , icon_(icon)
 
98
  , description_(description)
 
99
  , search_hint_(search_hint)
 
100
  , visible_(visible)
 
101
  , shortcut_(shortcut)
 
102
{}
 
103
 
 
104
Lens::Impl::~Impl()
 
105
{}
 
106
 
 
107
string const& Lens::Impl::id()
 
108
{
 
109
  return id_;
 
110
}
 
111
 
 
112
string const& Lens::Impl::dbus_name()
 
113
{
 
114
  return dbus_name_;
 
115
}
 
116
 
 
117
string const& Lens::Impl::dbus_path()
 
118
{
 
119
  return dbus_path_;
 
120
}
 
121
 
 
122
string const& Lens::Impl::name()
 
123
{
 
124
  return name_;
 
125
}
 
126
 
 
127
string const& Lens::Impl::icon()
 
128
{
 
129
  return icon_;
 
130
}
 
131
 
 
132
string const& Lens::Impl::description()
 
133
{
 
134
  return description_;
 
135
}
 
136
 
 
137
string const& Lens::Impl::search_hint()
 
138
{
 
139
  return search_hint_;
 
140
}
 
141
 
 
142
bool Lens::Impl::visible()
 
143
{
 
144
  return visible_;
 
145
}
 
146
 
 
147
string const& Lens::Impl::shortcut()
 
148
{
 
149
  return shortcut_;
 
150
}
 
151
 
 
152
Lens::Lens(string const& id_,
 
153
           string const& dbus_name_,
 
154
           string const& dbus_path_,
 
155
           string const& name_,
 
156
           string const& icon_,
 
157
           string const& description_,
 
158
           string const& search_hint_,
 
159
           bool visible_,
 
160
           string const& shortcut_)
 
161
 
 
162
  : pimpl(new Impl(this,
 
163
                   id_,
 
164
                   dbus_name_,
 
165
                   dbus_path_,
 
166
                   name_,
 
167
                   icon_,
 
168
                   description_,
 
169
                   search_hint_,
 
170
                   visible_,
 
171
                   shortcut_))
 
172
{
 
173
  id.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::id));
 
174
  dbus_name.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::dbus_name));
 
175
  dbus_path.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::dbus_path));
 
176
  name.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::name));
 
177
  icon.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::icon));
 
178
  description.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::description));
 
179
  search_hint.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::search_hint));
 
180
  visible.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::visible));
 
181
  shortcut.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::shortcut));
 
182
}
 
183
 
 
184
Lens::~Lens()
 
185
{
 
186
  delete pimpl;
 
187
}
 
188
 
 
189
}
 
190
}