summaryrefslogtreecommitdiff
path: root/noncore/settings
Side-by-side diff
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp1
-rw-r--r--noncore/settings/tabmanager/tablistview.h24
2 files changed, 14 insertions, 11 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp
index 3bc7d43..79f015b 100644
--- a/noncore/settings/networksettings/ppp/modem.cpp
+++ b/noncore/settings/networksettings/ppp/modem.cpp
@@ -35,49 +35,48 @@ using namespace Opie::Core;
#include <fcntl.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <setjmp.h>
#include <regex.h>
#include <qregexp.h>
#include <assert.h>
#include <string.h>
#ifdef HAVE_RESOLV_H
# include <arpa/nameser.h>
# include <resolv.h>
#endif
#ifndef _PATH_RESCONF
#define _PATH_RESCONF "/etc/resolv.conf"
#endif
#define strlcpy strcpy
#include "auth.h"
#include "modem.h"
#include "pppdata.h"
-#define qError qDebug
#define MY_ASSERT(x) if (!(x)) { \
ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \
exit(1); }
static sigjmp_buf jmp_buffer;
//Modem *Modem::modem = 0;
const char* pppdPath() {
// wasting a few bytes
static char buffer[sizeof(PPPDSEARCHPATH)+sizeof(PPPDNAME)];
static char *pppdPath = 0L;
char *p;
if(pppdPath == 0L) {
const char *c = PPPDSEARCHPATH;
while(*c != '\0') {
while(*c == ':')
c++;
p = buffer;
diff --git a/noncore/settings/tabmanager/tablistview.h b/noncore/settings/tabmanager/tablistview.h
index dfd88f7..54b87b6 100644
--- a/noncore/settings/tabmanager/tablistview.h
+++ b/noncore/settings/tabmanager/tablistview.h
@@ -1,65 +1,69 @@
#ifndef TABLISTVIEW_H
#define TABLISTVIEW_H
+/* OPIE */
+#include <opie2/odebug.h>
+
+/* QT */
#include <qlistview.h>
#include <qcursor.h>
#include <qapplication.h>
-class TabListView : public QListView {
+class TabListView : public QListView {
Q_OBJECT
-
+
signals:
void moveItem(QListViewItem *item, QListViewItem *newFolder);
public:
TabListView( QWidget* parent = 0, const char* name = 0) : QListView(parent, name){ currentSelectedItem = NULL;
connect(this, SIGNAL(pressed ( QListViewItem *)), this, SLOT(itemPressed(QListViewItem *)));
internalCursor.setShape(0);
};
protected:
void contentsMouseReleaseEvent(QMouseEvent* ){
- QListViewItem *newGroup = this->currentItem();
+ QListViewItem *newGroup = this->currentItem();
// Make sure they are both real.
if (currentSelectedItem == NULL || newGroup == NULL)
return;
// Make sure they are not the same
if(this->isSelected(currentSelectedItem) == true)
return;
-
+
// Ok we have two valid items.
if(newGroup->parent())
newGroup = newGroup->parent();
-
+
// Just in case the parent was null
if(newGroup == NULL)
return;
-
- // If the new folder and buddies current parent are the same don't do anything.
+
+ // If the new folder and buddies current parent are the same don't do anything.
if (newGroup != currentSelectedItem->parent())
moveItem(currentSelectedItem, newGroup);
currentSelectedItem = NULL;
qApp->restoreOverrideCursor();
};
private slots:
void itemPressed(QListViewItem *item){
if(item == NULL || !item->parent()){
if(item == NULL)
- qDebug("Item is NULL");
+ odebug << "Item is NULL" << oendl;
return;
}
-
+
currentSelectedItem = item;
internalCursor.setShape(13);
qApp->setOverrideCursor(internalCursor);
};
private:
QListViewItem *currentSelectedItem;
QCursor internalCursor;
};
#endif
-
+