From 224f26b84d9c12b0dd1d337f51c14b6ebb901007 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 4 Sep 2011 09:48:24 -0400 Subject: GtkApplication has some new EShell-like features. I pushed a few EShell features up to GtkApplication for GTK+ 3.2, so we can now trim off the redundancies in EShell. 1) GtkApplication has a new "window-added" signal which replaces EShell's own "window-created" signal. 2) GtkApplication has a new "window-removed" signal which replaces EShell's own "window-destroyed" signal. 3) gtk_application_get_windows() now returns a list of windows sorted by most recently focused, replacing e_shell_get_watched_windows(). 4) GtkApplication now provides enough hooks to subclasses that we can remove e_shell_watch_window() and call gtk_application_add_window() directly. --- calendar/gui/dialogs/comp-editor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 9c463c66dc..0375e546e6 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2195,7 +2195,8 @@ comp_editor_init (CompEditor *editor) comp_editor_bind_gconf (editor); - e_shell_watch_window (shell, GTK_WINDOW (editor)); + gtk_application_add_window ( + GTK_APPLICATION (shell), GTK_WINDOW (editor)); e_shell_adapt_window_size (shell, GTK_WINDOW (editor)); } -- cgit v1.2.3 From 0e064de971dd8b5e565558cd14efdca8ae4dbcb0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 4 Sep 2011 11:45:25 -0400 Subject: EAttachmentPaned: Add "resize-toplevel" property. Similiar to the new GtkExpander:resize-toplevel property in GTK+ 3.2, but adapted to the fact that EAttachmentPaned's expander has no direct child widget, and instead acts on the child widget in the lower pane. CompEditor now uses this to fix the weird vertical resizing behavior when its attachment bar is expanded and then collapsed again. --- calendar/gui/dialogs/comp-editor.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 0375e546e6..4fa0250838 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2112,17 +2112,14 @@ comp_editor_init (CompEditor *editor) GTK_STYLE_CLASS_PRIMARY_TOOLBAR); widget = e_attachment_paned_new (); + e_attachment_paned_set_resize_toplevel ( + E_ATTACHMENT_PANED (widget), TRUE); gtk_container_set_border_width (GTK_CONTAINER (widget), 6); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); priv->attachment_view = g_object_ref (widget); gtk_widget_show (widget); if (express_mode) { - e_attachment_paned_set_expanded ( - E_ATTACHMENT_PANED (widget), TRUE); - e_attachment_paned_set_expanded ( - E_ATTACHMENT_PANED (widget), FALSE); - widget = e_attachment_paned_get_view_combo ( E_ATTACHMENT_PANED (widget)); gtk_widget_hide (widget); -- cgit v1.2.3