Add an asterisk before the window's title if its document is edited

and the window manager is not capable of displaying the document's
status (i.e., any window manager other than Window Maker for now).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27821 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2009-02-08 23:04:34 +00:00
parent 739bdc2776
commit 31c2c90be5
2 changed files with 24 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2009-02-08 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/x11/XGServerWindow.m (-titlewindow::, -docedited::): Add
an asterisk before the window's title if its document is edited
and the window manager is not capable of displaying the document's
status (i.e., any window manager other than Window Maker for now).
2009-02-08 Matt Rice <ratmice@gmail.com>
* Source/x11/XGGLContext.m (-[XGXSubWindow initWithView:visualInfo:]):

View file

@ -2448,6 +2448,13 @@ NSLog(@"styleoffsets ... guessing offsets\n");
const char *title;
int error = XLocaleNotSupported;
if (handlesWindowDecorations && (generic.wm & XGWM_WINDOWMAKER) == 0 &&
(window->win_attrs.flags & GSExtraFlagsAttr) &&
(window->win_attrs.extra_flags & GSDocumentEditedFlag))
{
window_title = [@"*" stringByAppendingString: window_title];
}
#ifdef X_HAVE_UTF8_STRING
title = [window_title UTF8String];
error = Xutf8TextListToTextProperty(dpy, (char **)&title, 1,
@ -2510,6 +2517,16 @@ NSLog(@"styleoffsets ... guessing offsets\n");
generic.win_decor_atom, generic.win_decor_atom,
32, PropModeReplace, (unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
/*
* Reflect the document's edited status in the window's title when the
* backend does not manage the window decorations
*/
if (handlesWindowDecorations && (generic.wm & XGWM_WINDOWMAKER) == 0)
{
NSWindow *nswin = GSWindowWithNumber(win);
[self titlewindow: [nswin title] : win];
}
}
- (BOOL) appOwnsMiniwindow