[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-05-12 Thread Jiří Techet via Github-comments
Alright, I made the suggested changes:
1. I made GtkFileChooserNative configurable, by default enabled on macOS and 
Windows, disabled on Linux.
2. I went through all GtkFileChooser occurrences in Geany and added the native 
variant
3. Not sure if intentional or if it's some left-over but `ui_utils.c` still 
contains native win32 dialogs: 
https://github.com/geany/geany/blob/11b4a00a3020b1c9ace3d3ae65aa5ec7d5ff84e0/src/ui_utils.c#L2012
 I replaced those with GtkFileChooserNative and eliminated the native code in 
win32.c.
4. For now I didn't modify plugins which also contain some GtkFileChooser code 
but I could do the same for them too if desired.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2106377618
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-05-12 Thread Jiří Techet via Github-comments
@techee pushed 1 commit.

2d8d4f2edacbfc82743a4d020d9c22bc6526b92b  Use GTK_RESPONSE_ACCEPT which is also 
used by GtkFileChooserNative

-- 
View it on GitHub:
https://github.com/geany/geany/pull/3861/files/4dff3767b9f80719dab3d1a83443be52cd377fa8..2d8d4f2edacbfc82743a4d020d9c22bc6526b92b
You are receiving this because you are subscribed to this thread.

Message ID: 


[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-05-12 Thread Jiří Techet via Github-comments
@techee pushed 3 commits.

91fb8850281979356cdc38b5ea2b97e1b7132461  Use GtkFileChooserNative depending on 
user configuration
ee8f885acf554c494b00f0f3a80a3c17676838ca  Remove usage of windows-native 
dialogs from ui_utils.c and win32.c/h
4dff3767b9f80719dab3d1a83443be52cd377fa8  Use GtkFileChooserNative in ui_utils.c

-- 
View it on GitHub:
https://github.com/geany/geany/pull/3861/files/2bf55c0d6657fa0a80ffd573316c47308d9ba581..4dff3767b9f80719dab3d1a83443be52cd377fa8
You are receiving this because you are subscribed to this thread.

Message ID: 


[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-05-04 Thread Enrico Tröger via Github-comments
> Maybe one more question - should the open dialog show hidden files by 
> default? [...]
> I'm not sure if it's possible on Windows too though (on the other hand 
> Windows hidden files aren't so important I think because it's not those 
> beginning with `.` like `.gitignore` that typical developer needs to edit).

I don't think it's necessary because as you said, hidden files on Windows are 
usually less relevant and have stronger means than on Linux.
The dialog in the current configuration shows files like `.gitignore` and this 
is good, I think.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2094125442
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-05-02 Thread Colomban Wendling via Github-comments
If there's an option for it, sure (I didn't understand that was something you 
would be happy about).  And I don't mind the default on non-Linux either, 
whatever people like best on those platforms.
It would be nice to have this available on Linux as well (**but off by 
default**) for the sandboxing caps -- although I'm not really sure whether 
"sandboxing" an editor/IDE really makes much sense, but well, it has been 
mentioned quite a few times.

> File filters work both on Windows and macOS

That's nice.  And indeed, the 
[documentation](https://docs.gtk.org/gtk3/class.FileChooserNative.html#win32-details-gtkfilechooserdialognative-win32)
 lead me to think it wouldn't work with out patterns, but [custom 
filters](https://docs.gtk.org/gtk3/method.FileFilter.add_custom.html) are 
actually something else.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2089817883
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-05-01 Thread Jiří Techet via Github-comments
> To me it seems fine to use those dialogs since it seems to work well and if 
> it goes the same for "Save As" and maybe "Open Folder". Making it 
> configurable is a good idea, I don't mind about the default.

Good to hear. I'll try to prepare the patches (after finishing the boring task 
of writing documentation for the lsp plugin, sigh).

Maybe one more question - should the open dialog show hidden files by default? 
This is configurable using the custom widget on GTK but we won't be able to add 
it so we should decide either to show hidden files or not. On macOS hidden 
files can be shown using some keyboard shortcut for the dialog so it wouldn't 
be completely necessary to always show hidden files, I'm not sure if it's 
possible on Windows too though (on the other hand Windows hidden files aren't 
so important I think because it's not those beginning with `.` like 
`.gitignore` that typical developer needs to edit).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2088912070
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-05-01 Thread Enrico Tröger via Github-comments
The native file dialog on Windows 7 works very well after some testing.
Non-ASCII path and file names seem to work well, too.
![Screenshot_2024-05-01_19-35-32](https://github.com/geany/geany/assets/617017/3aaca2a3-9213-4435-89ab-864a9460c383)

I don't know how to set up "automounted remote servers", so can't test it.
But what the native dialog offers is access to network drives, I tested it with 
a file on a network drive added via the RDP client (I think this uses SMB under 
the hood) and this works fine while the GTK dialog does not see those drives.

To me it seems fine to use those dialogs since it seems to work well and if it 
goes the same for "Save As" and maybe "Open Folder". Making it configurable is 
a good idea, I don't mind about the default.
Most of the infrastructure for the setting we already had (see #3219 and #3791) 
which could be revived.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2088829584
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-30 Thread elextr via Github-comments
> Yes, but I think the problem wasn't the dialogs themselves (apart from the 
> fact they were some "old" open dialogs), but rather the fact they were 
> implemented using Windows API that nobody understood well.

And #3209 crash.

But one thing positive they did was that they automounted remote servers IIRC, 
@techee @rdipardo do you have a configuration to check that on windows with the 
new native filechooser?

Like @kugel, I didn't understand that this was WIP (label added) and would be 
selectable by the user in the final PR, not compiled in.  In that case its less 
of a problem that there are functionality and theme differences, the user can 
choose.  It will need to be explained properly in the manual why this happens 
with a section head that I can link to and close the issue when users complain 
:smiling_imp: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2087708918
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-30 Thread Jiří Techet via Github-comments
> I didn't even know it was possible to rename a file using the Open dialog - 
> how does one do that?

OK, I guess you meant the Save as dialog where the Rename button is the added 
widget, which, indeed, won't be present in the native dialogs.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2085446692
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-30 Thread Jiří Techet via Github-comments
> Didn't we have native dialogs a while ago, at least on Windows? So this 
> brings that back, basically?

Yes, but I think the problem wasn't the dialogs themselves (apart from the fact 
they were some "old" open dialogs), but rather the fact they were implemented 
using Windows API that nobody understood well. The API of 
`GtkFileChooserNative` is pretty much like `GtkFileChooser` except it isn't a 
widget and you cannot put custom widgets inside it.

> You hard-coded the native dialogs. 

This isn't meant to be the final implementation - as said in the PR 
description, I asked whether using them would be acceptable in Geany and 
implemented it only for the open dialog for some testing. I don't want to spend 
much time on something that nobody likes so here I just wanted some initial 
feedback. Making this feature optional is surely an option but if it's done 
that way, I'd lean towards using the native dialogs by default.

> As they don't offer all the features of our dialog (renaming a file, for 
> example)

I didn't even know it was possible to rename a file using the Open dialog - how 
does one do that? I was talking about these options:

https://github.com/geany/geany/assets/713965/46cf8725-cf6d-4acf-9cad-51c65eed02b7;>

which are a custom widget inserted to the open dialog and which I personally 
have never used (I just tend to open the file and modify what's needed 
afterwards in Geany - especially with file encoding one cannot be sure before 
seeing how the file displays).


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2085408678
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-30 Thread Jiří Techet via Github-comments
> @techee you said in the OP "where the GTK dialogs don't offer the best user 
> experience.". Can you expand on that and why " using native dialogs under 
> Windows and macOS is more important IMO."?

It's pretty much this: 
https://github.com/geany/geany-osx/issues/14#issuecomment-1988461271. Basically 
the GTK keyboard shortcuts don't work on macOS and even if they worked, users 
don't know this because they are used to normal macOS behavior. Then it's the 
matter of favorite folders in the sidebar which one can normally define once 
and then they arte used in all the dialogs - that doesn't work with the GTK 
dialog. Finally, when using the native dialog, on macOS at least, the operating 
system automatically grants read/write "protected folder" file access without 
additional permission popup - this doesn't happen for GTK dialogs because they 
are "some foreign code" and the system doesn't know it was the user's explicit 
file selection.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2085363082
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-30 Thread elextr via Github-comments
Since I can't try either of the native dialogs, the reason I (politely) asked 
what the advantages of the native dialogs are is because as they are hard coded 
at compile time (AFAICT) users on Windows and Macos are gonna be stuck with 
them.  So its important to know what the advantages are vs the disadvantages.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2085016108
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-30 Thread Thomas Martitz via Github-comments
Didn't we have native dialogs a while ago, at least on Windows? So this brings 
that back, basically?

> To me at least this isn't the most important thing and using native dialogs 
> under Windows and macOS is more important IMO.

You hard-coded the native dialogs. As they don't offer all the features of our 
dialog (renaming a file, for example) you should be able to use that. I can 
also imagine not everyone likes an "alien" dialog in a GTK application (it's 
native to Windows but alien Geany).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2084950388
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-29 Thread elextr via Github-comments
@rdipardo @techee thanks for testing, so apart from the inconsistent theming 
issue it seems to work.

@techee you said in the OP "where the GTK dialogs don't offer the best user 
experience.".  Can you expand on that and why " using native dialogs under 
Windows and macOS is more important IMO."?


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2084346252
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-29 Thread Jiří Techet via Github-comments
File filters work both on Windows and macOS:

![Screenshot 2024-04-30 
001617](https://github.com/geany/geany/assets/713965/a457b3df-a2fe-4bc3-b8e8-de97402391a0)
https://github.com/geany/geany/assets/713965/03616e82-594b-4921-be10-ce999eb38167;>



-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2083787087
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-29 Thread Jiří Techet via Github-comments
@techee pushed 1 commit.

2bf55c0d6657fa0a80ffd573316c47308d9ba581  Use filters with GtkFileChooserNative

-- 
View it on GitHub:
https://github.com/geany/geany/pull/3861/files/d1d16fa03df309916acf577a2df2a97cf7d419d9..2bf55c0d6657fa0a80ffd573316c47308d9ba581
You are receiving this because you are subscribed to this thread.

Message ID: 


[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-29 Thread Jiří Techet via Github-comments
> No need to build yourself, a full installer with the changes can be
downloaded from
the CI builds: https://github.com/geany/geany/actions/runs/8869590862

Nice, I didn't know about that.

The screenshot below comes from Windows 11, Geany on the left, Notepad++ on the 
right. The only difference I see is the file type selection that Notepad++ 
offers. I ifdef'ed that out in this patch thinking it wouldn't work but maybe 
it does - I'll try that.

![Screenshot 2024-04-29 
221123](https://github.com/geany/geany/assets/713965/4100df30-5eb4-4fa4-9978-d3902200abce)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2083733722
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-29 Thread rdipardo via Github-comments
> Windows 10/11 feedback would be great

So far so good on a stock Win 10 (22H2) VM with native dark mode active (i.e. 
`AppsUseLightTheme` == `0`):1.

https://github.com/geany/geany/assets/59004801/ef76157a-d5ae-4111-b147-ce6a4ce91945;>

> Also I presume the native dialogs are themed by the platform, not by GTK 
> themes

The screen capture and Registry values below confirm as much.

At least it's not launching the XP-era file dialogue that caused #3209

---
1.
~~~sh-session
$ reg query 
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
 /se #

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize
ColorPrevalenceREG_DWORD0x0
EnableTransparencyREG_DWORD0x0
AppsUseLightThemeREG_DWORD0x0
SystemUsesLightThemeREG_DWORD0x0
~~~


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2083492646
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-29 Thread Enrico Tröger via Github-comments
>Somebody who has Windows 11 and can build Geany with this needs to
>test as well.

No need to build yourself, a full installer with the changes can be
downloaded from
the CI builds: https://github.com/geany/geany/actions/runs/8869590862

Windows 10/11 feedback would be great, I can only test on Windows 7
which is unsupported and not representative.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2081961546
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-28 Thread elextr via Github-comments
Also I presume the native dialogs are themed by the platform, not by GTK 
themes, so they may look totally different to the rest of Geany.  @techee for 
Macos and whoever tests on Windows 11 need to try.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2081787625
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-28 Thread elextr via Github-comments
Somebody who has Windows 11 and can build Geany with this needs to test as well.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2081771567
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Use GtkFileChooserNative for opening files on Windows and macOS (PR #3861)

2024-04-28 Thread Enrico Tröger via Github-comments
I'm curious though as I only use Linux, it won't change anything for me :D.
But I'll give it a try on Windows, this will take a few days though.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3861#issuecomment-2081658681
You are receiving this because you are subscribed to this thread.

Message ID: