[gnome-initial-setup/shell/4765: 310/362] keyboard: move realize override into dialog class
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 310/362] keyboard: move realize override into dialog class
- Date: Thu, 19 Mar 2015 01:47:08 +0000 (UTC)
commit 2c9728739cb9adf99b81561cbd5ab0646bacbf34
Author: Cosimo Cecchi <cosimo endlesm com>
Date: Tue Dec 16 18:53:20 2014 +0800
keyboard: move realize override into dialog class
.../pages/keyboard/cc-keyboard-query.c | 19 +++++++++++++++++++
.../pages/keyboard/gis-keyboard-page.c | 15 ---------------
2 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/gnome-initial-setup/pages/keyboard/cc-keyboard-query.c
b/gnome-initial-setup/pages/keyboard/cc-keyboard-query.c
index 4bdfccb..d457340 100644
--- a/gnome-initial-setup/pages/keyboard/cc-keyboard-query.c
+++ b/gnome-initial-setup/pages/keyboard/cc-keyboard-query.c
@@ -252,6 +252,23 @@ cc_keyboard_query_layout_result (CcKeyboardQuery *self,
}
static void
+cc_keyboard_query_realize (GtkWidget *widget)
+{
+ GdkWindow *window;
+
+ GTK_WIDGET_CLASS (cc_keyboard_query_parent_class)->realize (widget);
+
+ window = gtk_widget_get_window (widget);
+ /* disable all the WM functions */
+ gdk_window_set_functions (window, GDK_FUNC_ALL
+ | GDK_FUNC_RESIZE
+ | GDK_FUNC_MOVE
+ | GDK_FUNC_MINIMIZE
+ | GDK_FUNC_MAXIMIZE
+ | GDK_FUNC_CLOSE);
+}
+
+static void
cc_keyboard_query_class_init (CcKeyboardQueryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -287,6 +304,8 @@ cc_keyboard_query_class_init (CcKeyboardQueryClass *klass)
gtk_widget_class_bind_template_callback (widget_class, no_have_key);
gtk_widget_class_bind_template_callback (widget_class, key_press_event);
+ widget_class->realize = cc_keyboard_query_realize;
+
klass->layout_result = cc_keyboard_query_layout_result;
}
diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
index 6cf2d35..f95619e 100644
--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
+++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
@@ -986,20 +986,6 @@ detector_response (GtkDialog *detector, gint response_id, gpointer data)
}
static void
-detector_realize (GtkDialog *detector, gpointer data)
-{
- GisKeyboardPage *self = data;
- GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (detector));
- /* disable all the WM functions */
- gdk_window_set_functions (window, GDK_FUNC_ALL
- | GDK_FUNC_RESIZE
- | GDK_FUNC_MOVE
- | GDK_FUNC_MINIMIZE
- | GDK_FUNC_MAXIMIZE
- | GDK_FUNC_CLOSE);
-}
-
-static void
show_keyboard_detector (GisKeyboardPage *self)
{
GisKeyboardPagePrivate *priv = gis_keyboard_page_get_instance_private (self);
@@ -1009,7 +995,6 @@ show_keyboard_detector (GisKeyboardPage *self)
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
detector = cc_keyboard_query_new (GTK_WINDOW (toplevel), priv->xkb_info);
g_signal_connect (detector, "response", G_CALLBACK (detector_response), self);
- g_signal_connect (detector, "realize", G_CALLBACK (detector_realize), self);
cc_keyboard_query_run (CC_KEYBOARD_QUERY (detector));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]