From 09f0940bac7e8231647aee56db5b32cdd776ceba Mon Sep 17 00:00:00 2001 From: Przemek Sitek Date: Sun, 31 May 2009 00:22:23 +0200 Subject: [PATCH] Actually flip the position of the panel knob when changing alignment --- midori/midori-browser.c | 3 +++ midori/midori-panel.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 43ac2463..d6963589 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3716,6 +3716,8 @@ midori_panel_notify_right_aligned_cb (MidoriPanel* panel, gboolean right_aligned = katze_object_get_boolean (panel, "right-aligned"); GtkWidget* hpaned = gtk_widget_get_parent (browser->panel); GtkWidget* vpaned = gtk_widget_get_parent (browser->notebook); + gint paned_position = gtk_paned_get_position (GTK_PANED (hpaned)); + gint paned_size = hpaned->allocation.width; if (browser->settings) g_object_set (browser->settings, "right-align-sidepanel", @@ -3735,6 +3737,7 @@ midori_panel_notify_right_aligned_cb (MidoriPanel* panel, gtk_paned_pack1 (GTK_PANED (hpaned), browser->panel, FALSE, FALSE); gtk_paned_pack2 (GTK_PANED (hpaned), vpaned, FALSE, FALSE); } + gtk_paned_set_position (GTK_PANED (hpaned), paned_size - paned_position); g_object_unref (browser->panel); g_object_unref (vpaned); } diff --git a/midori/midori-panel.c b/midori/midori-panel.c index 5e19a327..99775094 100644 --- a/midori/midori-panel.c +++ b/midori/midori-panel.c @@ -488,7 +488,7 @@ midori_panel_set_compact (MidoriPanel* panel, /** * midori_panel_set_right_aligned: - * @compact: %TRUE if the panel should be aligned to the right + * @right_aligned: %TRUE if the panel should be aligned to the right * * Determines if the panel should be right aligned. *