aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-gtk_egos.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-03-31 21:38:51 +0200
committerChristian Grothoff <christian@grothoff.org>2018-03-31 21:38:51 +0200
commit60d7d182cd7545dda4492cdc03dc5f048bdc98b4 (patch)
treea79ff6deed9f05a57407794f477647afacbd291e /src/conversation/gnunet-conversation-gtk_egos.c
parenteac1312f563a3db362e189c8b2c915d666110dca (diff)
downloadgnunet-gtk-60d7d182cd7545dda4492cdc03dc5f048bdc98b4.tar.gz
gnunet-gtk-60d7d182cd7545dda4492cdc03dc5f048bdc98b4.zip
fix conversation FTBFS and other minor stuff
Diffstat (limited to 'src/conversation/gnunet-conversation-gtk_egos.c')
-rw-r--r--src/conversation/gnunet-conversation-gtk_egos.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_egos.c b/src/conversation/gnunet-conversation-gtk_egos.c
index 0324ffb7..716d7cdf 100644
--- a/src/conversation/gnunet-conversation-gtk_egos.c
+++ b/src/conversation/gnunet-conversation-gtk_egos.c
@@ -102,6 +102,7 @@ identity_cb (void *cls,
102 const char *name) 102 const char *name)
103{ 103{
104 GtkTreeIter iter; 104 GtkTreeIter iter;
105 GtkTreeIter iter2;
105 GtkTreeRowReference *rr; 106 GtkTreeRowReference *rr;
106 GtkTreePath *path; 107 GtkTreePath *path;
107 GtkComboBox *cb; 108 GtkComboBox *cb;
@@ -121,17 +122,18 @@ identity_cb (void *cls,
121 EGO_LS_NAME, name, 122 EGO_LS_NAME, name,
122 EGO_LS_EGO, ego, 123 EGO_LS_EGO, ego,
123 -1); 124 -1);
124 if ( (NULL != default_ego) && 125 cb = GTK_COMBO_BOX (GCG_get_main_window_object
125 (0 == strcmp (name, 126 ("gnunet_conversation_gtk_ego_combobox"));
126 default_ego)) ) 127 if ( (! gtk_combo_box_get_active_iter (cb,
128 &iter2)) &&
129 ( (NULL == default_ego) ||
130 (0 == strcmp (name,
131 default_ego))) )
127 { 132 {
128 /* found the ego that we were supposed to use by default, select 133 /* found the ego that we were supposed to use by default, select
129 it! */ 134 it! */
130 GNUNET_free (default_ego); 135 gtk_combo_box_set_active_iter (cb,
131 default_ego = NULL; 136 &iter);
132 cb = GTK_COMBO_BOX (GCG_get_main_window_object
133 ("gnunet_conversation_gtk_ego_combobox"));
134 gtk_combo_box_set_active_iter (cb, &iter);
135 } 137 }
136 path = gtk_tree_model_get_path (GTK_TREE_MODEL (ego_liststore), 138 path = gtk_tree_model_get_path (GTK_TREE_MODEL (ego_liststore),
137 &iter); 139 &iter);
@@ -213,7 +215,8 @@ gnunet_conversation_gtk_ego_copy_button_clicked_cb (GtkButton *button,
213void 215void
214GCG_EGOS_init (const char *ego_name) 216GCG_EGOS_init (const char *ego_name)
215{ 217{
216 default_ego = GNUNET_strdup (ego_name); 218 if (NULL != ego_name)
219 default_ego = GNUNET_strdup (ego_name);
217 ego_liststore 220 ego_liststore
218 = GTK_LIST_STORE (GCG_get_main_window_object 221 = GTK_LIST_STORE (GCG_get_main_window_object
219 ("gnunet_conversation_gtk_ego_liststore")); 222 ("gnunet_conversation_gtk_ego_liststore"));