midori_browser_save_uri (browser, MIDORI_VIEW (view), uri);
}
+static void
+midori_browser_speed_dial_refresh_cb (MidoriSpeedDial* dial,
+ MidoriBrowser* browser)
+{
+ GList* tabs = midori_browser_get_tabs (browser);
+ for (; tabs != NULL; tabs = g_list_next (tabs))
+ if (midori_view_is_blank (tabs->data))
+ midori_view_reload (tabs->data, FALSE);
+ g_list_free (tabs);
+}
+
static void
midori_browser_add_speed_dial (MidoriBrowser* browser)
{
#endif
midori_findbar_set_close_button_left (MIDORI_FINDBAR (browser->find),
katze_object_get_boolean (browser->settings, "close-buttons-left"));
+ if (browser->dial != NULL)
+ midori_speed_dial_set_close_buttons_left (browser->dial,
+ katze_object_get_boolean (browser->settings, "close-buttons-left"));
if (remember_last_window_size)
{
{
midori_findbar_set_close_button_left (MIDORI_FINDBAR (browser->find),
g_value_get_boolean (&value));
+ midori_speed_dial_set_close_buttons_left (browser->dial,
+ katze_object_get_boolean (browser->settings, "close-buttons-left"));
}
else if (!g_object_class_find_property (G_OBJECT_GET_CLASS (web_settings),
name))
break;
case PROP_SPEED_DIAL:
browser->dial = g_value_get_pointer (value);
+ g_signal_connect (browser->dial, "refresh",
+ G_CALLBACK (midori_browser_speed_dial_refresh_cb), browser);
break;
case PROP_SHOW_TABS:
browser->show_tabs = g_value_get_boolean (value);
namespace Midori {
public class SpeedDial : GLib.Object {
string filename;
- public GLib.KeyFile keyfile;
string? html = null;
List<Spec> thumb_queue = null;
WebKit.WebView thumb_view = null;
Spec? spec = null;
+ public GLib.KeyFile keyfile;
+ public bool close_buttons_left { get; set; default = false; }
+ public signal void refresh ();
+
public class Spec {
public string dial_id;
public string uri;
return Path.build_filename (Paths.get_cache_dir (), "thumbnails", thumbnail);
}
- public unowned string get_html (bool close_buttons_left, GLib.Object view) throws Error {
+ public unowned string get_html () throws Error {
bool load_missing = true;
if (html != null)
catch (Error error) {
critical ("Failed to update speed dial: %s", error.message);
}
- /* FIXME Refresh all open views */
+ refresh ();
}
void load_status (GLib.Object thumb_view_, ParamSpec pspec) {
katze_item_set_meta_string (view->item, "mime-type", NULL);
katze_item_set_meta_integer (view->item, "delay", -1);
- html = midori_speed_dial_get_html (dial,
- katze_object_get_boolean (view->settings, "close-buttons-left"),
- G_OBJECT (view), NULL);
+ html = midori_speed_dial_get_html (dial, NULL);
midori_view_load_alternate_string (view, html, "about:blank", NULL);
#ifdef G_ENABLE_DEBUG