static void panel_query_deletion (PanelToplevel *toplevel) { GtkWidget *dialog; dialog = g_object_get_data (G_OBJECT (toplevel), "panel-delete-dialog"); if (dialog) { gtk_window_present (GTK_WINDOW (dialog)); return; } dialog = panel_deletion_dialog (toplevel); g_signal_connect (dialog, "response", G_CALLBACK (panel_deletion_response), toplevel); g_signal_connect_object (toplevel, "destroy", G_CALLBACK (gtk_widget_destroy), dialog, G_CONNECT_SWAPPED); gtk_widget_show_all (dialog); }
void drawer_query_deletion (Drawer *drawer) { GtkWidget *dialog; if (drawer->toplevel) { PanelWidget *panel_widget; panel_widget = panel_toplevel_get_panel_widget (drawer->toplevel); if (!panel_global_config_get_confirm_panel_remove () || !g_list_length (panel_widget->applet_list)) { panel_profile_delete_object (drawer->info); return; } dialog = panel_deletion_dialog (drawer->toplevel); g_signal_connect (dialog, "response", G_CALLBACK (drawer_deletion_response), drawer); g_signal_connect_object (drawer->toplevel, "destroy", G_CALLBACK (gtk_widget_destroy), dialog, G_CONNECT_SWAPPED); gtk_widget_show_all (dialog); } }