Diffstat (limited to 'noncore/settings/tabmanager/tabmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/tabmanager/tabmanager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp index 4274203..3eae424 100644 --- a/noncore/settings/tabmanager/tabmanager.cpp +++ b/noncore/settings/tabmanager/tabmanager.cpp | |||
@@ -1,53 +1,55 @@ | |||
1 | #include "tabmanager.h" | 1 | #include "tabmanager.h" |
2 | #include "app.h" | 2 | #include "app.h" |
3 | #include "wait.h" | 3 | #include "wait.h" |
4 | #include "tabapplnk.h" | 4 | #include "tabapplnk.h" |
5 | 5 | ||
6 | #include <opie2/odebug.h> | ||
7 | |||
6 | #include <qpe/applnk.h> | 8 | #include <qpe/applnk.h> |
7 | #include <qdir.h> | 9 | #include <qdir.h> |
8 | #include <qfile.h> | 10 | #include <qfile.h> |
9 | #include <qtextstream.h> | 11 | #include <qtextstream.h> |
10 | #include <qlistview.h> | 12 | #include <qlistview.h> |
11 | #include <qheader.h> | 13 | #include <qheader.h> |
12 | #include <qcombobox.h> | 14 | #include <qcombobox.h> |
13 | #include <qlineedit.h> | 15 | #include <qlineedit.h> |
14 | #include <qlabel.h> | 16 | #include <qlabel.h> |
15 | #include <qmessagebox.h> | 17 | #include <qmessagebox.h> |
16 | #include <stdlib.h> | 18 | #include <stdlib.h> |
17 | #include <qpe/qcopenvelope_qws.h> | 19 | #include <qpe/qcopenvelope_qws.h> |
18 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
19 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
20 | 22 | ||
21 | 23 | ||
22 | #define HOME_APP_DIR QPEApplication::qpeDir()+"/apps" | 24 | #define HOME_APP_DIR QPEApplication::qpeDir()+"/apps" |
23 | #define HOME_APP_INSTALL_DIR "/usr/lib/ipkg/info" | 25 | #define HOME_APP_INSTALL_DIR "/usr/lib/ipkg/info" |
24 | #define NEW_FOLDER "EmptyTab" | 26 | #define NEW_FOLDER "EmptyTab" |
25 | #define NEW_APPLICATION "NewApp" | 27 | #define NEW_APPLICATION "NewApp" |
26 | #define APPLICATION_EXTENSION ".desktop" | 28 | #define APPLICATION_EXTENSION ".desktop" |
27 | #define APPLICATION_EXTENSION_LENGTH 8 | 29 | #define APPLICATION_EXTENSION_LENGTH 8 |
28 | 30 | ||
29 | /** | 31 | /** |
30 | * Constructor. Sets up signals. Performs initial scan of applications | 32 | * Constructor. Sets up signals. Performs initial scan of applications |
31 | * and tabs | 33 | * and tabs |
32 | */ | 34 | */ |
33 | TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false), application(NULL){ | 35 | TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false), application(NULL){ |
34 | rescanFolder(HOME_APP_DIR); | 36 | rescanFolder(HOME_APP_DIR); |
35 | 37 | ||
36 | // Connect the signals and slots | 38 | // Connect the signals and slots |
37 | connect(tabList, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(editItem(QListViewItem*))); | 39 | connect(tabList, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(editItem(QListViewItem*))); |
38 | (tabList->header())->hide(); | 40 | (tabList->header())->hide(); |
39 | connect(tabList, SIGNAL(moveItem(QListViewItem*,QListViewItem*)), this, SLOT(moveApplication(QListViewItem*,QListViewItem*))); | 41 | connect(tabList, SIGNAL(moveItem(QListViewItem*,QListViewItem*)), this, SLOT(moveApplication(QListViewItem*,QListViewItem*))); |
40 | } | 42 | } |
41 | 43 | ||
42 | /** | 44 | /** |
43 | * If anything in the tab's have been changed then update the system or alert | 45 | * If anything in the tab's have been changed then update the system or alert |
44 | * the user. | 46 | * the user. |
45 | */ | 47 | */ |
46 | TabManager::~TabManager(){ | 48 | TabManager::~TabManager(){ |
47 | if(changed){ | 49 | if(changed){ |
48 | // Prompt. | 50 | // Prompt. |
49 | //int answer = QMessageBox::warning(this, "Message", "Should your desktop be","Yes", "Cancel", 0, 1 ); | 51 | //int answer = QMessageBox::warning(this, "Message", "Should your desktop be","Yes", "Cancel", 0, 1 ); |
50 | //if (answer) | 52 | //if (answer) |
51 | // return; | 53 | // return; |
52 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 54 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
53 | QString link; //we'll just send an empty string | 55 | QString link; //we'll just send an empty string |