Findbar should honor close-buttons-left value
This commit is contained in:
parent
edb01a11f6
commit
eda8ac68f9
3 changed files with 23 additions and 4 deletions
|
@ -6503,6 +6503,9 @@ _midori_browser_update_settings (MidoriBrowser* browser)
|
||||||
"news-aggregator", &browser->news_aggregator,
|
"news-aggregator", &browser->news_aggregator,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
midori_findbar_set_close_button_left (MIDORI_FINDBAR (browser->find),
|
||||||
|
katze_object_get_boolean (browser->settings, "close-buttons-left"));
|
||||||
|
|
||||||
if (remember_last_window_size)
|
if (remember_last_window_size)
|
||||||
{
|
{
|
||||||
if (browser->last_window_width && browser->last_window_height)
|
if (browser->last_window_width && browser->last_window_height)
|
||||||
|
@ -6627,6 +6630,11 @@ midori_browser_settings_notify (MidoriWebSettings* web_settings,
|
||||||
{
|
{
|
||||||
katze_assign (browser->news_aggregator, g_value_dup_string (&value));
|
katze_assign (browser->news_aggregator, g_value_dup_string (&value));
|
||||||
}
|
}
|
||||||
|
else if (name == g_intern_string ("close-buttons-left"))
|
||||||
|
{
|
||||||
|
midori_findbar_set_close_button_left (MIDORI_FINDBAR (browser->find),
|
||||||
|
g_value_get_boolean (&value));
|
||||||
|
}
|
||||||
else if (!g_object_class_find_property (G_OBJECT_GET_CLASS (web_settings),
|
else if (!g_object_class_find_property (G_OBJECT_GET_CLASS (web_settings),
|
||||||
name))
|
name))
|
||||||
g_warning (_("Unexpected setting '%s'"), name);
|
g_warning (_("Unexpected setting '%s'"), name);
|
||||||
|
|
|
@ -324,11 +324,7 @@ midori_findbar_init (MidoriFindbar* findbar)
|
||||||
_("Close Findbar"));
|
_("Close Findbar"));
|
||||||
g_signal_connect (findbar->find_close, "clicked",
|
g_signal_connect (findbar->find_close, "clicked",
|
||||||
G_CALLBACK (midori_findbar_button_close_clicked_cb), findbar);
|
G_CALLBACK (midori_findbar_button_close_clicked_cb), findbar);
|
||||||
#if HAVE_OSX
|
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (findbar), findbar->find_close, 0);
|
|
||||||
#else
|
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (findbar), findbar->find_close, -1);
|
gtk_toolbar_insert (GTK_TOOLBAR (findbar), findbar->find_close, -1);
|
||||||
#endif
|
|
||||||
sokoke_container_show_children (GTK_CONTAINER (findbar));
|
sokoke_container_show_children (GTK_CONTAINER (findbar));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,4 +378,15 @@ midori_findbar_search_text (MidoriFindbar* findbar,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
midori_findbar_set_close_button_left (MidoriFindbar* findbar,
|
||||||
|
gboolean close_button_left)
|
||||||
|
{
|
||||||
|
g_object_ref (findbar->find_close);
|
||||||
|
gtk_container_remove (GTK_CONTAINER (findbar),
|
||||||
|
GTK_WIDGET (findbar->find_close));
|
||||||
|
gtk_toolbar_insert (GTK_TOOLBAR (findbar), findbar->find_close,
|
||||||
|
close_button_left ? 0 : -1);
|
||||||
|
g_object_unref (findbar->find_close);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,10 @@ midori_findbar_search_text (MidoriFindbar* findbar,
|
||||||
gboolean found,
|
gboolean found,
|
||||||
gchar* typing);
|
gchar* typing);
|
||||||
|
|
||||||
|
void
|
||||||
|
midori_findbar_set_close_button_left (MidoriFindbar* findbar,
|
||||||
|
gboolean close_button_left);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __MIDORI_FINDBAR_H__ */
|
#endif /* __MIDORI_FINDBAR_H__ */
|
||||||
|
|
Loading…
Reference in a new issue