After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 333826 - The bookmarks manager should center on screen
The bookmarks manager should center on screen
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Bookmarks
1.9.x
Other All
: Normal minor
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks: 755378
 
 
Reported: 2006-03-08 00:19 UTC by Michiel Sikkes
Modified: 2016-09-28 16:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed patch (1.22 KB, patch)
2006-04-11 19:33 UTC, Michiel Sikkes
reviewed Details | Review
Not finished proposal concept fix (8.35 KB, patch)
2006-04-11 22:15 UTC, Michiel Sikkes
needs-work Details | Review
proposed fix using flags (3.06 KB, patch)
2007-07-21 13:10 UTC, Cosimo Cecchi
none Details | Review
added history-window (3.68 KB, patch)
2007-07-21 23:24 UTC, Cosimo Cecchi
none Details | Review
fixed typo (3.67 KB, patch)
2007-07-24 10:00 UTC, Cosimo Cecchi
none Details | Review
patch for window-commands.c (897 bytes, patch)
2009-08-09 22:36 UTC, Jorge Kalmbach
none Details | Review

Description Michiel Sikkes 2006-03-08 00:19:34 UTC
Currently, when I open my bookmark manager either by using the menu items,
toolbar buttons or CTRL+B the window appears on the top left corner of my
screen. It would be nice to have it centered either on my screen, or on my
browser window.

Other information:
Comment 1 Reinout van Schouwen 2006-03-08 11:00:55 UTC
I'm afraid this is not possible by default, because the window manager decides where to put the window initially. It would be centered automatically if the window were a child window of the browser, but it isn't and it shouldn't be one either.
Comment 2 Michiel Sikkes 2006-04-10 17:00:23 UTC
Doesn't matter what it technically should be. The user experience should be smooth. Isn't it possible to give a window manager gtk hint to let it center on parent? Or is this a metacity feature/bug.
Comment 3 Christian Persch 2006-04-10 17:34:53 UTC
I don't see any 'centre' hint in gtk...
Comment 4 Michiel Sikkes 2006-04-10 18:06:50 UTC
Shouldn't it work just like the 'Add bookmark' dialog? Or is that another kind of window, besides from the manager not being a dialog.
Comment 5 Christian Persch 2006-04-10 18:10:23 UTC
Bah, found it, gtk_window_set_position :)
Comment 6 Michiel Sikkes 2006-04-10 18:12:15 UTC
Ah, http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-position.

chpe: I can cook a patch for you if you wish. Or are you working on it now.
Comment 7 Christian Persch 2006-04-10 19:35:32 UTC
No, I'm not working on it now.
Comment 8 Michiel Sikkes 2006-04-11 19:33:53 UTC
Created attachment 63256 [details] [review]
Proposed patch

This patch centers the bookmarks editor on the screen. I'm not sure about wether to use GTK_WIN_POS_CENTER or GTK_WIN_POS_CENTER_ON_SCREEN. The latter seems better, but does it work for non-transient windows?
Comment 9 Christian Persch 2006-04-11 20:00:33 UTC
I think we should use CENTER; CENTER_ON_PARENT makes no sense since the bme has no arent :)
Comment 10 Michiel Sikkes 2006-04-11 22:15:49 UTC
Created attachment 63267 [details] [review]
Not finished proposal concept fix

This is my first go on adding a center state for ephy-state stuff. It is not finished yet, more windows and dialogs have to be converted. Tell me what you think.
Comment 11 Christian Persch 2006-05-11 12:47:05 UTC
If you made that a flag, EPHY_STATE_WINDOW_INITIALLY_CENTRED or so, you'd save converting all callers of ephy_state_add_window that don't need this...
Comment 12 Cosimo Cecchi 2007-07-21 13:09:38 UTC
I made a patch for this, using a flag as you suggested, and it works fine for me.
Are there any other window that need to be positioned in the center of the screen, so that i can include them in the patch?
Comment 13 Cosimo Cecchi 2007-07-21 13:10:11 UTC
Created attachment 92119 [details] [review]
proposed fix using flags
Comment 14 Christian Persch 2007-07-21 20:03:26 UTC
So when you show the bookmarks editor, then move it, quit ephy, start again, show bme; is it centered or at the position you moved it to?

The history window (src/ephy-history-window.c) could be treated the same way.
Comment 15 Cosimo Cecchi 2007-07-21 23:24:21 UTC
Created attachment 92140 [details] [review]
added history-window

If i quit and restart epiphany, it is centered again; if i just close the bookmarks editor after having moved and/or resized, and then show it again without closing ephy, it is at the position i left it, and with the same size. Is it the expected behaviour?
Comment 16 Christian Persch 2007-07-22 10:43:51 UTC
I think it would be annoying to always have to move the bme out of the center after starting ephy...
Comment 17 Cosimo Cecchi 2007-07-23 23:14:53 UTC
Maybe i don't understand the problem, but b-m-e is not started along with epiphany each time i open it. I can't even manage to find a program in gnome that after a restart remembers the position and size of a subwindow.
As i already said, maybe i'm misunderstanding the problem.
Comment 18 Christian Persch 2007-07-23 23:32:49 UTC
Well I don't require remembering the exact position, but I think it would be annoying to have it _always_ centered when I first use it in a session, instead of letting the window manager place it where it fits...

Maybe this bug is just WONTFIX ?
Comment 19 Cosimo Cecchi 2007-07-23 23:50:33 UTC
I do not agree with WONTFIX on this. I think the program looks better and is more usable with those windows appearing centered rather than in the upper left corner. Also, without this, at least on my system, if i move the bookmark window and restart epiphany, it will always appear on the upper left corner (same way it will always appear centered with the patch, which i perfer).
Thanks!
Comment 20 Cosimo Cecchi 2007-07-24 10:00:45 UTC
Created attachment 92262 [details] [review]
fixed typo

removed an "ALWAYS" that should not be there
Comment 21 Christian Persch 2007-07-25 12:02:51 UTC
I still don't think CENTER should be saved in the state. EPHY_STATE_WINDOW_INITIALLY_CENTERED should just set the window hint, and the window manager will take care of it, won't it?
Comment 22 Cosimo Cecchi 2007-08-26 16:27:07 UTC
I can't find a suitable hint other than GDK_WINDOW_TYPE_HINT_NORMAL (that obviously does not center the window, as it is the default one) for this window, so the only solution I can think is to use gtk_window_set_position () as in my last attempt.
Comment 23 Christian Persch 2007-12-24 18:25:24 UTC
Maybe we just shouldn't save the window position at all? That way the window manager will always place it where it's convenient / where there's space available. (We should still save size and state of course.)
Comment 24 Reinout van Schouwen 2008-01-07 12:17:04 UTC
(In reply to comment #23)
> Maybe we just shouldn't save the window position at all? That way the window
> manager will always place it where it's convenient / where there's space
> available. (We should still save size and state of course.)

If that means that the wm will place the window preferably not on top of the Epiphany window, then it doesn't solve this bug. It's good when the relation browser <-> bookmarks window is as clear as possible. 

Comment 25 Jorge Kalmbach 2009-08-09 22:36:56 UTC
Created attachment 140283 [details] [review]
patch for window-commands.c

Attached a git patch, it sets the transient window of the bookmarks editor and then set his position to GTK_WIN_POS_CENTER_ON_PARENT.
Comment 26 Jorge Kalmbach 2009-08-09 22:37:52 UTC
Comment on attachment 140283 [details] [review]
patch for window-commands.c

Attached a git patch, it sets the transient window of the bookmarks editor and
then set his position to GTK_WIN_POS_CENTER_ON_PARENT.
Comment 27 Fabio Durán Verdugo 2011-08-24 03:32:36 UTC
this patch was applied?
Comment 28 Tobias Endrigkeit 2012-10-29 19:51:29 UTC
 This bug was reported against a version which is not supported any more. Developers are no longer working on this version so there will not be any bug fixes for it.
Can you please check again if the issue you reported here still happens in a recent version of GNOME and update this report by adding a comment and adjusting the 'Version' field?

Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here.

Without feedback this report will be closed as INCOMPLETE after 6 weeks.
Comment 29 Reinout van Schouwen 2012-10-29 21:57:06 UTC
In 3.4, the Bookmarks window still appears in the top left when I press Ctrl+B.
Comment 30 Michael Catanzaro 2015-04-25 15:22:23 UTC
We have way more problems with this dialog than the fact that it is uncentered, but I'm fine with centering it. The window-commands.c patch looked best to me, but it doesn't apply nowadays.