启用 GtkFileChooserDialog 选择文件或文件夹
使用 GTK+ 的 GtkFileChooserDialog,如何允许用户选择文件或文件夹(两者都在这里有效)。 可用操作是互斥的。
Using GTK+'s GtkFileChooserDialog, how can I allow the user to select a file or a folder (both are valid here). The actions available are mutually exclusive.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是我认为这是不可能的。
我在 Transmission 的“创建 torrent”对话框中对此进行了一些尝试,最后使用radibox 来启用两个选择器对话框按钮之一,一个处于文件模式,另一个处于文件夹模式。
Unfortunately I don't think this is possible.
I played around with this a bit in the "create a torrent" dialog in Transmission, and wound up using a radibox to enable one of two chooserdialogbuttons, one in file mode and the other in folder mode.
您可以添加另一个按钮。这是一个小示例文件选择器窗口,其中有一个用于打开文件或文件夹的“打开”按钮和用于选择文件的“选择”按钮。
You could add another button. Here is a small example file-chooser window that has a button for "open" which opens files or folders and "select" button for selecting files.