#4130 remember paned grabber positions
This commit is contained in:
parent
fb54fb1847
commit
98f3ef7e00
3 changed files with 33 additions and 3 deletions
|
|
@ -33,6 +33,8 @@ public class MainWindow : Gtk.Window {
|
|||
private int window_width;
|
||||
private int window_height;
|
||||
private bool window_maximized;
|
||||
private Gtk.HPaned folder_paned = new Gtk.HPaned();
|
||||
private Gtk.HPaned messages_paned = new Gtk.HPaned();
|
||||
|
||||
public MainWindow() {
|
||||
title = GearyApplication.NAME;
|
||||
|
|
@ -107,6 +109,9 @@ public class MainWindow : Gtk.Window {
|
|||
if (GearyApplication.instance.config.window_maximize)
|
||||
maximize();
|
||||
|
||||
folder_paned.set_position(GearyApplication.instance.config.folder_list_pane_position);
|
||||
messages_paned.set_position(GearyApplication.instance.config.messages_pane_position);
|
||||
|
||||
base.show_all();
|
||||
}
|
||||
|
||||
|
|
@ -116,6 +121,10 @@ public class MainWindow : Gtk.Window {
|
|||
GearyApplication.instance.config.window_height = window_height;
|
||||
GearyApplication.instance.config.window_maximize = window_maximized;
|
||||
|
||||
// Save pane positions.
|
||||
GearyApplication.instance.config.folder_list_pane_position = folder_paned.get_position();
|
||||
GearyApplication.instance.config.messages_pane_position = messages_paned.get_position();
|
||||
|
||||
GearyApplication.instance.exit();
|
||||
|
||||
base.destroy();
|
||||
|
|
@ -166,9 +175,6 @@ public class MainWindow : Gtk.Window {
|
|||
// main menu
|
||||
main_layout.pack_start(ui.get_widget("/MenuBar"), false, false, 0);
|
||||
|
||||
Gtk.HPaned folder_paned = new Gtk.HPaned();
|
||||
Gtk.HPaned messages_paned = new Gtk.HPaned();
|
||||
|
||||
// folder list
|
||||
Gtk.ScrolledWindow folder_list_scrolled = new Gtk.ScrolledWindow(null, null);
|
||||
folder_list_scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue