diff options
Diffstat (limited to 'src/identity/gnunet-identity-gtk.c')
-rw-r--r-- | src/identity/gnunet-identity-gtk.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/identity/gnunet-identity-gtk.c b/src/identity/gnunet-identity-gtk.c index 69db7e65..9128d44e 100644 --- a/src/identity/gnunet-identity-gtk.c +++ b/src/identity/gnunet-identity-gtk.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | #include "gnunet_gtk.h" | 26 | #include "gnunet_gtk.h" |
27 | #include <gnunet/gnunet_identity_service.h> | 27 | #include <gnunet/gnunet_identity_service.h> |
28 | #include "gnunet-identity-gtk_namespace_manager.h" | ||
28 | 29 | ||
29 | 30 | ||
30 | /** | 31 | /** |
@@ -159,11 +160,6 @@ struct AdvertisePopupContext | |||
159 | * Ego to advertise. | 160 | * Ego to advertise. |
160 | */ | 161 | */ |
161 | struct GNUNET_IDENTITY_Ego *ego; | 162 | struct GNUNET_IDENTITY_Ego *ego; |
162 | |||
163 | /** | ||
164 | * Row where the search list popup was created. | ||
165 | */ | ||
166 | GtkTreeRowReference *rr; | ||
167 | 163 | ||
168 | }; | 164 | }; |
169 | 165 | ||
@@ -176,11 +172,13 @@ struct AdvertisePopupContext | |||
176 | */ | 172 | */ |
177 | static void | 173 | static void |
178 | advertise_ctx_menu (GtkMenuItem *item, | 174 | advertise_ctx_menu (GtkMenuItem *item, |
179 | gpointer user_data) | 175 | gpointer user_data) |
180 | { | 176 | { |
181 | struct AdvertisePopupContext *apc = user_data; | 177 | struct AdvertisePopupContext *apc = user_data; |
178 | const struct GNUNET_CRYPTO_EccPrivateKey *priv; | ||
182 | 179 | ||
183 | fprintf (stderr, "ADVERTISE TIME!\n"); | 180 | priv = GNUNET_IDENTITY_ego_get_private_key (apc->ego); |
181 | GNUNET_IDENTITY_advertise_dialog_start_ (priv); | ||
184 | } | 182 | } |
185 | 183 | ||
186 | 184 | ||
@@ -197,7 +195,6 @@ advertise_popup_selection_done (GtkMenuShell *menushell, | |||
197 | struct AdvertisePopupContext *apc = user_data; | 195 | struct AdvertisePopupContext *apc = user_data; |
198 | 196 | ||
199 | gtk_widget_destroy (GTK_WIDGET (menushell)); | 197 | gtk_widget_destroy (GTK_WIDGET (menushell)); |
200 | gtk_tree_row_reference_free (apc->rr); | ||
201 | GNUNET_free (apc); | 198 | GNUNET_free (apc); |
202 | } | 199 | } |
203 | 200 | ||
@@ -240,6 +237,7 @@ GNUNET_GTK_identity_treeview_button_press_event_cb (GtkWidget *widget, | |||
240 | gtk_tree_path_free (path); | 237 | gtk_tree_path_free (path); |
241 | return FALSE; /* not sure how we got a path but no iter... */ | 238 | return FALSE; /* not sure how we got a path but no iter... */ |
242 | } | 239 | } |
240 | gtk_tree_path_free (path); | ||
243 | gtk_tree_model_get (GTK_TREE_MODEL (ls), &iter, | 241 | gtk_tree_model_get (GTK_TREE_MODEL (ls), &iter, |
244 | IDENTITY_MC_EGO, &ego, | 242 | IDENTITY_MC_EGO, &ego, |
245 | -1); | 243 | -1); |
@@ -247,8 +245,6 @@ GNUNET_GTK_identity_treeview_button_press_event_cb (GtkWidget *widget, | |||
247 | return FALSE; | 245 | return FALSE; |
248 | apc = GNUNET_new (struct AdvertisePopupContext); | 246 | apc = GNUNET_new (struct AdvertisePopupContext); |
249 | apc->ego = ego; | 247 | apc->ego = ego; |
250 | apc->rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (ls), path); | ||
251 | gtk_tree_path_free (path); | ||
252 | menu = GTK_MENU (gtk_menu_new ()); | 248 | menu = GTK_MENU (gtk_menu_new ()); |
253 | child = gtk_menu_item_new_with_label (_("_Advertise")); | 249 | child = gtk_menu_item_new_with_label (_("_Advertise")); |
254 | g_signal_connect (child, "activate", | 250 | g_signal_connect (child, "activate", |