Fix browser properties along with enabling the property test
This commit is contained in:
parent
ca8d22b9b4
commit
ba9d7d48e5
2 changed files with 22 additions and 8 deletions
|
@ -551,7 +551,7 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
|
||||||
view = midori_browser_get_current_tab (browser);
|
view = midori_browser_get_current_tab (browser);
|
||||||
if (is_folder)
|
if (is_folder)
|
||||||
{
|
{
|
||||||
bookmark = katze_array_new (KATZE_TYPE_ARRAY);
|
bookmark = (KatzeItem*)katze_array_new (KATZE_TYPE_ARRAY);
|
||||||
katze_item_set_name (bookmark,
|
katze_item_set_name (bookmark,
|
||||||
midori_view_get_display_title (MIDORI_VIEW (view)));
|
midori_view_get_display_title (MIDORI_VIEW (view)));
|
||||||
}
|
}
|
||||||
|
@ -1161,7 +1161,7 @@ midori_browser_class_init (MidoriBrowserClass* class)
|
||||||
"uri",
|
"uri",
|
||||||
"URI",
|
"URI",
|
||||||
"The current URI",
|
"The current URI",
|
||||||
"about:blank",
|
"",
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
|
@ -4191,6 +4191,16 @@ midori_browser_get_property (GObject* object,
|
||||||
case PROP_TAB:
|
case PROP_TAB:
|
||||||
g_value_set_object (value, midori_browser_get_current_tab (browser));
|
g_value_set_object (value, midori_browser_get_current_tab (browser));
|
||||||
break;
|
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:
|
case PROP_STATUSBAR:
|
||||||
g_value_set_object (value, browser->statusbar);
|
g_value_set_object (value, browser->statusbar);
|
||||||
break;
|
break;
|
||||||
|
@ -4372,8 +4382,10 @@ midori_browser_set_current_uri (MidoriBrowser* browser,
|
||||||
g_return_if_fail (MIDORI_IS_BROWSER (browser));
|
g_return_if_fail (MIDORI_IS_BROWSER (browser));
|
||||||
g_return_if_fail (uri != NULL);
|
g_return_if_fail (uri != NULL);
|
||||||
|
|
||||||
view = midori_browser_get_current_tab (browser);
|
if ((view = midori_browser_get_current_tab (browser)))
|
||||||
midori_view_set_uri (MIDORI_VIEW (view), uri);
|
midori_view_set_uri (MIDORI_VIEW (view), uri);
|
||||||
|
else
|
||||||
|
midori_browser_add_uri (browser, uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4393,8 +4405,9 @@ midori_browser_get_current_uri (MidoriBrowser* browser)
|
||||||
|
|
||||||
g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL);
|
g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL);
|
||||||
|
|
||||||
view = midori_browser_get_current_tab (browser);
|
if ((view = midori_browser_get_current_tab (browser)))
|
||||||
return midori_view_get_display_uri (MIDORI_VIEW (view));
|
return midori_view_get_display_uri (MIDORI_VIEW (view));
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -131,11 +131,12 @@ main (int argc,
|
||||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
gtk_init_check (&argc, &argv);
|
gtk_init_check (&argc, &argv);
|
||||||
|
sokoke_register_stock_items ();
|
||||||
|
|
||||||
g_test_add_data_func ("/properties/app",
|
g_test_add_data_func ("/properties/app",
|
||||||
(gconstpointer)MIDORI_TYPE_APP, properties_type_test);
|
(gconstpointer)MIDORI_TYPE_APP, properties_type_test);
|
||||||
/* g_test_add_data_func ("/properties/browser",
|
g_test_add_data_func ("/properties/browser",
|
||||||
(gconstpointer)MIDORI_TYPE_BROWSER, properties_type_test); */
|
(gconstpointer)MIDORI_TYPE_BROWSER, properties_type_test);
|
||||||
g_test_add_data_func ("/properties/extension",
|
g_test_add_data_func ("/properties/extension",
|
||||||
(gconstpointer)MIDORI_TYPE_EXTENSION, properties_type_test);
|
(gconstpointer)MIDORI_TYPE_EXTENSION, properties_type_test);
|
||||||
g_test_add_data_func ("/properties/location-action",
|
g_test_add_data_func ("/properties/location-action",
|
||||||
|
|
Loading…
Reference in a new issue