summaryrefslogtreecommitdiff
path: root/capplets/keyboard
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/keyboard')
-rw-r--r--capplets/keyboard/mate-keyboard-properties-a11y.c18
-rw-r--r--capplets/keyboard/mate-keyboard-properties-dialog.ui6
-rw-r--r--capplets/keyboard/mate-keyboard-properties-layout-chooser.ui18
-rw-r--r--capplets/keyboard/mate-keyboard-properties-model-chooser.ui6
-rw-r--r--capplets/keyboard/mate-keyboard-properties-options-dialog.ui1
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkb.c4
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkblt.c1
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkbot.c2
-rw-r--r--capplets/keyboard/mate-keyboard-properties.c19
9 files changed, 50 insertions, 25 deletions
diff --git a/capplets/keyboard/mate-keyboard-properties-a11y.c b/capplets/keyboard/mate-keyboard-properties-a11y.c
index bd2d13e2..7a3b566e 100644
--- a/capplets/keyboard/mate-keyboard-properties-a11y.c
+++ b/capplets/keyboard/mate-keyboard-properties-a11y.c
@@ -121,7 +121,8 @@ static void
a11y_notifications_dialog_response_cb (GtkWidget *w, gint response)
{
if (response == GTK_RESPONSE_HELP) {
-
+ capplet_help (GTK_WINDOW (w),
+ "prefs-keyboard#goscustdesk-TBL-86");
}
else {
gtk_widget_destroy (w);
@@ -319,4 +320,19 @@ setup_a11y_tabs (GtkBuilder *dialog)
gtk_range_get_adjustment (GTK_RANGE (WID ("mousekeys_init_delay_slide"))),
"value",
G_SETTINGS_BIND_DEFAULT);
+
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ const char *range_names[] = {
+ "slowkeys_delay_slide",
+ "bouncekeys_delay_slide",
+ "mousekeys_accel_time_slide",
+ "mousekeys_max_speed_slide",
+ "mousekeys_init_delay_slide"
+ };
+
+ int i;
+ for (i = 0; i < 5; ++i) {
+ gtk_range_set_update_policy (GTK_RANGE (WID (range_names[i])), GTK_UPDATE_DISCONTINUOUS);
+ }
+#endif
}
diff --git a/capplets/keyboard/mate-keyboard-properties-dialog.ui b/capplets/keyboard/mate-keyboard-properties-dialog.ui
index b82195ff..ea058c9a 100644
--- a/capplets/keyboard/mate-keyboard-properties-dialog.ui
+++ b/capplets/keyboard/mate-keyboard-properties-dialog.ui
@@ -421,7 +421,6 @@
<object class="GtkHScale" id="cursor_blink_time_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment3</property>
<property name="draw_value">False</property>
<child internal-child="accessible">
@@ -995,7 +994,6 @@ default settings</property>
<object class="GtkHScale" id="slowkeys_delay_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment4</property>
<property name="draw_value">False</property>
<child internal-child="accessible">
@@ -1147,7 +1145,6 @@ default settings</property>
<object class="GtkHScale" id="bouncekeys_delay_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment5</property>
<property name="draw_value">False</property>
<child internal-child="accessible">
@@ -1337,7 +1334,6 @@ default settings</property>
<object class="GtkHScale" id="mousekeys_accel_time_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment6</property>
<property name="draw_value">False</property>
<property name="value_pos">right</property>
@@ -1352,7 +1348,6 @@ default settings</property>
<object class="GtkHScale" id="mousekeys_max_speed_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment7</property>
<property name="digits">0</property>
<property name="draw_value">False</property>
@@ -1473,7 +1468,6 @@ default settings</property>
<object class="GtkHScale" id="mousekeys_init_delay_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment8</property>
<property name="digits">0</property>
<property name="draw_value">False</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui b/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui
index 2de4c9b4..1df1fa7f 100644
--- a/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui
+++ b/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui
@@ -6,7 +6,7 @@
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Choose a Layout</property>
- <property name="default_width">670</property>
+ <property name="default_width">900</property>
<property name="default_height">350</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
@@ -27,9 +27,9 @@
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="top_padding">3</property>
- <property name="bottom_padding">3</property>
- <property name="left_padding">3</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">10</property>
<property name="right_padding">6</property>
<child>
<object class="GtkTable" id="table1">
@@ -107,10 +107,10 @@
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="top_padding">3</property>
- <property name="bottom_padding">3</property>
- <property name="left_padding">3</property>
- <property name="right_padding">3</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">6</property>
<child>
<object class="GtkTable" id="table3">
<property name="visible">True</property>
@@ -200,6 +200,8 @@
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
+ <property name="width_request">900</property>
+ <property name="height_request">400</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-model-chooser.ui b/capplets/keyboard/mate-keyboard-properties-model-chooser.ui
index a89cfc93..07f4f685 100644
--- a/capplets/keyboard/mate-keyboard-properties-model-chooser.ui
+++ b/capplets/keyboard/mate-keyboard-properties-model-chooser.ui
@@ -8,7 +8,7 @@
<property name="title" translatable="yes">Choose a Keyboard Model</property>
<property name="modal">True</property>
<property name="default_width">450</property>
- <property name="default_height">400</property>
+ <property name="default_height">380</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
@@ -40,6 +40,7 @@
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
+ <property name="height_request">130</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="vendors_list">
@@ -70,9 +71,10 @@
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
+ <property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
+ <property name="height_request">130</property>
<child>
<object class="GtkTreeView" id="models_list">
<property name="visible">True</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-options-dialog.ui b/capplets/keyboard/mate-keyboard-properties-options-dialog.ui
index 06914448..419004ec 100644
--- a/capplets/keyboard/mate-keyboard-properties-options-dialog.ui
+++ b/capplets/keyboard/mate-keyboard-properties-options-dialog.ui
@@ -24,6 +24,7 @@
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">out</property>
+ <property name="height_request">300</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-xkb.c b/capplets/keyboard/mate-keyboard-properties-xkb.c
index 4f795719..7ccc0273 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkb.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkb.c
@@ -61,10 +61,8 @@ set_model_text (GtkWidget * picker, gchar * value)
XklConfigItem *ci = xkl_config_item_new ();
char *model = NULL;
- if (value != NULL) {
+ if (value != NULL && value[0] != '\0') {
model = g_strdup(value);
- if (model != NULL && model[0] == '\0')
- model = NULL;
}
if (model == NULL) {
diff --git a/capplets/keyboard/mate-keyboard-properties-xkblt.c b/capplets/keyboard/mate-keyboard-properties-xkblt.c
index b23fd750..b6107306 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkblt.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkblt.c
@@ -359,7 +359,6 @@ show_selected_layout (GtkWidget * button, GtkBuilder * dialog)
char *descr = xkb_layout_description_utf8 (id);
GtkWidget *parent = WID ("keyboard_dialog");
GtkWidget *popup = matekbd_keyboard_drawing_new_dialog (idx, descr);
- gtk_widget_set_parent (popup, parent);
clear_xkb_elements_list (layouts_list);
g_free (descr);
}
diff --git a/capplets/keyboard/mate-keyboard-properties-xkbot.c b/capplets/keyboard/mate-keyboard-properties-xkbot.c
index ddf23115..5d4ee614 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkbot.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkbot.c
@@ -419,7 +419,7 @@ chooser_response_cb (GtkDialog * dialog, gint response, gpointer data)
switch (response) {
case GTK_RESPONSE_HELP:
capplet_help (GTK_WINDOW (dialog),
- "prefs-keyboard-layoutoptions");
+ "prefs-keyboard#prefs-keyboard-layoutoptions");
break;
case GTK_RESPONSE_CLOSE:{
/* just cleanup */
diff --git a/capplets/keyboard/mate-keyboard-properties.c b/capplets/keyboard/mate-keyboard-properties.c
index 894bd0ec..a5810e71 100644
--- a/capplets/keyboard/mate-keyboard-properties.c
+++ b/capplets/keyboard/mate-keyboard-properties.c
@@ -28,6 +28,7 @@
# include <config.h>
#endif
+#include <stdlib.h>
#include <gio/gio.h>
#include "capplet-util.h"
@@ -56,11 +57,16 @@ create_dialog (void)
GtkBuilder *dialog;
GtkSizeGroup *size_group;
GtkWidget *image;
+ GError *error = NULL;
+ static const gchar *uifile = MATECC_UI_DIR "/mate-keyboard-properties-dialog.ui";
dialog = gtk_builder_new ();
- gtk_builder_add_from_file (dialog, MATECC_UI_DIR
- "/mate-keyboard-properties-dialog.ui",
- NULL);
+ if (gtk_builder_add_from_file (dialog, uifile, &error) == 0) {
+ g_warning ("Could not load UI: %s", error->message);
+ g_error_free (error);
+ g_object_unref (dialog);
+ return NULL;
+ }
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
gtk_size_group_add_widget (size_group, WID ("repeat_slow_label"));
@@ -180,6 +186,10 @@ setup_dialog (GtkBuilder * dialog)
gtk_notebook_remove_page (nb, tb_page);
}
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ gtk_range_set_update_policy (GTK_RANGE (WID ("cursor_blink_time_scale")), GTK_UPDATE_DISCONTINUOUS);
+#endif
+
g_signal_connect (WID ("keyboard_dialog"), "response",
(GCallback) dialog_response, NULL);
@@ -234,6 +244,9 @@ main (int argc, char **argv)
typing_break_settings = g_settings_new (TYPING_BREAK_SCHEMA);
dialog = create_dialog ();
+ if (!dialog) /* Warning was already printed to console */
+ exit (EXIT_FAILURE);
+
setup_dialog (dialog);
if (switch_to_typing_break_page) {
gtk_notebook_set_current_page (GTK_NOTEBOOK