diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-06-26 08:53:44 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-06-26 08:53:44 +0200 |
commit | 9b4138411fb4ff121b2fdca2b7c2e004a884fe82 (patch) | |
tree | caab4ed1da51f332a6023a1b463013c2e0070a46 | |
parent | aa282263ac88247165e75371994730de10731703 (diff) | |
download | gnunet-gtk-9b4138411fb4ff121b2fdca2b7c2e004a884fe82.tar.gz gnunet-gtk-9b4138411fb4ff121b2fdca2b7c2e004a884fe82.zip |
get rid of jitter in rendering, as well as incomprehensible column
-rw-r--r-- | contrib/gnunet_peerinfo_gtk_main_window.glade | 24 | ||||
-rw-r--r-- | src/peerinfo/gnunet-peerinfo-gtk.c | 11 |
2 files changed, 7 insertions, 28 deletions
diff --git a/contrib/gnunet_peerinfo_gtk_main_window.glade b/contrib/gnunet_peerinfo_gtk_main_window.glade index c9bd805b..017f665e 100644 --- a/contrib/gnunet_peerinfo_gtk_main_window.glade +++ b/contrib/gnunet_peerinfo_gtk_main_window.glade | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- Generated with glade 3.18.3 | 2 | <!-- Generated with glade 3.22.1 |
3 | 3 | ||
4 | Copyright (C) | 4 | Copyright (C) |
5 | 5 | ||
@@ -134,6 +134,9 @@ along with gnunet-peerinfo-gtk. If not, see <http://www.gnu.org/licenses/>. | |||
134 | <property name="icon_name">gnunet-gtk</property> | 134 | <property name="icon_name">gnunet-gtk</property> |
135 | <signal name="delete-event" handler="GNUNET_PEERINFO_GTK_quit_cb" after="yes" swapped="no"/> | 135 | <signal name="delete-event" handler="GNUNET_PEERINFO_GTK_quit_cb" after="yes" swapped="no"/> |
136 | <child> | 136 | <child> |
137 | <placeholder/> | ||
138 | </child> | ||
139 | <child> | ||
137 | <object class="GtkBox" id="GNUNET_PEERINFO_GTK_main_window_vbox"> | 140 | <object class="GtkBox" id="GNUNET_PEERINFO_GTK_main_window_vbox"> |
138 | <property name="visible">True</property> | 141 | <property name="visible">True</property> |
139 | <property name="can_focus">False</property> | 142 | <property name="can_focus">False</property> |
@@ -248,11 +251,11 @@ along with gnunet-peerinfo-gtk. If not, see <http://www.gnu.org/licenses/>. | |||
248 | </child> | 251 | </child> |
249 | <child> | 252 | <child> |
250 | <object class="GtkTreeViewColumn" id="GNUNET_PEERINFO_GTK_main_window_validation_status_treeviewcolumn"> | 253 | <object class="GtkTreeViewColumn" id="GNUNET_PEERINFO_GTK_main_window_validation_status_treeviewcolumn"> |
254 | <property name="visible">False</property> | ||
251 | <property name="widget">validated_image</property> | 255 | <property name="widget">validated_image</property> |
252 | <property name="reorderable">True</property> | 256 | <property name="reorderable">True</property> |
253 | <property name="sort_indicator">True</property> | 257 | <property name="sort_indicator">True</property> |
254 | <property name="sort_column_id">19</property> | 258 | <property name="sort_column_id">19</property> |
255 | <property name="visible">false</property> | ||
256 | <child> | 259 | <child> |
257 | <object class="GtkCellRendererPixbuf" id="GNUNET_PEERINFO_GTK_main_window_valdiation_led_cellrendererpixbuf"/> | 260 | <object class="GtkCellRendererPixbuf" id="GNUNET_PEERINFO_GTK_main_window_valdiation_led_cellrendererpixbuf"/> |
258 | <attributes> | 261 | <attributes> |
@@ -378,23 +381,6 @@ along with gnunet-peerinfo-gtk. If not, see <http://www.gnu.org/licenses/>. | |||
378 | </child> | 381 | </child> |
379 | </object> | 382 | </object> |
380 | </child> | 383 | </child> |
381 | <child> | ||
382 | <object class="GtkTreeViewColumn" id="GNUNET_PEERINFO_GTK_main_window_neighbour_state_treeviewcolumn"> | ||
383 | <property name="sizing">autosize</property> | ||
384 | <property name="title" translatable="yes">State</property> | ||
385 | <property name="reorderable">True</property> | ||
386 | <property name="sort_indicator">True</property> | ||
387 | <property name="sort_column_id">16</property> | ||
388 | <child> | ||
389 | <object class="GtkCellRendererText" id="GNUNET_PEERINFO_GTK_main_window_neighbour_state_cellrenderertext"> | ||
390 | <property name="width_chars">30</property> | ||
391 | </object> | ||
392 | <attributes> | ||
393 | <attribute name="text">16</attribute> | ||
394 | </attributes> | ||
395 | </child> | ||
396 | </object> | ||
397 | </child> | ||
398 | </object> | 384 | </object> |
399 | </child> | 385 | </child> |
400 | </object> | 386 | </object> |
diff --git a/src/peerinfo/gnunet-peerinfo-gtk.c b/src/peerinfo/gnunet-peerinfo-gtk.c index a5ae486a..c647eedf 100644 --- a/src/peerinfo/gnunet-peerinfo-gtk.c +++ b/src/peerinfo/gnunet-peerinfo-gtk.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <unique/unique.h> | 35 | #include <unique/unique.h> |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #define UPDATE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) | ||
38 | 39 | ||
39 | /** | 40 | /** |
40 | * Should we show peers that have no connections and | 41 | * Should we show peers that have no connections and |
@@ -394,11 +395,6 @@ static GtkTreeViewColumn *tvc_ats_connectivity; | |||
394 | static GtkTreeViewColumn *tvc_plugin_connectivity; | 395 | static GtkTreeViewColumn *tvc_plugin_connectivity; |
395 | 396 | ||
396 | /** | 397 | /** |
397 | * Tree view column for neighbour_state | ||
398 | */ | ||
399 | static GtkTreeViewColumn *tvc_neighbour_state; | ||
400 | |||
401 | /** | ||
402 | * The main tree view. | 398 | * The main tree view. |
403 | */ | 399 | */ |
404 | static GtkTreeView *tv; | 400 | static GtkTreeView *tv; |
@@ -423,7 +419,7 @@ static void | |||
423 | do_update (void *cls) | 419 | do_update (void *cls) |
424 | { | 420 | { |
425 | (void) cls; | 421 | (void) cls; |
426 | update_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 422 | update_task = GNUNET_SCHEDULER_add_delayed (UPDATE_FREQUENCY, |
427 | &do_update, | 423 | &do_update, |
428 | NULL); | 424 | NULL); |
429 | gtk_widget_thaw_child_notify (GTK_WIDGET (tv)); | 425 | gtk_widget_thaw_child_notify (GTK_WIDGET (tv)); |
@@ -1457,8 +1453,6 @@ query_tooltip_cb (GtkWidget *widget, | |||
1457 | model_column = PEERINFO_MC_PEERINFO_ADDRESS_EXPIRATION; | 1453 | model_column = PEERINFO_MC_PEERINFO_ADDRESS_EXPIRATION; |
1458 | else if (tvc_transport_connectivity == column) | 1454 | else if (tvc_transport_connectivity == column) |
1459 | model_column = PEERINFO_MC_NEIGHBOUR_CONNECTIVITY_TIMEOUT_AS_STRING; | 1455 | model_column = PEERINFO_MC_NEIGHBOUR_CONNECTIVITY_TIMEOUT_AS_STRING; |
1460 | else if (tvc_neighbour_state == column) | ||
1461 | model_column = PEERINFO_MC_NEIGHBOUR_STATE_TIMEOUT_AS_STRING; | ||
1462 | if (-1 == model_column) | 1456 | if (-1 == model_column) |
1463 | return FALSE; | 1457 | return FALSE; |
1464 | 1458 | ||
@@ -1554,7 +1548,6 @@ run (void *cts) | |||
1554 | tvc_ats_connectivity = GTK_TREE_VIEW_COLUMN (get_object ("GNUNET_PEERINFO_GTK_main_window_ats_connectivity_treeviewcolumn")); | 1548 | tvc_ats_connectivity = GTK_TREE_VIEW_COLUMN (get_object ("GNUNET_PEERINFO_GTK_main_window_ats_connectivity_treeviewcolumn")); |
1555 | tvc_plugin_connectivity = GTK_TREE_VIEW_COLUMN (get_object ("GNUNET_PEERINFO_GTK_main_window_plugin_connectivity_treeviewcolumn")); | 1549 | tvc_plugin_connectivity = GTK_TREE_VIEW_COLUMN (get_object ("GNUNET_PEERINFO_GTK_main_window_plugin_connectivity_treeviewcolumn")); |
1556 | tvc_transport_connectivity = GTK_TREE_VIEW_COLUMN (get_object ("GNUNET_PEERINFO_GTK_main_window_transport_connectivity_treeviewcolumn")); | 1550 | tvc_transport_connectivity = GTK_TREE_VIEW_COLUMN (get_object ("GNUNET_PEERINFO_GTK_main_window_transport_connectivity_treeviewcolumn")); |
1557 | tvc_neighbour_state = GTK_TREE_VIEW_COLUMN (get_object ("GNUNET_PEERINFO_GTK_main_window_neighbour_state_treeviewcolumn")); | ||
1558 | /* setup main window */ | 1551 | /* setup main window */ |
1559 | main_window = GTK_WIDGET (get_object ("GNUNET_PEERINFO_GTK_main_window")); | 1552 | main_window = GTK_WIDGET (get_object ("GNUNET_PEERINFO_GTK_main_window")); |
1560 | main_window = GNUNET_GTK_plug_me ("GNUNET_PEERINFO_GTK_PLUG", | 1553 | main_window = GNUNET_GTK_plug_me ("GNUNET_PEERINFO_GTK_PLUG", |