Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Configure GTK+ File Chooser
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
FR3141
n00b
n00b


Joined: 13 Jan 2018
Posts: 39

PostPosted: Sun Aug 11, 2019 12:56 pm    Post subject: Configure GTK+ File Chooser Reply with quote

Is there a way to configure the GTK+ file chooser?

Consider the following image:

https://i.postimg.cc/pLVrG7jW/chooser.png

On the left side there is a panel called "Places" and within this panel there are several unwanted directory entries (usr, sys, proc, shm, pts, etc.). How they even got there in the first place is unknown to me.

There are "+/-" buttons to add and delete entries but these buttons are non-functional (grayed out) for the entries that I want to eliminate.

This chooser shows up everywhere and always brings up those unwanted directory entries.

How do I get rid of these entries? Is there a config file somewhere?

But I have searched and found nothing.

Maybe I will have to modify the source code.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Aug 11, 2019 1:48 pm    Post subject: Reply with quote

I opened a bug about this upstream. The answer was: you are using GTK+ wrong, they way you use it (standalone without Gnome) is not supported. Typical Red Hat style attitude, I'd say, user is always wrong. I have a patch for GTK+:3 if you want it. Download here.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
FR3141
n00b
n00b


Joined: 13 Jan 2018
Posts: 39

PostPosted: Sun Aug 11, 2019 4:36 pm    Post subject: Reply with quote

Jaglover wrote:
I opened a bug about this upstream. The answer was: you are using GTK+ wrong, they way you use it (standalone without Gnome) is not supported. Typical Red Hat style attitude, I'd say, user is always wrong. I have a patch for GTK+:3 if you want it. Download here.


Thank you very much for the patch. I have added it portage.

However, the patch cannot be applied to GTK+2, and most of my programs use GTK+2 rather than GTK+3.

But I did manage to make a patch for GTK+2. The details:

In the file gtkfilechooserdefault.c, at line 1973, there is a function called shortcuts_add_volumes(). This function automatically populates the "Places" pane with scanned volumes. I simply commented out the innards and replaced them with a do-nothing single instruction. The function is void and hence there is no return value. Now I am free of the distraction of unwanted directories.

The patch is here: http://s000.tinyupload.com/?file_id=10527330706376874926

Also, it seems that Linux is headed into a dangerous direction. GTK+ is supposed to be a general purpose GUI toolkit that can be utilized anywhere. But RedHat is apparently attempting to limit its scope to the GNOME DE only. Thus we see more narrowing of user choice.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum