From: Kern Sibbald Date: Tue, 27 Mar 2007 20:32:38 +0000 (+0000) Subject: kes Add context menu for floating a window. X-Git-Tag: Release-7.0.0~6683 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=54e19bb083b373abd194364a2b55edc087edb501;p=bacula%2Fbacula kes Add context menu for floating a window. kes Some minor cleanup and name changes in qt-console kes Add doing mt setblk 0 in Win32 mtx-changer. kes Apply Martin's bug fix to move definition of ENODATA for FreeBSD to bsock.c git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4442 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index 1412cb0f6e..a4d5c44f56 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -47,10 +47,6 @@ extern time_t watchdog_time; #define INADDR_NONE -1 #endif -#ifndef ENODATA /* not defined on BSD systems */ -#define ENODATA EPIPE -#endif - #ifdef HAVE_WIN32 #define socketRead(fd, buf, len) recv(fd, buf, len, 0) #define socketWrite(fd, buf, len) send(fd, buf, len, 0) diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index 8567f37fdd..30a7eed18e 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -38,6 +38,10 @@ #include "jcr.h" #include +#ifndef ENODATA /* not defined on BSD systems */ +#define ENODATA EPIPE +#endif + #ifdef HAVE_WIN32 #define socketRead(fd, buf, len) ::recv(fd, buf, len, 0) #define socketWrite(fd, buf, len) ::send(fd, buf, len, 0) diff --git a/bacula/src/qt-console/batstack.cpp b/bacula/src/qt-console/batstack.cpp index df52485296..dfd9067d96 100644 --- a/bacula/src/qt-console/batstack.cpp +++ b/bacula/src/qt-console/batstack.cpp @@ -28,7 +28,7 @@ /* * Version $Id: batstack.cpp 4230 2007-02-21 20:07:37Z kerns $ * - * Kern Sibbald, January 2007 + * Dirk Bartley, March 2007 */ #include "batstack.h" @@ -36,11 +36,14 @@ void BatStack::AddTostack() { /* These two lines are for making sure if it is being changed from a window - * That it has the proper window flag and parent. */ + * that it has the proper window flag and parent. + */ setWindowFlags(Qt::Widget); setParent(m_parent); + /* This was being done already */ m_parent->addWidget(this); + /* Set stacked flag */ m_stacked=true; } @@ -64,36 +67,29 @@ void BatStack::Togglestack() } } -/* needed this so that the console class could set m_treeItem */ -//void BatStack::SetBSTreeWidgetItem(QTreeWidgetItem *treeItem) -//{ -// m_treeItem=treeItem; -//} bool BatStack::isStacked() { return m_stacked; } -void BatStack::closeEvent(QCloseEvent* event){ - /* Avoid a warning */ - event->type(); +void BatStack::closeEvent(QCloseEvent* /*event*/) +{ /* A Widget was closed, lets toggle it back into the window, and set it in front. */ AddTostack(); - /* FIXME Really having problems getting it to the front, toggles back into the stack fine though */ - /*int stackindex=m_parent->indexOf( this ); + +#ifdef xxx + /* FIXME Really having problems getting it to the front, + toggles back into the stack fine though */ + int stackindex=m_parent->indexOf( this ); if( stackindex >= 0 ){ show(); m_parent->setCurrentIndex(stackindex); - }*/ -} - -void BatStack::PgSeltreeWidgetClicked(){ + } +#endif } -void BatStack::PgSeltreeWidgetDoubleClicked(){ -} void BatStack::SetPassedValues(QStackedWidget* passedStackedWidget, QTreeWidgetItem* passedTreeItem, int indexseq ) { diff --git a/bacula/src/qt-console/batstack.h b/bacula/src/qt-console/batstack.h index ee3197c466..d2e1417ed5 100644 --- a/bacula/src/qt-console/batstack.h +++ b/bacula/src/qt-console/batstack.h @@ -30,7 +30,7 @@ /* * Version $Id: batstack.h 4230 2007-02-21 20:07:37Z kerns $ * - * Kern Sibbald, January 2007 + * Dirk Bartley, March 2007 */ #include @@ -42,12 +42,9 @@ public: void AddTostack(); void RemoveFromstack(); void Togglestack(); - //void SetBSTreeWidgetItem(QTreeWidgetItem *treeItem); bool isStacked(); QStackedWidget *m_parent; QTreeWidgetItem *m_treeItem; - virtual void PgSeltreeWidgetClicked(); - virtual void PgSeltreeWidgetDoubleClicked(); void SetPassedValues(QStackedWidget*, QTreeWidgetItem*, int ); public slots: diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 46551b987e..044ff90f21 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -243,8 +243,6 @@ void MainWin::treeItemClicked(QTreeWidgetItem *item, int column) if( stackindex >= 0 ){ stackedWidget->setCurrentIndex(stackindex); } - /* run the virtual function in case this class overrides it */ - m_bstacklist[treeindex]->PgSeltreeWidgetClicked(); } /* @@ -268,8 +266,6 @@ void MainWin::treeItemDoubleClicked(QTreeWidgetItem *item, int column) /* Just pull it back in without prompting */ m_bstacklist[treeindex]->Togglestack(); } - /* Here is the virtual function so that different classes can do different things */ - m_bstacklist[treeindex]->PgSeltreeWidgetDoubleClicked(); } void MainWin::labelDialogClicked() diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 74be09f449..ea05d63a62 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,11 @@ General: 27Mar07 +kes Add context menu for floating a window. +kes Some minor cleanup and name changes in qt-console +kes Add doing mt setblk 0 in Win32 mtx-changer. +kes Apply Martin's bug fix to move definition of ENODATA for + FreeBSD to bsock.c ebl Add a BUSY handler to sqlite to be able to use multi_db = 1 with sqlite2 and sqlite3. 26Mar07