midori_view_new_with_item (KatzeItem* item,
MidoriWebSettings* settings)
{
- MidoriView* view = g_object_new (MIDORI_TYPE_VIEW, NULL);
+ MidoriView* view = g_object_new (MIDORI_TYPE_VIEW,
+ "title", item ? item->name : NULL,
+ NULL);
if (settings)
_midori_view_set_settings (view, settings);
if (item)
timer = g_timer_new ();
#endif
- katze_assign (view->uri, g_strdup (""));
+ katze_assign (view->uri, NULL);
if (speeddial_markup == NULL)
speeddial_markup = prepare_speed_dial_html (view, TRUE);
webkit_web_view_load_html_string (
WEBKIT_WEB_VIEW (view->web_view), data, view->uri);
g_free (data);
- if (strcmp (view->item->uri, view->uri))
+ if (g_strcmp0 (view->item->uri, view->uri))
katze_item_set_uri (view->item, view->uri);
g_object_notify (G_OBJECT (view), "uri");
}
_("Loading delayed either due to a recent crash or startup preferences."),
_("Load Page"),
NULL);
- if (strcmp (view->item->uri, uri))
+ if (g_strcmp0 (view->item->uri, uri))
katze_item_set_uri (view->item, uri);
g_object_notify (G_OBJECT (view), "uri");
}
else
{
katze_assign (view->uri, midori_uri_format_for_display (uri));
- if (strcmp (view->item->uri, view->uri))
+ if (g_strcmp0 (view->item->uri, view->uri))
katze_item_set_uri (view->item, view->uri);
g_object_notify (G_OBJECT (view), "uri");
webkit_web_view_open (WEBKIT_WEB_VIEW (view->web_view), uri);