indicator-location-13.10.0+14.04.20140207/0000755000015201777760000000000012275205574020043 5ustar pbusernogroup00000000000000indicator-location-13.10.0+14.04.20140207/ChangeLog0000644000015201777760000000004612275205355021612 0ustar pbusernogroup00000000000000# Generated by Makefile. Do not edit. indicator-location-13.10.0+14.04.20140207/cmake/0000755000015201777760000000000012275205574021123 5ustar pbusernogroup00000000000000indicator-location-13.10.0+14.04.20140207/cmake/GCov.cmake0000644000015201777760000000530112275205355022757 0ustar pbusernogroup00000000000000if (CMAKE_BUILD_TYPE MATCHES coverage) set(LCOV_RAW_FILE "lcov-raw.info") set(LCOV_FILE "lcov.info") set(GCOV_FLAGS "${GCOV_FLAGS} --coverage") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCOV_FLAGS}") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${GCOV_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GCOV_FLAGS}") set(GCOV_LIBS ${GCOV_LIBS} gcov) find_program(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") if (NOT GCOVR_EXECUTABLE) message(STATUS "Gcovr binary was not found, can not generate XML coverage info.") else () message(STATUS "Gcovr found, can generate XML coverage info.") add_custom_target (coverage-xml WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" -x -r "${CMAKE_SOURCE_DIR}" --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml) endif() find_program(LCOV_EXECUTABLE lcov HINTS ${LCOV_ROOT} "${GCOVR_ROOT}/bin") find_program(GENHTML_EXECUTABLE genhtml HINTS ${GENHTML_ROOT}) if (NOT LCOV_EXECUTABLE) message(STATUS "Lcov binary was not found, can not generate HTML coverage info.") else () if(NOT GENHTML_EXECUTABLE) message(STATUS "Genthml binary not found, can not generate HTML coverage info.") else() message(STATUS "Lcov and genhtml found, can generate HTML coverage info.") add_custom_target (coverage-html WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND "${CMAKE_CTEST_COMMAND}" --force-new-ctest-process --verbose # generate the raw lcov data COMMAND "${LCOV_EXECUTABLE}" --directory ${CMAKE_BINARY_DIR} --capture -o ${LCOV_RAW_FILE} # FIXME: when ubuntu gets lcov 1.10 we can use --no-external instead of the brittle --remove COMMAND "${LCOV_EXECUTABLE}" --remove ${LCOV_RAW_FILE} "/usr/include/*" | ${CMAKE_SOURCE_DIR}/trim-lcov.py > ${LCOV_FILE} COMMAND LANG=C "${GENHTML_EXECUTABLE}" --prefix ${CMAKE_BINARY_DIR} --output-directory lcov-html --legend --show-details ${LCOV_FILE} COMMAND ${CMAKE_COMMAND} -E echo "" COMMAND ${CMAKE_COMMAND} -E echo "file://${CMAKE_BINARY_DIR}/lcov-html/index.html" COMMAND ${CMAKE_COMMAND} -E echo "" VERBATIM) # VERBATIM is necessary here for the wildcard in --remove... again, when we go to lcov 1.10 we can drop this #) endif() endif() endif() #$(MAKE) $(AM_MAKEFLAGS) check #lcov --directory $(top_builddir) --capture --test-name dconf | $(top_srcdir)/trim-lcov.py > dconf-lcov.info #LANG=C genhtml --prefix $(top_builddir) --output-directory lcov-html --legend --show-details dconf-lcov.info #@echo #@echo " file://$(abs_top_builddir)/lcov-html/index.html" #@echo indicator-location-13.10.0+14.04.20140207/cmake/Translations.cmake0000644000015201777760000000313612275205355024606 0ustar pbusernogroup00000000000000# Translations.cmake, CMake macros written for Marlin, feel free to re-use them macro(add_translations_directory NLS_PACKAGE) add_custom_target (i18n ALL) find_program (MSGFMT_EXECUTABLE msgfmt) file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) foreach (PO_INPUT ${PO_FILES}) get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) install (FILES ${MO_OUTPUT} DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/LC_MESSAGES RENAME ${NLS_PACKAGE}.mo) endforeach (PO_INPUT ${PO_FILES}) endmacro(add_translations_directory) macro(add_translations_catalog NLS_PACKAGE) add_custom_target (pot COMMENT “Building translation catalog.”) find_program (XGETTEXT_EXECUTABLE xgettext) set(C_SOURCE "") foreach(FILES_INPUT ${ARGN}) file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.c) foreach(C_FILE ${SOURCE_FILES}) set(C_SOURCE ${C_SOURCE} ${C_FILE}) endforeach() file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.vala) foreach(C_FILE ${SOURCE_FILES}) set(C_SOURCE ${C_SOURCE} ${C_FILE}) endforeach() endforeach() add_custom_command (TARGET pot COMMAND ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot ${VALA_SOURCE} ${C_SOURCE} --keyword="_" --keyword="N_" --from-code=UTF-8 ) endmacro() indicator-location-13.10.0+14.04.20140207/tests/0000755000015201777760000000000012275205574021205 5ustar pbusernogroup00000000000000indicator-location-13.10.0+14.04.20140207/tests/CMakeLists.txt0000644000015201777760000000141112275205355023737 0ustar pbusernogroup00000000000000### ### Google Test Framework ### add_library (gtest STATIC ${GTEST_SOURCE_DIR}/gtest-all.cc ${GTEST_SOURCE_DIR}/gtest_main.cc) ### ### phone-test ### set (PHONE_TEST "phone-test") add_executable (${PHONE_TEST} phone-test.cc) add_test (${PHONE_TEST} ${PHONE_TEST}) ### ### globals ### set (ALL_TESTS ${PHONE_TEST}) set_property (TARGET ${ALL_TESTS} APPEND_STRING PROPERTY COMPILE_FLAGS "${CC_WARNING_ARGS} -g --std=c++11") set_property (TARGET ${ALL_TESTS} APPEND PROPERTY LINK_LIBRARIES libindicator-location-service gtest ${GTEST_LIBS} ${GCOV_LIBS}) set_property (TARGET ${ALL_TESTS} gtest APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR} ${SERVICE_INCLUDE_DIRS} ${GTEST_INCLUDE_DIR}) indicator-location-13.10.0+14.04.20140207/tests/manual0000644000015201777760000000143112275205355022401 0ustar pbusernogroup00000000000000 Test-case indicator-location/unity7-items-check
Log in to a Unity 7 user session
Go to the panel and click on the Location indicator
Ensure there are items in the menu
Test-case indicator-location/unity7-greeter-items-check
Start a system and wait for the greeter or logout of the current user session
Go to the panel and click on the Location indicator
Ensure there are items in the menu
Test-case indicator-location/unity8-items-check
Login to a user session running Unity 8
Pull down the top panel until it sticks open
Navigate through the tabs until "Location" is shown
Location is at the top of the menu
The menu is populated with items
indicator-location-13.10.0+14.04.20140207/tests/phone-test.cc0000644000015201777760000001342712275205355023606 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #define INDICATOR_BUS_NAME "com.canonical.indicator.location" #define INDICATOR_OBJECT_PATH "/com/canonical/indicator/location" #define INDICATOR_PROFILE "phone" #include "gtest-dbus-indicator-fixture.h" #include "src/controller-mock.h" #include "src/service.h" class PhoneTest: public GTestDBusIndicatorFixture, public ControllerListener { protected: bool loc_enabled; bool loc_enabled_changed; bool gps_enabled; bool gps_enabled_changed; std::shared_ptr myController; std::shared_ptr myService; public: void clear_callbacks () { gps_enabled = false; gps_enabled_changed = false; gps_enabled = false; loc_enabled_changed = false; } virtual void on_gps_enabled_changed (bool is_enabled) { gps_enabled_changed = true; gps_enabled = is_enabled; } virtual void on_location_service_enabled_changed (bool is_enabled) { loc_enabled_changed = true; loc_enabled = is_enabled; } protected: virtual void SetUp () { GTestDBusIndicatorFixture :: SetUp (); clear_callbacks (); } virtual void setup_service () { myController.reset (new MockController ()); myController->add_listener (this); myService.reset (new Service (myController)); } virtual void teardown_service () { myService.reset (); myController->remove_listener (this); myController.reset (); } }; TEST_F (PhoneTest, ActionsExit) { ASSERT_TRUE (action_exists ("gps-detection-enabled")); ASSERT_TRUE (action_exists ("location-detection-enabled")); ASSERT_TRUE (action_exists ("phone-header")); ASSERT_TRUE (action_exists ("settings")); } TEST_F (PhoneTest, MenuitemsExist) { ASSERT_TRUE (action_menuitem_exists ("indicator.location-detection-enabled")); ASSERT_TRUE (action_menuitem_exists ("indicator.gps-detection-enabled")); //ASSERT_TRUE (action_menuitem_exists ("indicator.settings")); } TEST_F (PhoneTest, PlatformTogglesGPS) { bool enabled; const char * const key = "gps-detection-enabled"; GActionGroup * ag = G_ACTION_GROUP (action_group); GVariant * v; // check that the current state is the default value of 'false' v = g_action_group_get_action_state (ag, key); ASSERT_TRUE (v != nullptr); enabled = g_variant_get_boolean (v); g_variant_unref (v); ASSERT_FALSE (enabled); // confirm that toggling the mock controller's GPS is reflected in the action state for (int i=0; i<4; i++) { enabled = !enabled; myController->set_gps_enabled (enabled); wait_for_action_state_change (key); v = g_action_group_get_action_state (ag, key); ASSERT_TRUE (v != nullptr); ASSERT_EQ (enabled, g_variant_get_boolean (v)); g_variant_unref (v); } } TEST_F (PhoneTest, UserTogglesGPS) { bool enabled; const char * const key = "gps-detection-enabled"; GActionGroup * ag = G_ACTION_GROUP (action_group); GVariant * v; // check that the current state is the default value of 'false' v = g_action_group_get_action_state (ag, key); ASSERT_TRUE (v != nullptr); enabled = g_variant_get_boolean (v); g_variant_unref (v); ASSERT_FALSE (enabled); // confirm that toggling menu updates the controller for (int i=0; i<4; i++) { clear_callbacks (); g_action_group_activate_action (ag, key, nullptr); while (!gps_enabled_changed) wait_msec (50); ASSERT_TRUE (gps_enabled_changed); enabled = !enabled; ASSERT_EQ (enabled, gps_enabled); } } TEST_F (PhoneTest, PlatformTogglesLocation) { bool enabled; const char * const key = "location-detection-enabled"; GActionGroup * ag = G_ACTION_GROUP (action_group); GVariant * v; // check that the current state is the default value of 'false' v = g_action_group_get_action_state (ag, key); ASSERT_TRUE (v != nullptr); enabled = g_variant_get_boolean (v); g_variant_unref (v); ASSERT_FALSE (enabled); // confirm that toggling the mock controller's GPS is reflected in the action state for (int i=0; i<4; i++) { enabled = !enabled; myController->set_location_service_enabled (enabled); wait_for_action_state_change (key); v = g_action_group_get_action_state (ag, key); ASSERT_TRUE (v != nullptr); ASSERT_EQ (enabled, g_variant_get_boolean (v)); g_variant_unref (v); } } TEST_F (PhoneTest, UserTogglesLocation) { bool enabled; const char * const key = "location-detection-enabled"; GActionGroup * ag = G_ACTION_GROUP (action_group); GVariant * v; // check that the current state is the default value of 'false' v = g_action_group_get_action_state (ag, key); ASSERT_TRUE (v != nullptr); enabled = g_variant_get_boolean (v); g_variant_unref (v); ASSERT_FALSE (enabled); // confirm that toggling menu updates the controller for (int i=0; i<4; i++) { clear_callbacks (); g_action_group_activate_action (ag, key, nullptr); while (!loc_enabled_changed) wait_msec (50); ASSERT_TRUE (loc_enabled_changed); enabled = !enabled; ASSERT_EQ (enabled, loc_enabled); } } indicator-location-13.10.0+14.04.20140207/tests/gtest-dbus-indicator-fixture.h0000644000015201777760000002115112275205355027072 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #include "gtest-dbus-fixture.h" class GTestDBusIndicatorFixture: public GTestDBusFixture { typedef GTestDBusFixture super; enum { TIME_LIMIT_SEC = 10 }; private: static void on_name_appeared (GDBusConnection * connection G_GNUC_UNUSED, const gchar * name G_GNUC_UNUSED, const gchar * name_owner G_GNUC_UNUSED, gpointer gself) { g_main_loop_quit (static_cast(gself)->loop); } GSList * menu_references; gboolean any_item_changed; static void on_items_changed (GMenuModel * model G_GNUC_UNUSED, gint position G_GNUC_UNUSED, gint removed G_GNUC_UNUSED, gint added G_GNUC_UNUSED, gpointer any_item_changed) { *((gboolean*)any_item_changed) = true; } protected: void activate_subtree (GMenuModel * model) { // query the GDBusMenuModel for information to activate it int n = g_menu_model_get_n_items (model); if (!n) { // give the model a moment to populate its info wait_msec (100); n = g_menu_model_get_n_items (model); } // keep a ref so that it stays activated menu_references = g_slist_prepend (menu_references, g_object_ref(model)); g_signal_connect (model, "items-changed", G_CALLBACK(on_items_changed), &any_item_changed); // recurse for (int i=0; i= TIME_LIMIT_SEC; } protected: void wait_for_has_action (const char * name) { while (!g_action_group_has_action (G_ACTION_GROUP(action_group), name) && !times_up()) wait_msec (50); ASSERT_FALSE (times_up()); ASSERT_TRUE (g_action_group_has_action (G_ACTION_GROUP(action_group), name)); } void wait_for_menu_resync (void) { any_item_changed = false; while (!times_up() && !any_item_changed) wait_msec (50); g_warn_if_fail (any_item_changed); sync_menu (); } void wait_for_action_state_change (const gchar * action_name) { gchar * signal_name = g_strdup_printf ("action-state-changed::%s", action_name); wait_for_signal (action_group, signal_name); g_free (signal_name); } protected: bool find_menu_item_for_action (const char * action_key, GMenuModel ** setme, int * item_index) { bool success = false; for (GSList * l=menu_references; !success && (l!=nullptr); l=l->next) { GMenuModel * mm = G_MENU_MODEL (l->data); const int n = g_menu_model_get_n_items (mm); for (int i=0; !success && i * * 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 warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . */ #include #include #include /*** **** ***/ class GTestDBusFixture : public ::testing::Test { private: static void on_bus_opened (GObject * o G_GNUC_UNUSED, GAsyncResult * res, gpointer gself) { GTestDBusFixture * self = static_cast(gself); GError * err = nullptr; self->conn = g_bus_get_finish (res, &err); g_assert_no_error (err); g_main_loop_quit (self->loop); } static void on_bus_closed (GObject * o G_GNUC_UNUSED, GAsyncResult * res, gpointer gself) { GTestDBusFixture * self = static_cast(gself); GError * err = nullptr; g_dbus_connection_close_finish (self->conn, res, &err); g_assert_no_error (err); g_main_loop_quit (self->loop); } static gboolean wait_for_signal__timeout (gpointer name) { g_error ("%s: timed out waiting for signal '%s'", G_STRLOC, (char*)name); return G_SOURCE_REMOVE; } protected: virtual void SetUp () { conn = nullptr; test_dbus = nullptr; loop = nullptr; //g_setenv ("GSETTINGS_SCHEMA_DIR", SCHEMA_DIR, TRUE); //g_setenv ("GSETTINGS_BACKEND", "memory", TRUE); //g_debug ("SCHEMA_DIR is %s", SCHEMA_DIR); // pull up a test dbus loop = g_main_loop_new (nullptr, FALSE); test_dbus = g_test_dbus_new (G_TEST_DBUS_NONE); //g_test_dbus_add_service_dir (test_dbus, INDICATOR_SERVICE_DIR); //g_debug ("INDICATOR_SERVICE_DIR is %s", INDICATOR_SERVICE_DIR); g_test_dbus_up (test_dbus); const char * address; address = g_test_dbus_get_bus_address (test_dbus); g_setenv ("DBUS_SYSTEM_BUS_ADDRESS", address, TRUE); g_debug ("test_dbus's address is %s", address); // wait for the GDBusConnection before returning g_bus_get (G_BUS_TYPE_SYSTEM, nullptr, on_bus_opened, this); g_main_loop_run (loop); } virtual void TearDown() { // close the bus connection g_dbus_connection_close (conn, nullptr, on_bus_closed, this); g_main_loop_run (loop); g_clear_object (&conn); // tear down the test dbus g_test_dbus_down (test_dbus); g_clear_object (&test_dbus); g_clear_pointer (&loop, g_main_loop_unref); } /* convenience func to loop while waiting for a GObject's signal */ void wait_for_signal (gpointer o, const gchar * signal) { const int timeout_seconds = 5; // arbitrary // wait for the signal or for timeout, whichever comes first guint handler_id = g_signal_connect_swapped (o, signal, G_CALLBACK(g_main_loop_quit), loop); gulong timeout_id = g_timeout_add_seconds (timeout_seconds, wait_for_signal__timeout, const_cast(signal)); g_main_loop_run (loop); g_source_remove (timeout_id); g_signal_handler_disconnect (o, handler_id); } /* convenience func to loop for N msec */ void wait_msec (int msec) { guint id = g_timeout_add (msec, (GSourceFunc)g_main_loop_quit, loop); g_main_loop_run (loop); g_source_remove (id); } GMainLoop * loop; GTestDBus * test_dbus; GDBusConnection * conn; }; indicator-location-13.10.0+14.04.20140207/NEWS0000644000015201777760000000002512275205355020534 0ustar pbusernogroup00000000000000No news is good news indicator-location-13.10.0+14.04.20140207/CMakeLists.txt0000644000015201777760000000306312275205355022602 0ustar pbusernogroup00000000000000project (indicator-location) cmake_minimum_required (VERSION 2.8.9) list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) set (PROJECT_VERSION "13.10.0") set (PACKAGE ${CMAKE_PROJECT_NAME}) set (GETTEXT_PACKAGE indicator-location) option (enable_tests "Build the package's automatic tests." ON) option (enable_lcov "Generate lcov code coverage reports." ON) ## ## GNU standard paths ## include (GNUInstallDirs) if (EXISTS "/etc/debian_version") # Workaround for libexecdir on debian set (CMAKE_INSTALL_LIBEXECDIR "${CMAKE_INSTALL_LIBDIR}") set (CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBDIR}") endif () set (CMAKE_INSTALL_PKGLIBEXECDIR "${CMAKE_INSTALL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}") set (CMAKE_INSTALL_FULL_PKGLIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}") ## ## Check for prerequisites ## find_package (PkgConfig REQUIRED) include (FindPkgConfig) pkg_check_modules (SERVICE REQUIRED ubuntu-platform-api>=1.0.0 url-dispatcher-1 gio-unix-2.0>=2.36 glib-2.0>=2.36) ## ## ## set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CC_WARNING_ARGS " -Wall -Wextra -Wno-missing-field-initializers") # testing & coverage if (${enable_tests}) set (GTEST_SOURCE_DIR /usr/src/gtest/src) set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..) set (GTEST_LIBS -lpthread) enable_testing () if (${enable_lcov}) include(GCov) endif () endif () add_subdirectory (src) add_subdirectory (data) add_subdirectory (po) if (${enable_tests}) add_subdirectory (tests) endif () indicator-location-13.10.0+14.04.20140207/README0000644000015201777760000000001112275205355020710 0ustar pbusernogroup00000000000000Write me indicator-location-13.10.0+14.04.20140207/AUTHORS0000644000015201777760000000004612275205355021110 0ustar pbusernogroup00000000000000# Generated by Makefile. Do not edit. indicator-location-13.10.0+14.04.20140207/INSTALL0000644000015201777760000000340112275205355021067 0ustar pbusernogroup00000000000000# # Copyright (C) 2013 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 . # Compile-time build dependencies ------------------------------- - gettext (gettext 0.18.1.1-10ubuntu3 or later) - glib (libglib2.0, 2.36 or later) - cmake (cmake, 2.8.9 or later) - gcovr (gcovr, 2.4 or later) - lcov (lcov, 1.9 or later) - google test (libgtest-dev, 1.6.0 or later) - ubuntu-platform-api (libubuntu-platform-api1) Building the code ----------------- The simplest case is: $ cd indicator-location-X.Y.Z $ mkdir build $ cd build $ cmake .. $ make Running the tests ----------------- $ cd indicator-location-X.Y.Z $ mkdir build $ cd build $ cmake .. $ make $ make test Generating Test Coverage Reports -------------------------------- $ cd indicator-location-X.Y.Z $ mkdir build-coverage $ cd build-coverage $ cmake -DCMAKE_BUILD_TYPE=coverage .. $ make $ make coverage-html Installation ------------ $ mkdir build $ cd build $ cmake -DCMAKE_INSTALL_PREFIX=/usr .. # Or wherever... $ make $ make release $ make install What Gets Installed ------------------- ${datadir}/dbus-1/indicator-location.service ${datadir}/unity/indicators/com.canonical.indicator.location ${libexecdir}/indicator-location/indicator-location-service indicator-location-13.10.0+14.04.20140207/po/0000755000015201777760000000000012275205574020461 5ustar pbusernogroup00000000000000indicator-location-13.10.0+14.04.20140207/po/am.po0000644000015201777760000000164712275205355021423 0ustar pbusernogroup00000000000000# Amharic translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-18 20:23+0000\n" "Last-Translator: samson \n" "Language-Team: Amharic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "አካባቢ" #: ../src/phone.cc:260 msgid "Location detection" msgstr "አካባቢ በመፈለግ ላይ" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/ar.po0000644000015201777760000000172312275205355021423 0ustar pbusernogroup00000000000000# Arabic translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-22 18:09+0000\n" "Last-Translator: Ibrahim Saed \n" "Language-Team: Arabic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "الموقع" #: ../src/phone.cc:260 msgid "Location detection" msgstr "تحديد الموقع" #: ../src/phone.cc:265 msgid "GPS" msgstr "نظام تحديد المواقع (GPS)" indicator-location-13.10.0+14.04.20140207/po/gl.po0000644000015201777760000000167212275205355021426 0ustar pbusernogroup00000000000000# Galician translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 08:51+0000\n" "Last-Translator: Miguel Anxo Bouzada \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Localización" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Detección da localización" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/sl.po0000644000015201777760000000163712275205355021443 0ustar pbusernogroup00000000000000# Slovenian translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 12:04+0000\n" "Last-Translator: Sasa Batistic \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Položaj" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Odkrivanje položaja" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/tr.po0000644000015201777760000000162212275205355021444 0ustar pbusernogroup00000000000000# Turkish translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 17:50+0000\n" "Last-Translator: Volkan Gezer \n" "Language-Team: Turkish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Konum" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Konum algılama" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/POTFILES.in0000644000015201777760000000001512275205355022227 0ustar pbusernogroup00000000000000src/phone.cc indicator-location-13.10.0+14.04.20140207/po/cs.po0000644000015201777760000000157212275205355021430 0ustar pbusernogroup00000000000000# Czech translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-21 12:30+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "" #: ../src/phone.cc:260 msgid "Location detection" msgstr "" #: ../src/phone.cc:265 msgid "GPS" msgstr "" indicator-location-13.10.0+14.04.20140207/po/lv.po0000644000015201777760000000170612275205355021443 0ustar pbusernogroup00000000000000# Latvian translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 12:44+0000\n" "Last-Translator: Jānis-Marks Gailis \n" "Language-Team: Latvian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Atrašanās vieta" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Atrašanās vietas noteikšana" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/fi.po0000644000015201777760000000163712275205355021423 0ustar pbusernogroup00000000000000# Finnish translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 08:10+0000\n" "Last-Translator: Jiri Grönroos \n" "Language-Team: Finnish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Sijainti" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Sijainnin havaitseminen" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/CMakeLists.txt0000644000015201777760000000020112275205355023207 0ustar pbusernogroup00000000000000include (Translations) add_translations_directory ("${GETTEXT_PACKAGE}") add_translations_catalog ("${GETTEXT_PACKAGE}" ../src/) indicator-location-13.10.0+14.04.20140207/po/de.po0000644000015201777760000000162712275205355021414 0ustar pbusernogroup00000000000000# German translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 08:55+0000\n" "Last-Translator: Dennis Baudys \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Standort" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Standortbestimmung" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/pl.po0000644000015201777760000000167012275205355021435 0ustar pbusernogroup00000000000000# Polish translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 14:44+0000\n" "Last-Translator: Zygmunt Krynicki \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Lokalizacja" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Wykrywanie lokalizacji" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/pt_BR.po0000644000015201777760000000172512275205355022031 0ustar pbusernogroup00000000000000# Brazilian Portuguese translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-18 23:28+0000\n" "Last-Translator: Fábio Nogueira \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Localização" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Detecção de localização" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/ckb.po0000644000015201777760000000167012275205355021561 0ustar pbusernogroup00000000000000# Kurdish (Sorani) translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-21 11:22+0000\n" "Last-Translator: Asos \n" "Language-Team: Kurdish (Sorani) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "شوێن" #: ../src/phone.cc:260 msgid "Location detection" msgstr "دۆزەرەوەی شوێن" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/ru.po0000644000015201777760000000172612275205355021452 0ustar pbusernogroup00000000000000# Russian translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 13:43+0000\n" "Last-Translator: Sean Rybakov \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Местоположение" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Определение местоположения" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/he.po0000644000015201777760000000164612275205355021421 0ustar pbusernogroup00000000000000# Hebrew translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 11:44+0000\n" "Last-Translator: Yaron \n" "Language-Team: Hebrew \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "מיקום" #: ../src/phone.cc:260 msgid "Location detection" msgstr "איתור מיקום" #: ../src/phone.cc:265 msgid "GPS" msgstr "איכון" indicator-location-13.10.0+14.04.20140207/po/ms.po0000644000015201777760000000161312275205355021436 0ustar pbusernogroup00000000000000# Malay translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-17 09:09+0000\n" "Last-Translator: abuyop \n" "Language-Team: Malay \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Lokasi" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Pengesanan lokasi" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/ug.po0000644000015201777760000000164012275205355021432 0ustar pbusernogroup00000000000000# Uyghur translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-17 04:29+0000\n" "Last-Translator: Gheyret T.Kenji \n" "Language-Team: Uyghur \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "ئورۇن" #: ../src/phone.cc:260 msgid "Location detection" msgstr "ئورۇن بايقاش" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/fa.po0000644000015201777760000000157612275205355021415 0ustar pbusernogroup00000000000000# Persian translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 17:09+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Persian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "" #: ../src/phone.cc:260 msgid "Location detection" msgstr "" #: ../src/phone.cc:265 msgid "GPS" msgstr "" indicator-location-13.10.0+14.04.20140207/po/it.po0000644000015201777760000000157612275205355021443 0ustar pbusernogroup00000000000000# Italian translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-18 17:05+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "" #: ../src/phone.cc:260 msgid "Location detection" msgstr "" #: ../src/phone.cc:265 msgid "GPS" msgstr "" indicator-location-13.10.0+14.04.20140207/po/es.po0000644000015201777760000000165612275205355021435 0ustar pbusernogroup00000000000000# Spanish translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 08:50+0000\n" "Last-Translator: walter pinto \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Ubicación" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Detección de ubicación" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/nb.po0000644000015201777760000000165012275205355021417 0ustar pbusernogroup00000000000000# Norwegian Bokmal translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 11:03+0000\n" "Last-Translator: Åka Sikrom \n" "Language-Team: Norwegian Bokmal \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Plassering" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Finn plassering" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/sv.po0000644000015201777760000000157612275205355021457 0ustar pbusernogroup00000000000000# Swedish translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 18:37+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "" #: ../src/phone.cc:260 msgid "Location detection" msgstr "" #: ../src/phone.cc:265 msgid "GPS" msgstr "" indicator-location-13.10.0+14.04.20140207/po/uk.po0000644000015201777760000000173512275205355021443 0ustar pbusernogroup00000000000000# Ukrainian translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 10:03+0000\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Розташування" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Визначення місця перебування" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/fr.po0000644000015201777760000000165012275205355021427 0ustar pbusernogroup00000000000000# French translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-19 14:46+0000\n" "Last-Translator: londumas \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Position" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Détection de la position" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/po/ca.po0000644000015201777760000000166412275205355021410 0ustar pbusernogroup00000000000000# Catalan translation for indicator-location # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the indicator-location package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: indicator-location\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-01-15 19:55+0100\n" "PO-Revision-Date: 2014-01-16 07:39+0000\n" "Last-Translator: David Planella \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2014-02-01 06:57+0000\n" "X-Generator: Launchpad (build 16916)\n" #: ../src/phone.cc:77 ../src/phone.cc:80 msgid "Location" msgstr "Ubicació" #: ../src/phone.cc:260 msgid "Location detection" msgstr "Detecció de la ubicació" #: ../src/phone.cc:265 msgid "GPS" msgstr "GPS" indicator-location-13.10.0+14.04.20140207/src/0000755000015201777760000000000012275205574020632 5ustar pbusernogroup00000000000000indicator-location-13.10.0+14.04.20140207/src/controller.h0000644000015201777760000000326112275205355023165 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #ifndef __INDICATOR_LOCATION_CONTROLLER_H__ #define __INDICATOR_LOCATION_CONTROLLER_H__ #include class ControllerListener { public: ControllerListener() {} virtual ~ControllerListener() {} public: virtual void on_gps_enabled_changed (bool is_enabled) = 0; virtual void on_location_service_enabled_changed (bool is_enabled) = 0; }; class Controller { public: Controller () {} virtual ~Controller() {} void add_listener (ControllerListener *); void remove_listener (ControllerListener *); virtual bool is_valid () const = 0; virtual bool is_gps_enabled () const = 0; virtual bool is_location_service_enabled () const = 0; virtual void set_gps_enabled (bool enabled) = 0; virtual void set_location_service_enabled (bool enabled) = 0; private: std::set listeners; protected: void notify_gps_enabled (bool); void notify_location_service_enabled (bool); }; #endif // __INDICATOR_LOCATION_CONTROLLER_H__ indicator-location-13.10.0+14.04.20140207/src/utils.h0000644000015201777760000000224112275205355022137 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * Authors: * Charles Kerr * * 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 warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . */ #ifndef __INDICATOR_LOCATION_UTILS_H__ #define __INDICATOR_LOCATION_UTILS_H__ #include #include struct GObjectDeleter { void operator()(GObject * o) { g_object_unref (o); } void operator()(GMenu * o) { operator()(G_OBJECT(o)); } void operator()(GDBusConnection * o) { operator()(G_OBJECT(o)); } void operator()(GSimpleActionGroup * o) { operator()(G_OBJECT(o)); } }; #endif /* __INDICATOR_LOCATION_UTILS_H__ */ indicator-location-13.10.0+14.04.20140207/src/phone.h0000644000015201777760000000406712275205355022120 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #ifndef __INDICATOR_LOCATION_PHONE_H__ #define __INDICATOR_LOCATION_PHONE_H__ #include #include #include #include "controller.h" class Phone: public ControllerListener { public: Phone (const std::shared_ptr& controller, const std::shared_ptr& action_group); virtual ~Phone (); std::shared_ptr get_menu () { return menu; } protected: std::shared_ptr controller; virtual void on_gps_enabled_changed (bool is_enabled); virtual void on_location_service_enabled_changed (bool is_enabled); private: std::shared_ptr menu; std::shared_ptr action_group; private: std::shared_ptr create_menu (); private: bool should_be_visible (); GVariant * action_state_for_root (); GSimpleAction * create_root_action (); private: GVariant * action_state_for_location_detection (); GSimpleAction * create_detection_enabled_action (); static void on_detection_location_activated (GSimpleAction*, GVariant*, gpointer); private: GVariant * action_state_for_gps_detection (); GSimpleAction * create_gps_enabled_action (); static void on_detection_gps_activated (GSimpleAction*, GVariant*, gpointer); private: GSimpleAction * create_settings_action (); }; #endif /* __INDICATOR_LOCATION_PHONE_H__ */ indicator-location-13.10.0+14.04.20140207/src/CMakeLists.txt0000644000015201777760000000237012275205355023371 0ustar pbusernogroup00000000000000 set_property (DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES ${SERVICE_INCLUDE_DIRS}) set_property (DIRECTORY APPEND PROPERTY LINK_DIRECTORIES ${SERVICE_INCLUDE_DIRS}) ### ### The library. ### this doesn't get installed anywhere; ### it's built apart from main() as a convenience for tests/ ### set (INDICATOR_LIB "libindicator-location-service") add_library (${INDICATOR_LIB} STATIC controller.cc phone.cc service.cc) set_property (TARGET ${INDICATOR_LIB} APPEND PROPERTY LINK_LIBRARIES ${INDICATOR_LIB} ${SERVICE_LIBRARIES} ${GCOV_LIBS}) ### ### The service execuable. ### set (INDICATOR_EXEC "indicator-location-service") add_executable (${INDICATOR_EXEC} main.cc controller-ualc.cc) set_property (SOURCE main.cc APPEND PROPERTY COMPILE_DEFINITIONS GETTEXT_PACKAGE="${GETTEXT_PACKAGE}" GNOMELOCALEDIR="@CMAKE_INSTALL_FULL_LOCALEDIR@") target_link_libraries (${INDICATOR_EXEC} libindicator-location-service) install (TARGETS ${INDICATOR_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}) set_property (TARGET ${INDICATOR_LIB} ${INDICATOR_EXEC} APPEND_STRING PROPERTY COMPILE_FLAGS " ${CC_WARNING_ARGS} ${GCOV_FLAGS} --std=c++11") indicator-location-13.10.0+14.04.20140207/src/controller-ualc.cc0000644000015201777760000000563012275205355024247 0ustar pbusernogroup00000000000000 /* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #include #include "controller-ualc.h" UbuntuAppLocController :: UbuntuAppLocController (): ualc (ua_location_service_create_controller ()) { if (ualc != nullptr) { ua_location_service_controller_set_status_changed_handler ( ualc, on_location_service_controller_status_changed, this); } } UbuntuAppLocController :: ~UbuntuAppLocController () { if (ualc != nullptr) ua_location_service_controller_unref (ualc); } void UbuntuAppLocController :: on_location_service_controller_status_changed ( UALocationServiceStatusFlags f, void * vself) { auto self = static_cast(vself); if (f & (UA_LOCATION_SERVICE_ENABLED | UA_LOCATION_SERVICE_DISABLED)) self->notify_gps_enabled (self->is_location_service_enabled ()); if (f & (UA_LOCATION_SERVICE_GPS_ENABLED | UA_LOCATION_SERVICE_GPS_DISABLED)) self->notify_gps_enabled (self->is_gps_enabled()); } /*** **** ***/ bool UbuntuAppLocController :: is_gps_enabled () const { UALocationServiceStatusFlags flags = 0; return (ualc != nullptr) && (!ua_location_service_controller_query_status (ualc, &flags)) && (flags & UA_LOCATION_SERVICE_GPS_ENABLED); } void UbuntuAppLocController :: set_gps_enabled (bool enabled) { UStatus status = enabled ? ua_location_service_controller_enable_gps (ualc) : ua_location_service_controller_disable_gps (ualc); if (status != U_STATUS_SUCCESS) std::cerr << "Error turning GPS " << (enabled?"on":"off") << std::endl; } /*** **** ***/ bool UbuntuAppLocController :: is_location_service_enabled () const { UALocationServiceStatusFlags flags = 0; return (ualc != nullptr) && (!ua_location_service_controller_query_status (ualc, &flags)) && (flags & UA_LOCATION_SERVICE_ENABLED); } void UbuntuAppLocController :: set_location_service_enabled (bool enabled) { UStatus status = enabled ? ua_location_service_controller_enable_service (ualc) : ua_location_service_controller_disable_service (ualc); if (status != U_STATUS_SUCCESS) std::cerr << "Error turning Location Service " << (enabled?"on":"off") << std::endl; } indicator-location-13.10.0+14.04.20140207/src/main.cc0000644000015201777760000000273012275205355022064 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * Authors: * Charles Kerr * * 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 warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . */ #include #include #include #include "controller-ualc.h" #include "service.h" static void on_name_lost (Service * service G_GNUC_UNUSED, gpointer loop) { g_main_loop_quit (static_cast(loop)); } int main (int argc G_GNUC_UNUSED, char ** argv G_GNUC_UNUSED) { GMainLoop * loop; /* boilerplate i18n */ setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); textdomain (GETTEXT_PACKAGE); /* set up the service */ loop = g_main_loop_new (nullptr, false); std::shared_ptr controller (new UbuntuAppLocController ()); Service service (controller); service.set_name_lost_callback (on_name_lost, loop); g_main_loop_run (loop); /* cleanup */ g_main_loop_unref (loop); return 0; } indicator-location-13.10.0+14.04.20140207/src/controller-mock.h0000644000015201777760000000263112275205355024114 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #ifndef __INDICATOR_LOCATION_CONTROLLER_MOCK__H__ #define __INDICATOR_LOCATION_CONTROLLER_MOCK__H__ #include "controller.h" class MockController: public Controller { public: MockController (): valid(true), gps(false), loc(false) { } virtual ~MockController() { } bool is_valid () const { return valid; } bool is_gps_enabled () const { return gps; } bool is_location_service_enabled () const { return loc; } void set_gps_enabled (bool enabled) { notify_gps_enabled (gps=enabled); } void set_location_service_enabled (bool enabled) { notify_location_service_enabled (loc=enabled); } private: bool valid; bool gps; bool loc; }; #endif // __INDICATOR_LOCATION_CONTROLLER_MOCK__H__ indicator-location-13.10.0+14.04.20140207/src/controller-ualc.h0000644000015201777760000000305512275205355024110 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #ifndef __INDICATOR_LOCATION_CONTROLLER_UALC__H__ #define __INDICATOR_LOCATION_CONTROLLER_UALC__H__ #include #include #include #include "controller.h" class UbuntuAppLocController: public Controller { public: UbuntuAppLocController (); virtual ~UbuntuAppLocController(); bool is_valid () const { return ualc != nullptr; } bool is_gps_enabled () const; bool is_location_service_enabled () const; void set_gps_enabled (bool enabled); void set_location_service_enabled (bool enabled); private: UbuntuApplicationLocationServiceController * ualc; static void on_location_service_controller_status_changed ( UALocationServiceStatusFlags, void *); }; #endif // __INDICATOR_LOCATION_CONTROLLER_UALC__H__ indicator-location-13.10.0+14.04.20140207/src/service.h0000644000015201777760000000360712275205355022446 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * Authors: * Charles Kerr * * 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 warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . */ #ifndef __INDICATOR_LOCATION_SERVICE_H__ #define __INDICATOR_LOCATION_SERVICE_H__ #include #include #include "controller.h" #include "phone.h" #include "utils.h" // GObjectDeleter class Service { public: Service (const std::shared_ptr& controller); virtual ~Service (); private: std::shared_ptr action_group; std::unique_ptr connection; Phone phone_profile; public: typedef void (*name_lost_callback_func)(Service*, void* user_data); void set_name_lost_callback (name_lost_callback_func callback, void* user_data); private: name_lost_callback_func name_lost_callback; void * name_lost_user_data; private: unsigned int action_group_export_id; std::set exported_menus; void unexport (); private: // DBus callbacks unsigned int bus_own_id; void on_name_lost (GDBusConnection*, const char*); void on_bus_acquired (GDBusConnection*, const char*); static void on_name_lost (GDBusConnection*, const char*, gpointer); static void on_bus_acquired (GDBusConnection*, const char*, gpointer); }; #endif /* __INDICATOR_LOCATION_SERVICE_H__ */ indicator-location-13.10.0+14.04.20140207/src/service.cc0000644000015201777760000001114212275205355022575 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * Authors: * Charles Kerr * * 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 warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . */ #include #include #include "service.h" #define BUS_NAME "com.canonical.indicator.location" #define BUS_PATH "/com/canonical/indicator/location" /** *** **/ Service :: Service (const std::shared_ptr& controller): action_group (g_simple_action_group_new(), GObjectDeleter()), phone_profile (controller, action_group), name_lost_callback (nullptr), name_lost_user_data (0), action_group_export_id (0), bus_own_id (0) { bus_own_id = g_bus_own_name (G_BUS_TYPE_SESSION, BUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, nullptr, on_name_lost, this, nullptr); } Service :: ~Service () { if (connection) unexport (); if (bus_own_id != 0) g_bus_unown_name (bus_own_id); } void Service :: set_name_lost_callback (name_lost_callback_func callback, void* user_data) { name_lost_callback = callback; name_lost_user_data = user_data; } void Service :: unexport () { g_return_if_fail (connection); // unexport the menu(s) for (auto& id : exported_menus) g_dbus_connection_unexport_menu_model (connection.get(), id); exported_menus.clear (); // unexport the action group if (action_group_export_id != 0) { g_dbus_connection_unexport_action_group (connection.get(), action_group_export_id); action_group_export_id = 0; } } /*** **** GDBus ***/ void Service :: on_name_lost (GDBusConnection * connection, const char * name, gpointer gself) { g_debug ("%s::%s: %s %p", G_STRLOC, G_STRFUNC, name, connection); static_cast(gself)->on_name_lost (connection, name); } void Service :: on_name_lost (GDBusConnection * connection, const char * name) { g_debug ("%s::%s: %s %p", G_STRLOC, G_STRFUNC, name, connection); if (name_lost_callback != nullptr) (name_lost_callback)(this, name_lost_user_data); } void Service :: on_bus_acquired (GDBusConnection * connection, const char * name, gpointer gself) { static_cast(gself)->on_bus_acquired (connection, name); } void Service :: on_bus_acquired (GDBusConnection * connection, const char * name) { g_debug ("%s::%s: %s %p", G_STRLOC, G_STRFUNC, name, connection); this->connection.reset (G_DBUS_CONNECTION (g_object_ref(connection))); GError * error = nullptr; /* export the action group */ unsigned int export_id = g_dbus_connection_export_action_group (connection, BUS_PATH, G_ACTION_GROUP (action_group.get()), &error); if (error != nullptr) { g_warning ("Unable to export action group: %s", error->message); g_clear_error (&error); } else { action_group_export_id = export_id; } /* export the menu(s) */ struct { std::shared_ptr menu; const char * path; } menus[] = { { phone_profile.get_menu(), BUS_PATH "/phone" } }; for (unsigned int i=0, n=G_N_ELEMENTS(menus); imessage); g_clear_error (&error); } else { exported_menus.insert (export_id); } } } indicator-location-13.10.0+14.04.20140207/src/phone.cc0000644000015201777760000002002712275205355022250 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #include #include #include #include "phone.h" #include "utils.h" // GObjectDeleter #define PROFILE_NAME "phone" Phone :: Phone (const std::shared_ptr& controller_, const std::shared_ptr& action_group_): controller (controller_), menu (create_menu ()), action_group (action_group_) { controller->add_listener (this); /* create the actions & add them to the group */ std::array actions = { create_root_action(), create_detection_enabled_action(), create_gps_enabled_action(), create_settings_action() }; for (auto a : actions) { g_action_map_add_action (G_ACTION_MAP(action_group.get()), G_ACTION(a)); g_object_unref (a); } } Phone :: ~Phone () { controller->remove_listener (this); } /*** **** ***/ bool Phone :: should_be_visible () { // NB: this is a placeholder for now. // The spec requires that the location indicator be visible iff // an application has accessed location info recently, // but there's not a platform API to support that yet. return true; } GVariant * Phone :: action_state_for_root () { GVariantBuilder builder; g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); const char * a11y = _("Location"); g_variant_builder_add (&builder, "{sv}", "accessible-desc", g_variant_new_string (a11y)); const char * title = _("Location"); g_variant_builder_add (&builder, "{sv}", "title", g_variant_new_string (title)); gboolean visible = should_be_visible (); g_variant_builder_add (&builder, "{sv}", "visible", g_variant_new_boolean (visible)); const char * icon_name = "gps"; GIcon * icon = g_themed_icon_new_with_default_fallbacks (icon_name); GVariant * serialized_icon = g_icon_serialize (icon); if (serialized_icon != NULL) { g_variant_builder_add (&builder, "{sv}", "icon", serialized_icon); g_variant_unref (serialized_icon); } g_object_unref (icon); return g_variant_builder_end (&builder); } #define HEADER_ACTION_KEY PROFILE_NAME"-header" GSimpleAction * Phone :: create_root_action () { return g_simple_action_new_stateful (HEADER_ACTION_KEY, nullptr, action_state_for_root ()); } /*** **** ***/ #define LOCATION_ACTION_KEY "location-detection-enabled" GVariant * Phone :: action_state_for_location_detection () { return g_variant_new_boolean (controller->is_location_service_enabled()); } void Phone :: on_location_service_enabled_changed (bool is_enabled G_GNUC_UNUSED) { GAction * action = g_action_map_lookup_action (G_ACTION_MAP(action_group.get()), LOCATION_ACTION_KEY); g_simple_action_set_state (G_SIMPLE_ACTION(action), action_state_for_location_detection()); } void Phone :: on_detection_location_activated (GSimpleAction * action, GVariant * parameter G_GNUC_UNUSED, gpointer gself) { GVariant * state = g_action_get_state (G_ACTION (action)); static_cast(gself)->controller->set_location_service_enabled (!g_variant_get_boolean (state)); g_variant_unref (state); } GSimpleAction * Phone :: create_detection_enabled_action () { GSimpleAction * action; action = g_simple_action_new_stateful (LOCATION_ACTION_KEY, nullptr, action_state_for_location_detection()); g_simple_action_set_enabled (action, controller->is_valid()); g_signal_connect (action, "activate", G_CALLBACK(on_detection_location_activated), this); return action; } /*** **** ***/ #define GPS_ACTION_KEY "gps-detection-enabled" GVariant * Phone :: action_state_for_gps_detection () { return g_variant_new_boolean (controller->is_gps_enabled()); } void Phone :: on_gps_enabled_changed (bool is_enabled G_GNUC_UNUSED) { GAction * action = g_action_map_lookup_action (G_ACTION_MAP(action_group.get()), GPS_ACTION_KEY); g_simple_action_set_state (G_SIMPLE_ACTION(action), action_state_for_gps_detection()); } void Phone :: on_detection_gps_activated (GSimpleAction * action, GVariant * parameter G_GNUC_UNUSED, gpointer gself) { GVariant * state = g_action_get_state (G_ACTION (action)); static_cast(gself)->controller->set_gps_enabled (!g_variant_get_boolean (state)); g_variant_unref (state); } GSimpleAction * Phone :: create_gps_enabled_action () { GSimpleAction * action; action = g_simple_action_new_stateful (GPS_ACTION_KEY, nullptr, action_state_for_gps_detection()); g_simple_action_set_enabled (action, controller->is_valid()); g_signal_connect (action, "activate", G_CALLBACK(on_detection_gps_activated), this); return action; } /*** **** ***/ #define SETTINGS_ACTION_KEY "settings" namespace { void on_uri_dispatched (const gchar * uri, gboolean success G_GNUC_UNUSED, gpointer user_data G_GNUC_UNUSED) { if (!success) g_warning ("Unable to activate '%s'", uri); } void on_settings_activated (GSimpleAction * simple G_GNUC_UNUSED, GVariant * parameter, gpointer user_data G_GNUC_UNUSED) { const char * key = g_variant_get_string (parameter, nullptr); gchar * uri = g_strdup_printf ("settings:///system/%s", key); url_dispatch_send (uri, on_uri_dispatched, nullptr); g_free (uri); } } GSimpleAction * Phone :: create_settings_action () { GSimpleAction * action; action = g_simple_action_new (SETTINGS_ACTION_KEY, G_VARIANT_TYPE_STRING); g_signal_connect (action, "activate", G_CALLBACK(on_settings_activated), nullptr); return action; } /*** **** ***/ std::shared_ptr Phone :: create_menu () { GMenu * menu; GMenu * submenu; GMenuItem * header; GMenuItem * location; GMenuItem * gps; /* create the submenu */ submenu = g_menu_new (); location = g_menu_item_new (_("Location detection"), "indicator." LOCATION_ACTION_KEY); g_menu_item_set_attribute (location, "x-canonical-type", "s", "com.canonical.indicator.switch"); g_menu_append_item (submenu, location); g_object_unref (location); gps = g_menu_item_new (_("GPS"), "indicator." GPS_ACTION_KEY); g_menu_item_set_attribute (gps, "x-canonical-type", "s", "com.canonical.indicator.switch"); g_menu_append_item (submenu, gps); g_object_unref (gps); // disabled for 13.04 -- the location settings panel isn't complete // g_menu_append (submenu, _("Location settings…"), "indicator." SETTINGS_ACTION_KEY "::location"); /* add the submenu to a new header */ header = g_menu_item_new (nullptr, "indicator." HEADER_ACTION_KEY); g_menu_item_set_attribute (header, "x-canonical-type", "s", "com.canonical.indicator.root"); g_menu_item_set_submenu (header, G_MENU_MODEL (submenu)); g_object_unref (submenu); /* add the header to a new menu */ menu = g_menu_new (); g_menu_append_item (menu, header); g_object_unref (header); return std::shared_ptr(menu, GObjectDeleter()); } indicator-location-13.10.0+14.04.20140207/src/controller.cc0000644000015201777760000000223612275205355023324 0ustar pbusernogroup00000000000000/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Charles Kerr */ #include "controller.h" void Controller :: add_listener (ControllerListener * l) { listeners.insert (l); } void Controller :: remove_listener (ControllerListener * l) { listeners.erase (l); } void Controller :: notify_gps_enabled (bool enabled) { for (auto it : listeners) it->on_gps_enabled_changed (enabled); } void Controller :: notify_location_service_enabled (bool enabled) { for (auto it : listeners) it->on_location_service_enabled_changed (enabled); } indicator-location-13.10.0+14.04.20140207/data/0000755000015201777760000000000012275205574020754 5ustar pbusernogroup00000000000000indicator-location-13.10.0+14.04.20140207/data/indicator-location.desktop.in0000644000015201777760000000025512275205355026535 0ustar pbusernogroup00000000000000[Desktop Entry] Type=Application Name=Indicator Location Exec=@pkglibexecdir@/indicator-location-service NotShowIn=Unity; NoDisplay=true StartupNotify=false Terminal=false indicator-location-13.10.0+14.04.20140207/data/CMakeLists.txt0000644000015201777760000000323412275205355023513 0ustar pbusernogroup00000000000000## ## Upstart Job File ## # where to install set (UPSTART_JOBS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/upstart/sessions") message (STATUS "${UPSTART_JOBS_DIR} is the Upstart Jobs File install dir") set (UPSTART_JOB_NAME "${CMAKE_PROJECT_NAME}.conf") set (UPSTART_JOB_FILE "${CMAKE_CURRENT_BINARY_DIR}/${UPSTART_JOB_NAME}") set (UPSTART_JOB_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${UPSTART_JOB_NAME}.in") # build it set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") configure_file ("${UPSTART_JOB_FILE_IN}" "${UPSTART_JOB_FILE}") # install it install (FILES "${UPSTART_JOB_FILE}" DESTINATION "${UPSTART_JOBS_DIR}") ## ## XDG Autostart File ## # where to install set (XDG_AUTOSTART_DIR "/etc/xdg/autostart") message (STATUS "${XDG_AUTOSTART_DIR} is the XDG Autostart install dir") set (XDG_AUTOSTART_NAME "${CMAKE_PROJECT_NAME}.desktop") set (XDG_AUTOSTART_FILE "${CMAKE_CURRENT_BINARY_DIR}/${XDG_AUTOSTART_NAME}") set (XDG_AUTOSTART_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${XDG_AUTOSTART_NAME}.in") # build it set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") configure_file ("${XDG_AUTOSTART_FILE_IN}" "${XDG_AUTOSTART_FILE}") # install it install (FILES "${XDG_AUTOSTART_FILE}" DESTINATION "${XDG_AUTOSTART_DIR}") ## ## Unity Indicator File ## # where to install set (UNITY_INDICATOR_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/unity/indicators") message (STATUS "${UNITY_INDICATOR_DIR} is the Unity Indicator install dir") set (UNITY_INDICATOR_NAME "com.canonical.indicator.location") set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}") install (FILES "${UNITY_INDICATOR_FILE}" DESTINATION "${UNITY_INDICATOR_DIR}") indicator-location-13.10.0+14.04.20140207/data/indicator-location.conf.in0000644000015201777760000000031112275205355026002 0ustar pbusernogroup00000000000000description "Indicator Location Backend" start on indicators-loaded or indicator-services-start stop on desktop-end or indicator-services-end respawn exec @pkglibexecdir@/indicator-location-service indicator-location-13.10.0+14.04.20140207/data/com.canonical.indicator.location0000644000015201777760000000034612275205355027165 0ustar pbusernogroup00000000000000[Indicator Service] Name=indicator-location ObjectPath=/com/canonical/indicator/location Position=80 [phone] ObjectPath=/com/canonical/indicator/location/phone [phone_greeter] ObjectPath=/com/canonical/indicator/location/phone indicator-location-13.10.0+14.04.20140207/COPYING0000644000015201777760000010451312275205355021077 0ustar pbusernogroup00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . indicator-location-13.10.0+14.04.20140207/trim-lcov.py0000755000015201777760000000267012275205355022336 0ustar pbusernogroup00000000000000#!/usr/bin/python # This script removes branch and/or line coverage data for lines that # contain a particular substring. # # In the interest of "fairness" it removes all branch or coverage data # when a match is found -- not just negative data. It is therefore # likely that running this script will actually reduce the total number # of lines and branches that are marked as covered (in absolute terms). # # This script intentionally avoids checking for errors. Any exceptions # will trigger make to fail. # # Author: Ryan Lortie import sys line_suppress = ['g_assert_not_reached'] branch_suppress = ['g_assert', 'g_return_if_fail', 'g_clear_object', 'g_clear_pointer', 'g_return_val_if_fail', 'G_DEFINE_TYPE'] def check_suppress(suppressions, source, data): line, _, rest = data.partition(',') line = int(line) - 1 assert line < len(source) for suppression in suppressions: if suppression in source[line]: return True return False source = [] for line in sys.stdin: line = line[:-1] keyword, _, rest = line.partition(':') # Source file if keyword == 'SF': source = file(rest).readlines() # Branch coverage data elif keyword == 'BRDA': if check_suppress(branch_suppress, source, rest): continue # Line coverage data elif keyword == 'DA': if check_suppress(line_suppress, source, rest): continue print line indicator-location-13.10.0+14.04.20140207/MERGE-REVIEW0000644000015201777760000000142012275205355021616 0ustar pbusernogroup00000000000000 This documents the expections that the project has on what both submitters and reviewers should ensure that they've done for a merge into the project. == Submitter Responsibilities == * Ensure the project compiles and the test suite executes without error * Ensure that non-obvious code has comments explaining it * If the change works on specific profiles, please include those in the merge description. == Reviewer Responsibilities == * Did the Jenkins build compile? Pass? Run unit tests successfully? * Are there appropriate tests to cover any new functionality? * If the description says this effects the phone profile: * Run tests indicator-location/unity8* * If the description says this effects the desktop profile: * Run tests indicator-location/unity7*