Previous 15994 Revisions Next

r8079 Tuesday 18th May, 2010 at 23:49:26 UTC by Firewave
[WINUI] Removed duplicated check
[src/osd/winui]dialogs.c

src/osd/winui/dialogs.c
r8078r8079
428428         win_set_window_text_utf8(hDlg, tmp);
429429         if ( GetFilterInherit() )
430430         {
431            if( folder )
431            BOOL bShowExplanation = FALSE;
432            lpParent = GetFolder( folder->m_nParent );
433            if( lpParent )
432434            {
433               BOOL bShowExplanation = FALSE;
434               lpParent = GetFolder( folder->m_nParent );
435               if( lpParent )
435               /* Check the Parent Filters and inherit them on child,
436                * No need to promote all games to parent folder, works as is */
437               dwpFilters = lpParent->m_dwFlags & F_MASK;
438               /*Check all possible Filters if inherited solely from parent, e.g. not being set explicitly on our folder*/
439               if( (dwpFilters & F_CLONES) && !(dwFilters & F_CLONES) )
436440               {
437                  /* Check the Parent Filters and inherit them on child,
438                   * No need to promote all games to parent folder, works as is */
439                  dwpFilters = lpParent->m_dwFlags & F_MASK;
440                  /*Check all possible Filters if inherited solely from parent, e.g. not being set explicitly on our folder*/
441                  if( (dwpFilters & F_CLONES) && !(dwFilters & F_CLONES) )
442                  {
443                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
444                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_CLONES), strText, 250);
445                     strcat(strText, " (*)");
446                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_CLONES), strText);
447                     bShowExplanation = TRUE;
448                  }
449                  if( (dwpFilters & F_NONWORKING) && !(dwFilters & F_NONWORKING) )
450                  {
451                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
452                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_NONWORKING), strText, 250);
453                     strcat(strText, " (*)");
454                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_NONWORKING), strText);
455                     bShowExplanation = TRUE;
456                  }
457                  if( (dwpFilters & F_UNAVAILABLE) && !(dwFilters & F_UNAVAILABLE) )
458                  {
459                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
460                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_UNAVAILABLE), strText, 250);
461                     strcat(strText, " (*)");
462                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_UNAVAILABLE), strText);
463                     bShowExplanation = TRUE;
464                  }
465                  if( (dwpFilters & F_VECTOR) && !(dwFilters & F_VECTOR) )
466                  {
467                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
468                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VECTOR), strText, 250);
469                     strcat(strText, " (*)");
470                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VECTOR), strText);
471                     bShowExplanation = TRUE;
472                  }
473                  if( (dwpFilters & F_RASTER) && !(dwFilters & F_RASTER) )
474                  {
475                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
476                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_RASTER), strText, 250);
477                     strcat(strText, " (*)");
478                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_RASTER), strText);
479                     bShowExplanation = TRUE;
480                  }
481                  if( (dwpFilters & F_ORIGINALS) && !(dwFilters & F_ORIGINALS) )
482                  {
483                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
484                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_ORIGINALS), strText, 250);
485                     strcat(strText, " (*)");
486                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_ORIGINALS), strText);
487                     bShowExplanation = TRUE;
488                  }
489                  if( (dwpFilters & F_WORKING) && !(dwFilters & F_WORKING) )
490                  {
491                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
492                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_WORKING), strText, 250);
493                     strcat(strText, " (*)");
494                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_WORKING), strText);
495                     bShowExplanation = TRUE;
496                  }
497                  if( (dwpFilters & F_AVAILABLE) && !(dwFilters & F_AVAILABLE) )
498                  {
499                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
500                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_AVAILABLE), strText, 250);
501                     strcat(strText, " (*)");
502                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_AVAILABLE), strText);
503                     bShowExplanation = TRUE;
504                  }
505                  if( (dwpFilters & F_HORIZONTAL) && !(dwFilters & F_HORIZONTAL) )
506                  {
507                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
508                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_HORIZONTAL), strText, 250);
509                     strcat(strText, " (*)");
510                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_HORIZONTAL), strText);
511                     bShowExplanation = TRUE;
512                  }
513                  if( (dwpFilters & F_VERTICAL) && !(dwFilters & F_VERTICAL) )
514                  {
515                     /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
516                     win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VERTICAL), strText, 250);
517                     strcat(strText, " (*)");
518                     win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VERTICAL), strText);
519                     bShowExplanation = TRUE;
520                  }
521                  /*Do not or in the Values of the parent, so that the values of the folder still can be set*/
522                  //dwFilters |= dwpFilters;
441                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
442                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_CLONES), strText, 250);
443                  strcat(strText, " (*)");
444                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_CLONES), strText);
445                  bShowExplanation = TRUE;
523446               }
524               if( ! bShowExplanation )
447               if( (dwpFilters & F_NONWORKING) && !(dwFilters & F_NONWORKING) )
525448               {
526                  ShowWindow(GetDlgItem(hDlg, IDC_INHERITED), FALSE );
449                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
450                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_NONWORKING), strText, 250);
451                  strcat(strText, " (*)");
452                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_NONWORKING), strText);
453                  bShowExplanation = TRUE;
527454               }
455               if( (dwpFilters & F_UNAVAILABLE) && !(dwFilters & F_UNAVAILABLE) )
456               {
457                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
458                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_UNAVAILABLE), strText, 250);
459                  strcat(strText, " (*)");
460                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_UNAVAILABLE), strText);
461                  bShowExplanation = TRUE;
462               }
463               if( (dwpFilters & F_VECTOR) && !(dwFilters & F_VECTOR) )
464               {
465                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
466                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VECTOR), strText, 250);
467                  strcat(strText, " (*)");
468                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VECTOR), strText);
469                  bShowExplanation = TRUE;
470               }
471               if( (dwpFilters & F_RASTER) && !(dwFilters & F_RASTER) )
472               {
473                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
474                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_RASTER), strText, 250);
475                  strcat(strText, " (*)");
476                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_RASTER), strText);
477                  bShowExplanation = TRUE;
478               }
479               if( (dwpFilters & F_ORIGINALS) && !(dwFilters & F_ORIGINALS) )
480               {
481                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
482                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_ORIGINALS), strText, 250);
483                  strcat(strText, " (*)");
484                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_ORIGINALS), strText);
485                  bShowExplanation = TRUE;
486               }
487               if( (dwpFilters & F_WORKING) && !(dwFilters & F_WORKING) )
488               {
489                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
490                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_WORKING), strText, 250);
491                  strcat(strText, " (*)");
492                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_WORKING), strText);
493                  bShowExplanation = TRUE;
494               }
495               if( (dwpFilters & F_AVAILABLE) && !(dwFilters & F_AVAILABLE) )
496               {
497                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
498                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_AVAILABLE), strText, 250);
499                  strcat(strText, " (*)");
500                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_AVAILABLE), strText);
501                  bShowExplanation = TRUE;
502               }
503               if( (dwpFilters & F_HORIZONTAL) && !(dwFilters & F_HORIZONTAL) )
504               {
505                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
506                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_HORIZONTAL), strText, 250);
507                  strcat(strText, " (*)");
508                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_HORIZONTAL), strText);
509                  bShowExplanation = TRUE;
510               }
511               if( (dwpFilters & F_VERTICAL) && !(dwFilters & F_VERTICAL) )
512               {
513                  /*Add a Specifier to the Checkbox to show it was inherited from the parent*/
514                  win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VERTICAL), strText, 250);
515                  strcat(strText, " (*)");
516                  win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_VERTICAL), strText);
517                  bShowExplanation = TRUE;
518               }
519               /*Do not or in the Values of the parent, so that the values of the folder still can be set*/
520               //dwFilters |= dwpFilters;
528521            }
522            if( ! bShowExplanation )
523            {
524               ShowWindow(GetDlgItem(hDlg, IDC_INHERITED), FALSE );
525            }
529526         }
530527         else
531528         {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team