bluetooth: Port to GTK4
This needs libgnome-bluetooth-2.0, which was recently merged.
This commit is contained in:
parent
b81a180c4f
commit
2b11900b0c
4 changed files with 4 additions and 36 deletions
|
@ -223,7 +223,7 @@ config_h.set('HAVE_WWAN', host_is_linux,
|
|||
|
||||
if host_is_linux_not_s390
|
||||
# gnome-bluetooth
|
||||
gnome_bluetooth_dep = dependency('gnome-bluetooth-1.0', version: '>= 3.18.2')
|
||||
gnome_bluetooth_dep = dependency('gnome-bluetooth-2.0')
|
||||
|
||||
libwacom_dep = dependency('libwacom', version: '>= 0.7')
|
||||
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<template class="CcBluetoothPanel" parent="CcPanel">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="no_devices_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin_top">64</property>
|
||||
<property name="margin_bottom">64</property>
|
||||
|
@ -17,7 +14,6 @@
|
|||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">bluetooth-active-symbolic</property>
|
||||
<property name="pixel_size">192</property>
|
||||
<style>
|
||||
|
@ -27,7 +23,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">No Bluetooth Found</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
|
@ -37,7 +32,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="label" translatable="yes">Plug in a dongle to use Bluetooth.</property>
|
||||
</object>
|
||||
|
@ -46,7 +40,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="disabled_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin_top">64</property>
|
||||
<property name="margin_bottom">64</property>
|
||||
|
@ -55,7 +48,6 @@
|
|||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">bluetooth-active-symbolic</property>
|
||||
<property name="pixel_size">192</property>
|
||||
<style>
|
||||
|
@ -65,7 +57,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Bluetooth Turned Off</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
|
@ -75,7 +66,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="label" translatable="yes">Turn on to connect devices and receive file transfers.</property>
|
||||
</object>
|
||||
|
@ -84,7 +74,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="airplane_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin_top">64</property>
|
||||
<property name="margin_bottom">64</property>
|
||||
|
@ -93,7 +82,6 @@
|
|||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">airplane-mode-symbolic</property>
|
||||
<property name="pixel_size">192</property>
|
||||
<style>
|
||||
|
@ -103,7 +91,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Airplane Mode is on</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
|
@ -113,14 +100,12 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="label" translatable="yes">Bluetooth is disabled when airplane mode is on.</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Turn Off Airplane Mode</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
|
@ -131,7 +116,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="hw_airplane_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin_top">64</property>
|
||||
<property name="margin_bottom">64</property>
|
||||
|
@ -140,7 +124,6 @@
|
|||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">airplane-mode-symbolic</property>
|
||||
<property name="pixel_size">192</property>
|
||||
<style>
|
||||
|
@ -150,7 +133,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Hardware Airplane Mode is on</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
|
@ -160,7 +142,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="label" translatable="yes">Turn off the Airplane mode switch to enable Bluetooth.</property>
|
||||
</object>
|
||||
|
@ -169,7 +150,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="BluetoothSettingsWidget" id="settings_widget">
|
||||
<property name="visible">True</property>
|
||||
<signal name="panel-changed" handler="panel_changed_cb" object="CcBluetoothPanel" swapped="yes"/>
|
||||
<signal name="adapter-status-changed" handler="adapter_status_changed_cb" object="CcBluetoothPanel" swapped="yes"/>
|
||||
</object>
|
||||
|
@ -178,23 +158,11 @@
|
|||
</child>
|
||||
</template>
|
||||
<object class="GtkBox" id="header_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enable_switch">
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">center</property>
|
||||
<signal name="state-set" handler="enable_switch_state_set_cb" object="CcBluetoothPanel" swapped="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">4</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -37,7 +37,7 @@ endif
|
|||
|
||||
if host_is_linux_not_s390
|
||||
panels += [
|
||||
# 'bluetooth',
|
||||
'bluetooth',
|
||||
'thunderbolt',
|
||||
# 'wacom'
|
||||
]
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
extern GType cc_applications_panel_get_type (void);
|
||||
//extern GType cc_background_panel_get_type (void);
|
||||
#ifdef BUILD_BLUETOOTH
|
||||
//extern GType cc_bluetooth_panel_get_type (void);
|
||||
extern GType cc_bluetooth_panel_get_type (void);
|
||||
#endif /* BUILD_BLUETOOTH */
|
||||
//extern GType cc_color_panel_get_type (void);
|
||||
//extern GType cc_date_time_panel_get_type (void);
|
||||
|
@ -100,7 +100,7 @@ static CcPanelLoaderVtable default_panels[] =
|
|||
PANEL_TYPE("applications", cc_applications_panel_get_type, NULL),
|
||||
//PANEL_TYPE("background", cc_background_panel_get_type, NULL),
|
||||
#ifdef BUILD_BLUETOOTH
|
||||
//PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type, NULL),
|
||||
PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type, NULL),
|
||||
#endif
|
||||
PANEL_TYPE("camera", cc_camera_panel_get_type, NULL),
|
||||
//PANEL_TYPE("color", cc_color_panel_get_type, NULL),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue