diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-15 09:34:11 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-15 09:34:11 +0000 |
commit | a97aa6df2f4aace6b03da9a9025bc1fd7a82e293 (patch) | |
tree | 2d174528918d87de3bd9673068e5de06d68086e7 | |
parent | 678ecc83cfb72db18235aba5105ffd89648d1c31 (diff) | |
download | gnunet-gtk-a97aa6df2f4aace6b03da9a9025bc1fd7a82e293.tar.gz gnunet-gtk-a97aa6df2f4aace6b03da9a9025bc1fd7a82e293.zip |
- fixes
-rw-r--r-- | contrib/gnunet_gns_gtk_main_window.glade | 52 | ||||
-rw-r--r-- | src/gns/gnunet-gns-gtk.c | 2 | ||||
-rw-r--r-- | src/gns/gnunet-gns-gtk_zone.c | 57 |
3 files changed, 38 insertions, 73 deletions
diff --git a/contrib/gnunet_gns_gtk_main_window.glade b/contrib/gnunet_gns_gtk_main_window.glade index 4fe6e015..7c729f9d 100644 --- a/contrib/gnunet_gns_gtk_main_window.glade +++ b/contrib/gnunet_gns_gtk_main_window.glade | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <interface> | 2 | <interface> |
3 | <requires lib="gtk+" version="2.16"/> | 3 | <requires lib="gtk+" version="2.20"/> |
4 | <!-- interface-naming-policy project-wide --> | 4 | <!-- interface-naming-policy project-wide --> |
5 | <object class="GtkWindow" id="GNUNET_GNS_GTK_main_window"> | 5 | <object class="GtkWindow" id="GNUNET_GNS_GTK_main_window"> |
6 | <property name="can_focus">False</property> | 6 | <property name="can_focus">False</property> |
@@ -231,7 +231,6 @@ | |||
231 | <property name="reorderable">True</property> | 231 | <property name="reorderable">True</property> |
232 | <property name="sort_indicator">True</property> | 232 | <property name="sort_indicator">True</property> |
233 | <property name="sort_column_id">0</property> | 233 | <property name="sort_column_id">0</property> |
234 | <signal name="clicked" handler="GNUNET_GNS_GTK_main_treeview_click_cb" swapped="no"/> | ||
235 | <child> | 234 | <child> |
236 | <object class="GtkCellRendererText" id="GNUNET_GNS_GTK_name_cellrenderertext"> | 235 | <object class="GtkCellRendererText" id="GNUNET_GNS_GTK_name_cellrenderertext"> |
237 | <property name="editable">True</property> | 236 | <property name="editable">True</property> |
@@ -271,11 +270,10 @@ | |||
271 | <child> | 270 | <child> |
272 | <object class="GtkCellRendererCombo" id="GNUNET_GNS_GTK_type_cellrenderercombo"> | 271 | <object class="GtkCellRendererCombo" id="GNUNET_GNS_GTK_type_cellrenderercombo"> |
273 | <property name="editable">True</property> | 272 | <property name="editable">True</property> |
273 | <property name="model">GNUNET_GNS_GTK_type_liststore</property> | ||
274 | <property name="text_column">1</property> | ||
274 | <signal name="changed" handler="GNUNET_GNS_GTK_type_cellrenderercombo_changed_cb" swapped="no"/> | 275 | <signal name="changed" handler="GNUNET_GNS_GTK_type_cellrenderercombo_changed_cb" swapped="no"/> |
275 | </object> | 276 | </object> |
276 | <attributes> | ||
277 | <attribute name="text-column">3</attribute> | ||
278 | </attributes> | ||
279 | </child> | 277 | </child> |
280 | </object> | 278 | </object> |
281 | </child> | 279 | </child> |
@@ -325,28 +323,6 @@ | |||
325 | </object> | 323 | </object> |
326 | </child> | 324 | </child> |
327 | </object> | 325 | </object> |
328 | <object class="GtkTreeStore" id="GNUNET_GNS_GTK_treestore"> | ||
329 | <columns> | ||
330 | <!-- column-name name --> | ||
331 | <column type="gchararray"/> | ||
332 | <!-- column-name is_public --> | ||
333 | <column type="gboolean"/> | ||
334 | <!-- column-name record_type --> | ||
335 | <column type="guint"/> | ||
336 | <!-- column-name record_type_as_string --> | ||
337 | <column type="gchararray"/> | ||
338 | <!-- column-name expiration_time --> | ||
339 | <column type="guint64"/> | ||
340 | <!-- column-name expiration_time_is_relative --> | ||
341 | <column type="gboolean"/> | ||
342 | <!-- column-name expiration_time_as_string --> | ||
343 | <column type="gchararray"/> | ||
344 | <!-- column-name value_as_string --> | ||
345 | <column type="gchararray"/> | ||
346 | <!-- column-name value_color --> | ||
347 | <column type="gchararray"/> | ||
348 | </columns> | ||
349 | </object> | ||
350 | <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore"> | 326 | <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore"> |
351 | <columns> | 327 | <columns> |
352 | <!-- column-name type --> | 328 | <!-- column-name type --> |
@@ -397,4 +373,26 @@ | |||
397 | </row> | 373 | </row> |
398 | </data> | 374 | </data> |
399 | </object> | 375 | </object> |
376 | <object class="GtkTreeStore" id="GNUNET_GNS_GTK_treestore"> | ||
377 | <columns> | ||
378 | <!-- column-name name --> | ||
379 | <column type="gchararray"/> | ||
380 | <!-- column-name is_public --> | ||
381 | <column type="gboolean"/> | ||
382 | <!-- column-name record_type --> | ||
383 | <column type="guint"/> | ||
384 | <!-- column-name record_type_as_string --> | ||
385 | <column type="gchararray"/> | ||
386 | <!-- column-name expiration_time --> | ||
387 | <column type="guint64"/> | ||
388 | <!-- column-name expiration_time_is_relative --> | ||
389 | <column type="gboolean"/> | ||
390 | <!-- column-name expiration_time_as_string --> | ||
391 | <column type="gchararray"/> | ||
392 | <!-- column-name value_as_string --> | ||
393 | <column type="gchararray"/> | ||
394 | <!-- column-name value_color --> | ||
395 | <column type="gchararray"/> | ||
396 | </columns> | ||
397 | </object> | ||
400 | </interface> | 398 | </interface> |
diff --git a/src/gns/gnunet-gns-gtk.c b/src/gns/gnunet-gns-gtk.c index ed3ff064..143c6406 100644 --- a/src/gns/gnunet-gns-gtk.c +++ b/src/gns/gnunet-gns-gtk.c | |||
@@ -408,6 +408,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
408 | "gnunet-gtk" /* FIXME: different icon? */ , | 408 | "gnunet-gtk" /* FIXME: different icon? */ , |
409 | "gnunet-gns-gtk"); | 409 | "gnunet-gns-gtk"); |
410 | 410 | ||
411 | /* | ||
411 | struct ZoneIteration_Context * zc_ctx = GNUNET_malloc (sizeof (struct ZoneIteration_Context)); | 412 | struct ZoneIteration_Context * zc_ctx = GNUNET_malloc (sizeof (struct ZoneIteration_Context)); |
412 | zc_ctx->zone = zone; | 413 | zc_ctx->zone = zone; |
413 | GNUNET_NAMESTORE_zone_iteration_start(gns->ns, &zone, | 414 | GNUNET_NAMESTORE_zone_iteration_start(gns->ns, &zone, |
@@ -415,6 +416,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
415 | GNUNET_NAMESTORE_RF_NONE, | 416 | GNUNET_NAMESTORE_RF_NONE, |
416 | &zone_iteration_proc, | 417 | &zone_iteration_proc, |
417 | zc_ctx); | 418 | zc_ctx); |
419 | */ | ||
418 | 420 | ||
419 | /* make GUI visible */ | 421 | /* make GUI visible */ |
420 | if (!tray_only) | 422 | if (!tray_only) |
diff --git a/src/gns/gnunet-gns-gtk_zone.c b/src/gns/gnunet-gns-gtk_zone.c index b7f7c22c..5739c888 100644 --- a/src/gns/gnunet-gns-gtk_zone.c +++ b/src/gns/gnunet-gns-gtk_zone.c | |||
@@ -140,43 +140,6 @@ GNUNET_GNS_GTK_main_treeview_popup_menu_cb (GtkWidget *widget, | |||
140 | return FALSE; | 140 | return FALSE; |
141 | } | 141 | } |
142 | 142 | ||
143 | enum | ||
144 | { | ||
145 | COL_FIRST_NAME = 0, | ||
146 | COL_LAST_NAME, | ||
147 | COL_YEAR_BORN, | ||
148 | NUM_COLS | ||
149 | } ; | ||
150 | |||
151 | static void | ||
152 | test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
153 | { | ||
154 | struct GNUNET_GNS_Context *gns=cls; | ||
155 | GtkBuilder *builder = gns->builder; | ||
156 | GtkTreeStore *ts; | ||
157 | GtkTreeIter toplevel, child; | ||
158 | |||
159 | ts = GTK_TREE_STORE (gtk_builder_get_object (builder, "GNUNET_GNS_GTK_treestore")); | ||
160 | GNUNET_assert (ts != NULL); | ||
161 | |||
162 | GNUNET_break (0); | ||
163 | /* Append a top level row and leave it empty */ | ||
164 | gtk_tree_store_append(ts, &toplevel, NULL); | ||
165 | /* | ||
166 | gtk_tree_store_set(ts, &toplevel, | ||
167 | COL_FIRST_NAME, "Maria", | ||
168 | COL_LAST_NAME, "Incognito", | ||
169 | -1);*/ | ||
170 | } | ||
171 | |||
172 | void | ||
173 | GNUNET_GNS_GTK_main_treeview_click_cb (GtkTreeViewColumn *treeviewcolumn, | ||
174 | gpointer user_data) | ||
175 | { | ||
176 | |||
177 | GNUNET_SCHEDULER_add_now (&test, user_data); | ||
178 | } | ||
179 | |||
180 | /** | 143 | /** |
181 | * The zone treeview was realized. Setup the model. | 144 | * The zone treeview was realized. Setup the model. |
182 | * | 145 | * |
@@ -187,20 +150,22 @@ void | |||
187 | GNUNET_GNS_GTK_main_treeview_realize_cb (GtkWidget *widget, | 150 | GNUNET_GNS_GTK_main_treeview_realize_cb (GtkWidget *widget, |
188 | gpointer user_data) | 151 | gpointer user_data) |
189 | { | 152 | { |
190 | /* | 153 | struct GNUNET_GNS_Context *gns = user_data; |
191 | struct GNUNET_GNS_Context *gns=user_data; | ||
192 | GtkBuilder *builder = gns->builder; | 154 | GtkBuilder *builder = gns->builder; |
193 | GNUNET_assert (GTK_IS_BUILDER(user_data)); | 155 | GtkTreeStore *ts; |
194 | 156 | GtkTreeIter toplevel; | |
195 | GtkTreeModel * tm; | ||
196 | tm = GTK_TREE_MODEL(gtk_builder_get_object (builder, "GNUNET_GNS_GTK_treestore")); | ||
197 | GNUNET_assert (tm != NULL); | ||
198 | 157 | ||
199 | //gtk_tree | 158 | GNUNET_assert (GTK_IS_BUILDER(builder)); |
200 | */ | ||
201 | GNUNET_break (0); | 159 | GNUNET_break (0); |
202 | 160 | ||
161 | ts = GTK_TREE_STORE (gtk_builder_get_object (builder, "GNUNET_GNS_GTK_treestore")); | ||
162 | GNUNET_assert (GTK_IS_TREE_STORE(ts)); | ||
163 | GNUNET_assert (ts != NULL); | ||
164 | |||
165 | /* Append a top level row and leave it empty */ | ||
166 | gtk_tree_store_append(ts, &toplevel, NULL); | ||
203 | 167 | ||
168 | GNUNET_break (0); | ||
204 | } | 169 | } |
205 | 170 | ||
206 | 171 | ||