]> uap-core.de Git - uwplayer.git/commitdiff
hide dir-up and detail button in the file dialog
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 6 Jan 2022 09:30:31 +0000 (10:30 +0100)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 6 Jan 2022 09:30:31 +0000 (10:30 +0100)
application/window.c

index 6ee3bf860269a6791b42c349a8c489aac3872a6f..88a0db8391e33bb2972dc9d30886315a1a256d0d 100644 (file)
@@ -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);
 }