Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-21 Thread Matthew Brush

On 12/20/2011 10:50 PM, Thomas Martitz wrote:

Am 21.12.2011 02:58, schrieb Matthew Brush:



And maybe add an hidden option in case ppl actually like the GTK
feature?



It's actually a *GNOME* feature that crept into GTK+. This seems to be
a pattern lately that makes me very sad. I guess they think because
their target users are idiots that everyone that uses GTK+ in their
program has the same target users.


But it's in GTK, and it'll behave that way everywhere where GTK is, no?
I.e. on non-Gnome DEs. So how's that a Gnome-only thing? Unless GTK has
a if (gnome) {} code path?



Yes, it's in GTK+ as default because a GNOME designer put it there, 
breaking every GTK+ application (GNOME-specific or otherwise) that 
relied on the default behaviour.


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-21 Thread Matthew Brush

On 12/21/2011 07:41 AM, Thomas Martitz wrote:

Am 21.12.2011 16:39, schrieb Matthew Brush:

On 12/20/2011 10:50 PM, Thomas Martitz wrote:

Am 21.12.2011 02:58, schrieb Matthew Brush:



And maybe add an hidden option in case ppl actually like the GTK
feature?



It's actually a *GNOME* feature that crept into GTK+. This seems to be
a pattern lately that makes me very sad. I guess they think because
their target users are idiots that everyone that uses GTK+ in their
program has the same target users.


But it's in GTK, and it'll behave that way everywhere where GTK is, no?
I.e. on non-Gnome DEs. So how's that a Gnome-only thing? Unless GTK has
a if (gnome) {} code path?



Yes, it's in GTK+ as default because a GNOME designer put it there,
breaking every GTK+ application (GNOME-specific or otherwise) that
relied on the default behaviour.



How come you say it makes Geany's GTK+ open dialog even weirder on
non-GNOME DE then if it's not gnome specific at all?



It *should be GNOME-specific* is my point, not something applied to all 
GTK+ programs who relied on the previously sane default.


It makes Geany's open dialog weirder because depending on which document 
is currently open, it changes the entire look and behaviour of the open 
dialog and also some DEs that use GTK+ don't follow the recent files 
standard which makes the recent files view even weirder (ie. Where's 
that file I just opened in Internet Explorer?).  What's more, AFAIK no 
other DE's open dialog does this by default, so that we're using GTK+ 
will be that much more obvious and awkward for users of those DEs.



I'd argue the other way around. Your patch makes Geany's open dialog
behave differently to the rest of the GTK apps.



Maybe it makes it behave different to the rest of GTK+ apps that don't 
set a default current folder and haven't been patched to do so yet. 
Already on my desktop many applications are setting a default themselves 
causing this weird new view not to be shown.  Geany is currently one of 
the odd balls because we never set the default current folder before.


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Enrico Tröger
On Mon, 19 Dec 2011 20:07:06 -0800, Matthew wrote:

Hi,

Is anyone opposed to me committing the trivial patch attached here.
The comment I think describes it well enough, and if you're using
recent GTK+ 2.24.x you probably already know about it.

I'm all for it.

Regards,
Enrico

-- 
Not sent from my smartphone.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Thomas Martitz

Am 20.12.2011 05:07, schrieb Matthew Brush:

Hi,

Is anyone opposed to me committing the trivial patch attached here.  
The comment I think describes it well enough, and if you're using 
recent GTK+ 2.24.x you probably already know about it.


I didn't want to commit without asking since maybe some people will 
find this new feature[1][2] useful, I personally find it extremely 
annoying, but I wouldn't want to fix it at the expense of annoying 
others.


Cheers,
Matthew Brush 



I quite like that it starts in recently used. $HOME is never the right 
location to save for me, so I always need to click. And recently used is 
usually less clicks because the last folder in there.


You add in the comment that recently used is only one click away. 
However, the same can be said about $HOME.


Why is it so annoying to you? Do you often save in $HOME? Recently 
Used fixes an annoyance for me, and gnome page you linked describes it, 
that I save (accidentally) in $HOME.


Slightly related: How do you make the file chooser (when opening a file) 
hide filename entry by default? In gtk+3 there's a dconf setting for it, 
but I don't know for 2.x.


Best regards.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Erik de Castro Lopo
Matthew Brush wrote:

 Hi,
 
 Is anyone opposed to me committing the trivial patch attached here.  The 
 comment I think describes it well enough, and if you're using recent 
 GTK+ 2.24.x you probably already know about it.

+1

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Lex Trotman
On Tue, Dec 20, 2011 at 7:52 PM, Thomas Martitz
thomas.mart...@student.htw-berlin.de wrote:
 Am 20.12.2011 05:07, schrieb Matthew Brush:

 Hi,

 Is anyone opposed to me committing the trivial patch attached here.  The
 comment I think describes it well enough, and if you're using recent GTK+
 2.24.x you probably already know about it.

 I didn't want to commit without asking since maybe some people will find
 this new feature[1][2] useful, I personally find it extremely annoying,
 but I wouldn't want to fix it at the expense of annoying others.

 Cheers,
 Matthew Brush



 I quite like that it starts in recently used. $HOME is never the right
 location to save for me, so I always need to click. And recently used is
 usually less clicks because the last folder in there.

 You add in the comment that recently used is only one click away. However,
 the same can be said about $HOME.

 Why is it so annoying to you? Do you often save in $HOME? Recently Used
 fixes an annoyance for me, and gnome page you linked describes it, that I
 save (accidentally) in $HOME.

 Slightly related: How do you make the file chooser (when opening a file)
 hide filename entry by default? In gtk+3 there's a dconf setting for it, but
 I don't know for 2.x.

 Best regards.


I agree with Thomas, home is never the right place to save, recent is
at least some chance of being right.

I suggest that if you add this Matthew, you make controlled by an
option.  I don't care which you make default.

Cheers
Lex

 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Colomban Wendling
Le 20/12/2011 05:07, Matthew Brush a écrit :
 Hi,
 
 Is anyone opposed to me committing the trivial patch attached here.  The
 comment I think describes it well enough, and if you're using recent
 GTK+ 2.24.x you probably already know about it.
 
 I didn't want to commit without asking since maybe some people will find
 this new feature[1][2] useful, I personally find it extremely
 annoying, but I wouldn't want to fix it at the expense of annoying others.

While I agree the recent list is not useful most of the time (probably
even annoying since I don't know that dir) for me either, I doubt $HOME
is really best.

I see 2 alternative, and I think better, choices:

1) use the basedir of the currently opened file;
2) use the current dir (e.g. dir from where Geany was started) [1].
   AFAIK this will be $HOME for panel/shell-launched apps.

And maybe add an hidden option in case ppl actually like the GTK feature?


Cheers,
Colomban


[1] maybe not on Windows where I think the current dir is always the
binary location?

 
 Cheers,
 Matthew Brush
 
 [1]
 https://live.gnome.org/DocumentCentricGnome/Help%20the%20user%20choose%20a%20place%20to%20put%20a%20new%20file
 
 [2] I think we can safely assume Geany users (ie. programmers) already
 know how to manage files :)
 
 
 
 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Colomban Wendling
Le 20/12/2011 19:18, Colomban Wendling a écrit :
 Le 20/12/2011 05:07, Matthew Brush a écrit :
 Hi,

 Is anyone opposed to me committing the trivial patch attached here.  The
 comment I think describes it well enough, and if you're using recent
 GTK+ 2.24.x you probably already know about it.

 I didn't want to commit without asking since maybe some people will find
 this new feature[1][2] useful, I personally find it extremely
 annoying, but I wouldn't want to fix it at the expense of annoying others.
 
 While I agree the recent list is not useful most of the time (probably
 even annoying since I don't know that dir) for me either, I doubt $HOME
 is really best.
 
 I see 2 alternative, and I think better, choices:
 
 1) use the basedir of the currently opened file;

Hum, forget this point, we of course already do so :-'

Maybe we could use the last used dir if we can't get the path from the
current file? (e;g. when unsaved)

 2) use the current dir (e.g. dir from where Geany was started) [1].
AFAIK this will be $HOME for panel/shell-launched apps.
 
 And maybe add an hidden option in case ppl actually like the GTK feature?
 
 
 Cheers,
 Colomban
 
 
 [1] maybe not on Windows where I think the current dir is always the
 binary location?
 

 Cheers,
 Matthew Brush

 [1]
 https://live.gnome.org/DocumentCentricGnome/Help%20the%20user%20choose%20a%20place%20to%20put%20a%20new%20file

 [2] I think we can safely assume Geany users (ie. programmers) already
 know how to manage files :)



 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
 
 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Lex Trotman
Hi Colomban,

On Wed, Dec 21, 2011 at 5:18 AM, Colomban Wendling
lists@herbesfolles.org wrote:
 Le 20/12/2011 05:07, Matthew Brush a écrit :
 Hi,

 Is anyone opposed to me committing the trivial patch attached here.  The
 comment I think describes it well enough, and if you're using recent
 GTK+ 2.24.x you probably already know about it.

 I didn't want to commit without asking since maybe some people will find
 this new feature[1][2] useful, I personally find it extremely
 annoying, but I wouldn't want to fix it at the expense of annoying others.

 While I agree the recent list is not useful most of the time (probably
 even annoying since I don't know that dir) for me either, I doubt $HOME
 is really best.

 I see 2 alternative, and I think better, choices:

 1) use the basedir of the currently opened file;

Since files that have been saved will only show the dialog if you use
save as thats reasonable, but the most common reason for the dialog
is saving a new file, and then there is no base directory so what
then?

 2) use the current dir (e.g. dir from where Geany was started) [1].
   AFAIK this will be $HOME for panel/shell-launched apps.

And that is still useless (both Linux and Windows) :)


 And maybe add an hidden option in case ppl actually like the GTK feature?


Yes.

Cheers
Lex


 Cheers,
 Colomban


 [1] maybe not on Windows where I think the current dir is always the
 binary location?


 Cheers,
 Matthew Brush

 [1]
 https://live.gnome.org/DocumentCentricGnome/Help%20the%20user%20choose%20a%20place%20to%20put%20a%20new%20file

 [2] I think we can safely assume Geany users (ie. programmers) already
 know how to manage files :)



 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Matthew Brush

On 12/20/2011 10:18 AM, Colomban Wendling wrote:

Le 20/12/2011 05:07, Matthew Brush a écrit :

Hi,

Is anyone opposed to me committing the trivial patch attached here.  The
comment I think describes it well enough, and if you're using recent
GTK+ 2.24.x you probably already know about it.

I didn't want to commit without asking since maybe some people will find
this new feature[1][2] useful, I personally find it extremely
annoying, but I wouldn't want to fix it at the expense of annoying others.


While I agree the recent list is not useful most of the time (probably
even annoying since I don't know that dir) for me either, I doubt $HOME
is really best.



I'm not certain, but I thought this was the previous behaviour wasn't 
it?  That's the only reason I chose the home dir.



I see 2 alternative, and I think better, choices:

1) use the basedir of the currently opened file;
2) use the current dir (e.g. dir from where Geany was started) [1].
AFAIK this will be $HOME for panel/shell-launched apps.



I did try this, and when started from the panel launcher, it seemed like 
the directory was still '/usr/local/bin' (when using either . or 
g_get_current_dir()).


In my original email I was going to propose a few other locations (if 
the directories exist else fallback to ~):


~/Documents or ~/documents
~/Projects or ~/projects

In particular ~/projects seems like a good one since this is already the 
default project directory when creating a new project.


Also as you said in your other email, the last directory is also a good 
option, though we'd need to store this in the config file (maybe we are 
already?).



And maybe add an hidden option in case ppl actually like the GTK feature?



It's actually a *GNOME* feature that crept into GTK+.  This seems to be 
a pattern lately that makes me very sad. I guess they think because 
their target users are idiots that everyone that uses GTK+ in their 
program has the same target users.


I'm not keen to add another option to just unbreak the GNOME hacks, but 
I guess we could do it.


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Matthew Brush

On 12/20/2011 12:52 AM, Thomas Martitz wrote:

Am 20.12.2011 05:07, schrieb Matthew Brush:

Hi,

Is anyone opposed to me committing the trivial patch attached here.
The comment I think describes it well enough, and if you're using
recent GTK+ 2.24.x you probably already know about it.

I didn't want to commit without asking since maybe some people will
find this new feature[1][2] useful, I personally find it extremely
annoying, but I wouldn't want to fix it at the expense of annoying
others.

Cheers,
Matthew Brush



I quite like that it starts in recently used. $HOME is never the right
location to save for me, so I always need to click. And recently used is
usually less clicks because the last folder in there.



For me it shows no folders *ever* in there.  It does however show the 
last .avi movie files I played in VLC, some .tar.gz files I opened 
recently in file-roller and also the firefox binary from /usr/bin. Very 
useful for an editor that can only open plain text files :)



You add in the comment that recently used is only one click away.
However, the same can be said about $HOME.



Home was just a default since it's a decent starting place where all 
your files are below, though I'm not against using some other directory.



Why is it so annoying to you? Do you often save in $HOME? Recently
Used fixes an annoyance for me, and gnome page you linked describes it,
that I save (accidentally) in $HOME.



See above about what files are shown and also that it only lists the 
basenames, so which of those last 20 `Makefile.am`s do I want to 
re-open?  The same could be said about other common filenames like 
main.c or index.html/php/whatever. Another reason was that it removes 
the Location text box where you type in a location, something I do 
often.  I did find out through experimentation that if you just go ahead 
and type, the Location box magically comes back and works, but it's not 
very obvious behaviour at all.  Lastly, it makes Geany's GTK+ open 
dialog even weirder on non-GNOME DEs.



Slightly related: How do you make the file chooser (when opening a file)
hide filename entry by default? In gtk+3 there's a dconf setting for it,
but I don't know for 2.x.



I'm not too sure, and I'll probably only ever find out how to re-enable 
it, since I use this extensively.


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] GtkFileChooser recent annoyance

2011-12-20 Thread Thomas Martitz

Am 21.12.2011 02:58, schrieb Matthew Brush:


And maybe add an hidden option in case ppl actually like the GTK 
feature?




It's actually a *GNOME* feature that crept into GTK+.  This seems to 
be a pattern lately that makes me very sad. I guess they think because 
their target users are idiots that everyone that uses GTK+ in their 
program has the same target users.


But it's in GTK, and it'll behave that way everywhere where GTK is, no? 
I.e. on non-Gnome DEs. So how's that a Gnome-only thing? Unless GTK has 
a if (gnome) {} code path?


Best regards.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] GtkFileChooser recent annoyance

2011-12-19 Thread Matthew Brush

Hi,

Is anyone opposed to me committing the trivial patch attached here.  The 
comment I think describes it well enough, and if you're using recent 
GTK+ 2.24.x you probably already know about it.


I didn't want to commit without asking since maybe some people will find 
this new feature[1][2] useful, I personally find it extremely 
annoying, but I wouldn't want to fix it at the expense of annoying others.


Cheers,
Matthew Brush

[1] 
https://live.gnome.org/DocumentCentricGnome/Help%20the%20user%20choose%20a%20place%20to%20put%20a%20new%20file
[2] I think we can safely assume Geany users (ie. programmers) already 
know how to manage files :)
diff --git a/src/dialogs.c b/src/dialogs.c
index 4b701d2..72c72f1 100644
--- a/src/dialogs.c
+++ b/src/dialogs.c
@@ -473,7 +473,18 @@ void dialogs_show_open_file(void)
 		open_file_dialog_apply_settings(dialog);
 
 		if (initdir != NULL  g_path_is_absolute(initdir))
-gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), initdir);
+			gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), initdir);
+		else
+		{
+			/* Since GTK+ ~2.24 the default behaviour of the GtkFileChooser
+			 * is to hide the location bar and show recently used files,
+			 * this brings back the location bar and puts the current
+			 * directory as the user's home directory if there's no
+			 * better one to use. The recently used view is still 1 click
+			 * away. */
+			gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),
+g_get_home_dir());
+		}
 
 		if (app-project  NZV(app-project-base_path))
 			gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog),
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel