Comments (6)
Thank you.
Hopefully it gets implemented at some point, I have my fingers crossed.
from xournalpp.
I don't think we can change that behaviour with the GtkFileChooser. So I'm closing the issue.
from xournalpp.
Im currius, why are you using the gdk filepicker, is it not possible to use system defaut (i have seen something about "xdg-desktop-portal", might not be correct).
Im not shure if it is hard to use the sytem default, i know it is somewath simple on windows, but not shure about linux.
from xournalpp.
Hmm, maybe I closed the issue prematurely. We could use the Gtk.FileChooserNative instead. It does offer less features and we may need some of those (not sure). One would have to check if that one supports single click when it's the system's default.
The plugin API (via app.getFilePath
or app.saveAs
) uses the native dialog. You could check there if single click is supported.
from xournalpp.
So i have tested a python script that uses Gtk.FileChooserNative and it works single click (it just runs the default filechooser as expected, so works perfectly).
Here is the code i used for testing (It probably wont be much use, but it can't hurt):
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class FileChooserExample(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="FileChooser Example")
self.set_border_width(10)
button = Gtk.Button(label="Select a file")
button.connect("clicked", self.on_file_clicked)
self.add(button)
def on_file_clicked(self, widget):
dialog = Gtk.FileChooserNative(title="Select a file",
action=Gtk.FileChooserAction.OPEN)
dialog.set_transient_for(self)
response = dialog.run()
if response == Gtk.ResponseType.ACCEPT:
print("File selected: " + dialog.get_filename())
elif response == Gtk.ResponseType.CANCEL:
print("Canceled file selecttion")
dialog.destroy()
win = FileChooserExample()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
So when i run the app like this
python ./Test.py
it reports
File selected: /home/marvin/Downloads/pras-first-h.png
Expected behavior overall.
I'm not sure what of GtkFileChooser you are using, but if the app is just grabbing the path then this should work.
It would be great if it was implemented.
For saving and loading of course, that would make the file selection so much easyer.
from xournalpp.
Hmm, maybe I closed the issue prematurely. We could use the Gtk.FileChooserNative instead. It does offer less features and we may need some of those (not sure). One would have to check if that one supports single click when it's the system's default. The plugin API (via
app.getFilePath
orapp.saveAs
) uses the native dialog. You could check there if single click is supported.
Please consider reopening the issue,
as a alternative title it could also say "Request to change GtkFileChooser to GtkFileChooserNative".
If you still don't think this should be something that is part of the project, than say so and i put a pin on it.
If you don't answer in like a weak, i will just open a new issue, to get this reconsidered.
Thanks for all comments and input.
from xournalpp.
Related Issues (20)
- Development and release strategy HOT 7
- Request for a comment feature Like Adobe Reader HOT 1
- Copy Selection with select button not working anymore
- Request for the option to disable opening on last viewed page
- Some weird crash HOT 2
- Stylus second button not working HOT 1
- Missing user interface file HOT 2
- "Toolbar Color Tool Customization" is not working HOT 1
- VSCode-like Hot Exit HOT 1
- Titlebar is still white after setting the dark theme on MacOS HOT 6
- Unable to Annotate PDFs from UNC Paths HOT 2
- Stroke Recognizer makes straight lines different than expected HOT 4
- Keyboard shortcuts not working on Windows HOT 6
- Change wrong path conversions from string to u8string HOT 1
- If opened in split screen , then if its toggled to full screen the app gets stuck and crashes. Scrolling through pages is choppy HOT 13
- Error screen occur when open
- Crashing while saving on USB drive HOT 1
- Not working properly in ubuntu 24.04 lts HOT 4
- Cannot open settings on macOS HOT 9
- Old copy paste bug HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xournalpp.