[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/sysadmin/ksystemlog/src
From:       Nicolas Ternisien <nicolas.ternisien () gmail ! com>
Date:       2007-03-13 23:57:02
Message-ID: 1173830222.091728.32010.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 642323 by ternisien:

Remove systray patch
Icon compatibility with KUbuntu

 M  +2 -2      Makefile.am  
 M  +0 -14     config/ksystemlog.kcfg  
 M  +0 -34     generalOptions.cpp  
 M  +0 -6      generalOptions.h  
 M  +1 -1      globals.cpp  
 M  +1 -1      globals.h  
 M  +1 -43     ksystemlog.cpp  
 M  +2 -41     ksystemlog.h  
 D             ksystemlogtray.cpp  
 D             ksystemlogtray.h  
 M  +3 -3      logViewColumns.cpp  


--- trunk/playground/sysadmin/ksystemlog/src/Makefile.am #642322:642323
@@ -81,7 +81,7 @@
 	defaultReader.cpp logMode.cpp ksystemlogiface.skel childLogLine.cpp \
parentLogLine.cpp \  logLineTree.cpp readerFactory.cpp itemFactory.cpp \
logViewColumns.cpp loadingDialog.cpp \  slotLogAction.cpp parsingHelper.cpp \
                logLineFilter.cpp loggerDialog.cpp findManager.cpp \
-	levelPrintPage.cpp ksystemlogtray.cpp
+	levelPrintPage.cpp
 	
 noinst_HEADERS = defaultReader.h detailDialog.h fileList.h generalOptions.h \
 	globals.h ksystemlogiface.h logFile.h logLevel.h logLine.h logLineList.h \
@@ -89,7 +89,7 @@
 	viewToolTip.h logManager.h logMode.h childLogLine.h parentLogLine.h logLineTree.h \
 	readerFactory.h itemFactory.h logViewColumns.h loadingDialog.h slotLogAction.h \
 	slotLogActionCompatibility.h parsingHelper.h logLineFilter.h loggerDialog.h \
                findManager.h \
-	levelPrintPage.h ksystemlogtray.h
+	levelPrintPage.h
 
 SUBDIRS = config bootauth acpid apache cron system xorg postfix kernel cups daemon \
samba ssh xsession .  
--- trunk/playground/sysadmin/ksystemlog/src/config/ksystemlog.kcfg #642322:642323
@@ -188,20 +188,6 @@
 			<default>0</default>
 		</entry>
 
-
-		<!-- Systray Options -->
-		<entry name="ShowSystemTray" type="Bool">
-			<label>Show system tray icon.</label>
-			<default>true</default>
-		</entry>
-		<entry name="ShowTrayNotification" type="Bool">
-			<label>Show notifications in tray</label>
-			<default>false</default>
-		</entry>
-		<entry name="ShowSystrayOnly" type="Bool">
-			<label>Don't show KSystemlog in task bar</label>
-			<default>false</default>
-		</entry>
 	</group>
 	
 </kcfg>
--- trunk/playground/sysadmin/ksystemlog/src/generalOptions.cpp #642322:642323
@@ -85,29 +85,12 @@
 	
 	QToolTip::add(colorizeLogLines, i18n("<qt>This option allows the colorization of \
log lines, depending on their log level.</qt>"));  QWhatsThis::add(colorizeLogLines, \
i18n("<qt>This option allows the colorization of log lines, depending on their log \
level. For example, an error will be in red, a warning in orange... This will help \
                you to better see problems.</qt>"));
-	
 
-	//Systray patch
-	QVGroupBox* systray= new QVGroupBox( i18n( "System tray" ), this );
-	
-	showSystemTray =new QCheckBox(i18n("Show the system tray icon"), systray);
-	connect(showSystemTray, SIGNAL(clicked()), this, SLOT(onOptionsChanged()));
-
-	showTrayNotification=new QCheckBox(i18n("Show notifications on system tray"), \
                systray);
-	connect(showTrayNotification, SIGNAL(clicked()), this, SLOT(onOptionsChanged()));
-
-	showSystrayOnly=new QCheckBox(i18n("Do not show an entry in the task bar"), \
                systray);
-	connect(showSystrayOnly, SIGNAL(clicked()), this, SLOT(onOptionsChanged()));
-	//End of Systray patch
-
 	QSpacerItem* spacer=new QSpacerItem(0, 0, QSizePolicy::Preferred, \
QSizePolicy::Expanding);  
 	layout->addWidget(logLinesBox);
 	layout->addWidget(maxCharBox);
 	layout->addWidget(options);
-	//Systray patch
-	layout->addWidget(systray);
-	//End of Systray patch
 	
 	layout->addItem(spacer);
 	
@@ -133,17 +116,6 @@
 	option=KSystemLogConfig::colorizeLogLines();
 	colorizeLogLines->setChecked(option);
 
-	//Systray patch
-	option = KSystemLogConfig::showSystemTray();
-	showSystemTray->setChecked(option);
-
-	option = KSystemLogConfig::showTrayNotification();
-	showTrayNotification->setChecked(option);
-
-	option = KSystemLogConfig::showSystrayOnly();
-	showSystrayOnly->setChecked(option);
-	//End of Systray patch
-
 }
 
 void GeneralOptions::saveConfig() const {
@@ -154,12 +126,6 @@
 	KSystemLogConfig::setDeleteDuplicatedLines(deleteDuplicatedLines->isChecked());
 	KSystemLogConfig::setDeleteProcessIdentifier(deleteProcessId->isChecked());
 	KSystemLogConfig::setColorizeLogLines(colorizeLogLines->isChecked());
-	
-	//Systray patch
-	KSystemLogConfig::setShowSystemTray( showSystemTray->isChecked() );
-	KSystemLogConfig::setShowTrayNotification( showTrayNotification->isChecked() );
-	KSystemLogConfig::setShowSystrayOnly( showSystrayOnly->isChecked() );
-	//End of Systray patch
 
 }
 
--- trunk/playground/sysadmin/ksystemlog/src/generalOptions.h #642322:642323
@@ -56,12 +56,6 @@
 		
 		QCheckBox* deleteProcessId;
 		QCheckBox* colorizeLogLines;
-		
-		//Systray patch
-		QCheckBox* showSystemTray;
-		QCheckBox* showTrayNotification;
-		QCheckBox* showSystrayOnly;
-		//End of Systray patch
 
 };
 
--- trunk/playground/sysadmin/ksystemlog/src/globals.cpp #642322:642323
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  ***************************************************************************/
  
 #include "globals.h"
--- trunk/playground/sysadmin/ksystemlog/src/globals.h #642322:642323
@@ -103,7 +103,7 @@
 #define KERNEL_MODE_ICON "openterm"
 #define XORG_MODE_ICON "x"
 #define BOOT_MODE_ICON "system"
-#define AUTHENTICATION_MODE_ICON "kuser"
+#define AUTHENTICATION_MODE_ICON "encrypted"
 #define DAEMON_MODE_ICON "misc"
 #define CRON_MODE_ICON "history"
 
--- trunk/playground/sysadmin/ksystemlog/src/ksystemlog.cpp #642322:642323
@@ -90,8 +90,7 @@
 	printer(NULL),
 	detailDialog(NULL),
 	loadingDialog(NULL),
-	tabs(NULL),
-	firstUpdate(true)
+	tabs(NULL)
 	{
 
 	//Accept Drag and Drop
@@ -143,36 +142,12 @@
 	// position, icon size, etc.  Also to add actions for the statusbar
 	// toolbar, and keybindings if necessary.
 	setupGUI();
-
-	//Setup the System Tray
-	setupSystemTray();
 	
 	//Read the configuration and display each tab saved
 	readConfig();	
 
 }
 
-//Systray patch
-void KSystemLog::setupSystemTray() {
-	systemTray=new KSystemLogTray(this);
-	
-	if ( KSystemLogConfig::showSystemTray() ) {
-		systemTray->show();
-		connect(this, SIGNAL( endSystrayNotification() ), systemTray, \
                SLOT(endNotification() ) );
-		connect(this, SIGNAL( startSystrayNotification() ), systemTray, \
                SLOT(startNotification() ) );
-	}
-
-}
-
-bool KSystemLog::event(QEvent* e) {
-	if(e->type() == QEvent::WindowActivate)
-		emit endSystrayNotification();	
-	return KMainWindow::event(e);
-}
-
-//End of Systray patch
-
-
 void KSystemLog::setupTabBar() {
 	tabs=new KTabWidget(this, "tabs");
 	
@@ -207,11 +182,6 @@
 		
 	if (slotLogAction!=NULL)
 		delete slotLogAction;
-	
-	//Systray patch
-	if (systemTray!=NULL)
-		delete systemTray;
-	//End of Systray patch
 
 }
 
@@ -911,19 +881,11 @@
 void KSystemLog::logUpdated(int /*lines*/) {
 	kdDebug() << "KSystemLog logUpdated()" << endl;
 
-	//Update System Tray
-	updateSystemTray();
-	
 	//Update Status Bar
 	updateStatusBar();
 
 }
 
-void KSystemLog::updateSystemTray() {
-	emit startSystrayNotification();
-         
-}
-
 void KSystemLog::updateStatusBar() {
 	LogManager* currentManager=activeLogManager();
 
@@ -998,11 +960,7 @@
 	return( static_cast<KToggleAction*> (actionCollection()->action(name)) );
 }
 
-#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
 void KSystemLog::logActionClicked(const QObject* sender, KAction::ActivationReason \
                reason, Qt::ButtonState state) {
-#else
-void KSystemLog::logActionClicked(const QObject* sender) {
-#endif
 	
 	KToggleAction* action=getLogAction(sender->name());
 	
--- trunk/playground/sysadmin/ksystemlog/src/ksystemlog.h #642322:642323
@@ -44,10 +44,6 @@
 //Project includes
 #include "detailDialog.h"
 
-//Systray patch
-#include "ksystemlogtray.h"
-//End of Systray patch
-
 #include "logLevel.h"
 #include "logManager.h"
 #include "loadingDialog.h"
@@ -56,12 +52,7 @@
 
 #include "globals.h"
 
-//Include the right header for the management of Log Action clicking, depending of \
                the version of KDE
-#if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0))
-	#include "slotLogAction.h"
-#else
-	#include "slotLogActionCompatibility.h"
-#endif
+#include "slotLogAction.h"
 
 #define STATUS_BAR_LINE_COUNT 1
 #define STATUS_BAR_LAST_MODIFICATION 2
@@ -111,23 +102,10 @@
 		
 		void setCurrentLogManager(LogManager* view);
 	
-	
-#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
-		//Actual KDE method
 		void logActionClicked(const QObject* sender, KAction::ActivationReason reason, \
                Qt::ButtonState state);
-#else
-		//Method for old versions of KDE
-		void logActionClicked(const QObject* sender);
-#endif
 		
 		void load(LogMode* logMode, LogManager* manager);
-	
-	//Systray patch
-	signals:
-		void endSystrayNotification();
-		void startSystrayNotification();
-	//End of Systray patch
-	
+
 	protected:
 		/**
 		 * Overridden virtuals for Qt drag'n drop (XDND)
@@ -152,10 +130,6 @@
 		
 		void setupLogLevels();
 
-		//Systray patch
-		virtual bool event(QEvent* e);
-		//End of Systray patch
-
 	private slots:
 		void fileOpen();
 		void filePrint();
@@ -170,7 +144,6 @@
 		void changeTab(View* view, const QString& label);
 		void changeTab(View* view, const QIconSet& icon, const QString& label);
 	
-		void updateSystemTray();	
 		void updateStatusBar();
 		
 		void updateGUI();
@@ -236,10 +209,6 @@
 		
 		void setupActions();
 		void setupLogActions();
-		
-		//Systray patch
-		void setupSystemTray();
-		//End of Systray patch
 
 		void readConfig();
 		void saveConfig();
@@ -280,14 +249,6 @@
 		
 		KToggleAction* tooltipEnabledAction;
 		KToggleAction* newLinesDisplayedAction;
-		
-		//Systray patch
-		/**
-		 * The system tray
-		 */
-		KSystemLogTray* systemTray;
-		bool firstUpdate;
-		//End of Systray patch
 
 		/**
 		 * The Group By Action Menu
--- trunk/playground/sysadmin/ksystemlog/src/logViewColumns.cpp #642322:642323
@@ -48,15 +48,15 @@
 
 
 bool LogViewColumns::isGroupByLogLevel() {
-	return(groupByLogLevel);
+	return groupByLogLevel;
 }
 
 bool LogViewColumns::isGroupByDay() {
-	return(groupByDay);
+	return groupByDay;
 }
 
 bool LogViewColumns::isGroupByHour() {
-	return(groupByHour);
+	return groupByHour;
 }
 
 bool LogViewColumns::isGroupByLogFile() {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic