view = midori_browser_get_current_tab (browser);
if (is_folder)
{
- bookmark = katze_array_new (KATZE_TYPE_ARRAY);
+ bookmark = (KatzeItem*)katze_array_new (KATZE_TYPE_ARRAY);
katze_item_set_name (bookmark,
midori_view_get_display_title (MIDORI_VIEW (view)));
}
"uri",
"URI",
"The current URI",
- "about:blank",
+ "",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
case PROP_TAB:
g_value_set_object (value, midori_browser_get_current_tab (browser));
break;
+ case PROP_LOAD_STATUS:
+ {
+ GtkWidget* view = midori_browser_get_current_tab (browser);
+ if (view)
+ g_value_set_enum (value,
+ midori_view_get_load_status (MIDORI_VIEW (view)));
+ else
+ g_value_set_enum (value, MIDORI_LOAD_FINISHED);
+ break;
+ }
case PROP_STATUSBAR:
g_value_set_object (value, browser->statusbar);
break;
g_return_if_fail (MIDORI_IS_BROWSER (browser));
g_return_if_fail (uri != NULL);
- view = midori_browser_get_current_tab (browser);
- midori_view_set_uri (MIDORI_VIEW (view), uri);
+ if ((view = midori_browser_get_current_tab (browser)))
+ midori_view_set_uri (MIDORI_VIEW (view), uri);
+ else
+ midori_browser_add_uri (browser, uri);
}
/**
g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL);
- view = midori_browser_get_current_tab (browser);
- return midori_view_get_display_uri (MIDORI_VIEW (view));
+ if ((view = midori_browser_get_current_tab (browser)))
+ return midori_view_get_display_uri (MIDORI_VIEW (view));
+ return NULL;
}
/**
if (!g_thread_supported ()) g_thread_init (NULL);
g_test_init (&argc, &argv, NULL);
gtk_init_check (&argc, &argv);
+ sokoke_register_stock_items ();
g_test_add_data_func ("/properties/app",
(gconstpointer)MIDORI_TYPE_APP, properties_type_test);
- /* g_test_add_data_func ("/properties/browser",
- (gconstpointer)MIDORI_TYPE_BROWSER, properties_type_test); */
+ g_test_add_data_func ("/properties/browser",
+ (gconstpointer)MIDORI_TYPE_BROWSER, properties_type_test);
g_test_add_data_func ("/properties/extension",
(gconstpointer)MIDORI_TYPE_EXTENSION, properties_type_test);
g_test_add_data_func ("/properties/location-action",