This is more in line with 'dont-write-history' and 'delay'.
session = midori_browser_get_proxy_array (browser);
KATZE_ARRAY_FOREACH_ITEM (item, _session)
{
- g_object_set_data (G_OBJECT (item), "midori-view-append", (void*)1);
+ katze_item_set_meta_integer (item, "append", 1);
katze_item_set_meta_integer (item, "dont-write-history", 1);
if (load_on_startup == MIDORI_STARTUP_DELAYED_PAGES
&& katze_item_get_meta_integer (item, "delay") == -1)
midori_browser_tab_leave_notify_event_cb, browser,
NULL);
- if (!g_object_get_data (G_OBJECT (view), "midori-view-append") &&
+ if (!katze_item_get_meta_boolean (item, "append") &&
katze_object_get_boolean (browser->settings, "open-tabs-next-to-current"))
{
n = gtk_notebook_get_current_page (notebook) + 1;
n = -1;
gtk_notebook_insert_page (notebook, view, tab_label, n);
katze_array_move_item (browser->proxy_array, item, n);
+ katze_item_set_meta_integer (item, "append", 0);
gtk_notebook_set_tab_reorderable (notebook, view, TRUE);
gtk_notebook_set_tab_detachable (notebook, view, TRUE);
g_return_val_if_fail (KATZE_IS_ITEM (item), -1);
uri = katze_item_get_uri (item);
- view = midori_view_new_with_item (item, browser->settings,
- g_object_get_data (G_OBJECT (item), "midori-view-append") ? TRUE : FALSE);
+ view = midori_view_new_with_item (item, browser->settings);
page = midori_browser_add_tab (browser, view);
midori_view_set_uri (MIDORI_VIEW (view), uri);
return page;
{
KatzeItem* item = katze_item_new ();
item->name = g_strdup (title);
- return midori_view_new_with_item (item, settings, append);
+ if (append)
+ katze_item_set_meta_integer (item, "append", 1);
+ return midori_view_new_with_item (item, settings);
}
/**
* midori_view_new_with_item:
* @item: a #KatzeItem, or %NULL
* @settings: a #MidoriWebSettings, or %NULL
- * @append: if %TRUE, the view should be appended
*
* Creates a new view from an item that is visible by default.
*
**/
GtkWidget*
midori_view_new_with_item (KatzeItem* item,
- MidoriWebSettings* settings,
- gboolean append)
+ MidoriWebSettings* settings)
{
MidoriView* view = g_object_new (MIDORI_TYPE_VIEW, NULL);
if (settings)
_midori_view_set_settings (view, settings);
- if (append)
- g_object_set_data (G_OBJECT (view), "midori-view-append", (void*)1);
if (item)
katze_object_assign (view->item, katze_item_copy (item));
gtk_widget_show ((GtkWidget*)view);
GtkWidget*
midori_view_new_with_item (KatzeItem* item,
- MidoriWebSettings* settings,
- gboolean append);
+ MidoriWebSettings* settings);
void
midori_view_set_settings (MidoriView* view,