static void
midori_bookmarks_folder_clicked_cb (GtkWidget* toolitem)
{
- GtkWidget* browser = gtk_widget_get_toplevel (toolitem);
+ MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (toolitem));
/* FIXME: Take selected folder into account */
- midori_browser_edit_bookmark_dialog_new (MIDORI_BROWSER (browser),
+ midori_browser_edit_bookmark_dialog_new (browser,
NULL, TRUE, TRUE);
}
uri = katze_item_get_uri (item);
if (uri && *uri)
{
- GtkWidget* browser;
-
- browser = gtk_widget_get_toplevel (GTK_WIDGET (bookmarks));
- midori_browser_set_current_uri (MIDORI_BROWSER (browser), uri);
+ MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (bookmarks));
+ midori_browser_set_current_uri (browser, uri);
}
g_object_unref (item);
if (uri && *uri)
{
- GtkWidget* browser = gtk_widget_get_toplevel (GTK_WIDGET (bookmarks));
- midori_browser_set_current_uri (MIDORI_BROWSER (browser), uri);
+ MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (bookmarks));
+ midori_browser_set_current_uri (browser, uri);
}
}
if (uri && *uri)
{
- GtkWidget* browser = gtk_widget_get_toplevel (GTK_WIDGET (bookmarks));
+ MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (bookmarks));
g_signal_emit_by_name (browser, "new-window", uri);
}
}
if (!is_separator)
{
- GtkWidget* browser = gtk_widget_get_toplevel (GTK_WIDGET (bookmarks));
- midori_browser_edit_bookmark_dialog_new (MIDORI_BROWSER (browser), item, FALSE, FALSE);
+ MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (bookmarks));
+ midori_browser_edit_bookmark_dialog_new (browser, item, FALSE, FALSE);
}
}