diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2010-02-17 18:53:10 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2010-02-17 18:53:10 +0100 |
| commit | 2ef485ec4f51c9fe7fb9fa99511db3960812cfd0 (patch) | |
| tree | 802ff1ce8c1cfbb7f42a3c46873c6f0b948b0835 /UViewer.pas | |
| parent | d338f1f0c1a72665396d95bfe303ed408a3f10b9 (diff) | |
| download | tuxcmd-2ef485ec4f51c9fe7fb9fa99511db3960812cfd0.tar.xz | |
Move viewer windows to separate window groups
Each viewer window now belongs to its own window group so
they can't influence each other. Works nicely when opened
from Search dialog too. Finally, no need to make separate
viewer app.
Diffstat (limited to 'UViewer.pas')
| -rw-r--r-- | UViewer.pas | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/UViewer.pas b/UViewer.pas index a80a434..6e5fe85 100644 --- a/UViewer.pas +++ b/UViewer.pas @@ -42,6 +42,7 @@ type private // LineHeight, NumLines: integer; LineBuffer: TStringList; + window_group: PGtkWindowGroup; procedure ApplyFont; protected AThread: TThread; @@ -76,6 +77,8 @@ function scroll_event_callback(widget: PGtkWidget; event: PGdkEventScroll; user_ procedure TFViewer.FormCreate(Sender: TObject); begin + window_group := gtk_window_group_new(); + gtk_window_group_add_window(window_group, PGtkWindow(FWidget)); SetDefaultSize(700, 500); Caption := 'TuxView'; BorderWidth := 5; @@ -140,6 +143,7 @@ procedure TFViewer.FormDestroy(Sender: TObject); begin try LineBuffer.Free; + g_object_unref(window_group); except end; end; |
