diff options
Diffstat (limited to 'src/ui/contact_info.c')
-rw-r--r-- | src/ui/contact_info.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ui/contact_info.c b/src/ui/contact_info.c index 05f12a6..f6c2e91 100644 --- a/src/ui/contact_info.c +++ b/src/ui/contact_info.c | |||
@@ -25,7 +25,9 @@ | |||
25 | #include "contact_info.h" | 25 | #include "contact_info.h" |
26 | 26 | ||
27 | #include "chat_entry.h" | 27 | #include "chat_entry.h" |
28 | |||
28 | #include "../application.h" | 29 | #include "../application.h" |
30 | #include "../ui.h" | ||
29 | 31 | ||
30 | static void | 32 | static void |
31 | handle_contact_edit_button_click(UNUSED GtkButton *button, | 33 | handle_contact_edit_button_click(UNUSED GtkButton *button, |
@@ -137,13 +139,16 @@ handle_open_chat_button_click(UNUSED GtkButton *button, | |||
137 | 139 | ||
138 | UI_CHAT_ENTRY_Handle *entry = GNUNET_CHAT_context_get_user_pointer(context); | 140 | UI_CHAT_ENTRY_Handle *entry = GNUNET_CHAT_context_get_user_pointer(context); |
139 | 141 | ||
140 | if (!entry) | 142 | if ((!entry) || (!(entry->entry_box))) |
141 | return; | 143 | return; |
142 | 144 | ||
143 | GtkListBoxRow *row = GTK_LIST_BOX_ROW( | 145 | GtkListBoxRow *row = GTK_LIST_BOX_ROW( |
144 | gtk_widget_get_parent(entry->entry_box) | 146 | gtk_widget_get_parent(entry->entry_box) |
145 | ); | 147 | ); |
146 | 148 | ||
149 | if (!row) | ||
150 | return; | ||
151 | |||
147 | gtk_list_box_select_row(handle->app->ui.messenger.chats_listbox, row); | 152 | gtk_list_box_select_row(handle->app->ui.messenger.chats_listbox, row); |
148 | gtk_list_box_invalidate_filter(handle->app->ui.messenger.chats_listbox); | 153 | gtk_list_box_invalidate_filter(handle->app->ui.messenger.chats_listbox); |
149 | 154 | ||
@@ -415,8 +420,8 @@ ui_contact_info_dialog_update(UI_CONTACT_INFO_Handle *handle, | |||
415 | { | 420 | { |
416 | const char *name = GNUNET_CHAT_contact_get_name(contact); | 421 | const char *name = GNUNET_CHAT_contact_get_name(contact); |
417 | 422 | ||
418 | hdy_avatar_set_text(handle->contact_avatar, name? name : ""); | 423 | ui_avatar_set_text(handle->contact_avatar, name); |
419 | gtk_entry_set_text(handle->contact_name_entry, name? name : ""); | 424 | ui_entry_set_text(handle->contact_name_entry, name); |
420 | 425 | ||
421 | g_object_set_qdata( | 426 | g_object_set_qdata( |
422 | G_OBJECT(handle->contact_name_entry), | 427 | G_OBJECT(handle->contact_name_entry), |
@@ -440,12 +445,12 @@ ui_contact_info_dialog_update(UI_CONTACT_INFO_Handle *handle, | |||
440 | else | 445 | else |
441 | handle->qr = NULL; | 446 | handle->qr = NULL; |
442 | 447 | ||
443 | gtk_label_set_text(handle->name_label, name? name : ""); | 448 | ui_label_set_text(handle->name_label, name); |
444 | 449 | ||
445 | if (handle->id_drawing_area) | 450 | if (handle->id_drawing_area) |
446 | gtk_widget_queue_draw(GTK_WIDGET(handle->id_drawing_area)); | 451 | gtk_widget_queue_draw(GTK_WIDGET(handle->id_drawing_area)); |
447 | 452 | ||
448 | gtk_entry_set_text(handle->id_entry, key? key : ""); | 453 | ui_entry_set_text(handle->id_entry, key); |
449 | 454 | ||
450 | gtk_widget_set_sensitive( | 455 | gtk_widget_set_sensitive( |
451 | GTK_WIDGET(handle->reveal_identity_button), | 456 | GTK_WIDGET(handle->reveal_identity_button), |