]> spindle.queued.net Git - midori/commitdiff
Actually flip the position of the panel knob when changing alignment
authorPrzemek Sitek <el.pescado@gazeta.pl>
Sat, 30 May 2009 22:22:23 +0000 (00:22 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 30 May 2009 22:22:23 +0000 (00:22 +0200)
midori/midori-browser.c
midori/midori-panel.c

index 43ac2463a7c4e4d80a184e9ae72ddb8c84ece29c..d69635891ac88c3280548658da0e637a97e32ac5 100644 (file)
@@ -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);
 }
index 5e19a32762e75ddb2155780558e7912bdd62f620..997750946bd0819d435a6057d1800ea5772df48c 100644 (file)
@@ -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.
  *