mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qwaq] Set the window title to the file name
This commit is contained in:
parent
0d8815f274
commit
1c3e503ad2
3 changed files with 11 additions and 1 deletions
|
@ -52,6 +52,7 @@
|
|||
file_proxy = [[ProxyView alloc] initWithView: current_file];
|
||||
//FIXME id<View>?
|
||||
[source_window insertSelected: (View *) file_proxy];
|
||||
[source_window setTitle: [current_file filename]];
|
||||
[source_window redraw];
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
@class Group;
|
||||
@class Button;
|
||||
@class TitleBar;
|
||||
|
||||
#include "qwaq-draw.h"
|
||||
#include "qwaq-rect.h"
|
||||
|
@ -25,8 +26,10 @@
|
|||
Button *bottomLeftDrag;
|
||||
Button *bottomRightDrag;
|
||||
Button *bottomDrag;
|
||||
TitleBar *titleBar;
|
||||
}
|
||||
+windowWithRect: (Rect) rect;
|
||||
-setTitle:(string) title;
|
||||
-setBackground: (int) ch;
|
||||
-insert: (View *) view;
|
||||
-insertDrawn: (View *) view;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
objects = [[Group alloc] initWithContext: textContext owner: self];
|
||||
|
||||
[self insert: [[TitleBar alloc] initWithTitle:"drag me"]];
|
||||
[self insert: titleBar = [[TitleBar alloc] initWithTitle:""]];
|
||||
|
||||
topDrag = [[Button alloc] initWithRect: {{2, 0},
|
||||
{xlen - 4, 1}}];
|
||||
|
@ -74,6 +74,12 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
-setTitle:(string) title
|
||||
{
|
||||
[titleBar setTitle:title];
|
||||
return self;
|
||||
}
|
||||
|
||||
#ifndef max
|
||||
# define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue