# HG changeset patch # User Olaf Wintermann # Date 1732729991 -3600 # Node ID 493959648de6c05d5abb2d08a24448c39b821003 # Parent e92c72705da4a4275051a75291e8830d98edf372 implement action_transfer_selected diff -r e92c72705da4 -r 493959648de6 application/application.c --- a/application/application.c Wed Nov 27 18:45:08 2024 +0100 +++ b/application/application.c Wed Nov 27 18:53:11 2024 +0100 @@ -441,5 +441,9 @@ } void action_transfer_selected(UiEvent *event, void *data) { - + DavApp *app = get_application(); + DavTransfer *trans = ui_list_get(app->transfers, event->intval); + if(trans) { + ui_show(trans->window); + } } diff -r e92c72705da4 -r 493959648de6 ui/gtk/toolkit.c --- a/ui/gtk/toolkit.c Wed Nov 27 18:45:08 2024 +0100 +++ b/ui/gtk/toolkit.c Wed Nov 27 18:53:11 2024 +0100 @@ -158,13 +158,18 @@ #endif void ui_show(UiObject *obj) { + gboolean visible = gtk_widget_is_visible(obj->widget); + uic_check_group_widgets(obj->ctx); #if GTK_MAJOR_VERSION >= 4 gtk_window_present(GTK_WINDOW(obj->widget)); #elif GTK_MAJOR_VERSION <= 3 gtk_widget_show_all(obj->widget); #endif - obj->ref++; + + if(!visible) { + obj->ref++; + } } void ui_close(UiObject *obj) {