Flip the toolbar of the panel as well when aligning it to the right

This commit is contained in:
Christian Dywan 2009-02-22 16:03:08 +01:00
parent 2347045245
commit 30729676db
3 changed files with 27 additions and 0 deletions

View file

@ -3975,6 +3975,8 @@ _midori_browser_update_settings (MidoriBrowser* browser)
}
g_object_unref (browser->panel);
g_object_unref (vpaned);
midori_panel_set_right_aligned (MIDORI_PANEL (browser->panel),
right_align_sidepanel);
gtk_paned_set_position (GTK_PANED (gtk_widget_get_parent (browser->panel)),
last_panel_position);
midori_panel_set_current_page (MIDORI_PANEL (browser->panel), last_panel_page);

View file

@ -322,6 +322,27 @@ midori_panel_set_compact (MidoriPanel* panel,
compact ? GTK_TOOLBAR_ICONS : GTK_TOOLBAR_BOTH);
}
/**
* midori_panel_set_right_aligned:
* @compact: %TRUE if the panel should be aligned to the right
*
* Determines if the panel should be right aligned.
*
* Since: 0.1.3
**/
void
midori_panel_set_right_aligned (MidoriPanel* panel,
gboolean right_aligned)
{
GtkWidget* box;
g_return_if_fail (MIDORI_IS_PANEL (panel));
box = gtk_widget_get_parent (panel->toolbar);
gtk_box_reorder_child (GTK_BOX (box), panel->toolbar,
right_aligned ? -1 : 0);
}
static void
midori_panel_menu_item_activate_cb (GtkWidget* widget,
MidoriPanel* panel)

View file

@ -46,6 +46,10 @@ void
midori_panel_set_compact (MidoriPanel* panel,
gboolean compact);
void
midori_panel_set_right_aligned (MidoriPanel* panel,
gboolean right_aligned);
gint
midori_panel_append_page (MidoriPanel* panel,
MidoriViewable* viewable);