GNOME Bugzilla – Bug 123578
The window list preferences for setting window list size should deal with percentage, rather than pixels
Last modified: 2007-12-26 14:12:05 UTC
Package: gnome-panel Severity: enhancement Version: GNOME2.2.2 2.2.2 os_details: Ximian, Inc. Synopsis: The window list preferences for setting window list size should deal with percentage, rather than pixels Bugzilla-Product: gnome-panel Bugzilla-Component: Window List Applet Description: Description of Problem: In the preferences dialog for the window list, it is not clear in what units the window list size is measured (though I know it's measured in pixels). In any case, it would be nicer if the preference was smarter and measured the size in percentage of the panel size (i.e. width or height), which is probably how humans like to think of it. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-09-30 14:42 ------- Reassigning to the default owner of the component, gnome-panel-maint@bugzilla.gnome.org.
*** This bug has been marked as a duplicate of 120215 ***
It's not a dup, AFAICT
What's the meaning of percentage than? I mean will it convert given percentage to pixel and set the size according to it? I personally make width like 4000 so that it fills all the space that exist on my panel, so should I put instead 100%?
"Percentage of display size" is what I originally meant. It seems more useful than pixel size, because I, for one, log in from different machines that have different display resolutions.
Ok then, I'll try make applet obey size as percentage of the panel size.
Created attachment 39635 [details] [review] Proposed patch Patch is using the percent values to set window list panel size. It just creates an interface from percent to pixel for gconf values. Values are stored as percent in gconf, and used as pixel. It also fixes dialog to show percent as value type, and also added gtklabel to fill space to decrease spin button size. Lastly changes the schema file to make default min 25 and default max is 100.
Baris: thanks for the patch! Some comments: + "added gtklabel to fill space to decrease spin button size" I don't understand this. There's certainly another way to do this, isn't it? + "default min 25" This sounds like a bit too much. 10 is probably better + you probably want to look at tasklist->orientation and use the screen height if the tasklist is horizontal instead of the screen width + "width * ((gfloat) percent / 100)" This should be (width * percent) / 100. We don't need a float and the precision will be correct. + "gint value,pixel_value;" Declare the two variables on two lines. I prefer that :-) + same thing for "gint sizepref, sizevalue;" + two useless blank lines are added at the end of the patch for window-list.c. + you'll need to connect to the "size-changed" signal of the screen where the tasklist is to update the minimum size and maximum size when the screen size is changed + you should use new gconf keys to keep the new prefs because we can't change the meaning of the key (it'd be incompatible with previous versions). And we probably want to add some code to migrate the user's old settings to the new settings. You're on the right track! Keep up the good work!
I'm not good at in glade/gui issues, I just see similar thing is used to fill left side w/ gtklabel, so mimic that thing. I really don't know what else I could do that. Well not a major issue though. "25" to "10" percent is alright. For height issue, definately. I realized that after I sent the patch. I was already keeping that in my mind before that latest patch. I knew there're issues. :) "(width * percent) / 100" is alright, but I thought that other way of doing that is easier to read and comprehend. But indeed it's messy afterwards. You have gfloat and etc. I'll try to fix that new key issue too, writing a migrating code is easy, though . Well i'll try to fix them as soon as possible.
Created attachment 45130 [details] [review] change of pixel to percent been done #123578 chanegd the pixel to percentage in preferences considering 4000 pixels into the calculation instead of 4096 please let me know the future enhancement on the patch
Vasanth: your patch doesn't look good. You probably want to work on the patch Baris started.
The preference for setting the window list size no longer exists. Marking this as obsolete.