Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
X11:Unity
indicator-bluetooth
indicator-bluetooth-drop-url-dispatcher.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File indicator-bluetooth-drop-url-dispatcher.patch of Package indicator-bluetooth
--- a/configure.ac +++ b/configure.ac @@ -16,11 +16,9 @@ dnl #################################### GLIB_REQUIRED_VERSION=2.36 GIO_REQUIRED_VERSION=2.36 -URL_DISPATCHER_1_REQUIRED_VERSION=1 PKG_CHECK_MODULES(SERVICE_DEPS, [glib-2.0 >= $GLIB_REQUIRED_VERSION - gio-unix-2.0 >= $GIO_REQUIRED_VERSION - url-dispatcher-1 >= $URL_DISPATCHER_1_REQUIRED_VERSION]) + gio-unix-2.0 >= $GIO_REQUIRED_VERSION]) dnl ############################## --- a/src/desktop.vala +++ b/src/desktop.vala @@ -214,7 +214,7 @@ class Desktop: Profile void show_settings (string panel) { if (Environment.get_variable ("MIR_SOCKET") != null) - UrlDispatch.send ("settings:///system/bluetooth"); + spawn_command_line_async ("system-settings"); else if (Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity" && Environment.find_program_in_path ("unity-control-center") != null) spawn_command_line_async ("unity-control-center " + panel); else --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,7 +6,6 @@ indicator_bluetooth_service_SOURCES = \ desktop.vala \ device.vala \ main.vala \ - phone.vala \ profile.vala \ killswitch.vala \ service.vala @@ -17,7 +16,6 @@ indicator_bluetooth_service_VALAFLAGS = --vapidir=./ \ --pkg config \ --pkg rfkill \ - --pkg url-dispatcher \ --pkg posix \ --pkg glib-2.0 \ --pkg gio-2.0 --- a/src/phone.vala +++ b/src/phone.vala @@ -1,77 +0,0 @@ -/* - * 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 <http://www.gnu.org/licenses/>. - * - * Authors: - * Charles Kerr <charles.kerr@canonical.com> - */ - -class Phone: Profile -{ - SimpleActionGroup action_group; - - public Phone (Bluetooth bluetooth, SimpleActionGroup action_group) - { - const string profile_name = "phone"; - base (bluetooth, profile_name); - - this.bluetooth = bluetooth; - this.action_group = action_group; - - // build the static actions - Action[] actions = {}; - actions += root_action; - actions += create_supported_action (bluetooth); - actions += create_enabled_action (bluetooth); - actions += create_settings_action (); - foreach (var a in actions) - action_group.add_action (a); - - var section = new Menu (); - section.append_item (create_enabled_menuitem ()); - section.append (_("Bluetooth settingsā¦"), - "indicator.phone-show-settings::bluetooth"); - menu.append_section (null, section); - - // know when to show the indicator & when to hide it - bluetooth.notify.connect (() => update_visibility()); - update_visibility (); - - bluetooth.notify.connect (() => update_root_action_state()); - } - - void update_visibility () - { - visible = bluetooth.enabled; - } - - /// - /// Actions - /// - - void show_settings (string panel) - { - UrlDispatch.send ("settings:///system/bluetooth"); - } - - Action create_settings_action () - { - var action = new SimpleAction ("phone-show-settings", VariantType.STRING); - - action.activate.connect ((action, panel) - => show_settings (panel.get_string())); - - return action; - } -} --- a/src/service.vala +++ b/src/service.vala @@ -52,7 +52,6 @@ public class Service: Object actions = new SimpleActionGroup (); profiles = new HashTable<string,Profile> (str_hash, str_equal); - profiles.insert ("phone", new Phone (bluetooth, actions)); profiles.insert ("desktop", new Desktop (bluetooth, actions)); } --- a/vapi/url-dispatcher.vapi +++ b/vapi/url-dispatcher.vapi @@ -1,9 +0,0 @@ -[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "liburl-dispatcher-1/url-dispatcher.h")] - -namespace UrlDispatch -{ - public delegate void DispatchCallback (); - - [CCode (cname = "url_dispatch_send")] - public static void send (string url, DispatchCallback? func = null); -}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor