/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+
#+     Internet Radio Automation & Encoding Toolkit
#+
#+     Copyright (C) 2018, 2019, 2020, 2021, 2022 by Kevin C. O'Kane
#+
#+     Kevin C. O'Kane
#+     kc.okane@gmail.com
#+     https://www.cs.uni.edu/~okane
#+     https://threadsafebooks.com/
#+
#+ This program is free software; you can redistribute it and/or modify
#+ it under the terms of the GNU General Public License as published by
#+ the Free Software Foundation; either version 2 of the License, or
#+ (at your option) any later version.
#+
#+ This program is distributed in the hope that it will be useful,
#+ but WITHOUT ANY WARRANTY; without even the implied warranty of
#+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#+ GNU General Public License for more details.
#+
#+ You should have received a copy of the GNU General Public License
#+ along with this program; if not, write to the Free Software
#+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#+
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

//	Oct 24, 2022

#include "includes.h"
#include "common-externs.h"

#define SLASH '/'

//--------------- DELETE BUTTON CLICKED signals program rows

//--------------------------------------------------------------------------
//      on_del2_clicked  on_del3_clicked  on_del4_cicked on_del7_clicked
//      on_del8_clicked  on_del9_clicked  on_del10_clicked on_del11_clicked
//      on_del12_clicked on_del13_clicked on_del14_clicked on_del15_clicked
//--------------------------------------------------------------------------

#define ENTRY_DEL_CLICKED(NBR) \
        void on_del## NBR ##_clicked(GtkButton  *b) { \
                if (delDialog() == 200) return; \
                delRow(e## NBR ##Row); } \
        gboolean on_del## NBR ##_button_press_event \
                (GtkButton *btn, GdkEventButton *event, gpointer user_data) { \
                if (event->button == 1 ) return FALSE; \
                if (programData[e## NBR ##Row]->del)  programData[e## NBR ##Row]->del = 0; \
                else programData[e## NBR ##Row]->del = 1; \
                delRow(e## NBR ##Row); \
                printf("delete immediate %d\n", e## NBR ##Row); return TRUE; }

ENTRY_DEL_CLICKED(2)  ENTRY_DEL_CLICKED(3)  ENTRY_DEL_CLICKED(4)
ENTRY_DEL_CLICKED(7)  ENTRY_DEL_CLICKED(8)  ENTRY_DEL_CLICKED(9)
ENTRY_DEL_CLICKED(10) ENTRY_DEL_CLICKED(11) ENTRY_DEL_CLICKED(12)
ENTRY_DEL_CLICKED(13) ENTRY_DEL_CLICKED(14) ENTRY_DEL_CLICKED(15)

