fix restore main window state regression
A regression was introduced by 982b28831c708632b25428958e8d24cae89adc03
causing the main window to always be hidden when launching with the '-r'
option to restore the previous window state (visible or hidden). This
patch fixes this bug.
Change-Id: I16ef616eb53b76db39ddf953f3cc395ec5e89d7d
Tuleap: #370
diff --git a/src/ring_client.cpp b/src/ring_client.cpp
index 91e6d4f..15c5a5d 100644
--- a/src/ring_client.cpp
+++ b/src/ring_client.cpp
@@ -319,12 +319,12 @@
/* check if the window should be destoryed or not on close */
g_signal_connect(priv->win, "delete-event", G_CALLBACK(on_close_window), client);
- //track window state
- g_signal_connect_swapped(priv->settings, "changed::show-main-window", G_CALLBACK(show_main_window_toggled), client);
/* if we didn't launch with the '-r' (--restore-last-window-state) option then force the
* show-main-window to true */
if (!priv->restore_window_state)
ring_window_show(client);
+ show_main_window_toggled(client);
+ g_signal_connect_swapped(priv->settings, "changed::show-main-window", G_CALLBACK(show_main_window_toggled), client);
// track sys icon state
g_signal_connect(priv->settings, "changed::show-status-icon", G_CALLBACK(systray_toggled), client);