gboolean remember_last_window_size;
gint last_window_width, last_window_height;
MidoriWindowState last_window_state;
- gboolean compact_sidepanel;
+ gboolean compact_sidepanel, right_align_sidepanel;
+ GtkWidget* hpaned, *vpaned;
gint last_panel_position, last_panel_page;
gboolean show_menubar, show_navigationbar, show_bookmarkbar;
gboolean show_panel, show_statusbar;
"last-window-height", &last_window_height,
"last-window-state", &last_window_state,
"compact-sidepanel", &compact_sidepanel,
+ "right-align-sidepanel", &right_align_sidepanel,
"last-panel-position", &last_panel_position,
"last-panel-page", &last_panel_page,
"show-menubar", &show_menubar,
}
midori_panel_set_compact (MIDORI_PANEL (browser->panel), compact_sidepanel);
+ hpaned = gtk_widget_get_parent (browser->panel);
+ vpaned = gtk_widget_get_parent (browser->notebook);
+ g_object_ref (browser->panel);
+ g_object_ref (vpaned);
+ gtk_container_remove (GTK_CONTAINER (hpaned), browser->panel);
+ gtk_container_remove (GTK_CONTAINER (hpaned), vpaned);
+ if (right_align_sidepanel)
+ {
+ gtk_paned_pack1 (GTK_PANED (hpaned), vpaned, FALSE, FALSE);
+ gtk_paned_pack2 (GTK_PANED (hpaned), browser->panel, FALSE, FALSE);
+ }
+ else
+ {
+ gtk_paned_pack1 (GTK_PANED (hpaned), browser->panel, FALSE, FALSE);
+ gtk_paned_pack2 (GTK_PANED (hpaned), vpaned, FALSE, FALSE);
+ }
+ g_object_unref (browser->panel);
+ g_object_unref (vpaned);
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);
gboolean progress_in_location;
gchar* toolbar_items;
gboolean compact_sidepanel;
+ gboolean right_align_sidepanel;
MidoriStartup load_on_startup;
gchar* homepage;
PROP_PROGRESS_IN_LOCATION,
PROP_TOOLBAR_ITEMS,
PROP_COMPACT_SIDEPANEL,
+ PROP_RIGHT_ALIGN_SIDEPANEL,
PROP_LOAD_ON_STARTUP,
PROP_HOMEPAGE,
FALSE,
flags));
+ /**
+ * MidoriWebSettings:right-sidepanel:
+ *
+ * Whether to align the sidepanel on the right.
+ *
+ * Since: 0.1.3
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_RIGHT_ALIGN_SIDEPANEL,
+ g_param_spec_boolean (
+ "right-align-sidepanel",
+ _("Align sidepanel on the right"),
+ _("Whether to align the sidepanel on the right"),
+ FALSE,
+ flags));
+
g_object_class_install_property (gobject_class,
PROP_LOAD_ON_STARTUP,
case PROP_COMPACT_SIDEPANEL:
web_settings->compact_sidepanel = g_value_get_boolean (value);
break;
+ case PROP_RIGHT_ALIGN_SIDEPANEL:
+ web_settings->right_align_sidepanel = g_value_get_boolean (value);
+ break;
case PROP_LOAD_ON_STARTUP:
web_settings->load_on_startup = g_value_get_enum (value);
case PROP_COMPACT_SIDEPANEL:
g_value_set_boolean (value, web_settings->compact_sidepanel);
break;
+ case PROP_RIGHT_ALIGN_SIDEPANEL:
+ g_value_set_boolean (value, web_settings->right_align_sidepanel);
+ break;
case PROP_LOAD_ON_STARTUP:
g_value_set_enum (value, web_settings->load_on_startup);