freeze breakage request (gedit)



Hi,

	I'd like to request permission to apply the last patch attached to bug
http://bugzilla.gnome.org/show_bug.cgi?id=104011

As you can see by the bug number this is a long standing issues in
gedit, but has become critical only recently due to a change of
behaviour in metacity (or somewhere else). I dunno if the change of
behavior in metacity was intentional or a bug in itself, but gedit has
to be fixed anyway.

To sum things up, the issue is the following:
- open a document in gedit on workspace 1
- switch to workspace 2
- double click on a text file

Current very confusing result:
- the file is opened in the other workspace and the user is left
wondering why the file didn't open, since he doesn't see any gedit
window come up. This is very bad and can also lead to data loss, for
instance if the user gets tired, opens the file in another editor and
modifies it, then changes workspace and saves the file which was also
opened in gedit thus overwriting the modifications made with the other
editor.

Old buggy but non critical behavior:
- The active gedit window was moved from workspace 1 to the current
workspace and then the file was opened.

Proper behavior implemented with the patch:
- gedit checks if there is a window already opened in the current
workspace: if it finds one, it opens the document in it otherwise it
creates a new window.


The patch isn't small, but it's fairly straightforward, it does the
following things:
- adds two utility functions (get_current_workspace and
get_window_workspace): these are cut&pasted from galeon so are well
tested and reliable
- when launching a new instance we simply walk the list of the gedit
windows and see if we find one in the current workspace, if we don't
find one a new window is created.


I tested this patch on my system in various cases (including sticky
windows etc) and it seems to work well.


ciao
	Paolo




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]