Changeset 167 for trunk/Lucide/SOURCE


Ignore:
Timestamp:
Dec 7, 2006, 6:24:18 PM (15 years ago)
Author:
Eugene Romanenko
Message:

Remember last selected printer during session (closes #96)

Location:
trunk/Lucide/SOURCE/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/gui/printDlg.cpp

    r164 r167  
    4949
    5050
     51char PrintDlg::defQueue[] = { 0 };
     52
     53
    5154PrintDlg::PrintDlg( HWND hWndFrame, LuDocument *_doc, const char *fname, long _currentpage )
    5255{
     
    135138                    MPFROMSHORT(sEntry), MPFROMP( &(pQueueInfo[i]) ) );
    136139
    137         if ( pQueueInfo[i].fsType & PRQ3_TYPE_APPDEFAULT ) {
    138             setCurrentQInfo( hwnd, &( pQueueInfo[i] ) );
     140        if ( defQueue[0] == 0 ) {
     141            if ( pQueueInfo[i].fsType & PRQ3_TYPE_APPDEFAULT ) {
     142                setCurrentQInfo( hwnd, &( pQueueInfo[i] ) );
     143            }
     144        }
     145        else {
     146            if ( strcmp( pQueueInfo[i].pszName, defQueue ) == 0 ) {
     147                setCurrentQInfo( hwnd, &( pQueueInfo[i] ) );
     148            }
    139149        }
    140150    }
     
    627637                        }
    628638
     639                        // save name of selected queue to make it default for session
     640                        strcpy( defQueue, _this->psetup->QueueInfo.pszName );
     641
    629642                        WinDismissDlg( hwnd, DID_OK );
    630643                    }
  • trunk/Lucide/SOURCE/gui/printDlg.h

    r164 r167  
    7272        PHCINFO pcurForm;
    7373        PrintSetup *psetup;
     74       
     75        static char defQueue[ 256 ];
    7476};
    7577
Note: See TracChangeset for help on using the changeset viewer.