summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-13 21:45:01 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-13 21:45:01 +0000
commit60a8d90366771e4b74837b0a2ecaee674630c396 (patch)
tree8cec0f56fb5bd09590a17767952c8a8d97dfa5ff
parent8be537ef80ec6e211bae5a67b99af74bb744c453 (diff)
emit a profile changed signal even if reconnecting to the same profile. otherwise, the menu item in the toolbar gets unchecked after being activated.
-rw-r--r--src/trg-main-window.c2
-rw-r--r--src/trg-prefs.c2
-rw-r--r--src/trg-prefs.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index c1af8d3..63a81b1 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -464,6 +464,8 @@ void connect_cb(GtkWidget * w, gpointer data) {
if (profile && currentProfile != profile)
trg_prefs_set_profile(prefs, profile);
+ else
+ trg_prefs_profile_change_emit_signal(prefs);
populate_result = trg_client_populate_with_settings(priv->client);
diff --git a/src/trg-prefs.c b/src/trg-prefs.c
index cf731f7..1501217 100644
--- a/src/trg-prefs.c
+++ b/src/trg-prefs.c
@@ -51,7 +51,7 @@ enum {
static guint signals[PREFS_SIGNAL_COUNT] = { 0 };
-static void trg_prefs_profile_change_emit_signal(TrgPrefs *p)
+void trg_prefs_profile_change_emit_signal(TrgPrefs *p)
{
g_signal_emit(p, signals[PREF_PROFILE_CHANGE], 0);
}
diff --git a/src/trg-prefs.h b/src/trg-prefs.h
index c5ab1c2..2cc05b5 100644
--- a/src/trg-prefs.h
+++ b/src/trg-prefs.h
@@ -138,6 +138,7 @@ void trg_prefs_set_bool(TrgPrefs *p, gchar *key, gboolean value, int flags);
gboolean trg_prefs_save(TrgPrefs *p);
void trg_prefs_load(TrgPrefs *p);
void trg_prefs_changed_emit_signal(TrgPrefs *p, gchar *key);
+void trg_prefs_profile_change_emit_signal(TrgPrefs *p);
guint trg_prefs_get_add_flags(TrgPrefs *p);
G_END_DECLS