Fix the Delete All dialog icon when the Cooke Manager is detached

This commit is contained in:
Enrico Tröger 2009-04-25 18:32:28 +02:00 committed by Christian Dywan
parent 7419d17fb6
commit c4037afadc

View file

@ -481,7 +481,7 @@ static void cm_delete_all_cookies_real(CMData *cmdata)
static void cm_button_delete_all_clicked_cb(GtkToolButton *button, CMData *cmdata)
{
GtkWidget *dialog;
GtkWidget *toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
MidoriBrowser *toplevel = midori_browser_get_for_widget(GTK_WIDGET(button));
const gchar *filter_text;
dialog = gtk_message_dialog_new(GTK_WINDOW(toplevel),
@ -492,6 +492,7 @@ static void cm_button_delete_all_clicked_cb(GtkToolButton *button, CMData *cmdat
gtk_window_set_title(GTK_WINDOW(dialog), _("Question"));
/* steal Midori's icon :) */
if (toplevel != NULL)
gtk_window_set_icon_name(GTK_WINDOW(dialog), gtk_window_get_icon_name(GTK_WINDOW(toplevel)));
filter_text = gtk_entry_get_text(GTK_ENTRY(cmdata->filter_entry));