[Boxp-cvs] boxp/cli_extend main.cpp,1.8,1.9 main.h,1.2,1.3 serverlist.cpp,1.8,1.9
Status: Beta
Brought to you by:
j_aroche
From: Javier A. \(RA\) <j_a...@us...> - 2005-10-15 18:04:04
|
Update of /cvsroot/boxp/boxp/cli_extend In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15176/cli_extend Modified Files: main.cpp main.h serverlist.cpp Log Message: [NEW] Delete confirmation messages in Server List. Index: main.cpp =================================================================== RCS file: /cvsroot/boxp/boxp/cli_extend/main.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- main.cpp 15 Sep 2005 19:45:29 -0000 1.8 +++ main.cpp 15 Oct 2005 18:03:56 -0000 1.9 @@ -62,6 +62,7 @@ "Server Address can't be NULL!\0" "The category name can't be NULL.\0" +"Are you sure you want to delete this category?\0" "Cli_extend: Error\0" "Add/Edit Category\0" @@ -91,7 +92,8 @@ { if ( gs->nSize!=sizeof(GS) ) return false; - if ( gs->cli==NULL ) return false; + if ( gs->cli==NULL || gs->cli->nSize!=sizeof(CLI) ) + return false; #ifdef _DEBUG if (gs->Log) gs->Log->AddStr(gs, " >CliExtend: Init Plug. (C) 2004-05 Javier Aroche\r\n"); Index: main.h =================================================================== RCS file: /cvsroot/boxp/boxp/cli_extend/main.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- main.h 15 Sep 2005 19:45:29 -0000 1.2 +++ main.h 15 Oct 2005 18:03:57 -0000 1.3 @@ -44,7 +44,8 @@ char *sErrNullcatname; // Error msg: category name can't be NULL. char *sErrNulladdress; // Error msg: address can't be NULL. - char *sErrTitle; + char *sErrDelCat; // Error msg: Are you sure you want to delete this category? + char *sErrTitle; // Error title for msgs boxes char *sACtitulo; // Titulo: Add Category char *sACscatname; // Msg: Category name Index: serverlist.cpp =================================================================== RCS file: /cvsroot/boxp/boxp/cli_extend/serverlist.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- serverlist.cpp 24 Sep 2005 18:47:18 -0000 1.8 +++ serverlist.cpp 15 Oct 2005 18:03:57 -0000 1.9 @@ -67,6 +67,7 @@ // // > v0.94 24-Sep-05 * Fix: Removed call to free(ctx,gs) when Destroys the ServerList window. // UninstallServerList function does the same call. +// 11-Oct-05 * New: Delete confirmation messages in Server List. // --------------------------------------------------- #include "main.h" @@ -1378,11 +1379,18 @@ // Obtener la informacion del servidor. // Get server info. SERVER_INFO *nfo = (SERVER_INFO *) Itm.lParam; - if ( nfo==NULL || ((SRVCAT *)Itm.lParam)->c==1 ) { + if ( nfo==NULL || ((SRVCAT *)Itm.lParam)->c==1 ) { // no server item cli->pSetStatusText( ggs, cli->str.sStatusReady ); return TRUE; } + // preguntar para quitar? + // ask to remove? + if ( fct->ProfileReadInt(ggs,NULL,cli->str.sINIDeleteConfirm,1)==1 ) { + if (api->pMessageBox(hDlg,cli->str.sSLmsgDelSrv,cli->str.sAppName,MB_ICONQUESTION|MB_YESNO)==IDNO) + return TRUE; + } + // Tiene un ServerDlg? // Have a ServerDlg? if ( nfo->ctx!=NULL ) @@ -1605,6 +1613,13 @@ TreeView_GetItem( ctx->hList, &Itm ); if ( Itm.iImage==3 ) { + // preguntar para quitar? + // ask to remove? + if ( fct->ProfileReadInt(ggs,NULL,cli->str.sINIDeleteConfirm,1)==1 ) { + if (api->pMessageBox(hDlg,str->sErrDelCat,ggs->cli->str.sSLCaption,MB_ICONQUESTION|MB_YESNO)==IDNO) + return TRUE; + } + api->pSendMessage( hDlg, WM_DELCATEGORY, Itm.lParam, 0 ); cli->bSave = true; cli->pSetStatusText( ggs, str->sSBcatdel ); |