keyboard: Remove general tab
The cursor blinking and repeat keys configuration options have moved to the Universal Access panel, with the shortcuts panel due for a re-design. See https://bugzilla.gnome.org/show_bug.cgi?id=757486 See https://bugzilla.gnome.org/show_bug.cgi?id=757464 https://bugzilla.gnome.org/show_bug.cgi?id=757489
This commit is contained in:
parent
e1fe43f62b
commit
1f192985ef
5 changed files with 2 additions and 633 deletions
|
@ -17,8 +17,6 @@ libkeyboard_la_SOURCES = \
|
|||
cc-keyboard-option.h \
|
||||
wm-common.c \
|
||||
wm-common.h \
|
||||
keyboard-general.c \
|
||||
keyboard-general.h \
|
||||
keyboard-shortcuts.c \
|
||||
keyboard-shortcuts.h
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "cc-keyboard-panel.h"
|
||||
#include "cc-keyboard-resources.h"
|
||||
|
||||
#include "keyboard-general.h"
|
||||
#include "keyboard-shortcuts.h"
|
||||
|
||||
CC_PANEL_REGISTER (CcKeyboardPanel, cc_keyboard_panel)
|
||||
|
@ -129,11 +128,10 @@ cc_keyboard_panel_constructor (GType gtype,
|
|||
self = CC_KEYBOARD_PANEL (obj);
|
||||
priv = self->priv;
|
||||
|
||||
keyboard_general_init (CC_PANEL (self), priv->builder);
|
||||
keyboard_shortcuts_init (CC_PANEL (self), priv->builder);
|
||||
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder,
|
||||
"keyboard_notebook");
|
||||
"shortcuts_page");
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (self), widget);
|
||||
|
||||
|
@ -149,7 +147,6 @@ cc_keyboard_panel_get_help_uri (CcPanel *panel)
|
|||
static void
|
||||
cc_keyboard_panel_dispose (GObject *object)
|
||||
{
|
||||
keyboard_general_dispose (CC_PANEL (object));
|
||||
keyboard_shortcuts_dispose (CC_PANEL (object));
|
||||
|
||||
G_OBJECT_CLASS (cc_keyboard_panel_parent_class)->dispose (object);
|
||||
|
|
|
@ -149,431 +149,6 @@
|
|||
<action-widget response="-5">custom-shortcut-ok-button</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkNotebook" id="keyboard_notebook">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_border">False</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="general_page">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox22">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label300">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Repeat Keys</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox19">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label43">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label"> </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox100">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="repeat_toggle">
|
||||
<property name="label" translatable="yes">Key presses _repeat when key is held down</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="repeat_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="repeat_delay_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Delay:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">repeat_delay_scale</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="repeat_speed_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Speed:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">repeat_speed_scale</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="delay_short_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="xpad">10</property>
|
||||
<property name="label" translatable="yes" context="keyboard, delay">Short</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="0.82999999999999996"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="repeat_slow_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="xpad">10</property>
|
||||
<property name="label" translatable="yes" context="keyboard, speed">Slow</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="0.82999999999999996"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHScale" id="repeat_delay_scale">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="adjustment">repeat_delay_adjustment</property>
|
||||
<property name="draw_value">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHScale" id="repeat_speed_scale">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="adjustment">repeat_speed_adjustment</property>
|
||||
<property name="draw_value">False</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="repeat_speed_scale-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes">Repeat keys speed</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="delay_long_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes" context="keyboard, delay">Long</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="0.82999999999999996"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="repeat_fast_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes" context="keyboard, speed">Fast</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="0.82999999999999996"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox230">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Cursor Blinking</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox20">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label44">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label"> </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="cursor_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cursor_toggle">
|
||||
<property name="label" translatable="yes">Cursor _blinks in text fields</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="cursor_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="cursor_speed_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">S_peed:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">cursor_blink_time_scale</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="blink_slow_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="xpad">10</property>
|
||||
<property name="label" translatable="yes" context="keyboard, speed">Slow</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="0.82999999999999996"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHScale" id="cursor_blink_time_scale">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="adjustment">cursor_blink_time_adjustment</property>
|
||||
<property name="draw_value">False</property>
|
||||
<property name="inverted">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="cursor_blink_time_scale-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes">Cursor blink speed</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="blink_fast_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes" context="keyboard, speed">Fast</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="0.82999999999999996"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="linkbutton">
|
||||
<property name="label" translatable="yes">Input Sources</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="uri">region panel</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Typing</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="shortcuts_page">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
@ -724,55 +299,5 @@
|
|||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Shortcuts</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="lower_sizegroup">
|
||||
<widgets>
|
||||
<widget name="delay_short_label"/>
|
||||
<widget name="repeat_slow_label"/>
|
||||
<widget name="blink_slow_label"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="repeat_delay_adjustment">
|
||||
<property name="lower">100</property>
|
||||
<property name="upper">2000</property>
|
||||
<property name="value">500</property>
|
||||
<property name="step_increment">10</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="repeat_speed_adjustment">
|
||||
<property name="lower">0.5</property>
|
||||
<property name="upper">110</property>
|
||||
<property name="value">33.3</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="sliders_sizegroup">
|
||||
<widgets>
|
||||
<widget name="cursor_blink_time_scale"/>
|
||||
<widget name="repeat_speed_scale"/>
|
||||
<widget name="repeat_delay_scale"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="upper_sizegroup">
|
||||
<widgets>
|
||||
<widget name="delay_long_label"/>
|
||||
<widget name="repeat_fast_label"/>
|
||||
<widget name="blink_fast_label"/>
|
||||
</widgets>
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
|
|
|
@ -1,126 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Intel, Inc
|
||||
*
|
||||
* 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 2 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Thomas Wood <thomas.wood@intel.com>
|
||||
* Rodrigo Moya <rodrigo@gnome.org>
|
||||
*/
|
||||
|
||||
#include "keyboard-general.h"
|
||||
|
||||
#define WID(s) GTK_WIDGET (gtk_builder_get_object (builder, s))
|
||||
|
||||
static GSettings *keyboard_settings = NULL;
|
||||
static GSettings *interface_settings = NULL;
|
||||
|
||||
static gboolean
|
||||
get_rate (GValue *value,
|
||||
GVariant *variant,
|
||||
gpointer user_data)
|
||||
{
|
||||
int rate;
|
||||
gdouble fraction;
|
||||
|
||||
rate = g_variant_get_uint32 (variant);
|
||||
fraction = 1.0 / ((gdouble) rate / 1000.0);
|
||||
g_value_set_double (value, fraction);
|
||||
g_debug ("Getting fraction %f for msecs %d", fraction, rate);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GVariant *
|
||||
set_rate (const GValue *value,
|
||||
const GVariantType *expected_type,
|
||||
gpointer user_data)
|
||||
{
|
||||
gdouble rate;
|
||||
int msecs;
|
||||
|
||||
rate = g_value_get_double (value);
|
||||
msecs = (1 / rate) * 1000;
|
||||
g_debug ("Setting repeat rate to %d", msecs);
|
||||
return g_variant_new_uint32 (msecs);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
layout_link_clicked (GtkLinkButton *button,
|
||||
CcPanel *panel)
|
||||
{
|
||||
CcShell *shell;
|
||||
GError *error = NULL;
|
||||
|
||||
shell = cc_panel_get_shell (panel);
|
||||
if (cc_shell_set_active_panel_from_id (shell, "region", NULL, &error) == FALSE)
|
||||
{
|
||||
g_warning ("Failed to activate Region panel: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
keyboard_general_init (CcPanel *panel, GtkBuilder *builder)
|
||||
{
|
||||
if (keyboard_settings == NULL)
|
||||
keyboard_settings = g_settings_new ("org.gnome.desktop.peripherals.keyboard");
|
||||
|
||||
if (interface_settings == NULL)
|
||||
interface_settings = g_settings_new ("org.gnome.desktop.interface");
|
||||
|
||||
g_settings_bind (keyboard_settings, "repeat",
|
||||
WID ("repeat_toggle"), "active",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_settings_bind (keyboard_settings, "repeat",
|
||||
WID ("repeat_grid"), "sensitive",
|
||||
G_SETTINGS_BIND_GET);
|
||||
|
||||
g_settings_bind (keyboard_settings, "delay",
|
||||
gtk_range_get_adjustment (GTK_RANGE (WID ("repeat_delay_scale"))), "value",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_settings_bind_with_mapping (keyboard_settings, "repeat-interval",
|
||||
gtk_range_get_adjustment (GTK_RANGE (WID ("repeat_speed_scale"))), "value",
|
||||
G_SETTINGS_BIND_DEFAULT,
|
||||
get_rate, set_rate, NULL, NULL);
|
||||
|
||||
g_settings_bind (interface_settings, "cursor-blink",
|
||||
WID ("cursor_toggle"), "active",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_settings_bind (interface_settings, "cursor-blink",
|
||||
WID ("cursor_grid"), "sensitive",
|
||||
G_SETTINGS_BIND_GET);
|
||||
|
||||
g_settings_bind (interface_settings, "cursor-blink-time",
|
||||
gtk_range_get_adjustment (GTK_RANGE (WID ("cursor_blink_time_scale"))), "value",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
|
||||
g_signal_connect (WID ("linkbutton"), "activate-link",
|
||||
G_CALLBACK (layout_link_clicked), panel);
|
||||
}
|
||||
|
||||
void
|
||||
keyboard_general_dispose (CcPanel *panel)
|
||||
{
|
||||
if (keyboard_settings != NULL)
|
||||
{
|
||||
g_object_unref (keyboard_settings);
|
||||
keyboard_settings = NULL;
|
||||
}
|
||||
|
||||
if (interface_settings != NULL)
|
||||
{
|
||||
g_object_unref (interface_settings);
|
||||
interface_settings = NULL;
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Intel, Inc
|
||||
*
|
||||
* 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 2 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Thomas Wood <thomas.wood@intel.com>
|
||||
* Rodrigo Moya <rodrigo@gnome.org>
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <shell/cc-panel.h>
|
||||
|
||||
void keyboard_general_init (CcPanel *panel, GtkBuilder *builder);
|
||||
void keyboard_general_dispose (CcPanel *panel);
|
Loading…
Add table
Add a link
Reference in a new issue