diff options
| author | Neil Jagdish Patel <njpatel@Pulse> | 2010-07-30 16:33:16 +0100 |
|---|---|---|
| committer | Neil Jagdish Patel <njpatel@Pulse> | 2010-07-30 16:33:16 +0100 |
| commit | 2c41d057c0575e4ce96d3099a447c382bce6c95b (patch) | |
| tree | 2365f0f81dde5a7e535c26d0c6935d1e70bce512 | |
| parent | ec9481048b2249fe3d2b5b486465bd6bd853e7f8 (diff) | |
| parent | 586fca73bedd39d52680552efde36729e240271d (diff) | |
try and activate cache
(bzr r405.2.1)
| -rw-r--r-- | configure.ac | 8 | ||||
| -rw-r--r-- | tests/unit/Makefile.am | 1 | ||||
| -rw-r--r-- | tests/unit/test-appinfo-manager.vala | 4 | ||||
| -rw-r--r-- | tests/unit/test-dbusmenu-quicklists.vala | 4 | ||||
| -rw-r--r-- | tests/unit/test-io.vala | 2 | ||||
| -rw-r--r-- | tests/unit/test-launcher.vala | 6 | ||||
| -rw-r--r-- | tests/unit/test-places-place-file-model.vala | 2 | ||||
| -rw-r--r-- | tests/unit/test-places-place.vala | 8 | ||||
| -rw-r--r-- | unity-private/launcher/launcher.vala | 7 | ||||
| -rw-r--r-- | unity-private/launcher/scroller-model.vala | 1 | ||||
| -rw-r--r-- | unity-private/launcher/scrollerchild.vala | 4 | ||||
| -rw-r--r-- | unity-private/panel/panel-indicator-model.vala | 6 | ||||
| -rw-r--r-- | unity-private/places/places-default-renderer-group.vala | 8 | ||||
| -rw-r--r-- | unity-private/places/places-place-model.vala | 2 | ||||
| -rw-r--r-- | unity-private/places/places-place-search-entry.vala | 2 | ||||
| -rw-r--r-- | unity/theme.vala | 2 | ||||
| -rw-r--r-- | vapi/config.vapi | 5 |
17 files changed, 46 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac index 46679af1e..872520e16 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,11 @@ AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directo AC_DEFINE_UNQUOTED(DATADIR, "${PREFIX}/${DATADIRNAME}",[Data directory]) AC_DEFINE_UNQUOTED(PREFIXDIR, "${PREFIX}",[Prefix directory]) + +PWD=`pwd` +AC_DEFINE_UNQUOTED(TESTUIDIR, "${PWD}/tests/ui", [Test UI directory]) +AC_DEFINE_UNQUOTED(TESTUNITDIR, "${PWD}/tests/unit", [Test unit directory]) + dnl Use strict compiler flags only on development releases m4_define([maintainer_flags_default], [m4_if(m4_eval(unity_micro % 2), [1], [yes], [no])]) @@ -160,6 +165,9 @@ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator` AC_SUBST(INDICATORDIR) AC_SUBST(INDICATORICONSDIR) +AC_DEFINE_UNQUOTED(INDICATORDIR, "${INDICATORDIR}",[Indicators directory]) +AC_DEFINE_UNQUOTED(INDICATORICONSDIR, "${INDICATORICONSDIR}",[Indicator icons directory]) + dnl Create the Makefiles AC_CONFIG_FILES([ Makefile diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 1e017cc5d..12417a8f3 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -29,6 +29,7 @@ test_unit_VALAFLAGS = \ --pkg Bamf-0.2 \ --pkg clutter-1.0 \ --pkg clutter-gtk-0.10 \ + --pkg config \ --pkg dbus-glib-1 \ --pkg Dbusmenu-Glib-0.2 \ --pkg dee-1.0 \ diff --git a/tests/unit/test-appinfo-manager.vala b/tests/unit/test-appinfo-manager.vala index df429e94b..28c4572bd 100644 --- a/tests/unit/test-appinfo-manager.vala +++ b/tests/unit/test-appinfo-manager.vala @@ -91,7 +91,7 @@ namespace Unity.Tests.Unit string old_datadir = Environment.get_user_data_dir (); var manager = AppInfoManager.get_instance(); - Environment.set_variable ("XDG_DATA_HOME", TESTDIR, true); + Environment.set_variable ("XDG_DATA_HOME", Config.TESTUNITDIR, true); var info = manager.lookup ("ubuntu-about.desktop"); assert (info is AppInfo); @@ -113,7 +113,7 @@ namespace Unity.Tests.Unit string old_datadir = Environment.get_user_data_dir (); var manager = AppInfoManager.get_instance(); - Environment.set_variable ("XDG_DATA_HOME", TESTDIR, true); + Environment.set_variable ("XDG_DATA_HOME", Config.TESTUNITDIR, true); try{ var info = yield manager.lookup_async ("ubuntu-about.desktop"); diff --git a/tests/unit/test-dbusmenu-quicklists.vala b/tests/unit/test-dbusmenu-quicklists.vala index e0f6ba38c..7c180b321 100644 --- a/tests/unit/test-dbusmenu-quicklists.vala +++ b/tests/unit/test-dbusmenu-quicklists.vala @@ -152,13 +152,13 @@ namespace Unity.Tests.Unit menu.state = QuicklistControllerState.LABEL; unowned GLib.List<Ctk.MenuItem> menuitems = null; - assert (menuitems.length () == 1); + assert (menuitems.length () == 0); menu.state = QuicklistControllerState.MENU; // this assert here will only work for our local dbusmenu's because they return // immediately. remote dbusmenu's need to be slightly more clever - //menuitems = menu.get_view ().get_items (); + menuitems = menu.get_view ().get_items (); assert (menuitems.length () >= 10); assert (menuitems.data is Ctk.CheckMenuItem); diff --git a/tests/unit/test-io.vala b/tests/unit/test-io.vala index 899d4dc20..5c5d86cfd 100644 --- a/tests/unit/test-io.vala +++ b/tests/unit/test-io.vala @@ -52,7 +52,7 @@ Icon=test_desktop_icon.png internal static async void do_test_async_find_and_load (MainLoop mainloop) { string[] dirs = new string[1]; - dirs[0] = Path.build_filename (TESTDIR, "data", null + dirs[0] = Path.build_filename (Config.TESTUNITDIR, "data", null ); try { diff --git a/tests/unit/test-launcher.vala b/tests/unit/test-launcher.vala index a3305d3fb..0c13609b4 100644 --- a/tests/unit/test-launcher.vala +++ b/tests/unit/test-launcher.vala @@ -186,11 +186,11 @@ namespace Unity.Tests.Unit { TestBamfApplication test_app = new TestBamfApplication (); ScrollerChild child = new TestScrollerChild (); - ApplicationController controller = new ApplicationController (TESTDIR + "/data/test_desktop_file.desktop", child); + ApplicationController controller = new ApplicationController (Config.TESTUNITDIR + "/data/test_desktop_file.desktop", child); test_app.name = "Test Application-New"; - test_app.desktop_file = TESTDIR + "/data/test_desktop_file.desktop"; - test_app.icon = TESTDIR + "/data/test_desktop_icon.png"; + test_app.desktop_file = Config.TESTUNITDIR + "/data/test_desktop_file.desktop"; + test_app.icon = Config.TESTUNITDIR + "/data/test_desktop_icon.png"; test_app.test_is_active = true; test_app.test_is_urgent = false; test_app.test_user_visible = true; diff --git a/tests/unit/test-places-place-file-model.vala b/tests/unit/test-places-place-file-model.vala index 67c855eb5..99c30e624 100644 --- a/tests/unit/test-places-place-file-model.vala +++ b/tests/unit/test-places-place-file-model.vala @@ -35,7 +35,7 @@ namespace Unity.Tests.Unit private void test_allocation () { - var model = new PlaceFileModel.with_directory (TESTDIR+"/data"); + var model = new PlaceFileModel.with_directory (Config.TESTUNITDIR+"/data"); assert (model is PlaceFileModel); assert (model.size == 2); } diff --git a/tests/unit/test-places-place.vala b/tests/unit/test-places-place.vala index 6ac23935e..c99369603 100644 --- a/tests/unit/test-places-place.vala +++ b/tests/unit/test-places-place.vala @@ -50,7 +50,7 @@ namespace Unity.Tests.Unit { var file = new KeyFile (); try { - file.load_from_file (TESTDIR + "/data/place0.place", + file.load_from_file (Config.TESTUNITDIR + "/data/place0.place", KeyFileFlags.NONE); } catch (Error e) { error ("Unable to load test place: %s", e.message); @@ -71,7 +71,7 @@ namespace Unity.Tests.Unit { var file = new KeyFile (); try { - file.load_from_file (TESTDIR + "/data/place1.place", + file.load_from_file (Config.TESTUNITDIR + "/data/place1.place", KeyFileFlags.NONE); } catch (Error error) { warning ("Unable to load test place: %s", error.message); @@ -122,7 +122,7 @@ namespace Unity.Tests.Unit { var file = new KeyFile (); try { - file.load_from_file (TESTDIR + "/data/place0.badplace", + file.load_from_file (Config.TESTUNITDIR + "/data/place0.badplace", KeyFileFlags.NONE); } catch (Error error) { warning ("Unable to load test place: %s", error.message); @@ -142,7 +142,7 @@ namespace Unity.Tests.Unit { var file = new KeyFile (); try { - file.load_from_file (TESTDIR + "/data/place1.badplace", + file.load_from_file (Config.TESTUNITDIR + "/data/place1.badplace", KeyFileFlags.NONE); } catch (Error error) { warning ("Unable to load test place: %s", error.message); diff --git a/unity-private/launcher/launcher.vala b/unity-private/launcher/launcher.vala index ada2ca33c..d58c8763e 100644 --- a/unity-private/launcher/launcher.vala +++ b/unity-private/launcher/launcher.vala @@ -30,6 +30,8 @@ namespace Unity.Launcher { this.cache = new Ctk.EffectCache (); this.add_effect (this.cache); + + this.cache.update_texture_cache (); } } @@ -63,6 +65,11 @@ namespace Unity.Launcher view = new ScrollerView (model, this.launcher_container.cache); controller = new ScrollerController (model, view); + + view.queue_redraw.connect (() => { + launcher_container.cache.update_texture_cache (); + debug ("UPDATE"); + }); } public new float get_width () diff --git a/unity-private/launcher/scroller-model.vala b/unity-private/launcher/scroller-model.vala index efce4b039..c838daa16 100644 --- a/unity-private/launcher/scroller-model.vala +++ b/unity-private/launcher/scroller-model.vala @@ -94,7 +94,6 @@ namespace Unity.Launcher public void add (ScrollerChild child) { - warning ("Add Icon: %s", child.to_string ()); children.add (child); child_added (child); order_changed (); diff --git a/unity-private/launcher/scrollerchild.vala b/unity-private/launcher/scrollerchild.vala index 2e27cbea1..46390c8db 100644 --- a/unity-private/launcher/scrollerchild.vala +++ b/unity-private/launcher/scrollerchild.vala @@ -24,9 +24,9 @@ namespace Unity.Launcher { - const string HONEYCOMB_MASK_FILE = Unity.PKGDATADIR + const string HONEYCOMB_MASK_FILE = Config.PKGDATADIR + "/honeycomb-mask.png"; - const string MENU_BG_FILE = Unity.PKGDATADIR + const string MENU_BG_FILE = Config.PKGDATADIR + "/tight_check_4px.png"; const float WIGGLE_SIZE = 5; // how many degree's to wiggle on either side. diff --git a/unity-private/panel/panel-indicator-model.vala b/unity-private/panel/panel-indicator-model.vala index 665f7adcf..051957ca9 100644 --- a/unity-private/panel/panel-indicator-model.vala +++ b/unity-private/panel/panel-indicator-model.vala @@ -90,10 +90,10 @@ namespace Unity.Panel.Indicators } /* We need to look for icons in an specific location */ - Gtk.IconTheme.get_default ().append_search_path (INDICATORICONSDIR); + Gtk.IconTheme.get_default ().append_search_path (Config.INDICATORICONSDIR); /* Start loading 'em in. .so are located in INDICATORDIR*/ - var dir = File.new_for_path (INDICATORDIR); + var dir = File.new_for_path (Config.INDICATORDIR); try { var e = dir.enumerate_children (FILE_ATTRIBUTE_STANDARD_NAME, 0,null); @@ -118,7 +118,7 @@ namespace Unity.Panel.Indicators sos.sort ((CompareFunc)indicator_sort_func); foreach (string leaf in sos) - this.load_indicator (INDICATORDIR + leaf, leaf); + this.load_indicator (Config.INDICATORDIR + leaf, leaf); } catch (Error error) { diff --git a/unity-private/places/places-default-renderer-group.vala b/unity-private/places/places-default-renderer-group.vala index ff3120903..5f267923e 100644 --- a/unity-private/places/places-default-renderer-group.vala +++ b/unity-private/places/places-default-renderer-group.vala @@ -79,7 +79,7 @@ namespace Unity.Places title_box.reactive = true; icon = new Ctk.Image (22); - icon.set_from_filename (PKGDATADIR + "/favourites.png"); + icon.set_from_filename (Config.PKGDATADIR + "/favourites.png"); title_box.pack (icon, false, false); icon.show (); @@ -88,7 +88,7 @@ namespace Unity.Places text.show (); expander = new Ctk.Image (22); - expander.set_from_filename (PKGDATADIR + "/maximize_up.png"); + expander.set_from_filename (Config.PKGDATADIR + "/maximize_up.png"); expander.opacity = 0; title_box.pack (expander, false, true); expander.show (); @@ -105,12 +105,12 @@ namespace Unity.Places if (bin_state == ExpandingBinState.UNEXPANDED) { bin_state = ExpandingBinState.EXPANDED; - expander.set_from_filename (PKGDATADIR + "/minimize_up.png"); + expander.set_from_filename (Config.PKGDATADIR + "/minimize_up.png"); } else { bin_state = ExpandingBinState.UNEXPANDED; - expander.set_from_filename (PKGDATADIR + "/maximize_up.png"); + expander.set_from_filename (Config.PKGDATADIR + "/maximize_up.png"); } return true; }); diff --git a/unity-private/places/places-place-model.vala b/unity-private/places/places-place-model.vala index 8bf080fef..9e4c47dc0 100644 --- a/unity-private/places/places-place-model.vala +++ b/unity-private/places/places-place-model.vala @@ -46,7 +46,7 @@ namespace Unity.Places /* Constructors */ public PlaceFileModel () { - Object (directory:PKGDATADIR + "/places", async:true); + Object (directory:Config.PKGDATADIR + "/places", async:true); } /* Allows loading places files from a non-install directory */ diff --git a/unity-private/places/places-place-search-entry.vala b/unity-private/places/places-place-search-entry.vala index 68170936c..d119b8f19 100644 --- a/unity-private/places/places-place-search-entry.vala +++ b/unity-private/places/places-place-search-entry.vala @@ -21,7 +21,7 @@ namespace Unity.Places { public class PlaceSearchEntry : Ctk.Box { - static const string SEARCH_ICON_FILE = PKGDATADIR + "/search_icon.png"; + static const string SEARCH_ICON_FILE = Config.PKGDATADIR + "/search_icon.png"; static const float PADDING = 1.0f; static const int LIVE_SEARCH_TIMEOUT = 200; /* Milliseconds */ const Clutter.Color nofocus_color = { 0xff, 0xff, 0xff, 0xbb }; diff --git a/unity/theme.vala b/unity/theme.vala index 637309f24..0d242ea9d 100644 --- a/unity/theme.vala +++ b/unity/theme.vala @@ -167,7 +167,7 @@ namespace Unity private bool try_load_icon_from_datadir () { - if (!this.try_load_icon_from_dir (PKGDATADIR)) + if (!this.try_load_icon_from_dir (Config.PKGDATADIR)) if (!this.try_load_icon_from_dir ("/usr/share/unity/themes")) if (!this.try_load_icon_from_dir ("/usr/share/unity/themes/launcher")) return false; diff --git a/vapi/config.vapi b/vapi/config.vapi index a7271573a..af40587f6 100644 --- a/vapi/config.vapi +++ b/vapi/config.vapi @@ -26,4 +26,9 @@ namespace Config public const string GETTEXT_PACKAGE; public const string LOCALE_DIR; public const string VERSION; + public const string INDICATORDIR; + public const string INDICATORICONSDIR; + + public const string TESTUIDIR; + public const string TESTUNITDIR; } |
