From: Olaf Wintermann Date: Thu, 6 Jan 2022 09:30:31 +0000 (+0100) Subject: hide dir-up and detail button in the file dialog X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=28ba1b3faaca0326fb69ae61a2f3ee475a0ddd22;p=uwplayer.git hide dir-up and detail button in the file dialog --- diff --git a/application/window.c b/application/window.c index 6ee3bf8..88a0db8 100644 --- a/application/window.c +++ b/application/window.c @@ -301,9 +301,18 @@ static void filedialog_select( static void FileOpenCB(Widget w, void *udata, void *cdata) { MainWindow *win = main_window; - Widget dialog = XnCreateFileSelectionDialog(win->window, "dialog", NULL, 0); + + Arg args[16]; + int n = 0; + + XtSetArg(args[n], XnNshowViewMenu, 1); n++; + Widget dialog = XnCreateFileSelectionDialog(win->window, "dialog", args, n); XtAddCallback(dialog, XmNokCallback, (XtCallbackProc)filedialog_select, win); XtAddCallback(dialog, XmNcancelCallback, (XtCallbackProc)filedialog_end, win); + + Widget dirUp = XnFileSelectionBoxGetChild(dialog, XnFSB_DIR_UP_BUTTON); + XtUnmanageChild(dirUp); + XtManageChild(dialog); }