Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pre-expanded Gtk+ Save As Dialog Patch
View unanswered posts
View posts from last 24 hours

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


Joined: 13 Sep 2002
Posts: 55

PostPosted: Sat Jul 23, 2005 2:44 am    Post subject: Pre-expanded Gtk+ Save As Dialog Patch Reply with quote

I'm pretty sure at least one other person in the world who dislikes the gtk+ save as dialog. As I like to manage my files by using multiple directories, I hate how I have to click the browse for new folders expander and have to readjust the window, etc. So to fix this, I created a very simple patch that adds a couple of lines in the source that expands it by default:
Code:
diff -Naur gtk+-2.6.1/gtk/gtkfilechooserdefault.c gtk+-2.6.1-new/gtk/gtkfilechooserdefault.c
--- gtk+-2.6.1/gtk/gtkfilechooserdefault.c   2005-01-06 15:27:58.000000000 -0500
+++ gtk+-2.6.1-new/gtk/gtkfilechooserdefault.c   2005-01-14 20:31:21.007636472 -0500
@@ -3436,6 +3436,8 @@
   gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
 
   impl->save_expander = gtk_expander_new_with_mnemonic (_("_Browse for other folders"));
+  /* ADDED BY FRANKJR */
+  gtk_expander_set_expanded (GTK_EXPANDER (impl->save_expander), TRUE);
   gtk_container_add (GTK_CONTAINER (alignment), impl->save_expander);
   g_signal_connect (impl->save_expander, "notify::expanded",
           G_CALLBACK (expander_changed_cb),

Now I've tried this patch with various versions of 2.6.x, all you have to do is change the version numbers in the patch to the gtk+ that you are going to patch it to, save the patch in /usr/portage/distfiles, and add this line somewhere in the ebuild:
Code:
epatch ${DISTDIR}/what-i-saved-it-as.patch

Then do a ebuild gtk+-2.6.x.ebuild digest (I would recommend putting your modified ebuild in the portage overlay so they are not wiped out with the next emerge --sync) and then do the emerge.

Just a simple little fix for a trivial issue.
Back to top
View user's profile Send private message
psyeye
Guru
Guru


Joined: 06 Dec 2002
Posts: 409
Location: Germany

PostPosted: Tue Nov 08, 2005 1:38 pm    Post subject: Reply with quote

Works with GTK+-2.8.6! Excellent - thanks a ton!

gtk+-2.8.6-r1.ebuild - best put in a local overlay
patch - to be saved in gtk+-2.8.6/files

recreate digest, re-emerge, be happy (as I am ;))


psyeye

edit: typo, 2.8.6-r1 ebuild
_________________
I have a big, fast supercomputer, too!


Last edited by psyeye on Wed Nov 16, 2005 11:31 am; edited 2 times in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16116
Location: Colorado

PostPosted: Wed Nov 09, 2005 10:36 pm    Post subject: Reply with quote

frankjr: Thanks! I Haven't applied it yet, but will soon.

Do you plan on maintaining this? I'd hate to get use to it, only to find out in two version bumps that it doesn't work, and isn't maintained.

Thanks.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
psyeye
Guru
Guru


Joined: 06 Dec 2002
Posts: 409
Location: Germany

PostPosted: Mon Nov 14, 2005 4:38 pm    Post subject: Reply with quote

pjp wrote:
Do you plan on maintaining this?


If frankjr won't, I'll try... 8)
Disclaimer: I am following Gentoo closely, syncing almost daily and always on the lookout for new stuff; but since my Gnome desktop is my main workplace (which simply mustn't break) I tend to lag behind a bit, so a patched Gtk+ (from me, that is) might always be a bit behind...
...also that patch so far does not seem to be hard to maintain ;)


psyeye
_________________
I have a big, fast supercomputer, too!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16116
Location: Colorado

PostPosted: Tue Nov 15, 2005 11:10 pm    Post subject: Reply with quote

I didn't figure it was difficult now, but I didn't want to have problems with a fairly major upgrade later. And once I've gotten use to it, I'd hate to have to abandon it.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
psyeye
Guru
Guru


Joined: 06 Dec 2002
Posts: 409
Location: Germany

PostPosted: Wed Nov 16, 2005 11:19 am    Post subject: Reply with quote

Then I guess you're then best served with sticking to the unpatched Gtk+, aren't you?


psyeye
_________________
I have a big, fast supercomputer, too!
Back to top
View user's profile Send private message
psyeye
Guru
Guru


Joined: 06 Dec 2002
Posts: 409
Location: Germany

PostPosted: Wed Nov 16, 2005 11:31 am    Post subject: Reply with quote

Updated post above - now has gtk+-2.8.6-r1


psyeye
_________________
I have a big, fast supercomputer, too!
Back to top
View user's profile Send private message
TenPin
Guru
Guru


Joined: 26 Aug 2002
Posts: 500
Location: Kansas City

PostPosted: Wed Nov 23, 2005 3:56 am    Post subject: Reply with quote

Thanks for the patch, it was driving me nuts :)
_________________
For since in the wisdom of God the world by its wisdom did not know God, God was pleased to save those who believe by the foolishness of preaching.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Sat Jan 21, 2006 7:19 pm    Post subject: Reply with quote

great patch , thanks.

It's currently failing on 2.6.10 , I'll have to have a closer look why.

Thx. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
psyeye
Guru
Guru


Joined: 06 Dec 2002
Posts: 409
Location: Germany

PostPosted: Sat Jan 21, 2006 7:33 pm    Post subject: Reply with quote

Gentree wrote:
It's currently failing on 2.6.10 , I'll have to have a closer look why.

Why not upgrade to gtk+-2.8* - patch works for those versions.


psyeye
_________________
I have a big, fast supercomputer, too!
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Mon Jan 23, 2006 2:12 pm    Post subject: Reply with quote

duh , why not look at what I'm typing . I meant 2.8.10 :oops:
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
psyeye
Guru
Guru


Joined: 06 Dec 2002
Posts: 409
Location: Germany

PostPosted: Mon Jan 23, 2006 2:18 pm    Post subject: Reply with quote

put this in overlay/x11-libs/gtk+ and this into overlay/x11-libs/gtk+/files and your set; re-emerge gtk+ and it has the patch applied (dont forget to "re-digest" beforehand).


psyeye
_________________
I have a big, fast supercomputer, too!
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Mon Jan 23, 2006 5:13 pm    Post subject: Reply with quote

thanks , you posted

Code:
diff -Naur gtk+-2.6.1/gtk/gtkfilechooserdefault.c gtk+-2.6.1-new/gtk/gtkfilechooserdefault.c
--- gtk+-2.6.1/gtk/gtkfilechooserdefault.c   2005-01-06 15:27:58.000000000 -0500
+++ gtk+-2.6.1-new/gtk/gtkfilechooserdefault.c   2005-01-14 20:31:21.007636472 -0500
@@ -3436,6 +3436,8 @@
   gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
   
   impl->save_expander = gtk_expander_new_with_mnemonic (_("_Browse for other folders"));
+  /* ADDED BY FRANKJR */
+  gtk_expander_set_expanded (GTK_EXPANDER (impl->save_expander), TRUE);
   gtk_container_add (GTK_CONTAINER (alignment), impl->save_expander);
   g_signal_connect (impl->save_expander, "notify::expanded",
           G_CALLBACK (expander_changed_cb),


I assume I have to change c/2.6.1/2.6.10 and modify the line numbers to fit the newer file , right ? Seems that code is at 4061 now.

Thx 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
psyeye
Guru
Guru


Joined: 06 Dec 2002
Posts: 409
Location: Germany

PostPosted: Tue Jan 24, 2006 10:31 am    Post subject: Reply with quote

Gentree wrote:
thanks , you posted

Code:
diff -Naur gtk+-2.6.1/gtk/gtkfilechooserdefault.c gtk+-2.6.1-new/gtk/gtkfilechooserdefault.c
--- gtk+-2.6.1/gtk/gtkfilechooserdefault.c   2005-01-06 15:27:58.000000000 -0500
+++ gtk+-2.6.1-new/gtk/gtkfilechooserdefault.c   2005-01-14 20:31:21.007636472 -0500
@@ -3436,6 +3436,8 @@
   gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
   
   impl->save_expander = gtk_expander_new_with_mnemonic (_("_Browse for other folders"));
+  /* ADDED BY FRANKJR */
+  gtk_expander_set_expanded (GTK_EXPANDER (impl->save_expander), TRUE);
   gtk_container_add (GTK_CONTAINER (alignment), impl->save_expander);
   g_signal_connect (impl->save_expander, "notify::expanded",
           G_CALLBACK (expander_changed_cb),


I assume I have to change c/2.6.1/2.6.10 and modify the line numbers to fit the newer file , right ? Seems that code is at 4061 now.

Thx 8)


No! You haven't patched much, no? :roll: Nor have you tried the ebuild, no? Go check it out - it WORKS! ;)

(Afaik "epatch" uses "-p1" which strips of the first path-element (here:gtk+-2.6.1) and you'd do the same thing if you were to apply the patch manually).

Now go get the ebuild and start emerging - no need to hassle with anything!


psyeye
_________________
I have a big, fast supercomputer, too!
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Wed Jan 25, 2006 9:17 am    Post subject: Reply with quote

Thanks a lot.

I dont know what was going on here but it works now. (I may have broken something playing with gcc4.1)

Yes , I have written two patchs before but I'm not really familiar with the cryptic way it works and the contradictory errors you get when it does not.

You are correct about it ignoring the first part and it does manage to match the block even if the line numbers are wrong . I just started correcting all that when it did not work because it seemed a possible cause of error.

It now works a treat and I have just added a patch for one of my mods. I have a whole bunch of ideas to make these dlgs more usable , they seems to frustrate half the ppl who use them (the other half just accept the annoyances).

Like so many things on *nix systems its easy when you know how but trying to work out what to do from the doc can take far more time than is reasonable.

I'll post you when I have some other mods tidied up.

Thanks again for your help. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Wed Feb 15, 2006 7:15 pm    Post subject: Reply with quote

http://bugzilla.gnome.org/show_bug.cgi?id=331313

Once the savedlg expander is on by default the expander itself is redundant and is just one too items on the screen.

this bug contains the above patch with the addition of the expander widget being hidden. Less clutter, more better. 8)

PS just realised that the drop down list is disabled when the expander is open so that's completely redundant as well.

Hide both of those and the screen starts to regain a bit of focus and order.
http://bugzilla.gnome.org/attachment.cgi?id=59501
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
Daemoniis
n00b
n00b


Joined: 30 Oct 2004
Posts: 16
Location: Suburban Chicago

PostPosted: Thu Aug 03, 2006 3:26 pm    Post subject: Thanks! Reply with quote

Oh, man, thank you so much!!! This dialog's been driving me crazy ever since I've upgraded to firefox-1.5. I wish firefox people were still using their old dialog (which wasn't based on GTK+ one, from what I could tell).
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Fri Aug 04, 2006 3:31 pm    Post subject: Reply with quote

how about making firefox team aware of the issue and the patch?

I imaginge they are already getting some "feedback" on the filechooser, point them to a trivial patch that improves it may get it adopted.

If a major app like ffx starts hacking the dlgs , maybe even the gnome team will finally accept its short-comings. :D
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
CrazyTerabyte
Apprentice
Apprentice


Joined: 30 Dec 2004
Posts: 192
Location: Brazil

PostPosted: Fri Aug 04, 2006 3:48 pm    Post subject: Reply with quote

Gentree wrote:
If a major app like ffx starts hacking the dlgs , maybe even the gnome team will finally accept its short-comings. :D

Firefox used its own version of file chooser on 1.x (or 1.0) series. Did gnome team change the dialog because of that?
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Fri Aug 04, 2006 5:37 pm    Post subject: Reply with quote

Was that thier own file open dlg, a gtk-1.2 based dlg, or a modded "filechooser"? I suspect answer b).

Whatever the case it is still worth forwarding the patch if the new one is causing you pain and suffering.

I know it annoyed the hell out of me that's why I submitted 5 patched to gnome.org to make it a bit more usable (a couple of which did get taken into CVS recently). Sadly this once has still to get through the almost corporate inertia of the thinking of those in control of the code.

Maybe one day. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
CrazyTerabyte
Apprentice
Apprentice


Joined: 30 Dec 2004
Posts: 192
Location: Brazil

PostPosted: Sat Aug 05, 2006 12:25 am    Post subject: Reply with quote

Gentree wrote:
Whatever the case it is still worth forwarding the patch if the new one is causing you pain and suffering.


It does not annoy me because I don't use Firefox. I use Opera. :P hehe

But it annoys me a little on Gimp.

Gentree wrote:
I know it annoyed the hell out of me


In fact, that dialog made my work faster. I never saved/opened a file so fast before. That's because I want to get rid of that dialog as soon as possible, then I hurry to save/open the file! ;)
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Sat Aug 05, 2006 7:31 am    Post subject: Reply with quote

Quote:
It does not annoy me because I don't use Firefox. I use Opera. hehe

But it annoys me a little on Gimp.
me too op fan.

unfortunately this affects a whole range of (otherwise) excellent software build on gtk+ : gftp gimp bluefish....

bug on file saver combo
http://bugzilla.gnome.org/show_bug.cgi?id=331313

bug on inappropriate design assumptions that are the root of all these issues
http://bugzilla.gnome.org/show_bug.cgi?id=331404

Basically it was assumed that we all want save stuff on our "desktop" , something I never want to do.

ie Windows mentality: we know what is best for you , resistance is futile. :evil:
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
ilm
Guru
Guru


Joined: 29 Jun 2006
Posts: 310
Location: Brisbane, Australia

PostPosted: Sat Aug 19, 2006 10:59 am    Post subject: Reply with quote

Well, I found this link: http://gentoo-wiki.com/HOWTO_Integrate_Firefox_with_KDE

which references this site: http://konquefox.free.fr/index.html

It gives you a work-around for the firefox dialogs.

Now I just need to get it to work for everything else... :wink:
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