Switch to unified view

a/src/qtgui/rclmain.cpp b/src/qtgui/rclmain.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.27 2006-04-27 09:23:10 dockes Exp $ (C) 2005 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.28 2006-09-04 15:13:01 dockes Exp $ (C) 2005 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
93
    }
93
    }
94
    string historyfile = path_cat(rclconfig->getConfDir(), "history");
94
    string historyfile = path_cat(rclconfig->getConfDir(), "history");
95
    m_history = new RclDHistory(historyfile);
95
    m_history = new RclDHistory(historyfile);
96
    connect(sSearch, SIGNAL(startSearch(Rcl::AdvSearchData)), 
96
    connect(sSearch, SIGNAL(startSearch(Rcl::AdvSearchData)), 
97
        this, SLOT(startAdvSearch(Rcl::AdvSearchData)));
97
        this, SLOT(startAdvSearch(Rcl::AdvSearchData)));
98
    connect(sSearch, SIGNAL(clearSearch()), resList, SLOT(resetSearch()));
98
99
    // signals and slots connections
100
    connect(sSearch, SIGNAL(clearSearch()),
101
      resList, SLOT(resetSearch()));
102
    connect(prevPageAction, SIGNAL(activated()), 
103
      resList, SLOT(resultPageBack()));
104
    connect(nextPageAction, SIGNAL(activated()),
105
      resList, SLOT(showResultPage()));
106
99
    connect(resList, SIGNAL(docExpand(int)), this, SLOT(docExpand(int)));
107
    connect(resList, SIGNAL(docExpand(int)), this, SLOT(docExpand(int)));
100
    connect(resList, SIGNAL(wordSelect(QString)),
108
    connect(resList, SIGNAL(wordSelect(QString)),
101
        this, SLOT(ssearchAddTerm(QString)));
109
        this, SLOT(ssearchAddTerm(QString)));
110
    connect(fileExitAction, SIGNAL(activated() ), this, SLOT(fileExit() ) );
111
    connect(fileStart_IndexingAction, SIGNAL(activated()), 
112
      this, SLOT(startIndexing()));
113
    connect(helpAbout_RecollAction, SIGNAL(activated()), 
114
      this, SLOT(showAboutDialog()));
115
    connect(userManualAction, SIGNAL(activated()), this, SLOT(startManual()));
116
    connect(toolsDoc_HistoryAction, SIGNAL(activated()), 
117
      this, SLOT(showDocHistory()));
118
    connect(toolsAdvanced_SearchAction, SIGNAL(activated()), 
119
      this, SLOT(showAdvSearchDialog()));
120
    connect(toolsSort_parametersAction, SIGNAL(activated()), 
121
      this, SLOT(showSortDialog()));
122
    connect(preferencesQuery_PrefsAction, SIGNAL(activated()), 
123
      this, SLOT(showUIPrefs()));
124
    connect(resList, SIGNAL(nextPageAvailable(bool)), 
125
      this, SLOT(enableNextPage(bool)));
126
    connect(resList, SIGNAL(prevPageAvailable(bool)), 
127
      this, SLOT(enablePrevPage(bool)));
128
    connect(resList, SIGNAL(docEditClicked(int)), 
129
      this, SLOT(startNativeViewer(int)));
130
    connect(resList, SIGNAL(docPreviewClicked(int)), 
131
      this, SLOT(startPreview(int)));
102
132
103
    nextPageAction->setIconSet(createIconSet("nextpage.png"));
133
    nextPageAction->setIconSet(createIconSet("nextpage.png"));
104
    prevPageAction->setIconSet(createIconSet("prevpage.png"));
134
    prevPageAction->setIconSet(createIconSet("prevpage.png"));
105
}
135
}
106
136
...
...
262
    }
292
    }
263
    if (recollNeedsExit)
293
    if (recollNeedsExit)
264
    fileExit();
294
    fileExit();
265
}
295
}
266
296
267
void RclMain::fileStart_IndexingAction_activated()
297
void RclMain::startIndexing()
268
{
298
{
269
    if (indexingdone)
299
    if (indexingdone)
270
    startindexing = 1;
300
    startindexing = 1;
271
    fileStart_IndexingAction->setEnabled(FALSE);
301
    fileStart_IndexingAction->setEnabled(FALSE);
272
}
302
}
...
...
317
347
318
// Open advanced search dialog.
348
// Open advanced search dialog.
319
void RclMain::showAdvSearchDialog()
349
void RclMain::showAdvSearchDialog()
320
{
350
{
321
    if (asearchform == 0) {
351
    if (asearchform == 0) {
322
    asearchform = new advsearch(0, tr("Advanced search"), FALSE,
352
    asearchform = new AdvSearch(0, tr("Advanced search"), FALSE,
323
                    WStyle_Customize | WStyle_NormalBorder | 
353
                    WStyle_Customize | WStyle_NormalBorder | 
324
                    WStyle_Title | WStyle_SysMenu);
354
                    WStyle_Title | WStyle_SysMenu);
325
    asearchform->setSizeGripEnabled(FALSE);
355
    asearchform->setSizeGripEnabled(FALSE);
326
    connect(asearchform, SIGNAL(startSearch(Rcl::AdvSearchData)), 
356
    connect(asearchform, SIGNAL(startSearch(Rcl::AdvSearchData)), 
327
        this, SLOT(startAdvSearch(Rcl::AdvSearchData)));
357
        this, SLOT(startAdvSearch(Rcl::AdvSearchData)));