summaryrefslogtreecommitdiff
diff options
authorDidier Roche <didier.roche@canonical.com>2010-09-24 18:51:39 +0200
committerDidier Roche <didier.roche@canonical.com>2010-09-24 18:51:39 +0200
commit8182ff80c03eb5b704e5acbe43b80491a7640d29 (patch)
tree7d97c13217ab54c00819e4f41f9e87c534864ede
parent71763f0213e55d107d58430e8d9a350f5260b88d (diff)
parent049fe421a56b280e1d61bef427a74ab33c16e970 (diff)
Import upstream version 0.2.44upstream-0.2.44
(bzr r55.4.29)
-rw-r--r--ChangeLog110
-rwxr-xr-xconfigure42
-rw-r--r--configure.ac4
-rw-r--r--targets/mutter/expose-manager.c209
-rw-r--r--targets/mutter/expose-manager.vala80
-rw-r--r--targets/mutter/maximus.c2
-rw-r--r--targets/mutter/plugin.c674
-rw-r--r--targets/mutter/plugin.vala400
-rw-r--r--targets/mutter/spaces-manager.c312
-rw-r--r--targets/mutter/spaces-manager.vala27
-rw-r--r--targets/mutter/unity-mutter.h3
-rw-r--r--targets/mutter/unity-mutter.vapi3
-rw-r--r--targets/mutter/window-management.c2
-rw-r--r--targets/unity/main.c2
-rw-r--r--tests/ui/test-automate.c2
-rw-r--r--tests/ui/test-home-button.c2
-rw-r--r--tests/ui/test-indicators.c2
-rw-r--r--tests/ui/test-quicklist.c2
-rw-r--r--tests/ui/test-ui.c2
-rw-r--r--tests/unit/test-appinfo-manager.c2
-rw-r--r--tests/unit/test-dbusmenu-quicklists.c2
-rw-r--r--tests/unit/test-io.c2
-rw-r--r--tests/unit/test-launcher.c2
-rw-r--r--tests/unit/test-panel-indicator-object-entry-view.c2
-rw-r--r--tests/unit/test-panel-indicator-object-view.c2
-rw-r--r--tests/unit/test-place-browser.c2
-rw-r--r--tests/unit/test-place.c2
-rw-r--r--tests/unit/test-places-place-file-model.c2
-rw-r--r--tests/unit/test-places-place.c2
-rw-r--r--tests/unit/test-places.c2
-rw-r--r--tests/unit/test-unit.c2
-rw-r--r--tests/unit/test-unity-pixbuf-cache.c2
-rw-r--r--unity-private/application.c2
-rw-r--r--unity-private/gesture/gesture-dispatcher-xcb-glu.c2
-rw-r--r--unity-private/gesture/gesture-dispatcher-xcb-glue.c24
-rw-r--r--unity-private/gesture/gesture-dispatcher-xcb.c2
-rw-r--r--unity-private/gesture/gesture-dispatcher.c2
-rw-r--r--unity-private/gesture/gesture-event.c39
-rw-r--r--unity-private/gesture/gesture-event.vala2
-rw-r--r--unity-private/launcher/application-controller.c163
-rw-r--r--unity-private/launcher/application-controller.vala53
-rw-r--r--unity-private/launcher/launcher.c2
-rw-r--r--unity-private/launcher/quicklist-check-menu-item.c2
-rw-r--r--unity-private/launcher/quicklist-controller.c2
-rw-r--r--unity-private/launcher/quicklist-image-menu-item.c2
-rw-r--r--unity-private/launcher/quicklist-menu-item.c2
-rw-r--r--unity-private/launcher/quicklist-radio-menu-item.c2
-rw-r--r--unity-private/launcher/quicklist-seperator-menu-item.c2
-rw-r--r--unity-private/launcher/quicklist-view.c2
-rw-r--r--unity-private/launcher/scroller-controller.c13
-rw-r--r--unity-private/launcher/scroller-controller.vala5
-rw-r--r--unity-private/launcher/scroller-model.c2
-rw-r--r--unity-private/launcher/scroller-view.c49
-rw-r--r--unity-private/launcher/scroller-view.vala49
-rw-r--r--unity-private/launcher/scrollerchild-controller.c2
-rw-r--r--unity-private/launcher/scrollerchild.c2
-rw-r--r--unity-private/panel/panel-background.c2
-rw-r--r--unity-private/panel/panel-divider.c2
-rw-r--r--unity-private/panel/panel-home-button.c4
-rw-r--r--unity-private/panel/panel-home-button.vala2
-rw-r--r--unity-private/panel/panel-indicator-background.c2
-rw-r--r--unity-private/panel/panel-indicator-bar.c2
-rw-r--r--unity-private/panel/panel-indicator-model.c2
-rw-r--r--unity-private/panel/panel-indicator-object-entry-view.c2
-rw-r--r--unity-private/panel/panel-indicator-object-view.c5
-rw-r--r--unity-private/panel/panel-menu-manager.c2
-rw-r--r--unity-private/panel/panel-menubar.c2
-rw-r--r--unity-private/panel/panel-tray.c2
-rw-r--r--unity-private/panel/panel-view.c2
-rw-r--r--unity-private/panel/panel-window-buttons.c2
-rw-r--r--unity-private/places/places-button.c2
-rw-r--r--unity-private/places/places-controller.c2
-rw-r--r--unity-private/places/places-default-renderer-group.c2
-rw-r--r--unity-private/places/places-default-renderer-tiles.c2
-rw-r--r--unity-private/places/places-default-renderer.c2
-rw-r--r--unity-private/places/places-folder-browser-renderer.c2
-rw-r--r--unity-private/places/places-place-bar.c2
-rw-r--r--unity-private/places/places-place-entry-scroller-child.c2
-rw-r--r--unity-private/places/places-place-entry-view.c2
-rw-r--r--unity-private/places/places-place-entry.c51
-rw-r--r--unity-private/places/places-place-entry.vala41
-rw-r--r--unity-private/places/places-place-home-renderer.c2
-rw-r--r--unity-private/places/places-place-home.c2
-rw-r--r--unity-private/places/places-place-model.c2
-rw-r--r--unity-private/places/places-place-search-bar.c2
-rw-r--r--unity-private/places/places-place-search-entry.c2
-rw-r--r--unity-private/places/places-place-search-extra-action.c2
-rw-r--r--unity-private/places/places-place-search-navigation.c2
-rw-r--r--unity-private/places/places-place-search-sections-bar.c2
-rw-r--r--unity-private/places/places-place-view.c2
-rw-r--r--unity-private/places/places-place.c2
-rw-r--r--unity-private/places/places-trash-controller.c4
-rw-r--r--unity-private/places/places-trash-controller.vala4
-rw-r--r--unity-private/places/places-view.c2
-rw-r--r--unity-private/places/places-volume-child-controller.c2
-rw-r--r--unity-private/places/places-volume-controller.c2
-rw-r--r--unity-private/testing/background.c2
-rw-r--r--unity-private/testing/object-registry.c2
-rw-r--r--unity-private/testing/perf-logger.c2
-rw-r--r--unity-private/testing/test-director.c2
-rw-r--r--unity-private/testing/test-utils.c2
-rw-r--r--unity-private/testing/test-window.c2
-rw-r--r--unity-private/unity-private.h5
-rw-r--r--unity-private/unity-private.vapi16
-rw-r--r--unity-private/unity.c2
-rw-r--r--unity-private/utils.c2
-rw-r--r--unity/chrome-handler.c2
-rw-r--r--unity/drag-controller.c2
-rw-r--r--unity/drag-view.c2
-rw-r--r--unity/entry.c2
-rw-r--r--unity/icon-postprocessor.c2
-rw-r--r--unity/prism-handler.c2
-rw-r--r--unity/quicklist-rendering.c2
-rw-r--r--unity/shell.c2
-rw-r--r--unity/theme.c2
-rw-r--r--unity/unity-appinfo-manager.c2
-rw-r--r--unity/unity-cairo-canvas.c2
-rw-r--r--unity/unity-expanding-bin.c2
-rw-r--r--unity/unity-favorites.c2
-rw-r--r--unity/unity-io.c2
-rw-r--r--unity/unity-layered-bin.c2
-rw-r--r--unity/unity-pixbuf-cache.c2
-rw-r--r--unity/unity-place-activation.c2
-rw-r--r--unity/unity-place-browser.c2
-rw-r--r--unity/unity-place-renderer.c2
-rw-r--r--unity/unity-place.c2
-rw-r--r--unity/unity-stripe-texture.c2
-rw-r--r--unity/unity.h2
-rw-r--r--unity/unity.vapi6
-rw-r--r--unity/webapp-fetcher.c2
-rw-r--r--vapi/indicator.vapi2
131 files changed, 1471 insertions, 1130 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b886f586..2d640f449 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,115 @@
# Generated by Makefile. Do not edit.
+2010-09-24 jassmith@gmail.com
+
+ Merge configure workspace layout branch
+
+2010-08-26 jassmith@gmail.com
+
+ ensure workspace layout is set upon unity start
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ [merge] Updated MT code
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ Do two stage back too
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ Implemented two stage pinch
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ interim commit
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ interim commit
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ 3-pinch = app-expose
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ 4-tap = show/hide dash
+
+2010-09-24 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ Only drag windows on 3-to-2
+
+2010-09-24 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>
+
+ Merge lp:~unity-team/unity/num-trash-items
+
+2010-09-24 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>
+
+ Workaround for fixing bug #646653 "The number of items message in the Unity trash does not load translations".
+
+ For some reason ngettext() doesn't work for us, and I've been unable to come up with a fix in suitable time for Maverick. Sorry world!
+
+2010-09-24 Gord Allott <gord.allott@canonical.com>
+
+ fixes favorite loading for didrocks, fixes lp:645835
+
+2010-09-24 Gord Allott <gord.allott@canonical.com>
+
+ don't check for application type
+
+2010-09-24 Gord Allott <gord.allott@canonical.com>
+
+ tries to work around crazy paths for favorites
+
+2010-09-24 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>
+
+ Fix crasher when place daemons fails to start on DBus activation
+
+2010-09-24 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>
+
+ Fix crasher when place daemons failed to start up on DBus activation.
+
+2010-09-24 Mirco Müller <mirco.mueller@ubuntu.com>
+
+ modified:
+ unity-private/panel/panel-home-button.vala
+
+ Merged unity.fix-644686 after review and approval from Gordon. This
+ uses the new (crisper) 24x24 cof-logo icon provided by Otto for the
+ panel's home-button. This needs to go alongside unity-asset-pool rev. 48
+ Fixes LP: #644686
+
+2010-09-24 Mirco Müller <mirco.mueller@ubuntu.com>
+
+ Use an updated cof-logo icon for the home-button. This needs a newer version of unity-asset-pool (rev. 48). Fixes LP: #644686
+
+2010-09-24 Mirco Müller <mirco.mueller@ubuntu.com>
+
+ modified:
+ unity-private/launcher/scroller-view.vala
+
+ Merged branch unity.fix-633069 after review and approval form Gordon.
+ Beautified the keyboard-shortcuts. Text is crisper and centered in the
+ box. Rounded corners are a bit smaller. This is for the Maverick RC.
+ Fixes LP: #633069
+
+2010-09-24 Mirco Müller <mirco.mueller@ubuntu.com>
+
+ Make keyboard-shortcut overlays a bit nicer. Rounded corners are a bit smaller now. Text is crisper and centered. Fixes LP: #633069
+
+2010-09-23 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ Fix vapi for indicator
+
+2010-09-23 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>
+
+ Add dep on latest libindicator (0.3.14) to get the new libindicate ABI
+
+2010-09-22 Neil Jagdish Patel <neil.patel@canonical.com>
+
+ Post release bump
+
2010-09-22 Neil Jagdish Patel <neil.patel@canonical.com>
[release] 0.2.42
diff --git a/configure b/configure
index 00349a72c..a287c2fa1 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for unity 0.2.42.
+# Generated by GNU Autoconf 2.67 for unity 0.2.44.
#
# Report bugs to <https://launchpad.net/unity>.
#
@@ -763,8 +763,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='unity'
PACKAGE_TARNAME='unity'
-PACKAGE_VERSION='0.2.42'
-PACKAGE_STRING='unity 0.2.42'
+PACKAGE_VERSION='0.2.44'
+PACKAGE_STRING='unity 0.2.44'
PACKAGE_BUGREPORT='https://launchpad.net/unity'
PACKAGE_URL=''
@@ -1574,7 +1574,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures unity 0.2.42 to adapt to many kinds of systems.
+\`configure' configures unity 0.2.44 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1644,7 +1644,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of unity 0.2.42:";;
+ short | recursive ) echo "Configuration of unity 0.2.44:";;
esac
cat <<\_ACEOF
@@ -1777,7 +1777,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-unity configure 0.2.42
+unity configure 0.2.44
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2057,7 +2057,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by unity $as_me 0.2.42, which was
+It was created by unity $as_me 0.2.44, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2891,7 +2891,7 @@ fi
# Define the identity of the package.
PACKAGE=unity
- VERSION=0.2.42
+ VERSION=0.2.44
cat >>confdefs.h <<_ACEOF
@@ -2934,8 +2934,8 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
DL_MAJOR_VERSION=0
DL_MINOR_VERSION=2
-DL_MICRO_VERSION=42
-DL_VERSION=0.2.42
+DL_MICRO_VERSION=44
+DL_VERSION=0.2.44
@@ -13561,7 +13561,7 @@ if test -n "$BASE_CFLAGS"; then
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13584,7 +13584,7 @@ if test -n "$BASE_CFLAGS"; then
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13610,7 +13610,7 @@ if test -n "$BASE_CFLAGS"; then
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13643,7 +13643,7 @@ if test -n "$BASE_LIBS"; then
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13666,7 +13666,7 @@ if test -n "$BASE_LIBS"; then
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13692,7 +13692,7 @@ if test -n "$BASE_LIBS"; then
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13734,7 +13734,7 @@ fi
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13758,7 +13758,7 @@ fi
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -13785,7 +13785,7 @@ fi
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
@@ -14546,7 +14546,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by unity $as_me 0.2.42, which was
+This file was extended by unity $as_me 0.2.44, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14612,7 +14612,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-unity config.status 0.2.42
+unity config.status 0.2.44
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 5d3faa6a4..e07418716 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
m4_define([unity_major], [0])
m4_define([unity_minor], [2])
-m4_define([unity_micro], [42])
+m4_define([unity_micro], [44])
m4_define([unity_api],
[unity_major.unity_minor])
@@ -112,7 +112,7 @@ PKG_CHECK_MODULES(BASE,
gee-1.0
gconf-2.0
gnome-desktop-2.0
- indicator
+ indicator >= 0.3.14
libbamf >= 0.2
libgnomeui-2.0
pango >= 1.6.0
diff --git a/targets/mutter/expose-manager.c b/targets/mutter/expose-manager.c
index 0e0347cfc..268f8b62d 100644
--- a/targets/mutter/expose-manager.c
+++ b/targets/mutter/expose-manager.c
@@ -1,4 +1,4 @@
-/* expose-manager.c generated by valac 0.9.8, the Vala compiler
+/* expose-manager.c generated by valac 0.10.0, the Vala compiler
* generated from expose-manager.vala, do not modify */
/*
@@ -66,12 +66,14 @@ typedef struct _UnityExposeManagerPrivate UnityExposeManagerPrivate;
typedef struct _UnityPlugin UnityPlugin;
typedef struct _UnityPluginClass UnityPluginClass;
#define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_object_unref (var), NULL)))
+typedef struct _Block2Data Block2Data;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _UnityPluginPrivate UnityPluginPrivate;
struct _UnityExposeClone {
ClutterGroup parent_instance;
UnityExposeClonePrivate * priv;
+ gboolean dirty;
};
struct _UnityExposeCloneClass {
@@ -131,6 +133,12 @@ struct _UnityExposeManagerPrivate {
UnityExposeClone* last_selected_clone;
};
+struct _Block2Data {
+ int _ref_count_;
+ UnityExposeManager * self;
+ UnityExposeClone* _clone;
+};
+
struct _UnityPlugin {
GObject parent_instance;
UnityPluginPrivate * priv;
@@ -223,12 +231,17 @@ void unity_expose_manager_set_hovered_opacity (UnityExposeManager* self, guint8
void unity_expose_manager_set_unhovered_opacity (UnityExposeManager* self, guint8 value);
void unity_expose_manager_set_darken (UnityExposeManager* self, guint8 value);
void unity_expose_manager_start_expose (UnityExposeManager* self, GSList* windows);
+gboolean unity_expose_manager_get_expose_showing (UnityExposeManager* self);
MutterPlugin* unity_plugin_get_plugin (UnityPlugin* self);
static void unity_expose_manager_on_clone_destroyed (UnityExposeManager* self);
static void _unity_expose_manager_on_clone_destroyed_clutter_actor_destroy (ClutterActor* _sender, gpointer self);
guint8 unity_expose_manager_get_hovered_opacity (UnityExposeManager* self);
guint8 unity_expose_manager_get_unhovered_opacity (UnityExposeManager* self);
guint8 unity_expose_manager_get_darken (UnityExposeManager* self);
+static void _lambda19_ (Block2Data* _data2_);
+static void __lambda19__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
+static Block2Data* block2_data_ref (Block2Data* _data2_);
+static void block2_data_unref (Block2Data* _data2_);
gboolean unity_expose_manager_get_coverflow (UnityExposeManager* self);
static void unity_expose_manager_position_windows_coverflow (UnityExposeManager* self, GList* windows, ClutterActor* active);
void unity_expose_manager_position_windows_on_grid (UnityExposeManager* self, GList* _windows, gint top_buffer, gint left_buffer, gint right_buffer, gint bottom_buffer);
@@ -240,7 +253,6 @@ static void unity_expose_manager_set_expose_showing (UnityExposeManager* self, g
static gboolean unity_expose_manager_on_stage_captured_event (UnityExposeManager* self, ClutterEvent* event);
static gboolean _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
void unity_expose_manager_end_expose (UnityExposeManager* self);
-gboolean unity_expose_manager_get_expose_showing (UnityExposeManager* self);
static gint unity_expose_manager_direct_comparison (UnityExposeManager* self, void* a, void* b);
static void unity_expose_manager_handle_event_coverflow (UnityExposeManager* self, ClutterEvent* event);
static void unity_expose_manager_handle_event_expose (UnityExposeManager* self, ClutterEvent* event, ClutterActor* actor);
@@ -848,6 +860,33 @@ static void _unity_expose_manager_on_clone_destroyed_clutter_actor_destroy (Clut
}
+static void _lambda19_ (Block2Data* _data2_) {
+ UnityExposeManager * self;
+ self = _data2_->self;
+ clutter_actor_destroy ((ClutterActor*) _data2_->_clone);
+}
+
+
+static void __lambda19__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
+ _lambda19_ (self);
+}
+
+
+static Block2Data* block2_data_ref (Block2Data* _data2_) {
+ g_atomic_int_inc (&_data2_->_ref_count_);
+ return _data2_;
+}
+
+
+static void block2_data_unref (Block2Data* _data2_) {
+ if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
+ _g_object_unref0 (_data2_->self);
+ _g_object_unref0 (_data2_->_clone);
+ g_slice_free (Block2Data, _data2_);
+ }
+}
+
+
static gboolean _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) {
gboolean result;
result = unity_expose_manager_on_stage_captured_event (self, event);
@@ -857,20 +896,42 @@ static gboolean _unity_expose_manager_on_stage_captured_event_clutter_actor_capt
void unity_expose_manager_start_expose (UnityExposeManager* self, GSList* windows) {
GList* _tmp0_;
- ClutterGroup* _tmp1_;
- ClutterActor* window_group;
- ClutterActor* _tmp2_;
+ GList* children;
GList* mutter_windows;
g_return_if_fail (self != NULL);
self->exposed_windows = (_tmp0_ = NULL, __g_list_free_g_object_unref0 (self->exposed_windows), _tmp0_);
- if (self->priv->expose_group != NULL) {
- clutter_actor_destroy ((ClutterActor*) self->priv->expose_group);
+ if (!self->priv->_expose_showing) {
+ ClutterGroup* _tmp1_;
+ ClutterActor* window_group;
+ ClutterActor* _tmp2_;
+ if (self->priv->expose_group != NULL) {
+ clutter_actor_destroy ((ClutterActor*) self->priv->expose_group);
+ }
+ self->priv->expose_group = (_tmp1_ = g_object_ref_sink ((ClutterGroup*) clutter_group_new ()), _g_object_unref0 (self->priv->expose_group), _tmp1_);
+ window_group = _g_object_ref0 (mutter_plugin_get_window_group (unity_plugin_get_plugin (self->priv->owner)));
+ clutter_container_add_actor ((_tmp2_ = window_group, CLUTTER_IS_CONTAINER (_tmp2_) ? ((ClutterContainer*) _tmp2_) : NULL), (ClutterActor*) self->priv->expose_group);
+ clutter_actor_raise_top ((ClutterActor*) self->priv->expose_group);
+ clutter_actor_show ((ClutterActor*) self->priv->expose_group);
+ _g_object_unref0 (window_group);
+ }
+ children = clutter_container_get_children ((ClutterContainer*) self->priv->expose_group);
+ {
+ GList* c_collection;
+ GList* c_it;
+ c_collection = children;
+ for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
+ ClutterActor* c;
+ c = _g_object_ref0 ((ClutterActor*) c_it->data);
+ {
+ ClutterActor* _tmp3_;
+ UnityExposeClone* _clone;
+ _clone = _g_object_ref0 ((_tmp3_ = c, UNITY_IS_EXPOSE_CLONE (_tmp3_) ? ((UnityExposeClone*) _tmp3_) : NULL));
+ _clone->dirty = TRUE;
+ _g_object_unref0 (_clone);
+ _g_object_unref0 (c);
+ }
+ }
}
- self->priv->expose_group = (_tmp1_ = g_object_ref_sink ((ClutterGroup*) clutter_group_new ()), _g_object_unref0 (self->priv->expose_group), _tmp1_);
- window_group = _g_object_ref0 (mutter_plugin_get_window_group (unity_plugin_get_plugin (self->priv->owner)));
- clutter_container_add_actor ((_tmp2_ = window_group, CLUTTER_IS_CONTAINER (_tmp2_) ? ((ClutterContainer*) _tmp2_) : NULL), (ClutterActor*) self->priv->expose_group);
- clutter_actor_raise_top ((ClutterActor*) self->priv->expose_group);
- clutter_actor_show ((ClutterActor*) self->priv->expose_group);
{
GSList* actor_collection;
GSList* actor_it;
@@ -879,49 +940,115 @@ void unity_expose_manager_start_expose (UnityExposeManager* self, GSList* window
ClutterActor* actor;
actor = _g_object_ref0 ((ClutterActor*) actor_it->data);
{
- gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
UnityExposeClone* clone;
+ gboolean was_existing;
if (!MUTTER_IS_WINDOW (actor)) {
- _tmp3_ = TRUE;
+ _tmp4_ = TRUE;
} else {
- gboolean _tmp4_ = FALSE;
gboolean _tmp5_ = FALSE;
- ClutterActor* _tmp6_;
- if (mutter_window_get_window_type ((_tmp6_ = actor, MUTTER_IS_WINDOW (_tmp6_) ? ((MutterWindow*) _tmp6_) : NULL)) != META_COMP_WINDOW_NORMAL) {
- ClutterActor* _tmp7_;
- _tmp5_ = mutter_window_get_window_type ((_tmp7_ = actor, MUTTER_IS_WINDOW (_tmp7_) ? ((MutterWindow*) _tmp7_) : NULL)) != META_COMP_WINDOW_DIALOG;
+ gboolean _tmp6_ = FALSE;
+ ClutterActor* _tmp7_;
+ if (mutter_window_get_window_type ((_tmp7_ = actor, MUTTER_IS_WINDOW (_tmp7_) ? ((MutterWindow*) _tmp7_) : NULL)) != META_COMP_WINDOW_NORMAL) {
+ ClutterActor* _tmp8_;
+ _tmp6_ = mutter_window_get_window_type ((_tmp8_ = actor, MUTTER_IS_WINDOW (_tmp8_) ? ((MutterWindow*) _tmp8_) : NULL)) != META_COMP_WINDOW_DIALOG;
} else {
- _tmp5_ = FALSE;
+ _tmp6_ = FALSE;
}
- if (_tmp5_) {
- ClutterActor* _tmp8_;
- _tmp4_ = mutter_window_get_window_type ((_tmp8_ = actor, MUTTER_IS_WINDOW (_tmp8_) ? ((MutterWindow*) _tmp8_) : NULL)) != META_COMP_WINDOW_MODAL_DIALOG;
+ if (_tmp6_) {
+ ClutterActor* _tmp9_;
+ _tmp5_ = mutter_window_get_window_type ((_tmp9_ = actor, MUTTER_IS_WINDOW (_tmp9_) ? ((MutterWindow*) _tmp9_) : NULL)) != META_COMP_WINDOW_MODAL_DIALOG;
} else {
- _tmp4_ = FALSE;
+ _tmp5_ = FALSE;
}
- _tmp3_ = _tmp4_;
+ _tmp4_ = _tmp5_;
}
- if (_tmp3_) {
+ if (_tmp4_) {
_g_object_unref0 (actor);
continue;
}
- clone = g_object_ref_sink (unity_expose_clone_new (actor));
+ clone = NULL;
+ was_existing = FALSE;
+ {
+ GList* c_collection;
+ GList* c_it;
+ c_collection = children;
+ for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
+ ClutterActor* c;
+ c = _g_object_ref0 ((ClutterActor*) c_it->data);
+ {
+ ClutterActor* _tmp10_;
+ UnityExposeClone* _clone;
+ _clone = _g_object_ref0 ((_tmp10_ = c, UNITY_IS_EXPOSE_CLONE (_tmp10_) ? ((UnityExposeClone*) _tmp10_) : NULL));
+ if (unity_expose_clone_get_source (_clone) == actor) {
+ UnityExposeClone* _tmp11_;
+ clone = (_tmp11_ = _g_object_ref0 (_clone), _g_object_unref0 (clone), _tmp11_);
+ was_existing = TRUE;
+ _clone->dirty = FALSE;
+ _g_object_unref0 (_clone);
+ _g_object_unref0 (c);
+ break;
+ }
+ _g_object_unref0 (_clone);
+ _g_object_unref0 (c);
+ }
+ }
+ }
+ if (clone == NULL) {
+ UnityExposeClone* _tmp12_;
+ clone = (_tmp12_ = g_object_ref_sink (unity_expose_clone_new (actor)), _g_object_unref0 (clone), _tmp12_);
+ }
unity_expose_clone_set_fade_on_close (clone, TRUE);
- clutter_actor_set_position ((ClutterActor*) clone, clutter_actor_get_x (actor), clutter_actor_get_y (actor));
- clutter_actor_set_size ((ClutterActor*) clone, clutter_actor_get_width (actor), clutter_actor_get_height (actor));
+ if (!was_existing) {
+ clutter_actor_set_position ((ClutterActor*) clone, clutter_actor_get_x (actor), clutter_actor_get_y (actor));
+ clutter_actor_set_size ((ClutterActor*) clone, clutter_actor_get_width (actor), clutter_actor_get_height (actor));
+ }
self->exposed_windows = g_list_append (self->exposed_windows, _g_object_ref0 (clone));
clutter_actor_set_reactive ((ClutterActor*) clone, TRUE);
clutter_container_add_actor ((ClutterContainer*) self->priv->expose_group, (ClutterActor*) clone);
g_signal_connect_object ((ClutterActor*) clone, "destroy", (GCallback) _unity_expose_manager_on_clone_destroyed_clutter_actor_destroy, self, 0);
unity_expose_clone_set_hovered_opacity (clone, self->priv->_hovered_opacity);
unity_expose_clone_set_unhovered_opacity (clone, self->priv->_unhovered_opacity);
- clutter_actor_set_opacity ((ClutterActor*) clone, self->priv->_unhovered_opacity);
+ if (!was_existing) {
+ gint _tmp13_ = 0;
+ if (self->priv->_expose_showing) {
+ _tmp13_ = 0;
+ } else {
+ _tmp13_ = (gint) self->priv->_unhovered_opacity;
+ }
+ clutter_actor_set_opacity ((ClutterActor*) clone, (guint8) _tmp13_);
+ }
unity_expose_clone_set_darken (clone, self->priv->_darken);
_g_object_unref0 (clone);
_g_object_unref0 (actor);
}
}
}
+ {
+ GList* c_collection;
+ GList* c_it;
+ c_collection = children;
+ for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
+ ClutterActor* c;
+ c = _g_object_ref0 ((ClutterActor*) c_it->data);
+ {
+ Block2Data* _data2_;
+ ClutterActor* _tmp14_;
+ _data2_ = g_slice_new0 (Block2Data);
+ _data2_->_ref_count_ = 1;
+ _data2_->self = g_object_ref (self);
+ _data2_->_clone = _g_object_ref0 ((_tmp14_ = c, UNITY_IS_EXPOSE_CLONE (_tmp14_) ? ((UnityExposeClone*) _tmp14_) : NULL));
+ if (_data2_->_clone->dirty) {
+ ClutterAnimation* anim;
+ anim = _g_object_ref0 (clutter_actor_animate ((ClutterActor*) _data2_->_clone, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "scale-x", 0.0f, "scale-y", 0.0f, "opacity", 0, NULL));
+ g_signal_connect_data (anim, "completed", (GCallback) __lambda19__clutter_animation_completed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
+ _g_object_unref0 (anim);
+ }
+ _g_object_unref0 (c);
+ block2_data_unref (_data2_);
+ }
+ }
+ }
mutter_windows = mutter_plugin_get_windows (unity_plugin_get_plugin (self->priv->owner));
{
GList* w_collection;
@@ -931,14 +1058,14 @@ void unity_expose_manager_start_expose (UnityExposeManager* self, GSList* window
MutterWindow* w;
w = _g_object_ref0 ((MutterWindow*) w_it->data);
{
- MutterWindow* _tmp9_;
- MutterWindow* _tmp10_;
+ MutterWindow* _tmp15_;
+ MutterWindow* _tmp16_;
if (mutter_window_get_window_type (w) == META_COMP_WINDOW_DESKTOP) {
_g_object_unref0 (w);
continue;
}
- clutter_actor_set_reactive ((_tmp9_ = w, CLUTTER_IS_ACTOR (_tmp9_) ? ((ClutterActor*) _tmp9_) : NULL), FALSE);
- clutter_actor_set_opacity ((_tmp10_ = w, CLUTTER_IS_ACTOR (_tmp10_) ? ((ClutterActor*) _tmp10_) : NULL), (guint8) 0);
+ clutter_actor_set_reactive ((_tmp15_ = w, CLUTTER_IS_ACTOR (_tmp15_) ? ((ClutterActor*) _tmp15_) : NULL), FALSE);
+ clutter_actor_set_opacity ((_tmp16_ = w, CLUTTER_IS_ACTOR (_tmp16_) ? ((ClutterActor*) _tmp16_) : NULL), (guint8) 0);
_g_object_unref0 (w);
}
}
@@ -949,10 +1076,12 @@ void unity_expose_manager_start_expose (UnityExposeManager* self, GSList* window
} else {
unity_expose_manager_position_windows_on_grid (self, self->exposed_windows, self->priv->_top_buffer, self->priv->_left_buffer, self->priv->_right_buffer, self->priv->_bottom_buffer);
}
- unity_expose_manager_set_expose_showing (self, TRUE);
- unity_shell_add_fullscreen_request ((UnityShell*) self->priv->owner, (GObject*) self);
- g_signal_connect_object ((ClutterActor*) self->priv->stage, "captured-event", (GCallback) _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event, self, 0);
- _g_object_unref0 (window_group);
+ if (!self->priv->_expose_showing) {
+ unity_expose_manager_set_expose_showing (self, TRUE);
+ g_signal_connect_object ((ClutterActor*) self->priv->stage, "captured-event", (GCallback) _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event, self, 0);
+ unity_shell_add_fullscreen_request ((UnityShell*) self->priv->owner, (GObject*) self);
+ }
+ _g_list_free0 (children);
}
@@ -1166,7 +1295,7 @@ void unity_expose_manager_position_windows_on_grid (UnityExposeManager* self, GL
gint boxHeight;
g_return_if_fail (self != NULL);
if (g_list_length (_windows) < 1) {
- g_warning ("expose-manager.vala:479: There are no windows to position on grid");
+ g_warning ("expose-manager.vala:528: There are no windows to position on grid");
return;
}
windows = g_list_copy (_windows);
@@ -1260,7 +1389,7 @@ void unity_expose_manager_position_windows_on_grid (UnityExposeManager* self, GL
windowY = centerY - (((gint) clutter_actor_get_height (window)) / 2);
scale = MIN (MIN ((float) 1, (boxWidth - 20) / clutter_actor_get_width (window)), MIN ((float) 1, (boxHeight - 20) / clutter_actor_get_height (window)));
g_object_set ((GObject*) window, "scale-gravity", CLUTTER_GRAVITY_CENTER, NULL);
- clutter_actor_animate (window, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) windowX, "y", (float) windowY, "scale-x", scale, "scale-y", scale, NULL);
+ clutter_actor_animate (window, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) windowX, "y", (float) windowY, "scale-x", scale, "scale-y", scale, "opacity", self->priv->_unhovered_opacity, NULL);
_g_object_unref0 (window);
}
}
diff --git a/targets/mutter/expose-manager.vala b/targets/mutter/expose-manager.vala
index afdaf773e..d986f9426 100644
--- a/targets/mutter/expose-manager.vala
+++ b/targets/mutter/expose-manager.vala
@@ -36,6 +36,7 @@ namespace Unity
public float pre_drag_scale_y { get; private set; }
public bool fade_on_close { get; set; }
+ public bool dirty;
public unowned Clutter.Actor source { get; private set; }
@@ -280,15 +281,25 @@ namespace Unity
{
exposed_windows = new List<ExposeClone> ();
- if (expose_group != null)
- expose_group.destroy ();
- expose_group = new Clutter.Group ();
+ if (!expose_showing)
+ {
+ if (expose_group != null)
+ expose_group.destroy ();
+ expose_group = new Clutter.Group ();
+
+ Clutter.Actor window_group = owner.plugin.get_window_group ();
- Clutter.Actor window_group = owner.plugin.get_window_group ();
+ (window_group as Clutter.Container).add_actor (expose_group);
+ expose_group.raise_top ();
+ expose_group.show ();
+ }
- (window_group as Clutter.Container).add_actor (expose_group);
- expose_group.raise_top ();
- expose_group.show ();
+ var children = expose_group.get_children ();
+ foreach (Clutter.Actor c in children)
+ {
+ ExposeClone _clone = c as ExposeClone;
+ _clone.dirty = true;
+ }
foreach (Clutter.Actor actor in windows)
{
@@ -297,11 +308,31 @@ namespace Unity
(actor as Mutter.Window).get_window_type () != Mutter.MetaCompWindowType.DIALOG &&
(actor as Mutter.Window).get_window_type () != Mutter.MetaCompWindowType.MODAL_DIALOG))
continue;
+
+ ExposeClone? clone = null;
+ bool was_existing = false;
+
+ foreach (Clutter.Actor c in children)
+ {
+ ExposeClone _clone = c as ExposeClone;
+ if (_clone.source == actor)
+ {
+ clone = _clone;
+ was_existing = true;
+ _clone.dirty = false;
+ break;
+ }
+ }
+
+ if (clone == null)
+ clone = new ExposeClone (actor);
- ExposeClone clone = new ExposeClone (actor);
clone.fade_on_close = true;
- clone.set_position (actor.x, actor.y);
- clone.set_size (actor.width, actor.height);
+ if (!was_existing)
+ {
+ clone.set_position (actor.x, actor.y);
+ clone.set_size (actor.width, actor.height);
+ }
exposed_windows.append (clone);
clone.reactive = true;
@@ -311,10 +342,25 @@ namespace Unity
clone.hovered_opacity = hovered_opacity;
clone.unhovered_opacity = unhovered_opacity;
- clone.opacity = unhovered_opacity;
+ if (!was_existing)
+ clone.opacity = expose_showing ? 0 : unhovered_opacity;
clone.darken = darken;
}
+ foreach (Clutter.Actor c in children)
+ {
+ ExposeClone _clone = c as ExposeClone;
+
+ if (_clone.dirty)
+ {
+ var anim = _clone.animate (Clutter.AnimationMode.EASE_IN_OUT_SINE, 250,
+ "scale-x", 0.0f,
+ "scale-y", 0.0f,
+ "opacity", 0);
+ anim.completed.connect (() => {_clone.destroy ();});
+ }
+ }
+
unowned GLib.List<Mutter.Window> mutter_windows = owner.plugin.get_windows ();
foreach (Mutter.Window w in mutter_windows)
{
@@ -331,10 +377,13 @@ namespace Unity
else
position_windows_on_grid (exposed_windows, top_buffer, left_buffer, right_buffer, bottom_buffer);
- expose_showing = true;
+ if (!expose_showing)
+ {
+ expose_showing = true;
- owner.add_fullscreen_request (this);
- stage.captured_event.connect (on_stage_captured_event);
+ stage.captured_event.connect (on_stage_captured_event);
+ owner.add_fullscreen_request (this);
+ }
}
private void on_clone_destroyed ()
@@ -545,7 +594,8 @@ namespace Unity
"x", (float) windowX,
"y", (float) windowY,
"scale-x", scale,
- "scale-y", scale);
+ "scale-y", scale,
+ "opacity", unhovered_opacity);
}
}
}
diff --git a/targets/mutter/maximus.c b/targets/mutter/maximus.c
index 03f5e36e9..d901a162c 100644
--- a/targets/mutter/maximus.c
+++ b/targets/mutter/maximus.c
@@ -1,4 +1,4 @@
-/* maximus.c generated by valac 0.9.8, the Vala compiler
+/* maximus.c generated by valac 0.10.0, the Vala compiler
* generated from maximus.vala, do not modify */
/*
diff --git a/targets/mutter/plugin.c b/targets/mutter/plugin.c
index 14616c28c..24d5ddc31 100644
--- a/targets/mutter/plugin.c
+++ b/targets/mutter/plugin.c
@@ -1,4 +1,4 @@
-/* plugin.c generated by valac 0.9.8, the Vala compiler
+/* plugin.c generated by valac 0.10.0, the Vala compiler
* generated from plugin.vala, do not modify */
/*
@@ -112,6 +112,8 @@ typedef struct _UnitySpacesManager UnitySpacesManager;
typedef struct _UnitySpacesManagerClass UnitySpacesManagerClass;
#define UNITY_PLUGIN_TYPE_MAXIMIZE_TYPE (unity_plugin_maximize_type_get_type ())
+
+#define UNITY_PLUGIN_TYPE_EXPOSE_TYPE (unity_plugin_expose_type_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
@@ -119,7 +121,7 @@ typedef struct _UnitySpacesManagerClass UnitySpacesManagerClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_array_free0(var) ((var == NULL) ? NULL : (var = (g_array_free (var, TRUE), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
-typedef struct _Block6Data Block6Data;
+typedef struct _Block7Data Block7Data;
struct _UnityDragDest {
GtkWindow parent_instance;
@@ -156,6 +158,13 @@ typedef enum {
UNITY_PLUGIN_MAXIMIZE_TYPE_RIGHT
} UnityPluginMaximizeType;
+typedef enum {
+ UNITY_PLUGIN_EXPOSE_TYPE_NONE,
+ UNITY_PLUGIN_EXPOSE_TYPE_APPLICATION,
+ UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS,
+ UNITY_PLUGIN_EXPOSE_TYPE_WORKSPACE
+} UnityPluginExposeType;
+
struct _UnityPluginPrivate {
MutterPlugin* _plugin;
gboolean _super_key_enable;
@@ -189,9 +198,11 @@ struct _UnityPluginPrivate {
float last_pan_x_root;
float last_pan_maximised_x_root;
UnityPluginMaximizeType maximize_type;
+ UnityPluginExposeType expose_type;
+ MutterWindow* start_pinch_window;
};
-struct _Block6Data {
+struct _Block7Data {
int _ref_count_;
UnityPlugin * self;
MetaWindow* win;
@@ -219,6 +230,7 @@ GType unity_window_management_get_type (void) G_GNUC_CONST;
GType unity_maximus_get_type (void) G_GNUC_CONST;
GType unity_spaces_manager_get_type (void) G_GNUC_CONST;
static GType unity_plugin_maximize_type_get_type (void) G_GNUC_UNUSED;
+static GType unity_plugin_expose_type_get_type (void) G_GNUC_UNUSED;
#define UNITY_PLUGIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_PLUGIN, UnityPluginPrivate))
enum {
UNITY_PLUGIN_DUMMY_PROPERTY,
@@ -277,8 +289,8 @@ static gboolean _lambda16_ (UnityPlugin* self);
static gboolean __lambda16__gsource_func (gpointer self);
static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEvent* event);
static void _unity_plugin_on_gesture_received_unity_gesture_dispatcher_gesture (UnityGestureDispatcher* _sender, UnityGestureEvent* event, gpointer self);
-static gboolean _lambda19_ (UnityPlugin* self);
-static gboolean __lambda19__gsource_func (gpointer self);
+static gboolean _lambda20_ (UnityPlugin* self);
+static gboolean __lambda20__gsource_func (gpointer self);
static void unity_plugin_on_focus_window_changed (UnityPlugin* self);
static void unity_plugin_check_fullscreen_obstruction (UnityPlugin* self);
static void unity_plugin_on_focus_window_fullscreen_changed (UnityPlugin* self);
@@ -286,10 +298,10 @@ static void _unity_plugin_on_focus_window_fullscreen_changed_g_object_notify (GO
static void unity_plugin_got_screensaver_changed (UnityPlugin* self, DBusGProxy* screensaver, gboolean changed);
static void unity_plugin_set_fullscreen_obstruction (UnityPlugin* self, gboolean value);
static guint32 unity_plugin_real_get_current_time (UnityShell* base);
-static void _lambda20_ (UnityPlugin* self);
-static void __lambda20__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
static void _lambda21_ (UnityPlugin* self);
static void __lambda21__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
+static void _lambda22_ (UnityPlugin* self);
+static void __lambda22__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
static void unity_plugin_refresh_n_backgrounds (UnityPlugin* self, gint n_monitors);
static void unity_plugin_real_add_fullscreen_request (UnityShell* base, GObject* o);
static gboolean unity_plugin_real_remove_fullscreen_request (UnityShell* base, GObject* o);
@@ -324,12 +336,12 @@ void unity_plugin_minimize (UnityPlugin* self, MutterWindow* window);
void unity_plugin_maximize (UnityPlugin* self, MutterWindow* window, gint x, gint y, gint width, gint height);
void unity_plugin_unmaximize (UnityPlugin* self, MutterWindow* window, gint x, gint y, gint width, gint height);
void unity_plugin_map (UnityPlugin* self, MutterWindow* window);
-static gboolean _lambda22_ (Block6Data* _data6_);
-static gboolean __lambda22__gsource_func (gpointer self);
+static gboolean _lambda23_ (Block7Data* _data7_);
+static gboolean __lambda23__gsource_func (gpointer self);
gboolean unity_maximus_process_window (UnityMaximus* self, MutterWindow* window);
static void _unity_plugin_on_focus_window_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
-static Block6Data* block6_data_ref (Block6Data* _data6_);
-static void block6_data_unref (Block6Data* _data6_);
+static Block7Data* block7_data_ref (Block7Data* _data7_);
+static void block7_data_unref (Block7Data* _data7_);
void unity_plugin_destroy (UnityPlugin* self, MutterWindow* window);
void unity_plugin_switch_workspace (UnityPlugin* self, gint from, gint to, gint direction);
void unity_plugin_on_kill_window_effects (UnityPlugin* self, MutterWindow* window);
@@ -433,6 +445,18 @@ static GType unity_plugin_maximize_type_get_type (void) {
}
+static GType unity_plugin_expose_type_get_type (void) {
+ static volatile gsize unity_plugin_expose_type_type_id__volatile = 0;
+ if (g_once_init_enter (&unity_plugin_expose_type_type_id__volatile)) {
+ static const GEnumValue values[] = {{UNITY_PLUGIN_EXPOSE_TYPE_NONE, "UNITY_PLUGIN_EXPOSE_TYPE_NONE", "none"}, {UNITY_PLUGIN_EXPOSE_TYPE_APPLICATION, "UNITY_PLUGIN_EXPOSE_TYPE_APPLICATION", "application"}, {UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS, "UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS", "windows"}, {UNITY_PLUGIN_EXPOSE_TYPE_WORKSPACE, "UNITY_PLUGIN_EXPOSE_TYPE_WORKSPACE", "workspace"}, {0, NULL, NULL}};
+ GType unity_plugin_expose_type_type_id;
+ unity_plugin_expose_type_type_id = g_enum_register_static ("UnityPluginExposeType", values);
+ g_once_init_leave (&unity_plugin_expose_type_type_id__volatile, unity_plugin_expose_type_type_id);
+ }
+ return unity_plugin_expose_type_type_id__volatile;
+}
+
+
static gpointer _g_object_ref0 (gpointer self) {
return self ? g_object_ref (self) : NULL;
}
@@ -544,7 +568,7 @@ static void _unity_plugin_on_gesture_received_unity_gesture_dispatcher_gesture (
}
-static gboolean _lambda19_ (UnityPlugin* self) {
+static gboolean _lambda20_ (UnityPlugin* self) {
gboolean result = FALSE;
unity_shell_set_is_starting ((UnityShell*) self, FALSE);
result = FALSE;
@@ -552,9 +576,9 @@ static gboolean _lambda19_ (UnityPlugin* self) {
}
-static gboolean __lambda19__gsource_func (gpointer self) {
+static gboolean __lambda20__gsource_func (gpointer self) {
gboolean result;
- result = _lambda19_ (self);
+ result = _lambda20_ (self);
return result;
}
@@ -625,7 +649,7 @@ static gboolean unity_plugin_real_construct (UnityPlugin* self) {
_inner_error_ = NULL;
{
unity_plugin_set_super_key_enable (self, TRUE);
- g_warning ("plugin.vala:294: Cannot find super_key_enable gconf key");
+ g_warning ("plugin.vala:303: Cannot find super_key_enable gconf key");
_g_error_free0 (e);
}
}
@@ -656,7 +680,7 @@ static gboolean unity_plugin_real_construct (UnityPlugin* self) {
e = _inner_error_;
_inner_error_ = NULL;
{
- g_warning ("plugin.vala:300: Cannot set gconf callback function of super_key_enabl" \
+ g_warning ("plugin.vala:309: Cannot set gconf callback function of super_key_enabl" \
"e");
_g_error_free0 (e);
}
@@ -726,7 +750,7 @@ static gboolean unity_plugin_real_construct (UnityPlugin* self) {
self->gesture_dispatcher = (_tmp27_ = (UnityGestureDispatcher*) unity_gesture_xcb_dispatcher_new (), _g_object_unref0 (self->gesture_dispatcher), _tmp27_);
g_signal_connect_object (self->gesture_dispatcher, "gesture", (GCallback) _unity_plugin_on_gesture_received_unity_gesture_dispatcher_gesture, self, 0);
unity_shell_ensure_input_region ((UnityShell*) self);
- g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda19__gsource_func, g_object_ref (self), g_object_unref);
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda20__gsource_func, g_object_ref (self), g_object_unref);
result = FALSE;
_g_object_unref0 (display);
_g_object_unref0 (gc);
@@ -831,7 +855,7 @@ static guint32 unity_plugin_real_get_current_time (UnityShell* base) {
}
-static void _lambda20_ (UnityPlugin* self) {
+static void _lambda21_ (UnityPlugin* self) {
ClutterActor* _tmp0_;
UnityLauncherLauncherContainer* _tmp1_;
ctk_effect_cache_update_texture_cache ((_tmp1_ = (_tmp0_ = unity_launcher_launcher_get_container (self->priv->launcher), UNITY_LAUNCHER_IS_LAUNCHER_CONTAINER (_tmp0_) ? ((UnityLauncherLauncherContainer*) _tmp0_) : NULL))->cache);
@@ -839,18 +863,18 @@ static void _lambda20_ (UnityPlugin* self) {
}
-static void __lambda20__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
- _lambda20_ (self);
+static void __lambda21__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
+ _lambda21_ (self);
}
-static void _lambda21_ (UnityPlugin* self) {
+static void _lambda22_ (UnityPlugin* self) {
ctk_effect_cache_update_texture_cache (self->priv->panel->cache);
}
-static void __lambda21__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
- _lambda21_ (self);
+static void __lambda22__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
+ _lambda22_ (self);
}
@@ -931,10 +955,10 @@ static void unity_plugin_check_fullscreen_obstruction (UnityPlugin* self) {
unity_plugin_set_fullscreen_obstruction (self, FALSE);
}
if (CLUTTER_IS_ANIMATION (anim)) {
- g_signal_connect_object (anim, "completed", (GCallback) __lambda20__clutter_animation_completed, self, 0);
+ g_signal_connect_object (anim, "completed", (GCallback) __lambda21__clutter_animation_completed, self, 0);
}
if (CLUTTER_IS_ANIMATION (panim)) {
- g_signal_connect_object (panim, "completed", (GCallback) __lambda21__clutter_animation_completed, self, 0);
+ g_signal_connect_object (panim, "completed", (GCallback) __lambda22__clutter_animation_completed, self, 0);
}
_g_object_unref0 (panim);
_g_object_unref0 (anim);
@@ -1520,7 +1544,7 @@ static void unity_plugin_real_do_window_action (UnityShell* base, guint32 xid, U
{
GEnumValue* _tmp0_;
char* _tmp1_;
- g_warning ("plugin.vala:903: %s", _tmp1_ = g_strconcat ("Window action type ", (_tmp0_ = g_enum_get_value (g_type_class_ref (UNITY_TYPE_WINDOW_ACTION), (int) action), (_tmp0_ != NULL) ? _tmp0_->value_name : NULL), " not supported", NULL));
+ g_warning ("plugin.vala:912: %s", _tmp1_ = g_strconcat ("Window action type ", (_tmp0_ = g_enum_get_value (g_type_class_ref (UNITY_TYPE_WINDOW_ACTION), (int) action), (_tmp0_ != NULL) ? _tmp0_->value_name : NULL), " not supported", NULL));
_g_free0 (_tmp1_);
break;
}
@@ -1532,7 +1556,6 @@ static void unity_plugin_real_do_window_action (UnityShell* base, guint32 xid, U
static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEvent* event) {
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
- gboolean _tmp2_ = FALSE;
g_return_if_fail (self != NULL);
g_return_if_fail (event != NULL);
if (self->priv->active_gesture_type != UNITY_GESTURE_TYPE_NONE) {
@@ -1553,214 +1576,251 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
}
}
if (event->type == UNITY_GESTURE_TYPE_TAP) {
- _tmp2_ = self->priv->places_showing == FALSE;
- } else {
- _tmp2_ = FALSE;
- }
- if (_tmp2_) {
- if (event->fingers == 3) {
- MutterWindow* window;
- ClutterActor* actor;
- if (unity_expose_manager_get_expose_showing (self->priv->_expose_manager) == TRUE) {
- unity_expose_manager_end_expose (self->priv->_expose_manager);
- return;
- }
- window = NULL;
- actor = _g_object_ref0 (clutter_stage_get_actor_at_pos (self->priv->stage, CLUTTER_PICK_ALL, (gint) event->root_x, (gint) event->root_y));
- if (MUTTER_IS_WINDOW (actor) == FALSE) {
- ClutterActor* _tmp3_;
- actor = (_tmp3_ = _g_object_ref0 (clutter_actor_get_parent (actor)), _g_object_unref0 (actor), _tmp3_);
- }
- if (MUTTER_IS_WINDOW (actor)) {
- ClutterActor* _tmp4_;
- MutterWindow* _tmp5_;
- gboolean _tmp6_ = FALSE;
- gboolean _tmp7_ = FALSE;
- gboolean _tmp8_ = FALSE;
- window = (_tmp5_ = _g_object_ref0 ((_tmp4_ = actor, MUTTER_IS_WINDOW (_tmp4_) ? ((MutterWindow*) _tmp4_) : NULL)), _g_object_unref0 (window), _tmp5_);
- if (mutter_window_get_window_type (window) != META_COMP_WINDOW_NORMAL) {
- _tmp8_ = mutter_window_get_window_type (window) != META_COMP_WINDOW_DIALOG;
- } else {
- _tmp8_ = FALSE;
- }
- if (_tmp8_) {
- _tmp7_ = mutter_window_get_window_type (window) != META_COMP_WINDOW_MODAL_DIALOG;
- } else {
- _tmp7_ = FALSE;
- }
- if (_tmp7_) {
- _tmp6_ = mutter_window_get_window_type (window) != META_COMP_WINDOW_UTILITY;
- } else {
- _tmp6_ = FALSE;
- }
- if (_tmp6_) {
- MutterWindow* _tmp9_;
- window = (_tmp9_ = NULL, _g_object_unref0 (window), _tmp9_);
- }
- }
- if (MUTTER_IS_WINDOW (window)) {
- BamfMatcher* matcher;
- guint32 xwin;
- matcher = _g_object_ref0 (bamf_matcher_get_default ());
- xwin = (guint32) meta_window_get_xwindow (mutter_window_get_meta_window (window));
- {
- GList* app_collection;
- GList* app_it;
- app_collection = bamf_matcher_get_running_applications (matcher);
- for (app_it = app_collection; app_it != NULL; app_it = app_it->next) {
- BamfApplication* app;
- app = _g_object_ref0 ((BamfApplication*) app_it->data);
- {
- GArray* xids;
- xids = bamf_application_get_xids (app);
- {
- gint i;
- i = 0;
- {
- gboolean _tmp10_;
- _tmp10_ = TRUE;
- while (TRUE) {
- guint32 xid;
- if (!_tmp10_) {
- i++;
- }
- _tmp10_ = FALSE;
- if (!(i < xids->len)) {
- break;
- }
- xid = g_array_index (xids, guint32, (guint) i);
- if (xwin == xid) {
- unity_shell_expose_xids ((UnityShell*) self, xids);
- _g_array_free0 (xids);
- _g_object_unref0 (app);
- _g_list_free0 (app_collection);
- _g_object_unref0 (matcher);
- _g_object_unref0 (actor);
- _g_object_unref0 (window);
- return;
- }
- }
- }
- }
- _g_array_free0 (xids);
- _g_object_unref0 (app);
- }
- }
- _g_list_free0 (app_collection);
- }
- _g_object_unref0 (matcher);
- }
- _g_object_unref0 (actor);
- _g_object_unref0 (window);
+ gboolean _tmp2_ = FALSE;
+ if (event->fingers == 4) {
+ _tmp2_ = !unity_expose_manager_get_expose_showing (self->priv->_expose_manager);
} else {
- if (event->fingers == 4) {
- if (unity_expose_manager_get_expose_showing (self->priv->_expose_manager) == FALSE) {
- GSList* windows;
- GList* mutter_windows;
- windows = NULL;
- mutter_windows = mutter_plugin_get_windows (unity_plugin_get_plugin (self));
- {
- GList* w_collection;
- GList* w_it;
- w_collection = mutter_windows;
- for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
- MutterWindow* w;
- w = _g_object_ref0 ((MutterWindow*) w_it->data);
- {
- windows = g_slist_append (windows, _g_object_ref0 ((ClutterActor*) w));
- _g_object_unref0 (w);
- }
- }
- }
- unity_plugin_expose_windows (self, windows, unity_shell_get_launcher_width_foobar ((UnityShell*) self) + 10);
- __g_slist_free_g_object_unref0 (windows);
- } else {
- unity_expose_manager_end_expose (self->priv->_expose_manager);
- }
+ _tmp2_ = FALSE;
+ }
+ if (_tmp2_) {
+ if (self->priv->places_showing == TRUE) {
+ unity_shell_hide_unity ((UnityShell*) self);
+ } else {
+ unity_shell_show_unity ((UnityShell*) self);
}
}
} else {
if (event->type == UNITY_GESTURE_TYPE_PINCH) {
- gboolean _tmp11_ = FALSE;
- gboolean _tmp12_ = FALSE;
+ gboolean _tmp3_ = FALSE;
if (event->fingers == 3) {
- _tmp12_ = self->priv->places_showing == FALSE;
+ _tmp3_ = self->priv->places_showing == FALSE;
} else {
- _tmp12_ = FALSE;
+ _tmp3_ = FALSE;
}
- if (_tmp12_) {
- _tmp11_ = unity_expose_manager_get_expose_showing (self->priv->_expose_manager) == FALSE;
- } else {
- _tmp11_ = FALSE;
- }
- if (_tmp11_) {
+ if (_tmp3_) {
if (event->state == UNITY_GESTURE_STATE_ENDED) {
- ClutterActor* actor;
- actor = _g_object_ref0 (clutter_stage_get_actor_at_pos (self->priv->stage, CLUTTER_PICK_ALL, (gint) event->root_x, (gint) event->root_y));
- while (TRUE) {
- gboolean _tmp13_ = FALSE;
- gboolean _tmp14_ = FALSE;
- ClutterActor* _tmp15_;
- if (!MUTTER_IS_WINDOW (actor)) {
- _tmp14_ = actor != NULL;
+ if (event->pinch_event->radius_delta < 0) {
+ gboolean _tmp4_ = FALSE;
+ if (self->priv->expose_type == UNITY_PLUGIN_EXPOSE_TYPE_NONE) {
+ _tmp4_ = TRUE;
} else {
- _tmp14_ = FALSE;
+ _tmp4_ = !unity_expose_manager_get_expose_showing (self->priv->_expose_manager);
}
- if (_tmp14_) {
- _tmp13_ = actor != CLUTTER_ACTOR (self->priv->stage);
+ if (_tmp4_) {
+ MutterWindow* window;
+ ClutterActor* actor;
+ GSList* windows;
+ GList* mutter_windows;
+ window = NULL;
+ actor = _g_object_ref0 (clutter_stage_get_actor_at_pos (self->priv->stage, CLUTTER_PICK_ALL, (gint) event->root_x, (gint) event->root_y));
+ if (MUTTER_IS_WINDOW (actor) == FALSE) {
+ ClutterActor* _tmp5_;
+ actor = (_tmp5_ = _g_object_ref0 (clutter_actor_get_parent (actor)), _g_object_unref0 (actor), _tmp5_);
+ }
+ if (MUTTER_IS_WINDOW (actor)) {
+ ClutterActor* _tmp6_;
+ MutterWindow* _tmp7_;
+ gboolean _tmp8_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+ window = (_tmp7_ = _g_object_ref0 ((_tmp6_ = actor, MUTTER_IS_WINDOW (_tmp6_) ? ((MutterWindow*) _tmp6_) : NULL)), _g_object_unref0 (window), _tmp7_);
+ if (mutter_window_get_window_type (window) != META_COMP_WINDOW_NORMAL) {
+ _tmp10_ = mutter_window_get_window_type (window) != META_COMP_WINDOW_DIALOG;
+ } else {
+ _tmp10_ = FALSE;
+ }
+ if (_tmp10_) {
+ _tmp9_ = mutter_window_get_window_type (window) != META_COMP_WINDOW_MODAL_DIALOG;
+ } else {
+ _tmp9_ = FALSE;
+ }
+ if (_tmp9_) {
+ _tmp8_ = mutter_window_get_window_type (window) != META_COMP_WINDOW_UTILITY;
+ } else {
+ _tmp8_ = FALSE;
+ }
+ if (_tmp8_) {
+ MutterWindow* _tmp11_;
+ window = (_tmp11_ = NULL, _g_object_unref0 (window), _tmp11_);
+ }
+ }
+ self->priv->start_pinch_window = NULL;
+ if (MUTTER_IS_WINDOW (window)) {
+ BamfMatcher* matcher;
+ guint32 xwin;
+ matcher = _g_object_ref0 (bamf_matcher_get_default ());
+ xwin = (guint32) meta_window_get_xwindow (mutter_window_get_meta_window (window));
+ {
+ GList* app_collection;
+ GList* app_it;
+ app_collection = bamf_matcher_get_running_applications (matcher);
+ for (app_it = app_collection; app_it != NULL; app_it = app_it->next) {
+ BamfApplication* app;
+ app = _g_object_ref0 ((BamfApplication*) app_it->data);
+ {
+ GArray* last_pinch_xids;
+ last_pinch_xids = bamf_application_get_xids (app);
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp12_;
+ _tmp12_ = TRUE;
+ while (TRUE) {
+ guint32 xid;
+ if (!_tmp12_) {
+ i++;
+ }
+ _tmp12_ = FALSE;
+ if (!(i < last_pinch_xids->len)) {
+ break;
+ }
+ xid = g_array_index (last_pinch_xids, guint32, (guint) i);
+ if (xwin == xid) {
+ unity_shell_expose_xids ((UnityShell*) self, last_pinch_xids);
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_APPLICATION;
+ self->priv->start_pinch_window = window;
+ _g_array_free0 (last_pinch_xids);
+ _g_object_unref0 (app);
+ _g_list_free0 (app_collection);
+ _g_object_unref0 (matcher);
+ _g_object_unref0 (actor);
+ _g_object_unref0 (window);
+ return;
+ }
+ }
+ }
+ }
+ _g_array_free0 (last_pinch_xids);
+ _g_object_unref0 (app);
+ }
+ }
+ _g_list_free0 (app_collection);
+ }
+ _g_object_unref0 (matcher);
+ }
+ windows = NULL;
+ mutter_windows = mutter_plugin_get_windows (unity_plugin_get_plugin (self));
+ {
+ GList* w_collection;
+ GList* w_it;
+ w_collection = mutter_windows;
+ for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
+ MutterWindow* w;
+ w = _g_object_ref0 ((MutterWindow*) w_it->data);
+ {
+ windows = g_slist_append (windows, _g_object_ref0 ((ClutterActor*) w));
+ _g_object_unref0 (w);
+ }
+ }
+ }
+ unity_plugin_expose_windows (self, windows, unity_shell_get_launcher_width_foobar ((UnityShell*) self) + 10);
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS;
+ __g_slist_free_g_object_unref0 (windows);
+ _g_object_unref0 (actor);
+ _g_object_unref0 (window);
} else {
- _tmp13_ = FALSE;
- }
- if (!_tmp13_) {
- break;
- }
- actor = (_tmp15_ = _g_object_ref0 (clutter_actor_get_parent (actor)), _g_object_unref0 (actor), _tmp15_);
- }
- if (MUTTER_IS_WINDOW (actor)) {
- ClutterActor* _tmp16_;
- MetaWindow* win;
- gboolean fullscreen;
- MetaWindow* _tmp17_;
- win = mutter_window_get_meta_window ((_tmp16_ = actor, MUTTER_IS_WINDOW (_tmp16_) ? ((MutterWindow*) _tmp16_) : NULL));
- fullscreen = FALSE;
- g_object_get ((_tmp17_ = win, G_IS_OBJECT (_tmp17_) ? ((GObject*) _tmp17_) : NULL), "fullscreen", &fullscreen, NULL);
- if (event->pinch_event->radius_delta >= 0.0f) {
- if (meta_window_is_maximized (win)) {
- meta_window_make_fullscreen (win);
+ if (self->priv->expose_type == UNITY_PLUGIN_EXPOSE_TYPE_APPLICATION) {
+ GSList* windows;
+ GList* mutter_windows;
+ windows = NULL;
+ mutter_windows = mutter_plugin_get_windows (unity_plugin_get_plugin (self));
+ {
+ GList* w_collection;
+ GList* w_it;
+ w_collection = mutter_windows;
+ for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
+ MutterWindow* w;
+ w = _g_object_ref0 ((MutterWindow*) w_it->data);
+ {
+ windows = g_slist_append (windows, _g_object_ref0 ((ClutterActor*) w));
+ _g_object_unref0 (w);
+ }
+ }
+ }
+ unity_plugin_expose_windows (self, windows, unity_shell_get_launcher_width_foobar ((UnityShell*) self) + 10);
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS;
+ __g_slist_free_g_object_unref0 (windows);
} else {
- meta_window_maximize (win, META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
+ if (self->priv->expose_type == UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS) {
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_WORKSPACE;
+ }
}
+ }
+ } else {
+ gboolean _tmp13_ = FALSE;
+ if (self->priv->expose_type == UNITY_PLUGIN_EXPOSE_TYPE_NONE) {
+ _tmp13_ = TRUE;
+ } else {
+ _tmp13_ = !unity_expose_manager_get_expose_showing (self->priv->_expose_manager);
+ }
+ if (_tmp13_) {
+ unity_expose_manager_end_expose (self->priv->_expose_manager);
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_NONE;
} else {
- if (fullscreen) {
- meta_window_unmake_fullscreen (win);
+ if (self->priv->expose_type == UNITY_PLUGIN_EXPOSE_TYPE_APPLICATION) {
+ unity_expose_manager_end_expose (self->priv->_expose_manager);
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_NONE;
} else {
- if (meta_window_is_maximized (win)) {
- meta_window_unmaximize (win, META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
+ if (self->priv->expose_type == UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS) {
+ BamfMatcher* matcher;
+ guint32 xwin;
+ matcher = _g_object_ref0 (bamf_matcher_get_default ());
+ xwin = (guint32) meta_window_get_xwindow (mutter_window_get_meta_window (self->priv->start_pinch_window));
+ {
+ GList* app_collection;
+ GList* app_it;
+ app_collection = bamf_matcher_get_running_applications (matcher);
+ for (app_it = app_collection; app_it != NULL; app_it = app_it->next) {
+ BamfApplication* app;
+ app = _g_object_ref0 ((BamfApplication*) app_it->data);
+ {
+ GArray* last_pinch_xids;
+ last_pinch_xids = bamf_application_get_xids (app);
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp14_;
+ _tmp14_ = TRUE;
+ while (TRUE) {
+ guint32 xid;
+ if (!_tmp14_) {
+ i++;
+ }
+ _tmp14_ = FALSE;
+ if (!(i < last_pinch_xids->len)) {
+ break;
+ }
+ xid = g_array_index (last_pinch_xids, guint32, (guint) i);
+ if (xwin == xid) {
+ unity_shell_expose_xids ((UnityShell*) self, last_pinch_xids);
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_APPLICATION;
+ _g_array_free0 (last_pinch_xids);
+ _g_object_unref0 (app);
+ _g_list_free0 (app_collection);
+ _g_object_unref0 (matcher);
+ return;
+ }
+ }
+ }
+ }
+ _g_array_free0 (last_pinch_xids);
+ _g_object_unref0 (app);
+ }
+ }
+ _g_list_free0 (app_collection);
+ }
+ unity_expose_manager_end_expose (self->priv->_expose_manager);
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_NONE;
+ _g_object_unref0 (matcher);
+ } else {
+ if (self->priv->expose_type == UNITY_PLUGIN_EXPOSE_TYPE_WORKSPACE) {
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_WINDOWS;
+ }
}
}
}
- meta_window_activate (win, unity_shell_get_current_time ((UnityShell*) self));
- }
- _g_object_unref0 (actor);
- }
- } else {
- gboolean _tmp18_ = FALSE;
- gboolean _tmp19_ = FALSE;
- if (event->fingers == 4) {
- _tmp19_ = unity_expose_manager_get_expose_showing (self->priv->_expose_manager) == FALSE;
- } else {
- _tmp19_ = FALSE;
- }
- if (_tmp19_) {
- _tmp18_ = event->state == UNITY_GESTURE_STATE_BEGAN;
- } else {
- _tmp18_ = FALSE;
- }
- if (_tmp18_) {
- if (self->priv->places_showing == TRUE) {
- unity_shell_hide_unity ((UnityShell*) self);
- } else {
- unity_shell_show_unity ((UnityShell*) self);
}
}
}
@@ -1770,45 +1830,57 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
return;
}
if (event->fingers == 3) {
+ gboolean _tmp15_ = FALSE;
if (event->state == UNITY_GESTURE_STATE_BEGAN) {
+ _tmp15_ = event->pan_event->current_n_fingers == 2;
+ } else {
+ _tmp15_ = FALSE;
+ }
+ if (_tmp15_) {
ClutterActor* actor;
self->priv->start_pan_window = NULL;
actor = _g_object_ref0 (clutter_stage_get_actor_at_pos (self->priv->stage, CLUTTER_PICK_ALL, (gint) event->root_x, (gint) event->root_y));
if (MUTTER_IS_WINDOW (actor) == FALSE) {
- ClutterActor* _tmp20_;
- actor = (_tmp20_ = _g_object_ref0 (clutter_actor_get_parent (actor)), _g_object_unref0 (actor), _tmp20_);
+ ClutterActor* _tmp16_;
+ actor = (_tmp16_ = _g_object_ref0 (clutter_actor_get_parent (actor)), _g_object_unref0 (actor), _tmp16_);
}
if (MUTTER_IS_WINDOW (actor)) {
- ClutterActor* _tmp21_;
- gboolean _tmp22_ = FALSE;
- gboolean _tmp23_ = FALSE;
- gboolean _tmp24_ = FALSE;
- self->priv->start_pan_window = (_tmp21_ = actor, MUTTER_IS_WINDOW (_tmp21_) ? ((MutterWindow*) _tmp21_) : NULL);
+ ClutterActor* _tmp17_;
+ gboolean _tmp18_ = FALSE;
+ gboolean _tmp19_ = FALSE;
+ gboolean _tmp20_ = FALSE;
+ self->priv->start_pan_window = (_tmp17_ = actor, MUTTER_IS_WINDOW (_tmp17_) ? ((MutterWindow*) _tmp17_) : NULL);
if (mutter_window_get_window_type (self->priv->start_pan_window) != META_COMP_WINDOW_NORMAL) {
- _tmp24_ = mutter_window_get_window_type (self->priv->start_pan_window) != META_COMP_WINDOW_DIALOG;
+ _tmp20_ = mutter_window_get_window_type (self->priv->start_pan_window) != META_COMP_WINDOW_DIALOG;
} else {
- _tmp24_ = FALSE;
+ _tmp20_ = FALSE;
}
- if (_tmp24_) {
- _tmp23_ = mutter_window_get_window_type (self->priv->start_pan_window) != META_COMP_WINDOW_MODAL_DIALOG;
+ if (_tmp20_) {
+ _tmp19_ = mutter_window_get_window_type (self->priv->start_pan_window) != META_COMP_WINDOW_MODAL_DIALOG;
} else {
- _tmp23_ = FALSE;
+ _tmp19_ = FALSE;
}
- if (_tmp23_) {
- _tmp22_ = mutter_window_get_window_type (self->priv->start_pan_window) != META_COMP_WINDOW_UTILITY;
+ if (_tmp19_) {
+ _tmp18_ = mutter_window_get_window_type (self->priv->start_pan_window) != META_COMP_WINDOW_UTILITY;
} else {
- _tmp22_ = FALSE;
+ _tmp18_ = FALSE;
}
- if (_tmp22_) {
+ if (_tmp18_) {
self->priv->start_pan_window = NULL;
}
}
_g_object_unref0 (actor);
} else {
+ gboolean _tmp21_ = FALSE;
if (event->state == UNITY_GESTURE_STATE_CONTINUED) {
+ _tmp21_ = event->pan_event->current_n_fingers == 2;
+ } else {
+ _tmp21_ = FALSE;
+ }
+ if (_tmp21_) {
MetaWindow* win;
gboolean fullscreen;
- gboolean _tmp25_ = FALSE;
+ gboolean _tmp22_ = FALSE;
if (MUTTER_IS_WINDOW (self->priv->start_pan_window) == FALSE) {
return;
}
@@ -1817,27 +1889,27 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
fullscreen = FALSE;
g_object_get ((GObject*) win, "fullscreen", &fullscreen, NULL);
if (!meta_window_is_maximized (win)) {
- _tmp25_ = fullscreen == FALSE;
+ _tmp22_ = fullscreen == FALSE;
} else {
- _tmp25_ = FALSE;
+ _tmp22_ = FALSE;
}
- if (_tmp25_) {
- gboolean _tmp26_ = FALSE;
+ if (_tmp22_) {
+ gboolean _tmp23_ = FALSE;
if (clutter_actor_get_y ((ClutterActor*) self->priv->start_pan_window) == UNITY_PLUGIN_PANEL_HEIGHT) {
- _tmp26_ = event->pan_event->delta_y <= 0.0f;
+ _tmp23_ = event->pan_event->delta_y <= 0.0f;
} else {
- _tmp26_ = FALSE;
+ _tmp23_ = FALSE;
}
- if (_tmp26_) {
+ if (_tmp23_) {
float MAX_DELTA;
if (CLUTTER_IS_RECTANGLE (self->priv->start_frame_rect) == FALSE) {
- ClutterColor _tmp27_ = {0};
- ClutterColor _tmp28_;
+ ClutterColor _tmp24_ = {0};
+ ClutterColor _tmp25_;
ClutterRectangle* frame;
- ClutterColor _tmp29_ = {0};
- ClutterColor _tmp30_;
- frame = g_object_ref_sink ((ClutterRectangle*) clutter_rectangle_new_with_color ((_tmp28_ = (_tmp27_.red = (guint8) 0, _tmp27_.green = (guint8) 0, _tmp27_.blue = (guint8) 0, _tmp27_.alpha = (guint8) 10, _tmp27_), &_tmp28_)));
- clutter_rectangle_set_border_color (frame, (_tmp30_ = (_tmp29_.red = (guint8) 255, _tmp29_.green = (guint8) 255, _tmp29_.blue = (guint8) 255, _tmp29_.alpha = (guint8) 255, _tmp29_), &_tmp30_));
+ ClutterColor _tmp26_ = {0};
+ ClutterColor _tmp27_;
+ frame = g_object_ref_sink ((ClutterRectangle*) clutter_rectangle_new_with_color ((_tmp25_ = (_tmp24_.red = (guint8) 0, _tmp24_.green = (guint8) 0, _tmp24_.blue = (guint8) 0, _tmp24_.alpha = (guint8) 10, _tmp24_), &_tmp25_)));
+ clutter_rectangle_set_border_color (frame, (_tmp27_ = (_tmp26_.red = (guint8) 255, _tmp26_.green = (guint8) 255, _tmp26_.blue = (guint8) 255, _tmp26_.alpha = (guint8) 255, _tmp26_), &_tmp27_));
clutter_rectangle_set_border_width (frame, (guint) 3);
clutter_container_add_actor ((ClutterContainer*) self->priv->stage, (ClutterActor*) frame);
clutter_actor_set_size ((ClutterActor*) frame, clutter_actor_get_width ((ClutterActor*) self->priv->start_pan_window), clutter_actor_get_height ((ClutterActor*) self->priv->start_pan_window));
@@ -1866,13 +1938,13 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
clutter_container_remove_actor ((ClutterContainer*) self->priv->stage, (ClutterActor*) self->priv->start_frame_rect);
self->priv->start_frame_rect = NULL;
} else {
- gboolean _tmp31_ = FALSE;
+ gboolean _tmp28_ = FALSE;
if (clutter_actor_get_y ((ClutterActor*) self->priv->start_pan_window) > (UNITY_PLUGIN_PANEL_HEIGHT + 5)) {
- _tmp31_ = CLUTTER_IS_ANIMATION (clutter_actor_get_animation ((ClutterActor*) self->priv->start_frame_rect)) == FALSE;
+ _tmp28_ = CLUTTER_IS_ANIMATION (clutter_actor_get_animation ((ClutterActor*) self->priv->start_frame_rect)) == FALSE;
} else {
- _tmp31_ = FALSE;
+ _tmp28_ = FALSE;
}
- if (_tmp31_) {
+ if (_tmp28_) {
clutter_actor_animate ((ClutterActor*) self->priv->start_frame_rect, (gulong) CLUTTER_EASE_IN_QUAD, (guint) 150, "x", clutter_actor_get_x ((ClutterActor*) self->priv->start_pan_window), "y", clutter_actor_get_y ((ClutterActor*) self->priv->start_pan_window), "width", clutter_actor_get_width ((ClutterActor*) self->priv->start_pan_window), "height", clutter_actor_get_height ((ClutterActor*) self->priv->start_pan_window), "opacity", 0, NULL);
}
}
@@ -1883,13 +1955,13 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
clutter_actor_set_x ((ClutterActor*) self->priv->start_pan_window, MAX (clutter_actor_get_x ((ClutterActor*) self->priv->start_pan_window), (float) UNITY_PLUGIN_QUICKLAUNCHER_WIDTH));
clutter_actor_set_y ((ClutterActor*) self->priv->start_pan_window, MAX (clutter_actor_get_y ((ClutterActor*) self->priv->start_pan_window), (float) UNITY_PLUGIN_PANEL_HEIGHT));
} else {
- gboolean _tmp32_ = FALSE;
+ gboolean _tmp29_ = FALSE;
if (event->pan_event->delta_y >= 0.0f) {
- _tmp32_ = fullscreen == FALSE;
+ _tmp29_ = fullscreen == FALSE;
} else {
- _tmp32_ = FALSE;
+ _tmp29_ = FALSE;
}
- if (_tmp32_) {
+ if (_tmp29_) {
meta_window_unmaximize (win, META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
}
}
@@ -1908,7 +1980,7 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
gint ww = 0;
gint wh = 0;
MetaRectangle rect = {0};
- gboolean _tmp33_ = FALSE;
+ gboolean _tmp30_ = FALSE;
win = mutter_window_get_meta_window (self->priv->start_pan_window);
nx = (float) 0;
ny = (float) 0;
@@ -1921,19 +1993,19 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
memset (&rect, 0, sizeof (MetaRectangle));
meta_window_get_outer_rect (win, &rect);
if (meta_window_is_maximized (win)) {
- _tmp33_ = TRUE;
+ _tmp30_ = TRUE;
} else {
- _tmp33_ = fullscreen;
+ _tmp30_ = fullscreen;
}
- if (_tmp33_) {
+ if (_tmp30_) {
} else {
- gboolean _tmp34_ = FALSE;
+ gboolean _tmp31_ = FALSE;
if (clutter_actor_get_y ((ClutterActor*) self->priv->start_pan_window) == UNITY_PLUGIN_PANEL_HEIGHT) {
- _tmp34_ = event->pan_event->delta_y < 0.0f;
+ _tmp31_ = event->pan_event->delta_y < 0.0f;
} else {
- _tmp34_ = FALSE;
+ _tmp31_ = FALSE;
}
- if (_tmp34_) {
+ if (_tmp31_) {
if (self->priv->maximize_type == UNITY_PLUGIN_MAXIMIZE_TYPE_FULL) {
meta_window_maximize (win, META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
move_resize = FALSE;
@@ -1964,14 +2036,14 @@ static void unity_plugin_on_gesture_received (UnityPlugin* self, UnityGestureEve
}
if (move_resize) {
Window xwin;
- gboolean _tmp35_ = FALSE;
+ gboolean _tmp32_ = FALSE;
xwin = mutter_window_get_x_window (self->priv->start_pan_window);
if (nwidth > 0.0f) {
- _tmp35_ = nheight > 0.0f;
+ _tmp32_ = nheight > 0.0f;
} else {
- _tmp35_ = FALSE;
+ _tmp32_ = FALSE;
}
- if (_tmp35_) {
+ if (_tmp32_) {
meta_window_move_resize (win, FALSE, (gint) nx, (gint) ny, (gint) nwidth, (gint) nheight);
} else {
GdkWindow* w;
@@ -2022,25 +2094,25 @@ void unity_plugin_unmaximize (UnityPlugin* self, MutterWindow* window, gint x, g
}
-static gboolean _lambda22_ (Block6Data* _data6_) {
+static gboolean _lambda23_ (Block7Data* _data7_) {
UnityPlugin * self;
gboolean result = FALSE;
- self = _data6_->self;
- if (G_IS_OBJECT (_data6_->win)) {
+ self = _data7_->self;
+ if (G_IS_OBJECT (_data7_->win)) {
gboolean decorated;
gboolean maximized;
gboolean fullscreen = FALSE;
gboolean _tmp0_ = FALSE;
- decorated = utils_window_is_decorated (meta_window_get_xwindow (_data6_->win));
- maximized = meta_window_is_maximized (_data6_->win);
- g_object_get ((GObject*) _data6_->win, "fullscreen", &fullscreen, NULL);
+ decorated = utils_window_is_decorated (meta_window_get_xwindow (_data7_->win));
+ maximized = meta_window_is_maximized (_data7_->win);
+ g_object_get ((GObject*) _data7_->win, "fullscreen", &fullscreen, NULL);
if (!decorated) {
_tmp0_ = !maximized;
} else {
_tmp0_ = FALSE;
}
if (_tmp0_) {
- g_object_set_data_full ((GObject*) _data6_->window, UNITY_PLUGIN_UNDECORATED_HINT, g_strdup_printf ("%s", "true"), g_free);
+ g_object_set_data_full ((GObject*) _data7_->window, UNITY_PLUGIN_UNDECORATED_HINT, g_strdup_printf ("%s", "true"), g_free);
} else {
gboolean _tmp1_ = FALSE;
gboolean _tmp2_ = FALSE;
@@ -2055,7 +2127,7 @@ static gboolean _lambda22_ (Block6Data* _data6_) {
_tmp1_ = FALSE;
}
if (_tmp1_) {
- utils_window_set_decorations (meta_window_get_xwindow (_data6_->win), (guint) 0);
+ utils_window_set_decorations (meta_window_get_xwindow (_data7_->win), (guint) 0);
}
}
}
@@ -2064,9 +2136,9 @@ static gboolean _lambda22_ (Block6Data* _data6_) {
}
-static gboolean __lambda22__gsource_func (gpointer self) {
+static gboolean __lambda23__gsource_func (gpointer self) {
gboolean result;
- result = _lambda22_ (self);
+ result = _lambda23_ (self);
return result;
}
@@ -2076,46 +2148,46 @@ static void _unity_plugin_on_focus_window_changed_g_object_notify (GObject* _sen
}
-static Block6Data* block6_data_ref (Block6Data* _data6_) {
- g_atomic_int_inc (&_data6_->_ref_count_);
- return _data6_;
+static Block7Data* block7_data_ref (Block7Data* _data7_) {
+ g_atomic_int_inc (&_data7_->_ref_count_);
+ return _data7_;
}
-static void block6_data_unref (Block6Data* _data6_) {
- if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
- _g_object_unref0 (_data6_->self);
- _g_object_unref0 (_data6_->window);
- g_slice_free (Block6Data, _data6_);
+static void block7_data_unref (Block7Data* _data7_) {
+ if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
+ _g_object_unref0 (_data7_->self);
+ _g_object_unref0 (_data7_->window);
+ g_slice_free (Block7Data, _data7_);
}
}
void unity_plugin_map (UnityPlugin* self, MutterWindow* window) {
- Block6Data* _data6_;
+ Block7Data* _data7_;
g_return_if_fail (self != NULL);
g_return_if_fail (window != NULL);
- _data6_ = g_slice_new0 (Block6Data);
- _data6_->_ref_count_ = 1;
- _data6_->self = g_object_ref (self);
- _data6_->window = _g_object_ref0 (window);
- _data6_->win = mutter_window_get_meta_window (_data6_->window);
- if (mutter_window_get_window_type (_data6_->window) == META_COMP_WINDOW_NORMAL) {
- g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda22__gsource_func, block6_data_ref (_data6_), block6_data_unref);
+ _data7_ = g_slice_new0 (Block7Data);
+ _data7_->_ref_count_ = 1;
+ _data7_->self = g_object_ref (self);
+ _data7_->window = _g_object_ref0 (window);
+ _data7_->win = mutter_window_get_meta_window (_data7_->window);
+ if (mutter_window_get_window_type (_data7_->window) == META_COMP_WINDOW_NORMAL) {
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda23__gsource_func, block7_data_ref (_data7_), block7_data_unref);
} else {
- if (mutter_window_get_window_type (_data6_->window) == META_COMP_WINDOW_DOCK) {
- if (meta_window_get_xwindow (_data6_->win) == gdk_x11_drawable_get_xid ((GdkDrawable*) ((GtkWidget*) self->priv->drag_dest)->window)) {
- clutter_actor_set_opacity ((ClutterActor*) _data6_->window, (guint8) 0);
+ if (mutter_window_get_window_type (_data7_->window) == META_COMP_WINDOW_DOCK) {
+ if (meta_window_get_xwindow (_data7_->win) == gdk_x11_drawable_get_xid ((GdkDrawable*) ((GtkWidget*) self->priv->drag_dest)->window)) {
+ clutter_actor_set_opacity ((ClutterActor*) _data7_->window, (guint8) 0);
}
}
}
- unity_maximus_process_window (self->priv->maximus, _data6_->window);
- g_signal_emit_by_name (self, "window-mapped", self, _data6_->window);
+ unity_maximus_process_window (self->priv->maximus, _data7_->window);
+ g_signal_emit_by_name (self, "window-mapped", self, _data7_->window);
if (self->priv->display == NULL) {
- self->priv->display = meta_window_get_display (mutter_window_get_meta_window (_data6_->window));
+ self->priv->display = meta_window_get_display (mutter_window_get_meta_window (_data7_->window));
g_signal_connect_object ((GObject*) self->priv->display, "notify::focus-window", (GCallback) _unity_plugin_on_focus_window_changed_g_object_notify, self, 0);
}
- block6_data_unref (_data6_);
+ block7_data_unref (_data7_);
}
@@ -2387,7 +2459,7 @@ static GObject * unity_plugin_constructor (GType type, guint n_construct_propert
e = _inner_error_;
_inner_error_ = NULL;
{
- g_warning ("plugin.vala:241: %s", e->message);
+ g_warning ("plugin.vala:250: %s", e->message);
_g_error_free0 (e);
}
}
@@ -2477,6 +2549,8 @@ static void unity_plugin_instance_init (UnityPlugin * self) {
self->priv->last_pan_x_root = 0.0f;
self->priv->last_pan_maximised_x_root = 0.0f;
self->priv->maximize_type = UNITY_PLUGIN_MAXIMIZE_TYPE_NONE;
+ self->priv->expose_type = UNITY_PLUGIN_EXPOSE_TYPE_NONE;
+ self->priv->start_pinch_window = NULL;
}
diff --git a/targets/mutter/plugin.vala b/targets/mutter/plugin.vala
index 9eb207179..3609f3e77 100644
--- a/targets/mutter/plugin.vala
+++ b/targets/mutter/plugin.vala
@@ -195,6 +195,15 @@ namespace Unity
}
private MaximizeType maximize_type = MaximizeType.NONE;
+ private enum ExposeType {
+ NONE,
+ APPLICATION,
+ WINDOWS,
+ WORKSPACE
+ }
+ private ExposeType expose_type = ExposeType.NONE;
+ private unowned Mutter.Window? start_pinch_window = null;
+
/* const */
private const string GCONF_DIR = "/desktop/unity/launcher";
private const string GCONF_SUPER_KEY_ENABLE_KEY = "super_key_enable";
@@ -924,330 +933,162 @@ namespace Unity
}
}
- if (event.type == Gesture.Type.TAP
- && places_showing == false)
+ if (event.type == Gesture.Type.TAP)
{
- if (event.fingers == 3) /* Application-level window pick */
+ if (event.fingers == 4
+ && !expose_manager.expose_showing)
{
- if (expose_manager.expose_showing == true)
- {
- expose_manager.end_expose ();
- return;
- }
-
- Mutter.Window? window = null;
-
- var actor = stage.get_actor_at_pos (Clutter.PickMode.ALL,
- (int)event.root_x,
- (int)event.root_y);
- if (actor is Mutter.Window == false)
- actor = actor.get_parent ();
-
- if (actor is Mutter.Window)
- {
- window = actor as Mutter.Window;
-
- if (window.get_window_type () != Mutter.MetaCompWindowType.NORMAL &&
- window.get_window_type () != Mutter.MetaCompWindowType.DIALOG &&
- window.get_window_type () != Mutter.MetaCompWindowType.MODAL_DIALOG &&
- window.get_window_type () != Mutter.MetaCompWindowType.UTILITY)
- window = null;
- }
-
- if (window is Mutter.Window)
- {
- /* FIXME: bamf_matcher_get_application_for_xid () fails for
- * me in this case, so I had to use the slower method */
- var matcher = Bamf.Matcher.get_default ();
- var xwin = (uint32)Mutter.MetaWindow.get_xwindow (window.get_meta_window ());
-
- foreach (Bamf.Application app in matcher.get_running_applications ())
- {
- Array<uint32> xids = app.get_xids ();
- for (int i = 0; i < xids.length; i++)
- {
- uint32 xid = xids.index (i);
- if (xwin == xid)
- {
- /* Found the right application, so pick it */
- expose_xids (xids);
- return;
- }
- }
- }
- }
+ if (places_showing == true)
+ hide_unity ();
+ else
+ show_unity ();
}
- else if (event.fingers == 4) /* System-level window picker */
- {
+ /*
if (expose_manager.expose_showing == false)
{
- SList<Clutter.Actor> windows = new SList<Clutter.Actor> ();
- unowned GLib.List<Mutter.Window> mutter_windows = plugin.get_windows ();
- foreach (Mutter.Window w in mutter_windows)
- {
- windows.append (w);
- }
- expose_windows (windows, get_launcher_width_foobar () + 10);
}
else
expose_manager.end_expose ();
- }
+ */
}
else if (event.type == Gesture.Type.PINCH)
{
if (event.fingers == 3
- && places_showing == false
- && expose_manager.expose_showing == false)
+ && places_showing == false)
{
if (event.state == Gesture.State.ENDED)
{
- var actor = stage.get_actor_at_pos (Clutter.PickMode.ALL,
- (int)event.root_x,
- (int)event.root_y);
-
- while (!(actor is Mutter.Window) && actor != null && actor != stage)
- actor = actor.get_parent ();
-
- if (actor is Mutter.Window)
+ if (event.pinch_event.radius_delta < 0)
{
- unowned Mutter.MetaWindow win = (actor as Mutter.Window).get_meta_window ();
- bool fullscreen = false;
+ /* Pinch */
+ if (expose_type == ExposeType.NONE || !expose_manager.expose_showing)
+ {
+ Mutter.Window? window = null;
- (win as Object).get ("fullscreen", out fullscreen);
+ var actor = stage.get_actor_at_pos (Clutter.PickMode.ALL,
+ (int)event.root_x,
+ (int)event.root_y);
+ if (actor is Mutter.Window == false)
+ actor = actor.get_parent ();
- if (event.pinch_event.radius_delta >= 0.0f)
- {
- if (Mutter.MetaWindow.is_maximized (win))
+ if (actor is Mutter.Window)
{
- /* Fullscreen */
- Mutter.MetaWindow.make_fullscreen (win);
- }
- else
- {
- /* Maximize */
- Mutter.MetaWindow.maximize (win,
- Mutter.MetaMaximizeFlags.HORIZONTAL |
- Mutter.MetaMaximizeFlags.VERTICAL);
- }
- }
- else
- {
- if (fullscreen)
- {
- Mutter.MetaWindow.unmake_fullscreen (win);
- }
- else if (Mutter.MetaWindow.is_maximized (win))
- {
- Mutter.MetaWindow.unmaximize (win,
- Mutter.MetaMaximizeFlags.HORIZONTAL | Mutter.MetaMaximizeFlags.VERTICAL);
- }
- }
+ window = actor as Mutter.Window;
- Mutter.MetaWindow.activate (win, get_current_time ());
- }
- }
-
- /* FIXME: This can't work with the current information we are getting */
- /*
- debug ("Resize Window");
- if (true == true)
- return;
+ if (window.get_window_type () != Mutter.MetaCompWindowType.NORMAL &&
+ window.get_window_type () != Mutter.MetaCompWindowType.DIALOG &&
+ window.get_window_type () != Mutter.MetaCompWindowType.MODAL_DIALOG &&
+ window.get_window_type () != Mutter.MetaCompWindowType.UTILITY)
+ window = null;
+ }
- if (event.state == Gesture.State.BEGAN)
- {
- resize_window = null;
+ start_pinch_window = null;
- var actor = stage.get_actor_at_pos (Clutter.PickMode.ALL,
- (int)event.root_x,
- (int)event.root_y);
- if (actor is Mutter.Window == false)
- actor = actor.get_parent ();
-
- if (actor is Mutter.Window)
- {
- resize_window = actor as Mutter.Window;
- resize_last_x1 = event.pinch_event.bounding_box_x1;
- resize_last_y1 = event.pinch_event.bounding_box_y1;
- resize_last_x2 = event.pinch_event.bounding_box_x2;
- resize_last_y2 = event.pinch_event.bounding_box_y2;
- }
- }
- else if (event.state == Gesture.State.CONTINUED)
- {
- if (resize_window is Mutter.Window == false)
- return;
+ if (window is Mutter.Window)
+ {
+ var matcher = Bamf.Matcher.get_default ();
+ var xwin = (uint32)Mutter.MetaWindow.get_xwindow (window.get_meta_window ());
- print ("RESIZE: %f %f %f %f\n",
- resize_last_x1 - event.pinch_event.bounding_box_x1,
- resize_last_y1 - event.pinch_event.bounding_box_y1,
- resize_last_x2 - event.pinch_event.bounding_box_x2,
- resize_last_y2 - event.pinch_event.bounding_box_y2);
-
- var nx = resize_window.x;
- var ny = resize_window.y;
- var nwidth = resize_window.width;
- var nheight = resize_window.height;
-
- nx += (resize_last_x1 - event.pinch_event.bounding_box_x1) * event.pinch_event.radius_delta;
- ny += (resize_last_y1 - event.pinch_event.bounding_box_y1) * event.pinch_event.radius_delta;
- nwidth += (resize_last_x2 - event.pinch_event.bounding_box_x2) * event.pinch_event.radius_delta;
- nheight += (resize_last_y2 - event.pinch_event.bounding_box_y2) * event.pinch_event.radius_delta;
-
- Mutter.MetaWindow.move_resize (resize_window.get_meta_window (),
- false,
- (int)nx,
- (int)ny,
- (int)nwidth,
- (int)nheight);
-
-
- resize_last_x1 = event.pinch_event.bounding_box_x1;
- resize_last_y1 = event.pinch_event.bounding_box_y1;
- resize_last_x2 = event.pinch_event.bounding_box_x2;
- resize_last_y2 = event.pinch_event.bounding_box_y2;
- }
- else if (event.state == Gesture.State.ENDED)
- {
- if (resize_window is Mutter.Window == false)
- return;
+ foreach (Bamf.Application app in matcher.get_running_applications ())
+ {
+ Array<uint32> last_pinch_xids = app.get_xids ();
+ for (int i = 0; i < last_pinch_xids.length; i++)
+ {
+ uint32 xid = last_pinch_xids.index (i);
+ if (xwin == xid)
+ {
+ // Found the right application, so pick it
+ expose_xids (last_pinch_xids);
+ expose_type = ExposeType.APPLICATION;
+ start_pinch_window = window;
+ return;
+ }
+ }
+ }
+ }
- resize_window = null;
- }
- print (@"$event\n");
- */
- }
- else if (event.fingers == 4
- && expose_manager.expose_showing == false
- && event.state == Gesture.State.BEGAN)
- {
- if (places_showing == true)
- hide_unity ();
- else
- show_unity ();
+ /* If we're here we didnt find window, so lets do window expose */
+ SList<Clutter.Actor> windows = new SList<Clutter.Actor> ();
+ unowned GLib.List<Mutter.Window> mutter_windows = plugin.get_windows ();
+ foreach (Mutter.Window w in mutter_windows)
+ {
+ windows.append (w);
+ }
+ expose_windows (windows, get_launcher_width_foobar () + 10);
+
+ expose_type = ExposeType.WINDOWS;
- /* FIXME: We'll come back to this awesomeness
- if (event.state == Gesture.State.BEGAN)
- {
- if (expose_manager.expose_showing)
- {
- expose_manager.end_expose ();
+ }
+ else if (expose_type == ExposeType.APPLICATION)
+ {
+ SList<Clutter.Actor> windows = new SList<Clutter.Actor> ();
+ unowned GLib.List<Mutter.Window> mutter_windows = plugin.get_windows ();
+ foreach (Mutter.Window w in mutter_windows)
+ {
+ windows.append (w);
+ }
+ expose_windows (windows, get_launcher_width_foobar () + 10);
+
+ expose_type = ExposeType.WINDOWS;
+ }
+ else if (expose_type == ExposeType.WINDOWS)
+ {
+ expose_type = ExposeType.WORKSPACE;
+ }
}
else
{
- SList<Clutter.Actor> windows = new SList<Clutter.Actor> ();
- unowned GLib.List<Mutter.Window> mutter_windows = plugin.get_windows ();
- foreach (Mutter.Window w in mutter_windows)
+ /* Spread */
+ if (expose_type == ExposeType.NONE || !expose_manager.expose_showing)
{
- windows.append (w);
+ expose_manager.end_expose ();
+ expose_type = ExposeType.NONE;
}
- expose_windows (windows, get_launcher_width_foobar () + 10);
- }
-
- foreach (ExposeClone clone in expose_manager.exposed_windows)
- {
- clone.get_animation ().get_timeline ().pause ();
- }
-
- start_pinch_radius = event.pinch_event.radius_delta;
- }
- else if (event.state == Gesture.State.CONTINUED)
- {
- foreach (ExposeClone clone in expose_manager.exposed_windows)
- {
- int I_JUST_PULLED_THIS_FROM_MY_FOO = 5;
-
- if (event.pinch_event.radius_delta >= 0)
+ else if (expose_type == ExposeType.APPLICATION)
{
- if (start_pinch_radius < 0)
- {
- // We're moving backward
- I_JUST_PULLED_THIS_FROM_MY_FOO *= -1;
- }
+ expose_manager.end_expose ();
+ expose_type = ExposeType.NONE;
}
- else
+ else if (expose_type == ExposeType.WINDOWS)
{
- if (start_pinch_radius >= 0)
+ var matcher = Bamf.Matcher.get_default ();
+ var xwin = (uint32)Mutter.MetaWindow.get_xwindow (start_pinch_window.get_meta_window ());
+
+ foreach (Bamf.Application app in matcher.get_running_applications ())
{
- // We're moving backward
- I_JUST_PULLED_THIS_FROM_MY_FOO *= -1;
+ Array<uint32> last_pinch_xids = app.get_xids ();
+ for (int i = 0; i < last_pinch_xids.length; i++)
+ {
+ uint32 xid = last_pinch_xids.index (i);
+ if (xwin == xid)
+ {
+ // Found the right application, so pick it
+ expose_xids (last_pinch_xids);
+ expose_type = ExposeType.APPLICATION;
+ return;
+ }
+ }
}
+ expose_manager.end_expose ();
+ expose_type = ExposeType.NONE;
+ }
+ else if (expose_type == ExposeType.WORKSPACE)
+ {
+ expose_type = ExposeType.WINDOWS;
}
-
- var tl = clone.get_animation ().get_timeline ();
- tl.advance (tl.get_elapsed_time ()
- + I_JUST_PULLED_THIS_FROM_MY_FOO);
-
- float factor = (float)tl.get_elapsed_time () /
- (float)tl.get_duration ();
-
- Value v = Value (typeof (float));
-
- var interval = clone.get_animation ().get_interval ("x");
- interval.compute_value (factor, v);
- clone.x = v.get_float ();
-
- interval = clone.get_animation ().get_interval ("y");
- interval.compute_value (factor, v);
- clone.y = v.get_float ();
-
- double scalex, scaley;
- clone.get_scale (out scalex, out scaley);
-
- v = Value (typeof (double));
-
- interval = clone.get_animation ().get_interval ("scale-x");
- interval.compute_value (factor, v);
- scalex = v.get_double ();
-
- interval = clone.get_animation ().get_interval ("scale-y");
- interval.compute_value (factor, v);
- scaley = v.get_double ();
-
- clone.set_scale (scalex, scaley);
- }
- }
- else if (event.state == Gesture.State.ENDED)
- {
- foreach (ExposeClone clone in expose_manager.exposed_windows)
- {
- var anim = clone.get_animation ();
-
- Value v = Value (typeof (float));
-
- var interval = anim.get_interval ("x");
- v.set_float (clone.x);
- interval.set_initial_value (v);
-
- interval = anim.get_interval ("y");
- v.set_float (clone.y);
- interval.set_initial_value (v);
-
- v = Value (typeof (double));
- double scalex, scaley;
- clone.get_scale (out scalex, out scaley);
-
- interval = anim.get_interval ("scale-x");
- v.set_double (scalex);
- interval.set_initial_value (v);
-
- interval = anim.get_interval ("scale-y");
- v.set_double (scaley);
- interval.set_initial_value (v);
-
- clone.get_animation ().get_timeline ().start ();
- clone.queue_relayout ();
}
}
- */
}
}
else if (event.type == Gesture.Type.PAN)
{
if (resize_window is Mutter.Window)
return;
+
if (event.fingers == 3)
{
- if (event.state == Gesture.State.BEGAN)
+ if (event.state == Gesture.State.BEGAN
+ && event.pan_event.current_n_fingers == 2)
{
start_pan_window = null;
@@ -1268,7 +1109,8 @@ namespace Unity
start_pan_window = null;
}
}
- else if (event.state == Gesture.State.CONTINUED)
+ else if (event.state == Gesture.State.CONTINUED
+ && event.pan_event.current_n_fingers == 2)
{
if (start_pan_window is Mutter.Window == false)
return;
diff --git a/targets/mutter/spaces-manager.c b/targets/mutter/spaces-manager.c
index 29f33c44e..100c34879 100644
--- a/targets/mutter/spaces-manager.c
+++ b/targets/mutter/spaces-manager.c
@@ -1,4 +1,4 @@
-/* spaces-manager.c generated by valac 0.9.8, the Vala compiler
+/* spaces-manager.c generated by valac 0.10.0, the Vala compiler
* generated from spaces-manager.vala, do not modify */
/*
@@ -26,6 +26,10 @@
#include <glib/gi18n-lib.h>
#include <clutter/clutter.h>
#include <mutter-plugins.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+#include <X11/Xregion.h>
#include <unity.h>
#include <float.h>
#include <math.h>
@@ -98,11 +102,11 @@ typedef struct _UnityExposeCloneClass UnityExposeCloneClass;
typedef struct _UnityExposeManager UnityExposeManager;
typedef struct _UnityExposeManagerClass UnityExposeManagerClass;
typedef struct _UnitySpacesManagerPrivate UnitySpacesManagerPrivate;
-typedef struct _Block2Data Block2Data;
-typedef struct _Block4Data Block4Data;
typedef struct _Block3Data Block3Data;
-typedef struct _UnityPluginPrivate UnityPluginPrivate;
typedef struct _Block5Data Block5Data;
+typedef struct _Block4Data Block4Data;
+typedef struct _UnityPluginPrivate UnityPluginPrivate;
+typedef struct _Block6Data Block6Data;
struct _UnitySpacesButtonController {
UnityLauncherScrollerChildController parent_instance;
@@ -156,21 +160,21 @@ struct _UnitySpacesManagerPrivate {
gboolean _showing;
};
-struct _Block2Data {
+struct _Block3Data {
int _ref_count_;
UnitySpacesManager * self;
ClutterActor* clone;
MetaWorkspace* cpy;
};
-struct _Block4Data {
+struct _Block5Data {
int _ref_count_;
- Block3Data * _data3_;
+ Block4Data * _data4_;
guint32 time_;
MetaWindow* meta;
};
-struct _Block3Data {
+struct _Block4Data {
int _ref_count_;
UnitySpacesManager * self;
UnityExposeClone* clone;
@@ -188,7 +192,7 @@ struct _UnityPluginClass {
GObjectClass parent_class;
};
-struct _Block5Data {
+struct _Block6Data {
int _ref_count_;
UnitySpacesManager * self;
ClutterActor* clone;
@@ -267,6 +271,7 @@ UnitySpacesManager* unity_spaces_manager_new (UnityPlugin* plugin);
UnitySpacesManager* unity_spaces_manager_construct (GType object_type, UnityPlugin* plugin);
static void unity_spaces_manager_workspace_switched (UnitySpacesManager* self, UnityPlugin* plugin, gint from, gint to, gint direction);
static void _unity_spaces_manager_workspace_switched_unity_plugin_workspace_switch_event (UnityPlugin* _sender, UnityPlugin* plugin, gint from, gint to, gint direction, gpointer self);
+static void unity_spaces_manager_set_desktop_layout (UnitySpacesManager* self, gint columns, gint rows, gint num_workspace);
void unity_spaces_manager_set_padding (UnitySpacesManager* self, guint top, guint right, guint left, guint bottom);
void unity_spaces_manager_set_top_padding (UnitySpacesManager* self, guint value);
void unity_spaces_manager_set_right_padding (UnitySpacesManager* self, guint value);
@@ -277,14 +282,14 @@ static void unity_spaces_manager_set_showing (UnitySpacesManager* self, gboolean
static gboolean unity_spaces_manager_on_stage_capture_event (UnitySpacesManager* self, ClutterEvent* event);
static gboolean _unity_spaces_manager_on_stage_capture_event_clutter_actor_captured_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
static ClutterActor* unity_spaces_manager_workspace_clone (UnitySpacesManager* self, MetaWorkspace* workspace);
-static gboolean _lambda13_ (Block2Data* _data2_);
+static gboolean _lambda13_ (Block3Data* _data3_);
static gboolean __lambda13__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
-static gboolean _lambda14_ (Block2Data* _data2_);
+static gboolean _lambda14_ (Block3Data* _data3_);
static gboolean __lambda14__clutter_actor_enter_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
-static gboolean _lambda15_ (Block2Data* _data2_);
+static gboolean _lambda15_ (Block3Data* _data3_);
static gboolean __lambda15__clutter_actor_leave_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
-static Block2Data* block2_data_ref (Block2Data* _data2_);
-static void block2_data_unref (Block2Data* _data2_);
+static Block3Data* block3_data_ref (Block3Data* _data3_);
+static void block3_data_unref (Block3Data* _data3_);
static void unity_spaces_manager_layout_workspaces (UnitySpacesManager* self, GList* clones, MetaScreen* screen);
UnityLauncherScrollerChild* unity_spaces_manager_get_button (UnitySpacesManager* self);
static void unity_spaces_manager_unlayout_workspaces (UnitySpacesManager* self, GList* clones, MetaScreen* screen, gint focus);
@@ -293,23 +298,23 @@ UnityExposeClone* unity_expose_clone_construct (GType object_type, ClutterActor*
void unity_expose_clone_set_fade_on_close (UnityExposeClone* self, gboolean value);
void unity_expose_clone_set_darken (UnityExposeClone* self, guint8 value);
void unity_expose_clone_set_enable_dnd (UnityExposeClone* self, gboolean value);
-static void _lambda10_ (ClutterActor* t, Block3Data* _data3_);
+static void _lambda10_ (ClutterActor* t, Block4Data* _data4_);
ClutterActor* unity_expose_clone_get_pre_drag_parent (UnityExposeClone* self);
float unity_expose_clone_get_pre_drag_scale_x (UnityExposeClone* self);
float unity_expose_clone_get_pre_drag_scale_y (UnityExposeClone* self);
static void __lambda10__unity_expose_clone_drag_dropped (UnityExposeClone* _sender, ClutterActor* onto, gpointer self);
-static gboolean _lambda11_ (Block3Data* _data3_);
-static gboolean _lambda12_ (Block4Data* _data4_);
+static gboolean _lambda11_ (Block4Data* _data4_);
+static gboolean _lambda12_ (Block5Data* _data5_);
static gboolean __lambda12__gsource_func (gpointer self);
+static Block5Data* block5_data_ref (Block5Data* _data5_);
+static void block5_data_unref (Block5Data* _data5_);
+static gboolean __lambda11__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (Block4Data* _data4_);
-static gboolean __lambda11__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
-static Block3Data* block3_data_ref (Block3Data* _data3_);
-static void block3_data_unref (Block3Data* _data3_);
-static void _lambda9_ (Block5Data* _data5_);
+static void _lambda9_ (Block6Data* _data6_);
static void __lambda9__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
-static Block5Data* block5_data_ref (Block5Data* _data5_);
-static void block5_data_unref (Block5Data* _data5_);
+static Block6Data* block6_data_ref (Block6Data* _data6_);
+static void block6_data_unref (Block6Data* _data6_);
guint unity_spaces_manager_get_left_padding (UnitySpacesManager* self);
guint unity_spaces_manager_get_right_padding (UnitySpacesManager* self);
guint unity_spaces_manager_get_spacing (UnitySpacesManager* self);
@@ -697,6 +702,7 @@ UnitySpacesManager* unity_spaces_manager_construct (GType object_type, UnityPlug
self = (UnitySpacesManager*) g_object_new (object_type, NULL);
self->priv->plugin = (_tmp0_ = _g_object_ref0 (plugin), _g_object_unref0 (self->priv->plugin), _tmp0_);
g_signal_connect_object (self->priv->plugin, "workspace-switch-event", (GCallback) _unity_spaces_manager_workspace_switched_unity_plugin_workspace_switch_event, self, 0);
+ unity_spaces_manager_set_desktop_layout (self, 2, 2, 2 * 2);
return self;
}
@@ -706,6 +712,36 @@ UnitySpacesManager* unity_spaces_manager_new (UnityPlugin* plugin) {
}
+static void unity_spaces_manager_set_desktop_layout (UnitySpacesManager* self, gint columns, gint rows, gint num_workspace) {
+ Display* display;
+ gulong data[4] = {0};
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ g_return_if_fail (self != NULL);
+ display = NULL;
+ if (columns < 1) {
+ _tmp1_ = TRUE;
+ } else {
+ _tmp1_ = rows < 1;
+ }
+ if (_tmp1_) {
+ _tmp0_ = TRUE;
+ } else {
+ _tmp0_ = num_workspace > (columns * rows);
+ }
+ if (_tmp0_) {
+ return;
+ }
+ display = mutter_plugin_get_xdisplay (unity_plugin_get_plugin (self->priv->plugin));
+ meta_prefs_set_num_workspaces (num_workspace);
+ data[0] = (gulong) 0;
+ data[1] = (gulong) columns;
+ data[2] = (gulong) rows;
+ data[3] = (gulong) 0;
+ XChangeProperty (display, DefaultRootWindow (display), XInternAtom (display, "_NET_DESKTOP_LAYOUT", FALSE), XA_CARDINAL, 32, (gint) PropModeReplace, (guchar*) data, 4);
+}
+
+
static void unity_spaces_manager_workspace_switched (UnitySpacesManager* self, UnityPlugin* plugin, gint from, gint to, gint direction) {
g_return_if_fail (self != NULL);
g_return_if_fail (plugin != NULL);
@@ -735,11 +771,11 @@ static gboolean _unity_spaces_manager_on_stage_capture_event_clutter_actor_captu
}
-static gboolean _lambda13_ (Block2Data* _data2_) {
+static gboolean _lambda13_ (Block3Data* _data3_) {
UnitySpacesManager * self;
gboolean result = FALSE;
- self = _data2_->self;
- unity_spaces_manager_select_workspace (self, _data2_->cpy);
+ self = _data3_->self;
+ unity_spaces_manager_select_workspace (self, _data3_->cpy);
result = TRUE;
return result;
}
@@ -752,12 +788,12 @@ static gboolean __lambda13__clutter_actor_button_release_event (ClutterActor* _s
}
-static gboolean _lambda14_ (Block2Data* _data2_) {
+static gboolean _lambda14_ (Block3Data* _data3_) {
UnitySpacesManager * self;
gboolean result = FALSE;
- self = _data2_->self;
- clutter_actor_set_opacity (_data2_->clone, (guint8) 255);
- clutter_actor_raise_top (_data2_->clone);
+ self = _data3_->self;
+ clutter_actor_set_opacity (_data3_->clone, (guint8) 255);
+ clutter_actor_raise_top (_data3_->clone);
result = TRUE;
return result;
}
@@ -770,11 +806,11 @@ static gboolean __lambda14__clutter_actor_enter_event (ClutterActor* _sender, Cl
}
-static gboolean _lambda15_ (Block2Data* _data2_) {
+static gboolean _lambda15_ (Block3Data* _data3_) {
UnitySpacesManager * self;
gboolean result = FALSE;
- self = _data2_->self;
- clutter_actor_set_opacity (_data2_->clone, (guint8) 200);
+ self = _data3_->self;
+ clutter_actor_set_opacity (_data3_->clone, (guint8) 200);
result = TRUE;
return result;
}
@@ -787,17 +823,17 @@ static gboolean __lambda15__clutter_actor_leave_event (ClutterActor* _sender, Cl
}
-static Block2Data* block2_data_ref (Block2Data* _data2_) {
- g_atomic_int_inc (&_data2_->_ref_count_);
- return _data2_;
+static Block3Data* block3_data_ref (Block3Data* _data3_) {
+ g_atomic_int_inc (&_data3_->_ref_count_);
+ return _data3_;
}
-static void block2_data_unref (Block2Data* _data2_) {
- if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
- _g_object_unref0 (_data2_->self);
- _g_object_unref0 (_data2_->clone);
- g_slice_free (Block2Data, _data2_);
+static void block3_data_unref (Block3Data* _data3_) {
+ if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
+ _g_object_unref0 (_data3_->self);
+ _g_object_unref0 (_data3_->clone);
+ g_slice_free (Block3Data, _data3_);
}
}
@@ -849,22 +885,22 @@ void unity_spaces_manager_show_spaces_picker (UnitySpacesManager* self) {
MetaWorkspace* workspace;
workspace = (MetaWorkspace*) workspace_it->data;
{
- Block2Data* _data2_;
- _data2_ = g_slice_new0 (Block2Data);
- _data2_->_ref_count_ = 1;
- _data2_->self = g_object_ref (self);
- _data2_->clone = unity_spaces_manager_workspace_clone (self, workspace);
- self->priv->clones = g_list_append (self->priv->clones, _g_object_ref0 (_data2_->clone));
- clutter_container_add_actor ((ClutterContainer*) self->priv->selector_group, _data2_->clone);
- clutter_actor_set_reactive (_data2_->clone, TRUE);
- clutter_actor_raise_top (_data2_->clone);
- clutter_actor_show (_data2_->clone);
- clutter_actor_set_opacity (_data2_->clone, (guint8) 200);
- _data2_->cpy = workspace;
- g_signal_connect_data (_data2_->clone, "button-release-event", (GCallback) __lambda13__clutter_actor_button_release_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
- g_signal_connect_data (_data2_->clone, "enter-event", (GCallback) __lambda14__clutter_actor_enter_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
- g_signal_connect_data (_data2_->clone, "leave-event", (GCallback) __lambda15__clutter_actor_leave_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
- block2_data_unref (_data2_);
+ Block3Data* _data3_;
+ _data3_ = g_slice_new0 (Block3Data);
+ _data3_->_ref_count_ = 1;
+ _data3_->self = g_object_ref (self);
+ _data3_->clone = unity_spaces_manager_workspace_clone (self, workspace);
+ self->priv->clones = g_list_append (self->priv->clones, _g_object_ref0 (_data3_->clone));
+ clutter_container_add_actor ((ClutterContainer*) self->priv->selector_group, _data3_->clone);
+ clutter_actor_set_reactive (_data3_->clone, TRUE);
+ clutter_actor_raise_top (_data3_->clone);
+ clutter_actor_show (_data3_->clone);
+ clutter_actor_set_opacity (_data3_->clone, (guint8) 200);
+ _data3_->cpy = workspace;
+ g_signal_connect_data (_data3_->clone, "button-release-event", (GCallback) __lambda13__clutter_actor_button_release_event, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
+ g_signal_connect_data (_data3_->clone, "enter-event", (GCallback) __lambda14__clutter_actor_enter_event, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
+ g_signal_connect_data (_data3_->clone, "leave-event", (GCallback) __lambda15__clutter_actor_leave_event, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
+ block3_data_unref (_data3_);
}
}
}
@@ -955,16 +991,16 @@ static void unity_spaces_manager_select_workspace (UnitySpacesManager* self, Met
}
-static void _lambda10_ (ClutterActor* t, Block3Data* _data3_) {
+static void _lambda10_ (ClutterActor* t, Block4Data* _data4_) {
UnitySpacesManager * self;
ClutterActor* _tmp0_;
UnityWorkspaceClone* new_parent;
float x = 0.0F;
float y = 0.0F;
ClutterActor* _tmp3_;
- self = _data3_->self;
+ self = _data4_->self;
g_return_if_fail (t != NULL);
- new_parent = _g_object_ref0 ((_tmp0_ = unity_expose_clone_get_pre_drag_parent (_data3_->clone), UNITY_IS_WORKSPACE_CLONE (_tmp0_) ? ((UnityWorkspaceClone*) _tmp0_) : NULL));
+ new_parent = _g_object_ref0 ((_tmp0_ = unity_expose_clone_get_pre_drag_parent (_data4_->clone), UNITY_IS_WORKSPACE_CLONE (_tmp0_) ? ((UnityWorkspaceClone*) _tmp0_) : NULL));
while (TRUE) {
if (!(!CLUTTER_IS_STAGE (t))) {
break;
@@ -977,13 +1013,13 @@ static void _lambda10_ (ClutterActor* t, Block3Data* _data3_) {
}
t = clutter_actor_get_parent (t);
}
- clutter_actor_move_anchor_point_from_gravity ((ClutterActor*) _data3_->clone, CLUTTER_GRAVITY_CENTER);
- clutter_actor_transform_stage_point ((ClutterActor*) new_parent, clutter_actor_get_x ((ClutterActor*) _data3_->clone), clutter_actor_get_y ((ClutterActor*) _data3_->clone), &x, &y);
- clutter_actor_set_scale ((ClutterActor*) _data3_->clone, (double) unity_expose_clone_get_pre_drag_scale_x (_data3_->clone), (double) unity_expose_clone_get_pre_drag_scale_y (_data3_->clone));
- clutter_actor_set_position ((ClutterActor*) _data3_->clone, x, y);
- clutter_actor_move_anchor_point_from_gravity ((ClutterActor*) _data3_->clone, CLUTTER_GRAVITY_NORTH_WEST);
- clutter_actor_reparent ((ClutterActor*) _data3_->clone, (ClutterActor*) new_parent);
- meta_window_change_workspace_by_index (mutter_window_get_meta_window ((_tmp3_ = unity_expose_clone_get_source (_data3_->clone), MUTTER_IS_WINDOW (_tmp3_) ? ((MutterWindow*) _tmp3_) : NULL)), meta_workspace_index (unity_workspace_clone_get_workspace (new_parent)), TRUE, unity_shell_get_current_time ((UnityShell*) self->priv->plugin));
+ clutter_actor_move_anchor_point_from_gravity ((ClutterActor*) _data4_->clone, CLUTTER_GRAVITY_CENTER);
+ clutter_actor_transform_stage_point ((ClutterActor*) new_parent, clutter_actor_get_x ((ClutterActor*) _data4_->clone), clutter_actor_get_y ((ClutterActor*) _data4_->clone), &x, &y);
+ clutter_actor_set_scale ((ClutterActor*) _data4_->clone, (double) unity_expose_clone_get_pre_drag_scale_x (_data4_->clone), (double) unity_expose_clone_get_pre_drag_scale_y (_data4_->clone));
+ clutter_actor_set_position ((ClutterActor*) _data4_->clone, x, y);
+ clutter_actor_move_anchor_point_from_gravity ((ClutterActor*) _data4_->clone, CLUTTER_GRAVITY_NORTH_WEST);
+ clutter_actor_reparent ((ClutterActor*) _data4_->clone, (ClutterActor*) new_parent);
+ meta_window_change_workspace_by_index (mutter_window_get_meta_window ((_tmp3_ = unity_expose_clone_get_source (_data4_->clone), MUTTER_IS_WINDOW (_tmp3_) ? ((MutterWindow*) _tmp3_) : NULL)), meta_workspace_index (unity_workspace_clone_get_workspace (new_parent)), TRUE, unity_shell_get_current_time ((UnityShell*) self->priv->plugin));
_g_object_unref0 (new_parent);
}
@@ -993,13 +1029,13 @@ static void __lambda10__unity_expose_clone_drag_dropped (UnityExposeClone* _send
}
-static gboolean _lambda12_ (Block4Data* _data4_) {
- Block3Data* _data3_;
+static gboolean _lambda12_ (Block5Data* _data5_) {
+ Block4Data* _data4_;
UnitySpacesManager * self;
gboolean result = FALSE;
- _data3_ = _data4_->_data3_;
- self = _data3_->self;
- meta_window_activate (_data4_->meta, _data4_->time_);
+ _data4_ = _data5_->_data4_;
+ self = _data4_->self;
+ meta_window_activate (_data5_->meta, _data5_->time_);
result = FALSE;
return result;
}
@@ -1012,37 +1048,37 @@ static gboolean __lambda12__gsource_func (gpointer self) {
}
-static Block4Data* block4_data_ref (Block4Data* _data4_) {
- g_atomic_int_inc (&_data4_->_ref_count_);
- return _data4_;
+static Block5Data* block5_data_ref (Block5Data* _data5_) {
+ g_atomic_int_inc (&_data5_->_ref_count_);
+ return _data5_;
}
-static void block4_data_unref (Block4Data* _data4_) {
- if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
- block3_data_unref (_data4_->_data3_);
- g_slice_free (Block4Data, _data4_);
+static void block5_data_unref (Block5Data* _data5_) {
+ if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
+ block4_data_unref (_data5_->_data4_);
+ g_slice_free (Block5Data, _data5_);
}
}
-static gboolean _lambda11_ (Block3Data* _data3_) {
+static gboolean _lambda11_ (Block4Data* _data4_) {
UnitySpacesManager * self;
gboolean result = FALSE;
- Block4Data* _data4_;
+ Block5Data* _data5_;
ClutterActor* _tmp0_;
- self = _data3_->self;
- _data4_ = g_slice_new0 (Block4Data);
- _data4_->_ref_count_ = 1;
- _data4_->_data3_ = block3_data_ref (_data3_);
- clutter_actor_raise_top ((ClutterActor*) _data3_->clone);
- _data4_->meta = mutter_window_get_meta_window ((_tmp0_ = unity_expose_clone_get_source (_data3_->clone), MUTTER_IS_WINDOW (_tmp0_) ? ((MutterWindow*) _tmp0_) : NULL));
- _data4_->time_ = meta_display_get_current_time (meta_window_get_display (_data4_->meta));
- meta_workspace_activate (meta_window_get_workspace (_data4_->meta), _data4_->time_);
- meta_window_activate (_data4_->meta, _data4_->time_);
- g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, __lambda12__gsource_func, block4_data_ref (_data4_), block4_data_unref);
+ self = _data4_->self;
+ _data5_ = g_slice_new0 (Block5Data);
+ _data5_->_ref_count_ = 1;
+ _data5_->_data4_ = block4_data_ref (_data4_);
+ clutter_actor_raise_top ((ClutterActor*) _data4_->clone);
+ _data5_->meta = mutter_window_get_meta_window ((_tmp0_ = unity_expose_clone_get_source (_data4_->clone), MUTTER_IS_WINDOW (_tmp0_) ? ((MutterWindow*) _tmp0_) : NULL));
+ _data5_->time_ = meta_display_get_current_time (meta_window_get_display (_data5_->meta));
+ meta_workspace_activate (meta_window_get_workspace (_data5_->meta), _data5_->time_);
+ meta_window_activate (_data5_->meta, _data5_->time_);
+ g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, __lambda12__gsource_func, block5_data_ref (_data5_), block5_data_unref);
result = FALSE;
- block4_data_unref (_data4_);
+ block5_data_unref (_data5_);
return result;
}
@@ -1054,17 +1090,17 @@ static gboolean __lambda11__clutter_actor_button_release_event (ClutterActor* _s
}
-static Block3Data* block3_data_ref (Block3Data* _data3_) {
- g_atomic_int_inc (&_data3_->_ref_count_);
- return _data3_;
+static Block4Data* block4_data_ref (Block4Data* _data4_) {
+ g_atomic_int_inc (&_data4_->_ref_count_);
+ return _data4_;
}
-static void block3_data_unref (Block3Data* _data3_) {
- if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
- _g_object_unref0 (_data3_->self);
- _g_object_unref0 (_data3_->clone);
- g_slice_free (Block3Data, _data3_);
+static void block4_data_unref (Block4Data* _data4_) {
+ if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
+ _g_object_unref0 (_data4_->self);
+ _g_object_unref0 (_data4_->clone);
+ g_slice_free (Block4Data, _data4_);
}
}
@@ -1098,13 +1134,13 @@ static ClutterActor* unity_spaces_manager_workspace_clone (UnitySpacesManager* s
_tmp1_ = mutter_window_get_workspace (window) == meta_workspace_index (workspace);
}
if (_tmp1_) {
- Block3Data* _data3_;
+ Block4Data* _data4_;
gboolean _tmp2_ = FALSE;
gboolean _tmp3_ = FALSE;
gboolean _tmp4_ = FALSE;
- _data3_ = g_slice_new0 (Block3Data);
- _data3_->_ref_count_ = 1;
- _data3_->self = g_object_ref (self);
+ _data4_ = g_slice_new0 (Block4Data);
+ _data4_->_ref_count_ = 1;
+ _data4_->self = g_object_ref (self);
if (mutter_window_get_window_type (window) == META_COMP_WINDOW_NORMAL) {
_tmp4_ = TRUE;
} else {
@@ -1121,22 +1157,22 @@ static ClutterActor* unity_spaces_manager_workspace_clone (UnitySpacesManager* s
_tmp2_ = mutter_window_get_window_type (window) == META_COMP_WINDOW_UTILITY;
}
if (!_tmp2_) {
- block3_data_unref (_data3_);
+ block4_data_unref (_data4_);
_g_object_unref0 (window);
continue;
}
- _data3_->clone = g_object_ref_sink (unity_expose_clone_new ((ClutterActor*) window));
- unity_expose_clone_set_fade_on_close (_data3_->clone, FALSE);
- clutter_actor_set_reactive ((ClutterActor*) _data3_->clone, TRUE);
- unity_expose_clone_set_darken (_data3_->clone, (guint8) 25);
- unity_expose_clone_set_enable_dnd (_data3_->clone, TRUE);
- g_signal_connect_data (_data3_->clone, "drag-dropped", (GCallback) __lambda10__unity_expose_clone_drag_dropped, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
- clutter_container_add_actor ((ClutterContainer*) wsp, (ClutterActor*) _data3_->clone);
- clutter_actor_set_size ((ClutterActor*) _data3_->clone, clutter_actor_get_width ((ClutterActor*) window), clutter_actor_get_height ((ClutterActor*) window));
- clutter_actor_set_position ((ClutterActor*) _data3_->clone, clutter_actor_get_x ((ClutterActor*) window), clutter_actor_get_y ((ClutterActor*) window));
- g_signal_connect_data ((ClutterActor*) _data3_->clone, "button-release-event", (GCallback) __lambda11__clutter_actor_button_release_event, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
- clutter_actor_show ((ClutterActor*) _data3_->clone);
- block3_data_unref (_data3_);
+ _data4_->clone = g_object_ref_sink (unity_expose_clone_new ((ClutterActor*) window));
+ unity_expose_clone_set_fade_on_close (_data4_->clone, FALSE);
+ clutter_actor_set_reactive ((ClutterActor*) _data4_->clone, TRUE);
+ unity_expose_clone_set_darken (_data4_->clone, (guint8) 25);
+ unity_expose_clone_set_enable_dnd (_data4_->clone, TRUE);
+ g_signal_connect_data (_data4_->clone, "drag-dropped", (GCallback) __lambda10__unity_expose_clone_drag_dropped, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
+ clutter_container_add_actor ((ClutterContainer*) wsp, (ClutterActor*) _data4_->clone);
+ clutter_actor_set_size ((ClutterActor*) _data4_->clone, clutter_actor_get_width ((ClutterActor*) window), clutter_actor_get_height ((ClutterActor*) window));
+ clutter_actor_set_position ((ClutterActor*) _data4_->clone, clutter_actor_get_x ((ClutterActor*) window), clutter_actor_get_y ((ClutterActor*) window));
+ g_signal_connect_data ((ClutterActor*) _data4_->clone, "button-release-event", (GCallback) __lambda11__clutter_actor_button_release_event, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
+ clutter_actor_show ((ClutterActor*) _data4_->clone);
+ block4_data_unref (_data4_);
}
_g_object_unref0 (window);
}
@@ -1155,11 +1191,11 @@ static ClutterActor* unity_spaces_manager_workspace_clone (UnitySpacesManager* s
}
-static void _lambda9_ (Block5Data* _data5_) {
+static void _lambda9_ (Block6Data* _data6_) {
UnitySpacesManager * self;
GList* windows;
- self = _data5_->self;
- clutter_actor_destroy (_data5_->clone);
+ self = _data6_->self;
+ clutter_actor_destroy (_data6_->clone);
if (self->priv->background != NULL) {
ClutterActor* _tmp0_;
clutter_actor_destroy (self->priv->background);
@@ -1188,17 +1224,17 @@ static void __lambda9__clutter_animation_completed (ClutterAnimation* _sender, g
}
-static Block5Data* block5_data_ref (Block5Data* _data5_) {
- g_atomic_int_inc (&_data5_->_ref_count_);
- return _data5_;
+static Block6Data* block6_data_ref (Block6Data* _data6_) {
+ g_atomic_int_inc (&_data6_->_ref_count_);
+ return _data6_;
}
-static void block5_data_unref (Block5Data* _data5_) {
- if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
- _g_object_unref0 (_data5_->self);
- _g_object_unref0 (_data5_->clone);
- g_slice_free (Block5Data, _data5_);
+static void block6_data_unref (Block6Data* _data6_) {
+ if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
+ _g_object_unref0 (_data6_->self);
+ _g_object_unref0 (_data6_->clone);
+ g_slice_free (Block6Data, _data6_);
}
}
@@ -1243,32 +1279,32 @@ static void unity_spaces_manager_unlayout_workspaces (UnitySpacesManager* self,
gboolean _tmp2_;
_tmp2_ = TRUE;
while (TRUE) {
- Block5Data* _data5_;
+ Block6Data* _data6_;
gint index;
gint xoffset;
gint yoffset;
ClutterAnimation* anim;
ClutterActor* _tmp3_;
- _data5_ = g_slice_new0 (Block5Data);
- _data5_->_ref_count_ = 1;
- _data5_->self = g_object_ref (self);
+ _data6_ = g_slice_new0 (Block6Data);
+ _data6_->_ref_count_ = 1;
+ _data6_->self = g_object_ref (self);
if (!_tmp2_) {
x++;
}
_tmp2_ = FALSE;
if (!(x < width)) {
- block5_data_unref (_data5_);
+ block6_data_unref (_data6_);
break;
}
index = (y * width) + x;
xoffset = (x - (focus % width)) * rect.width;
yoffset = (y - (focus / width)) * rect.height;
- _data5_->clone = _g_object_ref0 (CLUTTER_ACTOR ((ClutterActor*) g_list_nth_data (clones, (guint) index)));
- anim = _g_object_ref0 (clutter_actor_animate (_data5_->clone, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) xoffset, "y", (float) yoffset, "scale-x", 1.0f, "scale-y", 1.0f, NULL));
- unity_workspace_clone_ungrid ((_tmp3_ = _data5_->clone, UNITY_IS_WORKSPACE_CLONE (_tmp3_) ? ((UnityWorkspaceClone*) _tmp3_) : NULL));
- g_signal_connect_data (anim, "completed", (GCallback) __lambda9__clutter_animation_completed, block5_data_ref (_data5_), (GClosureNotify) block5_data_unref, 0);
+ _data6_->clone = _g_object_ref0 (CLUTTER_ACTOR ((ClutterActor*) g_list_nth_data (clones, (guint) index)));
+ anim = _g_object_ref0 (clutter_actor_animate (_data6_->clone, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) xoffset, "y", (float) yoffset, "scale-x", 1.0f, "scale-y", 1.0f, NULL));
+ unity_workspace_clone_ungrid ((_tmp3_ = _data6_->clone, UNITY_IS_WORKSPACE_CLONE (_tmp3_) ? ((UnityWorkspaceClone*) _tmp3_) : NULL));
+ g_signal_connect_data (anim, "completed", (GCallback) __lambda9__clutter_animation_completed, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
_g_object_unref0 (anim);
- block5_data_unref (_data5_);
+ block6_data_unref (_data6_);
}
}
}
diff --git a/targets/mutter/spaces-manager.vala b/targets/mutter/spaces-manager.vala
index bc7eb3483..025fdb19a 100644
--- a/targets/mutter/spaces-manager.vala
+++ b/targets/mutter/spaces-manager.vala
@@ -154,6 +154,33 @@ namespace Unity {
public SpacesManager (Plugin plugin) {
this.plugin = plugin;
this.plugin.workspace_switch_event.connect (this.workspace_switched);
+
+ set_desktop_layout (2, 2, 2 * 2);
+ }
+
+ void set_desktop_layout (int columns, int rows, int num_workspace)
+ {
+ X.Display display;
+ ulong data[4];
+
+ if (columns < 1 || rows < 1 || num_workspace > columns * rows)
+ return;
+
+ display = plugin.plugin.get_xdisplay ();
+
+ Mutter.meta_prefs_set_num_workspaces (num_workspace);
+
+ data[0] = 0; // horizontal orientation
+ data[1] = columns;
+ data[2] = rows;
+ data[3] = 0; //top left
+ display.change_property(display.default_root_window (),
+ display.intern_atom ("_NET_DESKTOP_LAYOUT", false),
+ X.XA_CARDINAL,
+ 32,
+ X.PropMode.Replace,
+ (uchar []) data,
+ 4);
}
construct
diff --git a/targets/mutter/unity-mutter.h b/targets/mutter/unity-mutter.h
index 805c06a58..453a43485 100644
--- a/targets/mutter/unity-mutter.h
+++ b/targets/mutter/unity-mutter.h
@@ -1,4 +1,4 @@
-/* unity-mutter.h generated by valac 0.9.8, the Vala compiler, do not modify */
+/* unity-mutter.h generated by valac 0.10.0, the Vala compiler, do not modify */
#ifndef __UNITY_MUTTER_H__
@@ -125,6 +125,7 @@ typedef struct _UnityWindowManagementPrivate UnityWindowManagementPrivate;
struct _UnityExposeClone {
ClutterGroup parent_instance;
UnityExposeClonePrivate * priv;
+ gboolean dirty;
};
struct _UnityExposeCloneClass {
diff --git a/targets/mutter/unity-mutter.vapi b/targets/mutter/unity-mutter.vapi
index ab119c1b5..1928b7004 100644
--- a/targets/mutter/unity-mutter.vapi
+++ b/targets/mutter/unity-mutter.vapi
@@ -1,4 +1,4 @@
-/* unity-mutter.vapi generated by valac 0.9.8, do not modify. */
+/* unity-mutter.vapi generated by valac 0.10.0, do not modify. */
[CCode (cprefix = "Unity", lower_case_cprefix = "unity_")]
namespace Unity {
@@ -8,6 +8,7 @@ namespace Unity {
}
[CCode (cheader_filename = "unity-mutter.h")]
public class ExposeClone : Clutter.Group {
+ public bool dirty;
public ExposeClone (Clutter.Actor source);
public void restore_window_position (int active_workspace);
public uint8 darken { get; set; }
diff --git a/targets/mutter/window-management.c b/targets/mutter/window-management.c
index 266d03e3d..6b1313349 100644
--- a/targets/mutter/window-management.c
+++ b/targets/mutter/window-management.c
@@ -1,4 +1,4 @@
-/* window-management.c generated by valac 0.9.8, the Vala compiler
+/* window-management.c generated by valac 0.10.0, the Vala compiler
* generated from window-management.vala, do not modify */
/*
diff --git a/targets/unity/main.c b/targets/unity/main.c
index 553d2fcd9..b1843bd5b 100644
--- a/targets/unity/main.c
+++ b/targets/unity/main.c
@@ -1,4 +1,4 @@
-/* main.c generated by valac 0.9.8, the Vala compiler
+/* main.c generated by valac 0.10.0, the Vala compiler
* generated from main.vala, do not modify */
/*
diff --git a/tests/ui/test-automate.c b/tests/ui/test-automate.c
index 02d18b008..15451949e 100644
--- a/tests/ui/test-automate.c
+++ b/tests/ui/test-automate.c
@@ -1,4 +1,4 @@
-/* test-automate.c generated by valac 0.9.8, the Vala compiler
+/* test-automate.c generated by valac 0.10.0, the Vala compiler
* generated from test-automate.vala, do not modify */
/*
diff --git a/tests/ui/test-home-button.c b/tests/ui/test-home-button.c
index ac1938e11..fa75f925f 100644
--- a/tests/ui/test-home-button.c
+++ b/tests/ui/test-home-button.c
@@ -1,4 +1,4 @@
-/* test-home-button.c generated by valac 0.9.8, the Vala compiler
+/* test-home-button.c generated by valac 0.10.0, the Vala compiler
* generated from test-home-button.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/tests/ui/test-indicators.c b/tests/ui/test-indicators.c
index faaa7205f..67a7e7a42 100644
--- a/tests/ui/test-indicators.c
+++ b/tests/ui/test-indicators.c
@@ -1,4 +1,4 @@
-/* test-indicators.c generated by valac 0.9.8, the Vala compiler
+/* test-indicators.c generated by valac 0.10.0, the Vala compiler
* generated from test-indicators.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/tests/ui/test-quicklist.c b/tests/ui/test-quicklist.c
index 85bceb159..16972b967 100644
--- a/tests/ui/test-quicklist.c
+++ b/tests/ui/test-quicklist.c
@@ -1,4 +1,4 @@
-/* test-quicklist.c generated by valac 0.9.8, the Vala compiler
+/* test-quicklist.c generated by valac 0.10.0, the Vala compiler
* generated from test-quicklist.vala, do not modify */
/*
diff --git a/tests/ui/test-ui.c b/tests/ui/test-ui.c
index ad55f30e1..71b62b984 100644
--- a/tests/ui/test-ui.c
+++ b/tests/ui/test-ui.c
@@ -1,4 +1,4 @@
-/* test-ui.c generated by valac 0.9.8, the Vala compiler
+/* test-ui.c generated by valac 0.10.0, the Vala compiler
* generated from test-ui.vala, do not modify */
/*
diff --git a/tests/unit/test-appinfo-manager.c b/tests/unit/test-appinfo-manager.c
index deb0b7a27..52a76734b 100644
--- a/tests/unit/test-appinfo-manager.c
+++ b/tests/unit/test-appinfo-manager.c
@@ -1,4 +1,4 @@
-/* test-appinfo-manager.c generated by valac 0.9.8, the Vala compiler
+/* test-appinfo-manager.c generated by valac 0.10.0, the Vala compiler
* generated from test-appinfo-manager.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/tests/unit/test-dbusmenu-quicklists.c b/tests/unit/test-dbusmenu-quicklists.c
index d706651a7..0e71b8c26 100644
--- a/tests/unit/test-dbusmenu-quicklists.c
+++ b/tests/unit/test-dbusmenu-quicklists.c
@@ -1,4 +1,4 @@
-/* test-dbusmenu-quicklists.c generated by valac 0.9.8, the Vala compiler
+/* test-dbusmenu-quicklists.c generated by valac 0.10.0, the Vala compiler
* generated from test-dbusmenu-quicklists.vala, do not modify */
/*
diff --git a/tests/unit/test-io.c b/tests/unit/test-io.c
index 141646f11..4c3bd65af 100644
--- a/tests/unit/test-io.c
+++ b/tests/unit/test-io.c
@@ -1,4 +1,4 @@
-/* test-io.c generated by valac 0.9.8, the Vala compiler
+/* test-io.c generated by valac 0.10.0, the Vala compiler
* generated from test-io.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/tests/unit/test-launcher.c b/tests/unit/test-launcher.c
index c06cd25b3..51345a108 100644
--- a/tests/unit/test-launcher.c
+++ b/tests/unit/test-launcher.c
@@ -1,4 +1,4 @@
-/* test-launcher.c generated by valac 0.9.8, the Vala compiler
+/* test-launcher.c generated by valac 0.10.0, the Vala compiler
* generated from test-launcher.vala, do not modify */
/*
diff --git a/tests/unit/test-panel-indicator-object-entry-view.c b/tests/unit/test-panel-indicator-object-entry-view.c
index 65c6f6b68..9907d0df0 100644
--- a/tests/unit/test-panel-indicator-object-entry-view.c
+++ b/tests/unit/test-panel-indicator-object-entry-view.c
@@ -1,4 +1,4 @@
-/* test-panel-indicator-object-entry-view.c generated by valac 0.9.8, the Vala compiler
+/* test-panel-indicator-object-entry-view.c generated by valac 0.10.0, the Vala compiler
* generated from test-panel-indicator-object-entry-view.vala, do not modify */
/*
diff --git a/tests/unit/test-panel-indicator-object-view.c b/tests/unit/test-panel-indicator-object-view.c
index 9e35cfcf3..e572385b8 100644
--- a/tests/unit/test-panel-indicator-object-view.c
+++ b/tests/unit/test-panel-indicator-object-view.c
@@ -1,4 +1,4 @@
-/* test-panel-indicator-object-view.c generated by valac 0.9.8, the Vala compiler
+/* test-panel-indicator-object-view.c generated by valac 0.10.0, the Vala compiler
* generated from test-panel-indicator-object-view.vala, do not modify */
/*
diff --git a/tests/unit/test-place-browser.c b/tests/unit/test-place-browser.c
index 4676b1697..ed341a046 100644
--- a/tests/unit/test-place-browser.c
+++ b/tests/unit/test-place-browser.c
@@ -1,4 +1,4 @@
-/* test-place-browser.c generated by valac 0.9.8, the Vala compiler
+/* test-place-browser.c generated by valac 0.10.0, the Vala compiler
* generated from test-place-browser.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/tests/unit/test-place.c b/tests/unit/test-place.c
index f49f4d7ad..9d54ce7a2 100644
--- a/tests/unit/test-place.c
+++ b/tests/unit/test-place.c
@@ -1,4 +1,4 @@
-/* test-place.c generated by valac 0.9.8, the Vala compiler
+/* test-place.c generated by valac 0.10.0, the Vala compiler
* generated from test-place.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/tests/unit/test-places-place-file-model.c b/tests/unit/test-places-place-file-model.c
index c47406377..b9754e28f 100644
--- a/tests/unit/test-places-place-file-model.c
+++ b/tests/unit/test-places-place-file-model.c
@@ -1,4 +1,4 @@
-/* test-places-place-file-model.c generated by valac 0.9.8, the Vala compiler
+/* test-places-place-file-model.c generated by valac 0.10.0, the Vala compiler
* generated from test-places-place-file-model.vala, do not modify */
/*
diff --git a/tests/unit/test-places-place.c b/tests/unit/test-places-place.c
index d9c7967f3..276e46298 100644
--- a/tests/unit/test-places-place.c
+++ b/tests/unit/test-places-place.c
@@ -1,4 +1,4 @@
-/* test-places-place.c generated by valac 0.9.8, the Vala compiler
+/* test-places-place.c generated by valac 0.10.0, the Vala compiler
* generated from test-places-place.vala, do not modify */
/*
diff --git a/tests/unit/test-places.c b/tests/unit/test-places.c
index 644632bf0..8d586bb54 100644
--- a/tests/unit/test-places.c
+++ b/tests/unit/test-places.c
@@ -1,4 +1,4 @@
-/* test-places.c generated by valac 0.9.8, the Vala compiler
+/* test-places.c generated by valac 0.10.0, the Vala compiler
* generated from test-places.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/tests/unit/test-unit.c b/tests/unit/test-unit.c
index 35ac44a17..4df6364da 100644
--- a/tests/unit/test-unit.c
+++ b/tests/unit/test-unit.c
@@ -1,4 +1,4 @@
-/* test-unit.c generated by valac 0.9.8, the Vala compiler
+/* test-unit.c generated by valac 0.10.0, the Vala compiler
* generated from test-unit.vala, do not modify */
/*
diff --git a/tests/unit/test-unity-pixbuf-cache.c b/tests/unit/test-unity-pixbuf-cache.c
index d1d455ec5..d73a9dffc 100644
--- a/tests/unit/test-unity-pixbuf-cache.c
+++ b/tests/unit/test-unity-pixbuf-cache.c
@@ -1,4 +1,4 @@
-/* test-unity-pixbuf-cache.c generated by valac 0.9.8, the Vala compiler
+/* test-unity-pixbuf-cache.c generated by valac 0.10.0, the Vala compiler
* generated from test-unity-pixbuf-cache.vala, do not modify */
/*
diff --git a/unity-private/application.c b/unity-private/application.c
index e37ea2630..f608df4b5 100644
--- a/unity-private/application.c
+++ b/unity-private/application.c
@@ -1,4 +1,4 @@
-/* application.c generated by valac 0.9.8, the Vala compiler
+/* application.c generated by valac 0.10.0, the Vala compiler
* generated from application.vala, do not modify */
/*
diff --git a/unity-private/gesture/gesture-dispatcher-xcb-glu.c b/unity-private/gesture/gesture-dispatcher-xcb-glu.c
index aa4b5ec57..a1cdc3631 100644
--- a/unity-private/gesture/gesture-dispatcher-xcb-glu.c
+++ b/unity-private/gesture/gesture-dispatcher-xcb-glu.c
@@ -1,4 +1,4 @@
-/* gesture-dispatcher-xcb-glu.c generated by valac 0.9.8, the Vala compiler
+/* gesture-dispatcher-xcb-glu.c generated by valac 0.10.0, the Vala compiler
* generated from gesture-dispatcher-xcb-glu.vala, do not modify */
/*
diff --git a/unity-private/gesture/gesture-dispatcher-xcb-glue.c b/unity-private/gesture/gesture-dispatcher-xcb-glue.c
index b39b3d8cf..ab921f28a 100644
--- a/unity-private/gesture/gesture-dispatcher-xcb-glue.c
+++ b/unity-private/gesture/gesture-dispatcher-xcb-glue.c
@@ -222,6 +222,30 @@ unity_gesture_xcb_dispatcher_glue_main_iteration (XCBSource *source)
ev->velocity_y = properties[GRAIL_PROP_DRAG_VY];
ev->x = properties[GRAIL_PROP_DRAG_X];
ev->y = properties[GRAIL_PROP_DRAG_Y];
+
+ /* FIXME: grail needs to provide API better than
+ * this
+ */
+ if (gesture_event->num_props == 13)
+ {
+ ev->current_n_fingers = 1;
+ }
+ else if (gesture_event->num_props == 16)
+ {
+ ev->current_n_fingers = 2;
+ }
+ else if (gesture_event->num_props == 19)
+ {
+ ev->current_n_fingers = 3;
+ }
+ else if (gesture_event->num_props == 22)
+ {
+ ev->current_n_fingers = 4;
+ }
+ else
+ {
+ ev->current_n_fingers = dispatch_event->fingers;
+ }
}
else if (dispatch_event->type == UNITY_GESTURE_TYPE_PINCH &&
gesture_event->num_props >= 7)
diff --git a/unity-private/gesture/gesture-dispatcher-xcb.c b/unity-private/gesture/gesture-dispatcher-xcb.c
index e734df967..140c393dc 100644
--- a/unity-private/gesture/gesture-dispatcher-xcb.c
+++ b/unity-private/gesture/gesture-dispatcher-xcb.c
@@ -1,4 +1,4 @@
-/* gesture-dispatcher-xcb.c generated by valac 0.9.8, the Vala compiler
+/* gesture-dispatcher-xcb.c generated by valac 0.10.0, the Vala compiler
* generated from gesture-dispatcher-xcb.vala, do not modify */
/*
diff --git a/unity-private/gesture/gesture-dispatcher.c b/unity-private/gesture/gesture-dispatcher.c
index 529e6c5b2..410fbdd03 100644
--- a/unity-private/gesture/gesture-dispatcher.c
+++ b/unity-private/gesture/gesture-dispatcher.c
@@ -1,4 +1,4 @@
-/* gesture-dispatcher.c generated by valac 0.9.8, the Vala compiler
+/* gesture-dispatcher.c generated by valac 0.10.0, the Vala compiler
* generated from gesture-dispatcher.vala, do not modify */
/*
diff --git a/unity-private/gesture/gesture-event.c b/unity-private/gesture/gesture-event.c
index c853b58cc..7b94d5ef9 100644
--- a/unity-private/gesture/gesture-event.c
+++ b/unity-private/gesture/gesture-event.c
@@ -1,4 +1,4 @@
-/* gesture-event.c generated by valac 0.9.8, the Vala compiler
+/* gesture-event.c generated by valac 0.10.0, the Vala compiler
* generated from gesture-event.vala, do not modify */
/*
@@ -138,6 +138,7 @@ struct _UnityGesturePanEvent {
float velocity_y;
float x;
float y;
+ float current_n_fingers;
};
struct _UnityGesturePanEventClass {
@@ -353,6 +354,8 @@ char* unity_gesture_event_to_string (UnityGestureEvent* self) {
char* _tmp34_;
char* _tmp35_;
char* _tmp36_;
+ char* _tmp37_;
+ char* _tmp38_;
ret = (_tmp26_ = g_strconcat (ret, _tmp25_ = g_strdup_printf ("\tDeltaX : %f\n", (double) self->pan_event->delta_x), NULL), _g_free0 (ret), _tmp26_);
_g_free0 (_tmp25_);
ret = (_tmp28_ = g_strconcat (ret, _tmp27_ = g_strdup_printf ("\tDeltaY : %f\n", (double) self->pan_event->delta_y), NULL), _g_free0 (ret), _tmp28_);
@@ -365,12 +368,12 @@ char* unity_gesture_event_to_string (UnityGestureEvent* self) {
_g_free0 (_tmp33_);
ret = (_tmp36_ = g_strconcat (ret, _tmp35_ = g_strdup_printf ("\tY : %f\n", (double) self->pan_event->y), NULL), _g_free0 (ret), _tmp36_);
_g_free0 (_tmp35_);
+ ret = (_tmp38_ = g_strconcat (ret, _tmp37_ = g_strdup_printf ("\tCurNFingers: %f\n", (double) self->pan_event->current_n_fingers), NULL), _g_free0 (ret), _tmp38_);
+ _g_free0 (_tmp37_);
break;
}
case UNITY_GESTURE_TYPE_PINCH:
{
- char* _tmp37_;
- char* _tmp38_;
char* _tmp39_;
char* _tmp40_;
char* _tmp41_;
@@ -383,36 +386,38 @@ char* unity_gesture_event_to_string (UnityGestureEvent* self) {
char* _tmp48_;
char* _tmp49_;
char* _tmp50_;
- ret = (_tmp38_ = g_strconcat (ret, _tmp37_ = g_strdup_printf ("\tRadiusDelta: %f\n", (double) self->pinch_event->radius_delta), NULL), _g_free0 (ret), _tmp38_);
- _g_free0 (_tmp37_);
- ret = (_tmp40_ = g_strconcat (ret, _tmp39_ = g_strdup_printf ("\tRadiusVeloc: %f\n", (double) self->pinch_event->radius_velocity), NULL), _g_free0 (ret), _tmp40_);
+ char* _tmp51_;
+ char* _tmp52_;
+ ret = (_tmp40_ = g_strconcat (ret, _tmp39_ = g_strdup_printf ("\tRadiusDelta: %f\n", (double) self->pinch_event->radius_delta), NULL), _g_free0 (ret), _tmp40_);
_g_free0 (_tmp39_);
- ret = (_tmp42_ = g_strconcat (ret, _tmp41_ = g_strdup_printf ("\tRadius : %f\n", (double) self->pinch_event->radius), NULL), _g_free0 (ret), _tmp42_);
+ ret = (_tmp42_ = g_strconcat (ret, _tmp41_ = g_strdup_printf ("\tRadiusVeloc: %f\n", (double) self->pinch_event->radius_velocity), NULL), _g_free0 (ret), _tmp42_);
_g_free0 (_tmp41_);
- ret = (_tmp44_ = g_strconcat (ret, _tmp43_ = g_strdup_printf ("\tBoundingX1 : %f\n", (double) self->pinch_event->bounding_box_x1), NULL), _g_free0 (ret), _tmp44_);
+ ret = (_tmp44_ = g_strconcat (ret, _tmp43_ = g_strdup_printf ("\tRadius : %f\n", (double) self->pinch_event->radius), NULL), _g_free0 (ret), _tmp44_);
_g_free0 (_tmp43_);
- ret = (_tmp46_ = g_strconcat (ret, _tmp45_ = g_strdup_printf ("\tBoundingY1 : %f\n", (double) self->pinch_event->bounding_box_y1), NULL), _g_free0 (ret), _tmp46_);
+ ret = (_tmp46_ = g_strconcat (ret, _tmp45_ = g_strdup_printf ("\tBoundingX1 : %f\n", (double) self->pinch_event->bounding_box_x1), NULL), _g_free0 (ret), _tmp46_);
_g_free0 (_tmp45_);
- ret = (_tmp48_ = g_strconcat (ret, _tmp47_ = g_strdup_printf ("\tBoundingX2 : %f\n", (double) self->pinch_event->bounding_box_x2), NULL), _g_free0 (ret), _tmp48_);
+ ret = (_tmp48_ = g_strconcat (ret, _tmp47_ = g_strdup_printf ("\tBoundingY1 : %f\n", (double) self->pinch_event->bounding_box_y1), NULL), _g_free0 (ret), _tmp48_);
_g_free0 (_tmp47_);
- ret = (_tmp50_ = g_strconcat (ret, _tmp49_ = g_strdup_printf ("\tBoundingY2 : %f\n", (double) self->pinch_event->bounding_box_y2), NULL), _g_free0 (ret), _tmp50_);
+ ret = (_tmp50_ = g_strconcat (ret, _tmp49_ = g_strdup_printf ("\tBoundingX2 : %f\n", (double) self->pinch_event->bounding_box_x2), NULL), _g_free0 (ret), _tmp50_);
_g_free0 (_tmp49_);
+ ret = (_tmp52_ = g_strconcat (ret, _tmp51_ = g_strdup_printf ("\tBoundingY2 : %f\n", (double) self->pinch_event->bounding_box_y2), NULL), _g_free0 (ret), _tmp52_);
+ _g_free0 (_tmp51_);
break;
}
case UNITY_GESTURE_TYPE_TAP:
{
- char* _tmp51_;
- char* _tmp52_;
char* _tmp53_;
char* _tmp54_;
char* _tmp55_;
char* _tmp56_;
- ret = (_tmp52_ = g_strconcat (ret, _tmp51_ = g_strdup_printf ("\tDuration : %f\n", (double) self->tap_event->duration), NULL), _g_free0 (ret), _tmp52_);
- _g_free0 (_tmp51_);
- ret = (_tmp54_ = g_strconcat (ret, _tmp53_ = g_strdup_printf ("\tX2 : %f\n", (double) self->tap_event->x2), NULL), _g_free0 (ret), _tmp54_);
+ char* _tmp57_;
+ char* _tmp58_;
+ ret = (_tmp54_ = g_strconcat (ret, _tmp53_ = g_strdup_printf ("\tDuration : %f\n", (double) self->tap_event->duration), NULL), _g_free0 (ret), _tmp54_);
_g_free0 (_tmp53_);
- ret = (_tmp56_ = g_strconcat (ret, _tmp55_ = g_strdup_printf ("\tY2 : %f\n", (double) self->tap_event->y2), NULL), _g_free0 (ret), _tmp56_);
+ ret = (_tmp56_ = g_strconcat (ret, _tmp55_ = g_strdup_printf ("\tX2 : %f\n", (double) self->tap_event->x2), NULL), _g_free0 (ret), _tmp56_);
_g_free0 (_tmp55_);
+ ret = (_tmp58_ = g_strconcat (ret, _tmp57_ = g_strdup_printf ("\tY2 : %f\n", (double) self->tap_event->y2), NULL), _g_free0 (ret), _tmp58_);
+ _g_free0 (_tmp57_);
break;
}
default:
diff --git a/unity-private/gesture/gesture-event.vala b/unity-private/gesture/gesture-event.vala
index d9f4dfe9b..880fd0b68 100644
--- a/unity-private/gesture/gesture-event.vala
+++ b/unity-private/gesture/gesture-event.vala
@@ -83,6 +83,7 @@ namespace Unity.Gesture
ret += "\tVelocityY : %f\n".printf (pan_event.velocity_y);
ret += "\tX : %f\n".printf (pan_event.x);
ret += "\tY : %f\n".printf (pan_event.y);
+ ret += "\tCurNFingers: %f\n".printf (pan_event.current_n_fingers);
break;
case Type.PINCH:
ret += "\tRadiusDelta: %f\n".printf (pinch_event.radius_delta);
@@ -142,6 +143,7 @@ namespace Unity.Gesture
public float velocity_y;
public float x;
public float y;
+ public float current_n_fingers; /* For 3-to-2 drags, for example */
}
public class PinchEvent
diff --git a/unity-private/launcher/application-controller.c b/unity-private/launcher/application-controller.c
index ee7f3302f..e1ca21e75 100644
--- a/unity-private/launcher/application-controller.c
+++ b/unity-private/launcher/application-controller.c
@@ -1,4 +1,4 @@
-/* application-controller.c generated by valac 0.9.8, the Vala compiler
+/* application-controller.c generated by valac 0.10.0, the Vala compiler
* generated from application-controller.vala, do not modify */
/*
@@ -167,6 +167,7 @@ struct _UnityLauncherApplicationControllerPrivate {
DbusmenuClient* menu_client;
DbusmenuMenuitem* cached_menu;
gint menu_items_realized_counter;
+ char* _fav_id;
};
typedef enum {
@@ -228,7 +229,8 @@ GType unity_launcher_application_controller_get_type (void) G_GNUC_CONST;
#define UNITY_LAUNCHER_APPLICATION_CONTROLLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_LAUNCHER_TYPE_APPLICATION_CONTROLLER, UnityLauncherApplicationControllerPrivate))
enum {
UNITY_LAUNCHER_APPLICATION_CONTROLLER_DUMMY_PROPERTY,
- UNITY_LAUNCHER_APPLICATION_CONTROLLER_DESKTOP_FILE
+ UNITY_LAUNCHER_APPLICATION_CONTROLLER_DESKTOP_FILE,
+ UNITY_LAUNCHER_APPLICATION_CONTROLLER_FAV_ID
};
GType unity_launcher_scroller_child_get_type (void) G_GNUC_CONST;
UnityLauncherApplicationController* unity_launcher_application_controller_new (const char* desktop_file_, UnityLauncherScrollerChild* child_);
@@ -243,6 +245,7 @@ void unity_launcher_application_controller_closed (UnityLauncherApplicationContr
gboolean unity_launcher_application_controller_is_sticky (UnityLauncherApplicationController* self);
void unity_launcher_application_controller_set_sticky (UnityLauncherApplicationController* self, gboolean is_sticky);
const char* unity_launcher_application_controller_get_desktop_file (UnityLauncherApplicationController* self);
+const char* unity_launcher_application_controller_get_fav_id (UnityLauncherApplicationController* self);
void unity_launcher_application_controller_close_windows (UnityLauncherApplicationController* self);
void unity_launcher_application_controller_set_priority (UnityLauncherApplicationController* self, float priority);
float unity_launcher_application_controller_get_priority (UnityLauncherApplicationController* self, GError** error);
@@ -295,6 +298,7 @@ const char* unity_launcher_scroller_child_controller_get_name (UnityLauncherScro
void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLauncherScrollerChildController* self, const char* icon_name);
void unity_launcher_scroller_child_set_needs_attention (UnityLauncherScrollerChild* self, gboolean value);
gboolean unity_launcher_application_controller_debug_is_application_attached (UnityLauncherApplicationController* self);
+void unity_launcher_application_controller_set_fav_id (UnityLauncherApplicationController* self, const char* value);
static void _unity_launcher_application_controller_on_favorite_added_unity_favorites_favorite_added (UnityFavorites* _sender, const char* uid, gpointer self);
static void _unity_launcher_application_controller_on_favorite_removed_unity_favorites_favorite_removed (UnityFavorites* _sender, const char* uid, gpointer self);
static GObject * unity_launcher_application_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
@@ -358,8 +362,6 @@ void unity_launcher_application_controller_closed (UnityLauncherApplicationContr
void unity_launcher_application_controller_set_sticky (UnityLauncherApplicationController* self, gboolean is_sticky) {
gboolean _tmp0_ = FALSE;
UnityFavorites* favorites;
- char* uid;
- gboolean _tmp1_ = FALSE;
g_return_if_fail (self != NULL);
if (_vala_strcmp0 (self->priv->_desktop_file, "") == 0) {
_tmp0_ = TRUE;
@@ -370,31 +372,13 @@ void unity_launcher_application_controller_set_sticky (UnityLauncherApplicationC
return;
}
favorites = unity_favorites_get_default ();
- uid = unity_favorites_find_uid_for_desktop_file (favorites, self->priv->_desktop_file);
- if (_vala_strcmp0 (uid, "") == 0) {
- _tmp1_ = TRUE;
- } else {
- _tmp1_ = uid == NULL;
- }
- if (_tmp1_) {
- gint filepath_length1;
- gint _filepath_size_;
- char** _tmp3_;
- char** _tmp2_;
- char** filepath;
- char* _tmp4_;
- filepath = (_tmp3_ = _tmp2_ = g_strsplit (self->priv->_desktop_file, "/", 0), filepath_length1 = _vala_array_length (_tmp2_), _filepath_size_ = filepath_length1, _tmp3_);
- uid = (_tmp4_ = g_strconcat ("app-", filepath[filepath_length1 - 1], NULL), _g_free0 (uid), _tmp4_);
- filepath = (_vala_array_free (filepath, filepath_length1, (GDestroyNotify) g_free), NULL);
- }
if (is_sticky) {
- unity_favorites_set_string (favorites, uid, "type", "application");
- unity_favorites_set_string (favorites, uid, "desktop_file", self->priv->_desktop_file);
- unity_favorites_add_favorite (favorites, uid);
+ unity_favorites_set_string (favorites, unity_launcher_application_controller_get_fav_id (self), "type", "application");
+ unity_favorites_set_string (favorites, unity_launcher_application_controller_get_fav_id (self), "desktop_file", self->priv->_desktop_file);
+ unity_favorites_add_favorite (favorites, unity_launcher_application_controller_get_fav_id (self));
} else {
- unity_favorites_remove_favorite (favorites, uid);
+ unity_favorites_remove_favorite (favorites, unity_launcher_application_controller_get_fav_id (self));
}
- _g_free0 (uid);
_g_object_unref0 (favorites);
}
@@ -403,8 +387,6 @@ gboolean unity_launcher_application_controller_is_sticky (UnityLauncherApplicati
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
UnityFavorites* favorites;
- char* uid;
- gboolean _tmp1_ = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
if (_vala_strcmp0 (self->priv->_desktop_file, "") == 0) {
_tmp0_ = TRUE;
@@ -416,25 +398,9 @@ gboolean unity_launcher_application_controller_is_sticky (UnityLauncherApplicati
return result;
}
favorites = unity_favorites_get_default ();
- uid = unity_favorites_find_uid_for_desktop_file (favorites, self->priv->_desktop_file);
- if (uid == NULL) {
- _tmp1_ = TRUE;
- } else {
- _tmp1_ = _vala_strcmp0 (uid, "") == 0;
- }
- if (_tmp1_) {
- result = FALSE;
- _g_free0 (uid);
- _g_object_unref0 (favorites);
- return result;
- } else {
- result = TRUE;
- _g_free0 (uid);
- _g_object_unref0 (favorites);
- return result;
- }
- _g_free0 (uid);
+ result = unity_favorites_is_favorite (favorites, unity_launcher_application_controller_get_fav_id (self));
_g_object_unref0 (favorites);
+ return result;
}
@@ -451,9 +417,6 @@ void unity_launcher_application_controller_close_windows (UnityLauncherApplicati
void unity_launcher_application_controller_set_priority (UnityLauncherApplicationController* self, float priority) {
gboolean _tmp0_ = FALSE;
- char* _tmp1_;
- char* _tmp2_;
- char* uid;
UnityFavorites* favorites;
g_return_if_fail (self != NULL);
if (_vala_strcmp0 (self->priv->_desktop_file, "") == 0) {
@@ -464,23 +427,18 @@ void unity_launcher_application_controller_set_priority (UnityLauncherApplicatio
if (_tmp0_) {
return;
}
- uid = (_tmp2_ = g_strconcat ("app-", _tmp1_ = g_path_get_basename (self->priv->_desktop_file), NULL), _g_free0 (_tmp1_), _tmp2_);
favorites = unity_favorites_get_default ();
- unity_favorites_set_float (favorites, uid, "priority", priority);
+ unity_favorites_set_float (favorites, unity_launcher_application_controller_get_fav_id (self), "priority", priority);
_g_object_unref0 (favorites);
- _g_free0 (uid);
}
float unity_launcher_application_controller_get_priority (UnityLauncherApplicationController* self, GError** error) {
float result = 0.0F;
gboolean _tmp0_ = FALSE;
- char* _tmp1_;
- char* _tmp2_;
- char* uid;
UnityFavorites* favorites;
- float* _tmp3_;
- float _tmp4_;
+ float* _tmp1_;
+ float _tmp2_;
GError * _inner_error_ = NULL;
g_return_val_if_fail (self != NULL, 0.0F);
if (_vala_strcmp0 (self->priv->_desktop_file, "") == 0) {
@@ -501,30 +459,21 @@ float unity_launcher_application_controller_get_priority (UnityLauncherApplicati
}
}
}
- uid = (_tmp2_ = g_strconcat ("app-", _tmp1_ = g_path_get_basename (self->priv->_desktop_file), NULL), _g_free0 (_tmp1_), _tmp2_);
favorites = unity_favorites_get_default ();
- result = (_tmp4_ = *(_tmp3_ = unity_favorites_get_float (favorites, uid, "priority")), _g_free0 (_tmp3_), _tmp4_);
+ result = (_tmp2_ = *(_tmp1_ = unity_favorites_get_float (favorites, unity_launcher_application_controller_get_fav_id (self), "priority")), _g_free0 (_tmp1_), _tmp2_);
_g_object_unref0 (favorites);
- _g_free0 (uid);
return result;
_g_object_unref0 (favorites);
- _g_free0 (uid);
}
static void unity_launcher_application_controller_on_favorite_added (UnityLauncherApplicationController* self, const char* uid) {
- UnityFavorites* favorites;
- char* desktop_filename;
g_return_if_fail (self != NULL);
g_return_if_fail (uid != NULL);
- favorites = unity_favorites_get_default ();
- desktop_filename = unity_favorites_get_string (favorites, uid, "desktop_file");
- if (_vala_strcmp0 (desktop_filename, self->priv->_desktop_file) == 0) {
+ if (_vala_strcmp0 (uid, unity_launcher_application_controller_get_fav_id (self)) == 0) {
self->is_favorite = TRUE;
unity_launcher_scroller_child_controller_get_child ((UnityLauncherScrollerChildController*) self)->pin_type = UNITY_LAUNCHER_PIN_TYPE_PINNED;
}
- _g_free0 (desktop_filename);
- _g_object_unref0 (favorites);
}
@@ -538,22 +487,16 @@ static gboolean string_contains (const char* self, const char* needle) {
static void unity_launcher_application_controller_on_favorite_removed (UnityLauncherApplicationController* self, const char* uid) {
- UnityFavorites* favorites;
- char* desktop_filename;
g_return_if_fail (self != NULL);
g_return_if_fail (uid != NULL);
- favorites = unity_favorites_get_default ();
- desktop_filename = unity_favorites_get_string (favorites, uid, "desktop_file");
- if (_vala_strcmp0 (desktop_filename, self->priv->_desktop_file) == 0) {
+ if (_vala_strcmp0 (uid, unity_launcher_application_controller_get_fav_id (self)) == 0) {
self->is_favorite = FALSE;
unity_launcher_scroller_child_controller_get_child ((UnityLauncherScrollerChildController*) self)->pin_type = UNITY_LAUNCHER_PIN_TYPE_UNPINNED;
unity_launcher_application_controller_closed (self);
- if (string_contains (desktop_filename, ".local")) {
- g_remove (desktop_filename);
+ if (string_contains (self->priv->_desktop_file, ".local")) {
+ g_remove (self->priv->_desktop_file);
}
}
- _g_free0 (desktop_filename);
- _g_object_unref0 (favorites);
}
@@ -619,7 +562,7 @@ static void _lambda77_ (Block6Data* _data6_) {
self->priv->cached_menu = (_tmp0_ = _g_object_ref0 (_data8_->menu), _g_object_unref0 (self->priv->cached_menu), _tmp0_);
if (DBUSMENU_IS_MENUITEM (_data8_->menu) == FALSE) {
char* _tmp1_;
- g_warning ("application-controller.vala:201: %s", _tmp1_ = g_strconcat ("Didn't get a menu for path: ", string_to_string (_data6_->path), " - address: ", string_to_string (_data6_->remote_address), NULL));
+ g_warning ("application-controller.vala:198: %s", _tmp1_ = g_strconcat ("Didn't get a menu for path: ", string_to_string (_data6_->path), " - address: ", string_to_string (_data6_->remote_address), NULL));
_g_free0 (_tmp1_);
}
menu_items = dbusmenu_menuitem_get_children (_data8_->menu);
@@ -987,7 +930,7 @@ static void unity_launcher_application_controller_real_activate (UnityLauncherSc
e = _inner_error_;
_inner_error_ = NULL;
{
- g_warning ("application-controller.vala:388: %s", e->message);
+ g_warning ("application-controller.vala:385: %s", e->message);
_g_error_free0 (e);
}
}
@@ -1071,7 +1014,7 @@ void unity_launcher_application_controller_attach_application (UnityLauncherAppl
}
if (_tmp3_) {
char* _tmp4_;
- g_warning ("application-controller.vala:416: %s", _tmp4_ = g_strconcat ("Bamf returned null for app.get_name (): ", string_to_string (self->priv->_desktop_file), NULL));
+ g_warning ("application-controller.vala:413: %s", _tmp4_ = g_strconcat ("Bamf returned null for app.get_name (): ", string_to_string (self->priv->_desktop_file), NULL));
_g_free0 (_tmp4_);
}
self->priv->icon_name = (_tmp5_ = bamf_view_get_icon ((BamfView*) self->priv->app), _g_free0 (self->priv->icon_name), _tmp5_);
@@ -1149,7 +1092,7 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL
e = _inner_error_;
_inner_error_ = NULL;
{
- g_warning ("application-controller.vala:468: could not load desktop file: %s", e->message);
+ g_warning ("application-controller.vala:465: could not load desktop file: %s", e->message);
_g_error_free0 (e);
}
}
@@ -1176,7 +1119,7 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL
e = _inner_error_;
_inner_error_ = NULL;
{
- g_warning ("application-controller.vala:478: could not load icon name from desktop" \
+ g_warning ("application-controller.vala:475: could not load icon name from desktop" \
" file: %s", e->message);
_g_error_free0 (e);
}
@@ -1204,7 +1147,7 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL
e = _inner_error_;
_inner_error_ = NULL;
{
- g_warning ("application-controller.vala:487: could not load name from desktop file" \
+ g_warning ("application-controller.vala:484: could not load name from desktop file" \
": %s", e->message);
_g_error_free0 (e);
}
@@ -1260,6 +1203,51 @@ static void unity_launcher_application_controller_set_desktop_file (UnityLaunche
}
+const char* unity_launcher_application_controller_get_fav_id (UnityLauncherApplicationController* self) {
+ const char* result;
+ gboolean _tmp0_ = FALSE;
+ g_return_val_if_fail (self != NULL, NULL);
+ if (_vala_strcmp0 (self->priv->_fav_id, "") == 0) {
+ _tmp0_ = TRUE;
+ } else {
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ if (self->priv->_fav_id == NULL) {
+ _tmp2_ = _vala_strcmp0 (self->priv->_desktop_file, "") != 0;
+ } else {
+ _tmp2_ = FALSE;
+ }
+ if (_tmp2_) {
+ _tmp1_ = self->priv->_desktop_file != NULL;
+ } else {
+ _tmp1_ = FALSE;
+ }
+ _tmp0_ = _tmp1_;
+ }
+ if (_tmp0_) {
+ gint filepath_length1;
+ gint _filepath_size_;
+ char** _tmp4_;
+ char** _tmp3_;
+ char** filepath;
+ char* _tmp5_;
+ filepath = (_tmp4_ = _tmp3_ = g_strsplit (self->priv->_desktop_file, "/", 0), filepath_length1 = _vala_array_length (_tmp3_), _filepath_size_ = filepath_length1, _tmp4_);
+ self->priv->_fav_id = (_tmp5_ = g_strconcat ("app-", filepath[filepath_length1 - 1], NULL), _g_free0 (self->priv->_fav_id), _tmp5_);
+ filepath = (_vala_array_free (filepath, filepath_length1, (GDestroyNotify) g_free), NULL);
+ }
+ result = self->priv->_fav_id;
+ return result;
+}
+
+
+void unity_launcher_application_controller_set_fav_id (UnityLauncherApplicationController* self, const char* value) {
+ char* _tmp0_;
+ g_return_if_fail (self != NULL);
+ self->priv->_fav_id = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_fav_id), _tmp0_);
+ g_object_notify ((GObject *) self, "fav-id");
+}
+
+
static void _unity_launcher_application_controller_on_favorite_added_unity_favorites_favorite_added (UnityFavorites* _sender, const char* uid, gpointer self) {
unity_launcher_application_controller_on_favorite_added (self, uid);
}
@@ -1305,12 +1293,14 @@ static void unity_launcher_application_controller_class_init (UnityLauncherAppli
G_OBJECT_CLASS (klass)->constructor = unity_launcher_application_controller_constructor;
G_OBJECT_CLASS (klass)->finalize = unity_launcher_application_controller_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_APPLICATION_CONTROLLER_DESKTOP_FILE, g_param_spec_string ("desktop-file", "desktop-file", "desktop-file", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_APPLICATION_CONTROLLER_FAV_ID, g_param_spec_string ("fav-id", "fav-id", "fav-id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}
static void unity_launcher_application_controller_instance_init (UnityLauncherApplicationController * self) {
self->priv = UNITY_LAUNCHER_APPLICATION_CONTROLLER_GET_PRIVATE (self);
self->priv->app = NULL;
+ self->priv->_fav_id = g_strdup ("");
self->is_favorite = FALSE;
}
@@ -1326,6 +1316,7 @@ static void unity_launcher_application_controller_finalize (GObject* obj) {
_g_object_unref0 (self->priv->app);
_g_object_unref0 (self->priv->menu_client);
_g_object_unref0 (self->priv->cached_menu);
+ _g_free0 (self->priv->_fav_id);
G_OBJECT_CLASS (unity_launcher_application_controller_parent_class)->finalize (obj);
}
@@ -1349,6 +1340,9 @@ static void unity_launcher_application_controller_get_property (GObject * object
case UNITY_LAUNCHER_APPLICATION_CONTROLLER_DESKTOP_FILE:
g_value_set_string (value, unity_launcher_application_controller_get_desktop_file (self));
break;
+ case UNITY_LAUNCHER_APPLICATION_CONTROLLER_FAV_ID:
+ g_value_set_string (value, unity_launcher_application_controller_get_fav_id (self));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -1363,6 +1357,9 @@ static void unity_launcher_application_controller_set_property (GObject * object
case UNITY_LAUNCHER_APPLICATION_CONTROLLER_DESKTOP_FILE:
unity_launcher_application_controller_set_desktop_file (self, g_value_get_string (value));
break;
+ case UNITY_LAUNCHER_APPLICATION_CONTROLLER_FAV_ID:
+ unity_launcher_application_controller_set_fav_id (self, g_value_get_string (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
diff --git a/unity-private/launcher/application-controller.vala b/unity-private/launcher/application-controller.vala
index 7b79082c0..4d264a3b3 100644
--- a/unity-private/launcher/application-controller.vala
+++ b/unity-private/launcher/application-controller.vala
@@ -37,6 +37,20 @@ namespace Unity.Launcher
private Dbusmenu.Client menu_client;
private Dbusmenu.Menuitem cached_menu;
private int menu_items_realized_counter;
+ private string _fav_id = "";
+ public string fav_id {
+ get
+ {
+ if (_fav_id == "" || _fav_id == null &&
+ desktop_file != "" && desktop_file != null)
+ {
+ var filepath = desktop_file.split ("/");
+ _fav_id = "app-" + filepath[filepath.length - 1];
+ }
+ return _fav_id;
+ }
+ set { _fav_id = value; }
+ }
public bool is_favorite = false;
@@ -90,22 +104,15 @@ namespace Unity.Launcher
var favorites = Unity.Favorites.get_default ();
- string uid = favorites.find_uid_for_desktop_file (desktop_file);
- if (uid == "" || uid == null)
- {
- var filepath = desktop_file.split ("/");
- uid = "app-" + filepath[filepath.length - 1];
- }
-
if (is_sticky)
{
- favorites.set_string (uid, "type", "application");
- favorites.set_string (uid, "desktop_file", desktop_file);
- favorites.add_favorite (uid);
+ favorites.set_string (fav_id, "type", "application");
+ favorites.set_string (fav_id, "desktop_file", desktop_file);
+ favorites.add_favorite (fav_id);
}
else
{
- favorites.remove_favorite (uid);
+ favorites.remove_favorite (fav_id);
}
}
@@ -115,11 +122,7 @@ namespace Unity.Launcher
return false;
var favorites = Unity.Favorites.get_default ();
- string uid = favorites.find_uid_for_desktop_file (desktop_file);
- if (uid == null || uid == "")
- return false;
- else
- return true;
+ return favorites.is_favorite (fav_id);
}
public void close_windows ()
@@ -136,9 +139,8 @@ namespace Unity.Launcher
if (desktop_file == "" || desktop_file == null)
return;
- string uid = "app-" + Path.get_basename (desktop_file);
var favorites = Unity.Favorites.get_default ();
- favorites.set_float (uid, "priority", priority);
+ favorites.set_float (fav_id, "priority", priority);
}
public float get_priority () throws AppTypeError
@@ -146,17 +148,14 @@ namespace Unity.Launcher
if (desktop_file == "" || desktop_file == null)
throw new AppTypeError.NO_DESKTOP_FILE("There is no desktop file for this app, can't get priority");
- string uid = "app-" + Path.get_basename (desktop_file);
var favorites = Unity.Favorites.get_default ();
- return favorites.get_float (uid, "priority");
+ return favorites.get_float (fav_id, "priority");
}
private void on_favorite_added (string uid)
{
//check to see if we are the favorite
- var favorites = Unity.Favorites.get_default ();
- var desktop_filename = favorites.get_string (uid, "desktop_file");
- if (desktop_filename == desktop_file)
+ if (uid == fav_id)
{
is_favorite = true;
child.pin_type = PinType.PINNED;
@@ -165,15 +164,13 @@ namespace Unity.Launcher
private void on_favorite_removed (string uid)
{
- var favorites = Unity.Favorites.get_default ();
- var desktop_filename = favorites.get_string (uid, "desktop_file");
- if (desktop_filename == desktop_file)
+ if (uid == fav_id)
{
is_favorite = false;
child.pin_type = PinType.UNPINNED;
closed ();
- if (".local" in desktop_filename)
- FileUtils.remove (desktop_filename);
+ if (".local" in desktop_file)
+ FileUtils.remove (desktop_file);
}
}
diff --git a/unity-private/launcher/launcher.c b/unity-private/launcher/launcher.c
index 4a4051c49..bb6dc8c5c 100644
--- a/unity-private/launcher/launcher.c
+++ b/unity-private/launcher/launcher.c
@@ -1,4 +1,4 @@
-/* launcher.c generated by valac 0.9.8, the Vala compiler
+/* launcher.c generated by valac 0.10.0, the Vala compiler
* generated from launcher.vala, do not modify */
/*
diff --git a/unity-private/launcher/quicklist-check-menu-item.c b/unity-private/launcher/quicklist-check-menu-item.c
index f645e96b7..610f4ef90 100644
--- a/unity-private/launcher/quicklist-check-menu-item.c
+++ b/unity-private/launcher/quicklist-check-menu-item.c
@@ -1,4 +1,4 @@
-/* quicklist-check-menu-item.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-check-menu-item.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-check-menu-item.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/launcher/quicklist-controller.c b/unity-private/launcher/quicklist-controller.c
index 4262d7adb..a15bbebe0 100644
--- a/unity-private/launcher/quicklist-controller.c
+++ b/unity-private/launcher/quicklist-controller.c
@@ -1,4 +1,4 @@
-/* quicklist-controller.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-controller.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-controller.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/launcher/quicklist-image-menu-item.c b/unity-private/launcher/quicklist-image-menu-item.c
index 53e219d7b..b02180804 100644
--- a/unity-private/launcher/quicklist-image-menu-item.c
+++ b/unity-private/launcher/quicklist-image-menu-item.c
@@ -1,4 +1,4 @@
-/* quicklist-image-menu-item.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-image-menu-item.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-image-menu-item.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/launcher/quicklist-menu-item.c b/unity-private/launcher/quicklist-menu-item.c
index dcbe79ff5..e316a32f1 100644
--- a/unity-private/launcher/quicklist-menu-item.c
+++ b/unity-private/launcher/quicklist-menu-item.c
@@ -1,4 +1,4 @@
-/* quicklist-menu-item.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-menu-item.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-menu-item.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/launcher/quicklist-radio-menu-item.c b/unity-private/launcher/quicklist-radio-menu-item.c
index 5afcf79aa..7031f9b78 100644
--- a/unity-private/launcher/quicklist-radio-menu-item.c
+++ b/unity-private/launcher/quicklist-radio-menu-item.c
@@ -1,4 +1,4 @@
-/* quicklist-radio-menu-item.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-radio-menu-item.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-radio-menu-item.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/launcher/quicklist-seperator-menu-item.c b/unity-private/launcher/quicklist-seperator-menu-item.c
index d55e02316..28bfcaaec 100644
--- a/unity-private/launcher/quicklist-seperator-menu-item.c
+++ b/unity-private/launcher/quicklist-seperator-menu-item.c
@@ -1,4 +1,4 @@
-/* quicklist-seperator-menu-item.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-seperator-menu-item.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-seperator-menu-item.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/launcher/quicklist-view.c b/unity-private/launcher/quicklist-view.c
index 65f6de7de..34b847823 100644
--- a/unity-private/launcher/quicklist-view.c
+++ b/unity-private/launcher/quicklist-view.c
@@ -1,4 +1,4 @@
-/* quicklist-view.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-view.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-view.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/launcher/scroller-controller.c b/unity-private/launcher/scroller-controller.c
index 549749a4c..f5d99aa95 100644
--- a/unity-private/launcher/scroller-controller.c
+++ b/unity-private/launcher/scroller-controller.c
@@ -1,4 +1,4 @@
-/* scroller-controller.c generated by valac 0.9.8, the Vala compiler
+/* scroller-controller.c generated by valac 0.10.0, the Vala compiler
* generated from scroller-controller.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
@@ -291,6 +291,7 @@ static void unity_launcher_scroller_controller_build_favorites (UnityLauncherScr
static void unity_launcher_scroller_controller_model_order_changed (UnityLauncherScrollerController* self);
static void _unity_launcher_scroller_controller_model_order_changed_unity_launcher_scroller_model_order_changed (UnityLauncherScrollerModel* _sender, gpointer self);
static void _vala_array_add1 (char*** array, int* length, int* size, char* value);
+void unity_launcher_application_controller_set_fav_id (UnityLauncherApplicationController* self, const char* value);
void unity_launcher_scroller_model_sort (UnityLauncherScrollerModel* self, GCompareFunc compare);
static void unity_launcher_scroller_controller_on_favorite_added (UnityLauncherScrollerController* self, const char* uid);
const char* unity_launcher_application_controller_get_desktop_file (UnityLauncherApplicationController* self);
@@ -683,23 +684,15 @@ static void unity_launcher_scroller_controller_build_favorites (UnityLauncherScr
_uid_it = (_tmp4_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) (_tmp3_ = unity_favorites_get_favorites (self->priv->favorites))), _g_object_unref0 (_tmp3_), _tmp4_);
while (TRUE) {
char* uid;
- char* type;
char* desktop_file;
UnityLauncherApplicationController* controller;
if (!gee_iterator_next (_uid_it)) {
break;
}
uid = (char*) gee_iterator_get (_uid_it);
- type = unity_favorites_get_string (self->priv->favorites, uid, "type");
- if (_vala_strcmp0 (type, "application") != 0) {
- _g_free0 (type);
- _g_free0 (uid);
- continue;
- }
desktop_file = unity_favorites_get_string (self->priv->favorites, uid, "desktop_file");
if (!g_file_test (desktop_file, G_FILE_TEST_EXISTS)) {
_g_free0 (desktop_file);
- _g_free0 (type);
_g_free0 (uid);
continue;
}
@@ -715,9 +708,9 @@ static void unity_launcher_scroller_controller_build_favorites (UnityLauncherScr
g_signal_connect_object ((UnityLauncherScrollerChildController*) controller, "request-removal", (GCallback) _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_request_removal, self, 0);
_g_object_unref0 (child);
}
+ unity_launcher_application_controller_set_fav_id (controller, uid);
_g_object_unref0 (controller);
_g_free0 (desktop_file);
- _g_free0 (type);
_g_free0 (uid);
}
_g_object_unref0 (_uid_it);
diff --git a/unity-private/launcher/scroller-controller.vala b/unity-private/launcher/scroller-controller.vala
index 380d14f87..7c62f3a9b 100644
--- a/unity-private/launcher/scroller-controller.vala
+++ b/unity-private/launcher/scroller-controller.vala
@@ -218,10 +218,6 @@ namespace Unity.Launcher
foreach (string uid in favorites.get_favorites ())
{
- var type = favorites.get_string (uid, "type");
- if (type != "application")
- continue;
-
string desktop_file = favorites.get_string (uid, "desktop_file");
if (!FileUtils.test (desktop_file, FileTest.EXISTS))
{
@@ -240,6 +236,7 @@ namespace Unity.Launcher
childcontrollers.add (controller);
controller.request_removal.connect (on_scroller_controller_closed);
}
+ controller.fav_id = uid;
}
// need to sort the list now
diff --git a/unity-private/launcher/scroller-model.c b/unity-private/launcher/scroller-model.c
index de359b483..3bee32d8c 100644
--- a/unity-private/launcher/scroller-model.c
+++ b/unity-private/launcher/scroller-model.c
@@ -1,4 +1,4 @@
-/* scroller-model.c generated by valac 0.9.8, the Vala compiler
+/* scroller-model.c generated by valac 0.10.0, the Vala compiler
* generated from scroller-model.vala, do not modify */
/*
diff --git a/unity-private/launcher/scroller-view.c b/unity-private/launcher/scroller-view.c
index a3c74f3a7..be1f3bcb4 100644
--- a/unity-private/launcher/scroller-view.c
+++ b/unity-private/launcher/scroller-view.c
@@ -1,4 +1,4 @@
-/* scroller-view.c generated by valac 0.9.8, the Vala compiler
+/* scroller-view.c generated by valac 0.10.0, the Vala compiler
* generated from scroller-view.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
@@ -32,8 +32,10 @@
#include <string.h>
#include <cairo.h>
#include <stdlib.h>
-#include <gtk/gtk.h>
+#include <pango/pangocairo.h>
#include <pango/pango.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
#include <cogl/cogl.h>
#include <gobject/gvaluecollector.h>
@@ -1259,14 +1261,18 @@ static void unity_launcher_scroller_view_draw_keyboard_indicator_cairo (UnityLau
double w;
double h;
double r;
+ PangoLayout* layout;
GtkSettings* settings;
char* _tmp0_ = NULL;
char* _tmp1_;
PangoFontDescription* _tmp2_;
PangoFontDescription* desc;
- double size = 0.0;
- cairo_text_extents_t extents = {0};
- cairo_text_extents_t real_extents = {0};
+ PangoContext* pango_context;
+ GdkScreen* screen;
+ gint _tmp3_;
+ gint text_width = 0;
+ gint text_height = 0;
+ PangoRectangle log_rect = {0};
g_return_if_fail (self != NULL);
g_return_if_fail (cr != NULL);
g_return_if_fail (text != NULL);
@@ -1274,18 +1280,23 @@ static void unity_launcher_scroller_view_draw_keyboard_indicator_cairo (UnityLau
y = (double) 0;
w = (double) 10;
h = (double) 10;
- r = ctk_em_to_pixel ((double) 1);
+ r = ctk_em_to_pixel ((double) 0.7f);
+ layout = pango_cairo_create_layout (cr);
settings = _g_object_ref0 (gtk_settings_get_default ());
desc = (_tmp2_ = pango_font_description_from_string (_tmp1_ = (g_object_get (settings, "gtk-font-name", &_tmp0_, NULL), _tmp0_)), _g_free0 (_tmp1_), _tmp2_);
- cairo_select_font_face (cr, pango_font_description_get_family (desc), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
- size = ctk_em_to_pixel ((double) 1) * 0.9;
- cairo_set_font_size (cr, size);
- memset (&extents, 0, sizeof (cairo_text_extents_t));
- cairo_text_extents (cr, "2", &extents);
- memset (&real_extents, 0, sizeof (cairo_text_extents_t));
- cairo_text_extents (cr, text, &extents);
- w = w + extents.width;
- h = h + extents.height;
+ pango_font_description_set_weight (desc, PANGO_WEIGHT_NORMAL);
+ pango_layout_set_font_description (layout, desc);
+ pango_layout_set_text (layout, text, -1);
+ pango_context = _g_object_ref0 (pango_layout_get_context (layout));
+ screen = _g_object_ref0 (gdk_screen_get_default ());
+ pango_cairo_context_set_font_options (pango_context, gdk_screen_get_font_options (screen));
+ pango_cairo_context_set_resolution (pango_context, (double) (((float) (g_object_get (settings, "gtk-xft-dpi", &_tmp3_, NULL), _tmp3_)) / ((float) PANGO_SCALE)));
+ pango_layout_context_changed (layout);
+ pango_layout_get_extents (layout, NULL, &log_rect);
+ text_width = log_rect.width / PANGO_SCALE;
+ text_height = log_rect.height / PANGO_SCALE;
+ w = w + ((double) text_width);
+ h = h + ((double) text_height);
cairo_set_source_rgba (cr, 0.07, 0.07, 0.07, 0.8);
cairo_move_to (cr, x + r, y);
cairo_line_to (cr, (x + w) - r, y);
@@ -1297,12 +1308,14 @@ static void unity_launcher_scroller_view_draw_keyboard_indicator_cairo (UnityLau
cairo_line_to (cr, x, y + r);
cairo_curve_to (cr, x, y, x, y, x + r, y);
cairo_fill (cr);
- y = (double) 0;
cairo_set_source_rgba (cr, (double) 1, (double) 1, (double) 1, (double) 1);
- cairo_move_to (cr, (x + 5) - (real_extents.width * 0.5), (y + 5) + extents.height);
- cairo_show_text (cr, text);
+ cairo_move_to (cr, x + ((w - text_width) * 0.5), y + ((h - text_height) * 0.5));
+ pango_cairo_show_layout (cr, layout);
+ _g_object_unref0 (screen);
+ _g_object_unref0 (pango_context);
_pango_font_description_free0 (desc);
_g_object_unref0 (settings);
+ _g_object_unref0 (layout);
}
diff --git a/unity-private/launcher/scroller-view.vala b/unity-private/launcher/scroller-view.vala
index 28dc8625f..fc6b7e1d5 100644
--- a/unity-private/launcher/scroller-view.vala
+++ b/unity-private/launcher/scroller-view.vala
@@ -592,27 +592,31 @@ namespace Unity.Launcher
double y = 0;
double w = 10;
double h = 10;
- double r = Ctk.em_to_pixel (1);
+ double r = Ctk.em_to_pixel (0.7f);
+ Pango.Layout layout = Pango.cairo_create_layout (cr);
Gtk.Settings settings = Gtk.Settings.get_default ();
Pango.FontDescription desc = Pango.FontDescription.from_string (settings.gtk_font_name);
-
- cr.select_font_face (desc.get_family (),
- Cairo.FontSlant.NORMAL,
- Cairo.FontWeight.NORMAL);
- double size;
- size = Ctk.em_to_pixel (1) * 0.9;
- cr.set_font_size (size);
-
-
- Cairo.TextExtents extents = Cairo.TextExtents ();
- cr.text_extents ("2", out extents);
-
- Cairo.TextExtents real_extents = Cairo.TextExtents ();
- cr.text_extents (text, out extents);
-
- w += extents.width;
- h += extents.height;
+ desc.set_weight (Pango.Weight.NORMAL);
+ layout.set_font_description (desc);
+ layout.set_text (text, -1);
+ Pango.Context pango_context = layout.get_context ();
+ Gdk.Screen screen = Gdk.Screen.get_default ();
+ Pango.cairo_context_set_font_options (pango_context,
+ screen.get_font_options ());
+ Pango.cairo_context_set_resolution (pango_context,
+ (float) settings.gtk_xft_dpi /
+ (float) Pango.SCALE);
+ layout.context_changed ();
+ int text_width;
+ int text_height;
+ Pango.Rectangle log_rect;
+ layout.get_extents (null, out log_rect);
+ text_width = log_rect.width / Pango.SCALE;
+ text_height = log_rect.height / Pango.SCALE;
+
+ w += text_width;
+ h += text_height;
cr.set_source_rgba (0.07, 0.07, 0.07, 0.8);
cr.move_to(x+r,y); // Move to A
@@ -627,11 +631,12 @@ namespace Unity.Launcher
cr.fill ();
- //x = (extents.width - real_extents.width) / 2.0;
- y = 0;//(extents.height - real_extents.height) / 2.0;
cr.set_source_rgba (1, 1, 1, 1);
- cr.move_to (x + 5 - (real_extents.width * 0.5), y+5+extents.height);
- cr.show_text (text);
+
+ // draw text
+ cr.move_to (x + (w - text_width) * 0.5,
+ y + (h - text_height) * 0.5);
+ Pango.cairo_show_layout (cr, layout);
}
/*
diff --git a/unity-private/launcher/scrollerchild-controller.c b/unity-private/launcher/scrollerchild-controller.c
index 230550335..a2a99bdd3 100644
--- a/unity-private/launcher/scrollerchild-controller.c
+++ b/unity-private/launcher/scrollerchild-controller.c
@@ -1,4 +1,4 @@
-/* scrollerchild-controller.c generated by valac 0.9.8, the Vala compiler
+/* scrollerchild-controller.c generated by valac 0.10.0, the Vala compiler
* generated from scrollerchild-controller.vala, do not modify */
/*
diff --git a/unity-private/launcher/scrollerchild.c b/unity-private/launcher/scrollerchild.c
index bc1563734..5de7713cf 100644
--- a/unity-private/launcher/scrollerchild.c
+++ b/unity-private/launcher/scrollerchild.c
@@ -1,4 +1,4 @@
-/* scrollerchild.c generated by valac 0.9.8, the Vala compiler
+/* scrollerchild.c generated by valac 0.10.0, the Vala compiler
* generated from scrollerchild.vala, do not modify */
/*
diff --git a/unity-private/panel/panel-background.c b/unity-private/panel/panel-background.c
index 230e5fb40..7f6b03514 100644
--- a/unity-private/panel/panel-background.c
+++ b/unity-private/panel/panel-background.c
@@ -1,4 +1,4 @@
-/* panel-background.c generated by valac 0.9.8, the Vala compiler
+/* panel-background.c generated by valac 0.10.0, the Vala compiler
* generated from panel-background.vala, do not modify */
/*
diff --git a/unity-private/panel/panel-divider.c b/unity-private/panel/panel-divider.c
index a04c5f2de..321c01045 100644
--- a/unity-private/panel/panel-divider.c
+++ b/unity-private/panel/panel-divider.c
@@ -1,4 +1,4 @@
-/* panel-divider.c generated by valac 0.9.8, the Vala compiler
+/* panel-divider.c generated by valac 0.10.0, the Vala compiler
* generated from panel-divider.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/panel/panel-home-button.c b/unity-private/panel/panel-home-button.c
index ff9b4b494..6bb036cdd 100644
--- a/unity-private/panel/panel-home-button.c
+++ b/unity-private/panel/panel-home-button.c
@@ -1,4 +1,4 @@
-/* panel-home-button.c generated by valac 0.9.8, the Vala compiler
+/* panel-home-button.c generated by valac 0.10.0, the Vala compiler
* generated from panel-home-button.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
@@ -302,7 +302,7 @@ static GObject * unity_panel_home_button_constructor (GType type, guint n_constr
CtkEffectGlow* _tmp1_;
ClutterColor _tmp2_ = {0};
ClutterColor _tmp3_;
- self->priv->theme_image = (_tmp0_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) 22, "/usr/share/icons/unity-icon-theme/places/22/distributor-logo.png")), _g_object_unref0 (self->priv->theme_image), _tmp0_);
+ self->priv->theme_image = (_tmp0_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) 24, "/usr/share/icons/unity-icon-theme/places/24/distributor-logo.png")), _g_object_unref0 (self->priv->theme_image), _tmp0_);
clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->theme_image);
clutter_actor_show ((ClutterActor*) self->priv->theme_image);
g_signal_connect_object ((ClutterActor*) self, "motion-event", (GCallback) _unity_panel_home_button_on_motion_event_clutter_actor_motion_event, self, 0);
diff --git a/unity-private/panel/panel-home-button.vala b/unity-private/panel/panel-home-button.vala
index cf1b5e8ca..ce5b37da0 100644
--- a/unity-private/panel/panel-home-button.vala
+++ b/unity-private/panel/panel-home-button.vala
@@ -39,7 +39,7 @@ namespace Unity.Panel
construct
{
- theme_image = new Ctk.Image.from_filename (22, "/usr/share/icons/unity-icon-theme/places/22/distributor-logo.png");
+ theme_image = new Ctk.Image.from_filename (24, "/usr/share/icons/unity-icon-theme/places/24/distributor-logo.png");
add_actor (theme_image);
theme_image.show ();
diff --git a/unity-private/panel/panel-indicator-background.c b/unity-private/panel/panel-indicator-background.c
index 9ba02c2b8..231af7551 100644
--- a/unity-private/panel/panel-indicator-background.c
+++ b/unity-private/panel/panel-indicator-background.c
@@ -1,4 +1,4 @@
-/* panel-indicator-background.c generated by valac 0.9.8, the Vala compiler
+/* panel-indicator-background.c generated by valac 0.10.0, the Vala compiler
* generated from panel-indicator-background.vala, do not modify */
/*
diff --git a/unity-private/panel/panel-indicator-bar.c b/unity-private/panel/panel-indicator-bar.c
index 7db244db0..e4d490859 100644
--- a/unity-private/panel/panel-indicator-bar.c
+++ b/unity-private/panel/panel-indicator-bar.c
@@ -1,4 +1,4 @@
-/* panel-indicator-bar.c generated by valac 0.9.8, the Vala compiler
+/* panel-indicator-bar.c generated by valac 0.10.0, the Vala compiler
* generated from panel-indicator-bar.vala, do not modify */
/*
diff --git a/unity-private/panel/panel-indicator-model.c b/unity-private/panel/panel-indicator-model.c
index cea309ebd..d83221955 100644
--- a/unity-private/panel/panel-indicator-model.c
+++ b/unity-private/panel/panel-indicator-model.c
@@ -1,4 +1,4 @@
-/* panel-indicator-model.c generated by valac 0.9.8, the Vala compiler
+/* panel-indicator-model.c generated by valac 0.10.0, the Vala compiler
* generated from panel-indicator-model.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/panel/panel-indicator-object-entry-view.c b/unity-private/panel/panel-indicator-object-entry-view.c
index f9027b673..2ae4a083a 100644
--- a/unity-private/panel/panel-indicator-object-entry-view.c
+++ b/unity-private/panel/panel-indicator-object-entry-view.c
@@ -1,4 +1,4 @@
-/* panel-indicator-object-entry-view.c generated by valac 0.9.8, the Vala compiler
+/* panel-indicator-object-entry-view.c generated by valac 0.10.0, the Vala compiler
* generated from panel-indicator-object-entry-view.vala, do not modify */
/*
diff --git a/unity-private/panel/panel-indicator-object-view.c b/unity-private/panel/panel-indicator-object-view.c
index c10895281..9d25eff6a 100644
--- a/unity-private/panel/panel-indicator-object-view.c
+++ b/unity-private/panel/panel-indicator-object-view.c
@@ -1,4 +1,4 @@
-/* panel-indicator-object-view.c generated by valac 0.9.8, the Vala compiler
+/* panel-indicator-object-view.c generated by valac 0.10.0, the Vala compiler
* generated from panel-indicator-object-view.vala, do not modify */
/*
@@ -290,10 +290,9 @@ static void unity_panel_indicators_indicator_object_view_on_entry_added (UnityPa
static void unity_panel_indicators_indicator_object_view_on_entry_shown (UnityPanelIndicatorsIndicatorObjectView* self, UnityPanelIndicatorsIndicatorObjectEntryView* view) {
- IndicatorObject* _tmp0_;
g_return_if_fail (self != NULL);
g_return_if_fail (view != NULL);
- INDICATOR_OBJECT_GET_CLASS (_tmp0_ = self->priv->_indicator_object)->entry_activate (_tmp0_, unity_panel_indicators_indicator_object_entry_view_get_entry (view), (guint) unity_shell_get_current_time (unity_global_shell));
+ indicator_object_entry_activate (self->priv->_indicator_object, unity_panel_indicators_indicator_object_entry_view_get_entry (view), (guint) unity_shell_get_current_time (unity_global_shell));
}
diff --git a/unity-private/panel/panel-menu-manager.c b/unity-private/panel/panel-menu-manager.c
index a17e7a87a..c38412f5a 100644
--- a/unity-private/panel/panel-menu-manager.c
+++ b/unity-private/panel/panel-menu-manager.c
@@ -1,4 +1,4 @@
-/* panel-menu-manager.c generated by valac 0.9.8, the Vala compiler
+/* panel-menu-manager.c generated by valac 0.10.0, the Vala compiler
* generated from panel-menu-manager.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/panel/panel-menubar.c b/unity-private/panel/panel-menubar.c
index 30484cdf0..5df3112e9 100644
--- a/unity-private/panel/panel-menubar.c
+++ b/unity-private/panel/panel-menubar.c
@@ -1,4 +1,4 @@
-/* panel-menubar.c generated by valac 0.9.8, the Vala compiler
+/* panel-menubar.c generated by valac 0.10.0, the Vala compiler
* generated from panel-menubar.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/panel/panel-tray.c b/unity-private/panel/panel-tray.c
index a352b1cdd..35142f916 100644
--- a/unity-private/panel/panel-tray.c
+++ b/unity-private/panel/panel-tray.c
@@ -1,4 +1,4 @@
-/* panel-tray.c generated by valac 0.9.8, the Vala compiler
+/* panel-tray.c generated by valac 0.10.0, the Vala compiler
* generated from panel-tray.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/panel/panel-view.c b/unity-private/panel/panel-view.c
index 516549fe8..b994d66e9 100644
--- a/unity-private/panel/panel-view.c
+++ b/unity-private/panel/panel-view.c
@@ -1,4 +1,4 @@
-/* panel-view.c generated by valac 0.9.8, the Vala compiler
+/* panel-view.c generated by valac 0.10.0, the Vala compiler
* generated from panel-view.vala, do not modify */
/*
diff --git a/unity-private/panel/panel-window-buttons.c b/unity-private/panel/panel-window-buttons.c
index 15f89ad92..4fb74e02e 100644
--- a/unity-private/panel/panel-window-buttons.c
+++ b/unity-private/panel/panel-window-buttons.c
@@ -1,4 +1,4 @@
-/* panel-window-buttons.c generated by valac 0.9.8, the Vala compiler
+/* panel-window-buttons.c generated by valac 0.10.0, the Vala compiler
* generated from panel-window-buttons.vala, do not modify */
/*
diff --git a/unity-private/places/places-button.c b/unity-private/places/places-button.c
index 88578f72f..2258c5c3c 100644
--- a/unity-private/places/places-button.c
+++ b/unity-private/places/places-button.c
@@ -1,4 +1,4 @@
-/* places-button.c generated by valac 0.9.8, the Vala compiler
+/* places-button.c generated by valac 0.10.0, the Vala compiler
* generated from places-button.vala, do not modify */
/*
diff --git a/unity-private/places/places-controller.c b/unity-private/places/places-controller.c
index bad9bc44c..69d239582 100644
--- a/unity-private/places/places-controller.c
+++ b/unity-private/places/places-controller.c
@@ -1,4 +1,4 @@
-/* places-controller.c generated by valac 0.9.8, the Vala compiler
+/* places-controller.c generated by valac 0.10.0, the Vala compiler
* generated from places-controller.vala, do not modify */
/*
diff --git a/unity-private/places/places-default-renderer-group.c b/unity-private/places/places-default-renderer-group.c
index 500fd6514..fb427a1c6 100644
--- a/unity-private/places/places-default-renderer-group.c
+++ b/unity-private/places/places-default-renderer-group.c
@@ -1,4 +1,4 @@
-/* places-default-renderer-group.c generated by valac 0.9.8, the Vala compiler
+/* places-default-renderer-group.c generated by valac 0.10.0, the Vala compiler
* generated from places-default-renderer-group.vala, do not modify */
/*
diff --git a/unity-private/places/places-default-renderer-tiles.c b/unity-private/places/places-default-renderer-tiles.c
index fb369aaf9..dadbad31a 100644
--- a/unity-private/places/places-default-renderer-tiles.c
+++ b/unity-private/places/places-default-renderer-tiles.c
@@ -1,4 +1,4 @@
-/* places-default-renderer-tiles.c generated by valac 0.9.8, the Vala compiler
+/* places-default-renderer-tiles.c generated by valac 0.10.0, the Vala compiler
* generated from places-default-renderer-tiles.vala, do not modify */
/*
diff --git a/unity-private/places/places-default-renderer.c b/unity-private/places/places-default-renderer.c
index fa23fe52a..180b429b3 100644
--- a/unity-private/places/places-default-renderer.c
+++ b/unity-private/places/places-default-renderer.c
@@ -1,4 +1,4 @@
-/* places-default-renderer.c generated by valac 0.9.8, the Vala compiler
+/* places-default-renderer.c generated by valac 0.10.0, the Vala compiler
* generated from places-default-renderer.vala, do not modify */
/*
diff --git a/unity-private/places/places-folder-browser-renderer.c b/unity-private/places/places-folder-browser-renderer.c
index 735b5a6bf..a23cd7f89 100644
--- a/unity-private/places/places-folder-browser-renderer.c
+++ b/unity-private/places/places-folder-browser-renderer.c
@@ -1,4 +1,4 @@
-/* places-folder-browser-renderer.c generated by valac 0.9.8, the Vala compiler
+/* places-folder-browser-renderer.c generated by valac 0.10.0, the Vala compiler
* generated from places-folder-browser-renderer.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-bar.c b/unity-private/places/places-place-bar.c
index 20d894451..6611994cf 100644
--- a/unity-private/places/places-place-bar.c
+++ b/unity-private/places/places-place-bar.c
@@ -1,4 +1,4 @@
-/* places-place-bar.c generated by valac 0.9.8, the Vala compiler
+/* places-place-bar.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-bar.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-entry-scroller-child.c b/unity-private/places/places-place-entry-scroller-child.c
index d5911e598..94a91cecf 100644
--- a/unity-private/places/places-place-entry-scroller-child.c
+++ b/unity-private/places/places-place-entry-scroller-child.c
@@ -1,4 +1,4 @@
-/* places-place-entry-scroller-child.c generated by valac 0.9.8, the Vala compiler
+/* places-place-entry-scroller-child.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-entry-scroller-child.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-entry-view.c b/unity-private/places/places-place-entry-view.c
index 1fdd78dd6..d0fee102e 100644
--- a/unity-private/places/places-place-entry-view.c
+++ b/unity-private/places/places-place-entry-view.c
@@ -1,4 +1,4 @@
-/* places-place-entry-view.c generated by valac 0.9.8, the Vala compiler
+/* places-place-entry-view.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-entry-view.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-entry.c b/unity-private/places/places-place-entry.c
index fa1e745c4..f5edf1ea9 100644
--- a/unity-private/places/places-place-entry.c
+++ b/unity-private/places/places-place-entry.c
@@ -1,4 +1,4 @@
-/* places-place-entry.c generated by valac 0.9.8, the Vala compiler
+/* places-place-entry.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-entry.vala, do not modify */
/*
@@ -79,13 +79,13 @@ typedef struct _UnityPlacesPlaceEntryDbusClass UnityPlacesPlaceEntryDbusClass;
typedef struct _UnityPlacesPlaceEntryDbusPrivate UnityPlacesPlaceEntryDbusPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL)))
-#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define UNITY_PLACES_PLACE_ENTRY_DBUS_TYPE_RENDERER_INFO (unity_places_place_entry_dbus_renderer_info_get_type ())
typedef struct _UnityPlacesPlaceEntryDbusRendererInfo UnityPlacesPlaceEntryDbusRendererInfo;
#define UNITY_PLACES_PLACE_ENTRY_DBUS_TYPE_PLACE_ENTRY_INFO (unity_places_place_entry_dbus_place_entry_info_get_type ())
typedef struct _UnityPlacesPlaceEntryDbusPlaceEntryInfo UnityPlacesPlaceEntryDbusPlaceEntryInfo;
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
struct _UnityPlacesPlaceEntryIface {
GTypeInterface parent_iface;
@@ -2278,14 +2278,6 @@ void unity_places_place_entry_dbus_update_info (UnityPlacesPlaceEntryDbus* self,
}
-static const char* string_to_string (const char* self) {
- const char* result = NULL;
- g_return_val_if_fail (self != NULL, NULL);
- result = self;
- return result;
-}
-
-
static void _unity_places_place_entry_dbus_on_renderer_info_changed_dynamic_RendererInfoChanged0_ (DBusGProxy* _sender, UnityPlacesPlaceEntryDbusRendererInfo* info, gpointer self) {
unity_places_place_entry_dbus_on_renderer_info_changed (self, _sender, info);
}
@@ -2310,6 +2302,14 @@ void _dynamic_PlaceEntryInfoChanged3_connect (gpointer obj, const char * signal_
}
+static const char* string_to_string (const char* self) {
+ const char* result = NULL;
+ g_return_val_if_fail (self != NULL, NULL);
+ result = self;
+ return result;
+}
+
+
static void unity_places_place_entry_dbus_real_connect (UnityPlacesPlaceEntry* base) {
UnityPlacesPlaceEntryDbus * self;
GError * _inner_error_ = NULL;
@@ -2329,6 +2329,9 @@ static void unity_places_place_entry_dbus_real_connect (UnityPlacesPlaceEntry* b
self->priv->connection = (_tmp1_ = _tmp0_, _dbus_g_connection_unref0 (self->priv->connection), _tmp1_);
self->priv->remote = (_tmp2_ = unity_places_place_entry_remote_dbus_proxy_new (self->priv->connection, self->priv->_dbus_name, self->priv->_dbus_path), _g_object_unref0 (self->priv->remote), _tmp2_);
self->priv->service = (_tmp3_ = dbus_g_proxy_new_for_name (self->priv->connection, self->priv->_dbus_name, self->priv->_dbus_path, "com.canonical.Unity.PlaceEntry"), _g_object_unref0 (self->priv->service), _tmp3_);
+ _dynamic_RendererInfoChanged1_connect (self->priv->service, "RendererInfoChanged", (GCallback) _unity_places_place_entry_dbus_on_renderer_info_changed_dynamic_RendererInfoChanged0_, self);
+ _dynamic_PlaceEntryInfoChanged3_connect (self->priv->service, "PlaceEntryInfoChanged", (GCallback) _unity_places_place_entry_dbus_on_place_entry_info_changed_dynamic_PlaceEntryInfoChanged2_, self);
+ unity_places_place_entry_set_online ((UnityPlacesPlaceEntry*) self, TRUE);
}
goto __finally16;
__catch16_g_error:
@@ -2340,6 +2343,7 @@ static void unity_places_place_entry_dbus_real_connect (UnityPlacesPlaceEntry* b
char* _tmp4_;
g_warning (_tmp4_ = g_strconcat ("Unable to connect to ", string_to_string (self->priv->_dbus_path), " on ", string_to_string (self->priv->_dbus_name), ": %s", NULL), e->message);
_g_free0 (_tmp4_);
+ unity_places_place_entry_set_online ((UnityPlacesPlaceEntry*) self, FALSE);
_g_error_free0 (e);
return;
}
@@ -2350,9 +2354,6 @@ static void unity_places_place_entry_dbus_real_connect (UnityPlacesPlaceEntry* b
g_clear_error (&_inner_error_);
return;
}
- _dynamic_RendererInfoChanged1_connect (self->priv->service, "RendererInfoChanged", (GCallback) _unity_places_place_entry_dbus_on_renderer_info_changed_dynamic_RendererInfoChanged0_, self);
- _dynamic_PlaceEntryInfoChanged3_connect (self->priv->service, "PlaceEntryInfoChanged", (GCallback) _unity_places_place_entry_dbus_on_place_entry_info_changed_dynamic_PlaceEntryInfoChanged2_, self);
- unity_places_place_entry_set_online ((UnityPlacesPlaceEntry*) self, TRUE);
}
@@ -2361,14 +2362,22 @@ static void unity_places_place_entry_dbus_real_set_search (UnityPlacesPlaceEntry
self = (UnityPlacesPlaceEntryDbus*) base;
g_return_if_fail (search != NULL);
g_return_if_fail (hints != NULL);
- unity_places_place_entry_remote_set_search (self->priv->remote, search, hints, NULL, NULL);
+ if (self->priv->remote != NULL) {
+ unity_places_place_entry_remote_set_search (self->priv->remote, search, hints, NULL, NULL);
+ } else {
+ g_warning ("Unable to set search '%s'. " "No connection to remote PlaceEntry", search);
+ }
}
static void unity_places_place_entry_dbus_real_set_active_section (UnityPlacesPlaceEntry* base, guint section_id) {
UnityPlacesPlaceEntryDbus * self;
self = (UnityPlacesPlaceEntryDbus*) base;
- unity_places_place_entry_remote_set_active_section (self->priv->remote, (guint32) section_id, NULL, NULL);
+ if (self->priv->remote != NULL) {
+ unity_places_place_entry_remote_set_active_section (self->priv->remote, (guint32) section_id, NULL, NULL);
+ } else {
+ g_warning ("Unable to set active section %u. " "No connection to remote PlaceEntry", section_id);
+ }
}
@@ -2377,7 +2386,11 @@ static void unity_places_place_entry_dbus_real_set_global_search (UnityPlacesPla
self = (UnityPlacesPlaceEntryDbus*) base;
g_return_if_fail (search != NULL);
g_return_if_fail (hints != NULL);
- unity_places_place_entry_remote_set_global_search (self->priv->remote, search, hints, NULL, NULL);
+ if (self->priv->remote != NULL) {
+ unity_places_place_entry_remote_set_global_search (self->priv->remote, search, hints, NULL, NULL);
+ } else {
+ g_warning ("Unable to set global search '%s'. " "No connection to remote PlaceEntry", search);
+ }
}
@@ -2712,7 +2725,11 @@ static void unity_places_place_entry_dbus_real_set_active (UnityPlacesPlaceEntry
self = (UnityPlacesPlaceEntryDbus*) base;
if (self->priv->_active != value) {
self->priv->_active = value;
- unity_places_place_entry_remote_set_active (self->priv->remote, self->priv->_active, NULL, NULL);
+ if (self->priv->remote != NULL) {
+ unity_places_place_entry_remote_set_active (self->priv->remote, self->priv->_active, NULL, NULL);
+ } else {
+ g_warning ("places-place-entry.vala:154: %s", "Unable to set PlaceEntry as active. " "No contact remote PlaceEntry");
+ }
}
g_object_notify ((GObject *) self, "active");
}
diff --git a/unity-private/places/places-place-entry.vala b/unity-private/places/places-place-entry.vala
index b11657fe7..2f7b493cb 100644
--- a/unity-private/places/places-place-entry.vala
+++ b/unity-private/places/places-place-entry.vala
@@ -148,7 +148,11 @@ namespace Unity.Places
if (_active != value)
{
_active = value;
- remote.set_active.begin (_active);
+ if (remote != null)
+ remote.set_active.begin (_active);
+ else
+ warning ("Unable to set PlaceEntry as active. " +
+ "No contact remote PlaceEntry");
}
}
}
@@ -409,38 +413,51 @@ namespace Unity.Places
* a ValueArray, but not the async stuff.
*
* So basically we need both right now and every new place kills a
- * thousand kittens.
+ * thousand kittens (per hour).
*/
service = connection.get_object (dbus_name,
dbus_path,
"com.canonical.Unity.PlaceEntry");
-
+
+ service.RendererInfoChanged.connect (on_renderer_info_changed);
+ service.PlaceEntryInfoChanged.connect (on_place_entry_info_changed);
+
+ online = true;
+
} catch (Error e) {
warning (@"Unable to connect to $dbus_path on $dbus_name: %s",
e.message);
+ online = false;
return;
- }
-
- service.RendererInfoChanged.connect (on_renderer_info_changed);
- service.PlaceEntryInfoChanged.connect (on_place_entry_info_changed);
-
- online = true;
+ }
}
public void set_search (string search, HashTable<string, string> hints)
{
- remote.set_search.begin (search, hints);
+ if (remote != null)
+ remote.set_search.begin (search, hints);
+ else
+ warning ("Unable to set search '%s'. " +
+ "No connection to remote PlaceEntry", search);
}
public void set_active_section (uint section_id)
{
- remote.set_active_section.begin (section_id);
+ if (remote != null)
+ remote.set_active_section.begin (section_id);
+ else
+ warning ("Unable to set active section %u. " +
+ "No connection to remote PlaceEntry", section_id);
}
public void set_global_search (string search,
HashTable<string, string> hints)
{
- remote.set_global_search.begin (search, hints);
+ if (remote != null)
+ remote.set_global_search.begin (search, hints);
+ else
+ warning ("Unable to set global search '%s'. " +
+ "No connection to remote PlaceEntry", search);
}
/*
diff --git a/unity-private/places/places-place-home-renderer.c b/unity-private/places/places-place-home-renderer.c
index 7fc63460b..69e4361c0 100644
--- a/unity-private/places/places-place-home-renderer.c
+++ b/unity-private/places/places-place-home-renderer.c
@@ -1,4 +1,4 @@
-/* places-place-home-renderer.c generated by valac 0.9.8, the Vala compiler
+/* places-place-home-renderer.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-home-renderer.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-home.c b/unity-private/places/places-place-home.c
index 5e92eb7d4..375bde9c6 100644
--- a/unity-private/places/places-place-home.c
+++ b/unity-private/places/places-place-home.c
@@ -1,4 +1,4 @@
-/* places-place-home.c generated by valac 0.9.8, the Vala compiler
+/* places-place-home.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-home.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-model.c b/unity-private/places/places-place-model.c
index 739917ad8..ccba812c9 100644
--- a/unity-private/places/places-place-model.c
+++ b/unity-private/places/places-place-model.c
@@ -1,4 +1,4 @@
-/* places-place-model.c generated by valac 0.9.8, the Vala compiler
+/* places-place-model.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-model.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-search-bar.c b/unity-private/places/places-place-search-bar.c
index 64a07119b..ed18adf70 100644
--- a/unity-private/places/places-place-search-bar.c
+++ b/unity-private/places/places-place-search-bar.c
@@ -1,4 +1,4 @@
-/* places-place-search-bar.c generated by valac 0.9.8, the Vala compiler
+/* places-place-search-bar.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-search-bar.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-search-entry.c b/unity-private/places/places-place-search-entry.c
index 53e84e569..2b4802780 100644
--- a/unity-private/places/places-place-search-entry.c
+++ b/unity-private/places/places-place-search-entry.c
@@ -1,4 +1,4 @@
-/* places-place-search-entry.c generated by valac 0.9.8, the Vala compiler
+/* places-place-search-entry.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-search-entry.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-search-extra-action.c b/unity-private/places/places-place-search-extra-action.c
index cfffc1b7a..01702df2f 100644
--- a/unity-private/places/places-place-search-extra-action.c
+++ b/unity-private/places/places-place-search-extra-action.c
@@ -1,4 +1,4 @@
-/* places-place-search-extra-action.c generated by valac 0.9.8, the Vala compiler
+/* places-place-search-extra-action.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-search-extra-action.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-search-navigation.c b/unity-private/places/places-place-search-navigation.c
index 56b5353c9..2e0c3015c 100644
--- a/unity-private/places/places-place-search-navigation.c
+++ b/unity-private/places/places-place-search-navigation.c
@@ -1,4 +1,4 @@
-/* places-place-search-navigation.c generated by valac 0.9.8, the Vala compiler
+/* places-place-search-navigation.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-search-navigation.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-search-sections-bar.c b/unity-private/places/places-place-search-sections-bar.c
index c5ff16c2b..5895c2564 100644
--- a/unity-private/places/places-place-search-sections-bar.c
+++ b/unity-private/places/places-place-search-sections-bar.c
@@ -1,4 +1,4 @@
-/* places-place-search-sections-bar.c generated by valac 0.9.8, the Vala compiler
+/* places-place-search-sections-bar.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-search-sections-bar.vala, do not modify */
/*
diff --git a/unity-private/places/places-place-view.c b/unity-private/places/places-place-view.c
index 4b23f4402..f823e832c 100644
--- a/unity-private/places/places-place-view.c
+++ b/unity-private/places/places-place-view.c
@@ -1,4 +1,4 @@
-/* places-place-view.c generated by valac 0.9.8, the Vala compiler
+/* places-place-view.c generated by valac 0.10.0, the Vala compiler
* generated from places-place-view.vala, do not modify */
/*
diff --git a/unity-private/places/places-place.c b/unity-private/places/places-place.c
index 1ead7ce9d..01847d543 100644
--- a/unity-private/places/places-place.c
+++ b/unity-private/places/places-place.c
@@ -1,4 +1,4 @@
-/* places-place.c generated by valac 0.9.8, the Vala compiler
+/* places-place.c generated by valac 0.10.0, the Vala compiler
* generated from places-place.vala, do not modify */
/*
diff --git a/unity-private/places/places-trash-controller.c b/unity-private/places/places-trash-controller.c
index 0ba44c84f..ac0432c56 100644
--- a/unity-private/places/places-trash-controller.c
+++ b/unity-private/places/places-trash-controller.c
@@ -1,4 +1,4 @@
-/* places-trash-controller.c generated by valac 0.9.8, the Vala compiler
+/* places-trash-controller.c generated by valac 0.10.0, the Vala compiler
* generated from places-trash-controller.vala, do not modify */
/*
@@ -334,7 +334,7 @@ static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherSc
DbusmenuMenuitem* _tmp2_;
char* _tmp3_;
item = NULL;
- label = g_strdup (ngettext ("%d item", "%d items", (gulong) self->priv->n_items));
+ label = g_strdup (_ ("Files in trash: %d"));
item = (_tmp2_ = dbusmenu_menuitem_new (), _g_object_unref0 (item), _tmp2_);
dbusmenu_menuitem_property_set (item, DBUSMENU_MENUITEM_PROP_LABEL, _tmp3_ = g_strdup_printf (label, self->priv->n_items));
_g_free0 (_tmp3_);
diff --git a/unity-private/places/places-trash-controller.vala b/unity-private/places/places-trash-controller.vala
index 32735fbc2..e431e2dd2 100644
--- a/unity-private/places/places-trash-controller.vala
+++ b/unity-private/places/places-trash-controller.vala
@@ -82,8 +82,8 @@ namespace Unity.Places
if (n_items != 0)
{
Dbusmenu.Menuitem item;
- /* i18n: This is the number of items in the Trash folder */
- string label = ngettext("%d item", "%d items", n_items);
+ /* i18n: Sorry for the inelegant formulation, but ngettext() doesn't want to play for some reason */
+ string label = _("Files in trash: %d");
item = new Dbusmenu.Menuitem ();
item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, label.printf (n_items));
diff --git a/unity-private/places/places-view.c b/unity-private/places/places-view.c
index 0aef8be0e..ddbf8f6b0 100644
--- a/unity-private/places/places-view.c
+++ b/unity-private/places/places-view.c
@@ -1,4 +1,4 @@
-/* places-view.c generated by valac 0.9.8, the Vala compiler
+/* places-view.c generated by valac 0.10.0, the Vala compiler
* generated from places-view.vala, do not modify */
/*
diff --git a/unity-private/places/places-volume-child-controller.c b/unity-private/places/places-volume-child-controller.c
index 4d429321a..534f17a34 100644
--- a/unity-private/places/places-volume-child-controller.c
+++ b/unity-private/places/places-volume-child-controller.c
@@ -1,4 +1,4 @@
-/* places-volume-child-controller.c generated by valac 0.9.8, the Vala compiler
+/* places-volume-child-controller.c generated by valac 0.10.0, the Vala compiler
* generated from places-volume-child-controller.vala, do not modify */
/*
diff --git a/unity-private/places/places-volume-controller.c b/unity-private/places/places-volume-controller.c
index b8c0699e6..93a88f579 100644
--- a/unity-private/places/places-volume-controller.c
+++ b/unity-private/places/places-volume-controller.c
@@ -1,4 +1,4 @@
-/* places-volume-controller.c generated by valac 0.9.8, the Vala compiler
+/* places-volume-controller.c generated by valac 0.10.0, the Vala compiler
* generated from places-volume-controller.vala, do not modify */
/*
diff --git a/unity-private/testing/background.c b/unity-private/testing/background.c
index 58ef9175d..40029c71a 100644
--- a/unity-private/testing/background.c
+++ b/unity-private/testing/background.c
@@ -1,4 +1,4 @@
-/* background.c generated by valac 0.9.8, the Vala compiler
+/* background.c generated by valac 0.10.0, the Vala compiler
* generated from background.vala, do not modify */
/*
diff --git a/unity-private/testing/object-registry.c b/unity-private/testing/object-registry.c
index dff36f9a2..d07e0c425 100644
--- a/unity-private/testing/object-registry.c
+++ b/unity-private/testing/object-registry.c
@@ -1,4 +1,4 @@
-/* object-registry.c generated by valac 0.9.8, the Vala compiler
+/* object-registry.c generated by valac 0.10.0, the Vala compiler
* generated from object-registry.vala, do not modify */
/*
diff --git a/unity-private/testing/perf-logger.c b/unity-private/testing/perf-logger.c
index dece9337e..810494f6b 100644
--- a/unity-private/testing/perf-logger.c
+++ b/unity-private/testing/perf-logger.c
@@ -1,4 +1,4 @@
-/* perf-logger.c generated by valac 0.9.8, the Vala compiler
+/* perf-logger.c generated by valac 0.10.0, the Vala compiler
* generated from perf-logger.vala, do not modify */
/*
diff --git a/unity-private/testing/test-director.c b/unity-private/testing/test-director.c
index 6934af82f..acc0175be 100644
--- a/unity-private/testing/test-director.c
+++ b/unity-private/testing/test-director.c
@@ -1,4 +1,4 @@
-/* test-director.c generated by valac 0.9.8, the Vala compiler
+/* test-director.c generated by valac 0.10.0, the Vala compiler
* generated from test-director.vala, do not modify */
/*
diff --git a/unity-private/testing/test-utils.c b/unity-private/testing/test-utils.c
index 2f34656b5..4df1ce96f 100644
--- a/unity-private/testing/test-utils.c
+++ b/unity-private/testing/test-utils.c
@@ -1,4 +1,4 @@
-/* test-utils.c generated by valac 0.9.8, the Vala compiler
+/* test-utils.c generated by valac 0.10.0, the Vala compiler
* generated from test-utils.vala, do not modify */
/*
diff --git a/unity-private/testing/test-window.c b/unity-private/testing/test-window.c
index df2c7bd70..4be226b5b 100644
--- a/unity-private/testing/test-window.c
+++ b/unity-private/testing/test-window.c
@@ -1,4 +1,4 @@
-/* test-window.c generated by valac 0.9.8, the Vala compiler
+/* test-window.c generated by valac 0.10.0, the Vala compiler
* generated from test-window.vala, do not modify */
/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
diff --git a/unity-private/unity-private.h b/unity-private/unity-private.h
index 145bf6d5d..02a102026 100644
--- a/unity-private/unity-private.h
+++ b/unity-private/unity-private.h
@@ -1,4 +1,4 @@
-/* unity-private.h generated by valac 0.9.8, the Vala compiler, do not modify */
+/* unity-private.h generated by valac 0.10.0, the Vala compiler, do not modify */
#ifndef __UNITY_PRIVATE_H__
@@ -1063,6 +1063,7 @@ struct _UnityGesturePanEvent {
float velocity_y;
float x;
float y;
+ float current_n_fingers;
};
struct _UnityGesturePanEventClass {
@@ -2507,6 +2508,8 @@ void unity_launcher_application_controller_attach_application (UnityLauncherAppl
void unity_launcher_application_controller_detach_application (UnityLauncherApplicationController* self);
gboolean unity_launcher_application_controller_debug_is_application_attached (UnityLauncherApplicationController* self);
const char* unity_launcher_application_controller_get_desktop_file (UnityLauncherApplicationController* self);
+const char* unity_launcher_application_controller_get_fav_id (UnityLauncherApplicationController* self);
+void unity_launcher_application_controller_set_fav_id (UnityLauncherApplicationController* self, const char* value);
GType unity_launcher_launcher_container_get_type (void) G_GNUC_CONST;
UnityLauncherLauncherContainer* unity_launcher_launcher_container_new (void);
UnityLauncherLauncherContainer* unity_launcher_launcher_container_construct (GType object_type);
diff --git a/unity-private/unity-private.vapi b/unity-private/unity-private.vapi
index c57eea944..7dfebf2ac 100644
--- a/unity-private/unity-private.vapi
+++ b/unity-private/unity-private.vapi
@@ -1,4 +1,4 @@
-/* unity-private.vapi generated by valac 0.9.8, do not modify. */
+/* unity-private.vapi generated by valac 0.10.0, do not modify. */
[CCode (cprefix = "Unity", lower_case_cprefix = "unity_")]
namespace Unity {
@@ -39,6 +39,7 @@ namespace Unity {
}
[CCode (ref_function = "unity_gesture_pan_event_ref", unref_function = "unity_gesture_pan_event_unref", cheader_filename = "unity-private.h")]
public class PanEvent {
+ public float current_n_fingers;
public float delta_x;
public float delta_y;
public float velocity_x;
@@ -93,7 +94,7 @@ namespace Unity {
public override void activate ();
public void attach_application (Bamf.Application application);
public void close_windows ();
- public void closed ();
+ public new void closed ();
public bool debug_is_application_attached ();
public void detach_application ();
public override void get_menu_actions (Unity.Launcher.ScrollerChildController.menu_cb callback);
@@ -104,6 +105,7 @@ namespace Unity {
public void set_priority (float priority);
public void set_sticky (bool is_sticky = true);
public string desktop_file { get; set; }
+ public string fav_id { get; set; }
}
[CCode (cheader_filename = "unity-private.h")]
public class ApplicationQuicklistController : Unity.Launcher.QuicklistController {
@@ -115,7 +117,7 @@ namespace Unity {
public Ctk.EffectCache get_actor_cache ();
public Clutter.Actor get_container ();
public Clutter.Actor get_view ();
- public float get_width ();
+ public new float get_width ();
public Unity.Launcher.ScrollerModel model { get; set; }
public Unity.Shell shell { get; construct; }
}
@@ -251,13 +253,13 @@ namespace Unity {
public void add (Unity.Launcher.ScrollerChild child);
public int clamp (Unity.Launcher.ScrollerChild child, int value);
public bool contains (Unity.Launcher.ScrollerChild child);
- public Unity.Launcher.ScrollerChild @get (int i);
+ public new Unity.Launcher.ScrollerChild @get (int i);
public int index_of (Unity.Launcher.ScrollerChild child);
public void insert (Unity.Launcher.ScrollerChild child, int i);
public Unity.Launcher.ScrollerModel.Iterator iterator ();
public void move (Unity.Launcher.ScrollerChild child, int i);
public void remove (Unity.Launcher.ScrollerChild child);
- public void @set (int i, Unity.Launcher.ScrollerChild item);
+ public new void @set (int i, Unity.Launcher.ScrollerChild item);
public void sort (GLib.CompareFunc compare);
public string to_string ();
public int size { get; }
@@ -524,7 +526,7 @@ namespace Unity {
public Place (string dbus_name, string dbus_path);
public Unity.Places.ActivationStatus activate (string uri, string mimetype);
public static async void activate_fallback (string uri);
- public void connect ();
+ public new void connect ();
public unowned Gee.ArrayList<Unity.Places.PlaceEntry> get_entries ();
public Unity.Places.PlaceEntry? get_nth_entry (int index);
public static Unity.Places.Place? new_from_keyfile (GLib.KeyFile file, string id = "Unknown");
@@ -752,7 +754,7 @@ namespace Unity {
}
[CCode (cheader_filename = "unity-private.h")]
public interface PlaceEntry : GLib.Object {
- public abstract void connect ();
+ public abstract new void connect ();
public abstract void set_active_section (uint section_id);
public abstract void set_global_search (string search, GLib.HashTable<string,string> hints);
public abstract void set_search (string search, GLib.HashTable<string,string> hints);
diff --git a/unity-private/unity.c b/unity-private/unity.c
index 2d627662c..2cc1e3f4f 100644
--- a/unity-private/unity.c
+++ b/unity-private/unity.c
@@ -1,4 +1,4 @@
-/* unity.c generated by valac 0.9.8, the Vala compiler
+/* unity.c generated by valac 0.10.0, the Vala compiler
* generated from unity.vala, do not modify */
/*
diff --git a/unity-private/utils.c b/unity-private/utils.c
index 483c6d517..66fd3423c 100644
--- a/unity-private/utils.c
+++ b/unity-private/utils.c
@@ -1,4 +1,4 @@
-/* utils.c generated by valac 0.9.8, the Vala compiler
+/* utils.c generated by valac 0.10.0, the Vala compiler
* generated from utils.vala, do not modify */
/*
diff --git a/unity/chrome-handler.c b/unity/chrome-handler.c
index b7721e9c4..4b7050f7f 100644
--- a/unity/chrome-handler.c
+++ b/unity/chrome-handler.c
@@ -1,4 +1,4 @@
-/* chrome-handler.c generated by valac 0.9.8, the Vala compiler
+/* chrome-handler.c generated by valac 0.10.0, the Vala compiler
* generated from chrome-handler.vala, do not modify */
/*
diff --git a/unity/drag-controller.c b/unity/drag-controller.c
index d18c6087e..b421ce37d 100644
--- a/unity/drag-controller.c
+++ b/unity/drag-controller.c
@@ -1,4 +1,4 @@
-/* drag-controller.c generated by valac 0.9.8, the Vala compiler
+/* drag-controller.c generated by valac 0.10.0, the Vala compiler
* generated from drag-controller.vala, do not modify */
/*
diff --git a/unity/drag-view.c b/unity/drag-view.c
index da7507b44..9c53df297 100644
--- a/unity/drag-view.c
+++ b/unity/drag-view.c
@@ -1,4 +1,4 @@
-/* drag-view.c generated by valac 0.9.8, the Vala compiler
+/* drag-view.c generated by valac 0.10.0, the Vala compiler
* generated from drag-view.vala, do not modify */
/*
diff --git a/unity/entry.c b/unity/entry.c
index 96db71d47..324d5eb29 100644
--- a/unity/entry.c
+++ b/unity/entry.c
@@ -1,4 +1,4 @@
-/* entry.c generated by valac 0.9.8, the Vala compiler
+/* entry.c generated by valac 0.10.0, the Vala compiler
* generated from entry.vala, do not modify */
/*
diff --git a/unity/icon-postprocessor.c b/unity/icon-postprocessor.c
index d1020c8d4..01b7ae05c 100644
--- a/unity/icon-postprocessor.c
+++ b/unity/icon-postprocessor.c
@@ -1,4 +1,4 @@
-/* icon-postprocessor.c generated by valac 0.9.8, the Vala compiler
+/* icon-postprocessor.c generated by valac 0.10.0, the Vala compiler
* generated from icon-postprocessor.vala, do not modify */
/*
diff --git a/unity/prism-handler.c b/unity/prism-handler.c
index b81e5642e..eb9bdca14 100644
--- a/unity/prism-handler.c
+++ b/unity/prism-handler.c
@@ -1,4 +1,4 @@
-/* prism-handler.c generated by valac 0.9.8, the Vala compiler
+/* prism-handler.c generated by valac 0.10.0, the Vala compiler
* generated from prism-handler.vala, do not modify */
/*
diff --git a/unity/quicklist-rendering.c b/unity/quicklist-rendering.c
index 3304b61a6..328a90788 100644
--- a/unity/quicklist-rendering.c
+++ b/unity/quicklist-rendering.c
@@ -1,4 +1,4 @@
-/* quicklist-rendering.c generated by valac 0.9.8, the Vala compiler
+/* quicklist-rendering.c generated by valac 0.10.0, the Vala compiler
* generated from quicklist-rendering.vala, do not modify */
/*
diff --git a/unity/shell.c b/unity/shell.c
index a7b17f166..3ba4ef01a 100644
--- a/unity/shell.c
+++ b/unity/shell.c
@@ -1,4 +1,4 @@
-/* shell.c generated by valac 0.9.8, the Vala compiler
+/* shell.c generated by valac 0.10.0, the Vala compiler
* generated from shell.vala, do not modify */
/*
diff --git a/unity/theme.c b/unity/theme.c
index 31710a0da..23996ad38 100644
--- a/unity/theme.c
+++ b/unity/theme.c
@@ -1,4 +1,4 @@
-/* theme.c generated by valac 0.9.8, the Vala compiler
+/* theme.c generated by valac 0.10.0, the Vala compiler
* generated from theme.vala, do not modify */
/*
diff --git a/unity/unity-appinfo-manager.c b/unity/unity-appinfo-manager.c
index 4fb139f99..b486502ff 100644
--- a/unity/unity-appinfo-manager.c
+++ b/unity/unity-appinfo-manager.c
@@ -1,4 +1,4 @@
-/* unity-appinfo-manager.c generated by valac 0.9.8, the Vala compiler
+/* unity-appinfo-manager.c generated by valac 0.10.0, the Vala compiler
* generated from unity-appinfo-manager.vala, do not modify */
/*
diff --git a/unity/unity-cairo-canvas.c b/unity/unity-cairo-canvas.c
index c11bd1602..e359fa8a2 100644
--- a/unity/unity-cairo-canvas.c
+++ b/unity/unity-cairo-canvas.c
@@ -1,4 +1,4 @@
-/* unity-cairo-canvas.c generated by valac 0.9.8, the Vala compiler
+/* unity-cairo-canvas.c generated by valac 0.10.0, the Vala compiler
* generated from unity-cairo-canvas.vala, do not modify */
/*
diff --git a/unity/unity-expanding-bin.c b/unity/unity-expanding-bin.c
index 62f6ce0c2..4503a1fae 100644
--- a/unity/unity-expanding-bin.c
+++ b/unity/unity-expanding-bin.c
@@ -1,4 +1,4 @@
-/* unity-expanding-bin.c generated by valac 0.9.8, the Vala compiler
+/* unity-expanding-bin.c generated by valac 0.10.0, the Vala compiler
* generated from unity-expanding-bin.vala, do not modify */
/*
diff --git a/unity/unity-favorites.c b/unity/unity-favorites.c
index 198a72aff..268a4760d 100644
--- a/unity/unity-favorites.c
+++ b/unity/unity-favorites.c
@@ -1,4 +1,4 @@
-/* unity-favorites.c generated by valac 0.9.8, the Vala compiler
+/* unity-favorites.c generated by valac 0.10.0, the Vala compiler
* generated from unity-favorites.vala, do not modify */
/*
diff --git a/unity/unity-io.c b/unity/unity-io.c
index 88de9242b..680f782ff 100644
--- a/unity/unity-io.c
+++ b/unity/unity-io.c
@@ -1,4 +1,4 @@
-/* unity-io.c generated by valac 0.9.8, the Vala compiler
+/* unity-io.c generated by valac 0.10.0, the Vala compiler
* generated from unity-io.vala, do not modify */
/*
diff --git a/unity/unity-layered-bin.c b/unity/unity-layered-bin.c
index 40b9a02bb..2f623453f 100644
--- a/unity/unity-layered-bin.c
+++ b/unity/unity-layered-bin.c
@@ -1,4 +1,4 @@
-/* unity-layered-bin.c generated by valac 0.9.8, the Vala compiler
+/* unity-layered-bin.c generated by valac 0.10.0, the Vala compiler
* generated from unity-layered-bin.vala, do not modify */
/*
diff --git a/unity/unity-pixbuf-cache.c b/unity/unity-pixbuf-cache.c
index bb9a6eb39..5bf8603a2 100644
--- a/unity/unity-pixbuf-cache.c
+++ b/unity/unity-pixbuf-cache.c
@@ -1,4 +1,4 @@
-/* unity-pixbuf-cache.c generated by valac 0.9.8, the Vala compiler
+/* unity-pixbuf-cache.c generated by valac 0.10.0, the Vala compiler
* generated from unity-pixbuf-cache.vala, do not modify */
/*
diff --git a/unity/unity-place-activation.c b/unity/unity-place-activation.c
index f937f0ce1..da57967ab 100644
--- a/unity/unity-place-activation.c
+++ b/unity/unity-place-activation.c
@@ -1,4 +1,4 @@
-/* unity-place-activation.c generated by valac 0.9.8, the Vala compiler
+/* unity-place-activation.c generated by valac 0.10.0, the Vala compiler
* generated from unity-place-activation.vala, do not modify */
/*
diff --git a/unity/unity-place-browser.c b/unity/unity-place-browser.c
index ddd57f886..c93c6db5e 100644
--- a/unity/unity-place-browser.c
+++ b/unity/unity-place-browser.c
@@ -1,4 +1,4 @@
-/* unity-place-browser.c generated by valac 0.9.8, the Vala compiler
+/* unity-place-browser.c generated by valac 0.10.0, the Vala compiler
* generated from unity-place-browser.vala, do not modify */
/*
diff --git a/unity/unity-place-renderer.c b/unity/unity-place-renderer.c
index 2877cee49..7d6d41755 100644
--- a/unity/unity-place-renderer.c
+++ b/unity/unity-place-renderer.c
@@ -1,4 +1,4 @@
-/* unity-place-renderer.c generated by valac 0.9.8, the Vala compiler
+/* unity-place-renderer.c generated by valac 0.10.0, the Vala compiler
* generated from unity-place-renderer.vala, do not modify */
/*
diff --git a/unity/unity-place.c b/unity/unity-place.c
index 7634289d9..326c9c4e1 100644
--- a/unity/unity-place.c
+++ b/unity/unity-place.c
@@ -1,4 +1,4 @@
-/* unity-place.c generated by valac 0.9.8, the Vala compiler
+/* unity-place.c generated by valac 0.10.0, the Vala compiler
* generated from unity-place.vala, do not modify */
/*
diff --git a/unity/unity-stripe-texture.c b/unity/unity-stripe-texture.c
index 07f455990..45efee243 100644
--- a/unity/unity-stripe-texture.c
+++ b/unity/unity-stripe-texture.c
@@ -1,4 +1,4 @@
-/* unity-stripe-texture.c generated by valac 0.9.8, the Vala compiler
+/* unity-stripe-texture.c generated by valac 0.10.0, the Vala compiler
* generated from unity-stripe-texture.vala, do not modify */
/*
diff --git a/unity/unity.h b/unity/unity.h
index bcf720711..91628d0de 100644
--- a/unity/unity.h
+++ b/unity/unity.h
@@ -1,4 +1,4 @@
-/* unity.h generated by valac 0.9.8, the Vala compiler, do not modify */
+/* unity.h generated by valac 0.10.0, the Vala compiler, do not modify */
#ifndef __UNITY_H__
diff --git a/unity/unity.vapi b/unity/unity.vapi
index 516f78d4d..2c4809a93 100644
--- a/unity/unity.vapi
+++ b/unity/unity.vapi
@@ -1,4 +1,4 @@
-/* unity.vapi generated by valac 0.9.8, do not modify. */
+/* unity.vapi generated by valac 0.10.0, do not modify. */
[CCode (cprefix = "Unity", lower_case_cprefix = "unity_")]
namespace Unity {
@@ -304,9 +304,9 @@ namespace Unity {
public class PixbufCache : GLib.Object {
public PixbufCache (bool _autodispose = false);
public void clear ();
- public Gdk.Pixbuf? @get (string icon_id, int size);
+ public new Gdk.Pixbuf? @get (string icon_id, int size);
public static Unity.PixbufCache get_default ();
- public void @set (string icon_id, Gdk.Pixbuf pixbuf, int size);
+ public new void @set (string icon_id, Gdk.Pixbuf pixbuf, int size);
public async void set_image_from_gicon (Ctk.Image image, GLib.Icon icon, int size);
public void set_image_from_gicon_string (Ctk.Image image, string gicon_as_string, int size);
public void set_image_from_icon_name (Ctk.Image image, string icon_name, int size);
diff --git a/unity/webapp-fetcher.c b/unity/webapp-fetcher.c
index 8dd1e1268..8b12e5310 100644
--- a/unity/webapp-fetcher.c
+++ b/unity/webapp-fetcher.c
@@ -1,4 +1,4 @@
-/* webapp-fetcher.c generated by valac 0.9.8, the Vala compiler
+/* webapp-fetcher.c generated by valac 0.10.0, the Vala compiler
* generated from webapp-fetcher.vala, do not modify */
/*
diff --git a/vapi/indicator.vapi b/vapi/indicator.vapi
index 7a4b34d58..6848af34d 100644
--- a/vapi/indicator.vapi
+++ b/vapi/indicator.vapi
@@ -27,7 +27,7 @@ namespace Indicator {
[NoWrapper]
public virtual unowned Gtk.Menu get_menu ();
[NoWrapper]
- public virtual void entry_activate (Indicator.ObjectEntry entry, uint timestamp);
+ public void entry_activate (Indicator.ObjectEntry entry, uint timestamp);
public virtual void indicator_object_reserved_1 ();
public virtual signal void entry_added (Indicator.ObjectEntry entry);
public virtual signal void entry_moved (Indicator.ObjectEntry entry, uint old_pos, uint new_pos);