static gboolean drop_internal_icon (PanelWidget *panel, int pos, const char *icon_name, int action) { Launcher *old_launcher = NULL; if (!icon_name) return FALSE; if (!panel_profile_id_lists_are_writable ()) return FALSE; if (action == GDK_ACTION_MOVE) old_launcher = find_launcher (icon_name); if (!panel_launcher_create_copy (panel->toplevel, pos, icon_name)) return FALSE; if (old_launcher && old_launcher->button) { if (old_launcher->prop_dialog) { g_signal_handler_disconnect (old_launcher->button, old_launcher->destroy_handler); launcher_properties_destroy (old_launcher); } panel_profile_delete_object (old_launcher->info); } return TRUE; }
static void destroy_launcher (GtkWidget *widget, Launcher *launcher) { launcher_properties_destroy (launcher); launcher_widget_destroy_open_dialogs (launcher); }
static gboolean drop_internal_icon (PanelWidget *panel, PanelObjectPackType pack_type, int pack_index, const char *icon_name, int action) { Launcher *old_launcher = NULL; if (!icon_name) return FALSE; if (!panel_layout_is_writable ()) return FALSE; if (action == GDK_ACTION_MOVE) old_launcher = find_launcher (icon_name); if (!panel_launcher_create_copy (panel->toplevel, pack_type, pack_index, icon_name)) return FALSE; if (old_launcher && old_launcher->button) { const char *object_id; if (old_launcher->prop_dialog) { g_signal_handler_disconnect (old_launcher->button, old_launcher->destroy_handler); launcher_properties_destroy (old_launcher); } object_id = panel_applet_get_id (old_launcher->info); panel_layout_delete_object (object_id); } return TRUE; }