Wed, 27 Nov 2024 18:53:11 +0100
implement action_transfer_selected
application/application.c | file | annotate | diff | comparison | revisions | |
ui/gtk/toolkit.c | file | annotate | diff | comparison | revisions |
--- 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); + } }
--- 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) {