diff options
54 files changed, 4373 insertions, 1659 deletions
@@ -1,5 +1,101 @@  # Generated by Makefile. Do not edit. +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	[release] 0.3.32 + +2010-08-26 jassmith@gmail.com + +	Ensure we have a heigh enough spaces calculation + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	[merge] My frigging work + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	[merge] Trunk + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	launch folder browsing for fileinfo + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Change the folder hilight to underline + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Reduce the blinking a bit + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Remove unecessary printf + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Properly remove empty results from home screen + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	More global fixes + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Make global search work again, fix some warnings + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Add states to groups view + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Add states to section buttons + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Fix padding + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Add support for clicking parent folder in FileInfoRenderer + +2010-08-25 Neil Jagdish Patel <neil.patel@canonical.com> + +	Update ignores + +2010-08-25 Neil Jagdish Patel <neil.patel@canonical.com> + +	Add states feedback to tiles + +2010-08-25 Neil Jagdish Patel <neil.patel@canonical.com> + +	Padding fixes, use comment in FileInfo if != uri, and lots more + +2010-08-25 Neil Jagdish Patel <neil.patel@canonical.com> + +	Beginnings of FileInfoTile + +2010-08-25 Neil Jagdish Patel <neil.patel@canonical.com> + +	Add UnityShowcaseRenderer + +2010-08-25 Neil Jagdish Patel <neil.patel@canonical.com> + +	Make Tile into an abstract class to be implemented by the world and it's lonely kitten + +2010-08-25 Neil Jagdish Patel <neil.patel@canonical.com> + +	Add support for the ExpandedGroups hint + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	Post release bump + +2010-08-26 Neil Jagdish Patel <neil.patel@canonical.com> + +	[release] 0.2.30 +  2010-08-26 Gord Allott <gord.allott@canonical.com> 	merged in a fix for launcher not unfolding on startup @@ -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.30. +# Generated by GNU Autoconf 2.67 for unity 0.2.32.  #  # 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.30' -PACKAGE_STRING='unity 0.2.30' +PACKAGE_VERSION='0.2.32' +PACKAGE_STRING='unity 0.2.32'  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.30 to adapt to many kinds of systems. +\`configure' configures unity 0.2.32 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.30:";; + short | recursive ) echo "Configuration of unity 0.2.32:";;  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.30 +unity configure 0.2.32  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.30, which was +It was created by unity $as_me 0.2.32, 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.30 + VERSION=0.2.32  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=30 -DL_VERSION=0.2.30 +DL_MICRO_VERSION=32 +DL_VERSION=0.2.32 @@ -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.30, which was +This file was extended by unity $as_me 0.2.32, 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.30 +unity config.status 0.2.32  configured by $0, generated by GNU Autoconf 2.67,  with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 411157203..8bdd4f76c 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], [30]) +m4_define([unity_micro], [32])  m4_define([unity_api],  [unity_major.unity_minor]) diff --git a/targets/mutter/spaces-manager.c b/targets/mutter/spaces-manager.c index e95dd1770..b1febd493 100644 --- a/targets/mutter/spaces-manager.c +++ b/targets/mutter/spaces-manager.c @@ -1197,7 +1197,13 @@ static void unity_spaces_manager_unlayout_workspaces (UnitySpacesManager* self, 	g_return_if_fail (screen != NULL); 	length = g_list_length (clones); 	width = (gint) ceil (sqrt ((double) length)); -	height = (gint) floor (sqrt ((double) length)); +	height = 1; +	while (TRUE) { +	if (!((width * height) < length)) { +	break; +	} +	height++; +	} 	rect = (_tmp0_.height = 0, _tmp0_.width = 0, _tmp0_.x = 0, _tmp0_.y = 0, _tmp0_); 	meta_screen_get_monitor_geometry (screen, 0, &rect); 	{ @@ -1272,7 +1278,13 @@ static void unity_spaces_manager_layout_workspaces (UnitySpacesManager* self, GL 	g_return_if_fail (screen != NULL); 	length = g_list_length (clones); 	width = (gint) ceil (sqrt ((double) length)); -	height = (gint) floor (sqrt ((double) length)); +	height = 1; +	while (TRUE) { +	if (!((width * height) < length)) { +	break; +	} +	height++; +	} 	rect = (_tmp0_.height = 0, _tmp0_.width = 0, _tmp0_.x = 0, _tmp0_.y = 0, _tmp0_); 	meta_screen_get_monitor_geometry (screen, 0, &rect); 	active = meta_screen_get_active_workspace_index (screen); diff --git a/targets/mutter/spaces-manager.vala b/targets/mutter/spaces-manager.vala index 42a1b4471..f5908f3c4 100644 --- a/targets/mutter/spaces-manager.vala +++ b/targets/mutter/spaces-manager.vala @@ -388,7 +388,9 @@ namespace Unity {  uint length = clones.length ();  int width = (int) Math.ceil (Math.sqrt ((double) length)); - int height = (int) Math.floor (Math.sqrt ((double) length)); + int height = 1; + while (width * height < length) + height++;  Mutter.MetaRectangle rect = {0, 0, 0, 0};  Mutter.MetaScreen.get_monitor_geometry (screen, 0, rect); @@ -433,7 +435,9 @@ namespace Unity {  uint length = clones.length ();  int width = (int) Math.ceil (Math.sqrt ((double) length)); - int height = (int) Math.floor (Math.sqrt ((double) length)); + int height = 1; + while (width * height < length) + height++;  Mutter.MetaRectangle rect = {0, 0, 0, 0};  Mutter.MetaScreen.get_monitor_geometry (screen, 0, rect); diff --git a/unity-private/Makefile.am b/unity-private/Makefile.am index e9cf51fae..5069d5b97 100644 --- a/unity-private/Makefile.am +++ b/unity-private/Makefile.am @@ -89,8 +89,10 @@ panel_sources = \  panel/panel-window-buttons.vala  places_sources = \ + places/places-button.vala \  places/places-controller.vala \  places/places-default-renderer-group.vala \ + places/places-default-renderer-tiles.vala \  places/places-default-renderer.vala \  places/places-folder-browser-renderer.vala \  places/places-place-bar.vala \ diff --git a/unity-private/Makefile.in b/unity-private/Makefile.in index 6eff4182d..472da72b7 100644 --- a/unity-private/Makefile.in +++ b/unity-private/Makefile.in @@ -97,8 +97,10 @@ am__objects_3 = libunity_private_la-panel-background.lo \ 	libunity_private_la-panel-tray.lo \ 	libunity_private_la-panel-view.lo \ 	libunity_private_la-panel-window-buttons.lo -am__objects_4 = libunity_private_la-places-controller.lo \ +am__objects_4 = libunity_private_la-places-button.lo \ +	libunity_private_la-places-controller.lo \ 	libunity_private_la-places-default-renderer-group.lo \ +	libunity_private_la-places-default-renderer-tiles.lo \ 	libunity_private_la-places-default-renderer.lo \ 	libunity_private_la-places-folder-browser-renderer.lo \ 	libunity_private_la-places-place-bar.lo \ @@ -424,8 +426,10 @@ panel_sources = \  panel/panel-window-buttons.vala  places_sources = \ + places/places-button.vala \  places/places-controller.vala \  places/places-default-renderer-group.vala \ + places/places-default-renderer-tiles.vala \  places/places-default-renderer.vala \  places/places-folder-browser-renderer.vala \  places/places-place-bar.vala \ @@ -592,8 +596,10 @@ distclean-compile:  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-panel-view.Plo@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-panel-window-buttons.Plo@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-perf-logger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-places-button.Plo@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-places-controller.Plo@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-places-default-renderer-group.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-places-default-renderer-tiles.Plo@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-places-default-renderer.Plo@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-places-folder-browser-renderer.Plo@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_private_la-places-place-bar.Plo@am__quote@ @@ -832,6 +838,14 @@ libunity_private_la-panel-window-buttons.lo: panel/panel-window-buttons.c  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@  @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libunity_private_la-panel-window-buttons.lo `test -f 'panel/panel-window-buttons.c' || echo '$(srcdir)/'`panel/panel-window-buttons.c +libunity_private_la-places-button.lo: places/places-button.c +@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libunity_private_la-places-button.lo -MD -MP -MF $(DEPDIR)/libunity_private_la-places-button.Tpo -c -o libunity_private_la-places-button.lo `test -f 'places/places-button.c' || echo '$(srcdir)/'`places/places-button.c +@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libunity_private_la-places-button.Tpo $(DEPDIR)/libunity_private_la-places-button.Plo +@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='places/places-button.c' object='libunity_private_la-places-button.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libunity_private_la-places-button.lo `test -f 'places/places-button.c' || echo '$(srcdir)/'`places/places-button.c +  libunity_private_la-places-controller.lo: places/places-controller.c  @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libunity_private_la-places-controller.lo -MD -MP -MF $(DEPDIR)/libunity_private_la-places-controller.Tpo -c -o libunity_private_la-places-controller.lo `test -f 'places/places-controller.c' || echo '$(srcdir)/'`places/places-controller.c  @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libunity_private_la-places-controller.Tpo $(DEPDIR)/libunity_private_la-places-controller.Plo @@ -848,6 +862,14 @@ libunity_private_la-places-default-renderer-group.lo: places/places-default-rend  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@  @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libunity_private_la-places-default-renderer-group.lo `test -f 'places/places-default-renderer-group.c' || echo '$(srcdir)/'`places/places-default-renderer-group.c +libunity_private_la-places-default-renderer-tiles.lo: places/places-default-renderer-tiles.c +@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libunity_private_la-places-default-renderer-tiles.lo -MD -MP -MF $(DEPDIR)/libunity_private_la-places-default-renderer-tiles.Tpo -c -o libunity_private_la-places-default-renderer-tiles.lo `test -f 'places/places-default-renderer-tiles.c' || echo '$(srcdir)/'`places/places-default-renderer-tiles.c +@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libunity_private_la-places-default-renderer-tiles.Tpo $(DEPDIR)/libunity_private_la-places-default-renderer-tiles.Plo +@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='places/places-default-renderer-tiles.c' object='libunity_private_la-places-default-renderer-tiles.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libunity_private_la-places-default-renderer-tiles.lo `test -f 'places/places-default-renderer-tiles.c' || echo '$(srcdir)/'`places/places-default-renderer-tiles.c +  libunity_private_la-places-default-renderer.lo: places/places-default-renderer.c  @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunity_private_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libunity_private_la-places-default-renderer.lo -MD -MP -MF $(DEPDIR)/libunity_private_la-places-default-renderer.Tpo -c -o libunity_private_la-places-default-renderer.lo `test -f 'places/places-default-renderer.c' || echo '$(srcdir)/'`places/places-default-renderer.c  @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libunity_private_la-places-default-renderer.Tpo $(DEPDIR)/libunity_private_la-places-default-renderer.Plo diff --git a/unity-private/launcher/application-controller.c b/unity-private/launcher/application-controller.c index fe83f4abd..dbcbd42c5 100644 --- a/unity-private/launcher/application-controller.c +++ b/unity-private/launcher/application-controller.c @@ -110,11 +110,11 @@ typedef struct _UnityLauncherApplicationQuicklistControllerClass UnityLauncherAp  typedef struct _UnityLauncherScrollerChildPrivate UnityLauncherScrollerChildPrivate;  #define UNITY_LAUNCHER_TYPE_PIN_TYPE (unity_launcher_pin_type_get_type ()) -typedef struct _Block7Data Block7Data; -typedef struct _Block5Data Block5Data; -#define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_object_unref (var), NULL)))  typedef struct _Block8Data Block8Data;  typedef struct _Block6Data Block6Data; +#define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_object_unref (var), NULL))) +typedef struct _Block9Data Block9Data; +typedef struct _Block7Data Block7Data;  #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))  typedef enum { @@ -189,26 +189,26 @@ struct _UnityLauncherScrollerChildClass { 	CtkActorClass parent_class;  }; -struct _Block7Data { +struct _Block8Data { 	int _ref_count_; -	Block5Data * _data5_; +	Block6Data * _data6_; 	DbusmenuMenuitem* menu;  }; -struct _Block5Data { +struct _Block6Data { 	int _ref_count_; -	Block6Data * _data6_; +	Block7Data * _data7_; 	char* path; 	char* remote_address;  }; -struct _Block8Data { +struct _Block9Data { 	int _ref_count_; -	Block6Data * _data6_; +	Block7Data * _data7_; 	char* local_nick;  }; -struct _Block6Data { +struct _Block7Data { 	int _ref_count_; 	UnityLauncherApplicationController * self; 	IndicatorDesktopShortcuts* shortcuts; @@ -250,26 +250,26 @@ UnityLauncherScrollerChild* unity_launcher_scroller_child_controller_get_child (  GType unity_launcher_pin_type_get_type (void) G_GNUC_CONST;  static void unity_launcher_application_controller_on_favorite_removed (UnityLauncherApplicationController* self, const char* uid);  static void unity_launcher_application_controller_real_get_menu_actions (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target); -static void _lambda64_ (Block5Data* _data5_); -static void _lambda65_ (Block7Data* _data7_); -static void __lambda65__dbusmenu_menuitem_realized (DbusmenuMenuitem* _sender, gpointer self); -static Block7Data* block7_data_ref (Block7Data* _data7_); -static void block7_data_unref (Block7Data* _data7_); -static void __lambda64__dbusmenu_client_layout_updated (DbusmenuClient* _sender, gpointer self); -static Block5Data* block5_data_ref (Block5Data* _data5_); -static void block5_data_unref (Block5Data* _data5_); -static void _g_list_free_g_object_unref (GList* self); -static void _lambda66_ (guint timestamp, Block8Data* _data8_); -static void __lambda66__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); +static void _lambda72_ (Block6Data* _data6_); +static void _lambda73_ (Block8Data* _data8_); +static void __lambda73__dbusmenu_menuitem_realized (DbusmenuMenuitem* _sender, gpointer self);  static Block8Data* block8_data_ref (Block8Data* _data8_);  static void block8_data_unref (Block8Data* _data8_); +static void __lambda72__dbusmenu_client_layout_updated (DbusmenuClient* _sender, gpointer self);  static Block6Data* block6_data_ref (Block6Data* _data6_);  static void block6_data_unref (Block6Data* _data6_); +static void _g_list_free_g_object_unref (GList* self); +static void _lambda74_ (guint timestamp, Block9Data* _data9_); +static void __lambda74__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); +static Block9Data* block9_data_ref (Block9Data* _data9_); +static void block9_data_unref (Block9Data* _data9_); +static Block7Data* block7_data_ref (Block7Data* _data7_); +static void block7_data_unref (Block7Data* _data7_);  static void unity_launcher_application_controller_real_get_menu_navigation (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target); -static void _lambda67_ (guint timestamp, UnityLauncherApplicationController* self); -static void __lambda67__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); -static void _lambda68_ (guint timestamp, UnityLauncherApplicationController* self); -static void __lambda68__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); +static void _lambda75_ (guint timestamp, UnityLauncherApplicationController* self); +static void __lambda75__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); +static void _lambda76_ (guint timestamp, UnityLauncherApplicationController* self); +static void __lambda76__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self);  static gint unity_launcher_application_controller_order_app_windows (void* a, void* b);  static void unity_launcher_application_controller_real_activate (UnityLauncherScrollerChildController* base);  void unity_launcher_scroller_child_set_activating (UnityLauncherScrollerChild* self, gboolean value); @@ -286,9 +286,9 @@ void unity_launcher_application_controller_detach_application (UnityLauncherAppl  static void _unity_launcher_application_controller_detach_application_bamf_view_closed (BamfView* _sender, gpointer self);  static void unity_launcher_application_controller_on_app_urgant_changed (UnityLauncherApplicationController* self, gboolean urgancy);  static void _unity_launcher_application_controller_on_app_urgant_changed_bamf_view_urgent_changed (BamfView* _sender, gboolean object, gpointer self); -static void _lambda69_ (gboolean value, UnityLauncherApplicationController* self); +static void _lambda77_ (gboolean value, UnityLauncherApplicationController* self);  void unity_launcher_scroller_child_controller_set_hide (UnityLauncherScrollerChildController* self, gboolean value); -static void __lambda69__bamf_view_user_visible_changed (BamfView* _sender, gboolean object, gpointer self); +static void __lambda77__bamf_view_user_visible_changed (BamfView* _sender, gboolean object, gpointer self);  void unity_launcher_scroller_child_controller_set_name (UnityLauncherScrollerChildController* self, const char* value);  const char* unity_launcher_scroller_child_controller_get_name (UnityLauncherScrollerChildController* self);  void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLauncherScrollerChildController* self, const char* icon_name); @@ -569,59 +569,59 @@ static const char* string_to_string (const char* self) {  } -static void _lambda65_ (Block7Data* _data7_) { -	Block5Data* _data5_; +static void _lambda73_ (Block8Data* _data8_) { 	Block6Data* _data6_; +	Block7Data* _data7_; 	UnityLauncherApplicationController * self; -	_data5_ = _data7_->_data5_; -	_data6_ = _data5_->_data6_; -	self = _data6_->self; +	_data6_ = _data8_->_data6_; +	_data7_ = _data6_->_data7_; +	self = _data7_->self; 	self->priv->menu_items_realized_counter = self->priv->menu_items_realized_counter - 1; 	if (self->priv->menu_items_realized_counter < 1) { -	_data6_->callback (_data7_->menu, _data6_->callback_target); +	_data7_->callback (_data8_->menu, _data7_->callback_target); 	}  } -static void __lambda65__dbusmenu_menuitem_realized (DbusmenuMenuitem* _sender, gpointer self) { -	_lambda65_ (self); +static void __lambda73__dbusmenu_menuitem_realized (DbusmenuMenuitem* _sender, gpointer self) { +	_lambda73_ (self);  } -static Block7Data* block7_data_ref (Block7Data* _data7_) { -	g_atomic_int_inc (&_data7_->_ref_count_); -	return _data7_; +static Block8Data* block8_data_ref (Block8Data* _data8_) { +	g_atomic_int_inc (&_data8_->_ref_count_); +	return _data8_;  } -static void block7_data_unref (Block7Data* _data7_) { -	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) { -	block5_data_unref (_data7_->_data5_); -	_g_object_unref0 (_data7_->menu); -	g_slice_free (Block7Data, _data7_); +static void block8_data_unref (Block8Data* _data8_) { +	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) { +	block6_data_unref (_data8_->_data6_); +	_g_object_unref0 (_data8_->menu); +	g_slice_free (Block8Data, _data8_); 	}  } -static void _lambda64_ (Block5Data* _data5_) { -	Block6Data* _data6_; -	UnityLauncherApplicationController * self; +static void _lambda72_ (Block6Data* _data6_) { 	Block7Data* _data7_; +	UnityLauncherApplicationController * self; +	Block8Data* _data8_; 	DbusmenuMenuitem* _tmp0_; 	GList* menu_items; -	_data6_ = _data5_->_data6_; -	self = _data6_->self; -	_data7_ = g_slice_new0 (Block7Data); -	_data7_->_ref_count_ = 1; -	_data7_->_data5_ = block5_data_ref (_data5_); -	_data7_->menu = dbusmenu_client_get_root (self->priv->menu_client); -	self->priv->cached_menu = (_tmp0_ = _g_object_ref0 (_data7_->menu), _g_object_unref0 (self->priv->cached_menu), _tmp0_); -	if (DBUSMENU_IS_MENUITEM (_data7_->menu) == FALSE) { +	_data7_ = _data6_->_data7_; +	self = _data7_->self; +	_data8_ = g_slice_new0 (Block8Data); +	_data8_->_ref_count_ = 1; +	_data8_->_data6_ = block6_data_ref (_data6_); +	_data8_->menu = dbusmenu_client_get_root (self->priv->menu_client); +	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 (_data5_->path), " - address: ", string_to_string (_data5_->remote_address), NULL)); +	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_free0 (_tmp1_); 	} -	menu_items = dbusmenu_menuitem_get_children (_data7_->menu); +	menu_items = dbusmenu_menuitem_get_children (_data8_->menu); 	self->priv->menu_items_realized_counter = (gint) g_list_length (menu_items); 	{ 	GList* menuitem_collection; @@ -631,32 +631,32 @@ static void _lambda64_ (Block5Data* _data5_) { 	DbusmenuMenuitem* menuitem; 	menuitem = _g_object_ref0 ((DbusmenuMenuitem*) menuitem_it->data); 	{ -	g_signal_connect_data (menuitem, "realized", (GCallback) __lambda65__dbusmenu_menuitem_realized, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0); +	g_signal_connect_data (menuitem, "realized", (GCallback) __lambda73__dbusmenu_menuitem_realized, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0); 	_g_object_unref0 (menuitem); 	} 	} 	} -	block7_data_unref (_data7_); +	block8_data_unref (_data8_);  } -static void __lambda64__dbusmenu_client_layout_updated (DbusmenuClient* _sender, gpointer self) { -	_lambda64_ (self); +static void __lambda72__dbusmenu_client_layout_updated (DbusmenuClient* _sender, gpointer self) { +	_lambda72_ (self);  } -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_)) { -	block6_data_unref (_data5_->_data6_); -	_g_free0 (_data5_->remote_address); -	_g_free0 (_data5_->path); -	g_slice_free (Block5Data, _data5_); +static void block6_data_unref (Block6Data* _data6_) { +	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) { +	block7_data_unref (_data6_->_data7_); +	_g_free0 (_data6_->remote_address); +	_g_free0 (_data6_->path); +	g_slice_free (Block6Data, _data6_); 	}  } @@ -667,53 +667,53 @@ static void _g_list_free_g_object_unref (GList* self) {  } -static void _lambda66_ (guint timestamp, Block8Data* _data8_) { -	Block6Data* _data6_; +static void _lambda74_ (guint timestamp, Block9Data* _data9_) { +	Block7Data* _data7_; 	UnityLauncherApplicationController * self; -	_data6_ = _data8_->_data6_; -	self = _data6_->self; -	indicator_desktop_shortcuts_nick_exec (_data6_->shortcuts, _data8_->local_nick); +	_data7_ = _data9_->_data7_; +	self = _data7_->self; +	indicator_desktop_shortcuts_nick_exec (_data7_->shortcuts, _data9_->local_nick);  } -static void __lambda66__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { -	_lambda66_ (object, self); +static void __lambda74__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { +	_lambda74_ (object, self);  } -static Block8Data* block8_data_ref (Block8Data* _data8_) { -	g_atomic_int_inc (&_data8_->_ref_count_); -	return _data8_; +static Block9Data* block9_data_ref (Block9Data* _data9_) { +	g_atomic_int_inc (&_data9_->_ref_count_); +	return _data9_;  } -static void block8_data_unref (Block8Data* _data8_) { -	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) { -	block6_data_unref (_data8_->_data6_); -	_g_free0 (_data8_->local_nick); -	g_slice_free (Block8Data, _data8_); +static void block9_data_unref (Block9Data* _data9_) { +	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) { +	block7_data_unref (_data9_->_data7_); +	_g_free0 (_data9_->local_nick); +	g_slice_free (Block9Data, _data9_); 	}  } -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_->shortcuts); -	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_->shortcuts); +	g_slice_free (Block7Data, _data7_); 	}  }  static void unity_launcher_application_controller_real_get_menu_actions (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target) { 	UnityLauncherApplicationController * self; -	Block6Data* _data6_; +	Block7Data* _data7_; 	gboolean _tmp3_ = FALSE; 	gint nicks_length1; 	gint _nicks_size_; @@ -722,11 +722,11 @@ static void unity_launcher_application_controller_real_get_menu_actions (UnityLa 	char** nicks; 	DbusmenuMenuitem* root; 	self = (UnityLauncherApplicationController*) base; -	_data6_ = g_slice_new0 (Block6Data); -	_data6_->_ref_count_ = 1; -	_data6_->self = g_object_ref (self); -	_data6_->callback = callback; -	_data6_->callback_target = callback_target; +	_data7_ = g_slice_new0 (Block7Data); +	_data7_->_ref_count_ = 1; +	_data7_->self = g_object_ref (self); +	_data7_->callback = callback; +	_data7_->callback_target = callback_target; 	if (BAMF_IS_APPLICATION (self->priv->app)) { 	GList* views; 	views = bamf_view_get_children ((BamfView*) self->priv->app); @@ -739,18 +739,18 @@ static void unity_launcher_application_controller_real_get_menu_actions (UnityLa 	view = _g_object_ref0 ((BamfView*) view_it->data); 	{ 	if (BAMF_IS_INDICATOR (view)) { -	Block5Data* _data5_; +	Block6Data* _data6_; 	BamfView* _tmp0_; 	BamfView* _tmp1_; 	DbusmenuClient* _tmp2_; -	_data5_ = g_slice_new0 (Block5Data); -	_data5_->_ref_count_ = 1; -	_data5_->_data6_ = block6_data_ref (_data6_); -	_data5_->path = g_strdup (bamf_indicator_get_dbus_menu_path ((_tmp0_ = view, BAMF_IS_INDICATOR (_tmp0_) ? ((BamfIndicator*) _tmp0_) : NULL))); -	_data5_->remote_address = g_strdup (bamf_indicator_get_remote_address ((_tmp1_ = view, BAMF_IS_INDICATOR (_tmp1_) ? ((BamfIndicator*) _tmp1_) : NULL))); -	self->priv->menu_client = (_tmp2_ = dbusmenu_client_new (_data5_->remote_address, _data5_->path), _g_object_unref0 (self->priv->menu_client), _tmp2_); -	g_signal_connect_data (self->priv->menu_client, "layout-updated", (GCallback) __lambda64__dbusmenu_client_layout_updated, block5_data_ref (_data5_), (GClosureNotify) block5_data_unref, 0); -	block5_data_unref (_data5_); +	_data6_ = g_slice_new0 (Block6Data); +	_data6_->_ref_count_ = 1; +	_data6_->_data7_ = block7_data_ref (_data7_); +	_data6_->path = g_strdup (bamf_indicator_get_dbus_menu_path ((_tmp0_ = view, BAMF_IS_INDICATOR (_tmp0_) ? ((BamfIndicator*) _tmp0_) : NULL))); +	_data6_->remote_address = g_strdup (bamf_indicator_get_remote_address ((_tmp1_ = view, BAMF_IS_INDICATOR (_tmp1_) ? ((BamfIndicator*) _tmp1_) : NULL))); +	self->priv->menu_client = (_tmp2_ = dbusmenu_client_new (_data6_->remote_address, _data6_->path), _g_object_unref0 (self->priv->menu_client), _tmp2_); +	g_signal_connect_data (self->priv->menu_client, "layout-updated", (GCallback) __lambda72__dbusmenu_client_layout_updated, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0); +	block6_data_unref (_data6_); 	} 	_g_object_unref0 (view); 	} @@ -764,12 +764,12 @@ static void unity_launcher_application_controller_real_get_menu_actions (UnityLa 	_tmp3_ = self->priv->_desktop_file == NULL; 	} 	if (_tmp3_) { -	_data6_->callback (NULL, _data6_->callback_target); +	_data7_->callback (NULL, _data7_->callback_target); 	} -	_data6_->shortcuts = indicator_desktop_shortcuts_new (self->priv->_desktop_file, "Unity"); -	nicks = (_tmp5_ = _tmp4_ = indicator_desktop_shortcuts_get_nicks (_data6_->shortcuts), nicks_length1 = _vala_array_length (_tmp4_), _nicks_size_ = nicks_length1, _tmp5_); +	_data7_->shortcuts = indicator_desktop_shortcuts_new (self->priv->_desktop_file, "Unity"); +	nicks = (_tmp5_ = _tmp4_ = indicator_desktop_shortcuts_get_nicks (_data7_->shortcuts), nicks_length1 = _vala_array_length (_tmp4_), _nicks_size_ = nicks_length1, _tmp5_); 	if (nicks_length1 < 1) { -	_data6_->callback (NULL, _data6_->callback_target); +	_data7_->callback (NULL, _data7_->callback_target); 	} 	root = dbusmenu_menuitem_new (); 	dbusmenu_menuitem_set_root (root, TRUE); @@ -783,46 +783,46 @@ static void unity_launcher_application_controller_real_get_menu_actions (UnityLa 	char* nick; 	nick = g_strdup (nick_collection[nick_it]); 	{ -	Block8Data* _data8_; +	Block9Data* _data9_; 	const char* name; 	char* local_name; 	DbusmenuMenuitem* shortcut_item; -	_data8_ = g_slice_new0 (Block8Data); -	_data8_->_ref_count_ = 1; -	_data8_->_data6_ = block6_data_ref (_data6_); -	_data8_->local_nick = g_strdup (nick); -	name = indicator_desktop_shortcuts_nick_get_name (_data6_->shortcuts, _data8_->local_nick); +	_data9_ = g_slice_new0 (Block9Data); +	_data9_->_ref_count_ = 1; +	_data9_->_data7_ = block7_data_ref (_data7_); +	_data9_->local_nick = g_strdup (nick); +	name = indicator_desktop_shortcuts_nick_get_name (_data7_->shortcuts, _data9_->local_nick); 	local_name = g_strdup (name); 	shortcut_item = dbusmenu_menuitem_new (); 	dbusmenu_menuitem_property_set (shortcut_item, DBUSMENU_MENUITEM_PROP_LABEL, local_name); 	dbusmenu_menuitem_property_set_bool (shortcut_item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); 	dbusmenu_menuitem_property_set_bool (shortcut_item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); -	g_signal_connect_data (shortcut_item, "item-activated", (GCallback) __lambda66__dbusmenu_menuitem_item_activated, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0); +	g_signal_connect_data (shortcut_item, "item-activated", (GCallback) __lambda74__dbusmenu_menuitem_item_activated, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0); 	dbusmenu_menuitem_child_append (root, shortcut_item); 	_g_object_unref0 (shortcut_item); 	_g_free0 (local_name); 	_g_free0 (nick); -	block8_data_unref (_data8_); +	block9_data_unref (_data9_); 	} 	} 	} -	_data6_->callback (root, _data6_->callback_target); +	_data7_->callback (root, _data7_->callback_target); 	_g_object_unref0 (root); -	block6_data_unref (_data6_); +	block7_data_unref (_data7_);  } -static void _lambda67_ (guint timestamp, UnityLauncherApplicationController* self) { +static void _lambda75_ (guint timestamp, UnityLauncherApplicationController* self) { 	unity_launcher_application_controller_set_sticky (self, !unity_launcher_application_controller_is_sticky (self));  } -static void __lambda67__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { -	_lambda67_ (object, self); +static void __lambda75__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { +	_lambda75_ (object, self);  } -static void _lambda68_ (guint timestamp, UnityLauncherApplicationController* self) { +static void _lambda76_ (guint timestamp, UnityLauncherApplicationController* self) { 	if (BAMF_IS_APPLICATION (self->priv->app)) { 	GArray* xids; 	xids = bamf_application_get_xids (self->priv->app); @@ -832,8 +832,8 @@ static void _lambda68_ (guint timestamp, UnityLauncherApplicationController* sel  } -static void __lambda68__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { -	_lambda68_ (object, self); +static void __lambda76__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { +	_lambda76_ (object, self);  } @@ -865,7 +865,7 @@ static void unity_launcher_application_controller_real_get_menu_navigation (Unit 	} 	dbusmenu_menuitem_property_set_bool (pinning_item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); 	dbusmenu_menuitem_property_set_bool (pinning_item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); -	g_signal_connect_object (pinning_item, "item-activated", (GCallback) __lambda67__dbusmenu_menuitem_item_activated, self, 0); +	g_signal_connect_object (pinning_item, "item-activated", (GCallback) __lambda75__dbusmenu_menuitem_item_activated, self, 0); 	dbusmenu_menuitem_child_append (root, pinning_item); 	_g_object_unref0 (pinning_item); 	} @@ -875,7 +875,7 @@ static void unity_launcher_application_controller_real_get_menu_navigation (Unit 	dbusmenu_menuitem_property_set (app_item, DBUSMENU_MENUITEM_PROP_LABEL, _ ("Quit")); 	dbusmenu_menuitem_property_set_bool (app_item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); 	dbusmenu_menuitem_property_set_bool (app_item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); -	g_signal_connect_object (app_item, "item-activated", (GCallback) __lambda68__dbusmenu_menuitem_item_activated, self, 0); +	g_signal_connect_object (app_item, "item-activated", (GCallback) __lambda76__dbusmenu_menuitem_item_activated, self, 0); 	dbusmenu_menuitem_child_append (root, app_item); 	_g_object_unref0 (app_item); 	} @@ -972,14 +972,14 @@ static void unity_launcher_application_controller_real_activate (UnityLauncherSc 	g_app_info_launch ((GAppInfo*) appinfo, NULL, (GAppLaunchContext*) context, &_inner_error_); 	if (_inner_error_ != NULL) { 	_g_object_unref0 (appinfo); -	goto __catch43_g_error; +	goto __catch44_g_error; 	} 	unity_launcher_scroller_child_set_activating (unity_launcher_scroller_child_controller_get_child ((UnityLauncherScrollerChildController*) self), TRUE); 	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 8, _unity_launcher_application_controller_on_launch_timeout_gsource_func, g_object_ref (self), g_object_unref); 	_g_object_unref0 (appinfo); 	} -	goto __finally43; -	__catch43_g_error: +	goto __finally44; +	__catch44_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -989,7 +989,7 @@ static void unity_launcher_application_controller_real_activate (UnityLauncherSc 	_g_error_free0 (e); 	} 	} -	__finally43: +	__finally44: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (context); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1030,13 +1030,13 @@ static void _unity_launcher_application_controller_on_app_urgant_changed_bamf_vi  } -static void _lambda69_ (gboolean value, UnityLauncherApplicationController* self) { +static void _lambda77_ (gboolean value, UnityLauncherApplicationController* self) { 	unity_launcher_scroller_child_controller_set_hide ((UnityLauncherScrollerChildController*) self, !value);  } -static void __lambda69__bamf_view_user_visible_changed (BamfView* _sender, gboolean object, gpointer self) { -	_lambda69_ (object, self); +static void __lambda77__bamf_view_user_visible_changed (BamfView* _sender, gboolean object, gpointer self) { +	_lambda77_ (object, self);  } @@ -1058,7 +1058,7 @@ void unity_launcher_application_controller_attach_application (UnityLauncherAppl 	g_signal_connect_object ((BamfView*) self->priv->app, "active-changed", (GCallback) _unity_launcher_application_controller_on_app_active_changed_bamf_view_active_changed, self, 0); 	g_signal_connect_object ((BamfView*) self->priv->app, "closed", (GCallback) _unity_launcher_application_controller_detach_application_bamf_view_closed, self, 0); 	g_signal_connect_object ((BamfView*) self->priv->app, "urgent-changed", (GCallback) _unity_launcher_application_controller_on_app_urgant_changed_bamf_view_urgent_changed, self, 0); -	g_signal_connect_object ((BamfView*) self->priv->app, "user-visible-changed", (GCallback) __lambda69__bamf_view_user_visible_changed, self, 0); +	g_signal_connect_object ((BamfView*) self->priv->app, "user-visible-changed", (GCallback) __lambda77__bamf_view_user_visible_changed, self, 0); 	unity_launcher_scroller_child_controller_set_name ((UnityLauncherScrollerChildController*) self, _tmp2_ = bamf_view_get_name ((BamfView*) self->priv->app)); 	_g_free0 (_tmp2_); 	if (unity_launcher_scroller_child_controller_get_name ((UnityLauncherScrollerChildController*) self) == NULL) { @@ -1136,11 +1136,11 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	self->priv->desktop_keyfile = (_tmp0_ = g_key_file_new (), _g_key_file_free0 (self->priv->desktop_keyfile), _tmp0_); 	g_key_file_load_from_file (self->priv->desktop_keyfile, self->priv->_desktop_file, G_KEY_FILE_NONE, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch44_g_error; +	goto __catch45_g_error; 	} 	} -	goto __finally44; -	__catch44_g_error: +	goto __finally45; +	__catch45_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -1150,7 +1150,7 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	_g_error_free0 (e); 	} 	} -	__finally44: +	__finally45: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -1161,13 +1161,13 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	char* _tmp2_; 	_tmp1_ = g_key_file_get_string (self->priv->desktop_keyfile, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ICON, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch45_g_error; +	goto __catch46_g_error; 	} 	self->priv->icon_name = (_tmp2_ = _tmp1_, _g_free0 (self->priv->icon_name), _tmp2_); 	unity_launcher_scroller_child_controller_load_icon_from_icon_name ((UnityLauncherScrollerChildController*) self, self->priv->icon_name); 	} -	goto __finally45; -	__catch45_g_error: +	goto __finally46; +	__catch46_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -1178,7 +1178,7 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	_g_error_free0 (e); 	} 	} -	__finally45: +	__finally46: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -1189,13 +1189,13 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	char* _tmp4_; 	_tmp3_ = g_key_file_get_locale_string (self->priv->desktop_keyfile, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, NULL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch46_g_error; +	goto __catch47_g_error; 	} 	unity_launcher_scroller_child_controller_set_name ((UnityLauncherScrollerChildController*) self, _tmp4_ = _tmp3_); 	_g_free0 (_tmp4_); 	} -	goto __finally46; -	__catch46_g_error: +	goto __finally47; +	__catch47_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -1206,7 +1206,7 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	_g_error_free0 (e); 	} 	} -	__finally46: +	__finally47: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -1217,13 +1217,13 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	char* _tmp6_; 	_tmp5_ = g_key_file_get_locale_string (self->priv->desktop_keyfile, G_KEY_FILE_DESKTOP_GROUP, "X-GNOME-FullName", NULL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch47_g_error; +	goto __catch48_g_error; 	} 	unity_launcher_scroller_child_controller_set_name ((UnityLauncherScrollerChildController*) self, _tmp6_ = _tmp5_); 	_g_free0 (_tmp6_); 	} -	goto __finally47; -	__catch47_g_error: +	goto __finally48; +	__catch48_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -1232,7 +1232,7 @@ static void unity_launcher_application_controller_load_desktop_file_info (UnityL 	_g_error_free0 (e); 	} 	} -	__finally47: +	__finally48: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); diff --git a/unity-private/launcher/launcher.c b/unity-private/launcher/launcher.c index 227191ffd..c8b5c5fc7 100644 --- a/unity-private/launcher/launcher.c +++ b/unity-private/launcher/launcher.c @@ -184,8 +184,8 @@ UnityLauncherScrollerView* unity_launcher_scroller_view_new (UnityLauncherScroll  UnityLauncherScrollerView* unity_launcher_scroller_view_construct (GType object_type, UnityLauncherScrollerModel* _model, CtkEffectCache* _cache);  UnityLauncherScrollerController* unity_launcher_scroller_controller_new (UnityLauncherScrollerModel* _model, UnityLauncherScrollerView* _view);  UnityLauncherScrollerController* unity_launcher_scroller_controller_construct (GType object_type, UnityLauncherScrollerModel* _model, UnityLauncherScrollerView* _view); -static void _lambda84_ (UnityLauncherLauncher* self); -static void __lambda84__clutter_actor_queue_redraw (ClutterActor* _sender, ClutterActor* origin, gpointer self); +static void _lambda92_ (UnityLauncherLauncher* self); +static void __lambda92__clutter_actor_queue_redraw (ClutterActor* _sender, ClutterActor* origin, gpointer self);  static GObject * unity_launcher_launcher_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_launcher_launcher_finalize (GObject* obj);  static void unity_launcher_launcher_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -368,15 +368,15 @@ static void unity_launcher_launcher_set_model (UnityLauncherLauncher* self, Unit  } -static void _lambda84_ (UnityLauncherLauncher* self) { +static void _lambda92_ (UnityLauncherLauncher* self) { 	if (clutter_timeline_is_playing (self->priv->view->fling_timeline) == FALSE) { 	ctk_effect_cache_update_texture_cache (self->priv->launcher_container->cache); 	}  } -static void __lambda84__clutter_actor_queue_redraw (ClutterActor* _sender, ClutterActor* origin, gpointer self) { -	_lambda84_ (self); +static void __lambda92__clutter_actor_queue_redraw (ClutterActor* _sender, ClutterActor* origin, gpointer self) { +	_lambda92_ (self);  } @@ -397,7 +397,7 @@ static GObject * unity_launcher_launcher_constructor (GType type, guint n_constr 	self->priv->launcher_container = (_tmp1_ = g_object_ref_sink (unity_launcher_launcher_container_new ()), _g_object_unref0 (self->priv->launcher_container), _tmp1_); 	self->priv->view = (_tmp2_ = g_object_ref_sink (unity_launcher_scroller_view_new (self->priv->_model, self->priv->launcher_container->cache)), _g_object_unref0 (self->priv->view), _tmp2_); 	self->priv->controller = (_tmp3_ = unity_launcher_scroller_controller_new (self->priv->_model, self->priv->view), _g_object_unref0 (self->priv->controller), _tmp3_); -	g_signal_connect_object ((ClutterActor*) self->priv->view, "queue-redraw", (GCallback) __lambda84__clutter_actor_queue_redraw, self, 0); +	g_signal_connect_object ((ClutterActor*) self->priv->view, "queue-redraw", (GCallback) __lambda92__clutter_actor_queue_redraw, self, 0); 	} 	return obj;  } diff --git a/unity-private/launcher/quicklist-controller.c b/unity-private/launcher/quicklist-controller.c index b5ad75266..dc23637fc 100644 --- a/unity-private/launcher/quicklist-controller.c +++ b/unity-private/launcher/quicklist-controller.c @@ -131,7 +131,7 @@ typedef struct _UnityLauncherQuicklistCheckMenuItemClass UnityLauncherQuicklistC  typedef struct _UnityLauncherQuicklistRadioMenuItem UnityLauncherQuicklistRadioMenuItem;  typedef struct _UnityLauncherQuicklistRadioMenuItemClass UnityLauncherQuicklistRadioMenuItemClass; -typedef struct _Block9Data Block9Data; +typedef struct _Block10Data Block10Data;  #define UNITY_TESTING_TYPE_OBJECT_REGISTRY (unity_testing_object_registry_get_type ())  #define UNITY_TESTING_OBJECT_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TESTING_TYPE_OBJECT_REGISTRY, UnityTestingObjectRegistry)) @@ -175,7 +175,7 @@ struct _UnityLauncherApplicationQuicklistControllerClass {  };  typedef void (*UnityLauncherScrollerChildControllermenu_cb) (DbusmenuMenuitem* menu, void* user_data); -struct _Block9Data { +struct _Block10Data { 	int _ref_count_; 	UnityLauncherApplicationQuicklistController * self; 	CtkMenuItem* menuitem; @@ -221,8 +221,8 @@ static void unity_launcher_application_quicklist_controller_new_menu (UnityLaunc  UnityLauncherQuicklistMenu* unity_launcher_quicklist_menu_new (void);  UnityLauncherQuicklistMenu* unity_launcher_quicklist_menu_construct (GType object_type);  GType unity_launcher_quicklist_menu_get_type (void) G_GNUC_CONST; -static void _lambda20_ (UnityLauncherApplicationQuicklistController* self); -static void __lambda20__clutter_actor_destroy (ClutterActor* _sender, gpointer self); +static void _lambda21_ (UnityLauncherApplicationQuicklistController* self); +static void __lambda21__clutter_actor_destroy (ClutterActor* _sender, gpointer self);  GType unity_launcher_scroller_child_get_type (void) G_GNUC_CONST;  UnityLauncherScrollerChild* unity_launcher_scroller_child_controller_get_child (UnityLauncherScrollerChildController* self);  static void unity_launcher_application_quicklist_controller_attach_to_stage (UnityLauncherApplicationQuicklistController* self, ClutterActor* child, ClutterActor* parent); @@ -232,38 +232,38 @@ const char* unity_launcher_scroller_child_controller_get_name (UnityLauncherScro  UnityLauncherQuicklistMenuItem* unity_launcher_quicklist_menu_item_new_with_label (const char* label);  UnityLauncherQuicklistMenuItem* unity_launcher_quicklist_menu_item_construct_with_label (GType object_type, const char* label);  GType unity_launcher_quicklist_menu_item_get_type (void) G_GNUC_CONST; -static void _lambda21_ (UnityLauncherApplicationQuicklistController* self); -static void __lambda21__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self); +static void _lambda22_ (UnityLauncherApplicationQuicklistController* self); +static void __lambda22__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self);  void unity_launcher_scroller_child_controller_get_menu_actions (UnityLauncherScrollerChildController* self, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target); -static void _lambda22_ (DbusmenuMenuitem* top_menu, UnityLauncherApplicationQuicklistController* self); +static void _lambda23_ (DbusmenuMenuitem* top_menu, UnityLauncherApplicationQuicklistController* self);  UnityLauncherQuicklistMenuSeperator* unity_launcher_quicklist_menu_seperator_new (void);  UnityLauncherQuicklistMenuSeperator* unity_launcher_quicklist_menu_seperator_construct (GType object_type);  GType unity_launcher_quicklist_menu_seperator_get_type (void) G_GNUC_CONST;  static CtkMenuItem* unity_launcher_application_quicklist_controller_menu_item_from_dbusmenuitem (UnityLauncherApplicationQuicklistController* self, DbusmenuMenuitem* dbusmenuitem); -static void __lambda22__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self); +static void __lambda23__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self);  void unity_launcher_scroller_child_controller_get_menu_navigation (UnityLauncherScrollerChildController* self, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target); -static void _lambda29_ (DbusmenuMenuitem* bottom_menu, UnityLauncherApplicationQuicklistController* self); -static void __lambda29__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self); +static void _lambda30_ (DbusmenuMenuitem* bottom_menu, UnityLauncherApplicationQuicklistController* self); +static void __lambda30__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self);  UnityLauncherQuicklistCheckMenuItem* unity_launcher_quicklist_check_menu_item_new_with_label (const char* label);  UnityLauncherQuicklistCheckMenuItem* unity_launcher_quicklist_check_menu_item_construct_with_label (GType object_type, const char* label);  GType unity_launcher_quicklist_check_menu_item_get_type (void) G_GNUC_CONST;  UnityLauncherQuicklistRadioMenuItem* unity_launcher_quicklist_radio_menu_item_new_with_label (GSList* group, const char* label);  UnityLauncherQuicklistRadioMenuItem* unity_launcher_quicklist_radio_menu_item_construct_with_label (GType object_type, GSList* group, const char* label);  GType unity_launcher_quicklist_radio_menu_item_get_type (void) G_GNUC_CONST; -static void _lambda23_ (Block9Data* _data9_); -static void __lambda23__ctk_check_menu_item_toggled (CtkCheckMenuItem* _sender, gpointer self); -static void _lambda24_ (const char* property_name, void* value, Block9Data* _data9_); -static void __lambda24__dbusmenu_menuitem_property_changed (DbusmenuMenuitem* _sender, const char* property_name, void* value, gpointer self); -static void _lambda25_ (const char* property_name, void* value, Block9Data* _data9_); +static void _lambda24_ (Block10Data* _data10_); +static void __lambda24__ctk_check_menu_item_toggled (CtkCheckMenuItem* _sender, gpointer self); +static void _lambda25_ (const char* property_name, void* value, Block10Data* _data10_);  static void __lambda25__dbusmenu_menuitem_property_changed (DbusmenuMenuitem* _sender, const char* property_name, void* value, gpointer self); -static void _lambda26_ (Block9Data* _data9_); -static void __lambda26__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self); -static void _lambda27_ (UnityLauncherApplicationQuicklistController* self); -static gboolean _lambda28_ (UnityLauncherApplicationQuicklistController* self); -static gboolean __lambda28__gsource_func (gpointer self); +static void _lambda26_ (const char* property_name, void* value, Block10Data* _data10_); +static void __lambda26__dbusmenu_menuitem_property_changed (DbusmenuMenuitem* _sender, const char* property_name, void* value, gpointer self); +static void _lambda27_ (Block10Data* _data10_);  static void __lambda27__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self); -static Block9Data* block9_data_ref (Block9Data* _data9_); -static void block9_data_unref (Block9Data* _data9_); +static void _lambda28_ (UnityLauncherApplicationQuicklistController* self); +static gboolean _lambda29_ (UnityLauncherApplicationQuicklistController* self); +static gboolean __lambda29__gsource_func (gpointer self); +static void __lambda28__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self); +static Block10Data* block10_data_ref (Block10Data* _data10_); +static void block10_data_unref (Block10Data* _data10_);  gpointer unity_testing_object_registry_ref (gpointer instance);  void unity_testing_object_registry_unref (gpointer instance);  GParamSpec* unity_testing_param_spec_object_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); @@ -274,8 +274,8 @@ GType unity_testing_object_registry_get_type (void) G_GNUC_CONST;  UnityTestingObjectRegistry* unity_testing_object_registry_get_default (void);  void unity_testing_object_registry_register (UnityTestingObjectRegistry* self, const char* name, GObject* object);  static void _unity_launcher_application_quicklist_controller_on_state_change_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); -static void _lambda30_ (UnityLauncherApplicationQuicklistController* self); -static void __lambda30__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self); +static void _lambda31_ (UnityLauncherApplicationQuicklistController* self); +static void __lambda31__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self);  static GObject * unity_launcher_application_quicklist_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static int _vala_strcmp0 (const char * str1, const char * str2); @@ -495,13 +495,13 @@ UnityLauncherApplicationQuicklistController* unity_launcher_application_quicklis  } -static void _lambda20_ (UnityLauncherApplicationQuicklistController* self) { +static void _lambda21_ (UnityLauncherApplicationQuicklistController* self) { 	unity_shell_remove_fullscreen_request (unity_global_shell, (GObject*) self);  } -static void __lambda20__clutter_actor_destroy (ClutterActor* _sender, gpointer self) { -	_lambda20_ (self); +static void __lambda21__clutter_actor_destroy (ClutterActor* _sender, gpointer self) { +	_lambda21_ (self);  } @@ -512,7 +512,7 @@ static void unity_launcher_application_quicklist_controller_new_menu (UnityLaunc 	g_return_if_fail (self != NULL); 	((UnityLauncherQuicklistController*) self)->menu = (_tmp1_ = (_tmp0_ = g_object_ref_sink (unity_launcher_quicklist_menu_new ()), CTK_IS_MENU_EXPANDABLE (_tmp0_) ? ((CtkMenuExpandable*) _tmp0_) : NULL), _g_object_unref0 (((UnityLauncherQuicklistController*) self)->menu), _tmp1_); 	if (UNITY_IS_SHELL (unity_global_shell)) { -	g_signal_connect_object ((ClutterActor*) ((UnityLauncherQuicklistController*) self)->menu, "destroy", (GCallback) __lambda20__clutter_actor_destroy, self, 0); +	g_signal_connect_object ((ClutterActor*) ((UnityLauncherQuicklistController*) self)->menu, "destroy", (GCallback) __lambda21__clutter_actor_destroy, self, 0); 	ctk_menu_set_swallow_clicks ((CtkMenu*) ((UnityLauncherQuicklistController*) self)->menu, unity_shell_get_menus_swallow_events (unity_global_shell)); 	} 	ctk_menu_set_detect_clicks ((CtkMenu*) ((UnityLauncherQuicklistController*) self)->menu, FALSE); @@ -545,17 +545,17 @@ static void unity_launcher_application_quicklist_controller_attach_to_stage (Uni  } -static void _lambda21_ (UnityLauncherApplicationQuicklistController* self) { +static void _lambda22_ (UnityLauncherApplicationQuicklistController* self) { 	unity_launcher_quicklist_controller_set_state ((UnityLauncherQuicklistController*) self, UNITY_LAUNCHER_QUICKLIST_CONTROLLER_STATE_CLOSED);  } -static void __lambda21__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self) { -	_lambda21_ (self); +static void __lambda22__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self) { +	_lambda22_ (self);  } -static void _lambda22_ (DbusmenuMenuitem* top_menu, UnityLauncherApplicationQuicklistController* self) { +static void _lambda23_ (DbusmenuMenuitem* top_menu, UnityLauncherApplicationQuicklistController* self) { 	if (DBUSMENU_IS_MENUITEM (top_menu)) { 	if (dbusmenu_menuitem_get_root (top_menu)) { 	GList* menu_items; @@ -593,12 +593,12 @@ static void _lambda22_ (DbusmenuMenuitem* top_menu, UnityLauncherApplicationQuic  } -static void __lambda22__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self) { -	_lambda22_ (menu, self); +static void __lambda23__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self) { +	_lambda23_ (menu, self);  } -static void _lambda29_ (DbusmenuMenuitem* bottom_menu, UnityLauncherApplicationQuicklistController* self) { +static void _lambda30_ (DbusmenuMenuitem* bottom_menu, UnityLauncherApplicationQuicklistController* self) { 	float x = 0.0F; 	float y = 0.0F; 	float w = 0.0F; @@ -646,8 +646,8 @@ static void _lambda29_ (DbusmenuMenuitem* bottom_menu, UnityLauncherApplicationQ  } -static void __lambda29__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self) { -	_lambda29_ (menu, self); +static void __lambda30__unitylauncherscrollerchildcontrollermenu_cb (DbusmenuMenuitem* menu, gpointer self) { +	_lambda30_ (menu, self);  } @@ -677,7 +677,7 @@ static void unity_launcher_application_quicklist_controller_on_state_change (Uni 	ctk_menu_remove_all ((CtkMenu*) ((UnityLauncherQuicklistController*) self)->menu); 	label = g_strdup (unity_launcher_scroller_child_controller_get_name (unity_launcher_quicklist_controller_get_attached_controller ((UnityLauncherQuicklistController*) self))); 	menuitem = g_object_ref_sink (unity_launcher_quicklist_menu_item_new_with_label (label)); -	g_signal_connect_object ((CtkMenuItem*) menuitem, "activated", (GCallback) __lambda21__ctk_menu_item_activated, self, 0); +	g_signal_connect_object ((CtkMenuItem*) menuitem, "activated", (GCallback) __lambda22__ctk_menu_item_activated, self, 0); 	clutter_actor_set_reactive ((ClutterActor*) menuitem, FALSE); 	ctk_menu_append ((CtkMenu*) ((UnityLauncherQuicklistController*) self)->menu, (ClutterActor*) menuitem, TRUE); 	clutter_actor_get_transformed_position ((ClutterActor*) (_tmp0_ = unity_launcher_scroller_child_controller_get_child (unity_launcher_quicklist_controller_get_attached_controller ((UnityLauncherQuicklistController*) self)), CTK_IS_ACTOR (_tmp0_) ? ((CtkActor*) _tmp0_) : NULL), &x, &y); @@ -695,37 +695,37 @@ static void unity_launcher_application_quicklist_controller_on_state_change (Uni 	} 	ctk_menu_set_close_on_leave ((CtkMenu*) ((UnityLauncherQuicklistController*) self)->menu, FALSE); 	ctk_menu_set_detect_clicks ((CtkMenu*) ((UnityLauncherQuicklistController*) self)->menu, TRUE); -	unity_launcher_scroller_child_controller_get_menu_actions (unity_launcher_quicklist_controller_get_attached_controller ((UnityLauncherQuicklistController*) self), __lambda22__unitylauncherscrollerchildcontrollermenu_cb, self); -	unity_launcher_scroller_child_controller_get_menu_navigation (unity_launcher_quicklist_controller_get_attached_controller ((UnityLauncherQuicklistController*) self), __lambda29__unitylauncherscrollerchildcontrollermenu_cb, self); +	unity_launcher_scroller_child_controller_get_menu_actions (unity_launcher_quicklist_controller_get_attached_controller ((UnityLauncherQuicklistController*) self), __lambda23__unitylauncherscrollerchildcontrollermenu_cb, self); +	unity_launcher_scroller_child_controller_get_menu_navigation (unity_launcher_quicklist_controller_get_attached_controller ((UnityLauncherQuicklistController*) self), __lambda30__unitylauncherscrollerchildcontrollermenu_cb, self); 	} 	}  } -static void _lambda23_ (Block9Data* _data9_) { +static void _lambda24_ (Block10Data* _data10_) { 	UnityLauncherApplicationQuicklistController * self; 	gint _tmp0_ = 0; 	CtkMenuItem* _tmp1_; 	gint is_checked; -	self = _data9_->self; -	if (ctk_check_menu_item_get_active ((_tmp1_ = _data9_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp1_) ? ((CtkCheckMenuItem*) _tmp1_) : NULL))) { +	self = _data10_->self; +	if (ctk_check_menu_item_get_active ((_tmp1_ = _data10_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp1_) ? ((CtkCheckMenuItem*) _tmp1_) : NULL))) { 	_tmp0_ = DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED; 	} else { 	_tmp0_ = DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED; 	} 	is_checked = _tmp0_; -	dbusmenu_menuitem_property_set_int (_data9_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, is_checked); +	dbusmenu_menuitem_property_set_int (_data10_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, is_checked);  } -static void __lambda23__ctk_check_menu_item_toggled (CtkCheckMenuItem* _sender, gpointer self) { -	_lambda23_ (self); +static void __lambda24__ctk_check_menu_item_toggled (CtkCheckMenuItem* _sender, gpointer self) { +	_lambda24_ (self);  } -static void _lambda24_ (const char* property_name, void* value, Block9Data* _data9_) { +static void _lambda25_ (const char* property_name, void* value, Block10Data* _data10_) { 	UnityLauncherApplicationQuicklistController * self; -	self = _data9_->self; +	self = _data10_->self; 	g_return_if_fail (property_name != NULL); 	if (_vala_strcmp0 (property_name, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE) == 0) { 	gint* value_weak; @@ -737,52 +737,52 @@ static void _lambda24_ (const char* property_name, void* value, Block9Data* _dat 	} else { 	_tmp0_ = FALSE; 	} -	ctk_check_menu_item_set_active ((_tmp1_ = _data9_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp1_) ? ((CtkCheckMenuItem*) _tmp1_) : NULL), _tmp0_); +	ctk_check_menu_item_set_active ((_tmp1_ = _data10_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp1_) ? ((CtkCheckMenuItem*) _tmp1_) : NULL), _tmp0_); 	}  } -static void __lambda24__dbusmenu_menuitem_property_changed (DbusmenuMenuitem* _sender, const char* property_name, void* value, gpointer self) { -	_lambda24_ (property_name, value, self); +static void __lambda25__dbusmenu_menuitem_property_changed (DbusmenuMenuitem* _sender, const char* property_name, void* value, gpointer self) { +	_lambda25_ (property_name, value, self);  } -static void _lambda25_ (const char* property_name, void* value, Block9Data* _data9_) { +static void _lambda26_ (const char* property_name, void* value, Block10Data* _data10_) { 	UnityLauncherApplicationQuicklistController * self; -	self = _data9_->self; +	self = _data10_->self; 	g_return_if_fail (property_name != NULL); 	if (_vala_strcmp0 (property_name, DBUSMENU_MENUITEM_PROP_LABEL) == 0) { 	const char* value_weak; 	value_weak = (const char*) value; -	ctk_menu_item_set_label (_data9_->menuitem, value_weak); +	ctk_menu_item_set_label (_data10_->menuitem, value_weak); 	} else { 	if (_vala_strcmp0 (property_name, DBUSMENU_MENUITEM_PROP_ENABLED) == 0) { 	gboolean* value_weak; 	value_weak = (gboolean*) value; -	clutter_actor_set_reactive ((ClutterActor*) _data9_->menuitem, *value_weak); +	clutter_actor_set_reactive ((ClutterActor*) _data10_->menuitem, *value_weak); 	} 	}  } -static void __lambda25__dbusmenu_menuitem_property_changed (DbusmenuMenuitem* _sender, const char* property_name, void* value, gpointer self) { -	_lambda25_ (property_name, value, self); +static void __lambda26__dbusmenu_menuitem_property_changed (DbusmenuMenuitem* _sender, const char* property_name, void* value, gpointer self) { +	_lambda26_ (property_name, value, self);  } -static void _lambda26_ (Block9Data* _data9_) { +static void _lambda27_ (Block10Data* _data10_) { 	UnityLauncherApplicationQuicklistController * self; -	self = _data9_->self; -	dbusmenu_menuitem_handle_event (_data9_->dbusmenuitem, "clicked", NULL, (guint) clutter_get_current_event_time ()); +	self = _data10_->self; +	dbusmenu_menuitem_handle_event (_data10_->dbusmenuitem, "clicked", NULL, (guint) clutter_get_current_event_time ());  } -static void __lambda26__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self) { -	_lambda26_ (self); +static void __lambda27__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self) { +	_lambda27_ (self);  } -static gboolean _lambda28_ (UnityLauncherApplicationQuicklistController* self) { +static gboolean _lambda29_ (UnityLauncherApplicationQuicklistController* self) { 	gboolean result = FALSE; 	unity_launcher_quicklist_controller_set_state ((UnityLauncherQuicklistController*) self, UNITY_LAUNCHER_QUICKLIST_CONTROLLER_STATE_CLOSED); 	result = FALSE; @@ -790,42 +790,42 @@ static gboolean _lambda28_ (UnityLauncherApplicationQuicklistController* self) {  } -static gboolean __lambda28__gsource_func (gpointer self) { +static gboolean __lambda29__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda28_ (self); +	result = _lambda29_ (self); 	return result;  } -static void _lambda27_ (UnityLauncherApplicationQuicklistController* self) { -	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda28__gsource_func, g_object_ref (self), g_object_unref); +static void _lambda28_ (UnityLauncherApplicationQuicklistController* self) { +	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda29__gsource_func, g_object_ref (self), g_object_unref);  } -static void __lambda27__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self) { -	_lambda27_ (self); +static void __lambda28__ctk_menu_item_activated (CtkMenuItem* _sender, gpointer self) { +	_lambda28_ (self);  } -static Block9Data* block9_data_ref (Block9Data* _data9_) { -	g_atomic_int_inc (&_data9_->_ref_count_); -	return _data9_; +static Block10Data* block10_data_ref (Block10Data* _data10_) { +	g_atomic_int_inc (&_data10_->_ref_count_); +	return _data10_;  } -static void block9_data_unref (Block9Data* _data9_) { -	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) { -	_g_object_unref0 (_data9_->self); -	_g_object_unref0 (_data9_->menuitem); -	_g_object_unref0 (_data9_->dbusmenuitem); -	g_slice_free (Block9Data, _data9_); +static void block10_data_unref (Block10Data* _data10_) { +	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) { +	_g_object_unref0 (_data10_->self); +	_g_object_unref0 (_data10_->menuitem); +	_g_object_unref0 (_data10_->dbusmenuitem); +	g_slice_free (Block10Data, _data10_); 	}  }  static CtkMenuItem* unity_launcher_application_quicklist_controller_menu_item_from_dbusmenuitem (UnityLauncherApplicationQuicklistController* self, DbusmenuMenuitem* dbusmenuitem) { 	CtkMenuItem* result = NULL; -	Block9Data* _data9_; +	Block10Data* _data10_; 	char* label; 	char* _tmp0_; 	char* type; @@ -833,14 +833,14 @@ static CtkMenuItem* unity_launcher_application_quicklist_controller_menu_item_fr 	CtkMenuItem* _tmp12_; 	g_return_val_if_fail (self != NULL, NULL); 	g_return_val_if_fail (dbusmenuitem != NULL, NULL); -	_data9_ = g_slice_new0 (Block9Data); -	_data9_->_ref_count_ = 1; -	_data9_->self = g_object_ref (self); -	_data9_->dbusmenuitem = _g_object_ref0 (dbusmenuitem); +	_data10_ = g_slice_new0 (Block10Data); +	_data10_->_ref_count_ = 1; +	_data10_->self = g_object_ref (self); +	_data10_->dbusmenuitem = _g_object_ref0 (dbusmenuitem); 	label = g_strdup ("UNDEFINED"); -	label = (_tmp0_ = g_strdup (dbusmenu_menuitem_property_get (_data9_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_LABEL)), _g_free0 (label), _tmp0_); +	label = (_tmp0_ = g_strdup (dbusmenu_menuitem_property_get (_data10_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_LABEL)), _g_free0 (label), _tmp0_); 	type = g_strdup ("label"); -	check_type = g_strdup (dbusmenu_menuitem_property_get (_data9_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE)); +	check_type = g_strdup (dbusmenu_menuitem_property_get (_data10_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE)); 	if (_vala_strcmp0 (check_type, DBUSMENU_MENUITEM_TOGGLE_CHECK) == 0) { 	char* _tmp1_; 	type = (_tmp1_ = g_strdup ("check"), _g_free0 (type), _tmp1_); @@ -849,17 +849,17 @@ static CtkMenuItem* unity_launcher_application_quicklist_controller_menu_item_fr 	char* _tmp2_; 	type = (_tmp2_ = g_strdup ("radio"), _g_free0 (type), _tmp2_); 	} -	if (_vala_strcmp0 (dbusmenu_menuitem_property_get (_data9_->dbusmenuitem, "type"), DBUSMENU_CLIENT_TYPES_SEPARATOR) == 0) { +	if (_vala_strcmp0 (dbusmenu_menuitem_property_get (_data10_->dbusmenuitem, "type"), DBUSMENU_CLIENT_TYPES_SEPARATOR) == 0) { 	char* _tmp3_; 	type = (_tmp3_ = g_strdup ("seperator"), _g_free0 (type), _tmp3_); 	} -	if (dbusmenu_menuitem_property_get (_data9_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_ICON_NAME) != NULL) { +	if (dbusmenu_menuitem_property_get (_data10_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_ICON_NAME) != NULL) { 	char* _tmp4_; 	type = (_tmp4_ = g_strdup ("stock_image"), _g_free0 (type), _tmp4_); 	} 	if (_vala_strcmp0 (type, "label") == 0) { 	CtkMenuItem* _tmp5_; -	_data9_->menuitem = (_tmp5_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_menu_item_new_with_label (label)), _g_object_unref0 (_data9_->menuitem), _tmp5_); +	_data10_->menuitem = (_tmp5_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_menu_item_new_with_label (label)), _g_object_unref0 (_data10_->menuitem), _tmp5_); 	} else { 	gboolean _tmp6_ = FALSE; 	if (_vala_strcmp0 (type, "check") == 0) { @@ -872,47 +872,47 @@ static CtkMenuItem* unity_launcher_application_quicklist_controller_menu_item_fr 	CtkMenuItem* _tmp10_; 	if (_vala_strcmp0 (type, "check") == 0) { 	CtkMenuItem* _tmp7_; -	_data9_->menuitem = (_tmp7_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_check_menu_item_new_with_label (label)), _g_object_unref0 (_data9_->menuitem), _tmp7_); +	_data10_->menuitem = (_tmp7_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_check_menu_item_new_with_label (label)), _g_object_unref0 (_data10_->menuitem), _tmp7_); 	} else { 	CtkMenuItem* _tmp8_; -	_data9_->menuitem = (_tmp8_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_radio_menu_item_new_with_label (NULL, label)), _g_object_unref0 (_data9_->menuitem), _tmp8_); +	_data10_->menuitem = (_tmp8_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_radio_menu_item_new_with_label (NULL, label)), _g_object_unref0 (_data10_->menuitem), _tmp8_); 	} -	checked = dbusmenu_menuitem_property_get_int (_data9_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE); +	checked = dbusmenu_menuitem_property_get_int (_data10_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE); 	if (checked == DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED) { 	CtkMenuItem* _tmp9_; -	ctk_check_menu_item_set_active ((_tmp9_ = _data9_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp9_) ? ((CtkCheckMenuItem*) _tmp9_) : NULL), TRUE); +	ctk_check_menu_item_set_active ((_tmp9_ = _data10_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp9_) ? ((CtkCheckMenuItem*) _tmp9_) : NULL), TRUE); 	} -	g_signal_connect_data ((_tmp10_ = _data9_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp10_) ? ((CtkCheckMenuItem*) _tmp10_) : NULL), "toggled", (GCallback) __lambda23__ctk_check_menu_item_toggled, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0); -	g_signal_connect_data (_data9_->dbusmenuitem, "property-changed", (GCallback) __lambda24__dbusmenu_menuitem_property_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0); +	g_signal_connect_data ((_tmp10_ = _data10_->menuitem, CTK_IS_CHECK_MENU_ITEM (_tmp10_) ? ((CtkCheckMenuItem*) _tmp10_) : NULL), "toggled", (GCallback) __lambda24__ctk_check_menu_item_toggled, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0); +	g_signal_connect_data (_data10_->dbusmenuitem, "property-changed", (GCallback) __lambda25__dbusmenu_menuitem_property_changed, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0); 	} else { 	if (_vala_strcmp0 (type, "seperator") == 0) { 	CtkMenuItem* _tmp11_; -	_data9_->menuitem = (_tmp11_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_menu_seperator_new ()), _g_object_unref0 (_data9_->menuitem), _tmp11_); +	_data10_->menuitem = (_tmp11_ = (CtkMenuItem*) g_object_ref_sink (unity_launcher_quicklist_menu_seperator_new ()), _g_object_unref0 (_data10_->menuitem), _tmp11_); 	} else { -	g_warning ("quicklist-controller.vala:338: not a menu item we understand, %s", dbusmenu_menuitem_property_get (_data9_->dbusmenuitem, "type")); +	g_warning ("quicklist-controller.vala:338: not a menu item we understand, %s", dbusmenu_menuitem_property_get (_data10_->dbusmenuitem, "type")); 	result = NULL; 	_g_free0 (check_type); 	_g_free0 (type); 	_g_free0 (label); -	block9_data_unref (_data9_); +	block10_data_unref (_data10_); 	return result; 	} 	} 	} -	g_signal_connect_data (_data9_->dbusmenuitem, "property-changed", (GCallback) __lambda25__dbusmenu_menuitem_property_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0); -	clutter_actor_set_reactive ((ClutterActor*) _data9_->menuitem, dbusmenu_menuitem_property_get_bool (_data9_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_ENABLED)); -	g_signal_connect_data (_data9_->menuitem, "activated", (GCallback) __lambda26__ctk_menu_item_activated, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0); -	g_signal_connect_object (_data9_->menuitem, "activated", (GCallback) __lambda27__ctk_menu_item_activated, self, 0); -	result = _g_object_ref0 ((_tmp12_ = _data9_->menuitem, CTK_IS_MENU_ITEM (_tmp12_) ? ((CtkMenuItem*) _tmp12_) : NULL)); +	g_signal_connect_data (_data10_->dbusmenuitem, "property-changed", (GCallback) __lambda26__dbusmenu_menuitem_property_changed, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0); +	clutter_actor_set_reactive ((ClutterActor*) _data10_->menuitem, dbusmenu_menuitem_property_get_bool (_data10_->dbusmenuitem, DBUSMENU_MENUITEM_PROP_ENABLED)); +	g_signal_connect_data (_data10_->menuitem, "activated", (GCallback) __lambda27__ctk_menu_item_activated, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0); +	g_signal_connect_object (_data10_->menuitem, "activated", (GCallback) __lambda28__ctk_menu_item_activated, self, 0); +	result = _g_object_ref0 ((_tmp12_ = _data10_->menuitem, CTK_IS_MENU_ITEM (_tmp12_) ? ((CtkMenuItem*) _tmp12_) : NULL)); 	_g_free0 (check_type); 	_g_free0 (type); 	_g_free0 (label); -	block9_data_unref (_data9_); +	block10_data_unref (_data10_); 	return result; 	_g_free0 (check_type); 	_g_free0 (type); 	_g_free0 (label); -	block9_data_unref (_data9_); +	block10_data_unref (_data10_);  } @@ -921,13 +921,13 @@ static void _unity_launcher_application_quicklist_controller_on_state_change_g_o  } -static void _lambda30_ (UnityLauncherApplicationQuicklistController* self) { +static void _lambda31_ (UnityLauncherApplicationQuicklistController* self) { 	unity_launcher_quicklist_controller_set_state ((UnityLauncherQuicklistController*) self, UNITY_LAUNCHER_QUICKLIST_CONTROLLER_STATE_CLOSED);  } -static void __lambda30__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self) { -	_lambda30_ (self); +static void __lambda31__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self) { +	_lambda31_ (self);  } @@ -947,7 +947,7 @@ static GObject * unity_launcher_application_quicklist_controller_constructor (GT 	g_signal_connect_object ((GObject*) self, "notify::state", (GCallback) _unity_launcher_application_quicklist_controller_on_state_change_g_object_notify, self, 0); 	unity_launcher_quicklist_controller_set_state ((UnityLauncherQuicklistController*) self, UNITY_LAUNCHER_QUICKLIST_CONTROLLER_STATE_LABEL); 	drag_controller = _g_object_ref0 (unity_drag_controller_get_default ()); -	g_signal_connect_object (drag_controller, "drag-start", (GCallback) __lambda30__unity_drag_controller_drag_start, self, 0); +	g_signal_connect_object (drag_controller, "drag-start", (GCallback) __lambda31__unity_drag_controller_drag_start, self, 0); 	_g_object_unref0 (drag_controller); 	} 	return obj; diff --git a/unity-private/launcher/scroller-controller.c b/unity-private/launcher/scroller-controller.c index 101372aef..44b8fc2e3 100644 --- a/unity-private/launcher/scroller-controller.c +++ b/unity-private/launcher/scroller-controller.c @@ -96,7 +96,7 @@ typedef struct _UnityLauncherScrollerChildClass UnityLauncherScrollerChildClass;  typedef struct _UnityLauncherApplicationController UnityLauncherApplicationController;  typedef struct _UnityLauncherApplicationControllerClass UnityLauncherApplicationControllerClass; -typedef struct _Block11Data Block11Data; +typedef struct _Block12Data Block12Data;  #define _g_free0(var) (var = (g_free (var), NULL))  typedef struct _UnityLauncherScrollerChildPrivate UnityLauncherScrollerChildPrivate; @@ -137,7 +137,7 @@ struct _UnityLauncherScrollerControllerPrivate { 	float last_drag_y;  }; -struct _Block11Data { +struct _Block12Data { 	int _ref_count_; 	UnityLauncherScrollerController * self; 	UnityLauncherScrollerChildController* controller; @@ -198,10 +198,10 @@ static UnityLauncherScrollerChildController* unity_launcher_scroller_controller_  UnityLauncherScrollerChild* unity_launcher_scroller_model_get (UnityLauncherScrollerModel* self, gint i);  void unity_launcher_scroller_child_controller_activate (UnityLauncherScrollerChildController* self);  static void unity_launcher_scroller_controller_on_super_key_active (UnityLauncherScrollerController* self); -static gboolean _lambda82_ (UnityLauncherScrollerController* self); +static gboolean _lambda90_ (UnityLauncherScrollerController* self);  UnityLauncherScrollerView* unity_launcher_scroller_controller_get_view (UnityLauncherScrollerController* self);  void unity_launcher_scroller_view_enable_keyboard_selection_mode (UnityLauncherScrollerView* self, gboolean choice); -static gboolean __lambda82__gsource_func (gpointer self); +static gboolean __lambda90__gsource_func (gpointer self);  static void unity_launcher_scroller_controller_handle_bamf_view_opened (UnityLauncherScrollerController* self, GObject* object);  GType unity_launcher_application_controller_get_type (void) G_GNUC_CONST;  static UnityLauncherApplicationController* unity_launcher_scroller_controller_find_controller_by_desktop_file (UnityLauncherScrollerController* self, const char* desktop_file); @@ -213,14 +213,14 @@ UnityLauncherApplicationController* unity_launcher_application_controller_constr  void unity_launcher_scroller_model_add (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child);  static void unity_launcher_scroller_controller_on_scroller_controller_closed (UnityLauncherScrollerController* self, UnityLauncherScrollerChildController* controller);  static void _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_request_removal (UnityLauncherScrollerChildController* _sender, gpointer self); -static void _lambda83_ (Block11Data* _data11_); +static void _lambda91_ (Block12Data* _data12_);  gboolean unity_launcher_scroller_child_controller_get_hide (UnityLauncherScrollerChildController* self);  gboolean unity_launcher_scroller_model_contains (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child);  UnityLauncherScrollerChild* unity_launcher_scroller_child_controller_get_child (UnityLauncherScrollerChildController* self);  void unity_launcher_scroller_model_remove (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child); -static void __lambda83__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); -static Block11Data* block11_data_ref (Block11Data* _data11_); -static void block11_data_unref (Block11Data* _data11_); +static void __lambda91__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +static Block12Data* block12_data_ref (Block12Data* _data12_); +static void block12_data_unref (Block12Data* _data12_);  gboolean unity_launcher_application_controller_is_sticky (UnityLauncherApplicationController* self);  static gint unity_launcher_scroller_controller_compare_prioritys (UnityLauncherScrollerChild* a, UnityLauncherScrollerChild* b);  GType unity_launcher_pin_type_get_type (void) G_GNUC_CONST; @@ -321,7 +321,7 @@ static void unity_launcher_scroller_controller_on_super_key_modifier_release (Un  } -static gboolean _lambda82_ (UnityLauncherScrollerController* self) { +static gboolean _lambda90_ (UnityLauncherScrollerController* self) { 	gboolean result = FALSE; 	unity_launcher_scroller_view_enable_keyboard_selection_mode (self->priv->_view, unity_shell_get_super_key_active (unity_global_shell)); 	result = FALSE; @@ -329,9 +329,9 @@ static gboolean _lambda82_ (UnityLauncherScrollerController* self) {  } -static gboolean __lambda82__gsource_func (gpointer self) { +static gboolean __lambda90__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda82_ (self); +	result = _lambda90_ (self); 	return result;  } @@ -345,7 +345,7 @@ static void unity_launcher_scroller_controller_on_super_key_active (UnityLaunche 	_tmp0_ = FALSE; 	} 	if (_tmp0_) { -	self->priv->super_key_source = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, __lambda82__gsource_func, g_object_ref (self), g_object_unref); +	self->priv->super_key_source = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, __lambda90__gsource_func, g_object_ref (self), g_object_unref); 	} else { 	if (self->priv->super_key_source != 0) { 	g_source_remove (self->priv->super_key_source); @@ -366,46 +366,46 @@ static void _unity_launcher_scroller_controller_on_scroller_controller_closed_un  } -static void _lambda83_ (Block11Data* _data11_) { +static void _lambda91_ (Block12Data* _data12_) { 	UnityLauncherScrollerController * self; 	gboolean _tmp0_ = FALSE; 	gboolean _tmp1_ = FALSE; -	self = _data11_->self; -	if (unity_launcher_scroller_child_controller_get_hide (_data11_->controller)) { -	_tmp0_ = unity_launcher_scroller_model_contains (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data11_->controller)); +	self = _data12_->self; +	if (unity_launcher_scroller_child_controller_get_hide (_data12_->controller)) { +	_tmp0_ = unity_launcher_scroller_model_contains (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data12_->controller)); 	} else { 	_tmp0_ = FALSE; 	} 	if (_tmp0_) { -	unity_launcher_scroller_model_remove (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data11_->controller)); +	unity_launcher_scroller_model_remove (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data12_->controller)); 	} -	if (!unity_launcher_scroller_child_controller_get_hide (_data11_->controller)) { -	_tmp1_ = unity_launcher_scroller_model_contains (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data11_->controller)) == FALSE; +	if (!unity_launcher_scroller_child_controller_get_hide (_data12_->controller)) { +	_tmp1_ = unity_launcher_scroller_model_contains (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data12_->controller)) == FALSE; 	} else { 	_tmp1_ = FALSE; 	} 	if (_tmp1_) { -	unity_launcher_scroller_model_add (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data11_->controller)); +	unity_launcher_scroller_model_add (self->priv->_model, unity_launcher_scroller_child_controller_get_child (_data12_->controller)); 	}  } -static void __lambda83__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { -	_lambda83_ (self); +static void __lambda91__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda91_ (self);  } -static Block11Data* block11_data_ref (Block11Data* _data11_) { -	g_atomic_int_inc (&_data11_->_ref_count_); -	return _data11_; +static Block12Data* block12_data_ref (Block12Data* _data12_) { +	g_atomic_int_inc (&_data12_->_ref_count_); +	return _data12_;  } -static void block11_data_unref (Block11Data* _data11_) { -	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) { -	_g_object_unref0 (_data11_->self); -	_g_object_unref0 (_data11_->controller); -	g_slice_free (Block11Data, _data11_); +static void block12_data_unref (Block12Data* _data12_) { +	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) { +	_g_object_unref0 (_data12_->self); +	_g_object_unref0 (_data12_->controller); +	g_slice_free (Block12Data, _data12_); 	}  } @@ -415,17 +415,17 @@ static void unity_launcher_scroller_controller_handle_bamf_view_opened (UnityLau 	g_return_if_fail (object != NULL); 	g_return_if_fail (BAMF_IS_VIEW (object)); 	if (BAMF_IS_APPLICATION (object)) { -	Block11Data* _data11_; +	Block12Data* _data12_; 	GObject* _tmp0_; 	BamfApplication* app; 	char* desktop_file; 	gboolean _tmp1_ = FALSE; -	_data11_ = g_slice_new0 (Block11Data); -	_data11_->_ref_count_ = 1; -	_data11_->self = g_object_ref (self); +	_data12_ = g_slice_new0 (Block12Data); +	_data12_->_ref_count_ = 1; +	_data12_->self = g_object_ref (self); 	app = _g_object_ref0 ((_tmp0_ = object, BAMF_IS_APPLICATION (_tmp0_) ? ((BamfApplication*) _tmp0_) : NULL)); 	desktop_file = g_strdup (bamf_application_get_desktop_file (app)); -	_data11_->controller = NULL; +	_data12_->controller = NULL; 	if (desktop_file != NULL) { 	_tmp1_ = _vala_strcmp0 (desktop_file, "") != 0; 	} else { @@ -433,29 +433,29 @@ static void unity_launcher_scroller_controller_handle_bamf_view_opened (UnityLau 	} 	if (_tmp1_) { 	UnityLauncherScrollerChildController* _tmp2_; -	_data11_->controller = (_tmp2_ = (UnityLauncherScrollerChildController*) unity_launcher_scroller_controller_find_controller_by_desktop_file (self, desktop_file), _g_object_unref0 (_data11_->controller), _tmp2_); +	_data12_->controller = (_tmp2_ = (UnityLauncherScrollerChildController*) unity_launcher_scroller_controller_find_controller_by_desktop_file (self, desktop_file), _g_object_unref0 (_data12_->controller), _tmp2_); 	} -	if (UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_data11_->controller)) { +	if (UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_data12_->controller)) { 	UnityLauncherScrollerChildController* _tmp3_; -	unity_launcher_application_controller_attach_application ((_tmp3_ = _data11_->controller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp3_) ? ((UnityLauncherApplicationController*) _tmp3_) : NULL), app); +	unity_launcher_application_controller_attach_application ((_tmp3_ = _data12_->controller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp3_) ? ((UnityLauncherApplicationController*) _tmp3_) : NULL), app); 	} else { 	UnityLauncherScrollerChild* child; 	UnityLauncherScrollerChildController* _tmp4_; 	UnityLauncherScrollerChildController* _tmp5_; 	child = g_object_ref_sink (unity_launcher_scroller_child_new ()); -	_data11_->controller = (_tmp4_ = (UnityLauncherScrollerChildController*) unity_launcher_application_controller_new (NULL, child), _g_object_unref0 (_data11_->controller), _tmp4_); -	unity_launcher_application_controller_attach_application ((_tmp5_ = _data11_->controller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp5_) ? ((UnityLauncherApplicationController*) _tmp5_) : NULL), app); +	_data12_->controller = (_tmp4_ = (UnityLauncherScrollerChildController*) unity_launcher_application_controller_new (NULL, child), _g_object_unref0 (_data12_->controller), _tmp4_); +	unity_launcher_application_controller_attach_application ((_tmp5_ = _data12_->controller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp5_) ? ((UnityLauncherApplicationController*) _tmp5_) : NULL), app); 	if (bamf_view_user_visible ((BamfView*) app)) { 	unity_launcher_scroller_model_add (self->priv->_model, child); 	} -	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->childcontrollers, _data11_->controller); -	g_signal_connect_object (_data11_->controller, "request-removal", (GCallback) _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_request_removal, self, 0); -	g_signal_connect_data ((GObject*) _data11_->controller, "notify::hide", (GCallback) __lambda83__g_object_notify, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0); +	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->childcontrollers, _data12_->controller); +	g_signal_connect_object (_data12_->controller, "request-removal", (GCallback) _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_request_removal, self, 0); +	g_signal_connect_data ((GObject*) _data12_->controller, "notify::hide", (GCallback) __lambda91__g_object_notify, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0); 	_g_object_unref0 (child); 	} 	_g_free0 (desktop_file); 	_g_object_unref0 (app); -	block11_data_unref (_data11_); +	block12_data_unref (_data12_); 	}  } @@ -493,7 +493,7 @@ static gint unity_launcher_scroller_controller_compare_prioritys (UnityLauncherS 	_tmp2_ = unity_launcher_application_controller_get_priority ((_tmp1_ = childcontroller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp1_) ? ((UnityLauncherApplicationController*) _tmp1_) : NULL), &_inner_error_); 	if (_inner_error_ != NULL) { 	if (_inner_error_->domain == UNITY_LAUNCHER_APP_TYPE_ERROR) { -	goto __catch52_unity_launcher_app_type_error; +	goto __catch53_unity_launcher_app_type_error; 	} 	_g_object_unref0 (childcontroller); 	g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -503,8 +503,8 @@ static gint unity_launcher_scroller_controller_compare_prioritys (UnityLauncherS 	prioritya = _tmp2_; 	} 	} -	goto __finally52; -	__catch52_unity_launcher_app_type_error: +	goto __finally53; +	__catch53_unity_launcher_app_type_error: 	{ 	GError * e; 	e = _inner_error_; @@ -514,7 +514,7 @@ static gint unity_launcher_scroller_controller_compare_prioritys (UnityLauncherS 	_g_error_free0 (e); 	} 	} -	__finally52: +	__finally53: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (childcontroller); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -530,7 +530,7 @@ static gint unity_launcher_scroller_controller_compare_prioritys (UnityLauncherS 	_tmp5_ = unity_launcher_application_controller_get_priority ((_tmp4_ = childcontroller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp4_) ? ((UnityLauncherApplicationController*) _tmp4_) : NULL), &_inner_error_); 	if (_inner_error_ != NULL) { 	if (_inner_error_->domain == UNITY_LAUNCHER_APP_TYPE_ERROR) { -	goto __catch53_unity_launcher_app_type_error; +	goto __catch54_unity_launcher_app_type_error; 	} 	_g_object_unref0 (childcontroller); 	g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -540,8 +540,8 @@ static gint unity_launcher_scroller_controller_compare_prioritys (UnityLauncherS 	priorityb = _tmp5_; 	} 	} -	goto __finally53; -	__catch53_unity_launcher_app_type_error: +	goto __finally54; +	__catch54_unity_launcher_app_type_error: 	{ 	GError * e; 	e = _inner_error_; @@ -551,7 +551,7 @@ static gint unity_launcher_scroller_controller_compare_prioritys (UnityLauncherS 	_g_error_free0 (e); 	} 	} -	__finally53: +	__finally54: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (childcontroller); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); diff --git a/unity-private/launcher/scroller-view.c b/unity-private/launcher/scroller-view.c index 4c4ca38e6..6b52ec1a6 100644 --- a/unity-private/launcher/scroller-view.c +++ b/unity-private/launcher/scroller-view.c @@ -113,7 +113,7 @@ typedef struct _UnityLauncherScrollerChildPrivate UnityLauncherScrollerChildPriv  #define _g_free0(var) (var = (g_free (var), NULL))  #define _pango_font_description_free0(var) ((var == NULL) ? NULL : (var = (pango_font_description_free (var), NULL)))  #define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) -typedef struct _Block12Data Block12Data; +typedef struct _Block13Data Block13Data;  #define TYPE_MENU_MANAGER (menu_manager_get_type ())  #define MENU_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENU_MANAGER, MenuManager)) @@ -243,7 +243,7 @@ struct _UnityLauncherScrollerChildClass { 	CtkActorClass parent_class;  }; -struct _Block12Data { +struct _Block13Data { 	int _ref_count_; 	UnityLauncherScrollerView * self; 	UnityLauncherScrollerChild* child; @@ -341,19 +341,19 @@ static float unity_launcher_scroller_view_get_available_height (UnityLauncherScr  static void unity_launcher_scroller_view_disable_animations_on_children (UnityLauncherScrollerView* self, ClutterEvent* event);  void unity_launcher_scroller_view_set_is_autoscrolling (UnityLauncherScrollerView* self, gboolean value);  static void unity_launcher_scroller_view_model_child_added (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child); -static void _lambda70_ (UnityLauncherScrollerView* self); -static void __lambda70__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +static void _lambda78_ (UnityLauncherScrollerView* self); +static void __lambda78__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  static void unity_launcher_scroller_view_model_child_removed (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child);  #define UNITY_LAUNCHER_SHORT_DELAY ((guint) 400) -static void _lambda71_ (Block12Data* _data12_); -static void __lambda71__clutter_animation_completed (ClutterAnimation* _sender, gpointer self); -static Block12Data* block12_data_ref (Block12Data* _data12_); -static void block12_data_unref (Block12Data* _data12_); +static void _lambda79_ (Block13Data* _data13_); +static void __lambda79__clutter_animation_completed (ClutterAnimation* _sender, gpointer self); +static Block13Data* block13_data_ref (Block13Data* _data13_); +static void block13_data_unref (Block13Data* _data13_);  static void unity_launcher_scroller_view_model_order_changed (UnityLauncherScrollerView* self);  static void unity_launcher_scroller_view_on_auto_scrolling_state_change (UnityLauncherScrollerView* self);  gboolean unity_launcher_scroller_view_get_is_autoscrolling (UnityLauncherScrollerView* self); -static gboolean _lambda72_ (UnityLauncherScrollerView* self); -static gboolean __lambda72__gsource_func (gpointer self); +static gboolean _lambda80_ (UnityLauncherScrollerView* self); +static gboolean __lambda80__gsource_func (gpointer self);  static gboolean unity_launcher_scroller_view_on_button_press_event (UnityLauncherScrollerView* self, ClutterEvent* event);  static gboolean unity_launcher_scroller_view_on_button_release_event (UnityLauncherScrollerView* self, ClutterEvent* event);  static gboolean _unity_launcher_scroller_view_on_button_release_event_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self); @@ -371,8 +371,8 @@ static void unity_launcher_scroller_view_do_anim_settle (UnityLauncherScrollerVi  static void unity_launcher_scroller_view_do_anim_fling (UnityLauncherScrollerView* self, ClutterTimeline* timeline, gint msecs);  static void unity_launcher_scroller_view_do_anim_bounce (UnityLauncherScrollerView* self, ClutterTimeline* timeline, gint msecs);  CtkEffectCache* unity_launcher_scroller_view_get_cache (UnityLauncherScrollerView* self); -static gboolean _lambda73_ (UnityLauncherScrollerView* self); -static gboolean __lambda73__gsource_func (gpointer self); +static gboolean _lambda81_ (UnityLauncherScrollerView* self); +static gboolean __lambda81__gsource_func (gpointer self);  static float unity_launcher_scroller_view_get_aligned_settle_position (UnityLauncherScrollerView* self);  static void unity_launcher_scroller_view_real_get_preferred_width (ClutterActor* base, float for_height, float* minimum_width, float* natural_width);  static void unity_launcher_scroller_view_real_get_preferred_height (ClutterActor* base, float for_width, float* minimum_height, float* natural_height); @@ -414,22 +414,22 @@ static gboolean _unity_launcher_scroller_view_on_scroll_event_clutter_actor_scro  static void _unity_launcher_scroller_view_on_auto_scrolling_state_change_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  static void _unity_launcher_scroller_view_on_drag_motion_event_unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);  static void _unity_launcher_scroller_view_on_scroller_frame_clutter_timeline_new_frame (ClutterTimeline* _sender, gint msecs, gpointer self); -static void _lambda74_ (UnityLauncherScrollerView* self); -static void __lambda74__clutter_timeline_started (ClutterTimeline* _sender, gpointer self); -static void _lambda75_ (UnityLauncherScrollerView* self); -static gboolean _lambda76_ (UnityLauncherScrollerView* self); -static gboolean __lambda76__gsource_func (gpointer self); -static void __lambda75__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self); -static void _lambda77_ (UnityLauncherScrollerView* self); -static void __lambda77__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self); -static void _lambda78_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self); -static gboolean _lambda79_ (UnityLauncherScrollerView* self); -static gboolean __lambda79__gsource_func (gpointer self); -static void __lambda78__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self); -static void _lambda80_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self); -static void __lambda80__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self); -static gboolean _lambda81_ (UnityLauncherScrollerView* self); -static gboolean __lambda81__gsource_func (gpointer self); +static void _lambda82_ (UnityLauncherScrollerView* self); +static void __lambda82__clutter_timeline_started (ClutterTimeline* _sender, gpointer self); +static void _lambda83_ (UnityLauncherScrollerView* self); +static gboolean _lambda84_ (UnityLauncherScrollerView* self); +static gboolean __lambda84__gsource_func (gpointer self); +static void __lambda83__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self); +static void _lambda85_ (UnityLauncherScrollerView* self); +static void __lambda85__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self); +static void _lambda86_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self); +static gboolean _lambda87_ (UnityLauncherScrollerView* self); +static gboolean __lambda87__gsource_func (gpointer self); +static void __lambda86__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self); +static void _lambda88_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self); +static void __lambda88__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self); +static gboolean _lambda89_ (UnityLauncherScrollerView* self); +static gboolean __lambda89__gsource_func (gpointer self);  static GObject * unity_launcher_scroller_view_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_launcher_scroller_view_finalize (GObject* obj);  static void unity_launcher_scroller_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -1452,13 +1452,13 @@ static void unity_launcher_scroller_view_contract_launcher (UnityLauncherScrolle  } -static void _lambda70_ (UnityLauncherScrollerView* self) { +static void _lambda78_ (UnityLauncherScrollerView* self) { 	clutter_actor_queue_relayout ((ClutterActor*) self);  } -static void __lambda70__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { -	_lambda70_ (self); +static void __lambda78__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda78_ (self);  } @@ -1473,55 +1473,55 @@ static void unity_launcher_scroller_view_model_child_added (UnityLauncherScrolle 	unity_launcher_scroller_view_order_children (self, FALSE); 	} 	clutter_actor_queue_relayout ((ClutterActor*) self); -	g_signal_connect_object ((GObject*) child, "notify::position", (GCallback) __lambda70__g_object_notify, self, 0); +	g_signal_connect_object ((GObject*) child, "notify::position", (GCallback) __lambda78__g_object_notify, self, 0); 	clutter_actor_set_reactive ((ClutterActor*) child, FALSE);  } -static void _lambda71_ (Block12Data* _data12_) { +static void _lambda79_ (Block13Data* _data13_) { 	UnityLauncherScrollerView * self; -	self = _data12_->self; -	clutter_actor_unparent ((ClutterActor*) _data12_->child); -	gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->child_refs, _data12_->child); +	self = _data13_->self; +	clutter_actor_unparent ((ClutterActor*) _data13_->child); +	gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->child_refs, _data13_->child);  } -static void __lambda71__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) { -	_lambda71_ (self); +static void __lambda79__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) { +	_lambda79_ (self);  } -static Block12Data* block12_data_ref (Block12Data* _data12_) { -	g_atomic_int_inc (&_data12_->_ref_count_); -	return _data12_; +static Block13Data* block13_data_ref (Block13Data* _data13_) { +	g_atomic_int_inc (&_data13_->_ref_count_); +	return _data13_;  } -static void block12_data_unref (Block12Data* _data12_) { -	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) { -	_g_object_unref0 (_data12_->self); -	_g_object_unref0 (_data12_->child); -	g_slice_free (Block12Data, _data12_); +static void block13_data_unref (Block13Data* _data13_) { +	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) { +	_g_object_unref0 (_data13_->self); +	_g_object_unref0 (_data13_->child); +	g_slice_free (Block13Data, _data13_); 	}  }  static void unity_launcher_scroller_view_model_child_removed (UnityLauncherScrollerView* self, UnityLauncherScrollerChild* child) { -	Block12Data* _data12_; +	Block13Data* _data13_; 	ClutterAnimation* anim; 	g_return_if_fail (self != NULL); 	g_return_if_fail (child != NULL); -	_data12_ = g_slice_new0 (Block12Data); -	_data12_->_ref_count_ = 1; -	_data12_->self = g_object_ref (self); -	_data12_->child = _g_object_ref0 (child); -	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->child_refs, _data12_->child); -	anim = _g_object_ref0 (clutter_actor_animate ((ClutterActor*) _data12_->child, (gulong) CLUTTER_EASE_OUT_QUAD, UNITY_LAUNCHER_SHORT_DELAY, "opacity", 0, NULL)); -	g_signal_connect_data (anim, "completed", (GCallback) __lambda71__clutter_animation_completed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0); +	_data13_ = g_slice_new0 (Block13Data); +	_data13_->_ref_count_ = 1; +	_data13_->self = g_object_ref (self); +	_data13_->child = _g_object_ref0 (child); +	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->child_refs, _data13_->child); +	anim = _g_object_ref0 (clutter_actor_animate ((ClutterActor*) _data13_->child, (gulong) CLUTTER_EASE_OUT_QUAD, UNITY_LAUNCHER_SHORT_DELAY, "opacity", 0, NULL)); +	g_signal_connect_data (anim, "completed", (GCallback) __lambda79__clutter_animation_completed, block13_data_ref (_data13_), (GClosureNotify) block13_data_unref, 0); 	unity_launcher_scroller_view_order_children (self, FALSE); 	clutter_actor_queue_relayout ((ClutterActor*) self); 	_g_object_unref0 (anim); -	block12_data_unref (_data12_); +	block13_data_unref (_data13_);  } @@ -1532,7 +1532,7 @@ static void unity_launcher_scroller_view_model_order_changed (UnityLauncherScrol  } -static gboolean _lambda72_ (UnityLauncherScrollerView* self) { +static gboolean _lambda80_ (UnityLauncherScrollerView* self) { 	gboolean result = FALSE; 	float speed; 	speed = 12.0f - self->priv->autoscroll_mouse_pos_cache; @@ -1545,9 +1545,9 @@ static gboolean _lambda72_ (UnityLauncherScrollerView* self) {  } -static gboolean __lambda72__gsource_func (gpointer self) { +static gboolean __lambda80__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda72_ (self); +	result = _lambda80_ (self); 	return result;  } @@ -1561,7 +1561,7 @@ static void unity_launcher_scroller_view_on_auto_scrolling_state_change (UnityLa 	_tmp0_ = FALSE; 	} 	if (_tmp0_) { -	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 33, __lambda72__gsource_func, g_object_ref (self), g_object_unref); +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 33, __lambda80__gsource_func, g_object_ref (self), g_object_unref); 	}  } @@ -1924,7 +1924,7 @@ static void unity_launcher_scroller_view_do_anim_settle (UnityLauncherScrollerVi  } -static gboolean _lambda73_ (UnityLauncherScrollerView* self) { +static gboolean _lambda81_ (UnityLauncherScrollerView* self) { 	gboolean result = FALSE; 	self->priv->current_phase = UNITY_LAUNCHER_SCROLLER_PHASE_SETTLING; 	if (self->priv->scroll_position > 0) { @@ -1938,9 +1938,9 @@ static gboolean _lambda73_ (UnityLauncherScrollerView* self) {  } -static gboolean __lambda73__gsource_func (gpointer self) { +static gboolean __lambda81__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda73_ (self); +	result = _lambda81_ (self); 	return result;  } @@ -1954,7 +1954,7 @@ static void unity_launcher_scroller_view_do_anim_fling (UnityLauncherScrollerVie 	unity_launcher_scroller_view_move_scroll_position (self, scroll_move_amount, FALSE, 60.0f); 	if (fabsf (scroll_move_amount) < 1.0) { 	self->priv->current_phase = UNITY_LAUNCHER_SCROLLER_PHASE_NONE; -	self->priv->fling_timeout_source = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, __lambda73__gsource_func, g_object_ref (self), g_object_unref); +	self->priv->fling_timeout_source = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, __lambda81__gsource_func, g_object_ref (self), g_object_unref); 	}  } @@ -2954,17 +2954,17 @@ static void _unity_launcher_scroller_view_on_scroller_frame_clutter_timeline_new  } -static void _lambda74_ (UnityLauncherScrollerView* self) { +static void _lambda82_ (UnityLauncherScrollerView* self) { 	ctk_effect_cache_invalidate_texture_cache (self->priv->_cache);  } -static void __lambda74__clutter_timeline_started (ClutterTimeline* _sender, gpointer self) { -	_lambda74_ (self); +static void __lambda82__clutter_timeline_started (ClutterTimeline* _sender, gpointer self) { +	_lambda82_ (self);  } -static gboolean _lambda76_ (UnityLauncherScrollerView* self) { +static gboolean _lambda84_ (UnityLauncherScrollerView* self) { 	gboolean result = FALSE; 	ctk_effect_cache_update_texture_cache (self->priv->_cache); 	result = FALSE; @@ -2972,24 +2972,24 @@ static gboolean _lambda76_ (UnityLauncherScrollerView* self) {  } -static gboolean __lambda76__gsource_func (gpointer self) { +static gboolean __lambda84__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda76_ (self); +	result = _lambda84_ (self); 	return result;  } -static void _lambda75_ (UnityLauncherScrollerView* self) { -	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda76__gsource_func, g_object_ref (self), g_object_unref); +static void _lambda83_ (UnityLauncherScrollerView* self) { +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda84__gsource_func, g_object_ref (self), g_object_unref);  } -static void __lambda75__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self) { -	_lambda75_ (self); +static void __lambda83__clutter_timeline_completed (ClutterTimeline* _sender, gpointer self) { +	_lambda83_ (self);  } -static void _lambda77_ (UnityLauncherScrollerView* self) { +static void _lambda85_ (UnityLauncherScrollerView* self) { 	guint _tmp0_; 	self->priv->is_scrolling = FALSE; 	self->priv->button_down = FALSE; @@ -3003,25 +3003,25 @@ static void _lambda77_ (UnityLauncherScrollerView* self) {  } -static void __lambda77__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self) { -	_lambda77_ (self); +static void __lambda85__unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self) { +	_lambda85_ (self);  } -static gboolean _lambda79_ (UnityLauncherScrollerView* self) { +static gboolean _lambda87_ (UnityLauncherScrollerView* self) { 	gboolean result = FALSE; 	unity_launcher_scroller_view_order_children (self, FALSE);  } -static gboolean __lambda79__gsource_func (gpointer self) { +static gboolean __lambda87__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda79_ (self); +	result = _lambda87_ (self); 	return result;  } -static void _lambda78_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self) { +static void _lambda86_ (UnityDragModel* drag_model, float x, float y, UnityLauncherScrollerView* self) { 	g_return_if_fail (drag_model != NULL); 	unity_launcher_disable_quicklists = FALSE; 	{ @@ -3041,18 +3041,18 @@ static void _lambda78_ (UnityDragModel* drag_model, float x, float y, UnityLaunc 	if (x > clutter_actor_get_width ((ClutterActor*) self)) { 	unity_launcher_scroller_view_contract_launcher (self); 	} else { -	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda79__gsource_func, g_object_ref (self), g_object_unref); +	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda87__gsource_func, g_object_ref (self), g_object_unref); 	} 	clutter_actor_animate ((ClutterActor*) self, (gulong) CLUTTER_EASE_OUT_SINE, (guint) 150, "drag-indicator-opacity", 0.0f, NULL);  } -static void __lambda78__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) { -	_lambda78_ (model, x, y, self); +static void __lambda86__unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) { +	_lambda86_ (model, x, y, self);  } -static void _lambda80_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self) { +static void _lambda88_ (UnityDragModel* model, float x, float y, UnityLauncherScrollerView* self) { 	g_return_if_fail (model != NULL); 	self->priv->last_known_pointer_x = x; 	if (x > (200 + clutter_actor_get_width ((ClutterActor*) self))) { @@ -3063,21 +3063,21 @@ static void _lambda80_ (UnityDragModel* model, float x, float y, UnityLauncherSc  } -static void __lambda80__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) { -	_lambda80_ (model, x, y, self); +static void __lambda88__unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) { +	_lambda88_ (model, x, y, self);  } -static gboolean _lambda81_ (UnityLauncherScrollerView* self) { +static gboolean _lambda89_ (UnityLauncherScrollerView* self) { 	gboolean result = FALSE; 	unity_launcher_scroller_view_order_children (self, TRUE); 	clutter_actor_queue_relayout ((ClutterActor*) self);  } -static gboolean __lambda81__gsource_func (gpointer self) { +static gboolean __lambda89__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda81_ (self); +	result = _lambda89_ (self); 	return result;  } @@ -3144,17 +3144,17 @@ static GObject * unity_launcher_scroller_view_constructor (GType type, guint n_c 	self->fling_timeline = (_tmp4_ = clutter_timeline_new ((guint) 1000), _g_object_unref0 (self->fling_timeline), _tmp4_); 	clutter_timeline_set_loop (self->fling_timeline, TRUE); 	g_signal_connect_object (self->fling_timeline, "new-frame", (GCallback) _unity_launcher_scroller_view_on_scroller_frame_clutter_timeline_new_frame, self, 0); -	g_signal_connect_object (self->fling_timeline, "started", (GCallback) __lambda74__clutter_timeline_started, self, 0); -	g_signal_connect_object (self->fling_timeline, "completed", (GCallback) __lambda75__clutter_timeline_completed, self, 0); +	g_signal_connect_object (self->fling_timeline, "started", (GCallback) __lambda82__clutter_timeline_started, self, 0); +	g_signal_connect_object (self->fling_timeline, "completed", (GCallback) __lambda83__clutter_timeline_completed, self, 0); 	drag_controller = _g_object_ref0 (unity_drag_controller_get_default ()); -	g_signal_connect_object (drag_controller, "drag-start", (GCallback) __lambda77__unity_drag_controller_drag_start, self, 0); -	g_signal_connect_object (drag_controller, "drag-drop", (GCallback) __lambda78__unity_drag_controller_drag_drop, self, 0); -	g_signal_connect_object (drag_controller, "drag-motion", (GCallback) __lambda80__unity_drag_controller_drag_motion, self, 0); +	g_signal_connect_object (drag_controller, "drag-start", (GCallback) __lambda85__unity_drag_controller_drag_start, self, 0); +	g_signal_connect_object (drag_controller, "drag-drop", (GCallback) __lambda86__unity_drag_controller_drag_drop, self, 0); +	g_signal_connect_object (drag_controller, "drag-motion", (GCallback) __lambda88__unity_drag_controller_drag_motion, self, 0); 	clutter_actor_set_reactive ((ClutterActor*) self, TRUE); 	self->priv->child_refs = (_tmp5_ = gee_array_list_new (UNITY_LAUNCHER_TYPE_SCROLLER_CHILD, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL), _g_object_unref0 (self->priv->child_refs), _tmp5_); 	unity_launcher_scroller_view_order_children (self, TRUE); 	clutter_actor_queue_relayout ((ClutterActor*) self); -	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda81__gsource_func, g_object_ref (self), g_object_unref); +	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda89__gsource_func, g_object_ref (self), g_object_unref); 	unity_launcher_scroller_view_set_drag_indicator_space (self, FALSE); 	_g_object_unref0 (drag_controller); 	} diff --git a/unity-private/launcher/scrollerchild-controller.c b/unity-private/launcher/scrollerchild-controller.c index 9ce0b772a..c5a2ba5be 100644 --- a/unity-private/launcher/scrollerchild-controller.c +++ b/unity-private/launcher/scrollerchild-controller.c @@ -82,7 +82,7 @@ typedef struct _UnityLauncherScrollerChildPrivate UnityLauncherScrollerChildPriv  #define UNITY_LAUNCHER_TYPE_QUICKLIST_CONTROLLER_STATE (unity_launcher_quicklist_controller_state_get_type ())  #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -typedef struct _Block10Data Block10Data; +typedef struct _Block11Data Block11Data;  typedef enum { 	UNITY_LAUNCHER_SCROLLER_CHILD_CONTROLLER_MENU_STATE_NO_MENU, @@ -147,7 +147,7 @@ typedef enum { 	UNITY_LAUNCHER_QUICKLIST_CONTROLLER_STATE_CLOSED  } UnityLauncherQuicklistControllerState; -struct _Block10Data { +struct _Block11Data { 	int _ref_count_; 	UnityLauncherScrollerChildController * self; 	char* icon_name; @@ -199,8 +199,8 @@ gboolean unity_launcher_quicklist_controller_do_menus_match (UnityLauncherQuickl  UnityLauncherQuicklistController* unity_launcher_quicklist_controller_get_current_menu (void);  CtkMenuExpandable* unity_launcher_quicklist_controller_get_view (UnityLauncherQuicklistController* self);  static void _unity_launcher_scroller_child_controller_ensure_menu_state_clutter_actor_destroy (ClutterActor* _sender, gpointer self); -static gboolean _lambda17_ (UnityLauncherScrollerChildController* self); -static gboolean __lambda17__gsource_func (gpointer self); +static gboolean _lambda18_ (UnityLauncherScrollerChildController* self); +static gboolean __lambda18__gsource_func (gpointer self);  static ClutterActor* unity_launcher_scroller_child_controller_real_get_icon (UnityDragModel* base);  ClutterActor* unity_launcher_scroller_child_get_content (UnityLauncherScrollerChild* self);  static char* unity_launcher_scroller_child_controller_real_get_drag_data (UnityDragModel* base); @@ -208,13 +208,13 @@ const char* unity_launcher_scroller_child_controller_get_name (UnityLauncherScro  static gboolean unity_launcher_scroller_child_controller_on_motion_event (UnityLauncherScrollerChildController* self, ClutterEvent* event);  void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLauncherScrollerChildController* self, const char* icon_name);  static gboolean unity_launcher_scroller_child_controller_try_load_from_file (UnityLauncherScrollerChildController* self, const char* filepath); -static void _lambda18_ (UnityThemeFilePath* theme, const char* filepath, UnityLauncherScrollerChildController* self); +static void _lambda19_ (UnityThemeFilePath* theme, const char* filepath, UnityLauncherScrollerChildController* self);  void unity_launcher_scroller_child_set_icon (UnityLauncherScrollerChild* self, GdkPixbuf* value); -static void __lambda18__unity_theme_file_path_found_icon_path (UnityThemeFilePath* _sender, const char* filepath, gpointer self); -static void _lambda19_ (Block10Data* _data10_); -static void __lambda19__unity_theme_file_path_failed (UnityThemeFilePath* _sender, gpointer self); -static Block10Data* block10_data_ref (Block10Data* _data10_); -static void block10_data_unref (Block10Data* _data10_); +static void __lambda19__unity_theme_file_path_found_icon_path (UnityThemeFilePath* _sender, const char* filepath, gpointer self); +static void _lambda20_ (Block11Data* _data11_); +static void __lambda20__unity_theme_file_path_failed (UnityThemeFilePath* _sender, gpointer self); +static Block11Data* block11_data_ref (Block11Data* _data11_); +static void block11_data_unref (Block11Data* _data11_);  static void unity_launcher_scroller_child_controller_set_child (UnityLauncherScrollerChildController* self, UnityLauncherScrollerChild* value);  void unity_launcher_scroller_child_controller_set_name (UnityLauncherScrollerChildController* self, const char* value);  gboolean unity_launcher_scroller_child_controller_get_hide (UnityLauncherScrollerChildController* self); @@ -421,7 +421,7 @@ static void _unity_launcher_scroller_child_controller_ensure_menu_state_clutter_  } -static gboolean _lambda17_ (UnityLauncherScrollerChildController* self) { +static gboolean _lambda18_ (UnityLauncherScrollerChildController* self) { 	gboolean result = FALSE; 	unity_launcher_quicklist_controller_set_state (self->priv->_menu, UNITY_LAUNCHER_QUICKLIST_CONTROLLER_STATE_MENU); 	self->menu_state = UNITY_LAUNCHER_SCROLLER_CHILD_CONTROLLER_MENU_STATE_NO_MENU; @@ -430,9 +430,9 @@ static gboolean _lambda17_ (UnityLauncherScrollerChildController* self) {  } -static gboolean __lambda17__gsource_func (gpointer self) { +static gboolean __lambda18__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda17_ (self); +	result = _lambda18_ (self); 	return result;  } @@ -477,7 +477,7 @@ static void unity_launcher_scroller_child_controller_ensure_menu_state (UnityLau 	unity_launcher_quicklist_controller_set_state (self->priv->_menu, UNITY_LAUNCHER_QUICKLIST_CONTROLLER_STATE_LABEL); 	} 	if (self->menu_state == UNITY_LAUNCHER_SCROLLER_CHILD_CONTROLLER_MENU_STATE_MENU) { -	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda17__gsource_func, g_object_ref (self), g_object_unref); +	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda18__gsource_func, g_object_ref (self), g_object_unref); 	}  } @@ -570,7 +570,7 @@ static const char* string_to_string (const char* self) {  } -static void _lambda18_ (UnityThemeFilePath* theme, const char* filepath, UnityLauncherScrollerChildController* self) { +static void _lambda19_ (UnityThemeFilePath* theme, const char* filepath, UnityLauncherScrollerChildController* self) { 	GError * _inner_error_ = NULL; 	g_return_if_fail (theme != NULL); 	g_return_if_fail (filepath != NULL); @@ -579,13 +579,13 @@ static void _lambda18_ (UnityThemeFilePath* theme, const char* filepath, UnityLa 	GdkPixbuf* _tmp1_; 	_tmp0_ = gdk_pixbuf_new_from_file (filepath, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch48_g_error; +	goto __catch49_g_error; 	} 	unity_launcher_scroller_child_set_icon (self->priv->_child, _tmp1_ = _tmp0_); 	_g_object_unref0 (_tmp1_); 	} -	goto __finally48; -	__catch48_g_error: +	goto __finally49; +	__catch49_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -597,7 +597,7 @@ static void _lambda18_ (UnityThemeFilePath* theme, const char* filepath, UnityLa 	_g_error_free0 (e); 	} 	} -	__finally48: +	__finally49: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -606,15 +606,15 @@ static void _lambda18_ (UnityThemeFilePath* theme, const char* filepath, UnityLa  } -static void __lambda18__unity_theme_file_path_found_icon_path (UnityThemeFilePath* _sender, const char* filepath, gpointer self) { -	_lambda18_ (_sender, filepath, self); +static void __lambda19__unity_theme_file_path_found_icon_path (UnityThemeFilePath* _sender, const char* filepath, gpointer self) { +	_lambda19_ (_sender, filepath, self);  } -static void _lambda19_ (Block10Data* _data10_) { +static void _lambda20_ (Block11Data* _data11_) { 	UnityLauncherScrollerChildController * self; 	GError * _inner_error_ = NULL; -	self = _data10_->self; +	self = _data11_->self; 	{ 	GtkIconTheme* default_theme; 	GdkPixbuf* _tmp0_; @@ -622,23 +622,23 @@ static void _lambda19_ (Block10Data* _data10_) { 	_tmp0_ = gtk_icon_theme_load_icon (default_theme, GTK_STOCK_MISSING_IMAGE, 48, 0, &_inner_error_); 	if (_inner_error_ != NULL) { 	_g_object_unref0 (default_theme); -	goto __catch49_g_error; +	goto __catch50_g_error; 	} 	unity_launcher_scroller_child_set_icon (self->priv->_child, _tmp0_); 	_g_object_unref0 (default_theme); 	} -	goto __finally49; -	__catch49_g_error: +	goto __finally50; +	__catch50_g_error: 	{ 	GError * e; 	e = _inner_error_; 	_inner_error_ = NULL; 	{ -	g_warning ("scrollerchild-controller.vala:323: Could not load any icon for %s", _data10_->icon_name); +	g_warning ("scrollerchild-controller.vala:323: Could not load any icon for %s", _data11_->icon_name); 	_g_error_free0 (e); 	} 	} -	__finally49: +	__finally50: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -647,28 +647,28 @@ static void _lambda19_ (Block10Data* _data10_) {  } -static void __lambda19__unity_theme_file_path_failed (UnityThemeFilePath* _sender, gpointer self) { -	_lambda19_ (self); +static void __lambda20__unity_theme_file_path_failed (UnityThemeFilePath* _sender, gpointer self) { +	_lambda20_ (self);  } -static Block10Data* block10_data_ref (Block10Data* _data10_) { -	g_atomic_int_inc (&_data10_->_ref_count_); -	return _data10_; +static Block11Data* block11_data_ref (Block11Data* _data11_) { +	g_atomic_int_inc (&_data11_->_ref_count_); +	return _data11_;  } -static void block10_data_unref (Block10Data* _data10_) { -	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) { -	_g_object_unref0 (_data10_->self); -	_g_free0 (_data10_->icon_name); -	g_slice_free (Block10Data, _data10_); +static void block11_data_unref (Block11Data* _data11_) { +	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) { +	_g_object_unref0 (_data11_->self); +	_g_free0 (_data11_->icon_name); +	g_slice_free (Block11Data, _data11_); 	}  }  void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLauncherScrollerChildController* self, const char* icon_name) { -	Block10Data* _data10_; +	Block11Data* _data11_; 	char* _tmp0_; 	gboolean _tmp1_; 	UnityThemeFilePath* _tmp2_; @@ -676,16 +676,16 @@ void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLau 	GtkIconTheme* _tmp3_; 	g_return_if_fail (self != NULL); 	g_return_if_fail (icon_name != NULL); -	_data10_ = g_slice_new0 (Block10Data); -	_data10_->_ref_count_ = 1; -	_data10_->self = g_object_ref (self); -	_data10_->icon_name = g_strdup (icon_name); -	if (unity_launcher_scroller_child_controller_try_load_from_file (self, _data10_->icon_name)) { -	block10_data_unref (_data10_); +	_data11_ = g_slice_new0 (Block11Data); +	_data11_->_ref_count_ = 1; +	_data11_->self = g_object_ref (self); +	_data11_->icon_name = g_strdup (icon_name); +	if (unity_launcher_scroller_child_controller_try_load_from_file (self, _data11_->icon_name)) { +	block11_data_unref (_data11_); 	return; 	} -	if ((_tmp1_ = unity_launcher_scroller_child_controller_try_load_from_file (self, _tmp0_ = g_strconcat ("/usr/share/pixmaps/", _data10_->icon_name, NULL)), _g_free0 (_tmp0_), _tmp1_)) { -	block10_data_unref (_data10_); +	if ((_tmp1_ = unity_launcher_scroller_child_controller_try_load_from_file (self, _tmp0_ = g_strconcat ("/usr/share/pixmaps/", _data11_->icon_name, NULL)), _g_free0 (_tmp0_), _tmp1_)) { +	block11_data_unref (_data11_); 	return; 	} 	self->priv->theme_file_path = (_tmp2_ = unity_theme_file_path_new (), _g_object_unref0 (self->priv->theme_file_path), _tmp2_); @@ -696,11 +696,11 @@ void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLau 	unity_theme_file_path_add_icon_theme (self->priv->theme_file_path, theme); 	gtk_icon_theme_set_custom_theme (theme, "Web"); 	unity_theme_file_path_add_icon_theme (self->priv->theme_file_path, theme); -	g_signal_connect_object (self->priv->theme_file_path, "found-icon-path", (GCallback) __lambda18__unity_theme_file_path_found_icon_path, self, 0); -	g_signal_connect_data (self->priv->theme_file_path, "failed", (GCallback) __lambda19__unity_theme_file_path_failed, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0); -	unity_theme_file_path_get_icon_filepath (self->priv->theme_file_path, _data10_->icon_name, NULL, NULL); +	g_signal_connect_object (self->priv->theme_file_path, "found-icon-path", (GCallback) __lambda19__unity_theme_file_path_found_icon_path, self, 0); +	g_signal_connect_data (self->priv->theme_file_path, "failed", (GCallback) __lambda20__unity_theme_file_path_failed, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0); +	unity_theme_file_path_get_icon_filepath (self->priv->theme_file_path, _data11_->icon_name, NULL, NULL); 	_g_object_unref0 (theme); -	block10_data_unref (_data10_); +	block11_data_unref (_data11_);  } @@ -717,12 +717,12 @@ static gboolean unity_launcher_scroller_child_controller_try_load_from_file (Uni 	GdkPixbuf* _tmp1_; 	_tmp0_ = gdk_pixbuf_new_from_file_at_scale (filepath, 48, 48, TRUE, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch50_g_error; +	goto __catch51_g_error; 	} 	pixbuf = (_tmp1_ = _tmp0_, _g_object_unref0 (pixbuf), _tmp1_); 	} -	goto __finally50; -	__catch50_g_error: +	goto __finally51; +	__catch51_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -733,7 +733,7 @@ static gboolean unity_launcher_scroller_child_controller_try_load_from_file (Uni 	_g_error_free0 (e); 	} 	} -	__finally50: +	__finally51: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (pixbuf); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); diff --git a/unity-private/launcher/scrollerchild.c b/unity-private/launcher/scrollerchild.c index 63eb91bc0..a546cb8e3 100644 --- a/unity-private/launcher/scrollerchild.c +++ b/unity-private/launcher/scrollerchild.c @@ -373,12 +373,12 @@ static void unity_launcher_scroller_child_load_textures (UnityLauncherScrollerCh 	GdkPixbuf* _tmp5_; 	_tmp4_ = gdk_pixbuf_new_from_file (UNITY_LAUNCHER_HONEYCOMB_MASK_FILE, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch51_g_error; +	goto __catch52_g_error; 	} 	self->priv->honeycomb_mask = (_tmp5_ = _tmp4_, _g_object_unref0 (self->priv->honeycomb_mask), _tmp5_); 	} -	goto __finally51; -	__catch51_g_error: +	goto __finally52; +	__catch52_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -388,7 +388,7 @@ static void unity_launcher_scroller_child_load_textures (UnityLauncherScrollerCh 	_g_error_free0 (e); 	} 	} -	__finally51: +	__finally52: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); diff --git a/unity-private/panel/panel-window-buttons.c b/unity-private/panel/panel-window-buttons.c index a4cfefc60..36cab8b6b 100644 --- a/unity-private/panel/panel-window-buttons.c +++ b/unity-private/panel/panel-window-buttons.c @@ -217,26 +217,32 @@ static void unity_panel_window_buttons_on_active_window_changed (UnityPanelWindo 	gint _tmp3__length1; 	char* _tmp4_; 	char* _tmp5_; +	char* _tmp6_; 	display_name = g_strdup (g_app_info_get_display_name (info)); 	display_name = (_tmp4_ = g_strdup ((_tmp3_ = _tmp2_ = g_strsplit (display_name, " ", 0), _tmp3__length1 = _vala_array_length (_tmp2_), _tmp3_)[0]), _g_free0 (display_name), _tmp4_); 	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL); -	clutter_text_set_markup ((ClutterText*) self->priv->appname, _tmp5_ = g_strdup_printf (UNITY_PANEL_WINDOW_BUTTONS_FORMAT, display_name)); +	clutter_text_set_markup ((ClutterText*) self->priv->appname, _tmp6_ = g_strdup_printf (UNITY_PANEL_WINDOW_BUTTONS_FORMAT, _tmp5_ = g_markup_escape_text (display_name, -1))); +	_g_free0 (_tmp6_); 	_g_free0 (_tmp5_); 	_g_free0 (display_name); 	} else { -	char* _tmp6_; 	char* _tmp7_; -	clutter_text_set_markup ((ClutterText*) self->priv->appname, _tmp7_ = g_strdup_printf (UNITY_PANEL_WINDOW_BUTTONS_FORMAT, _tmp6_ = bamf_view_get_name ((BamfView*) win))); +	char* _tmp8_; +	char* _tmp9_; +	clutter_text_set_markup ((ClutterText*) self->priv->appname, _tmp9_ = g_strdup_printf (UNITY_PANEL_WINDOW_BUTTONS_FORMAT, _tmp8_ = g_markup_escape_text (_tmp7_ = bamf_view_get_name ((BamfView*) win), -1))); +	_g_free0 (_tmp9_); +	_g_free0 (_tmp8_); 	_g_free0 (_tmp7_); -	_g_free0 (_tmp6_); 	} 	_g_object_unref0 (info); 	} else { -	char* _tmp8_; -	char* _tmp9_; -	clutter_text_set_markup ((ClutterText*) self->priv->appname, _tmp9_ = g_strdup_printf (UNITY_PANEL_WINDOW_BUTTONS_FORMAT, _tmp8_ = bamf_view_get_name ((BamfView*) win))); -	_g_free0 (_tmp9_); -	_g_free0 (_tmp8_); +	char* _tmp10_; +	char* _tmp11_; +	char* _tmp12_; +	clutter_text_set_markup ((ClutterText*) self->priv->appname, _tmp12_ = g_strdup_printf (UNITY_PANEL_WINDOW_BUTTONS_FORMAT, _tmp11_ = g_markup_escape_text (_tmp10_ = bamf_view_get_name ((BamfView*) win), -1))); +	_g_free0 (_tmp12_); +	_g_free0 (_tmp11_); +	_g_free0 (_tmp10_); 	} 	self->priv->_last_view = new_view; 	g_object_weak_ref ((GObject*) self->priv->_last_view, _unity_panel_window_buttons_on_last_view_destroyed_gweak_notify, self); diff --git a/unity-private/panel/panel-window-buttons.vala b/unity-private/panel/panel-window-buttons.vala index 4a9dd0996..72e142ad3 100644 --- a/unity-private/panel/panel-window-buttons.vala +++ b/unity-private/panel/panel-window-buttons.vala @@ -153,14 +153,14 @@ namespace Unity.Panel  {  string display_name = info.get_display_name ();  display_name = display_name.split (" ")[0]; - appname.set_markup (FORMAT.printf (display_name)); + appname.set_markup (FORMAT.printf (Markup.escape_text (display_name)));  }  else - appname.set_markup (FORMAT.printf (win.get_name ())); + appname.set_markup (FORMAT.printf (Markup.escape_text (win.get_name ())));  }  else  { - appname.set_markup (FORMAT.printf (win.get_name ())); + appname.set_markup (FORMAT.printf (Markup.escape_text (win.get_name ())));  }  _last_view = new_view; diff --git a/unity-private/places/places-button.c b/unity-private/places/places-button.c new file mode 100644 index 000000000..785b8db88 --- /dev/null +++ b/unity-private/places/places-button.c @@ -0,0 +1,417 @@ +/* places-button.c generated by valac 0.9.7, the Vala compiler + * generated from places-button.vala, do not modify */ + +/* + * Copyright (C) 2010 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authored by Neil Jagdish Patel <neil.patel@canonical.com> + * + */ + +#include <glib.h> +#include <glib-object.h> +#include <clutk/clutk.h> +#include <cairo.h> +#include <unity.h> +#include <float.h> +#include <math.h> +#include <clutter/clutter.h> + + +#define UNITY_PLACES_TYPE_BUTTON (unity_places_button_get_type ()) +#define UNITY_PLACES_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButton)) +#define UNITY_PLACES_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) +#define UNITY_PLACES_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) + +typedef struct _UnityPlacesButton UnityPlacesButton; +typedef struct _UnityPlacesButtonClass UnityPlacesButtonClass; +typedef struct _UnityPlacesButtonPrivate UnityPlacesButtonPrivate; + +#define UNITY_PLACES_BUTTON_TYPE_NORMAL_STATE (unity_places_button_normal_state_get_type ()) + +#define UNITY_PLACES_BUTTON_TYPE_PRELIGHT_STATE (unity_places_button_prelight_state_get_type ()) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL))) +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) + +typedef void (*UnityPlacesButtonButtonOutlineFunc) (cairo_t* cr, gint width, gint height, void* user_data); +struct _UnityPlacesButton { +	CtkButton parent_instance; +	UnityPlacesButtonPrivate * priv; +	UnityPlacesButtonButtonOutlineFunc outline_func; +	gpointer outline_func_target; +	GDestroyNotify outline_func_target_destroy_notify; +}; + +struct _UnityPlacesButtonClass { +	CtkButtonClass parent_class; +}; + +typedef enum { +	UNITY_PLACES_BUTTON_NORMAL_STATE_NONE, +	UNITY_PLACES_BUTTON_NORMAL_STATE_UNDERLINE +} UnityPlacesButtonNormalState; + +typedef enum { +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_NONE, +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_STRIPED, +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_UNDERLINE +} UnityPlacesButtonPrelightState; + +struct _UnityPlacesButtonPrivate { +	UnityPlacesButtonNormalState _normal_state; +	UnityPlacesButtonPrelightState _prelight_state; +	UnityCairoCanvas* bg; +	CtkEffectGlow* glow; +}; + + +static gpointer unity_places_button_parent_class = NULL; + +GType unity_places_button_get_type (void) G_GNUC_CONST; +GType unity_places_button_normal_state_get_type (void) G_GNUC_CONST; +GType unity_places_button_prelight_state_get_type (void) G_GNUC_CONST; +#define UNITY_PLACES_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonPrivate)) +enum { +	UNITY_PLACES_BUTTON_DUMMY_PROPERTY, +	UNITY_PLACES_BUTTON_NORMAL_STATE, +	UNITY_PLACES_BUTTON_PRELIGHT_STATE +}; +UnityPlacesButton* unity_places_button_new (void); +UnityPlacesButton* unity_places_button_construct (GType object_type); +void unity_places_button_rounded_rect (UnityPlacesButton* self, cairo_t* cr, gint width, gint height); +static void unity_places_button_paint_bg (UnityPlacesButton* self, cairo_t* cr, gint width, gint height); +UnityPlacesButtonNormalState unity_places_button_get_normal_state (UnityPlacesButton* self); +void unity_places_button_set_normal_state (UnityPlacesButton* self, UnityPlacesButtonNormalState value); +UnityPlacesButtonPrelightState unity_places_button_get_prelight_state (UnityPlacesButton* self); +void unity_places_button_set_prelight_state (UnityPlacesButton* self, UnityPlacesButtonPrelightState value); +static void _unity_places_button_paint_bg_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self); +static void _lambda16_ (UnityPlacesButton* self); +static void __lambda16__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +static void _unity_places_button_rounded_rect_unity_places_button_button_outline_func (cairo_t* cr, gint width, gint height, gpointer self); +static GObject * unity_places_button_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +static void unity_places_button_finalize (GObject* obj); +static void unity_places_button_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void unity_places_button_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); + + + +GType unity_places_button_normal_state_get_type (void) { +	static volatile gsize unity_places_button_normal_state_type_id__volatile = 0; +	if (g_once_init_enter (&unity_places_button_normal_state_type_id__volatile)) { +	static const GEnumValue values[] = {{UNITY_PLACES_BUTTON_NORMAL_STATE_NONE, "UNITY_PLACES_BUTTON_NORMAL_STATE_NONE", "none"}, {UNITY_PLACES_BUTTON_NORMAL_STATE_UNDERLINE, "UNITY_PLACES_BUTTON_NORMAL_STATE_UNDERLINE", "underline"}, {0, NULL, NULL}}; +	GType unity_places_button_normal_state_type_id; +	unity_places_button_normal_state_type_id = g_enum_register_static ("UnityPlacesButtonNormalState", values); +	g_once_init_leave (&unity_places_button_normal_state_type_id__volatile, unity_places_button_normal_state_type_id); +	} +	return unity_places_button_normal_state_type_id__volatile; +} + + +GType unity_places_button_prelight_state_get_type (void) { +	static volatile gsize unity_places_button_prelight_state_type_id__volatile = 0; +	if (g_once_init_enter (&unity_places_button_prelight_state_type_id__volatile)) { +	static const GEnumValue values[] = {{UNITY_PLACES_BUTTON_PRELIGHT_STATE_NONE, "UNITY_PLACES_BUTTON_PRELIGHT_STATE_NONE", "none"}, {UNITY_PLACES_BUTTON_PRELIGHT_STATE_STRIPED, "UNITY_PLACES_BUTTON_PRELIGHT_STATE_STRIPED", "striped"}, {UNITY_PLACES_BUTTON_PRELIGHT_STATE_UNDERLINE, "UNITY_PLACES_BUTTON_PRELIGHT_STATE_UNDERLINE", "underline"}, {0, NULL, NULL}}; +	GType unity_places_button_prelight_state_type_id; +	unity_places_button_prelight_state_type_id = g_enum_register_static ("UnityPlacesButtonPrelightState", values); +	g_once_init_leave (&unity_places_button_prelight_state_type_id__volatile, unity_places_button_prelight_state_type_id); +	} +	return unity_places_button_prelight_state_type_id__volatile; +} + + +UnityPlacesButton* unity_places_button_construct (GType object_type) { +	UnityPlacesButton * self; +	self = (UnityPlacesButton*) g_object_new (object_type, NULL); +	return self; +} + + +UnityPlacesButton* unity_places_button_new (void) { +	return unity_places_button_construct (UNITY_PLACES_TYPE_BUTTON); +} + + +void unity_places_button_rounded_rect (UnityPlacesButton* self, cairo_t* cr, gint width, gint height) { +	gint padding; +	gint x; +	gint y; +	gint radius; +	g_return_if_fail (self != NULL); +	g_return_if_fail (cr != NULL); +	padding = 1; +	x = padding; +	y = padding; +	radius = 7; +	width = width - (padding * 2); +	height = height - (padding * 2); +	cairo_move_to (cr, (double) x, (double) (y + radius)); +	cairo_curve_to (cr, (double) x, (double) y, (double) x, (double) y, (double) (x + radius), (double) y); +	cairo_line_to (cr, (double) (width - radius), (double) y); +	cairo_curve_to (cr, (double) width, (double) y, (double) width, (double) y, (double) width, (double) (y + radius)); +	cairo_line_to (cr, (double) width, (double) (height - radius)); +	cairo_curve_to (cr, (double) width, (double) height, (double) width, (double) height, (double) (width - radius), (double) height); +	cairo_line_to (cr, (double) (x + radius), (double) height); +	cairo_curve_to (cr, (double) x, (double) height, (double) x, (double) height, (double) x, (double) (height - radius)); +	cairo_close_path (cr); +} + + +static void unity_places_button_paint_bg (UnityPlacesButton* self, cairo_t* cr, gint width, gint height) { +	gint x; +	g_return_if_fail (self != NULL); +	g_return_if_fail (cr != NULL); +	x = 1; +	cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); +	cairo_paint (cr); +	cairo_set_operator (cr, CAIRO_OPERATOR_OVER); +	cairo_set_line_width (cr, 1.5); +	cairo_translate (cr, 0.5, 0.5); +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_NORMAL) { +	if (self->priv->_normal_state == UNITY_PLACES_BUTTON_NORMAL_STATE_UNDERLINE) { +	cairo_move_to (cr, (double) x, (double) (height - 1)); +	cairo_line_to (cr, (double) (x + width), (double) (height - 1)); +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.3); +	cairo_stroke (cr); +	} +	return; +	} else { +	gboolean _tmp0_ = FALSE; +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_PRELIGHT) { +	_tmp0_ = self->priv->_prelight_state == UNITY_PLACES_BUTTON_PRELIGHT_STATE_UNDERLINE; +	} else { +	_tmp0_ = FALSE; +	} +	if (_tmp0_) { +	cairo_move_to (cr, (double) x, (double) (height - 1)); +	cairo_line_to (cr, (double) (x + width), (double) (height - 1)); +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.3); +	cairo_stroke (cr); +	return; +	} +	} +	self->outline_func (cr, width, height, self->outline_func_target); +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_NORMAL) { +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.0); +	} else { +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_PRELIGHT) { +	cairo_surface_t* pattern; +	cairo_t* context; +	cairo_pattern_t* pat; +	pattern = cairo_surface_create_similar (cairo_get_target (cr), CAIRO_CONTENT_COLOR_ALPHA, 4, 4); +	context = cairo_create (pattern); +	cairo_set_operator (context, CAIRO_OPERATOR_CLEAR); +	cairo_paint (context); +	cairo_set_line_width (context, 0.2); +	cairo_set_operator (context, CAIRO_OPERATOR_OVER); +	cairo_set_source_rgba (context, 1.0, 1.0, 1.0, 0.85); +	cairo_move_to (context, (double) 0, (double) 0); +	cairo_line_to (context, (double) 4, (double) 4); +	cairo_stroke (context); +	pat = cairo_pattern_create_for_surface (pattern); +	cairo_pattern_set_extend (pat, CAIRO_EXTEND_REPEAT); +	cairo_set_source (cr, pat); +	_cairo_pattern_destroy0 (pat); +	_cairo_destroy0 (context); +	_cairo_surface_destroy0 (pattern); +	} else { +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0); +	} +	} +	cairo_fill_preserve (cr); +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.5); +	cairo_stroke (cr); +} + + +UnityPlacesButtonNormalState unity_places_button_get_normal_state (UnityPlacesButton* self) { +	UnityPlacesButtonNormalState result; +	g_return_val_if_fail (self != NULL, 0); +	result = self->priv->_normal_state; +	return result; +} + + +void unity_places_button_set_normal_state (UnityPlacesButton* self, UnityPlacesButtonNormalState value) { +	g_return_if_fail (self != NULL); +	if (self->priv->_normal_state != value) { +	self->priv->_normal_state = value; +	unity_cairo_canvas_update (self->priv->bg); +	} +	g_object_notify ((GObject *) self, "normal-state"); +} + + +UnityPlacesButtonPrelightState unity_places_button_get_prelight_state (UnityPlacesButton* self) { +	UnityPlacesButtonPrelightState result; +	g_return_val_if_fail (self != NULL, 0); +	result = self->priv->_prelight_state; +	return result; +} + + +void unity_places_button_set_prelight_state (UnityPlacesButton* self, UnityPlacesButtonPrelightState value) { +	g_return_if_fail (self != NULL); +	if (self->priv->_prelight_state != value) { +	self->priv->_prelight_state = value; +	unity_cairo_canvas_update (self->priv->bg); +	} +	g_object_notify ((GObject *) self, "prelight-state"); +} + + +static void _unity_places_button_paint_bg_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self) { +	unity_places_button_paint_bg (self, cr, width, height); +} + + +static void _lambda16_ (UnityPlacesButton* self) { +	unity_cairo_canvas_update (self->priv->bg); +	if (CTK_IS_TEXT (ctk_button_get_text ((CtkButton*) self))) { +	gboolean _tmp0_ = FALSE; +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_NORMAL) { +	_tmp0_ = TRUE; +	} else { +	_tmp0_ = ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_PRELIGHT; +	} +	if (_tmp0_) { +	ClutterColor _tmp1_ = {0}; +	ClutterColor _tmp2_; +	clutter_text_set_color ((ClutterText*) ctk_button_get_text ((CtkButton*) self), (_tmp2_ = (_tmp1_.red = (guint8) 255, _tmp1_.green = (guint8) 255, _tmp1_.blue = (guint8) 255, _tmp1_.alpha = (guint8) 255, _tmp1_), &_tmp2_)); +	} else { +	ClutterColor _tmp3_ = {0}; +	ClutterColor _tmp4_; +	clutter_text_set_color ((ClutterText*) ctk_button_get_text ((CtkButton*) self), (_tmp4_ = (_tmp3_.red = (guint8) 50, _tmp3_.green = (guint8) 50, _tmp3_.blue = (guint8) 50, _tmp3_.alpha = (guint8) 200, _tmp3_), &_tmp4_)); +	} +	} +	if (CTK_IS_EFFECT_GLOW (self->priv->glow)) { +	ctk_effect_set_invalidate_effect_cache ((CtkEffect*) self->priv->glow, TRUE); +	} +} + + +static void __lambda16__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda16_ (self); +} + + +static void _unity_places_button_rounded_rect_unity_places_button_button_outline_func (cairo_t* cr, gint width, gint height, gpointer self) { +	unity_places_button_rounded_rect (self, cr, width, height); +} + + +static GObject * unity_places_button_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { +	GObject * obj; +	GObjectClass * parent_class; +	UnityPlacesButton * self; +	parent_class = G_OBJECT_CLASS (unity_places_button_parent_class); +	obj = parent_class->constructor (type, n_construct_properties, construct_properties); +	self = UNITY_PLACES_BUTTON (obj); +	{ +	UnityCairoCanvas* _tmp0_; +	UnityPlacesButtonButtonOutlineFunc _tmp1_; +	self->priv->bg = (_tmp0_ = g_object_ref_sink (unity_cairo_canvas_new (_unity_places_button_paint_bg_unity_cairo_canvas_cairo_canvas_paint, self)), _g_object_unref0 (self->priv->bg), _tmp0_); +	ctk_actor_set_background ((CtkActor*) self, (ClutterActor*) self->priv->bg); +	clutter_actor_show ((ClutterActor*) self->priv->bg); +	g_signal_connect_object ((GObject*) self, "notify::state", (GCallback) __lambda16__g_object_notify, self, 0); +	self->outline_func = (_tmp1_ = _unity_places_button_rounded_rect_unity_places_button_button_outline_func, ((self->outline_func_target_destroy_notify == NULL) ? NULL : (self->outline_func_target_destroy_notify (self->outline_func_target), NULL), self->outline_func = NULL, self->outline_func_target = NULL, self->outline_func_target_destroy_notify = NULL), self->outline_func_target = g_object_ref (self), self->outline_func_target_destroy_notify = g_object_unref, _tmp1_); +	} +	return obj; +} + + +static void unity_places_button_class_init (UnityPlacesButtonClass * klass) { +	unity_places_button_parent_class = g_type_class_peek_parent (klass); +	g_type_class_add_private (klass, sizeof (UnityPlacesButtonPrivate)); +	G_OBJECT_CLASS (klass)->get_property = unity_places_button_get_property; +	G_OBJECT_CLASS (klass)->set_property = unity_places_button_set_property; +	G_OBJECT_CLASS (klass)->constructor = unity_places_button_constructor; +	G_OBJECT_CLASS (klass)->finalize = unity_places_button_finalize; +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_BUTTON_NORMAL_STATE, g_param_spec_enum ("normal-state", "normal-state", "normal-state", UNITY_PLACES_BUTTON_TYPE_NORMAL_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_BUTTON_PRELIGHT_STATE, g_param_spec_enum ("prelight-state", "prelight-state", "prelight-state", UNITY_PLACES_BUTTON_TYPE_PRELIGHT_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + + +static void unity_places_button_instance_init (UnityPlacesButton * self) { +	self->priv = UNITY_PLACES_BUTTON_GET_PRIVATE (self); +	self->priv->_normal_state = UNITY_PLACES_BUTTON_NORMAL_STATE_NONE; +	self->priv->_prelight_state = UNITY_PLACES_BUTTON_PRELIGHT_STATE_NONE; +} + + +static void unity_places_button_finalize (GObject* obj) { +	UnityPlacesButton * self; +	self = UNITY_PLACES_BUTTON (obj); +	(self->outline_func_target_destroy_notify == NULL) ? NULL : (self->outline_func_target_destroy_notify (self->outline_func_target), NULL); +	self->outline_func = NULL; +	self->outline_func_target = NULL; +	self->outline_func_target_destroy_notify = NULL; +	_g_object_unref0 (self->priv->bg); +	_g_object_unref0 (self->priv->glow); +	G_OBJECT_CLASS (unity_places_button_parent_class)->finalize (obj); +} + + +GType unity_places_button_get_type (void) { +	static volatile gsize unity_places_button_type_id__volatile = 0; +	if (g_once_init_enter (&unity_places_button_type_id__volatile)) { +	static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesButton), 0, (GInstanceInitFunc) unity_places_button_instance_init, NULL }; +	GType unity_places_button_type_id; +	unity_places_button_type_id = g_type_register_static (CTK_TYPE_BUTTON, "UnityPlacesButton", &g_define_type_info, 0); +	g_once_init_leave (&unity_places_button_type_id__volatile, unity_places_button_type_id); +	} +	return unity_places_button_type_id__volatile; +} + + +static void unity_places_button_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +	UnityPlacesButton * self; +	self = UNITY_PLACES_BUTTON (object); +	switch (property_id) { +	case UNITY_PLACES_BUTTON_NORMAL_STATE: +	g_value_set_enum (value, unity_places_button_get_normal_state (self)); +	break; +	case UNITY_PLACES_BUTTON_PRELIGHT_STATE: +	g_value_set_enum (value, unity_places_button_get_prelight_state (self)); +	break; +	default: +	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +	break; +	} +} + + +static void unity_places_button_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +	UnityPlacesButton * self; +	self = UNITY_PLACES_BUTTON (object); +	switch (property_id) { +	case UNITY_PLACES_BUTTON_NORMAL_STATE: +	unity_places_button_set_normal_state (self, g_value_get_enum (value)); +	break; +	case UNITY_PLACES_BUTTON_PRELIGHT_STATE: +	unity_places_button_set_prelight_state (self, g_value_get_enum (value)); +	break; +	default: +	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +	break; +	} +} + + + + diff --git a/unity-private/places/places-button.vala b/unity-private/places/places-button.vala new file mode 100644 index 000000000..631f096eb --- /dev/null +++ b/unity-private/places/places-button.vala @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authored by Neil Jagdish Patel <neil.patel@canonical.com> + * + */ +using Unity; + +namespace Unity.Places +{ + public class Button : Ctk.Button + { + public enum NormalState + { + NONE, + UNDERLINE + } + + public enum PrelightState + { + NONE, + STRIPED, + UNDERLINE + } + + public delegate void ButtonOutlineFunc (Cairo.Context cr, + int width, + int height); + + public ButtonOutlineFunc outline_func; + + private NormalState _normal_state = NormalState.NONE; + public NormalState normal_state { + get { return _normal_state; } + set { + if (_normal_state != value) + { + _normal_state = value; + bg.update (); + } + } + } + + private PrelightState _prelight_state = PrelightState.NONE; + public PrelightState prelight_state { + get { return _prelight_state; } + set { + if (_prelight_state != value) + { + _prelight_state = value; + bg.update (); + } + } + } + private CairoCanvas bg; + private Ctk.EffectGlow? glow; + + public Button () + { + Object (); + } + + construct + { + bg = new CairoCanvas (paint_bg); + set_background (bg); + bg.show (); + + notify["state"].connect (() => { + bg.update (); + + if (get_text () is Ctk.Text) + { + if (state == Ctk.ActorState.STATE_NORMAL || + state == Ctk.ActorState.STATE_PRELIGHT) + { + get_text ().color = { 255, 255, 255, 255 }; + } + else + get_text ().color = { 50, 50, 50, 200 }; + } + + if (glow is Ctk.EffectGlow) + glow.set_invalidate_effect_cache (true); + }); + + outline_func = rounded_rect; + } + + public void rounded_rect (Cairo.Context cr, int width, int height) + { + var padding = 1; + var x = padding; + var y = padding; + var radius = 7; + + width -= padding *2; + height -= padding * 2; + + cr.move_to (x, y + radius); + cr.curve_to (x, y, + x, y, + x + radius, y); + cr.line_to (width - radius, y); + cr.curve_to (width, y, + width, y, + width, y + radius); + cr.line_to (width, height - radius); + cr.curve_to (width, height, + width, height, + width - radius, height); + cr.line_to (x + radius, height); + cr.curve_to (x, height, + x, height, + x, height - radius); + cr.close_path (); } + + private void paint_bg (Cairo.Context cr, int width, int height) + { + var x = 1; + + cr.set_operator (Cairo.Operator.CLEAR); + cr.paint (); + + cr.set_operator (Cairo.Operator.OVER); + cr.set_line_width (1.5); + cr.translate (0.5, 0.5); + + if (state == Ctk.ActorState.STATE_NORMAL) + { + if (_normal_state == NormalState.UNDERLINE) + { + cr.move_to (x, height - 1); + cr.line_to (x + width, height - 1); + cr.set_source_rgba (1.0, 1.0, 1.0, 0.3); + cr.stroke (); + } + return; + } + else if (state == Ctk.ActorState.STATE_PRELIGHT && + _prelight_state == PrelightState.UNDERLINE) + { + cr.move_to (x, height - 1); + cr.line_to (x + width, height - 1); + cr.set_source_rgba (1.0, 1.0, 1.0, 0.3); + cr.stroke (); + return; + } + + outline_func (cr, width, height); + + if (state == Ctk.ActorState.STATE_NORMAL) + { + cr.set_source_rgba (1.0, 1.0, 1.0, 0.0); + } + else if (state == Ctk.ActorState.STATE_PRELIGHT) + { + var pattern = new Cairo.Surface.similar (cr.get_target (), + Cairo.Content.COLOR_ALPHA, + 4, 4); + var context = new Cairo.Context (pattern); +  + context.set_operator (Cairo.Operator.CLEAR); + context.paint (); + + context.set_line_width (0.2); + context.set_operator (Cairo.Operator.OVER); + context.set_source_rgba (1.0, 1.0, 1.0, 0.85); + + context.move_to (0, 0); + context.line_to (4, 4); + + context.stroke (); + + var pat = new Cairo.Pattern.for_surface (pattern); + pat.set_extend (Cairo.Extend.REPEAT); + cr.set_source (pat); + } + else + { + cr.set_source_rgba (1.0, 1.0, 1.0, 1.0); + } + cr.fill_preserve (); + + cr.set_source_rgba (1.0, 1.0, 1.0, 0.5); + cr.stroke (); + } + } +} diff --git a/unity-private/places/places-controller.c b/unity-private/places/places-controller.c index 57406bb38..6b5cc91b5 100644 --- a/unity-private/places/places-controller.c +++ b/unity-private/places/places-controller.c @@ -291,8 +291,8 @@ void unity_places_controller_set_volumes (UnityPlacesController* self, UnityPlac  UnityPlacesPlaceFileModel* unity_places_place_file_model_new (void);  UnityPlacesPlaceFileModel* unity_places_place_file_model_construct (GType object_type);  GType unity_places_place_file_model_get_type (void) G_GNUC_CONST; -static void _lambda60_ (UnityPlacesPlace* place, UnityPlacesController* self); -static void __lambda60__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self); +static void _lambda68_ (UnityPlacesPlace* place, UnityPlacesController* self); +static void __lambda68__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self);  UnityPlacesVolumeController* unity_places_volume_controller_new (void);  UnityPlacesVolumeController* unity_places_volume_controller_construct (GType object_type);  UnityPlacesTrashController* unity_places_trash_controller_new (void); @@ -497,7 +497,7 @@ void unity_places_controller_set_volumes (UnityPlacesController* self, UnityPlac  } -static void _lambda60_ (UnityPlacesPlace* place, UnityPlacesController* self) { +static void _lambda68_ (UnityPlacesPlace* place, UnityPlacesController* self) { 	g_return_if_fail (place != NULL); 	{ 	GeeIterator* _e_it; @@ -516,8 +516,8 @@ static void _lambda60_ (UnityPlacesPlace* place, UnityPlacesController* self) {  } -static void __lambda60__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self) { -	_lambda60_ (place, self); +static void __lambda68__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self) { +	_lambda68_ (place, self);  } @@ -541,7 +541,7 @@ static GObject * unity_places_controller_constructor (GType type, guint n_constr 	UnityPlacesView* _tmp7_; 	unity_places_controller_set_model (self, _tmp1_ = (_tmp0_ = unity_places_place_file_model_new (), UNITY_PLACES_IS_PLACE_MODEL (_tmp0_) ? ((UnityPlacesPlaceModel*) _tmp0_) : NULL)); 	_g_object_unref0 (_tmp1_); -	g_signal_connect_object (self->priv->_model, "place-added", (GCallback) __lambda60__unity_places_place_model_place_added, self, 0); +	g_signal_connect_object (self->priv->_model, "place-added", (GCallback) __lambda68__unity_places_place_model_place_added, self, 0); 	unity_places_controller_set_volumes (self, _tmp2_ = unity_places_volume_controller_new ()); 	_g_object_unref0 (_tmp2_); 	s = (_tmp6_ = (_tmp5_ = (GObject*) gee_abstract_list_get ((GeeAbstractList*) (_tmp4_ = unity_testing_object_registry_lookup (_tmp3_ = unity_testing_object_registry_get_default (), "UnityScrollerModel")), 0), UNITY_LAUNCHER_IS_SCROLLER_MODEL (_tmp5_) ? ((UnityLauncherScrollerModel*) _tmp5_) : NULL), _g_object_unref0 (_tmp4_), _unity_testing_object_registry_unref0 (_tmp3_), _tmp6_); diff --git a/unity-private/places/places-default-renderer-group.c b/unity-private/places/places-default-renderer-group.c index 5d9776b1d..8acf3d160 100644 --- a/unity-private/places/places-default-renderer-group.c +++ b/unity-private/places/places-default-renderer-group.c @@ -34,8 +34,6 @@  #include <gee.h>  #include <cairo.h>  #include <glib/gi18n-lib.h> -#include <gio/gio.h> -#include <pango/pango.h>  #define UNITY_PLACES_TYPE_DEFAULT_RENDERER_GROUP (unity_places_default_renderer_group_get_type ()) @@ -49,6 +47,16 @@ typedef struct _UnityPlacesDefaultRendererGroup UnityPlacesDefaultRendererGroup;  typedef struct _UnityPlacesDefaultRendererGroupClass UnityPlacesDefaultRendererGroupClass;  typedef struct _UnityPlacesDefaultRendererGroupPrivate UnityPlacesDefaultRendererGroupPrivate; +#define UNITY_PLACES_TYPE_BUTTON (unity_places_button_get_type ()) +#define UNITY_PLACES_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButton)) +#define UNITY_PLACES_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) +#define UNITY_PLACES_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) + +typedef struct _UnityPlacesButton UnityPlacesButton; +typedef struct _UnityPlacesButtonClass UnityPlacesButtonClass; +  #define UNITY_PLACES_TYPE_EXPANDER (unity_places_expander_get_type ())  #define UNITY_PLACES_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_EXPANDER, UnityPlacesExpander))  #define UNITY_PLACES_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_EXPANDER, UnityPlacesExpanderClass)) @@ -82,6 +90,38 @@ typedef struct _UnityPlacesMoreResultsButtonClass UnityPlacesMoreResultsButtonCl  typedef struct _UnityPlacesTile UnityPlacesTile;  typedef struct _UnityPlacesTileClass UnityPlacesTileClass; +#define UNITY_PLACES_TYPE_FILE_INFO_TILE (unity_places_file_info_tile_get_type ()) +#define UNITY_PLACES_FILE_INFO_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTile)) +#define UNITY_PLACES_FILE_INFO_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTileClass)) +#define UNITY_PLACES_IS_FILE_INFO_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE)) +#define UNITY_PLACES_IS_FILE_INFO_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_FILE_INFO_TILE)) +#define UNITY_PLACES_FILE_INFO_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTileClass)) + +typedef struct _UnityPlacesFileInfoTile UnityPlacesFileInfoTile; +typedef struct _UnityPlacesFileInfoTileClass UnityPlacesFileInfoTileClass; + +#define UNITY_PLACES_TYPE_SHOWCASE_TILE (unity_places_showcase_tile_get_type ()) +#define UNITY_PLACES_SHOWCASE_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTile)) +#define UNITY_PLACES_SHOWCASE_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTileClass)) +#define UNITY_PLACES_IS_SHOWCASE_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE)) +#define UNITY_PLACES_IS_SHOWCASE_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_SHOWCASE_TILE)) +#define UNITY_PLACES_SHOWCASE_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTileClass)) + +typedef struct _UnityPlacesShowcaseTile UnityPlacesShowcaseTile; +typedef struct _UnityPlacesShowcaseTileClass UnityPlacesShowcaseTileClass; + +#define UNITY_PLACES_TYPE_DEFAULT_TILE (unity_places_default_tile_get_type ()) +#define UNITY_PLACES_DEFAULT_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTile)) +#define UNITY_PLACES_DEFAULT_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTileClass)) +#define UNITY_PLACES_IS_DEFAULT_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE)) +#define UNITY_PLACES_IS_DEFAULT_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_DEFAULT_TILE)) +#define UNITY_PLACES_DEFAULT_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTileClass)) + +typedef struct _UnityPlacesDefaultTile UnityPlacesDefaultTile; +typedef struct _UnityPlacesDefaultTileClass UnityPlacesDefaultTileClass; + +#define UNITY_PLACES_BUTTON_TYPE_NORMAL_STATE (unity_places_button_normal_state_get_type ()) +  #define UNITY_PLACES_EXPANDER_TYPE_STATE (unity_places_expander_state_get_type ())  #define UNITY_TESTING_TYPE_OBJECT_REGISTRY (unity_testing_object_registry_get_type ()) @@ -119,7 +159,6 @@ typedef struct _UnityPlacesMoreResultsButtonPrivate UnityPlacesMoreResultsButton  #define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL)))  #define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))  #define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) -typedef struct _UnityPlacesTilePrivate UnityPlacesTilePrivate;  struct _UnityPlacesDefaultRendererGroup { 	UnityExpandingBin parent_instance; @@ -136,21 +175,27 @@ struct _UnityPlacesDefaultRendererGroupPrivate { 	char* _display_name; 	char* _icon_hint; 	DeeModel* _results; +	gboolean _always_expanded; 	CtkVBox* vbox; -	CtkButton* title_button; +	UnityPlacesButton* title_button; 	CtkHBox* title_box; 	CtkImage* icon; 	CtkText* text; 	UnityPlacesExpander* expander; -	CtkButton* sep; 	CtkIconView* renderer; 	UnityPlacesMoreResultsButton* more_results_button; 	guint n_results; 	gboolean dirty; 	gboolean allow_expand; +	gboolean last_result_timeout;  };  typedef enum { +	UNITY_PLACES_BUTTON_NORMAL_STATE_NONE, +	UNITY_PLACES_BUTTON_NORMAL_STATE_UNDERLINE +} UnityPlacesButtonNormalState; + +typedef enum { 	UNITY_PLACES_EXPANDER_STATE_EXPANDED, 	UNITY_PLACES_EXPANDER_STATE_UNEXPANDED  } UnityPlacesExpanderState; @@ -187,32 +232,13 @@ struct _UnityPlacesMoreResultsButtonPrivate { 	CtkEffectGlow* glow;  }; -struct _UnityPlacesTile { -	CtkButton parent_instance; -	UnityPlacesTilePrivate * priv; -}; - -struct _UnityPlacesTileClass { -	CtkButtonClass parent_class; -}; - -struct _UnityPlacesTilePrivate { -	DeeModelIter* _iter; -	char* _display_name; -	char* _icon_hint; -	char* _uri; -	char* _mimetype; -	char* _comment; -	gboolean shown; -}; -  static gpointer unity_places_default_renderer_group_parent_class = NULL;  static gpointer unity_places_expander_parent_class = NULL;  static gpointer unity_places_more_results_button_parent_class = NULL; -static gpointer unity_places_tile_parent_class = NULL;  GType unity_places_default_renderer_group_get_type (void) G_GNUC_CONST; +GType unity_places_button_get_type (void) G_GNUC_CONST;  GType unity_places_expander_get_type (void) G_GNUC_CONST;  GType unity_places_more_results_button_get_type (void) G_GNUC_CONST;  #define UNITY_PLACES_DEFAULT_RENDERER_GROUP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_DEFAULT_RENDERER_GROUP, UnityPlacesDefaultRendererGroupPrivate)) @@ -222,9 +248,10 @@ enum { 	UNITY_PLACES_DEFAULT_RENDERER_GROUP_GROUP_RENDERER, 	UNITY_PLACES_DEFAULT_RENDERER_GROUP_DISPLAY_NAME, 	UNITY_PLACES_DEFAULT_RENDERER_GROUP_ICON_HINT, -	UNITY_PLACES_DEFAULT_RENDERER_GROUP_RESULTS +	UNITY_PLACES_DEFAULT_RENDERER_GROUP_RESULTS, +	UNITY_PLACES_DEFAULT_RENDERER_GROUP_ALWAYS_EXPANDED  }; -#define UNITY_PLACES_DEFAULT_RENDERER_GROUP_PADDING 24.0f +#define UNITY_PLACES_DEFAULT_RENDERER_GROUP_PADDING 52.0f  #define UNITY_PLACES_DEFAULT_RENDERER_GROUP_SPACING 0  #define UNITY_PLACES_DEFAULT_RENDERER_GROUP_OMG_FOOTEL_SUCKS_CANT_HANDLE_MANY_TEXTURES 100  UnityPlacesDefaultRendererGroup* unity_places_default_renderer_group_new (guint group_id, const char* group_renderer, const char* display_name, const char* icon_hint, DeeModel* results); @@ -232,17 +259,26 @@ UnityPlacesDefaultRendererGroup* unity_places_default_renderer_group_construct (  static void unity_places_default_renderer_group_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags);  static void unity_places_default_renderer_group_on_result_added (UnityPlacesDefaultRendererGroup* self, DeeModelIter* iter);  static gboolean unity_places_default_renderer_group_interesting (UnityPlacesDefaultRendererGroup* self, DeeModelIter* iter); -DeeModel* unity_places_default_renderer_group_get_results (UnityPlacesDefaultRendererGroup* self); -UnityPlacesTile* unity_places_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); -UnityPlacesTile* unity_places_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment);  GType unity_places_tile_get_type (void) G_GNUC_CONST; +const char* unity_places_default_renderer_group_get_group_renderer (UnityPlacesDefaultRendererGroup* self); +DeeModel* unity_places_default_renderer_group_get_results (UnityPlacesDefaultRendererGroup* self); +UnityPlacesFileInfoTile* unity_places_file_info_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesFileInfoTile* unity_places_file_info_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +GType unity_places_file_info_tile_get_type (void) G_GNUC_CONST; +UnityPlacesShowcaseTile* unity_places_showcase_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesShowcaseTile* unity_places_showcase_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +GType unity_places_showcase_tile_get_type (void) G_GNUC_CONST; +UnityPlacesDefaultTile* unity_places_default_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesDefaultTile* unity_places_default_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +GType unity_places_default_tile_get_type (void) G_GNUC_CONST;  void unity_places_tile_about_to_show (UnityPlacesTile* self); -static void _lambda41_ (const char* u, const char* m, UnityPlacesDefaultRendererGroup* self); -static void __lambda41__unity_places_tile_activated (UnityPlacesTile* _sender, const char* uri, const char* mimetype, gpointer self); +static void _lambda48_ (const char* u, const char* m, UnityPlacesDefaultRendererGroup* self); +static void __lambda48__unity_places_tile_activated (UnityPlacesTile* _sender, const char* uri, const char* mimetype, gpointer self);  static void unity_places_default_renderer_group_add_to_n_results (UnityPlacesDefaultRendererGroup* self, gint i); -const char* unity_places_default_renderer_group_get_group_renderer (UnityPlacesDefaultRendererGroup* self);  static void unity_places_default_renderer_group_on_result_removed (UnityPlacesDefaultRendererGroup* self, DeeModelIter* iter);  DeeModelIter* unity_places_tile_get_iter (UnityPlacesTile* self); +static gboolean _lambda49_ (UnityPlacesDefaultRendererGroup* self); +static gboolean __lambda49__gsource_func (gpointer self);  guint unity_places_default_renderer_group_get_group_id (UnityPlacesDefaultRendererGroup* self);  void unity_places_more_results_button_set_count (UnityPlacesMoreResultsButton* self, guint value);  static void unity_places_default_renderer_group_on_n_cols_changed (UnityPlacesDefaultRendererGroup* self); @@ -253,20 +289,26 @@ static void unity_places_default_renderer_group_set_display_name (UnityPlacesDef  const char* unity_places_default_renderer_group_get_icon_hint (UnityPlacesDefaultRendererGroup* self);  static void unity_places_default_renderer_group_set_icon_hint (UnityPlacesDefaultRendererGroup* self, const char* value);  static void unity_places_default_renderer_group_set_results (UnityPlacesDefaultRendererGroup* self, DeeModel* value); -static void _lambda42_ (UnityPlacesDefaultRendererGroup* self); -static void __lambda42__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +gboolean unity_places_default_renderer_group_get_always_expanded (UnityPlacesDefaultRendererGroup* self); +void unity_places_default_renderer_group_set_always_expanded (UnityPlacesDefaultRendererGroup* self, gboolean value); +UnityPlacesButton* unity_places_button_new (void); +UnityPlacesButton* unity_places_button_construct (GType object_type); +GType unity_places_button_normal_state_get_type (void) G_GNUC_CONST; +void unity_places_button_set_normal_state (UnityPlacesButton* self, UnityPlacesButtonNormalState value); +static void _lambda50_ (UnityPlacesDefaultRendererGroup* self); +static void __lambda50__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  UnityPlacesExpander* unity_places_expander_new (void);  UnityPlacesExpander* unity_places_expander_construct (GType object_type); -static void _lambda43_ (UnityPlacesDefaultRendererGroup* self); +static void _lambda51_ (UnityPlacesDefaultRendererGroup* self);  GType unity_places_expander_state_get_type (void) G_GNUC_CONST;  void unity_places_expander_set_expanding_state (UnityPlacesExpander* self, UnityPlacesExpanderState value); -static void __lambda43__ctk_button_clicked (CtkButton* _sender, gpointer self); -static gboolean _lambda44_ (UnityPlacesDefaultRendererGroup* self); -static gboolean __lambda44__clutter_actor_motion_event (ClutterActor* _sender, ClutterEvent* event, gpointer self); +static void __lambda51__ctk_button_clicked (CtkButton* _sender, gpointer self); +static gboolean _lambda52_ (UnityPlacesDefaultRendererGroup* self); +static gboolean __lambda52__clutter_actor_motion_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);  static void _unity_places_default_renderer_group_on_n_cols_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  UnityPlacesMoreResultsButton* unity_places_more_results_button_new (void);  UnityPlacesMoreResultsButton* unity_places_more_results_button_construct (GType object_type); -static void _lambda45_ (UnityPlacesDefaultRendererGroup* self); +static void _lambda53_ (UnityPlacesDefaultRendererGroup* self);  gpointer unity_testing_object_registry_ref (gpointer instance);  void unity_testing_object_registry_unref (gpointer instance);  GParamSpec* unity_testing_param_spec_object_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); @@ -281,7 +323,7 @@ GType unity_places_place_search_bar_get_type (void) G_GNUC_CONST;  char* unity_places_place_search_bar_get_search_text (UnityPlacesPlaceSearchBar* self);  void unity_places_controller_activate_entry (UnityPlacesController* self, const char* entry_name, gint section_id);  void unity_places_place_search_bar_search (UnityPlacesPlaceSearchBar* self, const char* text); -static void __lambda45__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void __lambda53__ctk_button_clicked (CtkButton* _sender, gpointer self);  static void _unity_places_default_renderer_group_on_result_added_dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self);  static void _unity_places_default_renderer_group_on_result_removed_dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self);  static GObject * unity_places_default_renderer_group_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); @@ -312,44 +354,12 @@ static void unity_places_more_results_button_real_get_preferred_height (ClutterA  static void unity_places_more_results_button_paint_bg (UnityPlacesMoreResultsButton* self, cairo_t* cr, gint width, gint height);  guint unity_places_more_results_button_get_count (UnityPlacesMoreResultsButton* self);  static void _unity_places_more_results_button_paint_bg_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self); -static void _lambda39_ (UnityPlacesMoreResultsButton* self); -static void __lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +static void _lambda42_ (UnityPlacesMoreResultsButton* self); +static void __lambda42__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  static GObject * unity_places_more_results_button_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_places_more_results_button_finalize (GObject* obj);  static void unity_places_more_results_button_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);  static void unity_places_more_results_button_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -#define UNITY_PLACES_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_TILE, UnityPlacesTilePrivate)) -enum { -	UNITY_PLACES_TILE_DUMMY_PROPERTY, -	UNITY_PLACES_TILE_ITER, -	UNITY_PLACES_TILE_DISPLAY_NAME, -	UNITY_PLACES_TILE_ICON_HINT, -	UNITY_PLACES_TILE_URI, -	UNITY_PLACES_TILE_MIMETYPE, -	UNITY_PLACES_TILE_COMMENT -}; -#define UNITY_PLACES_TILE_ICON_SIZE 48 -#define UNITY_PLACES_TILE_DEFAULT_ICON "text-x-preview" -static gboolean _lambda40_ (UnityPlacesTile* self); -const char* unity_places_tile_get_display_name (UnityPlacesTile* self); -static void unity_places_tile_set_icon (UnityPlacesTile* self); -static gboolean __lambda40__gsource_func (gpointer self); -static void unity_places_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth); -static void unity_places_tile_real_clicked (CtkButton* base); -const char* unity_places_tile_get_uri (UnityPlacesTile* self); -const char* unity_places_tile_get_mimetype (UnityPlacesTile* self); -const char* unity_places_tile_get_icon_hint (UnityPlacesTile* self); -static void unity_places_tile_set_iter (UnityPlacesTile* self, DeeModelIter* value); -static void unity_places_tile_set_display_name (UnityPlacesTile* self, const char* value); -static void unity_places_tile_set_icon_hint (UnityPlacesTile* self, const char* value); -static void unity_places_tile_set_uri (UnityPlacesTile* self, const char* value); -static void unity_places_tile_set_mimetype (UnityPlacesTile* self, const char* value); -const char* unity_places_tile_get_comment (UnityPlacesTile* self); -static void unity_places_tile_set_comment (UnityPlacesTile* self, const char* value); -static GObject * unity_places_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); -static void unity_places_tile_finalize (GObject* obj); -static void unity_places_tile_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void unity_places_tile_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);  static int _vala_strcmp0 (const char * str1, const char * str2); @@ -393,34 +403,41 @@ static void unity_places_default_renderer_group_real_allocate (ClutterActor* bas 	} 	if (_tmp1_) { 	float _tmp2_ = 0.0F; +	gboolean _tmp3_ = FALSE; 	float h; 	if (self->priv->more_results_button != NULL) { -	_tmp2_ = clutter_actor_get_height ((ClutterActor*) self->priv->more_results_button); +	_tmp3_ = clutter_actor_get_opacity ((ClutterActor*) self->priv->more_results_button) != 0; +	} else { +	_tmp3_ = FALSE; +	} +	if (_tmp3_) { +	_tmp2_ = UNITY_PLACES_DEFAULT_RENDERER_GROUP_PADDING; 	} else { 	_tmp2_ = (float) 0; 	} 	h = _tmp2_; -	unity_expanding_bin_set_unexpanded_height ((UnityExpandingBin*) self, ((clutter_actor_get_height ((ClutterActor*) self->priv->title_button) + 1.0f) + clutter_actor_get_height (child)) + h); +	unity_expanding_bin_set_unexpanded_height ((UnityExpandingBin*) self, (((clutter_actor_get_height ((ClutterActor*) self->priv->title_button) + 1.0f) + clutter_actor_get_height (child)) + h) + UNITY_PLACES_DEFAULT_RENDERER_GROUP_PADDING); 	} 	_g_object_unref0 (child); 	_g_list_free0 (children);  } -static void _lambda41_ (const char* u, const char* m, UnityPlacesDefaultRendererGroup* self) { +static void _lambda48_ (const char* u, const char* m, UnityPlacesDefaultRendererGroup* self) { 	g_return_if_fail (u != NULL); 	g_return_if_fail (m != NULL); 	g_signal_emit_by_name (self, "activated", u, m);  } -static void __lambda41__unity_places_tile_activated (UnityPlacesTile* _sender, const char* uri, const char* mimetype, gpointer self) { -	_lambda41_ (uri, mimetype, self); +static void __lambda48__unity_places_tile_activated (UnityPlacesTile* _sender, const char* uri, const char* mimetype, gpointer self) { +	_lambda48_ (uri, mimetype, self);  }  static void unity_places_default_renderer_group_on_result_added (UnityPlacesDefaultRendererGroup* self, DeeModelIter* iter) { 	UnityPlacesTile* button; +	gboolean _tmp3_ = FALSE; 	g_return_if_fail (self != NULL); 	g_return_if_fail (iter != NULL); 	if (!unity_places_default_renderer_group_interesting (self, iter)) { @@ -429,16 +446,39 @@ static void unity_places_default_renderer_group_on_result_added (UnityPlacesDefa 	if (self->priv->n_results == UNITY_PLACES_DEFAULT_RENDERER_GROUP_OMG_FOOTEL_SUCKS_CANT_HANDLE_MANY_TEXTURES) { 	return; 	} -	button = g_object_ref_sink (unity_places_tile_new (iter, dee_model_get_string (self->priv->_results, iter, (guint) 0), dee_model_get_string (self->priv->_results, iter, (guint) 1), dee_model_get_string (self->priv->_results, iter, (guint) 3), dee_model_get_string (self->priv->_results, iter, (guint) 4), dee_model_get_string (self->priv->_results, iter, (guint) 5))); +	button = NULL; +	if (_vala_strcmp0 (self->priv->_group_renderer, "UnityFileInfoRenderer") == 0) { +	UnityPlacesTile* _tmp0_; +	button = (_tmp0_ = (UnityPlacesTile*) g_object_ref_sink (unity_places_file_info_tile_new (iter, dee_model_get_string (self->priv->_results, iter, (guint) 0), dee_model_get_string (self->priv->_results, iter, (guint) 1), dee_model_get_string (self->priv->_results, iter, (guint) 3), dee_model_get_string (self->priv->_results, iter, (guint) 4), dee_model_get_string (self->priv->_results, iter, (guint) 5))), _g_object_unref0 (button), _tmp0_); +	} else { +	if (_vala_strcmp0 (self->priv->_group_renderer, "UnityShowcaseRenderer") == 0) { +	UnityPlacesTile* _tmp1_; +	button = (_tmp1_ = (UnityPlacesTile*) g_object_ref_sink (unity_places_showcase_tile_new (iter, dee_model_get_string (self->priv->_results, iter, (guint) 0), dee_model_get_string (self->priv->_results, iter, (guint) 1), dee_model_get_string (self->priv->_results, iter, (guint) 3), dee_model_get_string (self->priv->_results, iter, (guint) 4), dee_model_get_string (self->priv->_results, iter, (guint) 5))), _g_object_unref0 (button), _tmp1_); +	} else { +	UnityPlacesTile* _tmp2_; +	button = (_tmp2_ = (UnityPlacesTile*) g_object_ref_sink (unity_places_default_tile_new (iter, dee_model_get_string (self->priv->_results, iter, (guint) 0), dee_model_get_string (self->priv->_results, iter, (guint) 1), dee_model_get_string (self->priv->_results, iter, (guint) 3), dee_model_get_string (self->priv->_results, iter, (guint) 4), dee_model_get_string (self->priv->_results, iter, (guint) 5))), _g_object_unref0 (button), _tmp2_); +	} +	} 	clutter_container_add_actor ((ClutterContainer*) self->priv->renderer, (ClutterActor*) button); 	clutter_actor_show ((ClutterActor*) button); 	if (unity_expanding_bin_get_bin_state ((UnityExpandingBin*) self) == UNITY_EXPANDING_BIN_STATE_EXPANDED) { +	_tmp3_ = TRUE; +	} else { +	_tmp3_ = self->priv->_always_expanded; +	} +	if (_tmp3_) { 	unity_places_tile_about_to_show (button); 	} -	g_signal_connect_object (button, "activated", (GCallback) __lambda41__unity_places_tile_activated, self, 0); +	g_signal_connect_object (button, "activated", (GCallback) __lambda48__unity_places_tile_activated, self, 0); 	unity_places_default_renderer_group_add_to_n_results (self, 1); 	if (unity_expanding_bin_get_bin_state ((UnityExpandingBin*) self) == UNITY_EXPANDING_BIN_STATE_CLOSED) { +	gboolean _tmp4_ = FALSE; 	if (_vala_strcmp0 (self->priv->_group_renderer, "UnityFolderGroupRenderer") == 0) { +	_tmp4_ = TRUE; +	} else { +	_tmp4_ = self->priv->_always_expanded; +	} +	if (_tmp4_) { 	unity_expanding_bin_set_bin_state ((UnityExpandingBin*) self, UNITY_EXPANDING_BIN_STATE_EXPANDED); 	} else { 	unity_expanding_bin_set_bin_state ((UnityExpandingBin*) self, UNITY_EXPANDING_BIN_STATE_UNEXPANDED); @@ -450,8 +490,27 @@ static void unity_places_default_renderer_group_on_result_added (UnityPlacesDefa  } +static gboolean _lambda49_ (UnityPlacesDefaultRendererGroup* self) { +	gboolean result = FALSE; +	if (self->priv->n_results < 1) { +	unity_expanding_bin_set_bin_state ((UnityExpandingBin*) self, UNITY_EXPANDING_BIN_STATE_CLOSED); +	} +	self->priv->last_result_timeout = FALSE; +	result = FALSE; +	return result; +} + + +static gboolean __lambda49__gsource_func (gpointer self) { +	gboolean result; +	result = _lambda49_ (self); +	return result; +} + +  static void unity_places_default_renderer_group_on_result_removed (UnityPlacesDefaultRendererGroup* self, DeeModelIter* iter) { 	GList* children; +	gboolean _tmp1_ = FALSE; 	g_return_if_fail (self != NULL); 	g_return_if_fail (iter != NULL); 	if (!unity_places_default_renderer_group_interesting (self, iter)) { @@ -482,7 +541,13 @@ static void unity_places_default_renderer_group_on_result_removed (UnityPlacesDe 	} 	} 	if (self->priv->n_results < 1) { -	unity_expanding_bin_set_bin_state ((UnityExpandingBin*) self, UNITY_EXPANDING_BIN_STATE_CLOSED); +	_tmp1_ = self->priv->last_result_timeout == FALSE; +	} else { +	_tmp1_ = FALSE; +	} +	if (_tmp1_) { +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, __lambda49__gsource_func, g_object_ref (self), g_object_unref); +	self->priv->last_result_timeout = TRUE; 	} 	_g_list_free0 (children);  } @@ -656,12 +721,56 @@ static void unity_places_default_renderer_group_set_results (UnityPlacesDefaultR  } -static void _lambda42_ (UnityPlacesDefaultRendererGroup* self) { +gboolean unity_places_default_renderer_group_get_always_expanded (UnityPlacesDefaultRendererGroup* self) { +	gboolean result; +	g_return_val_if_fail (self != NULL, FALSE); +	result = self->priv->_always_expanded; +	return result; +} + + +void unity_places_default_renderer_group_set_always_expanded (UnityPlacesDefaultRendererGroup* self, gboolean value) { +	g_return_if_fail (self != NULL); +	if (self->priv->_always_expanded != value) { +	self->priv->_always_expanded = value; +	if (self->priv->_always_expanded == TRUE) { +	GList* children; +	children = clutter_container_get_children ((ClutterContainer*) self->priv->renderer); +	{ +	GList* child_collection; +	GList* child_it; +	child_collection = children; +	for (child_it = child_collection; child_it != NULL; child_it = child_it->next) { +	ClutterActor* child; +	child = _g_object_ref0 ((ClutterActor*) child_it->data); +	{ +	ClutterActor* _tmp0_; +	UnityPlacesTile* tile; +	tile = _g_object_ref0 ((_tmp0_ = child, UNITY_PLACES_IS_TILE (_tmp0_) ? ((UnityPlacesTile*) _tmp0_) : NULL)); +	unity_places_tile_about_to_show (tile); +	_g_object_unref0 (tile); +	_g_object_unref0 (child); +	} +	} +	} +	ctk_focusable_activate ((CtkFocusable*) self->priv->title_button); +	_g_list_free0 (children); +	} +	} +	g_object_notify ((GObject *) self, "always-expanded"); +} + + +static void _lambda50_ (UnityPlacesDefaultRendererGroup* self) { 	GSList* effects; -	if (ctk_actor_get_state ((CtkActor*) self->priv->title_button) == CTK_STATE_PRELIGHT) { -	clutter_actor_set_opacity ((ClutterActor*) self->priv->sep, (guint8) 0); +	if (ctk_actor_get_state ((CtkActor*) self->priv->title_button) == CTK_STATE_ACTIVE) { +	ClutterColor _tmp0_ = {0}; +	ClutterColor _tmp1_; +	clutter_text_set_color ((ClutterText*) self->priv->text, (_tmp1_ = (_tmp0_.red = (guint8) 50, _tmp0_.green = (guint8) 50, _tmp0_.blue = (guint8) 50, _tmp0_.alpha = (guint8) 200, _tmp0_), &_tmp1_)); 	} else { -	clutter_actor_set_opacity ((ClutterActor*) self->priv->sep, (guint8) 255); +	ClutterColor _tmp2_ = {0}; +	ClutterColor _tmp3_; +	clutter_text_set_color ((ClutterText*) self->priv->text, (_tmp3_ = (_tmp2_.red = (guint8) 255, _tmp2_.green = (guint8) 255, _tmp2_.blue = (guint8) 255, _tmp2_.alpha = (guint8) 255, _tmp2_), &_tmp3_)); 	} 	effects = ctk_actor_get_effects ((CtkActor*) self->priv->title_button); 	{ @@ -679,12 +788,12 @@ static void _lambda42_ (UnityPlacesDefaultRendererGroup* self) {  } -static void __lambda42__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { -	_lambda42_ (self); +static void __lambda50__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda50_ (self);  } -static void _lambda43_ (UnityPlacesDefaultRendererGroup* self) { +static void _lambda51_ (UnityPlacesDefaultRendererGroup* self) { 	gboolean _tmp0_ = FALSE; 	if (self->priv->n_results <= ctk_icon_view_get_n_cols (self->priv->renderer)) { 	_tmp0_ = TRUE; @@ -704,12 +813,12 @@ static void _lambda43_ (UnityPlacesDefaultRendererGroup* self) {  } -static void __lambda43__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda43_ (self); +static void __lambda51__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda51_ (self);  } -static gboolean _lambda44_ (UnityPlacesDefaultRendererGroup* self) { +static gboolean _lambda52_ (UnityPlacesDefaultRendererGroup* self) { 	gboolean result = FALSE; 	gboolean _tmp0_ = FALSE; 	if (self->priv->dirty) { @@ -745,9 +854,9 @@ static gboolean _lambda44_ (UnityPlacesDefaultRendererGroup* self) {  } -static gboolean __lambda44__clutter_actor_motion_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { +static gboolean __lambda52__clutter_actor_motion_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { 	gboolean result; -	result = _lambda44_ (self); +	result = _lambda52_ (self); 	return result;  } @@ -757,7 +866,7 @@ static void _unity_places_default_renderer_group_on_n_cols_changed_g_object_noti  } -static void _lambda45_ (UnityPlacesDefaultRendererGroup* self) { +static void _lambda53_ (UnityPlacesDefaultRendererGroup* self) { 	UnityTestingObjectRegistry* _tmp0_; 	GeeArrayList* _tmp1_; 	GObject* _tmp2_; @@ -788,8 +897,8 @@ static void _lambda45_ (UnityPlacesDefaultRendererGroup* self) {  } -static void __lambda45__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda45_ (self); +static void __lambda53__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda53_ (self);  } @@ -814,27 +923,23 @@ static GObject * unity_places_default_renderer_group_constructor (GType type, gu 	CtkPadding _tmp0_ = {0}; 	CtkPadding _tmp1_; 	CtkVBox* _tmp2_; -	CtkButton* _tmp3_; +	UnityPlacesButton* _tmp3_; 	CtkPadding _tmp4_ = {0}; 	CtkPadding _tmp5_; -	UnityStripeTexture* title_bg; 	CtkEffectGlow* glow; 	CtkHBox* _tmp6_; 	CtkImage* _tmp7_; 	CtkText* _tmp8_; 	char* _tmp9_; 	char* _tmp10_; -	UnityPlacesExpander* _tmp11_; -	CtkButton* _tmp12_; -	ClutterColor _tmp13_ = {0}; -	ClutterColor _tmp14_; -	ClutterRectangle* rect; -	CtkEffectGlow* _tmp15_; -	CtkIconView* _tmp16_; -	CtkPadding _tmp17_ = {0}; -	CtkPadding _tmp18_; +	char* _tmp11_; +	UnityPlacesExpander* _tmp12_; +	CtkIconView* _tmp13_; +	CtkPadding _tmp14_ = {0}; +	CtkPadding _tmp15_; +	CtkButton* pad; 	DeeModelIter* iter; -	ctk_actor_set_padding ((CtkActor*) self, (_tmp1_ = (_tmp0_.top = 0.0f, _tmp0_.right = 0.0f, _tmp0_.bottom = UNITY_PLACES_DEFAULT_RENDERER_GROUP_PADDING, _tmp0_.left = 0.0f, _tmp0_), &_tmp1_)); +	ctk_actor_set_padding ((CtkActor*) self, (_tmp1_ = (_tmp0_.top = 0.0f, _tmp0_.right = 0.0f, _tmp0_.bottom = 0.0f, _tmp0_.left = 0.0f, _tmp0_), &_tmp1_)); 	clutter_actor_hide ((ClutterActor*) self); 	if (_vala_strcmp0 (self->priv->_group_renderer, "UnityLinkGroupRenderer") == 0) { 	self->priv->allow_expand = FALSE; @@ -848,13 +953,13 @@ static GObject * unity_places_default_renderer_group_constructor (GType type, gu 	ctk_box_set_homogeneous ((CtkBox*) self->priv->vbox, FALSE); 	clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->vbox); 	clutter_actor_show ((ClutterActor*) self->priv->vbox); -	self->priv->title_button = (_tmp3_ = g_object_ref_sink ((CtkButton*) ctk_button_new (CTK_ORIENTATION_HORIZONTAL)), _g_object_unref0 (self->priv->title_button), _tmp3_); +	self->priv->title_button = (_tmp3_ = g_object_ref_sink (unity_places_button_new ()), _g_object_unref0 (self->priv->title_button), _tmp3_); +	unity_places_button_set_normal_state (self->priv->title_button, UNITY_PLACES_BUTTON_NORMAL_STATE_UNDERLINE); +	ctk_button_set_orientation ((CtkButton*) self->priv->title_button, (gint) CTK_ORIENTATION_HORIZONTAL); 	ctk_actor_set_padding ((CtkActor*) self->priv->title_button, (_tmp5_ = (_tmp4_.top = 4.0f, _tmp4_.right = 6.0f, _tmp4_.bottom = 4.0f, _tmp4_.left = 6.0f, _tmp4_), &_tmp5_)); 	ctk_box_pack ((CtkBox*) self->priv->vbox, (ClutterActor*) self->priv->title_button, FALSE, FALSE); 	clutter_actor_show ((ClutterActor*) self->priv->title_button); -	title_bg = g_object_ref_sink (unity_stripe_texture_new (NULL, NULL)); -	ctk_actor_set_background_for_state ((CtkActor*) self->priv->title_button, CTK_STATE_PRELIGHT, (ClutterActor*) title_bg); -	g_signal_connect_object ((GObject*) self->priv->title_button, "notify::state", (GCallback) __lambda42__g_object_notify, self, 0); +	g_signal_connect_object ((GObject*) self->priv->title_button, "notify::state", (GCallback) __lambda50__g_object_notify, self, 0); 	glow = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ()); 	ctk_effect_glow_set_factor (glow, 1.0f); 	ctk_effect_set_margin ((CtkEffect*) glow, 3); @@ -866,46 +971,40 @@ static GObject * unity_places_default_renderer_group_constructor (GType type, gu 	ctk_box_pack ((CtkBox*) self->priv->title_box, (ClutterActor*) self->priv->icon, FALSE, FALSE); 	clutter_actor_show ((ClutterActor*) self->priv->icon); 	self->priv->text = (_tmp8_ = g_object_ref_sink ((CtkText*) ctk_text_new (self->priv->_display_name)), _g_object_unref0 (self->priv->text), _tmp8_); -	clutter_text_set_markup ((ClutterText*) self->priv->text, _tmp10_ = g_strconcat (_tmp9_ = g_strconcat ("<big>", self->priv->_display_name, NULL), "</big>", NULL)); +	clutter_text_set_markup ((ClutterText*) self->priv->text, _tmp11_ = g_strconcat (_tmp10_ = g_strconcat ("<big>", _tmp9_ = g_markup_escape_text (self->priv->_display_name, -1), NULL), "</big>", NULL)); +	_g_free0 (_tmp11_); 	_g_free0 (_tmp10_); 	_g_free0 (_tmp9_); 	ctk_box_pack ((CtkBox*) self->priv->title_box, (ClutterActor*) self->priv->text, FALSE, FALSE); 	clutter_actor_show ((ClutterActor*) self->priv->text); -	self->priv->expander = (_tmp11_ = g_object_ref_sink (unity_places_expander_new ()), _g_object_unref0 (self->priv->expander), _tmp11_); +	self->priv->expander = (_tmp12_ = g_object_ref_sink (unity_places_expander_new ()), _g_object_unref0 (self->priv->expander), _tmp12_); 	clutter_actor_set_opacity ((ClutterActor*) self->priv->expander, (guint8) 0); 	ctk_box_pack ((CtkBox*) self->priv->title_box, (ClutterActor*) self->priv->expander, FALSE, TRUE); 	clutter_actor_show ((ClutterActor*) self->priv->expander); -	self->priv->sep = (_tmp12_ = g_object_ref_sink ((CtkButton*) ctk_button_new (CTK_ORIENTATION_HORIZONTAL)), _g_object_unref0 (self->priv->sep), _tmp12_); -	rect = g_object_ref_sink ((ClutterRectangle*) clutter_rectangle_new_with_color ((_tmp14_ = (_tmp13_.red = (guint8) 255, _tmp13_.green = (guint8) 255, _tmp13_.blue = (guint8) 255, _tmp13_.alpha = (guint8) 100, _tmp13_), &_tmp14_))); -	clutter_container_add_actor ((ClutterContainer*) self->priv->sep, (ClutterActor*) rect); -	clutter_actor_set_height ((ClutterActor*) rect, 1.0f); -	ctk_box_pack ((CtkBox*) self->priv->vbox, (ClutterActor*) self->priv->sep, FALSE, FALSE); -	clutter_actor_show ((ClutterActor*) self->priv->sep); -	glow = (_tmp15_ = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ()), _g_object_unref0 (glow), _tmp15_); -	ctk_effect_glow_set_factor (glow, 1.0f); -	ctk_effect_set_margin ((CtkEffect*) glow, 5); -	g_signal_connect_object (self->priv->title_button, "clicked", (GCallback) __lambda43__ctk_button_clicked, self, 0); -	g_signal_connect_object ((ClutterActor*) self->priv->title_button, "motion-event", (GCallback) __lambda44__clutter_actor_motion_event, self, 0); -	self->priv->renderer = (_tmp16_ = g_object_ref_sink ((CtkIconView*) ctk_icon_view_new ()), _g_object_unref0 (self->priv->renderer), _tmp16_); -	ctk_actor_set_padding ((CtkActor*) self->priv->renderer, (_tmp18_ = (_tmp17_.top = 12.0f, _tmp17_.right = 0.0f, _tmp17_.bottom = 0.0f, _tmp17_.left = 0.0f, _tmp17_), &_tmp18_)); +	g_signal_connect_object ((CtkButton*) self->priv->title_button, "clicked", (GCallback) __lambda51__ctk_button_clicked, self, 0); +	g_signal_connect_object ((ClutterActor*) self->priv->title_button, "motion-event", (GCallback) __lambda52__clutter_actor_motion_event, self, 0); +	self->priv->renderer = (_tmp13_ = g_object_ref_sink ((CtkIconView*) ctk_icon_view_new ()), _g_object_unref0 (self->priv->renderer), _tmp13_); +	ctk_actor_set_padding ((CtkActor*) self->priv->renderer, (_tmp15_ = (_tmp14_.top = 12.0f, _tmp14_.right = 0.0f, _tmp14_.bottom = 0.0f, _tmp14_.left = 0.0f, _tmp14_), &_tmp15_)); 	ctk_icon_view_set_spacing (self->priv->renderer, 24); 	ctk_box_pack ((CtkBox*) self->priv->vbox, (ClutterActor*) self->priv->renderer, TRUE, TRUE); 	clutter_actor_show ((ClutterActor*) self->priv->renderer); 	g_object_set ((GObject*) self->priv->renderer, "auto-fade-children", TRUE, NULL); 	g_signal_connect_object ((GObject*) self->priv->renderer, "notify::n-cols", (GCallback) _unity_places_default_renderer_group_on_n_cols_changed_g_object_notify, self, 0); 	if (_vala_strcmp0 (self->priv->_group_renderer, "UnityLinkGroupRenderer") == 0) { -	UnityPlacesMoreResultsButton* _tmp19_; +	UnityPlacesMoreResultsButton* _tmp16_; 	self->priv->allow_expand = FALSE; -	self->priv->more_results_button = (_tmp19_ = g_object_ref_sink (unity_places_more_results_button_new ()), _g_object_unref0 (self->priv->more_results_button), _tmp19_); +	self->priv->more_results_button = (_tmp16_ = g_object_ref_sink (unity_places_more_results_button_new ()), _g_object_unref0 (self->priv->more_results_button), _tmp16_); 	ctk_box_pack ((CtkBox*) self->priv->vbox, (ClutterActor*) self->priv->more_results_button, FALSE, FALSE); 	clutter_actor_show ((ClutterActor*) self->priv->more_results_button); -	g_signal_connect_object ((CtkButton*) self->priv->more_results_button, "clicked", (GCallback) __lambda45__ctk_button_clicked, self, 0); -	} else { -	if (_vala_strcmp0 (self->priv->_group_renderer, "UnityFolderGroupRenderer") == 0) { -	clutter_actor_hide ((ClutterActor*) self->priv->title_button); -	clutter_actor_hide ((ClutterActor*) self->priv->sep); -	unity_expanding_bin_set_bin_state ((UnityExpandingBin*) self, UNITY_EXPANDING_BIN_STATE_EXPANDED); -	} +	g_signal_connect_object ((CtkButton*) self->priv->more_results_button, "clicked", (GCallback) __lambda53__ctk_button_clicked, self, 0); +	} +	pad = g_object_ref_sink ((CtkButton*) ctk_button_new (CTK_ORIENTATION_HORIZONTAL)); +	ctk_image_set_size (ctk_button_get_image (pad), (gint) UNITY_PLACES_DEFAULT_RENDERER_GROUP_PADDING); +	ctk_box_pack ((CtkBox*) self->priv->vbox, (ClutterActor*) pad, FALSE, FALSE); +	clutter_actor_show ((ClutterActor*) pad); +	if (_vala_strcmp0 (self->priv->_group_renderer, "UnityFolderGroupRenderer") == 0) { +	clutter_actor_hide ((ClutterActor*) self->priv->title_button); +	unity_expanding_bin_set_bin_state ((UnityExpandingBin*) self, UNITY_EXPANDING_BIN_STATE_EXPANDED); 	} 	iter = dee_model_get_first_iter (self->priv->_results); 	while (TRUE) { @@ -919,9 +1018,8 @@ static GObject * unity_places_default_renderer_group_constructor (GType type, gu 	} 	g_signal_connect_object (self->priv->_results, "row-added", (GCallback) _unity_places_default_renderer_group_on_result_added_dee_model_row_added, self, 0); 	g_signal_connect_object (self->priv->_results, "row-removed", (GCallback) _unity_places_default_renderer_group_on_result_removed_dee_model_row_removed, self, 0); -	_g_object_unref0 (rect); +	_g_object_unref0 (pad); 	_g_object_unref0 (glow); -	_g_object_unref0 (title_bg); 	} 	return obj;  } @@ -940,15 +1038,18 @@ static void unity_places_default_renderer_group_class_init (UnityPlacesDefaultRe 	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_DEFAULT_RENDERER_GROUP_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); 	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_DEFAULT_RENDERER_GROUP_ICON_HINT, g_param_spec_string ("icon-hint", "icon-hint", "icon-hint", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); 	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_DEFAULT_RENDERER_GROUP_RESULTS, g_param_spec_object ("results", "results", "results", DEE_TYPE_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_DEFAULT_RENDERER_GROUP_ALWAYS_EXPANDED, g_param_spec_boolean ("always-expanded", "always-expanded", "always-expanded", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); 	g_signal_new ("activated", UNITY_PLACES_TYPE_DEFAULT_RENDERER_GROUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);  }  static void unity_places_default_renderer_group_instance_init (UnityPlacesDefaultRendererGroup * self) { 	self->priv = UNITY_PLACES_DEFAULT_RENDERER_GROUP_GET_PRIVATE (self); +	self->priv->_always_expanded = FALSE; 	self->priv->n_results = (guint) 0; 	self->priv->dirty = FALSE; 	self->priv->allow_expand = TRUE; +	self->priv->last_result_timeout = FALSE;  } @@ -965,7 +1066,6 @@ static void unity_places_default_renderer_group_finalize (GObject* obj) { 	_g_object_unref0 (self->priv->icon); 	_g_object_unref0 (self->priv->text); 	_g_object_unref0 (self->priv->expander); -	_g_object_unref0 (self->priv->sep); 	_g_object_unref0 (self->priv->renderer); 	_g_object_unref0 (self->priv->more_results_button); 	G_OBJECT_CLASS (unity_places_default_renderer_group_parent_class)->finalize (obj); @@ -1003,6 +1103,9 @@ static void unity_places_default_renderer_group_get_property (GObject * object, 	case UNITY_PLACES_DEFAULT_RENDERER_GROUP_RESULTS: 	g_value_set_object (value, unity_places_default_renderer_group_get_results (self)); 	break; +	case UNITY_PLACES_DEFAULT_RENDERER_GROUP_ALWAYS_EXPANDED: +	g_value_set_boolean (value, unity_places_default_renderer_group_get_always_expanded (self)); +	break; 	default: 	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 	break; @@ -1029,6 +1132,9 @@ static void unity_places_default_renderer_group_set_property (GObject * object, 	case UNITY_PLACES_DEFAULT_RENDERER_GROUP_RESULTS: 	unity_places_default_renderer_group_set_results (self, g_value_get_object (value)); 	break; +	case UNITY_PLACES_DEFAULT_RENDERER_GROUP_ALWAYS_EXPANDED: +	unity_places_default_renderer_group_set_always_expanded (self, g_value_get_boolean (value)); +	break; 	default: 	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 	break; @@ -1358,6 +1464,7 @@ void unity_places_more_results_button_set_count (UnityPlacesMoreResultsButton* s 	self->priv->glow = (_tmp5_ = NULL, _g_object_unref0 (self->priv->glow), _tmp5_); 	} 	} +	clutter_actor_queue_relayout ((ClutterActor*) self); 	g_object_notify ((GObject *) self, "count");  } @@ -1367,7 +1474,7 @@ static void _unity_places_more_results_button_paint_bg_unity_cairo_canvas_cairo_  } -static void _lambda39_ (UnityPlacesMoreResultsButton* self) { +static void _lambda42_ (UnityPlacesMoreResultsButton* self) { 	gboolean _tmp0_ = FALSE; 	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_NORMAL) { 	_tmp0_ = TRUE; @@ -1390,8 +1497,8 @@ static void _lambda39_ (UnityPlacesMoreResultsButton* self) {  } -static void __lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { -	_lambda39_ (self); +static void __lambda42__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda42_ (self);  } @@ -1416,10 +1523,9 @@ static GObject * unity_places_more_results_button_constructor (GType type, guint 	ctk_actor_set_background ((CtkActor*) self, (ClutterActor*) self->priv->bg); 	clutter_actor_show ((ClutterActor*) self->priv->bg); 	self->priv->text = (_tmp3_ = g_object_ref_sink ((CtkText*) ctk_text_new ("")), _g_object_unref0 (self->priv->text), _tmp3_); -	clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->text); 	clutter_container_add_actor ((ClutterContainer*) box, (ClutterActor*) self->priv->text); 	clutter_actor_show ((ClutterActor*) self->priv->text); -	g_signal_connect_object ((GObject*) self, "notify::state", (GCallback) __lambda39__g_object_notify, self, 0); +	g_signal_connect_object ((GObject*) self, "notify::state", (GCallback) __lambda42__g_object_notify, self, 0); 	_g_object_unref0 (box); 	} 	return obj; @@ -1495,312 +1601,6 @@ static void unity_places_more_results_button_set_property (GObject * object, gui  } -UnityPlacesTile* unity_places_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { -	UnityPlacesTile * self; -	g_return_val_if_fail (iter != NULL, NULL); -	g_return_val_if_fail (uri != NULL, NULL); -	g_return_val_if_fail (display_name != NULL, NULL); -	self = (UnityPlacesTile*) g_object_new (object_type, "orientation", CTK_ORIENTATION_VERTICAL, "iter", iter, "display-name", display_name, "icon-hint", icon_hint, "uri", uri, "mimetype", mimetype, "comment", comment, NULL); -	return self; -} - - -UnityPlacesTile* unity_places_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { -	return unity_places_tile_construct (UNITY_PLACES_TYPE_TILE, iter, uri, icon_hint, mimetype, display_name, comment); -} - - -static gboolean _lambda40_ (UnityPlacesTile* self) { -	gboolean result = FALSE; -	ctk_button_set_label ((CtkButton*) self, self->priv->_display_name); -	unity_places_tile_set_icon (self); -	result = FALSE; -	return result; -} - - -static gboolean __lambda40__gsource_func (gpointer self) { -	gboolean result; -	result = _lambda40_ (self); -	return result; -} - - -void unity_places_tile_about_to_show (UnityPlacesTile* self) { -	g_return_if_fail (self != NULL); -	if (self->priv->shown) { -	return; -	} -	self->priv->shown = TRUE; -	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda40__gsource_func, g_object_ref (self), g_object_unref); -} - - -static void unity_places_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth) { -	UnityPlacesTile * self; -	self = (UnityPlacesTile*) base; -	*mwidth = 150.0f; -	*nwidth = 150.0f; -} - - -static void unity_places_tile_real_clicked (CtkButton* base) { -	UnityPlacesTile * self; -	self = (UnityPlacesTile*) base; -	g_signal_emit_by_name (self, "activated", self->priv->_uri, self->priv->_mimetype); -} - - -static void unity_places_tile_set_icon (UnityPlacesTile* self) { -	UnityPixbufCache* cache; -	gboolean _tmp0_ = FALSE; -	g_return_if_fail (self != NULL); -	cache = unity_pixbuf_cache_get_default (); -	if (self->priv->_icon_hint != NULL) { -	_tmp0_ = _vala_strcmp0 (self->priv->_icon_hint, "") != 0; -	} else { -	_tmp0_ = FALSE; -	} -	if (_tmp0_) { -	unity_pixbuf_cache_set_image_from_gicon_string (cache, ctk_button_get_image ((CtkButton*) self), self->priv->_icon_hint, UNITY_PLACES_TILE_ICON_SIZE, NULL, NULL); -	} else { -	gboolean _tmp1_ = FALSE; -	if (self->priv->_mimetype != NULL) { -	_tmp1_ = _vala_strcmp0 (self->priv->_mimetype, "") != 0; -	} else { -	_tmp1_ = FALSE; -	} -	if (_tmp1_) { -	GIcon* icon; -	icon = g_content_type_get_icon (self->priv->_mimetype); -	unity_pixbuf_cache_set_image_from_gicon_string (cache, ctk_button_get_image ((CtkButton*) self), g_icon_to_string (icon), UNITY_PLACES_TILE_ICON_SIZE, NULL, NULL); -	_g_object_unref0 (icon); -	} else { -	unity_pixbuf_cache_set_image_from_icon_name (cache, ctk_button_get_image ((CtkButton*) self), UNITY_PLACES_TILE_DEFAULT_ICON, UNITY_PLACES_TILE_ICON_SIZE, NULL, NULL); -	} -	} -	_g_object_unref0 (cache); -} - - -DeeModelIter* unity_places_tile_get_iter (UnityPlacesTile* self) { -	DeeModelIter* result; -	g_return_val_if_fail (self != NULL, NULL); -	result = self->priv->_iter; -	return result; -} - - -static void unity_places_tile_set_iter (UnityPlacesTile* self, DeeModelIter* value) { -	g_return_if_fail (self != NULL); -	self->priv->_iter = value; -	g_object_notify ((GObject *) self, "iter"); -} - - -const char* unity_places_tile_get_display_name (UnityPlacesTile* self) { -	const char* result; -	g_return_val_if_fail (self != NULL, NULL); -	result = self->priv->_display_name; -	return result; -} - - -static void unity_places_tile_set_display_name (UnityPlacesTile* self, const char* value) { -	char* _tmp0_; -	g_return_if_fail (self != NULL); -	self->priv->_display_name = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_display_name), _tmp0_); -	g_object_notify ((GObject *) self, "display-name"); -} - - -const char* unity_places_tile_get_icon_hint (UnityPlacesTile* self) { -	const char* result; -	g_return_val_if_fail (self != NULL, NULL); -	result = self->priv->_icon_hint; -	return result; -} - - -static void unity_places_tile_set_icon_hint (UnityPlacesTile* self, const char* value) { -	char* _tmp0_; -	g_return_if_fail (self != NULL); -	self->priv->_icon_hint = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_icon_hint), _tmp0_); -	g_object_notify ((GObject *) self, "icon-hint"); -} - - -const char* unity_places_tile_get_uri (UnityPlacesTile* self) { -	const char* result; -	g_return_val_if_fail (self != NULL, NULL); -	result = self->priv->_uri; -	return result; -} - - -static void unity_places_tile_set_uri (UnityPlacesTile* self, const char* value) { -	char* _tmp0_; -	g_return_if_fail (self != NULL); -	self->priv->_uri = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_uri), _tmp0_); -	g_object_notify ((GObject *) self, "uri"); -} - - -const char* unity_places_tile_get_mimetype (UnityPlacesTile* self) { -	const char* result; -	g_return_val_if_fail (self != NULL, NULL); -	result = self->priv->_mimetype; -	return result; -} - - -static void unity_places_tile_set_mimetype (UnityPlacesTile* self, const char* value) { -	char* _tmp0_; -	g_return_if_fail (self != NULL); -	self->priv->_mimetype = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_mimetype), _tmp0_); -	g_object_notify ((GObject *) self, "mimetype"); -} - - -const char* unity_places_tile_get_comment (UnityPlacesTile* self) { -	const char* result; -	g_return_val_if_fail (self != NULL, NULL); -	result = self->priv->_comment; -	return result; -} - - -static void unity_places_tile_set_comment (UnityPlacesTile* self, const char* value) { -	char* _tmp0_; -	g_return_if_fail (self != NULL); -	self->priv->_comment = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_comment), _tmp0_); -	g_object_notify ((GObject *) self, "comment"); -} - - -static GObject * unity_places_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { -	GObject * obj; -	GObjectClass * parent_class; -	UnityPlacesTile * self; -	parent_class = G_OBJECT_CLASS (unity_places_tile_parent_class); -	obj = parent_class->constructor (type, n_construct_properties, construct_properties); -	self = UNITY_PLACES_TILE (obj); -	{ -	CtkText* text; -	text = ctk_button_get_text ((CtkButton*) self); -	clutter_text_set_ellipsize ((ClutterText*) text, PANGO_ELLIPSIZE_MIDDLE); -	} -	return obj; -} - - -static void unity_places_tile_class_init (UnityPlacesTileClass * klass) { -	unity_places_tile_parent_class = g_type_class_peek_parent (klass); -	g_type_class_add_private (klass, sizeof (UnityPlacesTilePrivate)); -	CLUTTER_ACTOR_CLASS (klass)->get_preferred_width = unity_places_tile_real_get_preferred_width; -	CTK_BUTTON_CLASS (klass)->clicked = unity_places_tile_real_clicked; -	G_OBJECT_CLASS (klass)->get_property = unity_places_tile_get_property; -	G_OBJECT_CLASS (klass)->set_property = unity_places_tile_set_property; -	G_OBJECT_CLASS (klass)->constructor = unity_places_tile_constructor; -	G_OBJECT_CLASS (klass)->finalize = unity_places_tile_finalize; -	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_ITER, g_param_spec_pointer ("iter", "iter", "iter", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_ICON_HINT, g_param_spec_string ("icon-hint", "icon-hint", "icon-hint", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_MIMETYPE, g_param_spec_string ("mimetype", "mimetype", "mimetype", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_COMMENT, g_param_spec_string ("comment", "comment", "comment", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -	g_signal_new ("activated", UNITY_PLACES_TYPE_TILE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); -} - - -static void unity_places_tile_instance_init (UnityPlacesTile * self) { -	self->priv = UNITY_PLACES_TILE_GET_PRIVATE (self); -	self->priv->shown = FALSE; -} - - -static void unity_places_tile_finalize (GObject* obj) { -	UnityPlacesTile * self; -	self = UNITY_PLACES_TILE (obj); -	_g_free0 (self->priv->_display_name); -	_g_free0 (self->priv->_icon_hint); -	_g_free0 (self->priv->_uri); -	_g_free0 (self->priv->_mimetype); -	_g_free0 (self->priv->_comment); -	G_OBJECT_CLASS (unity_places_tile_parent_class)->finalize (obj); -} - - -GType unity_places_tile_get_type (void) { -	static volatile gsize unity_places_tile_type_id__volatile = 0; -	if (g_once_init_enter (&unity_places_tile_type_id__volatile)) { -	static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesTileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_tile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesTile), 0, (GInstanceInitFunc) unity_places_tile_instance_init, NULL }; -	GType unity_places_tile_type_id; -	unity_places_tile_type_id = g_type_register_static (CTK_TYPE_BUTTON, "UnityPlacesTile", &g_define_type_info, 0); -	g_once_init_leave (&unity_places_tile_type_id__volatile, unity_places_tile_type_id); -	} -	return unity_places_tile_type_id__volatile; -} - - -static void unity_places_tile_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { -	UnityPlacesTile * self; -	self = UNITY_PLACES_TILE (object); -	switch (property_id) { -	case UNITY_PLACES_TILE_ITER: -	g_value_set_pointer (value, unity_places_tile_get_iter (self)); -	break; -	case UNITY_PLACES_TILE_DISPLAY_NAME: -	g_value_set_string (value, unity_places_tile_get_display_name (self)); -	break; -	case UNITY_PLACES_TILE_ICON_HINT: -	g_value_set_string (value, unity_places_tile_get_icon_hint (self)); -	break; -	case UNITY_PLACES_TILE_URI: -	g_value_set_string (value, unity_places_tile_get_uri (self)); -	break; -	case UNITY_PLACES_TILE_MIMETYPE: -	g_value_set_string (value, unity_places_tile_get_mimetype (self)); -	break; -	case UNITY_PLACES_TILE_COMMENT: -	g_value_set_string (value, unity_places_tile_get_comment (self)); -	break; -	default: -	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -	break; -	} -} - - -static void unity_places_tile_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { -	UnityPlacesTile * self; -	self = UNITY_PLACES_TILE (object); -	switch (property_id) { -	case UNITY_PLACES_TILE_ITER: -	unity_places_tile_set_iter (self, g_value_get_pointer (value)); -	break; -	case UNITY_PLACES_TILE_DISPLAY_NAME: -	unity_places_tile_set_display_name (self, g_value_get_string (value)); -	break; -	case UNITY_PLACES_TILE_ICON_HINT: -	unity_places_tile_set_icon_hint (self, g_value_get_string (value)); -	break; -	case UNITY_PLACES_TILE_URI: -	unity_places_tile_set_uri (self, g_value_get_string (value)); -	break; -	case UNITY_PLACES_TILE_MIMETYPE: -	unity_places_tile_set_mimetype (self, g_value_get_string (value)); -	break; -	case UNITY_PLACES_TILE_COMMENT: -	unity_places_tile_set_comment (self, g_value_get_string (value)); -	break; -	default: -	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -	break; -	} -} - -  static int _vala_strcmp0 (const char * str1, const char * str2) { 	if (str1 == NULL) { 	return -(str1 != str2); diff --git a/unity-private/places/places-default-renderer-group.vala b/unity-private/places/places-default-renderer-group.vala index 2dac1e1ad..9fe7b19f2 100644 --- a/unity-private/places/places-default-renderer-group.vala +++ b/unity-private/places/places-default-renderer-group.vala @@ -21,7 +21,7 @@ namespace Unity.Places  {  public class DefaultRendererGroup : ExpandingBin  { - static const float PADDING = 24.0f; + static const float PADDING = 52.0f;  static const int SPACING = 0;  static const int OMG_FOOTEL_SUCKS_CANT_HANDLE_MANY_TEXTURES = 100; @@ -31,13 +31,34 @@ namespace Unity.Places  public string icon_hint { get; construct; }  public Dee.Model results { get; construct; } + private bool _always_expanded = false; + public bool always_expanded { + get { return _always_expanded; } + set { + if (_always_expanded != value) + { + _always_expanded = value; + + if (_always_expanded == true) + { + var children = renderer.get_children (); + foreach (Clutter.Actor child in children) + { + Tile tile = child as Tile; + tile.about_to_show (); + } + title_button.activate (); + } + } + } + } +  private Ctk.VBox vbox; - private Ctk.Button title_button; + private Button title_button;  private Ctk.HBox title_box;  private Ctk.Image icon;  private Ctk.Text text;  private Expander expander; - private Ctk.Button sep;  private Ctk.IconView renderer;  private MoreResultsButton? more_results_button; @@ -48,6 +69,8 @@ namespace Unity.Places  private bool allow_expand = true; + private bool last_result_timeout = false; +  public signal void activated (string uri, string mimetype);  public DefaultRendererGroup (uint group_id, @@ -65,7 +88,7 @@ namespace Unity.Places  construct  { - padding = { 0.0f, 0.0f, PADDING, 0.0f}; + padding = { 0.0f, 0.0f, 0.0f, 0.0f};  hide ();  if (group_renderer == "UnityLinkGroupRenderer") @@ -79,18 +102,17 @@ namespace Unity.Places  add_actor (vbox);  vbox.show (); - title_button = new Ctk.Button (Ctk.Orientation.HORIZONTAL); + title_button = new Button (); + title_button.normal_state = Button.NormalState.UNDERLINE; + title_button.orientation = Ctk.Orientation.HORIZONTAL;  title_button.padding = { 4.0f, 6.0f, 4.0f, 6.0f };  vbox.pack (title_button, false, false);  title_button.show (); - var title_bg = new StripeTexture (null); - title_button.set_background_for_state (Ctk.ActorState.STATE_PRELIGHT, - title_bg);  title_button.notify["state"].connect (() => { - if (title_button.state == Ctk.ActorState.STATE_PRELIGHT) - sep.opacity = 0; + if (title_button.state == Ctk.ActorState.STATE_ACTIVE) + text.color = { 50, 50, 50, 200 };  else - sep.opacity = 255; + text.color = { 255, 255, 255, 255 };  unowned GLib.SList<unowned Ctk.Effect> effects = title_button.get_effects ();  foreach (unowned Ctk.Effect effect in effects) @@ -111,7 +133,7 @@ namespace Unity.Places  icon.show ();  text = new Ctk.Text (display_name); - text.set_markup ("<big>" + display_name + "</big>"); + text.set_markup ("<big>" + Markup.escape_text (display_name) + "</big>");  title_box.pack (text, false, false);  text.show (); @@ -120,17 +142,6 @@ namespace Unity.Places  title_box.pack (expander, false, true);  expander.show (); - sep = new Ctk.Button (Ctk.Orientation.HORIZONTAL); - var rect = new Clutter.Rectangle.with_color ({ 255, 255, 255, 100 }); - sep.add_actor (rect); - rect.height = 1.0f; - vbox.pack (sep, false, false); - sep.show (); - glow = new Ctk.EffectGlow (); - glow.set_factor (1.0f); - glow.set_margin (5); - //sep.add_effect (glow); -  title_button.clicked.connect (() => {  if (n_results <= renderer.get_n_cols () || allow_expand == false)  return; @@ -195,10 +206,15 @@ namespace Unity.Places  }  });  } - else if (group_renderer == "UnityFolderGroupRenderer") + + var pad = new Ctk.Button (Ctk.Orientation.HORIZONTAL); + pad.get_image ().size = (int)PADDING; + vbox.pack (pad, false, false); + pad.show (); + + if (group_renderer == "UnityFolderGroupRenderer")  {  title_button.hide (); - sep.hide ();  bin_state = ExpandingBinState.EXPANDED;  } @@ -231,8 +247,8 @@ namespace Unity.Places  if (child is Clutter.Actor &&  child.height != unexpanded_height)  { - var h = more_results_button != null ? more_results_button.height : 0; - unexpanded_height = title_button.height + 1.0f + child.height + h; + var h = more_results_button != null && more_results_button.opacity != 0 ? PADDING : 0; + unexpanded_height = title_button.height + 1.0f + child.height + h + PADDING;  }  } @@ -246,16 +262,41 @@ namespace Unity.Places  if (n_results == OMG_FOOTEL_SUCKS_CANT_HANDLE_MANY_TEXTURES)  return; - var button = new Tile (iter, - results.get_string (iter, 0), - results.get_string (iter, 1), - results.get_string (iter, 3), - results.get_string (iter, 4), - results.get_string (iter, 5)); +  + Tile button; +  + + if (group_renderer == "UnityFileInfoRenderer") + { + button = new FileInfoTile (iter, + results.get_string (iter, 0), + results.get_string (iter, 1), + results.get_string (iter, 3), + results.get_string (iter, 4), + results.get_string (iter, 5)); + } + else if (group_renderer == "UnityShowcaseRenderer") + { + button = new ShowcaseTile (iter, + results.get_string (iter, 0), + results.get_string (iter, 1), + results.get_string (iter, 3), + results.get_string (iter, 4), + results.get_string (iter, 5)); + } + else + { + button = new DefaultTile (iter, + results.get_string (iter, 0), + results.get_string (iter, 1), + results.get_string (iter, 3), + results.get_string (iter, 4), + results.get_string (iter, 5)); + }  renderer.add_actor (button);  button.show (); - if (bin_state == ExpandingBinState.EXPANDED) + if (bin_state == ExpandingBinState.EXPANDED || _always_expanded)  {  button.about_to_show ();  } @@ -266,7 +307,7 @@ namespace Unity.Places  if (bin_state == ExpandingBinState.CLOSED)  { - if (group_renderer == "UnityFolderGroupRenderer") + if (group_renderer == "UnityFolderGroupRenderer" || _always_expanded)  bin_state = ExpandingBinState.EXPANDED;  else  bin_state = ExpandingBinState.UNEXPANDED; @@ -294,9 +335,15 @@ namespace Unity.Places  }  } - if (n_results < 1) + if (n_results < 1 && last_result_timeout == false)  { - bin_state = ExpandingBinState.CLOSED; + Timeout.add (100, () => { + if (n_results < 1) + bin_state = ExpandingBinState.CLOSED; + last_result_timeout = false; + return false; + }); + last_result_timeout = true;  }  } @@ -490,6 +537,8 @@ namespace Unity.Places  bg.remove_effect (glow);  glow = null;  } + + queue_relayout ();  }  } @@ -516,7 +565,6 @@ namespace Unity.Places  bg.show ();  text = new Ctk.Text (""); - add_actor (text);  box.add_actor (text);  text.show (); @@ -620,90 +668,5 @@ namespace Unity.Places  cr.stroke ();  }  } - - public class Tile : Ctk.Button - { - static const int ICON_SIZE = 48; - static const string DEFAULT_ICON = "text-x-preview"; - - public unowned Dee.ModelIter iter { get; construct; } - - public string display_name { get; construct; } - public string? icon_hint { get; construct; } - public string uri { get; construct; } - public string? mimetype { get; construct; } - public string? comment { get; construct; } - - private bool shown = false; - - public signal void activated (string uri, string mimetype); - - public Tile (Dee.ModelIter iter, - string uri, - string? icon_hint, - string? mimetype, - string display_name, - string? comment) - { - Object (orientation:Ctk.Orientation.VERTICAL, - iter:iter, - display_name:display_name, - icon_hint:icon_hint, - uri:uri, - mimetype:mimetype, - comment:comment); - } - - construct - { - unowned Ctk.Text text = get_text (); - text.ellipsize = Pango.EllipsizeMode.MIDDLE; - } - - public void about_to_show () - { - if (shown) - return; - shown = true; - - Timeout.add (0, () => { - set_label (display_name); - set_icon (); - return false; - }); - } - - private override void get_preferred_width (float for_height, - out float mwidth, - out float nwidth) - { - mwidth = 150.0f; - nwidth = 150.0f; - } - - private override void clicked () - { - activated (uri, mimetype); - } -  - private void set_icon () - { - var cache = PixbufCache.get_default (); - - if (icon_hint != null && icon_hint != "") - { - cache.set_image_from_gicon_string (get_image (), icon_hint, ICON_SIZE); - } - else if (mimetype != null && mimetype != "") - { - var icon = GLib.g_content_type_get_icon (mimetype); - cache.set_image_from_gicon_string (get_image (), icon.to_string(), ICON_SIZE); - } - else - { - cache.set_image_from_icon_name (get_image (), DEFAULT_ICON, ICON_SIZE); - } - } - }  } diff --git a/unity-private/places/places-default-renderer-tiles.c b/unity-private/places/places-default-renderer-tiles.c new file mode 100644 index 000000000..7d924822d --- /dev/null +++ b/unity-private/places/places-default-renderer-tiles.c @@ -0,0 +1,1257 @@ +/* places-default-renderer-tiles.c generated by valac 0.9.7, the Vala compiler + * generated from places-default-renderer-tiles.vala, do not modify */ + +/* + * Copyright (C) 2010 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authored by Neil Jagdish Patel <neil.patel@canonical.com> + * + */ + +#include <glib.h> +#include <glib-object.h> +#include <clutk/clutk.h> +#include <cairo.h> +#include <dee.h> +#include <stdlib.h> +#include <string.h> +#include <float.h> +#include <math.h> +#include <clutter/clutter.h> +#include <pango/pango.h> +#include <gio/gio.h> +#include <unity.h> + + +#define UNITY_PLACES_TYPE_BUTTON (unity_places_button_get_type ()) +#define UNITY_PLACES_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButton)) +#define UNITY_PLACES_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) +#define UNITY_PLACES_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) + +typedef struct _UnityPlacesButton UnityPlacesButton; +typedef struct _UnityPlacesButtonClass UnityPlacesButtonClass; +typedef struct _UnityPlacesButtonPrivate UnityPlacesButtonPrivate; + +#define UNITY_PLACES_TYPE_TILE (unity_places_tile_get_type ()) +#define UNITY_PLACES_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_TILE, UnityPlacesTile)) +#define UNITY_PLACES_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_TILE, UnityPlacesTileClass)) +#define UNITY_PLACES_IS_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_TILE)) +#define UNITY_PLACES_IS_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_TILE)) +#define UNITY_PLACES_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_TILE, UnityPlacesTileClass)) + +typedef struct _UnityPlacesTile UnityPlacesTile; +typedef struct _UnityPlacesTileClass UnityPlacesTileClass; +typedef struct _UnityPlacesTilePrivate UnityPlacesTilePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define UNITY_PLACES_TYPE_FILE_INFO_TILE (unity_places_file_info_tile_get_type ()) +#define UNITY_PLACES_FILE_INFO_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTile)) +#define UNITY_PLACES_FILE_INFO_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTileClass)) +#define UNITY_PLACES_IS_FILE_INFO_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE)) +#define UNITY_PLACES_IS_FILE_INFO_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_FILE_INFO_TILE)) +#define UNITY_PLACES_FILE_INFO_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTileClass)) + +typedef struct _UnityPlacesFileInfoTile UnityPlacesFileInfoTile; +typedef struct _UnityPlacesFileInfoTileClass UnityPlacesFileInfoTileClass; +typedef struct _UnityPlacesFileInfoTilePrivate UnityPlacesFileInfoTilePrivate; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define UNITY_PLACES_BUTTON_TYPE_PRELIGHT_STATE (unity_places_button_prelight_state_get_type ()) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +typedef struct _Block1Data Block1Data; + +#define UNITY_PLACES_TYPE_SHOWCASE_TILE (unity_places_showcase_tile_get_type ()) +#define UNITY_PLACES_SHOWCASE_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTile)) +#define UNITY_PLACES_SHOWCASE_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTileClass)) +#define UNITY_PLACES_IS_SHOWCASE_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE)) +#define UNITY_PLACES_IS_SHOWCASE_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_SHOWCASE_TILE)) +#define UNITY_PLACES_SHOWCASE_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTileClass)) + +typedef struct _UnityPlacesShowcaseTile UnityPlacesShowcaseTile; +typedef struct _UnityPlacesShowcaseTileClass UnityPlacesShowcaseTileClass; +typedef struct _UnityPlacesShowcaseTilePrivate UnityPlacesShowcaseTilePrivate; + +#define UNITY_PLACES_TYPE_DEFAULT_TILE (unity_places_default_tile_get_type ()) +#define UNITY_PLACES_DEFAULT_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTile)) +#define UNITY_PLACES_DEFAULT_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTileClass)) +#define UNITY_PLACES_IS_DEFAULT_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE)) +#define UNITY_PLACES_IS_DEFAULT_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_DEFAULT_TILE)) +#define UNITY_PLACES_DEFAULT_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTileClass)) + +typedef struct _UnityPlacesDefaultTile UnityPlacesDefaultTile; +typedef struct _UnityPlacesDefaultTileClass UnityPlacesDefaultTileClass; +typedef struct _UnityPlacesDefaultTilePrivate UnityPlacesDefaultTilePrivate; + +typedef void (*UnityPlacesButtonButtonOutlineFunc) (cairo_t* cr, gint width, gint height, void* user_data); +struct _UnityPlacesButton { +	CtkButton parent_instance; +	UnityPlacesButtonPrivate * priv; +	UnityPlacesButtonButtonOutlineFunc outline_func; +	gpointer outline_func_target; +	GDestroyNotify outline_func_target_destroy_notify; +}; + +struct _UnityPlacesButtonClass { +	CtkButtonClass parent_class; +}; + +struct _UnityPlacesTile { +	UnityPlacesButton parent_instance; +	UnityPlacesTilePrivate * priv; +}; + +struct _UnityPlacesTileClass { +	UnityPlacesButtonClass parent_class; +	void (*about_to_show) (UnityPlacesTile* self); +}; + +struct _UnityPlacesTilePrivate { +	DeeModelIter* _iter; +	char* _display_name; +	char* _icon_hint; +	char* _uri; +	char* _mimetype; +	char* _comment; +}; + +struct _UnityPlacesFileInfoTile { +	UnityPlacesTile parent_instance; +	UnityPlacesFileInfoTilePrivate * priv; +}; + +struct _UnityPlacesFileInfoTileClass { +	UnityPlacesTileClass parent_class; +}; + +struct _UnityPlacesFileInfoTilePrivate { +	gboolean shown; +	CtkImage* icon; +	CtkText* leaf; +	UnityPlacesButton* folder_button; +	CtkText* folder; +	CtkText* time; +}; + +typedef enum { +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_NONE, +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_STRIPED, +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_UNDERLINE +} UnityPlacesButtonPrelightState; + +struct _Block1Data { +	int _ref_count_; +	UnityPlacesFileInfoTile * self; +	GFile* parent; +}; + +struct _UnityPlacesShowcaseTile { +	UnityPlacesTile parent_instance; +	UnityPlacesShowcaseTilePrivate * priv; +}; + +struct _UnityPlacesShowcaseTileClass { +	UnityPlacesTileClass parent_class; +}; + +struct _UnityPlacesShowcaseTilePrivate { +	gboolean shown; +}; + +struct _UnityPlacesDefaultTile { +	UnityPlacesTile parent_instance; +	UnityPlacesDefaultTilePrivate * priv; +}; + +struct _UnityPlacesDefaultTileClass { +	UnityPlacesTileClass parent_class; +}; + +struct _UnityPlacesDefaultTilePrivate { +	gboolean shown; +}; + + +static gpointer unity_places_tile_parent_class = NULL; +static gpointer unity_places_file_info_tile_parent_class = NULL; +static gpointer unity_places_showcase_tile_parent_class = NULL; +static gpointer unity_places_default_tile_parent_class = NULL; + +GType unity_places_button_get_type (void) G_GNUC_CONST; +GType unity_places_tile_get_type (void) G_GNUC_CONST; +#define UNITY_PLACES_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_TILE, UnityPlacesTilePrivate)) +enum { +	UNITY_PLACES_TILE_DUMMY_PROPERTY, +	UNITY_PLACES_TILE_ITER, +	UNITY_PLACES_TILE_DISPLAY_NAME, +	UNITY_PLACES_TILE_ICON_HINT, +	UNITY_PLACES_TILE_URI, +	UNITY_PLACES_TILE_MIMETYPE, +	UNITY_PLACES_TILE_COMMENT +}; +#define UNITY_PLACES_TILE_DEFAULT_ICON "text-x-preview" +void unity_places_tile_about_to_show (UnityPlacesTile* self); +static void unity_places_tile_real_about_to_show (UnityPlacesTile* self); +UnityPlacesTile* unity_places_tile_construct (GType object_type); +UnityPlacesButton* unity_places_button_new (void); +UnityPlacesButton* unity_places_button_construct (GType object_type); +DeeModelIter* unity_places_tile_get_iter (UnityPlacesTile* self); +static void unity_places_tile_set_iter (UnityPlacesTile* self, DeeModelIter* value); +const char* unity_places_tile_get_display_name (UnityPlacesTile* self); +static void unity_places_tile_set_display_name (UnityPlacesTile* self, const char* value); +const char* unity_places_tile_get_icon_hint (UnityPlacesTile* self); +static void unity_places_tile_set_icon_hint (UnityPlacesTile* self, const char* value); +const char* unity_places_tile_get_uri (UnityPlacesTile* self); +static void unity_places_tile_set_uri (UnityPlacesTile* self, const char* value); +const char* unity_places_tile_get_mimetype (UnityPlacesTile* self); +static void unity_places_tile_set_mimetype (UnityPlacesTile* self, const char* value); +const char* unity_places_tile_get_comment (UnityPlacesTile* self); +static void unity_places_tile_set_comment (UnityPlacesTile* self, const char* value); +static void unity_places_tile_finalize (GObject* obj); +static void unity_places_tile_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void unity_places_tile_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +GType unity_places_file_info_tile_get_type (void) G_GNUC_CONST; +#define UNITY_PLACES_FILE_INFO_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTilePrivate)) +enum { +	UNITY_PLACES_FILE_INFO_TILE_DUMMY_PROPERTY +}; +#define UNITY_PLACES_FILE_INFO_TILE_ICON_WIDTH 56 +#define UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT 48 +#define UNITY_PLACES_FILE_INFO_TILE_LINE_PADDING 0.0f +#define UNITY_PLACES_FILE_INFO_TILE_HPADDING 4.0f +#define UNITY_PLACES_FILE_INFO_TILE_VPADDING 4.0f +UnityPlacesFileInfoTile* unity_places_file_info_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesFileInfoTile* unity_places_file_info_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +static void unity_places_file_info_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth); +static void unity_places_file_info_tile_real_about_to_show (UnityPlacesTile* base); +GType unity_places_button_prelight_state_get_type (void) G_GNUC_CONST; +void unity_places_button_set_prelight_state (UnityPlacesButton* self, UnityPlacesButtonPrelightState value); +static void _lambda43_ (UnityPlacesFileInfoTile* self); +static void __lambda43__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +static gboolean _lambda44_ (UnityPlacesFileInfoTile* self); +static void _lambda45_ (Block1Data* _data1_); +static void __lambda45__ctk_button_clicked (CtkButton* _sender, gpointer self); +static Block1Data* block1_data_ref (Block1Data* _data1_); +static void block1_data_unref (Block1Data* _data1_); +static void unity_places_file_info_tile_set_icon (UnityPlacesFileInfoTile* self); +static gboolean __lambda44__gsource_func (gpointer self); +static void unity_places_file_info_tile_real_clicked (CtkButton* base); +static void unity_places_file_info_tile_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags); +static void unity_places_file_info_tile_real_get_preferred_height (ClutterActor* base, float for_width, float* mheight, float* nheight); +static void unity_places_file_info_tile_real_paint (ClutterActor* base); +static void unity_places_file_info_tile_real_pick (ClutterActor* base, const ClutterColor* color); +static void unity_places_file_info_tile_real_map (ClutterActor* base); +static void unity_places_file_info_tile_real_unmap (ClutterActor* base); +static GObject * unity_places_file_info_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +static void unity_places_file_info_tile_finalize (GObject* obj); +GType unity_places_showcase_tile_get_type (void) G_GNUC_CONST; +#define UNITY_PLACES_SHOWCASE_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTilePrivate)) +enum { +	UNITY_PLACES_SHOWCASE_TILE_DUMMY_PROPERTY +}; +#define UNITY_PLACES_SHOWCASE_TILE_ICON_SIZE 64 +#define UNITY_PLACES_SHOWCASE_TILE_PADDING 4.0f +UnityPlacesShowcaseTile* unity_places_showcase_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesShowcaseTile* unity_places_showcase_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +static void unity_places_showcase_tile_real_about_to_show (UnityPlacesTile* base); +static gboolean _lambda46_ (UnityPlacesShowcaseTile* self); +static void unity_places_showcase_tile_set_icon (UnityPlacesShowcaseTile* self); +static gboolean __lambda46__gsource_func (gpointer self); +static void unity_places_showcase_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth); +static void unity_places_showcase_tile_real_clicked (CtkButton* base); +static GObject * unity_places_showcase_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +static void unity_places_showcase_tile_finalize (GObject* obj); +GType unity_places_default_tile_get_type (void) G_GNUC_CONST; +#define UNITY_PLACES_DEFAULT_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTilePrivate)) +enum { +	UNITY_PLACES_DEFAULT_TILE_DUMMY_PROPERTY +}; +#define UNITY_PLACES_DEFAULT_TILE_ICON_SIZE 48 +#define UNITY_PLACES_DEFAULT_TILE_PADDING 4.0f +UnityPlacesDefaultTile* unity_places_default_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesDefaultTile* unity_places_default_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +static void unity_places_default_tile_real_about_to_show (UnityPlacesTile* base); +static gboolean _lambda47_ (UnityPlacesDefaultTile* self); +static void unity_places_default_tile_set_icon (UnityPlacesDefaultTile* self); +static gboolean __lambda47__gsource_func (gpointer self); +static void unity_places_default_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth); +static void unity_places_default_tile_real_clicked (CtkButton* base); +static GObject * unity_places_default_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +static void unity_places_default_tile_finalize (GObject* obj); +static int _vala_strcmp0 (const char * str1, const char * str2); + + +static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); + +static void unity_places_tile_real_about_to_show (UnityPlacesTile* self) { +	g_return_if_fail (self != NULL); +	g_critical ("Type `%s' does not implement abstract method `unity_places_tile_about_to_show'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +	return; +} + + +void unity_places_tile_about_to_show (UnityPlacesTile* self) { +	UNITY_PLACES_TILE_GET_CLASS (self)->about_to_show (self); +} + + +UnityPlacesTile* unity_places_tile_construct (GType object_type) { +	UnityPlacesTile * self; +	self = (UnityPlacesTile*) unity_places_button_construct (object_type); +	return self; +} + + +DeeModelIter* unity_places_tile_get_iter (UnityPlacesTile* self) { +	DeeModelIter* result; +	g_return_val_if_fail (self != NULL, NULL); +	result = self->priv->_iter; +	return result; +} + + +static void unity_places_tile_set_iter (UnityPlacesTile* self, DeeModelIter* value) { +	g_return_if_fail (self != NULL); +	self->priv->_iter = value; +	g_object_notify ((GObject *) self, "iter"); +} + + +const char* unity_places_tile_get_display_name (UnityPlacesTile* self) { +	const char* result; +	g_return_val_if_fail (self != NULL, NULL); +	result = self->priv->_display_name; +	return result; +} + + +static void unity_places_tile_set_display_name (UnityPlacesTile* self, const char* value) { +	char* _tmp0_; +	g_return_if_fail (self != NULL); +	self->priv->_display_name = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_display_name), _tmp0_); +	g_object_notify ((GObject *) self, "display-name"); +} + + +const char* unity_places_tile_get_icon_hint (UnityPlacesTile* self) { +	const char* result; +	g_return_val_if_fail (self != NULL, NULL); +	result = self->priv->_icon_hint; +	return result; +} + + +static void unity_places_tile_set_icon_hint (UnityPlacesTile* self, const char* value) { +	char* _tmp0_; +	g_return_if_fail (self != NULL); +	self->priv->_icon_hint = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_icon_hint), _tmp0_); +	g_object_notify ((GObject *) self, "icon-hint"); +} + + +const char* unity_places_tile_get_uri (UnityPlacesTile* self) { +	const char* result; +	g_return_val_if_fail (self != NULL, NULL); +	result = self->priv->_uri; +	return result; +} + + +static void unity_places_tile_set_uri (UnityPlacesTile* self, const char* value) { +	char* _tmp0_; +	g_return_if_fail (self != NULL); +	self->priv->_uri = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_uri), _tmp0_); +	g_object_notify ((GObject *) self, "uri"); +} + + +const char* unity_places_tile_get_mimetype (UnityPlacesTile* self) { +	const char* result; +	g_return_val_if_fail (self != NULL, NULL); +	result = self->priv->_mimetype; +	return result; +} + + +static void unity_places_tile_set_mimetype (UnityPlacesTile* self, const char* value) { +	char* _tmp0_; +	g_return_if_fail (self != NULL); +	self->priv->_mimetype = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_mimetype), _tmp0_); +	g_object_notify ((GObject *) self, "mimetype"); +} + + +const char* unity_places_tile_get_comment (UnityPlacesTile* self) { +	const char* result; +	g_return_val_if_fail (self != NULL, NULL); +	result = self->priv->_comment; +	return result; +} + + +static void unity_places_tile_set_comment (UnityPlacesTile* self, const char* value) { +	char* _tmp0_; +	g_return_if_fail (self != NULL); +	self->priv->_comment = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_comment), _tmp0_); +	g_object_notify ((GObject *) self, "comment"); +} + + +static void unity_places_tile_class_init (UnityPlacesTileClass * klass) { +	unity_places_tile_parent_class = g_type_class_peek_parent (klass); +	g_type_class_add_private (klass, sizeof (UnityPlacesTilePrivate)); +	UNITY_PLACES_TILE_CLASS (klass)->about_to_show = unity_places_tile_real_about_to_show; +	G_OBJECT_CLASS (klass)->get_property = unity_places_tile_get_property; +	G_OBJECT_CLASS (klass)->set_property = unity_places_tile_set_property; +	G_OBJECT_CLASS (klass)->finalize = unity_places_tile_finalize; +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_ITER, g_param_spec_pointer ("iter", "iter", "iter", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_ICON_HINT, g_param_spec_string ("icon-hint", "icon-hint", "icon-hint", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_MIMETYPE, g_param_spec_string ("mimetype", "mimetype", "mimetype", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +	g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_PLACES_TILE_COMMENT, g_param_spec_string ("comment", "comment", "comment", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +	g_signal_new ("activated", UNITY_PLACES_TYPE_TILE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); +} + + +static void unity_places_tile_instance_init (UnityPlacesTile * self) { +	self->priv = UNITY_PLACES_TILE_GET_PRIVATE (self); +} + + +static void unity_places_tile_finalize (GObject* obj) { +	UnityPlacesTile * self; +	self = UNITY_PLACES_TILE (obj); +	_g_free0 (self->priv->_display_name); +	_g_free0 (self->priv->_icon_hint); +	_g_free0 (self->priv->_uri); +	_g_free0 (self->priv->_mimetype); +	_g_free0 (self->priv->_comment); +	G_OBJECT_CLASS (unity_places_tile_parent_class)->finalize (obj); +} + + +GType unity_places_tile_get_type (void) { +	static volatile gsize unity_places_tile_type_id__volatile = 0; +	if (g_once_init_enter (&unity_places_tile_type_id__volatile)) { +	static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesTileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_tile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesTile), 0, (GInstanceInitFunc) unity_places_tile_instance_init, NULL }; +	GType unity_places_tile_type_id; +	unity_places_tile_type_id = g_type_register_static (UNITY_PLACES_TYPE_BUTTON, "UnityPlacesTile", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); +	g_once_init_leave (&unity_places_tile_type_id__volatile, unity_places_tile_type_id); +	} +	return unity_places_tile_type_id__volatile; +} + + +static void unity_places_tile_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +	UnityPlacesTile * self; +	self = UNITY_PLACES_TILE (object); +	switch (property_id) { +	case UNITY_PLACES_TILE_ITER: +	g_value_set_pointer (value, unity_places_tile_get_iter (self)); +	break; +	case UNITY_PLACES_TILE_DISPLAY_NAME: +	g_value_set_string (value, unity_places_tile_get_display_name (self)); +	break; +	case UNITY_PLACES_TILE_ICON_HINT: +	g_value_set_string (value, unity_places_tile_get_icon_hint (self)); +	break; +	case UNITY_PLACES_TILE_URI: +	g_value_set_string (value, unity_places_tile_get_uri (self)); +	break; +	case UNITY_PLACES_TILE_MIMETYPE: +	g_value_set_string (value, unity_places_tile_get_mimetype (self)); +	break; +	case UNITY_PLACES_TILE_COMMENT: +	g_value_set_string (value, unity_places_tile_get_comment (self)); +	break; +	default: +	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +	break; +	} +} + + +static void unity_places_tile_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +	UnityPlacesTile * self; +	self = UNITY_PLACES_TILE (object); +	switch (property_id) { +	case UNITY_PLACES_TILE_ITER: +	unity_places_tile_set_iter (self, g_value_get_pointer (value)); +	break; +	case UNITY_PLACES_TILE_DISPLAY_NAME: +	unity_places_tile_set_display_name (self, g_value_get_string (value)); +	break; +	case UNITY_PLACES_TILE_ICON_HINT: +	unity_places_tile_set_icon_hint (self, g_value_get_string (value)); +	break; +	case UNITY_PLACES_TILE_URI: +	unity_places_tile_set_uri (self, g_value_get_string (value)); +	break; +	case UNITY_PLACES_TILE_MIMETYPE: +	unity_places_tile_set_mimetype (self, g_value_get_string (value)); +	break; +	case UNITY_PLACES_TILE_COMMENT: +	unity_places_tile_set_comment (self, g_value_get_string (value)); +	break; +	default: +	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +	break; +	} +} + + +UnityPlacesFileInfoTile* unity_places_file_info_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { +	UnityPlacesFileInfoTile * self; +	g_return_val_if_fail (iter != NULL, NULL); +	g_return_val_if_fail (uri != NULL, NULL); +	g_return_val_if_fail (display_name != NULL, NULL); +	self = (UnityPlacesFileInfoTile*) g_object_new (object_type, "orientation", CTK_ORIENTATION_HORIZONTAL, "iter", iter, "display-name", display_name, "icon-hint", icon_hint, "uri", uri, "mimetype", mimetype, "comment", comment, NULL); +	return self; +} + + +UnityPlacesFileInfoTile* unity_places_file_info_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { +	return unity_places_file_info_tile_construct (UNITY_PLACES_TYPE_FILE_INFO_TILE, iter, uri, icon_hint, mimetype, display_name, comment); +} + + +static void unity_places_file_info_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth) { +	UnityPlacesFileInfoTile * self; +	self = (UnityPlacesFileInfoTile*) base; +	*mwidth = 210.0f; +	*nwidth = 210.0f; +} + + +static void _lambda43_ (UnityPlacesFileInfoTile* self) { +	gboolean _tmp0_ = FALSE; +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_NORMAL) { +	_tmp0_ = TRUE; +	} else { +	_tmp0_ = ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_PRELIGHT; +	} +	if (_tmp0_) { +	ClutterColor _tmp1_ = {0}; +	ClutterColor _tmp2_; +	ClutterColor _tmp3_ = {0}; +	ClutterColor _tmp4_; +	ClutterColor _tmp5_ = {0}; +	ClutterColor _tmp6_; +	clutter_text_set_color ((ClutterText*) self->priv->leaf, (_tmp2_ = (_tmp1_.red = (guint8) 255, _tmp1_.green = (guint8) 255, _tmp1_.blue = (guint8) 255, _tmp1_.alpha = (guint8) 255, _tmp1_), &_tmp2_)); +	clutter_text_set_color ((ClutterText*) self->priv->folder, (_tmp4_ = (_tmp3_.red = (guint8) 255, _tmp3_.green = (guint8) 255, _tmp3_.blue = (guint8) 255, _tmp3_.alpha = (guint8) 100, _tmp3_), &_tmp4_)); +	clutter_text_set_color ((ClutterText*) self->priv->time, (_tmp6_ = (_tmp5_.red = (guint8) 255, _tmp5_.green = (guint8) 255, _tmp5_.blue = (guint8) 255, _tmp5_.alpha = (guint8) 255, _tmp5_), &_tmp6_)); +	} else { +	ClutterColor _tmp7_ = {0}; +	ClutterColor _tmp8_; +	ClutterColor _tmp9_ = {0}; +	ClutterColor _tmp10_; +	ClutterColor _tmp11_ = {0}; +	ClutterColor _tmp12_; +	clutter_text_set_color ((ClutterText*) self->priv->leaf, (_tmp8_ = (_tmp7_.red = (guint8) 50, _tmp7_.green = (guint8) 50, _tmp7_.blue = (guint8) 50, _tmp7_.alpha = (guint8) 200, _tmp7_), &_tmp8_)); +	clutter_text_set_color ((ClutterText*) self->priv->folder, (_tmp10_ = (_tmp9_.red = (guint8) 50, _tmp9_.green = (guint8) 50, _tmp9_.blue = (guint8) 50, _tmp9_.alpha = (guint8) 100, _tmp9_), &_tmp10_)); +	clutter_text_set_color ((ClutterText*) self->priv->time, (_tmp12_ = (_tmp11_.red = (guint8) 50, _tmp11_.green = (guint8) 50, _tmp11_.blue = (guint8) 50, _tmp11_.alpha = (guint8) 200, _tmp11_), &_tmp12_)); +	} +} + + +static void __lambda43__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda43_ (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 _lambda45_ (Block1Data* _data1_) { +	UnityPlacesFileInfoTile * self; +	GError * _inner_error_ = NULL; +	self = _data1_->self; +	{ +	char* _tmp0_; +	g_signal_emit_by_name ((UnityPlacesTile*) self, "activated", _tmp0_ = g_file_get_uri (_data1_->parent), "inode/directory"); +	_g_free0 (_tmp0_); +	} +	goto __finally13; +	__catch13_g_error: +	{ +	GError * e; +	e = _inner_error_; +	_inner_error_ = NULL; +	{ +	char* _tmp1_; +	g_warning ("places-default-renderer-tiles.vala:149: %s", _tmp1_ = g_strconcat ("Unable to launch parent folder: ", string_to_string (e->message), NULL)); +	_g_free0 (_tmp1_); +	_g_error_free0 (e); +	} +	} +	__finally13: +	if (_inner_error_ != NULL) { +	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +	g_clear_error (&_inner_error_); +	return; +	} +} + + +static void __lambda45__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda45_ (self); +} + + +static Block1Data* block1_data_ref (Block1Data* _data1_) { +	g_atomic_int_inc (&_data1_->_ref_count_); +	return _data1_; +} + + +static void block1_data_unref (Block1Data* _data1_) { +	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { +	_g_object_unref0 (_data1_->self); +	_g_object_unref0 (_data1_->parent); +	g_slice_free (Block1Data, _data1_); +	} +} + + +static gboolean _lambda44_ (UnityPlacesFileInfoTile* self) { +	gboolean result = FALSE; +	GFile* file; +	clutter_text_set_text ((ClutterText*) self->priv->leaf, unity_places_tile_get_display_name ((UnityPlacesTile*) self)); +	file = g_file_new_for_uri (unity_places_tile_get_uri ((UnityPlacesTile*) self)); +	if (G_IS_FILE (file)) { +	Block1Data* _data1_; +	_data1_ = g_slice_new0 (Block1Data); +	_data1_->_ref_count_ = 1; +	_data1_->self = g_object_ref (self); +	_data1_->parent = g_file_get_parent (file); +	if (G_IS_FILE (_data1_->parent)) { +	char* _tmp0_; +	clutter_text_set_text ((ClutterText*) self->priv->folder, _tmp0_ = g_file_get_basename (_data1_->parent)); +	_g_free0 (_tmp0_); +	g_signal_connect_data ((CtkButton*) self->priv->folder_button, "clicked", (GCallback) __lambda45__ctk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); +	} else { +	clutter_text_set_text ((ClutterText*) self->priv->folder, ""); +	} +	block1_data_unref (_data1_); +	} else { +	clutter_text_set_text ((ClutterText*) self->priv->folder, ""); +	} +	unity_places_file_info_tile_set_icon (self); +	result = FALSE; +	_g_object_unref0 (file); +	return result; +} + + +static gboolean __lambda44__gsource_func (gpointer self) { +	gboolean result; +	result = _lambda44_ (self); +	return result; +} + + +static void unity_places_file_info_tile_real_about_to_show (UnityPlacesTile* base) { +	UnityPlacesFileInfoTile * self; +	CtkImage* _tmp0_; +	CtkText* _tmp1_; +	UnityPlacesButton* _tmp2_; +	CtkPadding _tmp3_ = {0}; +	CtkPadding _tmp4_; +	CtkText* _tmp5_; +	ClutterColor _tmp6_ = {0}; +	ClutterColor _tmp7_; +	const char* _tmp8_; +	CtkText* _tmp9_; +	self = (UnityPlacesFileInfoTile*) base; +	if (self->priv->shown) { +	return; +	} +	self->priv->shown = TRUE; +	self->priv->icon = (_tmp0_ = g_object_ref_sink ((CtkImage*) ctk_image_new ((guint) UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT)), _g_object_unref0 (self->priv->icon), _tmp0_); +	clutter_actor_set_parent ((ClutterActor*) self->priv->icon, (ClutterActor*) self); +	clutter_actor_show ((ClutterActor*) self->priv->icon); +	self->priv->leaf = (_tmp1_ = g_object_ref_sink ((CtkText*) ctk_text_new (" ")), _g_object_unref0 (self->priv->leaf), _tmp1_); +	clutter_text_set_ellipsize ((ClutterText*) self->priv->leaf, PANGO_ELLIPSIZE_MIDDLE); +	clutter_actor_set_parent ((ClutterActor*) self->priv->leaf, (ClutterActor*) self); +	clutter_actor_show ((ClutterActor*) self->priv->leaf); +	self->priv->folder_button = (_tmp2_ = g_object_ref_sink (unity_places_button_new ()), _g_object_unref0 (self->priv->folder_button), _tmp2_); +	unity_places_button_set_prelight_state (self->priv->folder_button, UNITY_PLACES_BUTTON_PRELIGHT_STATE_UNDERLINE); +	clutter_actor_set_parent ((ClutterActor*) self->priv->folder_button, (ClutterActor*) self); +	clutter_actor_show ((ClutterActor*) self->priv->folder_button); +	ctk_actor_set_padding ((CtkActor*) self->priv->folder_button, (_tmp4_ = (_tmp3_.top = 1.0f, _tmp3_.right = 0.0f, _tmp3_.bottom = 0.0f, _tmp3_.left = 0.0f, _tmp3_), &_tmp4_)); +	self->priv->folder = (_tmp5_ = g_object_ref_sink ((CtkText*) ctk_text_new ("")), _g_object_unref0 (self->priv->folder), _tmp5_); +	clutter_text_set_ellipsize ((ClutterText*) self->priv->folder, PANGO_ELLIPSIZE_MIDDLE); +	clutter_container_add_actor ((ClutterContainer*) self->priv->folder_button, (ClutterActor*) self->priv->folder); +	clutter_text_set_color ((ClutterText*) self->priv->folder, (_tmp7_ = (_tmp6_.red = (guint8) 255, _tmp6_.green = (guint8) 255, _tmp6_.blue = (guint8) 255, _tmp6_.alpha = (guint8) 100, _tmp6_), &_tmp7_)); +	clutter_actor_show ((ClutterActor*) self->priv->folder); +	_tmp8_ = NULL; +	if (_vala_strcmp0 (unity_places_tile_get_uri ((UnityPlacesTile*) self), unity_places_tile_get_comment ((UnityPlacesTile*) self)) == 0) { +	_tmp8_ = ""; +	} else { +	_tmp8_ = unity_places_tile_get_comment ((UnityPlacesTile*) self); +	} +	self->priv->time = (_tmp9_ = g_object_ref_sink ((CtkText*) ctk_text_new (_tmp8_)), _g_object_unref0 (self->priv->time), _tmp9_); +	clutter_text_set_ellipsize ((ClutterText*) self->priv->time, PANGO_ELLIPSIZE_MIDDLE); +	clutter_actor_set_parent ((ClutterActor*) self->priv->time, (ClutterActor*) self); +	clutter_actor_show ((ClutterActor*) self->priv->time); +	g_signal_connect_object ((GObject*) self, "notify::state", (GCallback) __lambda43__g_object_notify, self, 0); +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda44__gsource_func, g_object_ref (self), g_object_unref); +	clutter_actor_queue_relayout ((ClutterActor*) self); +} + + +static void unity_places_file_info_tile_real_clicked (CtkButton* base) { +	UnityPlacesFileInfoTile * self; +	self = (UnityPlacesFileInfoTile*) base; +	g_signal_emit_by_name ((UnityPlacesTile*) self, "activated", unity_places_tile_get_uri ((UnityPlacesTile*) self), unity_places_tile_get_mimetype ((UnityPlacesTile*) self)); +} + + +static void unity_places_file_info_tile_set_icon (UnityPlacesFileInfoTile* self) { +	UnityPixbufCache* cache; +	gboolean _tmp0_ = FALSE; +	g_return_if_fail (self != NULL); +	cache = unity_pixbuf_cache_get_default (); +	if (unity_places_tile_get_icon_hint ((UnityPlacesTile*) self) != NULL) { +	_tmp0_ = _vala_strcmp0 (unity_places_tile_get_icon_hint ((UnityPlacesTile*) self), "") != 0; +	} else { +	_tmp0_ = FALSE; +	} +	if (_tmp0_) { +	unity_pixbuf_cache_set_image_from_gicon_string (cache, self->priv->icon, unity_places_tile_get_icon_hint ((UnityPlacesTile*) self), UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT, NULL, NULL); +	} else { +	gboolean _tmp1_ = FALSE; +	if (unity_places_tile_get_mimetype ((UnityPlacesTile*) self) != NULL) { +	_tmp1_ = _vala_strcmp0 (unity_places_tile_get_mimetype ((UnityPlacesTile*) self), "") != 0; +	} else { +	_tmp1_ = FALSE; +	} +	if (_tmp1_) { +	GIcon* icon; +	icon = g_content_type_get_icon (unity_places_tile_get_mimetype ((UnityPlacesTile*) self)); +	unity_pixbuf_cache_set_image_from_gicon_string (cache, self->priv->icon, g_icon_to_string (icon), UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT, NULL, NULL); +	_g_object_unref0 (icon); +	} else { +	unity_pixbuf_cache_set_image_from_icon_name (cache, self->priv->icon, UNITY_PLACES_TILE_DEFAULT_ICON, UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT, NULL, NULL); +	} +	} +	_g_object_unref0 (cache); +} + + +static void unity_places_file_info_tile_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags) { +	UnityPlacesFileInfoTile * self; +	float width; +	float height; +	ClutterActorBox child_box = {0}; +	float mh = 0.0F; +	float text_block; +	float y; +	float icon_text_pad; +	float mw = 0.0F; +	self = (UnityPlacesFileInfoTile*) base; +	CLUTTER_ACTOR_CLASS (unity_places_file_info_tile_parent_class)->allocate ((ClutterActor*) UNITY_PLACES_TILE (self), box, flags); +	if (CTK_IS_IMAGE (self->priv->icon) == FALSE) { +	return; +	} +	width = (*box).x2 - (*box).x1; +	height = (*box).y2 - (*box).y1; +	memset (&child_box, 0, sizeof (ClutterActorBox)); +	child_box.x1 = 0.0f; +	child_box.x2 = (float) UNITY_PLACES_FILE_INFO_TILE_ICON_WIDTH; +	child_box.y1 = (height / 2.0f) - (UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT / 2.0f); +	child_box.y2 = child_box.y1 + UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT; +	clutter_actor_allocate ((ClutterActor*) self->priv->icon, &child_box, flags); +	clutter_actor_get_preferred_height ((ClutterActor*) self->priv->leaf, width - UNITY_PLACES_FILE_INFO_TILE_ICON_WIDTH, &mh, NULL); +	text_block = (mh * 3.0f) + (UNITY_PLACES_FILE_INFO_TILE_LINE_PADDING * 2.0f); +	y = (height / 2.0f) - (text_block / 2.0f); +	icon_text_pad = 12.0f; +	child_box.x1 = UNITY_PLACES_FILE_INFO_TILE_ICON_WIDTH + icon_text_pad; +	child_box.x2 = width; +	child_box.y1 = y; +	child_box.y2 = y + mh; +	clutter_actor_allocate ((ClutterActor*) self->priv->leaf, &child_box, flags); +	clutter_actor_get_preferred_width ((ClutterActor*) self->priv->folder_button, mh, NULL, &mw); +	mw = fminf (mw, ((*box).x2 - UNITY_PLACES_FILE_INFO_TILE_ICON_WIDTH) - icon_text_pad); +	y = y + (UNITY_PLACES_FILE_INFO_TILE_LINE_PADDING + mh); +	child_box.x2 = child_box.x1 + mw; +	child_box.y1 = y; +	child_box.y2 = y + mh; +	clutter_actor_allocate ((ClutterActor*) self->priv->folder_button, &child_box, flags); +	clutter_actor_get_preferred_width ((ClutterActor*) self->priv->time, mh, NULL, &mw); +	mw = fminf (mw, ((*box).x2 - UNITY_PLACES_FILE_INFO_TILE_ICON_WIDTH) - icon_text_pad); +	y = y + (UNITY_PLACES_FILE_INFO_TILE_LINE_PADDING + mh); +	child_box.x2 = child_box.x1 + mw; +	child_box.y1 = y; +	child_box.y2 = y + mh; +	clutter_actor_allocate ((ClutterActor*) self->priv->time, &child_box, flags); +} + + +static void unity_places_file_info_tile_real_get_preferred_height (ClutterActor* base, float for_width, float* mheight, float* nheight) { +	UnityPlacesFileInfoTile * self; +	self = (UnityPlacesFileInfoTile*) base; +	if (CTK_IS_IMAGE (self->priv->icon)) { +	float mh = 0.0F; +	clutter_actor_get_preferred_height ((ClutterActor*) self->priv->leaf, for_width, &mh, NULL); +	*mheight = fmaxf (UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT + (UNITY_PLACES_FILE_INFO_TILE_VPADDING * 2.0f), ((mh * 3.0f) + (UNITY_PLACES_FILE_INFO_TILE_LINE_PADDING * 2.0f)) + (UNITY_PLACES_FILE_INFO_TILE_VPADDING * 2.0f)); +	*nheight = *mheight; +	} else { +	*mheight = UNITY_PLACES_FILE_INFO_TILE_ICON_HEIGHT + (UNITY_PLACES_FILE_INFO_TILE_VPADDING * 2.0f); +	*nheight = *mheight; +	} +} + + +static void unity_places_file_info_tile_real_paint (ClutterActor* base) { +	UnityPlacesFileInfoTile * self; +	self = (UnityPlacesFileInfoTile*) base; +	CLUTTER_ACTOR_CLASS (unity_places_file_info_tile_parent_class)->paint ((ClutterActor*) UNITY_PLACES_TILE (self)); +	if (CTK_IS_IMAGE (self->priv->icon)) { +	clutter_actor_paint ((ClutterActor*) self->priv->icon); +	clutter_actor_paint ((ClutterActor*) self->priv->leaf); +	clutter_actor_paint ((ClutterActor*) self->priv->folder_button); +	clutter_actor_paint ((ClutterActor*) self->priv->time); +	} +} + + +static void unity_places_file_info_tile_real_pick (ClutterActor* base, const ClutterColor* color) { +	UnityPlacesFileInfoTile * self; +	self = (UnityPlacesFileInfoTile*) base; +	CLUTTER_ACTOR_CLASS (unity_places_file_info_tile_parent_class)->pick ((ClutterActor*) UNITY_PLACES_TILE (self), color); +	if (CTK_IS_IMAGE (self->priv->icon)) { +	clutter_actor_paint ((ClutterActor*) self->priv->icon); +	clutter_actor_paint ((ClutterActor*) self->priv->leaf); +	clutter_actor_paint ((ClutterActor*) self->priv->folder_button); +	clutter_actor_paint ((ClutterActor*) self->priv->time); +	} +} + + +static void unity_places_file_info_tile_real_map (ClutterActor* base) { +	UnityPlacesFileInfoTile * self; +	self = (UnityPlacesFileInfoTile*) base; +	CLUTTER_ACTOR_CLASS (unity_places_file_info_tile_parent_class)->map ((ClutterActor*) UNITY_PLACES_TILE (self)); +	if (CTK_IS_IMAGE (self->priv->icon)) { +	clutter_actor_map ((ClutterActor*) self->priv->icon); +	clutter_actor_map ((ClutterActor*) self->priv->leaf); +	clutter_actor_map ((ClutterActor*) self->priv->folder_button); +	clutter_actor_map ((ClutterActor*) self->priv->time); +	} +} + + +static void unity_places_file_info_tile_real_unmap (ClutterActor* base) { +	UnityPlacesFileInfoTile * self; +	self = (UnityPlacesFileInfoTile*) base; +	if (CTK_IS_IMAGE (self->priv->icon)) { +	clutter_actor_unmap ((ClutterActor*) self->priv->icon); +	clutter_actor_unmap ((ClutterActor*) self->priv->leaf); +	clutter_actor_unmap ((ClutterActor*) self->priv->folder_button); +	clutter_actor_unmap ((ClutterActor*) self->priv->time); +	} +	CLUTTER_ACTOR_CLASS (unity_places_file_info_tile_parent_class)->unmap ((ClutterActor*) UNITY_PLACES_TILE (self)); +} + + +static GObject * unity_places_file_info_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { +	GObject * obj; +	GObjectClass * parent_class; +	UnityPlacesFileInfoTile * self; +	parent_class = G_OBJECT_CLASS (unity_places_file_info_tile_parent_class); +	obj = parent_class->constructor (type, n_construct_properties, construct_properties); +	self = UNITY_PLACES_FILE_INFO_TILE (obj); +	{ +	} +	return obj; +} + + +static void unity_places_file_info_tile_class_init (UnityPlacesFileInfoTileClass * klass) { +	unity_places_file_info_tile_parent_class = g_type_class_peek_parent (klass); +	g_type_class_add_private (klass, sizeof (UnityPlacesFileInfoTilePrivate)); +	CLUTTER_ACTOR_CLASS (klass)->get_preferred_width = unity_places_file_info_tile_real_get_preferred_width; +	UNITY_PLACES_TILE_CLASS (klass)->about_to_show = unity_places_file_info_tile_real_about_to_show; +	CTK_BUTTON_CLASS (klass)->clicked = unity_places_file_info_tile_real_clicked; +	CLUTTER_ACTOR_CLASS (klass)->allocate = unity_places_file_info_tile_real_allocate; +	CLUTTER_ACTOR_CLASS (klass)->get_preferred_height = unity_places_file_info_tile_real_get_preferred_height; +	CLUTTER_ACTOR_CLASS (klass)->paint = unity_places_file_info_tile_real_paint; +	CLUTTER_ACTOR_CLASS (klass)->pick = unity_places_file_info_tile_real_pick; +	CLUTTER_ACTOR_CLASS (klass)->map = unity_places_file_info_tile_real_map; +	CLUTTER_ACTOR_CLASS (klass)->unmap = unity_places_file_info_tile_real_unmap; +	G_OBJECT_CLASS (klass)->constructor = unity_places_file_info_tile_constructor; +	G_OBJECT_CLASS (klass)->finalize = unity_places_file_info_tile_finalize; +} + + +static void unity_places_file_info_tile_instance_init (UnityPlacesFileInfoTile * self) { +	self->priv = UNITY_PLACES_FILE_INFO_TILE_GET_PRIVATE (self); +	self->priv->shown = FALSE; +} + + +static void unity_places_file_info_tile_finalize (GObject* obj) { +	UnityPlacesFileInfoTile * self; +	self = UNITY_PLACES_FILE_INFO_TILE (obj); +	_g_object_unref0 (self->priv->icon); +	_g_object_unref0 (self->priv->leaf); +	_g_object_unref0 (self->priv->folder_button); +	_g_object_unref0 (self->priv->folder); +	_g_object_unref0 (self->priv->time); +	G_OBJECT_CLASS (unity_places_file_info_tile_parent_class)->finalize (obj); +} + + +GType unity_places_file_info_tile_get_type (void) { +	static volatile gsize unity_places_file_info_tile_type_id__volatile = 0; +	if (g_once_init_enter (&unity_places_file_info_tile_type_id__volatile)) { +	static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesFileInfoTileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_file_info_tile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesFileInfoTile), 0, (GInstanceInitFunc) unity_places_file_info_tile_instance_init, NULL }; +	GType unity_places_file_info_tile_type_id; +	unity_places_file_info_tile_type_id = g_type_register_static (UNITY_PLACES_TYPE_TILE, "UnityPlacesFileInfoTile", &g_define_type_info, 0); +	g_once_init_leave (&unity_places_file_info_tile_type_id__volatile, unity_places_file_info_tile_type_id); +	} +	return unity_places_file_info_tile_type_id__volatile; +} + + +UnityPlacesShowcaseTile* unity_places_showcase_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { +	UnityPlacesShowcaseTile * self; +	g_return_val_if_fail (iter != NULL, NULL); +	g_return_val_if_fail (uri != NULL, NULL); +	g_return_val_if_fail (display_name != NULL, NULL); +	self = (UnityPlacesShowcaseTile*) g_object_new (object_type, "orientation", CTK_ORIENTATION_VERTICAL, "iter", iter, "display-name", display_name, "icon-hint", icon_hint, "uri", uri, "mimetype", mimetype, "comment", comment, NULL); +	return self; +} + + +UnityPlacesShowcaseTile* unity_places_showcase_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { +	return unity_places_showcase_tile_construct (UNITY_PLACES_TYPE_SHOWCASE_TILE, iter, uri, icon_hint, mimetype, display_name, comment); +} + + +static gboolean _lambda46_ (UnityPlacesShowcaseTile* self) { +	gboolean result = FALSE; +	ctk_button_set_label ((CtkButton*) self, unity_places_tile_get_display_name ((UnityPlacesTile*) self)); +	unity_places_showcase_tile_set_icon (self); +	result = FALSE; +	return result; +} + + +static gboolean __lambda46__gsource_func (gpointer self) { +	gboolean result; +	result = _lambda46_ (self); +	return result; +} + + +static void unity_places_showcase_tile_real_about_to_show (UnityPlacesTile* base) { +	UnityPlacesShowcaseTile * self; +	self = (UnityPlacesShowcaseTile*) base; +	if (self->priv->shown) { +	return; +	} +	self->priv->shown = TRUE; +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda46__gsource_func, g_object_ref (self), g_object_unref); +} + + +static void unity_places_showcase_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth) { +	UnityPlacesShowcaseTile * self; +	self = (UnityPlacesShowcaseTile*) base; +	*mwidth = 160.0f; +	*nwidth = 160.0f; +} + + +static void unity_places_showcase_tile_real_clicked (CtkButton* base) { +	UnityPlacesShowcaseTile * self; +	self = (UnityPlacesShowcaseTile*) base; +	g_signal_emit_by_name ((UnityPlacesTile*) self, "activated", unity_places_tile_get_uri ((UnityPlacesTile*) self), unity_places_tile_get_mimetype ((UnityPlacesTile*) self)); +} + + +static void unity_places_showcase_tile_set_icon (UnityPlacesShowcaseTile* self) { +	UnityPixbufCache* cache; +	gboolean _tmp0_ = FALSE; +	g_return_if_fail (self != NULL); +	ctk_image_set_size (ctk_button_get_image ((CtkButton*) self), UNITY_PLACES_SHOWCASE_TILE_ICON_SIZE); +	cache = unity_pixbuf_cache_get_default (); +	if (unity_places_tile_get_icon_hint ((UnityPlacesTile*) self) != NULL) { +	_tmp0_ = _vala_strcmp0 (unity_places_tile_get_icon_hint ((UnityPlacesTile*) self), "") != 0; +	} else { +	_tmp0_ = FALSE; +	} +	if (_tmp0_) { +	unity_pixbuf_cache_set_image_from_gicon_string (cache, ctk_button_get_image ((CtkButton*) self), unity_places_tile_get_icon_hint ((UnityPlacesTile*) self), UNITY_PLACES_SHOWCASE_TILE_ICON_SIZE, NULL, NULL); +	} else { +	gboolean _tmp1_ = FALSE; +	if (unity_places_tile_get_mimetype ((UnityPlacesTile*) self) != NULL) { +	_tmp1_ = _vala_strcmp0 (unity_places_tile_get_mimetype ((UnityPlacesTile*) self), "") != 0; +	} else { +	_tmp1_ = FALSE; +	} +	if (_tmp1_) { +	GIcon* icon; +	icon = g_content_type_get_icon (unity_places_tile_get_mimetype ((UnityPlacesTile*) self)); +	unity_pixbuf_cache_set_image_from_gicon_string (cache, ctk_button_get_image ((CtkButton*) self), g_icon_to_string (icon), UNITY_PLACES_SHOWCASE_TILE_ICON_SIZE, NULL, NULL); +	_g_object_unref0 (icon); +	} else { +	unity_pixbuf_cache_set_image_from_icon_name (cache, ctk_button_get_image ((CtkButton*) self), UNITY_PLACES_TILE_DEFAULT_ICON, UNITY_PLACES_SHOWCASE_TILE_ICON_SIZE, NULL, NULL); +	} +	} +	_g_object_unref0 (cache); +} + + +static GObject * unity_places_showcase_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { +	GObject * obj; +	GObjectClass * parent_class; +	UnityPlacesShowcaseTile * self; +	parent_class = G_OBJECT_CLASS (unity_places_showcase_tile_parent_class); +	obj = parent_class->constructor (type, n_construct_properties, construct_properties); +	self = UNITY_PLACES_SHOWCASE_TILE (obj); +	{ +	CtkPadding _tmp0_ = {0}; +	CtkPadding _tmp1_; +	CtkText* text; +	ctk_actor_set_padding ((CtkActor*) self, (_tmp1_ = (_tmp0_.top = UNITY_PLACES_SHOWCASE_TILE_PADDING, _tmp0_.right = UNITY_PLACES_SHOWCASE_TILE_PADDING, _tmp0_.bottom = UNITY_PLACES_SHOWCASE_TILE_PADDING, _tmp0_.left = UNITY_PLACES_SHOWCASE_TILE_PADDING, _tmp0_), &_tmp1_)); +	text = ctk_button_get_text ((CtkButton*) self); +	clutter_text_set_ellipsize ((ClutterText*) text, PANGO_ELLIPSIZE_MIDDLE); +	} +	return obj; +} + + +static void unity_places_showcase_tile_class_init (UnityPlacesShowcaseTileClass * klass) { +	unity_places_showcase_tile_parent_class = g_type_class_peek_parent (klass); +	g_type_class_add_private (klass, sizeof (UnityPlacesShowcaseTilePrivate)); +	UNITY_PLACES_TILE_CLASS (klass)->about_to_show = unity_places_showcase_tile_real_about_to_show; +	CLUTTER_ACTOR_CLASS (klass)->get_preferred_width = unity_places_showcase_tile_real_get_preferred_width; +	CTK_BUTTON_CLASS (klass)->clicked = unity_places_showcase_tile_real_clicked; +	G_OBJECT_CLASS (klass)->constructor = unity_places_showcase_tile_constructor; +	G_OBJECT_CLASS (klass)->finalize = unity_places_showcase_tile_finalize; +} + + +static void unity_places_showcase_tile_instance_init (UnityPlacesShowcaseTile * self) { +	self->priv = UNITY_PLACES_SHOWCASE_TILE_GET_PRIVATE (self); +	self->priv->shown = FALSE; +} + + +static void unity_places_showcase_tile_finalize (GObject* obj) { +	UnityPlacesShowcaseTile * self; +	self = UNITY_PLACES_SHOWCASE_TILE (obj); +	G_OBJECT_CLASS (unity_places_showcase_tile_parent_class)->finalize (obj); +} + + +GType unity_places_showcase_tile_get_type (void) { +	static volatile gsize unity_places_showcase_tile_type_id__volatile = 0; +	if (g_once_init_enter (&unity_places_showcase_tile_type_id__volatile)) { +	static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesShowcaseTileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_showcase_tile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesShowcaseTile), 0, (GInstanceInitFunc) unity_places_showcase_tile_instance_init, NULL }; +	GType unity_places_showcase_tile_type_id; +	unity_places_showcase_tile_type_id = g_type_register_static (UNITY_PLACES_TYPE_TILE, "UnityPlacesShowcaseTile", &g_define_type_info, 0); +	g_once_init_leave (&unity_places_showcase_tile_type_id__volatile, unity_places_showcase_tile_type_id); +	} +	return unity_places_showcase_tile_type_id__volatile; +} + + +UnityPlacesDefaultTile* unity_places_default_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { +	UnityPlacesDefaultTile * self; +	g_return_val_if_fail (iter != NULL, NULL); +	g_return_val_if_fail (uri != NULL, NULL); +	g_return_val_if_fail (display_name != NULL, NULL); +	self = (UnityPlacesDefaultTile*) g_object_new (object_type, "orientation", CTK_ORIENTATION_VERTICAL, "iter", iter, "display-name", display_name, "icon-hint", icon_hint, "uri", uri, "mimetype", mimetype, "comment", comment, NULL); +	return self; +} + + +UnityPlacesDefaultTile* unity_places_default_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment) { +	return unity_places_default_tile_construct (UNITY_PLACES_TYPE_DEFAULT_TILE, iter, uri, icon_hint, mimetype, display_name, comment); +} + + +static gboolean _lambda47_ (UnityPlacesDefaultTile* self) { +	gboolean result = FALSE; +	ctk_button_set_label ((CtkButton*) self, unity_places_tile_get_display_name ((UnityPlacesTile*) self)); +	unity_places_default_tile_set_icon (self); +	result = FALSE; +	return result; +} + + +static gboolean __lambda47__gsource_func (gpointer self) { +	gboolean result; +	result = _lambda47_ (self); +	return result; +} + + +static void unity_places_default_tile_real_about_to_show (UnityPlacesTile* base) { +	UnityPlacesDefaultTile * self; +	self = (UnityPlacesDefaultTile*) base; +	if (self->priv->shown) { +	return; +	} +	self->priv->shown = TRUE; +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda47__gsource_func, g_object_ref (self), g_object_unref); +} + + +static void unity_places_default_tile_real_get_preferred_width (ClutterActor* base, float for_height, float* mwidth, float* nwidth) { +	UnityPlacesDefaultTile * self; +	self = (UnityPlacesDefaultTile*) base; +	*mwidth = 160.0f; +	*nwidth = 160.0f; +} + + +static void unity_places_default_tile_real_clicked (CtkButton* base) { +	UnityPlacesDefaultTile * self; +	self = (UnityPlacesDefaultTile*) base; +	g_signal_emit_by_name ((UnityPlacesTile*) self, "activated", unity_places_tile_get_uri ((UnityPlacesTile*) self), unity_places_tile_get_mimetype ((UnityPlacesTile*) self)); +} + + +static void unity_places_default_tile_set_icon (UnityPlacesDefaultTile* self) { +	UnityPixbufCache* cache; +	gboolean _tmp0_ = FALSE; +	g_return_if_fail (self != NULL); +	cache = unity_pixbuf_cache_get_default (); +	if (unity_places_tile_get_icon_hint ((UnityPlacesTile*) self) != NULL) { +	_tmp0_ = _vala_strcmp0 (unity_places_tile_get_icon_hint ((UnityPlacesTile*) self), "") != 0; +	} else { +	_tmp0_ = FALSE; +	} +	if (_tmp0_) { +	unity_pixbuf_cache_set_image_from_gicon_string (cache, ctk_button_get_image ((CtkButton*) self), unity_places_tile_get_icon_hint ((UnityPlacesTile*) self), UNITY_PLACES_DEFAULT_TILE_ICON_SIZE, NULL, NULL); +	} else { +	gboolean _tmp1_ = FALSE; +	if (unity_places_tile_get_mimetype ((UnityPlacesTile*) self) != NULL) { +	_tmp1_ = _vala_strcmp0 (unity_places_tile_get_mimetype ((UnityPlacesTile*) self), "") != 0; +	} else { +	_tmp1_ = FALSE; +	} +	if (_tmp1_) { +	GIcon* icon; +	icon = g_content_type_get_icon (unity_places_tile_get_mimetype ((UnityPlacesTile*) self)); +	unity_pixbuf_cache_set_image_from_gicon_string (cache, ctk_button_get_image ((CtkButton*) self), g_icon_to_string (icon), UNITY_PLACES_DEFAULT_TILE_ICON_SIZE, NULL, NULL); +	_g_object_unref0 (icon); +	} else { +	unity_pixbuf_cache_set_image_from_icon_name (cache, ctk_button_get_image ((CtkButton*) self), UNITY_PLACES_TILE_DEFAULT_ICON, UNITY_PLACES_DEFAULT_TILE_ICON_SIZE, NULL, NULL); +	} +	} +	_g_object_unref0 (cache); +} + + +static GObject * unity_places_default_tile_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { +	GObject * obj; +	GObjectClass * parent_class; +	UnityPlacesDefaultTile * self; +	parent_class = G_OBJECT_CLASS (unity_places_default_tile_parent_class); +	obj = parent_class->constructor (type, n_construct_properties, construct_properties); +	self = UNITY_PLACES_DEFAULT_TILE (obj); +	{ +	CtkPadding _tmp0_ = {0}; +	CtkPadding _tmp1_; +	CtkText* text; +	ctk_actor_set_padding ((CtkActor*) self, (_tmp1_ = (_tmp0_.top = UNITY_PLACES_DEFAULT_TILE_PADDING, _tmp0_.right = UNITY_PLACES_DEFAULT_TILE_PADDING, _tmp0_.bottom = UNITY_PLACES_DEFAULT_TILE_PADDING, _tmp0_.left = UNITY_PLACES_DEFAULT_TILE_PADDING, _tmp0_), &_tmp1_)); +	text = ctk_button_get_text ((CtkButton*) self); +	clutter_text_set_ellipsize ((ClutterText*) text, PANGO_ELLIPSIZE_MIDDLE); +	} +	return obj; +} + + +static void unity_places_default_tile_class_init (UnityPlacesDefaultTileClass * klass) { +	unity_places_default_tile_parent_class = g_type_class_peek_parent (klass); +	g_type_class_add_private (klass, sizeof (UnityPlacesDefaultTilePrivate)); +	UNITY_PLACES_TILE_CLASS (klass)->about_to_show = unity_places_default_tile_real_about_to_show; +	CLUTTER_ACTOR_CLASS (klass)->get_preferred_width = unity_places_default_tile_real_get_preferred_width; +	CTK_BUTTON_CLASS (klass)->clicked = unity_places_default_tile_real_clicked; +	G_OBJECT_CLASS (klass)->constructor = unity_places_default_tile_constructor; +	G_OBJECT_CLASS (klass)->finalize = unity_places_default_tile_finalize; +} + + +static void unity_places_default_tile_instance_init (UnityPlacesDefaultTile * self) { +	self->priv = UNITY_PLACES_DEFAULT_TILE_GET_PRIVATE (self); +	self->priv->shown = FALSE; +} + + +static void unity_places_default_tile_finalize (GObject* obj) { +	UnityPlacesDefaultTile * self; +	self = UNITY_PLACES_DEFAULT_TILE (obj); +	G_OBJECT_CLASS (unity_places_default_tile_parent_class)->finalize (obj); +} + + +GType unity_places_default_tile_get_type (void) { +	static volatile gsize unity_places_default_tile_type_id__volatile = 0; +	if (g_once_init_enter (&unity_places_default_tile_type_id__volatile)) { +	static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesDefaultTileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_default_tile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesDefaultTile), 0, (GInstanceInitFunc) unity_places_default_tile_instance_init, NULL }; +	GType unity_places_default_tile_type_id; +	unity_places_default_tile_type_id = g_type_register_static (UNITY_PLACES_TYPE_TILE, "UnityPlacesDefaultTile", &g_define_type_info, 0); +	g_once_init_leave (&unity_places_default_tile_type_id__volatile, unity_places_default_tile_type_id); +	} +	return unity_places_default_tile_type_id__volatile; +} + + +static int _vala_strcmp0 (const char * str1, const char * str2) { +	if (str1 == NULL) { +	return -(str1 != str2); +	} +	if (str2 == NULL) { +	return str1 != str2; +	} +	return strcmp (str1, str2); +} + + + +static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { +	typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2); +	register GMarshalFunc_VOID__STRING_STRING callback; +	register GCClosure * cc; +	register gpointer data1, data2; +	cc = (GCClosure *) closure; +	g_return_if_fail (n_param_values == 3); +	if (G_CCLOSURE_SWAP_DATA (closure)) { +	data1 = closure->data; +	data2 = param_values->data[0].v_pointer; +	} else { +	data1 = param_values->data[0].v_pointer; +	data2 = closure->data; +	} +	callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); +	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2); +} + + + diff --git a/unity-private/places/places-default-renderer-tiles.vala b/unity-private/places/places-default-renderer-tiles.vala new file mode 100644 index 000000000..1f4279678 --- /dev/null +++ b/unity-private/places/places-default-renderer-tiles.vala @@ -0,0 +1,485 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authored by Neil Jagdish Patel <neil.patel@canonical.com> + * + */ + +namespace Unity.Places +{ + public abstract class Tile : Button + { + static const string DEFAULT_ICON = "text-x-preview"; + + public unowned Dee.ModelIter iter { get; construct; } + + public string display_name { get; construct; } + public string? icon_hint { get; construct; } + public string uri { get; construct; } + public string? mimetype { get; construct; } + public string? comment { get; construct; } + + public signal void activated (string uri, string mimetype); + + public abstract void about_to_show (); + } + + public class FileInfoTile : Tile + { + static const int ICON_WIDTH = 56; + static const int ICON_HEIGHT = 48; + static const float LINE_PADDING = 0.0f; + static const float HPADDING = 4.0f; + static const float VPADDING = 4.0f; + + private bool shown = false; + + private Ctk.Image icon; + private Ctk.Text leaf; + private Button folder_button; + private Ctk.Text folder; + private Ctk.Text time; + + public FileInfoTile (Dee.ModelIter iter, + string uri, + string? icon_hint, + string? mimetype, + string display_name, + string? comment) + { + Object (orientation:Ctk.Orientation.HORIZONTAL, + iter:iter, + display_name:display_name, + icon_hint:icon_hint, + uri:uri, + mimetype:mimetype, + comment:comment); + } + + construct + { + } + + private override void get_preferred_width (float for_height, + out float mwidth, + out float nwidth) + { + mwidth = 210.0f; + nwidth = 210.0f; + } + + public override void about_to_show () + { + if (shown) + return; + shown = true; +  + icon = new Ctk.Image (ICON_HEIGHT); + icon.set_parent (this); + icon.show (); +  + leaf = new Ctk.Text (" "); + leaf.ellipsize = Pango.EllipsizeMode.MIDDLE; + leaf.set_parent (this); + leaf.show (); + + folder_button = new Button (); + folder_button.prelight_state = PrelightState.UNDERLINE; + folder_button.set_parent (this); + folder_button.show (); + folder_button.padding = { 1.0f, 0.0f, 0.0f, 0.0f }; + + folder = new Ctk.Text (""); + folder.ellipsize = Pango.EllipsizeMode.MIDDLE; + folder_button.add_actor (folder); + folder.color = { 255, 255, 255, 100 }; + folder.show (); + + time = new Ctk.Text (uri == comment ? "" : comment); + time.ellipsize = Pango.EllipsizeMode.MIDDLE; + time.set_parent (this); + time.show (); + + notify["state"].connect (() => { + + if (state == Ctk.ActorState.STATE_NORMAL || + state == Ctk.ActorState.STATE_PRELIGHT) + { + leaf.color = { 255, 255, 255, 255 }; + folder.color = { 255, 255, 255, 100 }; + time.color = { 255, 255, 255, 255 }; + } + else + { + leaf.color = { 50, 50, 50, 200 }; + folder.color = { 50, 50, 50, 100 }; + time.color = { 50, 50, 50, 200 }; + } + }); + + Timeout.add (0, () => { + + leaf.text = display_name; + + /* Set the parent directory */ + var file = File.new_for_uri (uri); + if (file is File) + { + var parent = file.get_parent (); + if (parent is File)  + { + folder.text = parent.get_basename (); + folder_button.clicked.connect (() => { + try { + activated (parent.get_uri (), "inode/directory"); + + } catch (Error e) { + warning (@"Unable to launch parent folder: $(e.message)"); + } + }); + } + else + folder.text = ""; + } + else + folder.text = ""; + + set_icon (); + return false; + }); + + queue_relayout (); + } + + private override void clicked () + { + activated (uri, mimetype); + } +  + private void set_icon () + { + var cache = PixbufCache.get_default (); + + if (icon_hint != null && icon_hint != "") + { + cache.set_image_from_gicon_string (icon, + icon_hint, + ICON_HEIGHT); + } + else if (mimetype != null && mimetype != "") + { + var icon = GLib.g_content_type_get_icon (mimetype); + cache.set_image_from_gicon_string (this.icon, + icon.to_string(), + ICON_HEIGHT); + } + else + { + cache.set_image_from_icon_name (icon, + Tile.DEFAULT_ICON, + ICON_HEIGHT); + } + } + + private override void allocate (Clutter.ActorBox box, + Clutter.AllocationFlags flags) + { + base.allocate (box, flags); + + if (icon is Ctk.Image == false) + return; + + var width = box.x2 - box.x1; + var height = box.y2 - box.y1; + + Clutter.ActorBox child_box = Clutter.ActorBox (); + + child_box.x1 = 0.0f; + child_box.x2 = ICON_WIDTH; + child_box.y1 = (height/2.0f) - (ICON_HEIGHT/2.0f); + child_box.y2 = child_box.y1 + ICON_HEIGHT; + icon.allocate (child_box, flags); + + float mh; + leaf.get_preferred_height (width - ICON_WIDTH, out mh, null); + + var text_block = (mh * 3.0f) + (LINE_PADDING * 2.0f); + var y = (height/2.0f) - (text_block/2.0f); + var icon_text_pad = 12.0f; +  + child_box.x1 = ICON_WIDTH + icon_text_pad; + child_box.x2 = width; + child_box.y1 = y; + child_box.y2 = y + mh; + leaf.allocate (child_box, flags); + + float mw; + folder_button.get_preferred_width (mh, null, out mw); + mw = Math.fminf (mw, box.x2 - ICON_WIDTH - icon_text_pad); + y+= LINE_PADDING + mh; + child_box.x2 = child_box.x1 + mw; + child_box.y1 = y; + child_box.y2 = y + mh; + folder_button.allocate (child_box, flags); + + time.get_preferred_width (mh, null, out mw); + mw = Math.fminf (mw, box.x2 - ICON_WIDTH - icon_text_pad); + y+= LINE_PADDING + mh; + child_box.x2 = child_box.x1 + mw; + child_box.y1 = y; + child_box.y2 = y + mh; + time.allocate (child_box, flags); + } + + private override void get_preferred_height (float for_width, + out float mheight, + out float nheight) + { + if (icon is Ctk.Image) + { + float mh; + leaf.get_preferred_height (for_width, out mh, null); + + mheight = Math.fmaxf (ICON_HEIGHT + (VPADDING*2.0f), + (mh*3.0f) + (LINE_PADDING*2.0f) + (VPADDING*2.0f)); + nheight = mheight; + + } + else + { + mheight = ICON_HEIGHT + (VPADDING*2.0f); + nheight = mheight; + } + } + + private override void paint () + { + base.paint (); + + if (icon is Ctk.Image) + { + icon.paint (); + leaf.paint (); + folder_button.paint (); + time.paint (); + } + } + + private override void pick (Clutter.Color color) + { + base.pick (color); + + if (icon is Ctk.Image) + { + icon.paint (); + leaf.paint (); + folder_button.paint (); + time.paint (); + } + } + + private override void map () + { + base.map (); + if (icon is Ctk.Image) + { + icon.map (); + leaf.map (); + folder_button.map (); + time.map (); + } + } + + private override void unmap () + { + if (icon is Ctk.Image) + { + icon.unmap (); + leaf.unmap (); + folder_button.unmap (); + time.unmap (); + } + base.unmap (); + } + } + + public class ShowcaseTile : Tile + { + static const int ICON_SIZE = 64; + static const float PADDING = 4.0f; + + private bool shown = false; + + public ShowcaseTile (Dee.ModelIter iter, + string uri, + string? icon_hint, + string? mimetype, + string display_name, + string? comment) + { + Object (orientation:Ctk.Orientation.VERTICAL, + iter:iter, + display_name:display_name, + icon_hint:icon_hint, + uri:uri, + mimetype:mimetype, + comment:comment); + } + + construct + { + padding = { PADDING, PADDING, PADDING, PADDING }; + + unowned Ctk.Text text = get_text (); + text.ellipsize = Pango.EllipsizeMode.MIDDLE; + } + + public override void about_to_show () + { + if (shown) + return; + shown = true; + + Timeout.add (0, () => { + set_label (display_name); + set_icon (); + return false; + }); + } + + private override void get_preferred_width (float for_height, + out float mwidth, + out float nwidth) + { + mwidth = 160.0f; + nwidth = 160.0f; + } + + private override void clicked () + { + activated (uri, mimetype); + } +  + private void set_icon () + { + + get_image ().size = ICON_SIZE; + var cache = PixbufCache.get_default (); + + if (icon_hint != null && icon_hint != "") + { + cache.set_image_from_gicon_string (get_image (), + icon_hint, + ICON_SIZE); + } + else if (mimetype != null && mimetype != "") + { + var icon = GLib.g_content_type_get_icon (mimetype); + cache.set_image_from_gicon_string (get_image (), + icon.to_string(), + ICON_SIZE); + } + else + { + cache.set_image_from_icon_name (get_image (), + Tile.DEFAULT_ICON, + ICON_SIZE); + } + } + + } + + public class DefaultTile : Tile + { + static const int ICON_SIZE = 48; + static const float PADDING = 4.0f; + + private bool shown = false; + + public DefaultTile (Dee.ModelIter iter, + string uri, + string? icon_hint, + string? mimetype, + string display_name, + string? comment) + { + Object (orientation:Ctk.Orientation.VERTICAL, + iter:iter, + display_name:display_name, + icon_hint:icon_hint, + uri:uri, + mimetype:mimetype, + comment:comment); + } + + construct + { + padding = { PADDING, PADDING, PADDING, PADDING }; + unowned Ctk.Text text = get_text (); + text.ellipsize = Pango.EllipsizeMode.MIDDLE; + } + + public override void about_to_show () + { + if (shown) + return; + shown = true; + + Timeout.add (0, () => { + set_label (display_name); + set_icon (); + return false; + }); + } + + private override void get_preferred_width (float for_height, + out float mwidth, + out float nwidth) + { + mwidth = 160.0f; + nwidth = 160.0f; + } + + private override void clicked () + { + activated (uri, mimetype); + } +  + private void set_icon () + { + var cache = PixbufCache.get_default (); + + if (icon_hint != null && icon_hint != "") + { + cache.set_image_from_gicon_string (get_image (), + icon_hint, + ICON_SIZE); + } + else if (mimetype != null && mimetype != "") + { + var icon = GLib.g_content_type_get_icon (mimetype); + cache.set_image_from_gicon_string (get_image (), + icon.to_string(), + ICON_SIZE); + } + else + { + cache.set_image_from_icon_name (get_image (), + Tile.DEFAULT_ICON, + ICON_SIZE); + } + } + } +} diff --git a/unity-private/places/places-default-renderer.c b/unity-private/places/places-default-renderer.c index acff75836..231dad053 100644 --- a/unity-private/places/places-default-renderer.c +++ b/unity-private/places/places-default-renderer.c @@ -25,12 +25,12 @@  #include <unity.h>  #include <clutk/clutk.h>  #include <dee.h> +#include <stdlib.h> +#include <string.h>  #include <float.h>  #include <math.h>  #include <cairo.h>  #include <gee.h> -#include <stdlib.h> -#include <string.h>  #include <clutter/clutter.h> @@ -65,6 +65,7 @@ typedef struct _UnityPlacesEmptySearchGroupClass UnityPlacesEmptySearchGroupClas  typedef struct _UnityPlacesEmptySectionGroup UnityPlacesEmptySectionGroup;  typedef struct _UnityPlacesEmptySectionGroupClass UnityPlacesEmptySectionGroupClass;  #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL))  #define UNITY_PLACES_TYPE_DEFAULT_RENDERER_GROUP (unity_places_default_renderer_group_get_type ())  #define UNITY_PLACES_DEFAULT_RENDERER_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_DEFAULT_RENDERER_GROUP, UnityPlacesDefaultRendererGroup)) @@ -75,11 +76,10 @@ typedef struct _UnityPlacesEmptySectionGroupClass UnityPlacesEmptySectionGroupCl  typedef struct _UnityPlacesDefaultRendererGroup UnityPlacesDefaultRendererGroup;  typedef struct _UnityPlacesDefaultRendererGroupClass UnityPlacesDefaultRendererGroupClass; -#define _g_free0(var) (var = (g_free (var), NULL))  #define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_object_unref (var), NULL)))  typedef struct _UnityPlacesEmptySearchGroupPrivate UnityPlacesEmptySearchGroupPrivate;  #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL))) -typedef struct _Block1Data Block1Data; +typedef struct _Block2Data Block2Data;  typedef struct _UnityPlacesEmptySectionGroupPrivate UnityPlacesEmptySectionGroupPrivate;  #define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL))) @@ -101,6 +101,9 @@ struct _UnityPlacesDefaultRendererPrivate { 	CtkVBox* box; 	DeeModel* groups_model; 	DeeModel* results_model; +	char** expanded; +	gint expanded_length1; +	gint _expanded_size_;  };  struct _UnityPlacesEmptySearchGroup { @@ -119,7 +122,7 @@ struct _UnityPlacesEmptySearchGroupPrivate { 	CtkVBox* box;  }; -struct _Block1Data { +struct _Block2Data { 	int _ref_count_; 	UnityPlacesEmptySearchGroup * self; 	char* uri; @@ -157,6 +160,7 @@ GType unity_places_empty_section_group_get_type (void) G_GNUC_CONST;  enum { 	UNITY_PLACES_DEFAULT_RENDERER_DUMMY_PROPERTY  }; +#define UNITY_PLACES_DEFAULT_RENDERER_TOP_PADDING 22.0f  #define UNITY_PLACES_DEFAULT_RENDERER_PADDING 12.0f  #define UNITY_PLACES_DEFAULT_RENDERER_SPACING 0  UnityPlacesDefaultRenderer* unity_places_default_renderer_new (void); @@ -174,16 +178,17 @@ gboolean unity_places_empty_search_group_get_active (UnityPlacesEmptySearchGroup  gboolean unity_places_empty_section_group_get_active (UnityPlacesEmptySectionGroup* self);  UnityPlacesEmptySearchGroup* unity_places_empty_search_group_new (guint group_id, DeeModel* results);  UnityPlacesEmptySearchGroup* unity_places_empty_search_group_construct (GType object_type, guint group_id, DeeModel* results); -static void _lambda56_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self); -static void __lambda56__unity_places_empty_search_group_activated (UnityPlacesEmptySearchGroup* _sender, const char* uri, const char* mimetype, gpointer self); +static void _lambda64_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self); +static void __lambda64__unity_places_empty_search_group_activated (UnityPlacesEmptySearchGroup* _sender, const char* uri, const char* mimetype, gpointer self);  static void _unity_places_default_renderer_update_views_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  UnityPlacesEmptySectionGroup* unity_places_empty_section_group_new (guint group_id, DeeModel* results);  UnityPlacesEmptySectionGroup* unity_places_empty_section_group_construct (GType object_type, guint group_id, DeeModel* results);  UnityPlacesDefaultRendererGroup* unity_places_default_renderer_group_new (guint group_id, const char* group_renderer, const char* display_name, const char* icon_hint, DeeModel* results);  UnityPlacesDefaultRendererGroup* unity_places_default_renderer_group_construct (GType object_type, guint group_id, const char* group_renderer, const char* display_name, const char* icon_hint, DeeModel* results);  GType unity_places_default_renderer_group_get_type (void) G_GNUC_CONST; -static void _lambda57_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self); -static void __lambda57__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self); +static void _lambda65_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self); +static void __lambda65__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self); +void unity_places_default_renderer_group_set_always_expanded (UnityPlacesDefaultRendererGroup* self, gboolean value);  static void _g_list_free_g_object_unref (GList* self);  static void _unity_places_default_renderer_trough_paint_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self);  static void _unity_places_default_renderer_slider_paint_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self); @@ -199,10 +204,10 @@ enum {  static void unity_places_empty_search_group_on_result_added (UnityPlacesEmptySearchGroup* self, DeeModelIter* iter);  static gboolean unity_places_empty_search_group_interesting (UnityPlacesEmptySearchGroup* self, DeeModelIter* iter);  DeeModel* unity_places_empty_search_group_get_results (UnityPlacesEmptySearchGroup* self); -static void _lambda55_ (Block1Data* _data1_); -static void __lambda55__ctk_button_clicked (CtkButton* _sender, gpointer self); -static Block1Data* block1_data_ref (Block1Data* _data1_); -static void block1_data_unref (Block1Data* _data1_); +static void _lambda63_ (Block2Data* _data2_); +static void __lambda63__ctk_button_clicked (CtkButton* _sender, gpointer self); +static Block2Data* block2_data_ref (Block2Data* _data2_); +static void block2_data_unref (Block2Data* _data2_);  void unity_places_empty_search_group_set_active (UnityPlacesEmptySearchGroup* self, gboolean value);  static void unity_places_empty_search_group_on_result_removed (UnityPlacesEmptySearchGroup* self, DeeModelIter* iter);  guint unity_places_empty_search_group_get_group_id (UnityPlacesEmptySearchGroup* self); @@ -239,6 +244,9 @@ static GObject * unity_places_empty_section_group_constructor (GType type, guint  static void unity_places_empty_section_group_finalize (GObject* obj);  static void unity_places_empty_section_group_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);  static void unity_places_empty_section_group_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); +static gint _vala_array_length (gpointer array);  static int _vala_strcmp0 (const char * str1, const char * str2); @@ -345,6 +353,8 @@ static void unity_places_default_renderer_real_set_models (UnityPlaceRenderer* b 	UnityPlacesDefaultRenderer * self; 	DeeModel* _tmp0_; 	DeeModel* _tmp1_; +	char* expandable; +	gboolean _tmp2_ = FALSE; 	DeeModelIter* iter; 	self = (UnityPlacesDefaultRenderer*) base; 	g_return_if_fail (groups != NULL); @@ -352,6 +362,17 @@ static void unity_places_default_renderer_real_set_models (UnityPlaceRenderer* b 	g_return_if_fail (hints != NULL); 	self->priv->groups_model = (_tmp0_ = _g_object_ref0 (groups), _g_object_unref0 (self->priv->groups_model), _tmp0_); 	self->priv->results_model = (_tmp1_ = _g_object_ref0 (results), _g_object_unref0 (self->priv->results_model), _tmp1_); +	expandable = (char*) gee_abstract_map_get ((GeeAbstractMap*) hints, "ExpandedGroups"); +	if (expandable != NULL) { +	_tmp2_ = _vala_strcmp0 (expandable, "") != 0; +	} else { +	_tmp2_ = FALSE; +	} +	if (_tmp2_) { +	char** _tmp3_; +	char** _tmp4_; +	self->priv->expanded = (_tmp4_ = _tmp3_ = g_strsplit (expandable, " ", 0), self->priv->expanded = (_vala_array_free (self->priv->expanded, self->priv->expanded_length1, (GDestroyNotify) g_free), NULL), self->priv->expanded_length1 = _vala_array_length (_tmp3_), self->priv->_expanded_size_ = self->priv->expanded_length1, _tmp4_); +	} 	iter = dee_model_get_first_iter (groups); 	while (TRUE) { 	if (!(!dee_model_is_last (groups, iter))) { @@ -362,6 +383,7 @@ static void unity_places_default_renderer_real_set_models (UnityPlaceRenderer* b 	} 	g_signal_connect_object (self->priv->groups_model, "row-added", (GCallback) _unity_places_default_renderer_on_group_added_dee_model_row_added, self, 0); 	g_signal_connect_object (self->priv->groups_model, "row-removed", (GCallback) _unity_places_default_renderer_on_group_removed_dee_model_row_removed, self, 0); +	_g_free0 (expandable);  } @@ -390,15 +412,15 @@ static void unity_places_default_renderer_update_views (UnityPlacesDefaultRender  } -static void _lambda56_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self) { +static void _lambda64_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self) { 	g_return_if_fail (u != NULL); 	g_return_if_fail (m != NULL); 	g_signal_emit_by_name ((UnityPlaceRenderer*) self, "activated", u, m);  } -static void __lambda56__unity_places_empty_search_group_activated (UnityPlacesEmptySearchGroup* _sender, const char* uri, const char* mimetype, gpointer self) { -	_lambda56_ (uri, mimetype, self); +static void __lambda64__unity_places_empty_search_group_activated (UnityPlacesEmptySearchGroup* _sender, const char* uri, const char* mimetype, gpointer self) { +	_lambda64_ (uri, mimetype, self);  } @@ -407,15 +429,15 @@ static void _unity_places_default_renderer_update_views_g_object_notify (GObject  } -static void _lambda57_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self) { +static void _lambda65_ (const char* u, const char* m, UnityPlacesDefaultRenderer* self) { 	g_return_if_fail (u != NULL); 	g_return_if_fail (m != NULL); 	g_signal_emit_by_name ((UnityPlaceRenderer*) self, "activated", u, m);  } -static void __lambda57__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self) { -	_lambda57_ (uri, mimetype, self); +static void __lambda65__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self) { +	_lambda65_ (uri, mimetype, self);  } @@ -430,7 +452,7 @@ static void unity_places_default_renderer_on_group_added (UnityPlacesDefaultRend 	self->priv->search_empty = (_tmp0_ = g_object_ref_sink (unity_places_empty_search_group_new ((guint) dee_model_get_position (model, iter), self->priv->results_model)), _g_object_unref0 (self->priv->search_empty), _tmp0_); 	clutter_actor_set_opacity ((ClutterActor*) self->priv->search_empty, (guint8) 0); 	clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->search_empty); -	g_signal_connect_object (self->priv->search_empty, "activated", (GCallback) __lambda56__unity_places_empty_search_group_activated, self, 0); +	g_signal_connect_object (self->priv->search_empty, "activated", (GCallback) __lambda64__unity_places_empty_search_group_activated, self, 0); 	g_signal_connect_object ((GObject*) self->priv->search_empty, "notify::active", (GCallback) _unity_places_default_renderer_update_views_g_object_notify, self, 0); 	} else { 	if (_vala_strcmp0 (renderer, "UnityEmptySectionRenderer") == 0) { @@ -442,9 +464,26 @@ static void unity_places_default_renderer_on_group_added (UnityPlacesDefaultRend 	} else { 	UnityPlacesDefaultRendererGroup* group; 	group = g_object_ref_sink (unity_places_default_renderer_group_new ((guint) dee_model_get_position (model, iter), dee_model_get_string (model, iter, (guint) 0), dee_model_get_string (model, iter, (guint) 1), dee_model_get_string (model, iter, (guint) 2), self->priv->results_model)); -	g_signal_connect_object (group, "activated", (GCallback) __lambda57__unity_places_default_renderer_group_activated, self, 0); +	g_signal_connect_object (group, "activated", (GCallback) __lambda65__unity_places_default_renderer_group_activated, self, 0); 	g_object_set_data_full ((GObject*) group, "model-iter", iter, NULL); 	ctk_box_pack ((CtkBox*) self->priv->box, (ClutterActor*) group, FALSE, TRUE); +	{ +	char** id_collection; +	int id_collection_length1; +	int id_it; +	id_collection = self->priv->expanded; +	id_collection_length1 = self->priv->expanded_length1; +	for (id_it = 0; id_it < self->priv->expanded_length1; id_it = id_it + 1) { +	char* id; +	id = g_strdup (id_collection[id_it]); +	{ +	if (dee_model_get_position (model, iter) == atoi (id)) { +	unity_places_default_renderer_group_set_always_expanded (group, TRUE); +	} +	_g_free0 (id); +	} +	} +	} 	_g_object_unref0 (group); 	} 	} @@ -511,9 +550,7 @@ static GObject * unity_places_default_renderer_constructor (GType type, guint n_ 	UnityCairoCanvas* _tmp3_; 	CtkScrollView* _tmp4_; 	CtkVBox* _tmp5_; -	CtkPadding _tmp6_ = {0}; -	CtkPadding _tmp7_; -	ctk_actor_set_padding ((CtkActor*) self, (_tmp1_ = (_tmp0_.top = 0.0f, _tmp0_.right = 0.0f, _tmp0_.bottom = 0.0f, _tmp0_.left = 0.0f, _tmp0_), &_tmp1_)); +	ctk_actor_set_padding ((CtkActor*) self, (_tmp1_ = (_tmp0_.top = UNITY_PLACES_DEFAULT_RENDERER_PADDING, _tmp0_.right = 0.0f, _tmp0_.bottom = 0.0f, _tmp0_.left = 0.0f, _tmp0_), &_tmp1_)); 	self->priv->trough = (_tmp2_ = g_object_ref_sink (unity_cairo_canvas_new (_unity_places_default_renderer_trough_paint_unity_cairo_canvas_cairo_canvas_paint, self)), _g_object_unref0 (self->priv->trough), _tmp2_); 	self->priv->slider = (_tmp3_ = g_object_ref_sink (unity_cairo_canvas_new (_unity_places_default_renderer_slider_paint_unity_cairo_canvas_cairo_canvas_paint, self)), _g_object_unref0 (self->priv->slider), _tmp3_); 	self->priv->scroll = (_tmp4_ = g_object_ref_sink ((CtkScrollView*) ctk_scroll_view_new ()), _g_object_unref0 (self->priv->scroll), _tmp4_); @@ -523,7 +560,6 @@ static GObject * unity_places_default_renderer_constructor (GType type, guint n_ 	clutter_actor_show ((ClutterActor*) self->priv->trough); 	clutter_actor_show ((ClutterActor*) self->priv->slider); 	self->priv->box = (_tmp5_ = g_object_ref_sink ((CtkVBox*) ctk_vbox_new ((guint) UNITY_PLACES_DEFAULT_RENDERER_SPACING)), _g_object_unref0 (self->priv->box), _tmp5_); -	ctk_actor_set_padding ((CtkActor*) self->priv->box, (_tmp7_ = (_tmp6_.top = 0.0f, _tmp6_.right = UNITY_PLACES_DEFAULT_RENDERER_PADDING, _tmp6_.bottom = 0.0f, _tmp6_.left = UNITY_PLACES_DEFAULT_RENDERER_PADDING, _tmp6_), &_tmp7_)); 	ctk_box_set_homogeneous ((CtkBox*) self->priv->box, FALSE); 	clutter_container_add_actor ((ClutterContainer*) self->priv->scroll, (ClutterActor*) self->priv->box); 	clutter_actor_show ((ClutterActor*) self->priv->box); @@ -548,6 +584,7 @@ static void unity_places_default_renderer_unity_place_renderer_interface_init (U  static void unity_places_default_renderer_instance_init (UnityPlacesDefaultRenderer * self) { 	self->priv = UNITY_PLACES_DEFAULT_RENDERER_GET_PRIVATE (self); +	self->priv->expanded = NULL;  } @@ -562,6 +599,7 @@ static void unity_places_default_renderer_finalize (GObject* obj) { 	_g_object_unref0 (self->priv->box); 	_g_object_unref0 (self->priv->groups_model); 	_g_object_unref0 (self->priv->results_model); +	self->priv->expanded = (_vala_array_free (self->priv->expanded, self->priv->expanded_length1, (GDestroyNotify) g_free), NULL); 	G_OBJECT_CLASS (unity_places_default_renderer_parent_class)->finalize (obj);  } @@ -593,30 +631,30 @@ UnityPlacesEmptySearchGroup* unity_places_empty_search_group_new (guint group_id  } -static void _lambda55_ (Block1Data* _data1_) { +static void _lambda63_ (Block2Data* _data2_) { 	UnityPlacesEmptySearchGroup * self; -	self = _data1_->self; -	g_signal_emit_by_name (self, "activated", _data1_->uri, _data1_->mimetype); +	self = _data2_->self; +	g_signal_emit_by_name (self, "activated", _data2_->uri, _data2_->mimetype);  } -static void __lambda55__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda55_ (self); +static void __lambda63__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda63_ (self);  } -static Block1Data* block1_data_ref (Block1Data* _data1_) { -	g_atomic_int_inc (&_data1_->_ref_count_); -	return _data1_; +static Block2Data* block2_data_ref (Block2Data* _data2_) { +	g_atomic_int_inc (&_data2_->_ref_count_); +	return _data2_;  } -static void block1_data_unref (Block1Data* _data1_) { -	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { -	_g_object_unref0 (_data1_->self); -	_g_free0 (_data1_->mimetype); -	_g_free0 (_data1_->uri); -	g_slice_free (Block1Data, _data1_); +static void block2_data_unref (Block2Data* _data2_) { +	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { +	_g_object_unref0 (_data2_->self); +	_g_free0 (_data2_->mimetype); +	_g_free0 (_data2_->uri); +	g_slice_free (Block2Data, _data2_); 	}  } @@ -629,8 +667,9 @@ static void unity_places_empty_search_group_on_result_added (UnityPlacesEmptySea 	CtkText* text; 	char* _tmp2_; 	char* _tmp3_; -	GList* _tmp4_; -	gboolean _tmp5_; +	char* _tmp4_; +	GList* _tmp5_; +	gboolean _tmp6_; 	g_return_if_fail (self != NULL); 	g_return_if_fail (iter != NULL); 	if (!unity_places_empty_search_group_interesting (self, iter)) { @@ -640,24 +679,25 @@ static void unity_places_empty_search_group_on_result_added (UnityPlacesEmptySea 	button = g_object_ref_sink ((CtkButton*) ctk_button_new (CTK_ORIENTATION_HORIZONTAL)); 	ctk_actor_set_padding ((CtkActor*) button, (_tmp1_ = (_tmp0_.top = 12.0f, _tmp0_.right = 12.0f, _tmp0_.bottom = 12.0f, _tmp0_.left = 12.0f, _tmp0_), &_tmp1_)); 	text = g_object_ref_sink ((CtkText*) ctk_text_new ("")); -	clutter_text_set_markup ((ClutterText*) text, _tmp3_ = g_strconcat (_tmp2_ = g_strconcat ("<big>", mes, NULL), "</big>", NULL)); +	clutter_text_set_markup ((ClutterText*) text, _tmp4_ = g_strconcat (_tmp3_ = g_strconcat ("<big>", _tmp2_ = g_markup_escape_text (mes, -1), NULL), "</big>", NULL)); +	_g_free0 (_tmp4_); 	_g_free0 (_tmp3_); 	_g_free0 (_tmp2_); 	clutter_container_add_actor ((ClutterContainer*) button, (ClutterActor*) text); 	ctk_box_pack ((CtkBox*) self->priv->box, (ClutterActor*) button, FALSE, FALSE); -	if ((_tmp5_ = g_list_length (_tmp4_ = clutter_container_get_children ((ClutterContainer*) self->priv->box)) >= 2, _g_list_free0 (_tmp4_), _tmp5_)) { -	Block1Data* _data1_; +	if ((_tmp6_ = g_list_length (_tmp5_ = clutter_container_get_children ((ClutterContainer*) self->priv->box)) >= 2, _g_list_free0 (_tmp5_), _tmp6_)) { +	Block2Data* _data2_; 	UnityStripeTexture* bg; -	_data1_ = g_slice_new0 (Block1Data); -	_data1_->_ref_count_ = 1; -	_data1_->self = g_object_ref (self); +	_data2_ = g_slice_new0 (Block2Data); +	_data2_->_ref_count_ = 1; +	_data2_->self = g_object_ref (self); 	bg = g_object_ref_sink (unity_stripe_texture_new (NULL, NULL)); 	ctk_actor_set_background ((CtkActor*) button, (ClutterActor*) bg); -	_data1_->uri = g_strdup (dee_model_get_string (self->priv->_results, iter, (guint) 0)); -	_data1_->mimetype = g_strdup (dee_model_get_string (self->priv->_results, iter, (guint) 3)); -	g_signal_connect_data (button, "clicked", (GCallback) __lambda55__ctk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); +	_data2_->uri = g_strdup (dee_model_get_string (self->priv->_results, iter, (guint) 0)); +	_data2_->mimetype = g_strdup (dee_model_get_string (self->priv->_results, iter, (guint) 3)); +	g_signal_connect_data (button, "clicked", (GCallback) __lambda63__ctk_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); 	_g_object_unref0 (bg); -	block1_data_unref (_data1_); +	block2_data_unref (_data2_); 	} 	unity_places_empty_search_group_set_active (self, TRUE); 	_g_object_unref0 (text); @@ -896,13 +936,15 @@ static void unity_places_empty_section_group_on_result_added (UnityPlacesEmptySe 	char* mes; 	char* _tmp0_; 	char* _tmp1_; +	char* _tmp2_; 	g_return_if_fail (self != NULL); 	g_return_if_fail (iter != NULL); 	if (!unity_places_empty_section_group_interesting (self, iter)) { 	return; 	} 	mes = g_strdup (dee_model_get_string (self->priv->_results, iter, (guint) 4)); -	clutter_text_set_markup ((ClutterText*) self->priv->text, _tmp1_ = g_strconcat (_tmp0_ = g_strconcat ("<big>", mes, NULL), "</big>", NULL)); +	clutter_text_set_markup ((ClutterText*) self->priv->text, _tmp2_ = g_strconcat (_tmp1_ = g_strconcat ("<big>", _tmp0_ = g_markup_escape_text (mes, -1), NULL), "</big>", NULL)); +	_g_free0 (_tmp2_); 	_g_free0 (_tmp1_); 	_g_free0 (_tmp0_); 	unity_places_empty_section_group_set_active (self, TRUE); @@ -1171,6 +1213,36 @@ static void unity_places_empty_section_group_set_property (GObject * object, gui  } +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { +	if ((array != NULL) && (destroy_func != NULL)) { +	int i; +	for (i = 0; i < array_length; i = i + 1) { +	if (((gpointer*) array)[i] != NULL) { +	destroy_func (((gpointer*) array)[i]); +	} +	} +	} +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { +	_vala_array_destroy (array, array_length, destroy_func); +	g_free (array); +} + + +static gint _vala_array_length (gpointer array) { +	int length; +	length = 0; +	if (array) { +	while (((gpointer*) array)[length]) { +	length++; +	} +	} +	return length; +} + +  static int _vala_strcmp0 (const char * str1, const char * str2) { 	if (str1 == NULL) { 	return -(str1 != str2); diff --git a/unity-private/places/places-default-renderer.vala b/unity-private/places/places-default-renderer.vala index f55f0bf2c..ab65b71b3 100644 --- a/unity-private/places/places-default-renderer.vala +++ b/unity-private/places/places-default-renderer.vala @@ -21,6 +21,7 @@ namespace Unity.Places  {  public class DefaultRenderer : LayeredBin, Unity.Place.Renderer  { + static const float TOP_PADDING = 22.0f;  static const float PADDING = 12.0f;  static const int SPACING = 0; @@ -34,6 +35,8 @@ namespace Unity.Places  private Dee.Model groups_model;  private Dee.Model results_model; + private string[] expanded = null; +  public DefaultRenderer ()  {  Object (); @@ -125,7 +128,7 @@ namespace Unity.Places  construct  { - padding = { 0.0f, 0.0f, 0.0f, 0.0f }; + padding = { PADDING, 0.0f, 0.0f, 0.0f };  trough = new Unity.CairoCanvas (trough_paint);  slider = new Unity.CairoCanvas (slider_paint); @@ -139,7 +142,6 @@ namespace Unity.Places  slider.show ();  box = new Ctk.VBox (SPACING); - box.padding = { 0.0f, PADDING, 0.0f, PADDING};  box.homogeneous = false;  scroll.add_actor (box);  box.show (); @@ -154,7 +156,11 @@ namespace Unity.Places  {  groups_model = groups;  results_model = results; - +  + var expandable = hints["ExpandedGroups"]; + if (expandable != null && expandable != "") + expanded = expandable.split (" "); +   unowned Dee.ModelIter iter = groups.get_first_iter ();  while (!groups.is_last (iter))  { @@ -232,6 +238,14 @@ namespace Unity.Places  group.activated.connect ((u, m) => { activated (u, m); } );  group.set_data<unowned Dee.ModelIter> ("model-iter", iter);  box.pack (group, false, true); + + foreach (string id in expanded) + { + if (model.get_position (iter) == id.to_int ()) + { + group.always_expanded = true; + } + }  }  } @@ -293,7 +307,7 @@ namespace Unity.Places  var button = new Ctk.Button (Ctk.Orientation.HORIZONTAL);  button.padding = { 12.0f, 12.0f, 12.0f, 12.0f };  var text = new Ctk.Text (""); - text.set_markup ("<big>" + mes + "</big>"); + text.set_markup ("<big>" + Markup.escape_text (mes) + "</big>");  button.add_actor (text);  box.pack (button, false, false); @@ -398,8 +412,8 @@ namespace Unity.Places  return;  string mes = results.get_string (iter, 4); - text.set_markup ("<big>" + mes + "</big>"); - + text.set_markup ("<big>" + Markup.escape_text (mes) + "</big>"); +   active = true;  glow.set_invalidate_effect_cache (true); diff --git a/unity-private/places/places-folder-browser-renderer.c b/unity-private/places/places-folder-browser-renderer.c index ce7ce91d2..bbb077361 100644 --- a/unity-private/places/places-folder-browser-renderer.c +++ b/unity-private/places/places-folder-browser-renderer.c @@ -86,8 +86,8 @@ static void unity_places_folder_browser_renderer_real_set_models (UnityPlaceRend  UnityPlacesDefaultRendererGroup* unity_places_default_renderer_group_new (guint group_id, const char* group_renderer, const char* display_name, const char* icon_hint, DeeModel* results);  UnityPlacesDefaultRendererGroup* unity_places_default_renderer_group_construct (GType object_type, guint group_id, const char* group_renderer, const char* display_name, const char* icon_hint, DeeModel* results);  GType unity_places_default_renderer_group_get_type (void) G_GNUC_CONST; -static void _lambda46_ (const char* u, const char* m, UnityPlacesFolderBrowserRenderer* self); -static void __lambda46__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self); +static void _lambda54_ (const char* u, const char* m, UnityPlacesFolderBrowserRenderer* self); +static void __lambda54__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self);  static GObject * unity_places_folder_browser_renderer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_places_folder_browser_renderer_finalize (GObject* obj); @@ -110,15 +110,15 @@ static gpointer _g_object_ref0 (gpointer self) {  } -static void _lambda46_ (const char* u, const char* m, UnityPlacesFolderBrowserRenderer* self) { +static void _lambda54_ (const char* u, const char* m, UnityPlacesFolderBrowserRenderer* self) { 	g_return_if_fail (u != NULL); 	g_return_if_fail (m != NULL); 	g_signal_emit_by_name ((UnityPlaceRenderer*) self, "activated", u, m);  } -static void __lambda46__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self) { -	_lambda46_ (uri, mimetype, self); +static void __lambda54__unity_places_default_renderer_group_activated (UnityPlacesDefaultRendererGroup* _sender, const char* uri, const char* mimetype, gpointer self) { +	_lambda54_ (uri, mimetype, self);  } @@ -132,7 +132,7 @@ static void unity_places_folder_browser_renderer_real_set_models (UnityPlaceRend 	g_return_if_fail (hints != NULL); 	self->priv->results_model = (_tmp0_ = _g_object_ref0 (results), _g_object_unref0 (self->priv->results_model), _tmp0_); 	group = g_object_ref_sink (unity_places_default_renderer_group_new ((guint) 0, "UnityFolderGroupRenderer", "__you_cant_see_me__", "gtk-apply", results)); -	g_signal_connect_object (group, "activated", (GCallback) __lambda46__unity_places_default_renderer_group_activated, self, 0); +	g_signal_connect_object (group, "activated", (GCallback) __lambda54__unity_places_default_renderer_group_activated, self, 0); 	ctk_box_pack ((CtkBox*) self->priv->box, (ClutterActor*) group, FALSE, TRUE); 	_g_object_unref0 (group);  } diff --git a/unity-private/places/places-place-bar.c b/unity-private/places/places-place-bar.c index 7eea3c61f..206a506ce 100644 --- a/unity-private/places/places-place-bar.c +++ b/unity-private/places/places-place-bar.c @@ -250,8 +250,8 @@ UnityPlacesPlaceBarBackground* unity_places_place_bar_background_construct (GTyp  UnityPlacesPlaceView* unity_places_place_view_new (UnityPlacesPlace* place);  UnityPlacesPlaceView* unity_places_place_view_construct (GType object_type, UnityPlacesPlace* place);  static void _unity_places_place_bar_on_entry_activated_unity_places_place_view_entry_activated (UnityPlacesPlaceView* _sender, UnityPlacesPlaceEntryView* entry_view, gpointer self); -static void _lambda63_ (UnityPlacesPlace* p, UnityPlacesPlaceBar* self); -static void __lambda63__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self); +static void _lambda71_ (UnityPlacesPlace* p, UnityPlacesPlaceBar* self); +static void __lambda71__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self);  static GObject * unity_places_place_bar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_places_place_bar_finalize (GObject* obj);  static void unity_places_place_bar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -443,7 +443,7 @@ static void _unity_places_place_bar_on_entry_activated_unity_places_place_view_e  } -static void _lambda63_ (UnityPlacesPlace* p, UnityPlacesPlaceBar* self) { +static void _lambda71_ (UnityPlacesPlace* p, UnityPlacesPlaceBar* self) { 	UnityPlacesPlaceView* view; 	g_return_if_fail (p != NULL); 	view = g_object_ref_sink (unity_places_place_view_new (p)); @@ -454,8 +454,8 @@ static void _lambda63_ (UnityPlacesPlace* p, UnityPlacesPlaceBar* self) {  } -static void __lambda63__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self) { -	_lambda63_ (place, self); +static void __lambda71__unity_places_place_model_place_added (UnityPlacesPlaceModel* _sender, UnityPlacesPlace* place, gpointer self) { +	_lambda71_ (place, self);  } @@ -498,7 +498,7 @@ static GObject * unity_places_place_bar_constructor (GType type, guint n_constru 	} 	_g_object_unref0 (_place_it); 	} -	g_signal_connect_object (self->priv->_model, "place-added", (GCallback) __lambda63__unity_places_place_model_place_added, self, 0); +	g_signal_connect_object (self->priv->_model, "place-added", (GCallback) __lambda71__unity_places_place_model_place_added, self, 0); 	} 	return obj;  } @@ -760,12 +760,12 @@ static GObject * unity_places_place_bar_background_constructor (GType type, guin 	GdkPixbuf* _tmp1_; 	_tmp0_ = gdk_pixbuf_new_from_file (UNITY_PLACES_PLACE_BAR_BACKGROUND_BG, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch13_g_error; +	goto __catch14_g_error; 	} 	self->priv->tile = (_tmp1_ = _tmp0_, _g_object_unref0 (self->priv->tile), _tmp1_); 	} -	goto __finally13; -	__catch13_g_error: +	goto __finally14; +	__catch14_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -775,7 +775,7 @@ static GObject * unity_places_place_bar_background_constructor (GType type, guin 	_g_error_free0 (e); 	} 	} -	__finally13: +	__finally14: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); diff --git a/unity-private/places/places-place-entry-scroller-child.c b/unity-private/places/places-place-entry-scroller-child.c index 0681d1949..8d5358079 100644 --- a/unity-private/places/places-place-entry-scroller-child.c +++ b/unity-private/places/places-place-entry-scroller-child.c @@ -109,7 +109,7 @@ typedef struct _UnityLauncherScrollerChildClass UnityLauncherScrollerChildClass;  typedef struct _UnityLauncherApplicationQuicklistController UnityLauncherApplicationQuicklistController;  typedef struct _UnityLauncherApplicationQuicklistControllerClass UnityLauncherApplicationQuicklistControllerClass; -typedef struct _Block2Data Block2Data; +typedef struct _Block3Data Block3Data;  #define _g_free0(var) (var = (g_free (var), NULL))  #define UNITY_LAUNCHER_SCROLLER_CHILD_TYPE_GROUP_TYPE (unity_launcher_scroller_child_group_type_get_type ()) @@ -201,7 +201,7 @@ struct _UnityPlacesPlaceEntryScrollerChildControllerPrivate { 	UnityPlacesPlaceEntry* _entry;  }; -struct _Block2Data { +struct _Block3Data { 	int _ref_count_; 	UnityPlacesPlaceEntryScrollerChildController * self; 	DbusmenuMenuitem* item; @@ -244,20 +244,20 @@ UnityLauncherApplicationQuicklistController* unity_launcher_application_quicklis  UnityLauncherApplicationQuicklistController* unity_launcher_application_quicklist_controller_construct (GType object_type, UnityLauncherScrollerChildController* scroller_child);  GType unity_launcher_application_quicklist_controller_get_type (void) G_GNUC_CONST;  static void unity_places_place_entry_scroller_child_controller_real_get_menu_actions (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target); -static void _lambda58_ (guint timestamp, Block2Data* _data2_); -static void __lambda58__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); -static Block2Data* block2_data_ref (Block2Data* _data2_); -static void block2_data_unref (Block2Data* _data2_); +static void _lambda66_ (guint timestamp, Block3Data* _data3_); +static void __lambda66__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); +static Block3Data* block3_data_ref (Block3Data* _data3_); +static void block3_data_unref (Block3Data* _data3_);  static gboolean unity_places_place_entry_scroller_child_controller_real_can_drag (UnityLauncherScrollerChildController* base);  static void unity_places_place_entry_scroller_child_controller_set_entry (UnityPlacesPlaceEntryScrollerChildController* self, UnityPlacesPlaceEntry* value);  const char* unity_places_place_entry_get_name (UnityPlacesPlaceEntry* self);  void unity_launcher_scroller_child_controller_set_name (UnityLauncherScrollerChildController* self, const char* value);  void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLauncherScrollerChildController* self, const char* icon_name);  const char* unity_places_place_entry_get_icon (UnityPlacesPlaceEntry* self); -static void _lambda59_ (UnityPlacesPlaceEntryScrollerChildController* self); +static void _lambda67_ (UnityPlacesPlaceEntryScrollerChildController* self);  gboolean unity_places_place_entry_get_active (UnityPlacesPlaceEntry* self);  void unity_launcher_scroller_child_set_active (UnityLauncherScrollerChild* self, gboolean value); -static void __lambda59__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); +static void __lambda67__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  GType unity_launcher_scroller_child_group_type_get_type (void) G_GNUC_CONST;  void unity_launcher_scroller_child_set_group_type (UnityLauncherScrollerChild* self, UnityLauncherScrollerChildGroupType value);  static GObject * unity_places_place_entry_scroller_child_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); @@ -326,29 +326,29 @@ static UnityLauncherQuicklistController* unity_places_place_entry_scroller_child  } -static void _lambda58_ (guint timestamp, Block2Data* _data2_) { +static void _lambda66_ (guint timestamp, Block3Data* _data3_) { 	UnityPlacesPlaceEntryScrollerChildController * self; -	self = _data2_->self; -	g_signal_emit_by_name (self, "clicked", (guint) dbusmenu_menuitem_property_get_int (_data2_->item, "section-id")); +	self = _data3_->self; +	g_signal_emit_by_name (self, "clicked", (guint) dbusmenu_menuitem_property_get_int (_data3_->item, "section-id"));  } -static void __lambda58__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { -	_lambda58_ (object, self); +static void __lambda66__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { +	_lambda66_ (object, self);  } -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_->item); -	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_->item); +	g_slice_free (Block3Data, _data3_); 	}  } @@ -364,32 +364,32 @@ static void unity_places_place_entry_scroller_child_controller_real_get_menu_act 	sections = _g_object_ref0 (unity_places_place_entry_get_sections_model (self->priv->_entry)); 	iter = dee_model_get_first_iter (sections); 	while (TRUE) { -	Block2Data* _data2_; +	Block3Data* _data3_; 	gboolean _tmp0_ = FALSE; 	char* name; -	_data2_ = g_slice_new0 (Block2Data); -	_data2_->_ref_count_ = 1; -	_data2_->self = g_object_ref (self); +	_data3_ = g_slice_new0 (Block3Data); +	_data3_->_ref_count_ = 1; +	_data3_->self = g_object_ref (self); 	if (iter != NULL) { 	_tmp0_ = !dee_model_is_last (sections, iter); 	} else { 	_tmp0_ = FALSE; 	} 	if (!_tmp0_) { -	block2_data_unref (_data2_); +	block3_data_unref (_data3_); 	break; 	} 	name = g_strdup (dee_model_get_string (sections, iter, (guint) 0)); -	_data2_->item = dbusmenu_menuitem_new (); -	dbusmenu_menuitem_property_set (_data2_->item, DBUSMENU_MENUITEM_PROP_LABEL, name); -	dbusmenu_menuitem_property_set_bool (_data2_->item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); -	dbusmenu_menuitem_property_set_bool (_data2_->item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); -	dbusmenu_menuitem_property_set_int (_data2_->item, "section-id", dee_model_get_position (sections, iter)); -	g_signal_connect_data (_data2_->item, "item-activated", (GCallback) __lambda58__dbusmenu_menuitem_item_activated, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); -	dbusmenu_menuitem_child_append (root, _data2_->item); +	_data3_->item = dbusmenu_menuitem_new (); +	dbusmenu_menuitem_property_set (_data3_->item, DBUSMENU_MENUITEM_PROP_LABEL, name); +	dbusmenu_menuitem_property_set_bool (_data3_->item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); +	dbusmenu_menuitem_property_set_bool (_data3_->item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); +	dbusmenu_menuitem_property_set_int (_data3_->item, "section-id", dee_model_get_position (sections, iter)); +	g_signal_connect_data (_data3_->item, "item-activated", (GCallback) __lambda66__dbusmenu_menuitem_item_activated, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0); +	dbusmenu_menuitem_child_append (root, _data3_->item); 	iter = dee_model_next (sections, iter); 	_g_free0 (name); -	block2_data_unref (_data2_); +	block3_data_unref (_data3_); 	} 	callback (root, callback_target); 	_g_object_unref0 (sections); @@ -422,13 +422,13 @@ static void unity_places_place_entry_scroller_child_controller_set_entry (UnityP  } -static void _lambda59_ (UnityPlacesPlaceEntryScrollerChildController* self) { +static void _lambda67_ (UnityPlacesPlaceEntryScrollerChildController* self) { 	unity_launcher_scroller_child_set_active (unity_launcher_scroller_child_controller_get_child ((UnityLauncherScrollerChildController*) self), unity_places_place_entry_get_active (self->priv->_entry));  } -static void __lambda59__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { -	_lambda59_ (self); +static void __lambda67__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda67_ (self);  } @@ -442,7 +442,7 @@ static GObject * unity_places_place_entry_scroller_child_controller_constructor 	{ 	unity_launcher_scroller_child_controller_set_name ((UnityLauncherScrollerChildController*) self, unity_places_place_entry_get_name (self->priv->_entry)); 	unity_launcher_scroller_child_controller_load_icon_from_icon_name ((UnityLauncherScrollerChildController*) self, unity_places_place_entry_get_icon (self->priv->_entry)); -	g_signal_connect_object ((GObject*) self->priv->_entry, "notify::active", (GCallback) __lambda59__g_object_notify, self, 0); +	g_signal_connect_object ((GObject*) self->priv->_entry, "notify::active", (GCallback) __lambda67__g_object_notify, self, 0); 	unity_launcher_scroller_child_set_group_type (unity_launcher_scroller_child_controller_get_child ((UnityLauncherScrollerChildController*) self), UNITY_LAUNCHER_SCROLLER_CHILD_GROUP_TYPE_PLACE); 	g_signal_connect_object ((ClutterActor*) unity_launcher_scroller_child_controller_get_child ((UnityLauncherScrollerChildController*) self), "motion-event", (GCallback) _unity_places_place_entry_scroller_child_controller_get_sections_clutter_actor_motion_event, self, 0); 	} diff --git a/unity-private/places/places-place-entry.c b/unity-private/places/places-place-entry.c index 83a3abe8e..9f101ab93 100644 --- a/unity-private/places/places-place-entry.c +++ b/unity-private/places/places-place-entry.c @@ -2324,14 +2324,14 @@ static void unity_places_place_entry_dbus_real_connect (UnityPlacesPlaceEntry* b 	DBusGProxy* _tmp3_; 	_tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch14_g_error; +	goto __catch15_g_error; 	} 	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_); 	} -	goto __finally14; -	__catch14_g_error: +	goto __finally15; +	__catch15_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -2344,7 +2344,7 @@ static void unity_places_place_entry_dbus_real_connect (UnityPlacesPlaceEntry* b 	return; 	} 	} -	__finally14: +	__finally15: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); diff --git a/unity-private/places/places-place-home-renderer.c b/unity-private/places/places-place-home-renderer.c index aff986f58..2eb93b9e2 100644 --- a/unity-private/places/places-place-home-renderer.c +++ b/unity-private/places/places-place-home-renderer.c @@ -147,22 +147,22 @@ static char* unity_places_home_renderer_filename_for_icon (UnityPlacesHomeRender  UnityPlacesHomeButton* unity_places_home_button_new (const char* name, const char* icon, const char* exec);  UnityPlacesHomeButton* unity_places_home_button_construct (GType object_type, const char* name, const char* icon, const char* exec);  GType unity_places_home_button_get_type (void) G_GNUC_CONST; -static void _lambda47_ (UnityPlacesHomeRenderer* self); -static void __lambda47__ctk_button_clicked (CtkButton* _sender, gpointer self); -static void _lambda48_ (UnityPlacesHomeRenderer* self); -static void __lambda48__ctk_button_clicked (CtkButton* _sender, gpointer self); -static void _lambda49_ (UnityPlacesHomeRenderer* self); -static void __lambda49__ctk_button_clicked (CtkButton* _sender, gpointer self); -static void _lambda50_ (UnityPlacesHomeRenderer* self); -static void __lambda50__ctk_button_clicked (CtkButton* _sender, gpointer self); -static void _lambda51_ (UnityPlacesHomeRenderer* self); -static void __lambda51__ctk_button_clicked (CtkButton* _sender, gpointer self); -static void _lambda52_ (UnityPlacesHomeRenderer* self); -static void __lambda52__ctk_button_clicked (CtkButton* _sender, gpointer self); -static void _lambda53_ (UnityPlacesHomeRenderer* self); -static void __lambda53__ctk_button_clicked (CtkButton* _sender, gpointer self); -static void _lambda54_ (UnityPlacesHomeRenderer* self); -static void __lambda54__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda55_ (UnityPlacesHomeRenderer* self); +static void __lambda55__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda56_ (UnityPlacesHomeRenderer* self); +static void __lambda56__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda57_ (UnityPlacesHomeRenderer* self); +static void __lambda57__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda58_ (UnityPlacesHomeRenderer* self); +static void __lambda58__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda59_ (UnityPlacesHomeRenderer* self); +static void __lambda59__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda60_ (UnityPlacesHomeRenderer* self); +static void __lambda60__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda61_ (UnityPlacesHomeRenderer* self); +static void __lambda61__ctk_button_clicked (CtkButton* _sender, gpointer self); +static void _lambda62_ (UnityPlacesHomeRenderer* self); +static void __lambda62__ctk_button_clicked (CtkButton* _sender, gpointer self);  static GObject * unity_places_home_renderer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_places_home_renderer_finalize (GObject* obj);  #define UNITY_PLACES_HOME_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_TYPE_HOME_BUTTON, UnityPlacesHomeButtonPrivate)) @@ -296,7 +296,7 @@ static const char* string_to_string (const char* self) {  } -static void _lambda47_ (UnityPlacesHomeRenderer* self) { +static void _lambda55_ (UnityPlacesHomeRenderer* self) { 	GConfClient* client; 	GError * _inner_error_ = NULL; 	client = _g_object_ref0 (gconf_client_get_default ()); @@ -304,19 +304,19 @@ static void _lambda47_ (UnityPlacesHomeRenderer* self) { 	char* exec; 	exec = gconf_client_get_string (client, "/desktop/gnome/applications/browser/exec", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch15_g_error; +	goto __catch16_g_error; 	} 	if (exec != NULL) { 	g_spawn_command_line_async (exec, &_inner_error_); 	if (_inner_error_ != NULL) { 	_g_free0 (exec); -	goto __catch15_g_error; +	goto __catch16_g_error; 	} 	} 	_g_free0 (exec); 	} -	goto __finally15; -	__catch15_g_error: +	goto __finally16; +	__catch16_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -328,7 +328,7 @@ static void _lambda47_ (UnityPlacesHomeRenderer* self) { 	_g_error_free0 (e); 	} 	} -	__finally15: +	__finally16: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (client); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -340,81 +340,81 @@ static void _lambda47_ (UnityPlacesHomeRenderer* self) {  } -static void __lambda47__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda47_ (self); +static void __lambda55__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda55_ (self);  } -static void _lambda48_ (UnityPlacesHomeRenderer* self) { +static void _lambda56_ (UnityPlacesHomeRenderer* self) { 	unity_places_home_renderer_activate_place (self, UNITY_PLACES_HOME_RENDERER_APPS_PLACE, 4);  } -static void __lambda48__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda48_ (self); +static void __lambda56__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda56_ (self);  } -static void _lambda49_ (UnityPlacesHomeRenderer* self) { +static void _lambda57_ (UnityPlacesHomeRenderer* self) { 	unity_places_home_renderer_activate_place (self, UNITY_PLACES_HOME_RENDERER_APPS_PLACE, 4);  } -static void __lambda49__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda49_ (self); +static void __lambda57__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda57_ (self);  } -static void _lambda50_ (UnityPlacesHomeRenderer* self) { +static void _lambda58_ (UnityPlacesHomeRenderer* self) { 	unity_places_home_renderer_activate_place (self, UNITY_PLACES_HOME_RENDERER_APPS_PLACE, 2);  } -static void __lambda50__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda50_ (self); +static void __lambda58__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda58_ (self);  } -static void _lambda51_ (UnityPlacesHomeRenderer* self) { +static void _lambda59_ (UnityPlacesHomeRenderer* self) { 	unity_places_home_renderer_activate_place (self, UNITY_PLACES_HOME_RENDERER_APPS_PLACE, 3);  } -static void __lambda51__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda51_ (self); +static void __lambda59__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda59_ (self);  } -static void _lambda52_ (UnityPlacesHomeRenderer* self) { +static void _lambda60_ (UnityPlacesHomeRenderer* self) { 	unity_places_home_renderer_activate_place (self, UNITY_PLACES_HOME_RENDERER_APPS_PLACE, 5);  } -static void __lambda52__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda52_ (self); +static void __lambda60__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda60_ (self);  } -static void _lambda53_ (UnityPlacesHomeRenderer* self) { +static void _lambda61_ (UnityPlacesHomeRenderer* self) { 	unity_places_home_renderer_activate_place (self, UNITY_PLACES_HOME_RENDERER_FILES_PLACE, 0);  } -static void __lambda53__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda53_ (self); +static void __lambda61__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda61_ (self);  } -static void _lambda54_ (UnityPlacesHomeRenderer* self) { +static void _lambda62_ (UnityPlacesHomeRenderer* self) { 	GError * _inner_error_ = NULL; 	{ 	g_spawn_command_line_async ("software-center", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch16_g_error; +	goto __catch17_g_error; 	} 	} -	goto __finally16; -	__catch16_g_error: +	goto __finally17; +	__catch17_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -426,7 +426,7 @@ static void _lambda54_ (UnityPlacesHomeRenderer* self) { 	_g_error_free0 (e); 	} 	} -	__finally16: +	__finally17: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -436,8 +436,8 @@ static void _lambda54_ (UnityPlacesHomeRenderer* self) {  } -static void __lambda54__ctk_button_clicked (CtkButton* _sender, gpointer self) { -	_lambda54_ (self); +static void __lambda62__ctk_button_clicked (CtkButton* _sender, gpointer self) { +	_lambda62_ (self);  } @@ -477,42 +477,42 @@ static GObject * unity_places_home_renderer_constructor (GType type, guint n_con 	icon = (_tmp4_ = g_object_ref_sink (unity_places_home_button_new (_ ("Web"), _tmp3_ = unity_places_home_renderer_filename_for_icon (self, "web"), "")), _g_free0 (_tmp3_), _tmp4_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda47__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda55__ctk_button_clicked, self, 0); 	icon = (_tmp6_ = g_object_ref_sink (unity_places_home_button_new (_ ("Music"), _tmp5_ = unity_places_home_renderer_filename_for_icon (self, "music"), "")), _g_object_unref0 (icon), _tmp6_); 	_g_free0 (_tmp5_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda48__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda56__ctk_button_clicked, self, 0); 	icon = (_tmp8_ = g_object_ref_sink (unity_places_home_button_new (_ ("Photos & Videos"), _tmp7_ = unity_places_home_renderer_filename_for_icon (self, "photos"), "")), _g_object_unref0 (icon), _tmp8_); 	_g_free0 (_tmp7_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda49__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda57__ctk_button_clicked, self, 0); 	icon = (_tmp10_ = g_object_ref_sink (unity_places_home_button_new (_ ("Games"), _tmp9_ = unity_places_home_renderer_filename_for_icon (self, "games"), "")), _g_object_unref0 (icon), _tmp10_); 	_g_free0 (_tmp9_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda50__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda58__ctk_button_clicked, self, 0); 	icon = (_tmp12_ = g_object_ref_sink (unity_places_home_button_new (_ ("Email & Chat"), _tmp11_ = unity_places_home_renderer_filename_for_icon (self, "email_and_chat"), "")), _g_object_unref0 (icon), _tmp12_); 	_g_free0 (_tmp11_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda51__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda59__ctk_button_clicked, self, 0); 	icon = (_tmp14_ = g_object_ref_sink (unity_places_home_button_new (_ ("Office"), _tmp13_ = unity_places_home_renderer_filename_for_icon (self, "work"), "")), _g_object_unref0 (icon), _tmp14_); 	_g_free0 (_tmp13_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda52__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda60__ctk_button_clicked, self, 0); 	icon = (_tmp16_ = g_object_ref_sink (unity_places_home_button_new (_ ("Files & Folders"), _tmp15_ = unity_places_home_renderer_filename_for_icon (self, "work"), "")), _g_object_unref0 (icon), _tmp16_); 	_g_free0 (_tmp15_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda53__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda61__ctk_button_clicked, self, 0); 	icon = (_tmp18_ = g_object_ref_sink (unity_places_home_button_new (_ ("Get New Apps"), _tmp17_ = unity_places_home_renderer_filename_for_icon (self, "softwarecentre"), "")), _g_object_unref0 (icon), _tmp18_); 	_g_free0 (_tmp17_); 	clutter_container_add_actor ((ClutterContainer*) self->priv->icon_view, (ClutterActor*) icon); 	clutter_actor_show ((ClutterActor*) icon); -	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda54__ctk_button_clicked, self, 0); +	g_signal_connect_object ((CtkButton*) icon, "clicked", (GCallback) __lambda62__ctk_button_clicked, self, 0); 	_g_object_unref0 (icon); 	} 	return obj; diff --git a/unity-private/places/places-place-home.c b/unity-private/places/places-place-home.c index 19a3f4923..9b050c02f 100644 --- a/unity-private/places/places-place-home.c +++ b/unity-private/places/places-place-home.c @@ -69,7 +69,7 @@ typedef struct _UnityPlacesPlaceModel UnityPlacesPlaceModel;  typedef struct _UnityPlacesPlaceModelClass UnityPlacesPlaceModelClass;  #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))  #define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _Block3Data Block3Data; +typedef struct _Block4Data Block4Data;  struct _UnityPlacesPlaceEntryIface { 	GTypeInterface parent_iface; @@ -153,7 +153,7 @@ struct _UnityPlacesPlaceHomeEntryPrivate { 	GeeHashMap* entry_group_map;  }; -struct _Block3Data { +struct _Block4Data { 	int _ref_count_; 	UnityPlacesPlaceHomeEntry * self; 	UnityPlacesPlaceEntry* entry; @@ -199,14 +199,16 @@ GeeArrayList* unity_places_place_get_entries (UnityPlacesPlace* self);  DeeModel* unity_places_place_entry_get_entry_groups_model (UnityPlacesPlaceEntry* self);  const char* unity_places_place_entry_get_name (UnityPlacesPlaceEntry* self);  const char* unity_places_place_entry_get_icon (UnityPlacesPlaceEntry* self); +static void _lambda32_ (Block4Data* _data4_);  DeeModel* unity_places_place_entry_get_global_results_model (UnityPlacesPlaceEntry* self); -static void _lambda31_ (DeeModelIter* it, Block3Data* _data3_); +static void _lambda33_ (DeeModelIter* it, Block4Data* _data4_);  DeeModel* unity_places_place_entry_get_entry_results_model (UnityPlacesPlaceEntry* self); -static void __lambda31__dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self); -static void _lambda32_ (DeeModelIter* it, Block3Data* _data3_); -static void __lambda32__dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self); -static Block3Data* block3_data_ref (Block3Data* _data3_); -static void block3_data_unref (Block3Data* _data3_); +static void __lambda33__dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self); +static void _lambda34_ (DeeModelIter* it, Block4Data* _data4_); +static void __lambda34__dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self); +static void __lambda32__unity_places_place_entry_updated (UnityPlacesPlaceEntry* _sender, gpointer self); +static Block4Data* block4_data_ref (Block4Data* _data4_); +static void block4_data_unref (Block4Data* _data4_);  static void unity_places_place_home_entry_real_connect (UnityPlacesPlaceEntry* base);  void unity_places_place_entry_set_online (UnityPlacesPlaceEntry* self, gboolean value);  static void unity_places_place_home_entry_real_set_search (UnityPlacesPlaceEntry* base, const char* search, GHashTable* hints); @@ -280,30 +282,36 @@ static gpointer _g_object_ref0 (gpointer self) {  } -static void _lambda31_ (DeeModelIter* it, Block3Data* _data3_) { +static void _lambda33_ (DeeModelIter* it, Block4Data* _data4_) { 	UnityPlacesPlaceHomeEntry * self; 	DeeModel* _model; -	self = _data3_->self; +	DeeModelIter* i; +	self = _data4_->self; 	g_return_if_fail (it != NULL); -	_model = _g_object_ref0 (unity_places_place_entry_get_global_results_model (_data3_->entry)); -	dee_model_append (unity_places_place_entry_get_entry_results_model ((UnityPlacesPlaceEntry*) self), 0, dee_model_get_string (_model, it, (guint) 0), 1, dee_model_get_string (_model, it, (guint) 1), 2, GPOINTER_TO_UINT (gee_abstract_map_get ((GeeAbstractMap*) self->priv->entry_group_map, _data3_->entry)), 3, dee_model_get_string (_model, it, (guint) 3), 4, dee_model_get_string (_model, it, (guint) 4), 5, dee_model_get_string (_model, it, (guint) 5), -1, NULL); +	_model = _g_object_ref0 (unity_places_place_entry_get_global_results_model (_data4_->entry)); +	i = dee_model_get_iter_at_row (unity_places_place_entry_get_entry_groups_model (_data4_->entry), dee_model_get_uint (_model, it, (guint) 2)); +	if (_vala_strcmp0 (dee_model_get_string (unity_places_place_entry_get_entry_groups_model (_data4_->entry), i, (guint) 0), "UnityEmptySearchRenderer") == 0) { +	_g_object_unref0 (_model); +	return; +	} +	dee_model_append (unity_places_place_entry_get_entry_results_model ((UnityPlacesPlaceEntry*) self), 0, dee_model_get_string (_model, it, (guint) 0), 1, dee_model_get_string (_model, it, (guint) 1), 2, GPOINTER_TO_UINT (gee_abstract_map_get ((GeeAbstractMap*) self->priv->entry_group_map, _data4_->entry)), 3, dee_model_get_string (_model, it, (guint) 3), 4, dee_model_get_string (_model, it, (guint) 4), 5, dee_model_get_string (_model, it, (guint) 5), -1, NULL); 	_g_object_unref0 (_model);  } -static void __lambda31__dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self) { -	_lambda31_ (iter, self); +static void __lambda33__dee_model_row_added (DeeModel* _sender, DeeModelIter* iter, gpointer self) { +	_lambda33_ (iter, self);  } -static void _lambda32_ (DeeModelIter* it, Block3Data* _data3_) { +static void _lambda34_ (DeeModelIter* it, Block4Data* _data4_) { 	UnityPlacesPlaceHomeEntry * self; 	DeeModel* _model; 	char* uri; 	DeeModelIter* i; -	self = _data3_->self; +	self = _data4_->self; 	g_return_if_fail (it != NULL); -	_model = _g_object_ref0 (unity_places_place_entry_get_global_results_model (_data3_->entry)); +	_model = _g_object_ref0 (unity_places_place_entry_get_global_results_model (_data4_->entry)); 	uri = g_strdup (dee_model_get_string (_model, it, (guint) 0)); 	i = dee_model_get_first_iter (unity_places_place_entry_get_entry_results_model ((UnityPlacesPlaceEntry*) self)); 	while (TRUE) { @@ -327,22 +335,35 @@ static void _lambda32_ (DeeModelIter* it, Block3Data* _data3_) {  } -static void __lambda32__dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self) { -	_lambda32_ (iter, self); +static void __lambda34__dee_model_row_removed (DeeModel* _sender, DeeModelIter* iter, gpointer self) { +	_lambda34_ (iter, self); +} + + +static void _lambda32_ (Block4Data* _data4_) { +	UnityPlacesPlaceHomeEntry * self; +	self = _data4_->self; +	g_signal_connect_data (unity_places_place_entry_get_global_results_model (_data4_->entry), "row-added", (GCallback) __lambda33__dee_model_row_added, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0); +	g_signal_connect_data (unity_places_place_entry_get_global_results_model (_data4_->entry), "row-removed", (GCallback) __lambda34__dee_model_row_removed, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0); +} + + +static void __lambda32__unity_places_place_entry_updated (UnityPlacesPlaceEntry* _sender, gpointer self) { +	_lambda32_ (self);  } -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_->entry); -	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_->entry); +	g_slice_free (Block4Data, _data4_); 	}  } @@ -354,22 +375,21 @@ static void unity_places_place_home_entry_on_place_added (UnityPlacesPlaceHomeEn 	GeeIterator* _entry_it; 	_entry_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) unity_places_place_get_entries (place)); 	while (TRUE) { -	Block3Data* _data3_; +	Block4Data* _data4_; 	DeeModelIter* iter; -	_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 (!gee_iterator_next (_entry_it)) { -	block3_data_unref (_data3_); +	block4_data_unref (_data4_); 	break; 	} -	_data3_->entry = (UnityPlacesPlaceEntry*) gee_iterator_get (_entry_it); +	_data4_->entry = (UnityPlacesPlaceEntry*) gee_iterator_get (_entry_it); 	iter = NULL; -	iter = dee_model_append (unity_places_place_entry_get_entry_groups_model ((UnityPlacesPlaceEntry*) self), 0, "UnityLinkGroupRenderer", 1, unity_places_place_entry_get_name (_data3_->entry), 2, unity_places_place_entry_get_icon (_data3_->entry), -1, NULL); -	gee_abstract_map_set ((GeeAbstractMap*) self->priv->entry_group_map, _data3_->entry, GUINT_TO_POINTER ((guint) dee_model_get_position (unity_places_place_entry_get_entry_groups_model ((UnityPlacesPlaceEntry*) self), iter))); -	g_signal_connect_data (unity_places_place_entry_get_global_results_model (_data3_->entry), "row-added", (GCallback) __lambda31__dee_model_row_added, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0); -	g_signal_connect_data (unity_places_place_entry_get_global_results_model (_data3_->entry), "row-removed", (GCallback) __lambda32__dee_model_row_removed, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0); -	block3_data_unref (_data3_); +	iter = dee_model_append (unity_places_place_entry_get_entry_groups_model ((UnityPlacesPlaceEntry*) self), 0, "UnityLinkGroupRenderer", 1, unity_places_place_entry_get_name (_data4_->entry), 2, unity_places_place_entry_get_icon (_data4_->entry), -1, NULL); +	gee_abstract_map_set ((GeeAbstractMap*) self->priv->entry_group_map, _data4_->entry, GUINT_TO_POINTER ((guint) dee_model_get_position (unity_places_place_entry_get_entry_groups_model ((UnityPlacesPlaceEntry*) self), iter))); +	g_signal_connect_data (_data4_->entry, "updated", (GCallback) __lambda32__unity_places_place_entry_updated, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0); +	block4_data_unref (_data4_); 	} 	_g_object_unref0 (_entry_it); 	} @@ -383,19 +403,10 @@ static void unity_places_place_home_entry_real_connect (UnityPlacesPlaceEntry* b  } -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_home_entry_real_set_search (UnityPlacesPlaceEntry* base, const char* search, GHashTable* hints) { 	UnityPlacesPlaceHomeEntry * self; 	char* old_renderer; 	gboolean _tmp0_ = FALSE; -	char* _tmp3_; 	self = (UnityPlacesPlaceHomeEntry*) base; 	g_return_if_fail (search != NULL); 	g_return_if_fail (hints != NULL); @@ -408,7 +419,7 @@ static void unity_places_place_home_entry_real_set_search (UnityPlacesPlaceEntry 	if (_tmp0_) { 	unity_places_place_entry_set_entry_renderer_name ((UnityPlacesPlaceEntry*) self, "UnityHomeScreen"); 	} else { -	unity_places_place_entry_set_entry_renderer_name ((UnityPlacesPlaceEntry*) self, "UnityDefaultRenderer"); +	unity_places_place_entry_set_entry_renderer_name ((UnityPlacesPlaceEntry*) self, "UnityHomeResultsRenderer"); 	{ 	GeeSet* _tmp1_; 	GeeIterator* _tmp2_; @@ -431,8 +442,6 @@ static void unity_places_place_home_entry_real_set_search (UnityPlacesPlaceEntry 	_g_object_unref0 (_e_it); 	} 	} -	g_debug ("places-place-home.vala:175: %s", _tmp3_ = g_strconcat (string_to_string (unity_places_place_entry_get_entry_renderer_name ((UnityPlacesPlaceEntry*) self)), ", ", string_to_string (search), NULL)); -	_g_free0 (_tmp3_); 	if (_vala_strcmp0 (old_renderer, unity_places_place_entry_get_entry_renderer_name ((UnityPlacesPlaceEntry*) self)) != 0) { 	g_signal_emit_by_name ((UnityPlacesPlaceEntry*) self, "updated"); 	g_signal_emit_by_name ((UnityPlacesPlaceEntry*) self, "renderer-info-changed"); diff --git a/unity-private/places/places-place-home.vala b/unity-private/places/places-place-home.vala index a73c49049..3312b7902 100644 --- a/unity-private/places/places-place-home.vala +++ b/unity-private/places/places-place-home.vala @@ -111,19 +111,29 @@ namespace Unity.Places  entry_group_map[entry] = entry_groups_model.get_position (iter); - entry.global_results_model.row_added.connect ((it) => { - var _model = entry.global_results_model; + entry.updated.connect (() => { + entry.global_results_model.row_added.connect ((it) => { + var _model = entry.global_results_model; - entry_results_model.append (0, _model.get_string (it, 0), - 1, _model.get_string (it, 1), - 2, entry_group_map[entry], - 3, _model.get_string (it, 3), - 4, _model.get_string (it, 4), - 5, _model.get_string (it, 5), - -1); - }); + unowned Dee.ModelIter i = entry.entry_groups_model.get_iter_at_row (_model.get_uint (it, 2)); + + if (entry.entry_groups_model.get_string (i, 0) + == "UnityEmptySearchRenderer")  + { + return; + } + + entry_results_model.append (0, _model.get_string (it, 0), + 1, _model.get_string (it, 1), + 2, entry_group_map[entry], + 3, _model.get_string (it, 3), + 4, _model.get_string (it, 4), + 5, _model.get_string (it, 5), + -1); + + }); - entry.global_results_model.row_removed.connect ((it) => { + entry.global_results_model.row_removed.connect ((it) => {  var _model = entry.global_results_model;  string uri = _model.get_string (it, 0); @@ -139,6 +149,7 @@ namespace Unity.Places  i = _model.next (i);  } + });  });  }  } @@ -161,18 +172,19 @@ namespace Unity.Places  }  else  { - entry_renderer_name = "UnityDefaultRenderer"; + entry_renderer_name = "UnityHomeResultsRenderer";  foreach (Gee.Map.Entry<PlaceEntry, uint> e in entry_group_map.entries)  {  PlaceEntry? entry = e.key;  if (entry != null) - entry.set_global_search (search, hints); + { + entry.set_global_search (search, hints); + }  }  } - debug (@"$entry_renderer_name, $search");  if (old_renderer != entry_renderer_name)  {  updated (); diff --git a/unity-private/places/places-place-model.c b/unity-private/places/places-place-model.c index 306b3948a..eb47af5fc 100644 --- a/unity-private/places/places-place-model.c +++ b/unity-private/places/places-place-model.c @@ -284,7 +284,7 @@ static gboolean unity_places_place_file_model_load_place_files_co (UnityPlacesPl 	_state_1: 	data->e = g_file_enumerate_children_finish (data->dir, data->_res_, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { -	goto __catch17_g_error; +	goto __catch18_g_error; 	} 	while (TRUE) { 	data->_state_ = 2; @@ -294,7 +294,7 @@ static gboolean unity_places_place_file_model_load_place_files_co (UnityPlacesPl 	data->files = g_file_enumerator_next_files_finish (data->e, data->_res_, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { 	_g_object_unref0 (data->e); -	goto __catch17_g_error; +	goto __catch18_g_error; 	} 	if (data->files == NULL) { 	__g_list_free_g_object_unref0 (data->files); @@ -327,8 +327,8 @@ static gboolean unity_places_place_file_model_load_place_files_co (UnityPlacesPl 	} 	_g_object_unref0 (data->e); 	} -	goto __finally17; -	__catch17_g_error: +	goto __finally18; +	__catch18_g_error: 	{ 	data->_error_ = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -338,7 +338,7 @@ static gboolean unity_places_place_file_model_load_place_files_co (UnityPlacesPl 	_g_error_free0 (data->_error_); 	} 	} -	__finally17: +	__finally18: 	if (data->_inner_error_ != NULL) { 	_g_object_unref0 (data->dir); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); @@ -368,7 +368,7 @@ static void unity_places_place_file_model_load_place_files_sync (UnityPlacesPlac 	GFileInfo* info; 	e = g_file_enumerate_children (dir, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch18_g_error; +	goto __catch19_g_error; 	} 	info = NULL; 	while (TRUE) { @@ -382,7 +382,7 @@ static void unity_places_place_file_model_load_place_files_sync (UnityPlacesPlac 	if (_inner_error_ != NULL) { 	_g_object_unref0 (info); 	_g_object_unref0 (e); -	goto __catch18_g_error; +	goto __catch19_g_error; 	} 	if (!((info = (_tmp1_ = _tmp0_, _g_object_unref0 (info), _tmp1_)) != NULL)) { 	break; @@ -403,8 +403,8 @@ static void unity_places_place_file_model_load_place_files_sync (UnityPlacesPlac 	_g_object_unref0 (info); 	_g_object_unref0 (e); 	} -	goto __finally18; -	__catch18_g_error: +	goto __finally19; +	__catch19_g_error: 	{ 	GError * _error_; 	_error_ = _inner_error_; @@ -416,7 +416,7 @@ static void unity_places_place_file_model_load_place_files_sync (UnityPlacesPlac 	_g_error_free0 (_error_); 	} 	} -	__finally18: +	__finally19: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (dir); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -437,14 +437,14 @@ static UnityPlacesPlace* unity_places_place_file_model_load_place (UnityPlacesPl 	{ 	g_key_file_load_from_file (file, path, G_KEY_FILE_NONE, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch19_g_error; +	goto __catch20_g_error; 	} 	result = unity_places_place_new_from_keyfile (file, path); 	_g_key_file_free0 (file); 	return result; 	} -	goto __finally19; -	__catch19_g_error: +	goto __finally20; +	__catch20_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -459,7 +459,7 @@ static UnityPlacesPlace* unity_places_place_file_model_load_place (UnityPlacesPl 	return result; 	} 	} -	__finally19: +	__finally20: 	{ 	_g_key_file_free0 (file); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); diff --git a/unity-private/places/places-place-search-bar.c b/unity-private/places/places-place-search-bar.c index 3904aae68..3a124a232 100644 --- a/unity-private/places/places-place-search-bar.c +++ b/unity-private/places/places-place-search-bar.c @@ -118,7 +118,7 @@ typedef struct _UnityTestingObjectRegistryClass UnityTestingObjectRegistryClass;  #define _unity_testing_object_registry_unref0(var) ((var == NULL) ? NULL : (var = (unity_testing_object_registry_unref (var), NULL)))  typedef struct _UnityPlacesPlaceSearchEntryPrivate UnityPlacesPlaceSearchEntryPrivate;  #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) -typedef struct _Block4Data Block4Data; +typedef struct _Block5Data Block5Data;  typedef struct _UnityPlacesPlaceSearchBarBackgroundPrivate UnityPlacesPlaceSearchBarBackgroundPrivate;  #define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))  #define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL))) @@ -200,7 +200,7 @@ struct _UnityPlacesPlaceSearchEntryClass { 	CtkBoxClass parent_class;  }; -struct _Block4Data { +struct _Block5Data { 	int _ref_count_; 	UnityPlacesPlaceSearchBar * self; 	guint section; @@ -241,7 +241,7 @@ GType unity_places_place_search_sections_bar_get_type (void) G_GNUC_CONST;  enum { 	UNITY_PLACES_PLACE_SEARCH_BAR_DUMMY_PROPERTY  }; -#define UNITY_PLACES_PLACE_SEARCH_BAR_SPACING 12 +#define UNITY_PLACES_PLACE_SEARCH_BAR_SPACING 8  #define UNITY_PLACES_PLACE_SEARCH_BAR_RANDOM_TEXT_WIDTH 400  UnityPlacesPlaceSearchBar* unity_places_place_search_bar_new (void);  UnityPlacesPlaceSearchBar* unity_places_place_search_bar_construct (GType object_type); @@ -267,13 +267,13 @@ void unity_places_place_entry_set_search (UnityPlacesPlaceEntry* self, const cha  void unity_places_place_search_bar_set_active_entry_view (UnityPlacesPlaceSearchBar* self, UnityPlacesPlaceEntry* entry, gint x, guint section);  void unity_places_place_search_bar_background_set_entry_position (UnityPlacesPlaceSearchBarBackground* self, gint value);  void unity_places_place_search_sections_bar_set_active_entry (UnityPlacesPlaceSearchSectionsBar* self, UnityPlacesPlaceEntry* entry); -static gboolean _lambda37_ (Block4Data* _data4_); +static gboolean _lambda40_ (Block5Data* _data5_);  void unity_places_place_search_sections_bar_set_active_section (UnityPlacesPlaceSearchSectionsBar* self, guint section_id); -static gboolean __lambda37__gsource_func (gpointer self); +static gboolean __lambda40__gsource_func (gpointer self);  void unity_places_place_search_navigation_set_active_entry (UnityPlacesPlaceSearchNavigation* self, UnityPlacesPlaceEntry* entry);  void unity_places_place_search_entry_set_active_entry (UnityPlacesPlaceSearchEntry* self, UnityPlacesPlaceEntry* entry); -static Block4Data* block4_data_ref (Block4Data* _data4_); -static void block4_data_unref (Block4Data* _data4_); +static Block5Data* block5_data_ref (Block5Data* _data5_); +static void block5_data_unref (Block5Data* _data5_);  UnityPlacesPlaceSearchNavigation* unity_places_place_search_navigation_new (void);  UnityPlacesPlaceSearchNavigation* unity_places_place_search_navigation_construct (GType object_type);  UnityPlacesPlaceSearchEntry* unity_places_place_search_entry_new (void); @@ -397,56 +397,56 @@ static gpointer _g_object_ref0 (gpointer self) {  } -static gboolean _lambda37_ (Block4Data* _data4_) { +static gboolean _lambda40_ (Block5Data* _data5_) { 	UnityPlacesPlaceSearchBar * self; 	gboolean result = FALSE; -	self = _data4_->self; -	unity_places_place_search_sections_bar_set_active_section (self->priv->sections, _data4_->section); +	self = _data5_->self; +	unity_places_place_search_sections_bar_set_active_section (self->priv->sections, _data5_->section); 	result = FALSE; 	return result;  } -static gboolean __lambda37__gsource_func (gpointer self) { +static gboolean __lambda40__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda37_ (self); +	result = _lambda40_ (self); 	return result;  } -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_)) { -	_g_object_unref0 (_data4_->self); -	g_slice_free (Block4Data, _data4_); +static void block5_data_unref (Block5Data* _data5_) { +	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) { +	_g_object_unref0 (_data5_->self); +	g_slice_free (Block5Data, _data5_); 	}  }  void unity_places_place_search_bar_set_active_entry_view (UnityPlacesPlaceSearchBar* self, UnityPlacesPlaceEntry* entry, gint x, guint section) { -	Block4Data* _data4_; +	Block5Data* _data5_; 	UnityPlacesPlaceEntry* _tmp0_; 	g_return_if_fail (self != NULL); 	g_return_if_fail (entry != NULL); -	_data4_ = g_slice_new0 (Block4Data); -	_data4_->_ref_count_ = 1; -	_data4_->self = g_object_ref (self); -	_data4_->section = section; +	_data5_ = g_slice_new0 (Block5Data); +	_data5_->_ref_count_ = 1; +	_data5_->self = g_object_ref (self); +	_data5_->section = section; 	self->priv->active_entry = (_tmp0_ = _g_object_ref0 (entry), _g_object_unref0 (self->priv->active_entry), _tmp0_); 	unity_places_place_search_bar_background_set_entry_position (self->priv->bg, x); 	unity_places_place_search_sections_bar_set_active_entry (self->priv->sections, entry); -	if (_data4_->section != 0) { -	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda37__gsource_func, block4_data_ref (_data4_), block4_data_unref); +	if (_data5_->section != 0) { +	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda40__gsource_func, block5_data_ref (_data5_), block5_data_unref); 	} 	unity_places_place_search_navigation_set_active_entry (self->priv->navigation, entry); 	unity_places_place_search_entry_set_active_entry (self->priv->entry, entry); 	clutter_actor_grab_key_focus ((ClutterActor*) self->priv->entry->text); -	block4_data_unref (_data4_); +	block5_data_unref (_data5_);  } @@ -733,12 +733,12 @@ static GObject * unity_places_place_search_bar_background_constructor (GType typ 	GdkPixbuf* _tmp1_; 	_tmp0_ = gdk_pixbuf_new_from_file (UNITY_PLACES_PLACE_SEARCH_BAR_BACKGROUND_BG, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch30_g_error; +	goto __catch31_g_error; 	} 	self->priv->tile = (_tmp1_ = _tmp0_, _g_object_unref0 (self->priv->tile), _tmp1_); 	} -	goto __finally30; -	__catch30_g_error: +	goto __finally31; +	__catch31_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -748,7 +748,7 @@ static GObject * unity_places_place_search_bar_background_constructor (GType typ 	_g_error_free0 (e); 	} 	} -	__finally30: +	__finally31: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); diff --git a/unity-private/places/places-place-search-bar.vala b/unity-private/places/places-place-search-bar.vala index 2b503aaca..34bcd2f69 100644 --- a/unity-private/places/places-place-search-bar.vala +++ b/unity-private/places/places-place-search-bar.vala @@ -21,7 +21,7 @@ namespace Unity.Places  {  public class PlaceSearchBar : Ctk.Box  { - static const int SPACING = 12; + static const int SPACING = 8;  static const int RANDOM_TEXT_WIDTH = 400;  /* Properties */ diff --git a/unity-private/places/places-place-search-entry.c b/unity-private/places/places-place-search-entry.c index 20a40676e..d6767719f 100644 --- a/unity-private/places/places-place-search-entry.c +++ b/unity-private/places/places-place-search-entry.c @@ -165,8 +165,8 @@ UnityPlacesPlaceSearchEntry* unity_places_place_search_entry_construct (GType ob  static void unity_places_place_search_entry_real_get_preferred_height (ClutterActor* base, float for_width, float* min_height, float* nat_height);  static void unity_places_place_search_entry_real_get_preferred_width (ClutterActor* base, float for_height, float* min_width, float* nat_width);  static void unity_places_place_search_entry_on_text_changed (UnityPlacesPlaceSearchEntry* self); -static gboolean _lambda35_ (UnityPlacesPlaceSearchEntry* self); -static gboolean __lambda35__gsource_func (gpointer self); +static gboolean _lambda37_ (UnityPlacesPlaceSearchEntry* self); +static gboolean __lambda37__gsource_func (gpointer self);  static void unity_places_place_search_entry_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags);  static void unity_places_place_search_entry_real_paint (ClutterActor* base);  static void unity_places_place_search_entry_real_map (ClutterActor* base); @@ -186,8 +186,8 @@ static void _unity_places_place_search_entry_on_text_changed_clutter_text_text_c  static void _unity_places_place_search_entry_on_key_focus_in_clutter_actor_key_focus_in (ClutterActor* _sender, gpointer self);  static void _unity_places_place_search_entry_on_key_focus_out_clutter_actor_key_focus_out (ClutterActor* _sender, gpointer self);  static void _unity_places_place_search_entry_paint_right_icon_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self); -static gboolean _lambda36_ (UnityPlacesPlaceSearchEntry* self); -static gboolean __lambda36__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self); +static gboolean _lambda38_ (UnityPlacesPlaceSearchEntry* self); +static gboolean __lambda38__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);  static GObject * unity_places_place_search_entry_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_places_place_search_entry_finalize (GObject* obj);  static void unity_places_place_search_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -241,7 +241,7 @@ static gpointer _g_object_ref0 (gpointer self) {  } -static gboolean _lambda35_ (UnityPlacesPlaceSearchEntry* self) { +static gboolean _lambda37_ (UnityPlacesPlaceSearchEntry* self) { 	gboolean result = FALSE; 	g_signal_emit_by_name (self, "text-changed", clutter_text_get_text ((ClutterText*) self->text)); 	self->priv->live_search_timeout = (guint) 0; @@ -250,9 +250,9 @@ static gboolean _lambda35_ (UnityPlacesPlaceSearchEntry* self) {  } -static gboolean __lambda35__gsource_func (gpointer self) { +static gboolean __lambda37__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda35_ (self); +	result = _lambda37_ (self); 	return result;  } @@ -282,7 +282,7 @@ static void unity_places_place_search_entry_on_text_changed (UnityPlacesPlaceSea 	if (self->priv->live_search_timeout != 0) { 	g_source_remove (self->priv->live_search_timeout); 	} -	self->priv->live_search_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) UNITY_PLACES_PLACE_SEARCH_ENTRY_LIVE_SEARCH_TIMEOUT, __lambda35__gsource_func, g_object_ref (self), g_object_unref); +	self->priv->live_search_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) UNITY_PLACES_PLACE_SEARCH_ENTRY_LIVE_SEARCH_TIMEOUT, __lambda37__gsource_func, g_object_ref (self), g_object_unref);  } @@ -476,7 +476,7 @@ static void _unity_places_place_search_entry_paint_right_icon_unity_cairo_canvas  } -static gboolean _lambda36_ (UnityPlacesPlaceSearchEntry* self) { +static gboolean _lambda38_ (UnityPlacesPlaceSearchEntry* self) { 	gboolean result = FALSE; 	clutter_text_set_text ((ClutterText*) self->text, ""); 	g_signal_emit_by_name (self, "text-changed", ""); @@ -485,9 +485,9 @@ static gboolean _lambda36_ (UnityPlacesPlaceSearchEntry* self) {  } -static gboolean __lambda36__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { +static gboolean __lambda38__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { 	gboolean result; -	result = _lambda36_ (self); +	result = _lambda38_ (self); 	return result;  } @@ -540,7 +540,7 @@ static GObject * unity_places_place_search_entry_constructor (GType type, guint 	ctk_box_pack ((CtkBox*) self, (ClutterActor*) self->right_icon, FALSE, TRUE); 	clutter_actor_show ((ClutterActor*) self->right_icon); 	clutter_actor_set_reactive ((ClutterActor*) self->right_icon, TRUE); -	g_signal_connect_object ((ClutterActor*) self->right_icon, "button-release-event", (GCallback) __lambda36__clutter_actor_button_release_event, self, 0); +	g_signal_connect_object ((ClutterActor*) self->right_icon, "button-release-event", (GCallback) __lambda38__clutter_actor_button_release_event, self, 0); 	} 	return obj;  } diff --git a/unity-private/places/places-place-search-navigation.c b/unity-private/places/places-place-search-navigation.c index 0bb4dc64a..b1723f80a 100644 --- a/unity-private/places/places-place-search-navigation.c +++ b/unity-private/places/places-place-search-navigation.c @@ -324,11 +324,11 @@ static void unity_places_place_search_navigation_real_get_preferred_width (Clutt  static void unity_places_place_search_navigation_draw_back_arrow (UnityPlacesPlaceSearchNavigation* self, cairo_t* cr, gint width, gint height);  static void unity_places_place_search_navigation_draw_forward_arrow (UnityPlacesPlaceSearchNavigation* self, cairo_t* cr, gint width, gint height);  static void _unity_places_place_search_navigation_draw_back_arrow_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self); -static gboolean _lambda33_ (UnityPlacesPlaceSearchNavigation* self); -static gboolean __lambda33__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self); +static gboolean _lambda35_ (UnityPlacesPlaceSearchNavigation* self); +static gboolean __lambda35__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);  static void _unity_places_place_search_navigation_draw_forward_arrow_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self); -static gboolean _lambda34_ (UnityPlacesPlaceSearchNavigation* self); -static gboolean __lambda34__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self); +static gboolean _lambda36_ (UnityPlacesPlaceSearchNavigation* self); +static gboolean __lambda36__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);  static GObject * unity_places_place_search_navigation_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_places_place_search_navigation_finalize (GObject* obj); @@ -1670,14 +1670,14 @@ void unity_places_place_search_navigation_set_active_entry (UnityPlacesPlaceSear 	UnityPlacesPlaceBrowserRemote* _tmp2_; 	connection = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch31_g_error; +	goto __catch32_g_error; 	} 	self->priv->remote = (_tmp2_ = unity_places_place_browser_remote_dbus_proxy_new (connection, unity_places_place_get_dbus_name (unity_places_place_entry_get_parent (entry)), path), _g_object_unref0 (self->priv->remote), _tmp2_); 	unity_places_place_search_navigation_refresh_states (self, NULL, NULL); 	_dbus_g_connection_unref0 (connection); 	} -	goto __finally31; -	__catch31_g_error: +	goto __finally32; +	__catch32_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -1691,7 +1691,7 @@ void unity_places_place_search_navigation_set_active_entry (UnityPlacesPlaceSear 	_g_error_free0 (e); 	} 	} -	__finally31: +	__finally32: 	if (_inner_error_ != NULL) { 	_g_free0 (path); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1761,7 +1761,7 @@ static gboolean unity_places_place_search_navigation_refresh_states_co (UnityPla 	data->states = (data->_tmp1_ = unity_places_place_browser_remote_get_state_finish (data->self->priv->remote, data->_res_, &data->_tmp0_, &data->_inner_error_), data->states_length1 = data->_tmp0_, data->_states_size_ = data->states_length1, data->_tmp1_); 	if (data->_inner_error_ != NULL) { 	if (data->_inner_error_->domain == DBUS_GERROR) { -	goto __catch32_dbus_gerror; +	goto __catch33_dbus_gerror; 	} 	g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -1771,8 +1771,8 @@ static gboolean unity_places_place_search_navigation_refresh_states_co (UnityPla 	data->self->priv->forward_sensitive = data->states[1].sensitive; 	data->states = (_vala_UnityPlacesPlaceBrowserRemoteState_array_free (data->states, data->states_length1), NULL); 	} -	goto __finally32; -	__catch32_dbus_gerror: +	goto __finally33; +	__catch33_dbus_gerror: 	{ 	data->e = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -1782,7 +1782,7 @@ static gboolean unity_places_place_search_navigation_refresh_states_co (UnityPla 	_g_error_free0 (data->e); 	} 	} -	__finally32: +	__finally33: 	if (data->_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -1850,7 +1850,7 @@ static gboolean unity_places_place_search_navigation_go_forward_co (UnityPlacesP 	data->states = (data->_tmp1_ = unity_places_place_browser_remote_go_forward_finish (data->self->priv->remote, data->_res_, &data->_tmp0_, &data->_inner_error_), data->states_length1 = data->_tmp0_, data->_states_size_ = data->states_length1, data->_tmp1_); 	if (data->_inner_error_ != NULL) { 	if (data->_inner_error_->domain == DBUS_GERROR) { -	goto __catch33_dbus_gerror; +	goto __catch34_dbus_gerror; 	} 	g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -1860,8 +1860,8 @@ static gboolean unity_places_place_search_navigation_go_forward_co (UnityPlacesP 	data->self->priv->forward_sensitive = data->states[1].sensitive; 	data->states = (_vala_UnityPlacesPlaceBrowserRemoteState_array_free (data->states, data->states_length1), NULL); 	} -	goto __finally33; -	__catch33_dbus_gerror: +	goto __finally34; +	__catch34_dbus_gerror: 	{ 	data->e = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -1871,7 +1871,7 @@ static gboolean unity_places_place_search_navigation_go_forward_co (UnityPlacesP 	_g_error_free0 (data->e); 	} 	} -	__finally33: +	__finally34: 	if (data->_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -1939,7 +1939,7 @@ static gboolean unity_places_place_search_navigation_go_back_co (UnityPlacesPlac 	data->states = (data->_tmp1_ = unity_places_place_browser_remote_go_back_finish (data->self->priv->remote, data->_res_, &data->_tmp0_, &data->_inner_error_), data->states_length1 = data->_tmp0_, data->_states_size_ = data->states_length1, data->_tmp1_); 	if (data->_inner_error_ != NULL) { 	if (data->_inner_error_->domain == DBUS_GERROR) { -	goto __catch34_dbus_gerror; +	goto __catch35_dbus_gerror; 	} 	g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -1949,8 +1949,8 @@ static gboolean unity_places_place_search_navigation_go_back_co (UnityPlacesPlac 	data->self->priv->forward_sensitive = data->states[1].sensitive; 	data->states = (_vala_UnityPlacesPlaceBrowserRemoteState_array_free (data->states, data->states_length1), NULL); 	} -	goto __finally34; -	__catch34_dbus_gerror: +	goto __finally35; +	__catch35_dbus_gerror: 	{ 	data->e = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -1960,7 +1960,7 @@ static gboolean unity_places_place_search_navigation_go_back_co (UnityPlacesPlac 	_g_error_free0 (data->e); 	} 	} -	__finally34: +	__finally35: 	if (data->_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -2037,7 +2037,7 @@ static void _unity_places_place_search_navigation_draw_back_arrow_unity_cairo_ca  } -static gboolean _lambda33_ (UnityPlacesPlaceSearchNavigation* self) { +static gboolean _lambda35_ (UnityPlacesPlaceSearchNavigation* self) { 	gboolean result = FALSE; 	gboolean _tmp0_ = FALSE; 	if (self->priv->remote != NULL) { @@ -2053,9 +2053,9 @@ static gboolean _lambda33_ (UnityPlacesPlaceSearchNavigation* self) {  } -static gboolean __lambda33__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { +static gboolean __lambda35__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { 	gboolean result; -	result = _lambda33_ (self); +	result = _lambda35_ (self); 	return result;  } @@ -2065,7 +2065,7 @@ static void _unity_places_place_search_navigation_draw_forward_arrow_unity_cairo  } -static gboolean _lambda34_ (UnityPlacesPlaceSearchNavigation* self) { +static gboolean _lambda36_ (UnityPlacesPlaceSearchNavigation* self) { 	gboolean result = FALSE; 	gboolean _tmp0_ = FALSE; 	if (self->priv->remote != NULL) { @@ -2081,9 +2081,9 @@ static gboolean _lambda34_ (UnityPlacesPlaceSearchNavigation* self) {  } -static gboolean __lambda34__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { +static gboolean __lambda36__clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { 	gboolean result; -	result = _lambda34_ (self); +	result = _lambda36_ (self); 	return result;  } @@ -2103,11 +2103,11 @@ static GObject * unity_places_place_search_navigation_constructor (GType type, g 	ClutterColor _tmp4_; 	self->priv->back = (_tmp0_ = g_object_ref_sink (unity_cairo_canvas_new (_unity_places_place_search_navigation_draw_back_arrow_unity_cairo_canvas_cairo_canvas_paint, self)), _g_object_unref0 (self->priv->back), _tmp0_); 	clutter_actor_set_reactive ((ClutterActor*) self->priv->back, TRUE); -	g_signal_connect_object ((ClutterActor*) self->priv->back, "button-release-event", (GCallback) __lambda33__clutter_actor_button_release_event, self, 0); +	g_signal_connect_object ((ClutterActor*) self->priv->back, "button-release-event", (GCallback) __lambda35__clutter_actor_button_release_event, self, 0); 	ctk_box_pack ((CtkBox*) self, (ClutterActor*) self->priv->back, TRUE, TRUE); 	clutter_actor_show ((ClutterActor*) self->priv->back); 	self->priv->forward = (_tmp1_ = g_object_ref_sink (unity_cairo_canvas_new (_unity_places_place_search_navigation_draw_forward_arrow_unity_cairo_canvas_cairo_canvas_paint, self)), _g_object_unref0 (self->priv->forward), _tmp1_); -	g_signal_connect_object ((ClutterActor*) self->priv->forward, "button-release-event", (GCallback) __lambda34__clutter_actor_button_release_event, self, 0); +	g_signal_connect_object ((ClutterActor*) self->priv->forward, "button-release-event", (GCallback) __lambda36__clutter_actor_button_release_event, self, 0); 	ctk_box_pack ((CtkBox*) self, (ClutterActor*) self->priv->forward, TRUE, TRUE); 	clutter_actor_show ((ClutterActor*) self->priv->forward); 	self->priv->glow = (_tmp2_ = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ()), _g_object_unref0 (self->priv->glow), _tmp2_); diff --git a/unity-private/places/places-place-search-sections-bar.c b/unity-private/places/places-place-search-sections-bar.c index a27d735df..af4c5562f 100644 --- a/unity-private/places/places-place-search-sections-bar.c +++ b/unity-private/places/places-place-search-sections-bar.c @@ -79,6 +79,8 @@ typedef struct _UnityPlacesSectionClass UnityPlacesSectionClass;  #define _g_free0(var) (var = (g_free (var), NULL))  typedef struct _UnityPlacesSectionPrivate UnityPlacesSectionPrivate;  #define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL))) +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))  typedef enum { 	UNITY_PLACES_SECTION_STYLE_BUTTONS, @@ -212,7 +214,7 @@ DeeModelIter* unity_places_section_get_iter (UnityPlacesSection* self);  UnityPlacesSection* unity_places_section_new (DeeModel* model, DeeModelIter* iter);  UnityPlacesSection* unity_places_section_construct (GType object_type, DeeModel* model, DeeModelIter* iter);  static gboolean unity_places_place_search_sections_bar_on_section_clicked (UnityPlacesPlaceSearchSectionsBar* self, ClutterActor* actor, ClutterEvent* e); -static gboolean _unity_places_place_search_sections_bar_on_section_clicked_clutter_actor_button_press_event (ClutterActor* _sender, ClutterEvent* event, gpointer self); +static gboolean _unity_places_place_search_sections_bar_on_section_clicked_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);  void unity_places_place_entry_set_active_section (UnityPlacesPlaceEntry* self, guint section_id);  static UnityPlacesSection* unity_places_place_search_sections_bar_get_section_for_iter (UnityPlacesPlaceSearchSectionsBar* self, DeeModelIter* iter);  static void unity_places_place_search_sections_bar_paint_bg (UnityPlacesPlaceSearchSectionsBar* self, cairo_t* cr, gint width, gint height); @@ -235,6 +237,10 @@ enum {  };  #define UNITY_PLACES_SECTION_PADDING 4.0f  static void unity_places_section_real_get_preferred_width (ClutterActor* base, float for_height, float* min_width, float* nat_width); +static gboolean unity_places_section_real_enter_event (ClutterActor* base, ClutterEvent* e); +static gboolean unity_places_section_real_leave_event (ClutterActor* base, ClutterEvent* e); +static gboolean unity_places_section_real_button_press_event (ClutterActor* base, ClutterEvent* e); +static gboolean unity_places_section_real_button_release_event (ClutterActor* base, ClutterEvent* e);  static void unity_places_section_paint_bg (UnityPlacesSection* self, cairo_t* cr, gint width, gint height);  const char* unity_places_section_get_name (UnityPlacesSection* self);  void unity_places_section_set_name (UnityPlacesSection* self, const char* value); @@ -243,6 +249,8 @@ void unity_places_section_set_destroy_factor (UnityPlacesSection* self, float va  float unity_places_section_get_resize_factor (UnityPlacesSection* self);  void unity_places_section_set_resize_factor (UnityPlacesSection* self, float value);  static void _unity_places_section_paint_bg_unity_cairo_canvas_cairo_canvas_paint (cairo_t* cr, gint width, gint height, gpointer self); +static void _lambda39_ (UnityPlacesSection* self); +static void __lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);  static GObject * unity_places_section_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_places_section_finalize (GObject* obj);  static void unity_places_section_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -452,7 +460,7 @@ static gint unity_places_place_search_sections_bar_sort_sections (UnityPlacesSec  } -static gboolean _unity_places_place_search_sections_bar_on_section_clicked_clutter_actor_button_press_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { +static gboolean _unity_places_place_search_sections_bar_on_section_clicked_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) { 	gboolean result; 	result = unity_places_place_search_sections_bar_on_section_clicked (self, _sender, event); 	return result; @@ -468,7 +476,7 @@ static void unity_places_place_search_sections_bar_on_section_added (UnityPlaces 	section = g_object_ref_sink (unity_places_section_new (model, iter)); 	ctk_box_pack ((CtkBox*) self, (ClutterActor*) section, FALSE, TRUE); 	clutter_actor_show ((ClutterActor*) section); -	g_signal_connect_object ((ClutterActor*) section, "button-press-event", (GCallback) _unity_places_place_search_sections_bar_on_section_clicked_clutter_actor_button_press_event, self, 0); +	g_signal_connect_object ((ClutterActor*) section, "button-release-event", (GCallback) _unity_places_place_search_sections_bar_on_section_clicked_clutter_actor_button_release_event, self, 0); 	if (self->priv->active_section == NULL) { 	_tmp0_ = self->_style == UNITY_PLACES_SECTION_STYLE_BUTTONS; 	} else { @@ -878,6 +886,50 @@ static void unity_places_section_real_get_preferred_width (ClutterActor* base, f  } +static gboolean unity_places_section_real_enter_event (ClutterActor* base, ClutterEvent* e) { +	UnityPlacesSection * self; +	gboolean result = FALSE; +	self = (UnityPlacesSection*) base; +	ctk_actor_set_state ((CtkActor*) self, CTK_STATE_PRELIGHT); +	unity_cairo_canvas_update (self->priv->bg); +	result = TRUE; +	return result; +} + + +static gboolean unity_places_section_real_leave_event (ClutterActor* base, ClutterEvent* e) { +	UnityPlacesSection * self; +	gboolean result = FALSE; +	self = (UnityPlacesSection*) base; +	ctk_actor_set_state ((CtkActor*) self, CTK_STATE_NORMAL); +	unity_cairo_canvas_update (self->priv->bg); +	result = TRUE; +	return result; +} + + +static gboolean unity_places_section_real_button_press_event (ClutterActor* base, ClutterEvent* e) { +	UnityPlacesSection * self; +	gboolean result = FALSE; +	self = (UnityPlacesSection*) base; +	ctk_actor_set_state ((CtkActor*) self, CTK_STATE_SELECTED); +	unity_cairo_canvas_update (self->priv->bg); +	result = FALSE; +	return result; +} + + +static gboolean unity_places_section_real_button_release_event (ClutterActor* base, ClutterEvent* e) { +	UnityPlacesSection * self; +	gboolean result = FALSE; +	self = (UnityPlacesSection*) base; +	ctk_actor_set_state ((CtkActor*) self, CTK_STATE_PRELIGHT); +	unity_cairo_canvas_update (self->priv->bg); +	result = FALSE; +	return result; +} + +  static void unity_places_section_paint_bg (UnityPlacesSection* self, cairo_t* cr, gint width, gint height) { 	gint x; 	gint y; @@ -897,7 +949,9 @@ static void unity_places_section_paint_bg (UnityPlacesSection* self, cairo_t* cr 	height = height - 1; 	radius = 10; 	if (unity_places_place_search_sections_bar_get_style ((_tmp0_ = clutter_actor_get_parent ((ClutterActor*) self), UNITY_PLACES_IS_PLACE_SEARCH_SECTIONS_BAR (_tmp0_) ? ((UnityPlacesPlaceSearchSectionsBar*) _tmp0_) : NULL)) == UNITY_PLACES_SECTION_STYLE_BUTTONS) { -	cairo_line_to (cr, (double) x, (double) (y + radius)); +	gboolean _tmp1_ = FALSE; +	double _tmp2_ = 0.0; +	cairo_move_to (cr, (double) x, (double) (y + radius)); 	cairo_curve_to (cr, (double) x, (double) y, (double) x, (double) y, (double) (x + radius), (double) y); 	cairo_line_to (cr, (double) (width - radius), (double) y); 	cairo_curve_to (cr, (double) width, (double) y, (double) width, (double) y, (double) width, (double) (y + radius)); @@ -906,8 +960,45 @@ static void unity_places_section_paint_bg (UnityPlacesSection* self, cairo_t* cr 	cairo_line_to (cr, (double) (x + radius), (double) height); 	cairo_curve_to (cr, (double) x, (double) height, (double) x, (double) height, (double) x, (double) (height - radius)); 	cairo_close_path (cr); -	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0); +	if (unity_places_section_get_active (self)) { +	_tmp1_ = TRUE; +	} else { +	_tmp1_ = ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_SELECTED; +	} +	if (_tmp1_) { +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0); +	} else { +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_PRELIGHT) { +	cairo_surface_t* pattern; +	cairo_t* context; +	cairo_pattern_t* pat; +	pattern = cairo_surface_create_similar (cairo_get_target (cr), CAIRO_CONTENT_COLOR_ALPHA, 4, 4); +	context = cairo_create (pattern); +	cairo_set_operator (context, CAIRO_OPERATOR_CLEAR); +	cairo_paint (context); +	cairo_set_line_width (context, 0.2); +	cairo_set_operator (context, CAIRO_OPERATOR_OVER); +	cairo_set_source_rgba (context, 1.0, 1.0, 1.0, 0.85); +	cairo_move_to (context, (double) 0, (double) 0); +	cairo_line_to (context, (double) 4, (double) 4); +	cairo_stroke (context); +	pat = cairo_pattern_create_for_surface (pattern); +	cairo_pattern_set_extend (pat, CAIRO_EXTEND_REPEAT); +	cairo_set_source (cr, pat); +	_cairo_pattern_destroy0 (pat); +	_cairo_destroy0 (context); +	_cairo_surface_destroy0 (pattern); +	} else { +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.0); +	} +	} 	cairo_fill_preserve (cr); +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_NORMAL) { +	_tmp2_ = 0.0; +	} else { +	_tmp2_ = 0.5; +	} +	cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, _tmp2_); 	cairo_stroke (cr); 	} else { 	} @@ -941,22 +1032,18 @@ gboolean unity_places_section_get_active (UnityPlacesSection* self) {  void unity_places_section_set_active (UnityPlacesSection* self, gboolean value) { 	g_return_if_fail (self != NULL); 	if (self->priv->_active != value) { -	ClutterAnimationMode mode; -	gint opacity; -	ClutterColor _tmp0_ = {0}; 	self->priv->_active = value; -	mode = CLUTTER_EASE_OUT_QUAD; -	opacity = 0; -	self->priv->color = (_tmp0_.red = (guint8) 255, _tmp0_.green = (guint8) 255, _tmp0_.blue = (guint8) 255, _tmp0_.alpha = (guint8) 255, _tmp0_); 	if (self->priv->_active) { -	ClutterColor _tmp1_ = {0}; -	self->priv->color = (_tmp1_.red = (guint8) 50, _tmp1_.green = (guint8) 50, _tmp1_.blue = (guint8) 50, _tmp1_.alpha = (guint8) 255, _tmp1_); -	mode = CLUTTER_EASE_IN_QUAD; -	opacity = 255; +	ClutterColor _tmp0_ = {0}; +	ClutterColor _tmp1_; +	clutter_text_set_color ((ClutterText*) self->text, (_tmp1_ = (_tmp0_.red = (guint8) 50, _tmp0_.green = (guint8) 50, _tmp0_.blue = (guint8) 50, _tmp0_.alpha = (guint8) 255, _tmp0_), &_tmp1_)); +	} else { +	ClutterColor _tmp2_ = {0}; +	ClutterColor _tmp3_; +	clutter_text_set_color ((ClutterText*) self->text, (_tmp3_ = (_tmp2_.red = (guint8) 255, _tmp2_.green = (guint8) 255, _tmp2_.blue = (guint8) 255, _tmp2_.alpha = (guint8) 255, _tmp2_), &_tmp3_)); 	} -	clutter_text_set_color ((ClutterText*) self->text, &self->priv->color); -	clutter_actor_animate ((ClutterActor*) self->priv->bg->texture, (gulong) mode, (guint) 100, "opacity", opacity, NULL); 	} +	unity_cairo_canvas_update (self->priv->bg); 	g_object_notify ((GObject *) self, "active");  } @@ -1028,6 +1115,27 @@ static void _unity_places_section_paint_bg_unity_cairo_canvas_cairo_canvas_paint  } +static void _lambda39_ (UnityPlacesSection* self) { +	if (unity_places_section_get_active (self)) { +	return; +	} +	if (ctk_actor_get_state ((CtkActor*) self) == CTK_STATE_SELECTED) { +	ClutterColor _tmp0_ = {0}; +	ClutterColor _tmp1_; +	clutter_text_set_color ((ClutterText*) self->text, (_tmp1_ = (_tmp0_.red = (guint8) 50, _tmp0_.green = (guint8) 50, _tmp0_.blue = (guint8) 50, _tmp0_.alpha = (guint8) 200, _tmp0_), &_tmp1_)); +	} else { +	ClutterColor _tmp2_ = {0}; +	ClutterColor _tmp3_; +	clutter_text_set_color ((ClutterText*) self->text, (_tmp3_ = (_tmp2_.red = (guint8) 255, _tmp2_.green = (guint8) 255, _tmp2_.blue = (guint8) 255, _tmp2_.alpha = (guint8) 255, _tmp2_), &_tmp3_)); +	} +} + + +static void __lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { +	_lambda39_ (self); +} + +  static GObject * unity_places_section_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { 	GObject * obj; 	GObjectClass * parent_class; @@ -1047,7 +1155,6 @@ static GObject * unity_places_section_constructor (GType type, guint n_construct 	ctk_actor_set_padding ((CtkActor*) self, (_tmp1_ = (_tmp0_.top = UNITY_PLACES_SECTION_PADDING, _tmp0_.right = UNITY_PLACES_SECTION_PADDING, _tmp0_.bottom = UNITY_PLACES_SECTION_PADDING, _tmp0_.left = UNITY_PLACES_SECTION_PADDING, _tmp0_), &_tmp1_)); 	self->priv->bg = (_tmp2_ = g_object_ref_sink (unity_cairo_canvas_new (_unity_places_section_paint_bg_unity_cairo_canvas_cairo_canvas_paint, self)), _g_object_unref0 (self->priv->bg), _tmp2_); 	ctk_actor_set_background ((CtkActor*) self, (ClutterActor*) self->priv->bg); -	clutter_actor_set_opacity ((ClutterActor*) self->priv->bg->texture, (guint8) 0); 	clutter_actor_show ((ClutterActor*) self->priv->bg); 	self->priv->glow = (_tmp3_ = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ()), _g_object_unref0 (self->priv->glow), _tmp3_); 	ctk_effect_glow_set_color (self->priv->glow, (_tmp5_ = (_tmp4_.red = (guint8) 255, _tmp4_.green = (guint8) 255, _tmp4_.blue = (guint8) 255, _tmp4_.alpha = (guint8) 255, _tmp4_), &_tmp5_)); @@ -1056,6 +1163,7 @@ static GObject * unity_places_section_constructor (GType type, guint n_construct 	self->text = (_tmp6_ = g_object_ref_sink ((CtkText*) ctk_text_new (dee_model_get_string (self->priv->_model, self->priv->_iter, (guint) 0))), _g_object_unref0 (self->text), _tmp6_); 	clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->text); 	clutter_actor_show ((ClutterActor*) self->text); +	g_signal_connect_object ((GObject*) self, "notify::state", (GCallback) __lambda39__g_object_notify, self, 0); 	} 	return obj;  } @@ -1065,6 +1173,10 @@ static void unity_places_section_class_init (UnityPlacesSectionClass * klass) { 	unity_places_section_parent_class = g_type_class_peek_parent (klass); 	g_type_class_add_private (klass, sizeof (UnityPlacesSectionPrivate)); 	CLUTTER_ACTOR_CLASS (klass)->get_preferred_width = unity_places_section_real_get_preferred_width; +	CLUTTER_ACTOR_CLASS (klass)->enter_event = unity_places_section_real_enter_event; +	CLUTTER_ACTOR_CLASS (klass)->leave_event = unity_places_section_real_leave_event; +	CLUTTER_ACTOR_CLASS (klass)->button_press_event = unity_places_section_real_button_press_event; +	CLUTTER_ACTOR_CLASS (klass)->button_release_event = unity_places_section_real_button_release_event; 	G_OBJECT_CLASS (klass)->get_property = unity_places_section_get_property; 	G_OBJECT_CLASS (klass)->set_property = unity_places_section_set_property; 	G_OBJECT_CLASS (klass)->constructor = unity_places_section_constructor; diff --git a/unity-private/places/places-place-search-sections-bar.vala b/unity-private/places/places-place-search-sections-bar.vala index 1ff8c8d78..308f8f187 100644 --- a/unity-private/places/places-place-search-sections-bar.vala +++ b/unity-private/places/places-place-search-sections-bar.vala @@ -183,7 +183,7 @@ namespace Unity.Places  pack (section, false, true);  section.show (); - section.button_press_event.connect (on_section_clicked); + section.button_release_event.connect (on_section_clicked);  if (active_section == null && _style == SectionStyle.BUTTONS)  { @@ -377,20 +377,14 @@ namespace Unity.Places  {  _active = value; - Clutter.AnimationMode mode = Clutter.AnimationMode.EASE_OUT_QUAD; - int opacity = 0; - color = { 255, 255, 255, 255 }; -  if (_active) - { - color = { 50, 50, 50, 255 }; - mode = Clutter.AnimationMode.EASE_IN_QUAD; - opacity = 255; - } - - text.color = color; - bg.texture.animate (mode, 100, "opacity", opacity); + text.color = { 50, 50, 50, 255 }; + else + text.color= { 255, 255, 255, 255 }; +  } + + bg.update ();  }  } @@ -427,7 +421,6 @@ namespace Unity.Places  bg = new CairoCanvas (paint_bg);  set_background (bg); - bg.texture.opacity = 0;  bg.show ();  glow = new Ctk.EffectGlow (); @@ -439,6 +432,16 @@ namespace Unity.Places  text = new Ctk.Text (model.get_string (iter, 0));  add_actor (text);  text.show (); + + notify["state"].connect (() => { + if (active) + return; + + if (state == Ctk.ActorState.STATE_SELECTED) + text.color = { 50, 50, 50, 200 }; + else + text.color = { 255, 255, 255, 255 }; + });  }  public void start_destroy () @@ -477,6 +480,34 @@ namespace Unity.Places  }  } + private override bool enter_event (Clutter.Event e) + { + state = Ctk.ActorState.STATE_PRELIGHT; + bg.update (); + return true; + } + + private override bool leave_event (Clutter.Event e) + { + state = Ctk.ActorState.STATE_NORMAL; + bg.update (); + return true; + } + + private override bool button_press_event (Clutter.Event e) + { + state = Ctk.ActorState.STATE_SELECTED; + bg.update (); + return false; + } + + private override bool button_release_event (Clutter.Event e) + { + state = Ctk.ActorState.STATE_PRELIGHT; + bg.update (); + return false; + } +  private void paint_bg (Cairo.Context cr, int width, int height)  {  cr.set_operator (Cairo.Operator.CLEAR); @@ -496,7 +527,7 @@ namespace Unity.Places  if ((get_parent () as PlaceSearchSectionsBar).style == SectionStyle.BUTTONS)  { - cr.line_to (x, y + radius); + cr.move_to (x, y + radius);  cr.curve_to (x, y,  x, y,  x + radius, y); @@ -514,9 +545,43 @@ namespace Unity.Places  x, height - radius);  cr.close_path (); - cr.set_source_rgba (1.0, 1.0, 1.0, 1.0); + if (active || state == Ctk.ActorState.STATE_SELECTED) + { + cr.set_source_rgba (1.0, 1.0, 1.0, 1.0); + } + else if (state == Ctk.ActorState.STATE_PRELIGHT) + { + var pattern = new Cairo.Surface.similar (cr.get_target (), + Cairo.Content.COLOR_ALPHA, + 4, 4); + var context = new Cairo.Context (pattern); +  + context.set_operator (Cairo.Operator.CLEAR); + context.paint (); + + context.set_line_width (0.2); + context.set_operator (Cairo.Operator.OVER); + context.set_source_rgba (1.0, 1.0, 1.0, 0.85); + + context.move_to (0, 0); + context.line_to (4, 4); + + context.stroke (); + + var pat = new Cairo.Pattern.for_surface (pattern); + pat.set_extend (Cairo.Extend.REPEAT); + cr.set_source (pat); + } + else + { + cr.set_source_rgba (1.0, 1.0, 1.0, 0.0); + } +  cr.fill_preserve (); - cr.stroke (); + + cr.set_source_rgba (1.0, 1.0, 1.0, + state == Ctk.ActorState.STATE_NORMAL ? 0.0 : 0.5); + cr.stroke ();   }  else  { diff --git a/unity-private/places/places-place.c b/unity-private/places/places-place.c index 6d5c2898a..cb68ea119 100644 --- a/unity-private/places/places-place.c +++ b/unity-private/places/places-place.c @@ -194,7 +194,7 @@ void _dynamic_EntryAdded5_connect (gpointer obj, const char * signal_name, GCall  static void unity_places_place_on_service_entry_removed (UnityPlacesPlace* self, DBusGProxy* dbus_object, const char* entry_path);  static void _unity_places_place_on_service_entry_removed_dynamic_EntryRemoved6_ (DBusGProxy* _sender, const char* entry_path, gpointer self);  void _dynamic_EntryRemoved7_connect (gpointer obj, const char * signal_name, GCallback handler, gpointer data); -static gboolean _lambda16_ (UnityPlacesPlace* self); +static gboolean _lambda17_ (UnityPlacesPlace* self);  static GValueArray** _dynamic_get_entries0 (DBusGProxy* self, int* result_length1, GError** error);  GType unity_places_place_entry_dbus_get_type (void) G_GNUC_CONST;  const char* unity_places_place_entry_dbus_get_dbus_path (UnityPlacesPlaceEntryDbus* self); @@ -202,7 +202,7 @@ void unity_places_place_entry_dbus_update_info (UnityPlacesPlaceEntryDbus* self,  void unity_places_place_entry_connect (UnityPlacesPlaceEntry* self);  void unity_places_place_entry_set_parent (UnityPlacesPlaceEntry* self, UnityPlacesPlace* value);  gboolean unity_places_place_entry_get_online (UnityPlacesPlaceEntry* self); -static gboolean __lambda16__gsource_func (gpointer self); +static gboolean __lambda17__gsource_func (gpointer self);  void unity_places_place_set_online (UnityPlacesPlace* self, gboolean value);  GType unity_places_activation_status_get_type (void) G_GNUC_CONST;  UnityPlacesActivationStatus unity_places_place_activate (UnityPlacesPlace* self, const char* uri, const char* mimetype); @@ -272,12 +272,12 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	UnityPlacesPlace* place; 	dbus_name = g_key_file_get_string (file, UNITY_PLACES_PLACE_PLACE_GROUP, "DBusName", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch20_g_error; +	goto __catch21_g_error; 	} 	dbus_path = g_key_file_get_string (file, UNITY_PLACES_PLACE_PLACE_GROUP, "DBusObjectPath", &_inner_error_); 	if (_inner_error_ != NULL) { 	_g_free0 (dbus_name); -	goto __catch20_g_error; +	goto __catch21_g_error; 	} 	place = unity_places_place_new (dbus_name, dbus_path); 	unity_places_place_load_keyfile_entries (place, file); @@ -288,7 +288,7 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	gboolean _tmp4_ = FALSE; 	uri_match = g_key_file_get_string (file, UNITY_PLACES_PLACE_ACTIVATION_GROUP, "URIPattern", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch21_g_error; +	goto __catch22_g_error; 	} 	if (uri_match != NULL) { 	_tmp0_ = _vala_strcmp0 (uri_match, "") != 0; @@ -301,12 +301,12 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	GRegex* _tmp2_; 	_tmp1_ = g_regex_new (uri_match, 0, 0, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch22_g_error; +	goto __catch23_g_error; 	} 	place->uri_regex = (_tmp2_ = _tmp1_, _g_regex_unref0 (place->uri_regex), _tmp2_); 	} -	goto __finally22; -	__catch22_g_error: +	goto __finally23; +	__catch23_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -318,16 +318,16 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	_g_error_free0 (e); 	} 	} -	__finally22: +	__finally23: 	if (_inner_error_ != NULL) { 	_g_free0 (uri_match); -	goto __catch21_g_error; +	goto __catch22_g_error; 	} 	} 	mime_match = g_key_file_get_string (file, UNITY_PLACES_PLACE_ACTIVATION_GROUP, "MimetypePattern", &_inner_error_); 	if (_inner_error_ != NULL) { 	_g_free0 (uri_match); -	goto __catch21_g_error; +	goto __catch22_g_error; 	} 	if (mime_match != NULL) { 	_tmp4_ = _vala_strcmp0 (mime_match, "") != 0; @@ -340,12 +340,12 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	GRegex* _tmp6_; 	_tmp5_ = g_regex_new (mime_match, 0, 0, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch23_g_error; +	goto __catch24_g_error; 	} 	place->mime_regex = (_tmp6_ = _tmp5_, _g_regex_unref0 (place->mime_regex), _tmp6_); 	} -	goto __finally23; -	__catch23_g_error: +	goto __finally24; +	__catch24_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -357,18 +357,18 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	_g_error_free0 (e); 	} 	} -	__finally23: +	__finally24: 	if (_inner_error_ != NULL) { 	_g_free0 (mime_match); 	_g_free0 (uri_match); -	goto __catch21_g_error; +	goto __catch22_g_error; 	} 	} 	_g_free0 (mime_match); 	_g_free0 (uri_match); 	} -	goto __finally21; -	__catch21_g_error: +	goto __finally22; +	__catch22_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -377,12 +377,12 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	_g_error_free0 (e); 	} 	} -	__finally21: +	__finally22: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (place); 	_g_free0 (dbus_path); 	_g_free0 (dbus_name); -	goto __catch20_g_error; +	goto __catch21_g_error; 	} 	result = place; 	_g_free0 (dbus_path); @@ -390,8 +390,8 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	_g_free0 (errmsg); 	return result; 	} -	goto __finally20; -	__catch20_g_error: +	goto __finally21; +	__catch21_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -404,7 +404,7 @@ UnityPlacesPlace* unity_places_place_new_from_keyfile (GKeyFile* file, const cha 	return result; 	} 	} -	__finally20: +	__finally21: 	{ 	_g_free0 (errmsg); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -471,7 +471,7 @@ static gpointer _g_object_ref0 (gpointer self) {  } -static gboolean _lambda16_ (UnityPlacesPlace* self) { +static gboolean _lambda17_ (UnityPlacesPlace* self) { 	gboolean result = FALSE; 	gint entries_length1; 	gint _entries_size_; @@ -575,9 +575,9 @@ static gboolean _lambda16_ (UnityPlacesPlace* self) {  } -static gboolean __lambda16__gsource_func (gpointer self) { +static gboolean __lambda17__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda16_ (self); +	result = _lambda17_ (self); 	return result;  } @@ -594,13 +594,13 @@ void unity_places_place_connect (UnityPlacesPlace* self) { 	DBusGProxy* _tmp2_; 	_tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch24_g_error; +	goto __catch25_g_error; 	} 	self->priv->connection = (_tmp1_ = _tmp0_, _dbus_g_connection_unref0 (self->priv->connection), _tmp1_); 	self->priv->service = (_tmp2_ = dbus_g_proxy_new_for_name (self->priv->connection, self->priv->_dbus_name, self->priv->_dbus_path, "com.canonical.Unity.Place"), _g_object_unref0 (self->priv->service), _tmp2_); 	} -	goto __finally24; -	__catch24_g_error: +	goto __finally25; +	__catch25_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -613,7 +613,7 @@ void unity_places_place_connect (UnityPlacesPlace* self) { 	return; 	} 	} -	__finally24: +	__finally25: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -621,7 +621,7 @@ void unity_places_place_connect (UnityPlacesPlace* self) { 	} 	_dynamic_EntryAdded5_connect (self->priv->service, "EntryAdded", (GCallback) _unity_places_place_on_service_entry_added_dynamic_EntryAdded4_, self); 	_dynamic_EntryRemoved7_connect (self->priv->service, "EntryRemoved", (GCallback) _unity_places_place_on_service_entry_removed_dynamic_EntryRemoved6_, self); -	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda16__gsource_func, g_object_ref (self), g_object_unref); +	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda17__gsource_func, g_object_ref (self), g_object_unref); 	unity_places_place_set_online (self, TRUE);  } @@ -770,13 +770,13 @@ static gboolean unity_places_place_activate_fallback_co (UnityPlacesPlaceActivat 	data->_tmp0_ = unity_app_info_manager_lookup_finish (data->appinfos, data->_res_, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { 	_g_object_unref0 (data->appinfos); -	goto __catch25_g_error; +	goto __catch26_g_error; 	} 	data->info = (data->_tmp1_ = data->_tmp0_, _g_object_unref0 (data->info), data->_tmp1_); 	_g_object_unref0 (data->appinfos); 	} -	goto __finally25; -	__catch25_g_error: +	goto __finally26; +	__catch26_g_error: 	{ 	data->ee = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -797,7 +797,7 @@ static gboolean unity_places_place_activate_fallback_co (UnityPlacesPlaceActivat 	_g_error_free0 (data->ee); 	} 	} -	__finally25: +	__finally26: 	if (data->_inner_error_ != NULL) { 	_g_object_unref0 (data->info); 	_g_free0 (data->id); @@ -809,11 +809,11 @@ static gboolean unity_places_place_activate_fallback_co (UnityPlacesPlaceActivat 	{ 	g_app_info_launch (data->info, NULL, NULL, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { -	goto __catch26_g_error; +	goto __catch27_g_error; 	} 	} -	goto __finally26; -	__catch26_g_error: +	goto __finally27; +	__catch27_g_error: 	{ 	data->e = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -822,7 +822,7 @@ static gboolean unity_places_place_activate_fallback_co (UnityPlacesPlaceActivat 	_g_error_free0 (data->e); 	} 	} -	__finally26: +	__finally27: 	if (data->_inner_error_ != NULL) { 	_g_object_unref0 (data->info); 	_g_free0 (data->id); @@ -850,11 +850,11 @@ static gboolean unity_places_place_activate_fallback_co (UnityPlacesPlaceActivat 	{ 	gtk_show_uri (gdk_screen_get_default (), data->uri, (guint32) 0, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { -	goto __catch27_g_error; +	goto __catch28_g_error; 	} 	} -	goto __finally27; -	__catch27_g_error: +	goto __finally28; +	__catch28_g_error: 	{ 	data->eee = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -863,7 +863,7 @@ static gboolean unity_places_place_activate_fallback_co (UnityPlacesPlaceActivat 	_g_error_free0 (data->eee); 	} 	} -	__finally27: +	__finally28: 	if (data->_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -1004,7 +1004,7 @@ static UnityPlacesPlaceEntry* unity_places_place_load_entry_from_keyfile (UnityP 	char* _tmp10_; 	_tmp0_ = g_key_file_get_string (file, group, "DBusObjectPath", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch28_g_error; +	goto __catch29_g_error; 	} 	path = (_tmp1_ = _tmp0_, _g_free0 (path), _tmp1_); 	if (path == NULL) { @@ -1030,22 +1030,22 @@ static UnityPlacesPlaceEntry* unity_places_place_load_entry_from_keyfile (UnityP 	} 	_tmp5_ = g_key_file_get_string (file, group, "Name", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch28_g_error; +	goto __catch29_g_error; 	} 	name = (_tmp6_ = _tmp5_, _g_free0 (name), _tmp6_); 	_tmp7_ = g_key_file_get_string (file, group, "Icon", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch28_g_error; +	goto __catch29_g_error; 	} 	icon = (_tmp8_ = _tmp7_, _g_free0 (icon), _tmp8_); 	_tmp9_ = g_key_file_get_string (file, group, "Description", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch28_g_error; +	goto __catch29_g_error; 	} 	desc = (_tmp10_ = _tmp9_, _g_free0 (desc), _tmp10_); 	} -	goto __finally28; -	__catch28_g_error: +	goto __finally29; +	__catch29_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -1063,7 +1063,7 @@ static UnityPlacesPlaceEntry* unity_places_place_load_entry_from_keyfile (UnityP 	return result; 	} 	} -	__finally28: +	__finally29: 	if (_inner_error_ != NULL) { 	_g_free0 (desc); 	_g_free0 (icon); @@ -1078,17 +1078,17 @@ static UnityPlacesPlaceEntry* unity_places_place_load_entry_from_keyfile (UnityP 	gboolean _tmp13_; 	_tmp12_ = g_key_file_get_boolean (file, group, "ShowGlobal", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch29_g_error; +	goto __catch30_g_error; 	} 	show_global = _tmp12_; 	_tmp13_ = g_key_file_get_boolean (file, group, "ShowEntry", &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch29_g_error; +	goto __catch30_g_error; 	} 	show_entry = _tmp13_; 	} -	goto __finally29; -	__catch29_g_error: +	goto __finally30; +	__catch30_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -1099,7 +1099,7 @@ static UnityPlacesPlaceEntry* unity_places_place_load_entry_from_keyfile (UnityP 	_g_error_free0 (e); 	} 	} -	__finally29: +	__finally30: 	if (_inner_error_ != NULL) { 	_g_free0 (desc); 	_g_free0 (icon); diff --git a/unity-private/places/places-trash-controller.c b/unity-private/places/places-trash-controller.c index 190d18b4a..f9eb6a71b 100644 --- a/unity-private/places/places-trash-controller.c +++ b/unity-private/places/places-trash-controller.c @@ -193,12 +193,12 @@ UnityLauncherApplicationQuicklistController* unity_launcher_application_quicklis  GType unity_launcher_application_quicklist_controller_get_type (void) G_GNUC_CONST;  static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target);  static void unity_places_trash_controller_real_get_menu_navigation (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target); -static void _lambda61_ (UnityPlacesTrashController* self); -static void __lambda61__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); -static void _lambda62_ (UnityPlacesTrashController* self); +static void _lambda69_ (UnityPlacesTrashController* self); +static void __lambda69__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); +static void _lambda70_ (UnityPlacesTrashController* self);  static void unity_places_trash_controller_recursively_delete_contents (UnityPlacesTrashController* self, GFile* dir, GAsyncReadyCallback _callback_, gpointer _user_data_);  static void unity_places_trash_controller_recursively_delete_contents_finish (UnityPlacesTrashController* self, GAsyncResult* _res_); -static void __lambda62__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self); +static void __lambda70__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self);  static void unity_places_trash_controller_recursively_delete_contents_data_free (gpointer _data);  static void unity_places_trash_controller_recursively_delete_contents_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);  static gboolean unity_places_trash_controller_recursively_delete_contents_co (UnityPlacesTrashControllerRecursivelyDeleteContentsData* data); @@ -243,11 +243,11 @@ static void unity_places_trash_controller_real_activate (UnityLauncherScrollerCh 	{ 	gtk_show_uri (NULL, "trash://", clutter_get_current_event_time (), &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch35_g_error; +	goto __catch36_g_error; 	} 	} -	goto __finally35; -	__catch35_g_error: +	goto __finally36; +	__catch36_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -259,7 +259,7 @@ static void unity_places_trash_controller_real_activate (UnityLauncherScrollerCh 	_g_error_free0 (e); 	} 	} -	__finally35: +	__finally36: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -290,7 +290,7 @@ static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherSc 	GFileInfo* info; 	e = g_file_enumerate_children (self->priv->trash_dir, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch36_g_error; +	goto __catch37_g_error; 	} 	info = NULL; 	while (TRUE) { @@ -300,7 +300,7 @@ static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherSc 	if (_inner_error_ != NULL) { 	_g_object_unref0 (info); 	_g_object_unref0 (e); -	goto __catch36_g_error; +	goto __catch37_g_error; 	} 	if (!((info = (_tmp1_ = _tmp0_, _g_object_unref0 (info), _tmp1_)) != NULL)) { 	break; @@ -310,8 +310,8 @@ static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherSc 	_g_object_unref0 (info); 	_g_object_unref0 (e); 	} -	goto __finally36; -	__catch36_g_error: +	goto __finally37; +	__catch37_g_error: 	{ 	GError * _error_; 	_error_ = _inner_error_; @@ -321,7 +321,7 @@ static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherSc 	_g_error_free0 (_error_); 	} 	} -	__finally36: +	__finally37: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (root); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -349,16 +349,16 @@ static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherSc  } -static void _lambda61_ (UnityPlacesTrashController* self) { +static void _lambda69_ (UnityPlacesTrashController* self) { 	GError * _inner_error_ = NULL; 	{ 	gtk_show_uri (NULL, "trash://", clutter_get_current_event_time (), &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch37_g_error; +	goto __catch38_g_error; 	} 	} -	goto __finally37; -	__catch37_g_error: +	goto __finally38; +	__catch38_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -370,7 +370,7 @@ static void _lambda61_ (UnityPlacesTrashController* self) { 	_g_error_free0 (e); 	} 	} -	__finally37: +	__finally38: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -379,18 +379,18 @@ static void _lambda61_ (UnityPlacesTrashController* self) {  } -static void __lambda61__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { -	_lambda61_ (self); +static void __lambda69__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { +	_lambda69_ (self);  } -static void _lambda62_ (UnityPlacesTrashController* self) { +static void _lambda70_ (UnityPlacesTrashController* self) { 	unity_places_trash_controller_recursively_delete_contents (self, self->priv->trash_dir, NULL, NULL);  } -static void __lambda62__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { -	_lambda62_ (self); +static void __lambda70__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self) { +	_lambda70_ (self);  } @@ -408,7 +408,7 @@ static void unity_places_trash_controller_real_get_menu_navigation (UnityLaunche 	dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); 	dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); 	dbusmenu_menuitem_child_append (root, item); -	g_signal_connect_object (item, "item-activated", (GCallback) __lambda61__dbusmenu_menuitem_item_activated, self, 0); +	g_signal_connect_object (item, "item-activated", (GCallback) __lambda69__dbusmenu_menuitem_item_activated, self, 0); 	if (self->priv->n_items != 0) { 	DbusmenuMenuitem* _tmp1_; 	item = (_tmp1_ = dbusmenu_menuitem_new (), _g_object_unref0 (item), _tmp1_); @@ -416,7 +416,7 @@ static void unity_places_trash_controller_real_get_menu_navigation (UnityLaunche 	dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); 	dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); 	dbusmenu_menuitem_child_append (root, item); -	g_signal_connect_object (item, "item-activated", (GCallback) __lambda62__dbusmenu_menuitem_item_activated, self, 0); +	g_signal_connect_object (item, "item-activated", (GCallback) __lambda70__dbusmenu_menuitem_item_activated, self, 0); 	} 	callback (root, callback_target); 	_g_object_unref0 (item); @@ -490,7 +490,7 @@ static gboolean unity_places_trash_controller_recursively_delete_contents_co (Un 	_state_7: 	data->e = g_file_enumerate_children_finish (data->dir, data->_res_, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { -	goto __catch38_g_error; +	goto __catch39_g_error; 	} 	while (TRUE) { 	data->_state_ = 8; @@ -500,7 +500,7 @@ static gboolean unity_places_trash_controller_recursively_delete_contents_co (Un 	data->files = g_file_enumerator_next_files_finish (data->e, data->_res_, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { 	_g_object_unref0 (data->e); -	goto __catch38_g_error; +	goto __catch39_g_error; 	} 	if (data->files == NULL) { 	__g_list_free_g_object_unref0 (data->files); @@ -522,11 +522,11 @@ static gboolean unity_places_trash_controller_recursively_delete_contents_co (Un 	{ 	g_file_delete (data->child, NULL, &data->_inner_error_); 	if (data->_inner_error_ != NULL) { -	goto __catch39_g_error; +	goto __catch40_g_error; 	} 	} -	goto __finally39; -	__catch39_g_error: +	goto __finally40; +	__catch40_g_error: 	{ 	data->error_ = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -537,13 +537,13 @@ static gboolean unity_places_trash_controller_recursively_delete_contents_co (Un 	_g_error_free0 (data->error_); 	} 	} -	__finally39: +	__finally40: 	if (data->_inner_error_ != NULL) { 	_g_object_unref0 (data->child); 	_g_object_unref0 (data->info); 	__g_list_free_g_object_unref0 (data->files); 	_g_object_unref0 (data->e); -	goto __catch38_g_error; +	goto __catch39_g_error; 	} 	_g_object_unref0 (data->child); 	_g_object_unref0 (data->info); @@ -554,8 +554,8 @@ static gboolean unity_places_trash_controller_recursively_delete_contents_co (Un 	} 	_g_object_unref0 (data->e); 	} -	goto __finally38; -	__catch38_g_error: +	goto __finally39; +	__catch39_g_error: 	{ 	data->_error_ = data->_inner_error_; 	data->_inner_error_ = NULL; @@ -566,7 +566,7 @@ static gboolean unity_places_trash_controller_recursively_delete_contents_co (Un 	_g_error_free0 (data->_error_); 	} 	} -	__finally38: +	__finally39: 	if (data->_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code); 	g_clear_error (&data->_inner_error_); @@ -609,8 +609,8 @@ static GObject * unity_places_trash_controller_constructor (GType type, guint n_ 	GFile* _tmp0_; 	self->priv->trash_dir = (_tmp0_ = g_file_new_for_uri ("trash://"), _g_object_unref0 (self->priv->trash_dir), _tmp0_); 	} -	goto __finally40; -	__catch40_g_error: +	goto __finally41; +	__catch41_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -622,7 +622,7 @@ static GObject * unity_places_trash_controller_constructor (GType type, guint n_ 	_g_error_free0 (e); 	} 	} -	__finally40: +	__finally41: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); diff --git a/unity-private/places/places-view.c b/unity-private/places/places-view.c index 139bd70ac..223b0cf07 100644 --- a/unity-private/places/places-view.c +++ b/unity-private/places/places-view.c @@ -234,8 +234,8 @@ void unity_places_place_entry_set_active (UnityPlacesPlaceEntry* self, gboolean  static void unity_places_view_on_entry_renderer_info_changed (UnityPlacesView* self, UnityPlacesPlaceEntry* entry);  static void _unity_places_view_on_entry_renderer_info_changed_unity_places_place_entry_renderer_info_changed (UnityPlacesPlaceEntry* _sender, gpointer self);  static void unity_places_view_update_views (UnityPlacesView* self, UnityPlacesPlaceEntry* entry, guint section_id); -static void _lambda38_ (ClutterAnimation* a, UnityPlacesView* self); -static void __lambda38__clutter_animation_completed (ClutterAnimation* _sender, gpointer self); +static void _lambda41_ (ClutterAnimation* a, UnityPlacesView* self); +static void __lambda41__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);  static UnityPlaceRenderer* unity_places_view_lookup_renderer (UnityPlacesView* self, UnityPlacesPlaceEntry* entry);  DeeModel* unity_places_place_entry_get_entry_groups_model (UnityPlacesPlaceEntry* self);  DeeModel* unity_places_place_entry_get_entry_results_model (UnityPlacesPlaceEntry* self); @@ -352,15 +352,15 @@ static gpointer _g_object_ref0 (gpointer self) {  } -static void _lambda38_ (ClutterAnimation* a, UnityPlacesView* self) { +static void _lambda41_ (ClutterAnimation* a, UnityPlacesView* self) { 	GObject* _tmp0_; 	g_return_if_fail (a != NULL); 	clutter_actor_destroy ((_tmp0_ = clutter_animation_get_object (a), CLUTTER_IS_ACTOR (_tmp0_) ? ((ClutterActor*) _tmp0_) : NULL));  } -static void __lambda38__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) { -	_lambda38_ (_sender, self); +static void __lambda41__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) { +	_lambda41_ (_sender, self);  } @@ -376,7 +376,7 @@ static void unity_places_view_update_views (UnityPlacesView* self, UnityPlacesPl 	if (CLUTTER_IS_ACTOR (self->priv->renderer)) { 	ClutterAnimation* anim; 	anim = _g_object_ref0 (clutter_actor_animate ((ClutterActor*) self->priv->renderer, (gulong) CLUTTER_EASE_OUT_QUAD, (guint) 300, "opacity", 0, NULL)); -	g_signal_connect_object (anim, "completed", (GCallback) __lambda38__clutter_animation_completed, self, 0); +	g_signal_connect_object (anim, "completed", (GCallback) __lambda41__clutter_animation_completed, self, 0); 	_g_object_unref0 (anim); 	} 	self->priv->renderer = (_tmp0_ = unity_places_view_lookup_renderer (self, entry), _g_object_unref0 (self->priv->renderer), _tmp0_); diff --git a/unity-private/places/places-view.vala b/unity-private/places/places-view.vala index 3b7dc8834..7e87a51ca 100644 --- a/unity-private/places/places-view.vala +++ b/unity-private/places/places-view.vala @@ -123,7 +123,7 @@ namespace Unity.Places  300,  "opacity", 0);  anim.completed.connect ((a)=> { - (a.get_object () as Clutter.Actor).destroy (); + (a.get_object () as Clutter.Actor).destroy ();  });  } diff --git a/unity-private/places/places-volume-child-controller.c b/unity-private/places/places-volume-child-controller.c index 2981d223b..be1a8900b 100644 --- a/unity-private/places/places-volume-child-controller.c +++ b/unity-private/places/places-volume-child-controller.c @@ -284,11 +284,11 @@ static void unity_places_volume_child_controller_open_volume (UnityPlacesVolumeC 	g_app_info_launch_default_for_uri (_tmp0_ = g_file_get_uri (loc), NULL, &_inner_error_); 	_g_free0 (_tmp0_); 	if (_inner_error_ != NULL) { -	goto __catch41_g_error; +	goto __catch42_g_error; 	} 	} -	goto __finally41; -	__catch41_g_error: +	goto __finally42; +	__catch42_g_error: 	{ 	GError * err; 	err = _inner_error_; @@ -300,7 +300,7 @@ static void unity_places_volume_child_controller_open_volume (UnityPlacesVolumeC 	_g_error_free0 (err); 	} 	} -	__finally41: +	__finally42: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (loc); 	_g_free0 (error_msg); @@ -328,7 +328,7 @@ static void unity_places_volume_child_controller_open_volume (UnityPlacesVolumeC 	g_app_info_launch_default_for_uri (_tmp4_ = g_file_get_uri (g_mount_get_root (mount)), NULL, &_inner_error_); 	_g_free0 (_tmp4_); 	if (_inner_error_ != NULL) { -	goto __catch42_g_error; +	goto __catch43_g_error; 	} 	} else { 	char* _tmp5_; @@ -336,8 +336,8 @@ static void unity_places_volume_child_controller_open_volume (UnityPlacesVolumeC 	_g_free0 (_tmp5_); 	} 	} -	goto __finally42; -	__catch42_g_error: +	goto __finally43; +	__catch43_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -349,7 +349,7 @@ static void unity_places_volume_child_controller_open_volume (UnityPlacesVolumeC 	_g_error_free0 (e); 	} 	} -	__finally42: +	__finally43: 	if (_inner_error_ != NULL) { 	_g_free0 (error_msg); 	_g_object_unref0 (mount); diff --git a/unity-private/testing/background.c b/unity-private/testing/background.c index 497c5f7ae..848fc678b 100644 --- a/unity-private/testing/background.c +++ b/unity-private/testing/background.c @@ -94,9 +94,9 @@ enum {  UnityTestingBackground* unity_testing_background_new (void);  UnityTestingBackground* unity_testing_background_construct (GType object_type);  static void _unity_testing_background_on_allocation_changed (UnityTestingBackground* self); -static gboolean _lambda85_ (UnityTestingBackground* self); +static gboolean _lambda93_ (UnityTestingBackground* self);  static void _unity_testing_background_update_gradient (UnityTestingBackground* self); -static gboolean __lambda85__gsource_func (gpointer self); +static gboolean __lambda93__gsource_func (gpointer self);  static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* self, GConfClient* client, guint cxnid, GConfEntry* entry);  static void __unity_testing_background_on_gconf_changed_gconf_client_notify_func (GConfClient* client, guint cnxn_id, GConfEntry* entry, gpointer self);  static void __unity_testing_background_on_allocation_changed_clutter_actor_allocation_changed (ClutterActor* _sender, const ClutterActorBox* box, ClutterAllocationFlags flags, gpointer self); @@ -118,7 +118,7 @@ UnityTestingBackground* unity_testing_background_new (void) {  } -static gboolean _lambda85_ (UnityTestingBackground* self) { +static gboolean _lambda93_ (UnityTestingBackground* self) { 	gboolean result = FALSE; 	_unity_testing_background_update_gradient (self); 	result = FALSE; @@ -126,16 +126,16 @@ static gboolean _lambda85_ (UnityTestingBackground* self) {  } -static gboolean __lambda85__gsource_func (gpointer self) { +static gboolean __lambda93__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda85_ (self); +	result = _lambda93_ (self); 	return result;  }  static void _unity_testing_background_on_allocation_changed (UnityTestingBackground* self) { 	g_return_if_fail (self != NULL); -	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda85__gsource_func, g_object_ref (self), g_object_unref); +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda93__gsource_func, g_object_ref (self), g_object_unref);  } @@ -183,12 +183,12 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	char* _tmp1_; 	_tmp0_ = gconf_client_get_string (self->priv->client, self->priv->BG_PIC_OPTS, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch54_g_error; +	goto __catch55_g_error; 	} 	new_value = (_tmp1_ = _tmp0_, _g_free0 (new_value), _tmp1_); 	} -	goto __finally54; -	__catch54_g_error: +	goto __finally55; +	__catch55_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -199,7 +199,7 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	_g_error_free0 (e); 	} 	} -	__finally54: +	__finally55: 	if (_inner_error_ != NULL) { 	_g_free0 (new_value); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -216,12 +216,12 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	char* _tmp5_; 	_tmp4_ = gconf_client_get_string (self->priv->client, self->priv->BG_SHADE_TYPE, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch55_g_error; +	goto __catch56_g_error; 	} 	new_value = (_tmp5_ = _tmp4_, _g_free0 (new_value), _tmp5_); 	} -	goto __finally55; -	__catch55_g_error: +	goto __finally56; +	__catch56_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -232,7 +232,7 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	_g_error_free0 (e); 	} 	} -	__finally55: +	__finally56: 	if (_inner_error_ != NULL) { 	_g_free0 (new_value); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -249,12 +249,12 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	char* _tmp9_; 	_tmp8_ = gconf_client_get_string (self->priv->client, self->priv->BG_PRIM_COL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch56_g_error; +	goto __catch57_g_error; 	} 	new_value = (_tmp9_ = _tmp8_, _g_free0 (new_value), _tmp9_); 	} -	goto __finally56; -	__catch56_g_error: +	goto __finally57; +	__catch57_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -265,7 +265,7 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	_g_error_free0 (e); 	} 	} -	__finally56: +	__finally57: 	if (_inner_error_ != NULL) { 	_g_free0 (new_value); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -282,12 +282,12 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	char* _tmp13_; 	_tmp12_ = gconf_client_get_string (self->priv->client, self->priv->BG_SEC_COL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch57_g_error; +	goto __catch58_g_error; 	} 	new_value = (_tmp13_ = _tmp12_, _g_free0 (new_value), _tmp13_); 	} -	goto __finally57; -	__catch57_g_error: +	goto __finally58; +	__catch58_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -298,7 +298,7 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	_g_error_free0 (e); 	} 	} -	__finally57: +	__finally58: 	if (_inner_error_ != NULL) { 	_g_free0 (new_value); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -315,12 +315,12 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	char* _tmp17_; 	_tmp16_ = gconf_client_get_string (self->priv->client, self->priv->BG_FILENAME, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch58_g_error; +	goto __catch59_g_error; 	} 	new_value = (_tmp17_ = _tmp16_, _g_free0 (new_value), _tmp17_); 	} -	goto __finally58; -	__catch58_g_error: +	goto __finally59; +	__catch59_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -331,7 +331,7 @@ static void _unity_testing_background_on_gconf_changed (UnityTestingBackground* 	_g_error_free0 (e); 	} 	} -	__finally58: +	__finally59: 	if (_inner_error_ != NULL) { 	_g_free0 (new_value); 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -384,11 +384,11 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	{ 	gconf_client_add_dir (self->priv->client, self->priv->BG_DIR, GCONF_CLIENT_PRELOAD_NONE, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch59_g_error; +	goto __catch60_g_error; 	} 	} -	goto __finally59; -	__catch59_g_error: +	goto __finally60; +	__catch60_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -399,7 +399,7 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	_g_error_free0 (e); 	} 	} -	__finally59: +	__finally60: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -409,12 +409,12 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	char* _tmp3_; 	_tmp2_ = gconf_client_get_string (self->priv->client, self->priv->BG_PIC_OPTS, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch60_g_error; +	goto __catch61_g_error; 	} 	self->priv->pic_opts = (_tmp3_ = _tmp2_, _g_free0 (self->priv->pic_opts), _tmp3_); 	} -	goto __finally60; -	__catch60_g_error: +	goto __finally61; +	__catch61_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -425,7 +425,7 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	_g_error_free0 (e); 	} 	} -	__finally60: +	__finally61: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -435,12 +435,12 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	char* _tmp6_; 	_tmp5_ = gconf_client_get_string (self->priv->client, self->priv->BG_SHADE_TYPE, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch61_g_error; +	goto __catch62_g_error; 	} 	self->priv->shade_type = (_tmp6_ = _tmp5_, _g_free0 (self->priv->shade_type), _tmp6_); 	} -	goto __finally61; -	__catch61_g_error: +	goto __finally62; +	__catch62_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -451,7 +451,7 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	_g_error_free0 (e); 	} 	} -	__finally61: +	__finally62: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -461,12 +461,12 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	char* _tmp9_; 	_tmp8_ = gconf_client_get_string (self->priv->client, self->priv->BG_PRIM_COL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch62_g_error; +	goto __catch63_g_error; 	} 	self->priv->prim_col = (_tmp9_ = _tmp8_, _g_free0 (self->priv->prim_col), _tmp9_); 	} -	goto __finally62; -	__catch62_g_error: +	goto __finally63; +	__catch63_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -477,7 +477,7 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	_g_error_free0 (e); 	} 	} -	__finally62: +	__finally63: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -487,12 +487,12 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	char* _tmp12_; 	_tmp11_ = gconf_client_get_string (self->priv->client, self->priv->BG_SEC_COL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch63_g_error; +	goto __catch64_g_error; 	} 	self->priv->sec_col = (_tmp12_ = _tmp11_, _g_free0 (self->priv->sec_col), _tmp12_); 	} -	goto __finally63; -	__catch63_g_error: +	goto __finally64; +	__catch64_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -503,7 +503,7 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	_g_error_free0 (e); 	} 	} -	__finally63: +	__finally64: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -513,12 +513,12 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	char* _tmp15_; 	_tmp14_ = gconf_client_get_string (self->priv->client, self->priv->BG_FILENAME, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch64_g_error; +	goto __catch65_g_error; 	} 	self->priv->filename = (_tmp15_ = _tmp14_, _g_free0 (self->priv->filename), _tmp15_); 	} -	goto __finally64; -	__catch64_g_error: +	goto __finally65; +	__catch65_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -529,7 +529,7 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	_g_error_free0 (e); 	} 	} -	__finally64: +	__finally65: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); @@ -537,11 +537,11 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	{ 	gconf_client_notify_add (self->priv->client, self->priv->BG_DIR, __unity_testing_background_on_gconf_changed_gconf_client_notify_func, g_object_ref (self), g_object_unref, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch65_g_error; +	goto __catch66_g_error; 	} 	} -	goto __finally65; -	__catch65_g_error: +	goto __finally66; +	__catch66_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -551,7 +551,7 @@ static GObject * unity_testing_background_constructor (GType type, guint n_const 	_g_error_free0 (e); 	} 	} -	__finally65: +	__finally66: 	if (_inner_error_ != NULL) { 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 	g_clear_error (&_inner_error_); diff --git a/unity-private/testing/perf-logger.c b/unity-private/testing/perf-logger.c index 678dde308..0d2b671ed 100644 --- a/unity-private/testing/perf-logger.c +++ b/unity-private/testing/perf-logger.c @@ -366,7 +366,7 @@ void unity_timeline_logger_write_log (UnityTimelineLogger* self, const char* fil 	GFileOutputStream* _tmp1_; 	_tmp0_ = g_file_create (log_file, G_FILE_CREATE_NONE, NULL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch66_g_error; +	goto __catch67_g_error; 	} 	file_stream = (_tmp1_ = _tmp0_, _g_object_unref0 (file_stream), _tmp1_); 	} else { @@ -374,7 +374,7 @@ void unity_timeline_logger_write_log (UnityTimelineLogger* self, const char* fil 	GFileOutputStream* _tmp3_; 	_tmp2_ = g_file_replace (log_file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_); 	if (_inner_error_ != NULL) { -	goto __catch66_g_error; +	goto __catch67_g_error; 	} 	file_stream = (_tmp3_ = _tmp2_, _g_object_unref0 (file_stream), _tmp3_); 	} @@ -398,7 +398,7 @@ void unity_timeline_logger_write_log (UnityTimelineLogger* self, const char* fil 	_unity_process_info_unref0 (info); 	_g_object_unref0 (_info_it); 	_g_object_unref0 (output_stream); -	goto __catch66_g_error; +	goto __catch67_g_error; 	} 	_g_free0 (outline); 	_unity_process_info_unref0 (info); @@ -408,12 +408,12 @@ void unity_timeline_logger_write_log (UnityTimelineLogger* self, const char* fil 	g_output_stream_close ((GOutputStream*) file_stream, NULL, &_inner_error_); 	if (_inner_error_ != NULL) { 	_g_object_unref0 (output_stream); -	goto __catch66_g_error; +	goto __catch67_g_error; 	} 	_g_object_unref0 (output_stream); 	} -	goto __finally66; -	__catch66_g_error: +	goto __finally67; +	__catch67_g_error: 	{ 	GError * e; 	e = _inner_error_; @@ -423,7 +423,7 @@ void unity_timeline_logger_write_log (UnityTimelineLogger* self, const char* fil 	_g_error_free0 (e); 	} 	} -	__finally66: +	__finally67: 	if (_inner_error_ != NULL) { 	_g_object_unref0 (file_stream); 	_g_object_unref0 (log_file); diff --git a/unity-private/testing/test-director.c b/unity-private/testing/test-director.c index 5d144e020..9a0b0b493 100644 --- a/unity-private/testing/test-director.c +++ b/unity-private/testing/test-director.c @@ -69,8 +69,8 @@ UnityTestingDirector* unity_testing_director_construct (GType object_type, Clutt  static void unity_testing_director_do_event (UnityTestingDirector* self, ClutterActor* actor, ClutterEvent* event, gboolean capture_phase);  void unity_testing_director_do_wait_for_animation (UnityTestingDirector* self, ClutterActor* actor);  void unity_testing_director_do_wait_for_timeout (UnityTestingDirector* self, guint32 msecs); -static gboolean _lambda86_ (UnityTestingDirector* self); -static gboolean __lambda86__gsource_func (gpointer self); +static gboolean _lambda94_ (UnityTestingDirector* self); +static gboolean __lambda94__gsource_func (gpointer self);  void unity_testing_director_button_press (UnityTestingDirector* self, ClutterActor* actor, guint32 button, gboolean autorelease, float relative_x, float relative_y, gboolean wait_for_animation);  void unity_testing_director_button_release (UnityTestingDirector* self, ClutterActor* actor, guint32 button, float relative_x, float relative_y);  void unity_testing_director_enter_event (UnityTestingDirector* self, ClutterActor* actor, float relative_x, float relative_y); @@ -137,7 +137,7 @@ void unity_testing_director_do_wait_for_animation (UnityTestingDirector* self, C  } -static gboolean _lambda86_ (UnityTestingDirector* self) { +static gboolean _lambda94_ (UnityTestingDirector* self) { 	gboolean result = FALSE; 	self->priv->break_loop = TRUE; 	result = FALSE; @@ -145,9 +145,9 @@ static gboolean _lambda86_ (UnityTestingDirector* self) {  } -static gboolean __lambda86__gsource_func (gpointer self) { +static gboolean __lambda94__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda86_ (self); +	result = _lambda94_ (self); 	return result;  } @@ -155,7 +155,7 @@ static gboolean __lambda86__gsource_func (gpointer self) {  void unity_testing_director_do_wait_for_timeout (UnityTestingDirector* self, guint32 msecs) { 	g_return_if_fail (self != NULL); 	self->priv->break_loop = FALSE; -	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) msecs, __lambda86__gsource_func, g_object_ref (self), g_object_unref); +	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) msecs, __lambda94__gsource_func, g_object_ref (self), g_object_unref); 	while (TRUE) { 	if (!(self->priv->break_loop != TRUE)) { 	break; diff --git a/unity-private/testing/test-window.c b/unity-private/testing/test-window.c index d77eac084..061b84aa4 100644 --- a/unity-private/testing/test-window.c +++ b/unity-private/testing/test-window.c @@ -256,14 +256,14 @@ static void unity_testing_window_set_popup_height (UnityTestingWindow* self, gin  UnityTestingWorkarea* unity_testing_workarea_new (void);  UnityTestingWorkarea* unity_testing_workarea_construct (GType object_type);  void unity_testing_workarea_update_net_workarea (UnityTestingWorkarea* self); -static gboolean _lambda87_ (UnityTestingWindow* self); -static gboolean __lambda87__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self); -static gboolean _lambda88_ (UnityTestingWindow* self); -static gboolean __lambda88__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self); -static void _lambda89_ (GdkScreen* s, UnityTestingWindow* self); -static void __lambda89__gdk_screen_size_changed (GdkScreen* _sender, gpointer self); -static void _lambda90_ (GdkScreen* s, UnityTestingWindow* self); -static void __lambda90__gdk_screen_monitors_changed (GdkScreen* _sender, gpointer self); +static gboolean _lambda95_ (UnityTestingWindow* self); +static gboolean __lambda95__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self); +static gboolean _lambda96_ (UnityTestingWindow* self); +static gboolean __lambda96__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self); +static void _lambda97_ (GdkScreen* s, UnityTestingWindow* self); +static void __lambda97__gdk_screen_size_changed (GdkScreen* _sender, gpointer self); +static void _lambda98_ (GdkScreen* s, UnityTestingWindow* self); +static void __lambda98__gdk_screen_monitors_changed (GdkScreen* _sender, gpointer self);  static gboolean _unity_testing_window_on_stage_button_press_clutter_actor_button_press_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);  UnityTestingBackground* unity_testing_background_new (void);  UnityTestingBackground* unity_testing_background_construct (GType object_type); @@ -279,8 +279,8 @@ static void _unity_testing_window_on_active_window_changed_wnck_screen_active_wi  UnityGestureXCBDispatcher* unity_gesture_xcb_dispatcher_new (void);  UnityGestureXCBDispatcher* unity_gesture_xcb_dispatcher_construct (GType object_type);  GType unity_gesture_xcb_dispatcher_get_type (void) G_GNUC_CONST; -static gboolean _lambda91_ (UnityTestingWindow* self); -static gboolean __lambda91__gsource_func (gpointer self); +static gboolean _lambda99_ (UnityTestingWindow* self); +static gboolean __lambda99__gsource_func (gpointer self);  static GObject * unity_testing_window_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);  static void unity_testing_window_finalize (GObject* obj);  static void unity_testing_window_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -729,7 +729,7 @@ static void unity_testing_window_set_popup_height (UnityTestingWindow* self, gin  } -static gboolean _lambda87_ (UnityTestingWindow* self) { +static gboolean _lambda95_ (UnityTestingWindow* self) { 	gboolean result = FALSE; 	gtk_main_quit (); 	result = FALSE; @@ -737,46 +737,46 @@ static gboolean _lambda87_ (UnityTestingWindow* self) {  } -static gboolean __lambda87__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self) { +static gboolean __lambda95__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self) { 	gboolean result; -	result = _lambda87_ (self); +	result = _lambda95_ (self); 	return result;  } -static gboolean _lambda88_ (UnityTestingWindow* self) { +static gboolean _lambda96_ (UnityTestingWindow* self) { 	gboolean result = FALSE; 	result = TRUE; 	return result;  } -static gboolean __lambda88__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self) { +static gboolean __lambda96__gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self) { 	gboolean result; -	result = _lambda88_ (self); +	result = _lambda96_ (self); 	return result;  } -static void _lambda89_ (GdkScreen* s, UnityTestingWindow* self) { +static void _lambda97_ (GdkScreen* s, UnityTestingWindow* self) { 	g_return_if_fail (s != NULL); 	unity_testing_window_relayout (self);  } -static void __lambda89__gdk_screen_size_changed (GdkScreen* _sender, gpointer self) { -	_lambda89_ (_sender, self); +static void __lambda97__gdk_screen_size_changed (GdkScreen* _sender, gpointer self) { +	_lambda97_ (_sender, self);  } -static void _lambda90_ (GdkScreen* s, UnityTestingWindow* self) { +static void _lambda98_ (GdkScreen* s, UnityTestingWindow* self) { 	g_return_if_fail (s != NULL); 	unity_testing_window_relayout (self);  } -static void __lambda90__gdk_screen_monitors_changed (GdkScreen* _sender, gpointer self) { -	_lambda90_ (_sender, self); +static void __lambda98__gdk_screen_monitors_changed (GdkScreen* _sender, gpointer self) { +	_lambda98_ (_sender, self);  } @@ -792,7 +792,7 @@ static void _unity_testing_window_on_active_window_changed_wnck_screen_active_wi  } -static gboolean _lambda91_ (UnityTestingWindow* self) { +static gboolean _lambda99_ (UnityTestingWindow* self) { 	gboolean result = FALSE; 	unity_shell_set_is_starting ((UnityShell*) self, FALSE); 	result = FALSE; @@ -800,9 +800,9 @@ static gboolean _lambda91_ (UnityTestingWindow* self) {  } -static gboolean __lambda91__gsource_func (gpointer self) { +static gboolean __lambda99__gsource_func (gpointer self) { 	gboolean result; -	result = _lambda91_ (self); +	result = _lambda99_ (self); 	return result;  } @@ -854,7 +854,7 @@ static GObject * unity_testing_window_constructor (GType type, guint n_construct 	gtk_window_set_decorated ((GtkWindow*) self, TRUE); 	gtk_window_set_skip_taskbar_hint ((GtkWindow*) self, FALSE); 	gtk_window_set_skip_pager_hint ((GtkWindow*) self, FALSE); -	g_signal_connect_object ((GtkWidget*) self, "delete-event", (GCallback) __lambda87__gtk_widget_delete_event, self, 0); +	g_signal_connect_object ((GtkWidget*) self, "delete-event", (GCallback) __lambda95__gtk_widget_delete_event, self, 0); 	} else { 	gtk_window_set_type_hint ((GtkWindow*) self, GDK_WINDOW_TYPE_HINT_DESKTOP); 	gtk_window_set_keep_below ((GtkWindow*) self, TRUE); @@ -863,9 +863,9 @@ static GObject * unity_testing_window_constructor (GType type, guint n_construct 	gtk_window_set_skip_pager_hint ((GtkWindow*) self, TRUE); 	gtk_window_set_accept_focus ((GtkWindow*) self, FALSE); 	g_object_set ((GtkWidget*) self, "can-focus", FALSE, NULL); -	g_signal_connect_object ((GtkWidget*) self, "delete-event", (GCallback) __lambda88__gtk_widget_delete_event, self, 0); -	g_signal_connect_object (gtk_window_get_screen ((GtkWindow*) self), "size-changed", (GCallback) __lambda89__gdk_screen_size_changed, self, 0); -	g_signal_connect_object (gtk_window_get_screen ((GtkWindow*) self), "monitors-changed", (GCallback) __lambda90__gdk_screen_monitors_changed, self, 0); +	g_signal_connect_object ((GtkWidget*) self, "delete-event", (GCallback) __lambda96__gtk_widget_delete_event, self, 0); +	g_signal_connect_object (gtk_window_get_screen ((GtkWindow*) self), "size-changed", (GCallback) __lambda97__gdk_screen_size_changed, self, 0); +	g_signal_connect_object (gtk_window_get_screen ((GtkWindow*) self), "monitors-changed", (GCallback) __lambda98__gdk_screen_monitors_changed, self, 0); 	} 	gtk_window_set_title ((GtkWindow*) self, "Unity"); 	gtk_window_set_icon_name ((GtkWindow*) self, "distributor-logo"); @@ -912,7 +912,7 @@ static GObject * unity_testing_window_constructor (GType type, guint n_construct 	g_signal_connect_object (self->priv->wnck_screen, "active-window-changed", (GCallback) _unity_testing_window_on_active_window_changed_wnck_screen_active_window_changed, self, 0); 	} 	self->priv->gesture_dispatcher = (_tmp24_ = (UnityGestureDispatcher*) unity_gesture_xcb_dispatcher_new (), _g_object_unref0 (self->priv->gesture_dispatcher), _tmp24_); -	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda91__gsource_func, g_object_ref (self), g_object_unref); +	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda99__gsource_func, g_object_ref (self), g_object_unref); 	END_FUNCTION (); 	target_list = (g_free (target_list), NULL); 	} diff --git a/unity-private/unity-private.h b/unity-private/unity-private.h index 0455d8580..b96b12f69 100644 --- a/unity-private/unity-private.h +++ b/unity-private/unity-private.h @@ -27,6 +27,7 @@  #include <libindicator/indicator.h>  #include <libindicator/indicator-service.h>  #include <libindicator/indicator-service-manager.h> +#include <cairo.h>  #include <dee.h>  #include <libdbusmenu-glib/client.h>  #include <libdbusmenu-glib/menuitem-proxy.h> @@ -276,6 +277,21 @@ typedef struct _UnityPanelWindowButton UnityPanelWindowButton;  typedef struct _UnityPanelWindowButtonClass UnityPanelWindowButtonClass;  typedef struct _UnityPanelWindowButtonPrivate UnityPanelWindowButtonPrivate; +#define UNITY_PLACES_TYPE_BUTTON (unity_places_button_get_type ()) +#define UNITY_PLACES_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButton)) +#define UNITY_PLACES_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) +#define UNITY_PLACES_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_BUTTON)) +#define UNITY_PLACES_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_BUTTON, UnityPlacesButtonClass)) + +typedef struct _UnityPlacesButton UnityPlacesButton; +typedef struct _UnityPlacesButtonClass UnityPlacesButtonClass; +typedef struct _UnityPlacesButtonPrivate UnityPlacesButtonPrivate; + +#define UNITY_PLACES_BUTTON_TYPE_NORMAL_STATE (unity_places_button_normal_state_get_type ()) + +#define UNITY_PLACES_BUTTON_TYPE_PRELIGHT_STATE (unity_places_button_prelight_state_get_type ()) +  #define UNITY_PLACES_TYPE_CONTROLLER (unity_places_controller_get_type ())  #define UNITY_PLACES_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_CONTROLLER, UnityPlacesController))  #define UNITY_PLACES_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_CONTROLLER, UnityPlacesControllerClass)) @@ -363,6 +379,39 @@ typedef struct _UnityPlacesTile UnityPlacesTile;  typedef struct _UnityPlacesTileClass UnityPlacesTileClass;  typedef struct _UnityPlacesTilePrivate UnityPlacesTilePrivate; +#define UNITY_PLACES_TYPE_FILE_INFO_TILE (unity_places_file_info_tile_get_type ()) +#define UNITY_PLACES_FILE_INFO_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTile)) +#define UNITY_PLACES_FILE_INFO_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTileClass)) +#define UNITY_PLACES_IS_FILE_INFO_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE)) +#define UNITY_PLACES_IS_FILE_INFO_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_FILE_INFO_TILE)) +#define UNITY_PLACES_FILE_INFO_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_FILE_INFO_TILE, UnityPlacesFileInfoTileClass)) + +typedef struct _UnityPlacesFileInfoTile UnityPlacesFileInfoTile; +typedef struct _UnityPlacesFileInfoTileClass UnityPlacesFileInfoTileClass; +typedef struct _UnityPlacesFileInfoTilePrivate UnityPlacesFileInfoTilePrivate; + +#define UNITY_PLACES_TYPE_SHOWCASE_TILE (unity_places_showcase_tile_get_type ()) +#define UNITY_PLACES_SHOWCASE_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTile)) +#define UNITY_PLACES_SHOWCASE_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTileClass)) +#define UNITY_PLACES_IS_SHOWCASE_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE)) +#define UNITY_PLACES_IS_SHOWCASE_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_SHOWCASE_TILE)) +#define UNITY_PLACES_SHOWCASE_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_SHOWCASE_TILE, UnityPlacesShowcaseTileClass)) + +typedef struct _UnityPlacesShowcaseTile UnityPlacesShowcaseTile; +typedef struct _UnityPlacesShowcaseTileClass UnityPlacesShowcaseTileClass; +typedef struct _UnityPlacesShowcaseTilePrivate UnityPlacesShowcaseTilePrivate; + +#define UNITY_PLACES_TYPE_DEFAULT_TILE (unity_places_default_tile_get_type ()) +#define UNITY_PLACES_DEFAULT_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTile)) +#define UNITY_PLACES_DEFAULT_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTileClass)) +#define UNITY_PLACES_IS_DEFAULT_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE)) +#define UNITY_PLACES_IS_DEFAULT_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_TYPE_DEFAULT_TILE)) +#define UNITY_PLACES_DEFAULT_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_TYPE_DEFAULT_TILE, UnityPlacesDefaultTileClass)) + +typedef struct _UnityPlacesDefaultTile UnityPlacesDefaultTile; +typedef struct _UnityPlacesDefaultTileClass UnityPlacesDefaultTileClass; +typedef struct _UnityPlacesDefaultTilePrivate UnityPlacesDefaultTilePrivate; +  #define UNITY_PLACES_TYPE_DEFAULT_RENDERER (unity_places_default_renderer_get_type ())  #define UNITY_PLACES_DEFAULT_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_TYPE_DEFAULT_RENDERER, UnityPlacesDefaultRenderer))  #define UNITY_PLACES_DEFAULT_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_TYPE_DEFAULT_RENDERER, UnityPlacesDefaultRendererClass)) @@ -1181,6 +1230,30 @@ struct _UnityPanelWindowButtonClass { 	CtkButtonClass parent_class;  }; +typedef void (*UnityPlacesButtonButtonOutlineFunc) (cairo_t* cr, gint width, gint height, void* user_data); +struct _UnityPlacesButton { +	CtkButton parent_instance; +	UnityPlacesButtonPrivate * priv; +	UnityPlacesButtonButtonOutlineFunc outline_func; +	gpointer outline_func_target; +	GDestroyNotify outline_func_target_destroy_notify; +}; + +struct _UnityPlacesButtonClass { +	CtkButtonClass parent_class; +}; + +typedef enum { +	UNITY_PLACES_BUTTON_NORMAL_STATE_NONE, +	UNITY_PLACES_BUTTON_NORMAL_STATE_UNDERLINE +} UnityPlacesButtonNormalState; + +typedef enum { +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_NONE, +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_STRIPED, +	UNITY_PLACES_BUTTON_PRELIGHT_STATE_UNDERLINE +} UnityPlacesButtonPrelightState; +  struct _UnityPlacesController { 	GObject parent_instance; 	UnityPlacesControllerPrivate * priv; @@ -1223,12 +1296,40 @@ struct _UnityPlacesMoreResultsButtonClass {  };  struct _UnityPlacesTile { -	CtkButton parent_instance; +	UnityPlacesButton parent_instance; 	UnityPlacesTilePrivate * priv;  };  struct _UnityPlacesTileClass { -	CtkButtonClass parent_class; +	UnityPlacesButtonClass parent_class; +	void (*about_to_show) (UnityPlacesTile* self); +}; + +struct _UnityPlacesFileInfoTile { +	UnityPlacesTile parent_instance; +	UnityPlacesFileInfoTilePrivate * priv; +}; + +struct _UnityPlacesFileInfoTileClass { +	UnityPlacesTileClass parent_class; +}; + +struct _UnityPlacesShowcaseTile { +	UnityPlacesTile parent_instance; +	UnityPlacesShowcaseTilePrivate * priv; +}; + +struct _UnityPlacesShowcaseTileClass { +	UnityPlacesTileClass parent_class; +}; + +struct _UnityPlacesDefaultTile { +	UnityPlacesTile parent_instance; +	UnityPlacesDefaultTilePrivate * priv; +}; + +struct _UnityPlacesDefaultTileClass { +	UnityPlacesTileClass parent_class;  };  struct _UnityPlacesDefaultRenderer { @@ -2014,6 +2115,16 @@ GType unity_panel_window_button_get_type (void) G_GNUC_CONST;  UnityPanelWindowButton* unity_panel_window_button_new (const char* filename);  UnityPanelWindowButton* unity_panel_window_button_construct (GType object_type, const char* filename);  const char* unity_panel_window_button_get_filename (UnityPanelWindowButton* self); +GType unity_places_button_get_type (void) G_GNUC_CONST; +GType unity_places_button_normal_state_get_type (void) G_GNUC_CONST; +GType unity_places_button_prelight_state_get_type (void) G_GNUC_CONST; +UnityPlacesButton* unity_places_button_new (void); +UnityPlacesButton* unity_places_button_construct (GType object_type); +void unity_places_button_rounded_rect (UnityPlacesButton* self, cairo_t* cr, gint width, gint height); +UnityPlacesButtonNormalState unity_places_button_get_normal_state (UnityPlacesButton* self); +void unity_places_button_set_normal_state (UnityPlacesButton* self, UnityPlacesButtonNormalState value); +UnityPlacesButtonPrelightState unity_places_button_get_prelight_state (UnityPlacesButton* self); +void unity_places_button_set_prelight_state (UnityPlacesButton* self, UnityPlacesButtonPrelightState value);  GType unity_places_controller_get_type (void) G_GNUC_CONST;  UnityPlacesController* unity_places_controller_new (UnityShell* shell);  UnityPlacesController* unity_places_controller_construct (GType object_type, UnityShell* shell); @@ -2036,6 +2147,8 @@ const char* unity_places_default_renderer_group_get_group_renderer (UnityPlacesD  const char* unity_places_default_renderer_group_get_display_name (UnityPlacesDefaultRendererGroup* self);  const char* unity_places_default_renderer_group_get_icon_hint (UnityPlacesDefaultRendererGroup* self);  DeeModel* unity_places_default_renderer_group_get_results (UnityPlacesDefaultRendererGroup* self); +gboolean unity_places_default_renderer_group_get_always_expanded (UnityPlacesDefaultRendererGroup* self); +void unity_places_default_renderer_group_set_always_expanded (UnityPlacesDefaultRendererGroup* self, gboolean value);  GType unity_places_expander_get_type (void) G_GNUC_CONST;  GType unity_places_expander_state_get_type (void) G_GNUC_CONST;  UnityPlacesExpander* unity_places_expander_new (void); @@ -2048,15 +2161,23 @@ UnityPlacesMoreResultsButton* unity_places_more_results_button_construct (GType  guint unity_places_more_results_button_get_count (UnityPlacesMoreResultsButton* self);  void unity_places_more_results_button_set_count (UnityPlacesMoreResultsButton* self, guint value);  GType unity_places_tile_get_type (void) G_GNUC_CONST; -UnityPlacesTile* unity_places_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); -UnityPlacesTile* unity_places_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment);  void unity_places_tile_about_to_show (UnityPlacesTile* self); +UnityPlacesTile* unity_places_tile_construct (GType object_type);  DeeModelIter* unity_places_tile_get_iter (UnityPlacesTile* self);  const char* unity_places_tile_get_display_name (UnityPlacesTile* self);  const char* unity_places_tile_get_icon_hint (UnityPlacesTile* self);  const char* unity_places_tile_get_uri (UnityPlacesTile* self);  const char* unity_places_tile_get_mimetype (UnityPlacesTile* self);  const char* unity_places_tile_get_comment (UnityPlacesTile* self); +GType unity_places_file_info_tile_get_type (void) G_GNUC_CONST; +UnityPlacesFileInfoTile* unity_places_file_info_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesFileInfoTile* unity_places_file_info_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +GType unity_places_showcase_tile_get_type (void) G_GNUC_CONST; +UnityPlacesShowcaseTile* unity_places_showcase_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesShowcaseTile* unity_places_showcase_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +GType unity_places_default_tile_get_type (void) G_GNUC_CONST; +UnityPlacesDefaultTile* unity_places_default_tile_new (DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment); +UnityPlacesDefaultTile* unity_places_default_tile_construct (GType object_type, DeeModelIter* iter, const char* uri, const char* icon_hint, const char* mimetype, const char* display_name, const char* comment);  GType unity_places_default_renderer_get_type (void) G_GNUC_CONST;  UnityPlacesDefaultRenderer* unity_places_default_renderer_new (void);  UnityPlacesDefaultRenderer* unity_places_default_renderer_construct (GType object_type); diff --git a/unity-private/unity-private.vapi b/unity-private/unity-private.vapi index df7c748a7..7ece78b04 100644 --- a/unity-private/unity-private.vapi +++ b/unity-private/unity-private.vapi @@ -404,6 +404,27 @@ namespace Unity { 	[CCode (cprefix = "UnityPlaces", lower_case_cprefix = "unity_places_")] 	namespace Places { 	[CCode (cheader_filename = "unity-private.h")] +	public class Button : Ctk.Button { +	[CCode (cprefix = "UNITY_PLACES_BUTTON_NORMAL_STATE_", cheader_filename = "unity-private.h")] +	public enum NormalState { +	NONE, +	UNDERLINE +	} +	[CCode (cprefix = "UNITY_PLACES_BUTTON_PRELIGHT_STATE_", cheader_filename = "unity-private.h")] +	public enum PrelightState { +	NONE, +	STRIPED, +	UNDERLINE +	} +	[CCode (cheader_filename = "unity-private.h")] +	public delegate void ButtonOutlineFunc (Cairo.Context cr, int width, int height); +	public Unity.Places.Button.ButtonOutlineFunc outline_func; +	public Button (); +	public void rounded_rect (Cairo.Context cr, int width, int height); +	public Unity.Places.Button.NormalState normal_state { get; set; } +	public Unity.Places.Button.PrelightState prelight_state { get; set; } +	} +	[CCode (cheader_filename = "unity-private.h")] 	public class Controller : GLib.Object { 	public Controller (Unity.Shell shell); 	public void activate_entry (string entry_name, int section_id = 0); @@ -420,6 +441,7 @@ namespace Unity { 	[CCode (cheader_filename = "unity-private.h")] 	public class DefaultRendererGroup : Unity.ExpandingBin { 	public DefaultRendererGroup (uint group_id, string group_renderer, string display_name, string icon_hint, Dee.Model results); +	public bool always_expanded { get; set; } 	public string display_name { get; construct; } 	public uint group_id { get; construct; } 	public string group_renderer { get; construct; } @@ -428,6 +450,11 @@ namespace Unity { 	public signal void activated (string uri, string mimetype); 	} 	[CCode (cheader_filename = "unity-private.h")] +	public class DefaultTile : Unity.Places.Tile { +	public DefaultTile (Dee.ModelIter iter, string uri, string? icon_hint, string? mimetype, string display_name, string? comment); +	public override void about_to_show (); +	} +	[CCode (cheader_filename = "unity-private.h")] 	public class EmptySearchGroup : Ctk.Bin { 	public EmptySearchGroup (uint group_id, Dee.Model results); 	public bool active { get; set construct; } @@ -454,6 +481,11 @@ namespace Unity { 	public Unity.Places.Expander.State expanding_state { get; set; } 	} 	[CCode (cheader_filename = "unity-private.h")] +	public class FileInfoTile : Unity.Places.Tile { +	public FileInfoTile (Dee.ModelIter iter, string uri, string? icon_hint, string? mimetype, string display_name, string? comment); +	public override void about_to_show (); +	} +	[CCode (cheader_filename = "unity-private.h")] 	public class FolderBrowserRenderer : Ctk.ScrollView, Unity.Place.Renderer { 	public FolderBrowserRenderer (); 	} @@ -621,9 +653,14 @@ namespace Unity { 	public signal void entry_activated (Unity.Places.PlaceEntryView entry_view); 	} 	[CCode (cheader_filename = "unity-private.h")] -	public class Tile : Ctk.Button { -	public Tile (Dee.ModelIter iter, string uri, string? icon_hint, string? mimetype, string display_name, string? comment); -	public void about_to_show (); +	public class ShowcaseTile : Unity.Places.Tile { +	public ShowcaseTile (Dee.ModelIter iter, string uri, string? icon_hint, string? mimetype, string display_name, string? comment); +	public override void about_to_show (); +	} +	[CCode (cheader_filename = "unity-private.h")] +	public abstract class Tile : Unity.Places.Button { +	public Tile (); +	public abstract void about_to_show (); 	public string? comment { get; construct; } 	public string display_name { get; construct; } 	public string? icon_hint { get; construct; } diff --git a/unity/unity-expanding-bin.c b/unity/unity-expanding-bin.c index 2ddf30195..3869df3c4 100644 --- a/unity/unity-expanding-bin.c +++ b/unity/unity-expanding-bin.c @@ -136,6 +136,7 @@ static void unity_expanding_bin_real_allocate (ClutterActor* base, const Clutter 	CtkPadding _tmp3_ = {0}; 	float width; 	ClutterActorBox child_box = {0}; +	CtkPadding _tmp4_ = {0}; 	self = (UnityExpandingBin*) base; 	x = (ctk_actor_get_padding ((CtkActor*) self, &_tmp0_), _tmp0_.left); 	y = (ctk_actor_get_padding ((CtkActor*) self, &_tmp1_), _tmp1_.top); @@ -144,7 +145,10 @@ static void unity_expanding_bin_real_allocate (ClutterActor* base, const Clutter 	child_box.x1 = x; 	child_box.x2 = x + width; 	child_box.y1 = y; -	child_box.y2 = (y + self->priv->last_height) + ((self->priv->_target_height - self->priv->last_height) * self->priv->_size_factor); +	child_box.y2 = (y + self->priv->last_height) + (((self->priv->_target_height - self->priv->last_height) + (ctk_actor_get_padding ((CtkActor*) self, &_tmp4_), _tmp4_.bottom)) * self->priv->_size_factor); +	if (child_box.y2 < 0.0f) { +	child_box.y2 = 0.0f; +	} 	CLUTTER_ACTOR_CLASS (unity_expanding_bin_parent_class)->allocate ((ClutterActor*) CTK_BIN (self), box, flags); 	clutter_actor_allocate (ctk_bin_get_child ((CtkBin*) self), &child_box, flags); 	self->priv->last_height = child_box.y2 - child_box.y1; @@ -232,7 +236,7 @@ static void _unity_expanding_bin_change_state (UnityExpandingBin* self, UnityExp 	} 	default: 	{ -	g_warning ("unity-expanding-bin.vala:174: ExpandingBinState %d not supported", (gint) self->priv->_state); +	g_warning ("unity-expanding-bin.vala:177: ExpandingBinState %d not supported", (gint) self->priv->_state); 	break; 	} 	} diff --git a/unity/unity-expanding-bin.vala b/unity/unity-expanding-bin.vala index c02a66990..c2ce82f34 100644 --- a/unity/unity-expanding-bin.vala +++ b/unity/unity-expanding-bin.vala @@ -95,7 +95,10 @@ namespace Unity  child_box.x1 = x;  child_box.x2 = x + width;  child_box.y1 = y; - child_box.y2 = y + last_height + ((_target_height - last_height) * _size_factor); + child_box.y2 = y + last_height + ((_target_height - last_height + padding.bottom) * _size_factor); + + if (child_box.y2 < 0.0f) + child_box.y2 = 0.0f;  base.allocate (box, flags);  get_child ().allocate (child_box, flags); diff --git a/unity/unity-stripe-texture.c b/unity/unity-stripe-texture.c index bcb4d034d..edf3dc4a7 100644 --- a/unity/unity-stripe-texture.c +++ b/unity/unity-stripe-texture.c @@ -175,7 +175,7 @@ static void unity_stripe_texture_paint_bg (UnityStripeTexture* self, cairo_t* cr 	cairo_paint (context); 	cairo_set_line_width (context, 0.3); 	cairo_set_operator (context, CAIRO_OPERATOR_OVER); -	cairo_set_source_rgba (context, 1.0, 1.0, 1.0, 0.65); +	cairo_set_source_rgba (context, 1.0, 1.0, 1.0, 0.85); 	cairo_move_to (context, (double) 0, (double) 0); 	cairo_line_to (context, (double) 4, (double) 4); 	cairo_stroke (context); diff --git a/unity/unity-stripe-texture.vala b/unity/unity-stripe-texture.vala index df6ed1c95..65702f804 100644 --- a/unity/unity-stripe-texture.vala +++ b/unity/unity-stripe-texture.vala @@ -105,7 +105,7 @@ namespace Unity  context.set_line_width (0.3);  context.set_operator (Cairo.Operator.OVER); - context.set_source_rgba (1.0, 1.0, 1.0, 0.65); + context.set_source_rgba (1.0, 1.0, 1.0, 0.85);  context.move_to (0, 0);  context.line_to (4, 4);  | 
