[gucharmap] charmap: Read the snap-cols-pow2 setting on startup



commit e70a487b03d3668408e7df240267778dc29268d7
Author: Christian Persch <chpe gnome org>
Date:   Thu Mar 3 19:00:59 2016 +0100

    charmap: Read the snap-cols-pow2 setting on startup
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675923

 gucharmap/gucharmap-window.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gucharmap/gucharmap-window.c b/gucharmap/gucharmap-window.c
index eb42413..e94bf05 100644
--- a/gucharmap/gucharmap-window.c
+++ b/gucharmap/gucharmap-window.c
@@ -770,12 +770,6 @@ gucharmap_window_init (GucharmapWindow *guw)
                                    menu_entries, G_N_ELEMENTS (menu_entries),
                                    guw);
 
-  /* snap-to-power-of-two */
-  action = g_settings_create_action (guw->settings, "snap-cols-pow2");
-  g_action_map_add_action (G_ACTION_MAP (guw), action);
-  g_signal_connect (guw->settings, "changed::snap-cols-pow2",
-                    G_CALLBACK (snap_cols_pow2_changed), guw);
-
   /* Now the widgets */
   grid = gtk_grid_new ();
   gtk_container_add (GTK_CONTAINER (guw), grid);
@@ -836,6 +830,13 @@ gucharmap_window_init (GucharmapWindow *guw)
 
   gtk_window_set_has_resize_grip (GTK_WINDOW (guw), TRUE);
 
+  /* snap-to-power-of-two */
+  action = g_settings_create_action (guw->settings, "snap-cols-pow2");
+  g_action_map_add_action (G_ACTION_MAP (guw), action);
+  snap_cols_pow2_changed (guw->settings, "snap-cols-pow2", guw);
+  g_signal_connect (guw->settings, "changed::snap-cols-pow2",
+                    G_CALLBACK (snap_cols_pow2_changed), guw);
+
   /* read initial settings */
   /* font */
   g_settings_get (guw->settings, "font", "ms", &font);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]