[rkward-cvs] SF.net SVN: rkward: [2216] branches/KDE4_port/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Nov 13 17:29:12 UTC 2007


Revision: 2216
          http://rkward.svn.sourceforge.net/rkward/?rev=2216&view=rev
Author:   tfry
Date:     2007-11-13 09:29:12 -0800 (Tue, 13 Nov 2007)

Log Message:
-----------
Adjust to latest kdelibs changes

Modified Paths:
--------------
    branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp
    branches/KDE4_port/rkward/misc/rkprogresscontrol.h
    branches/KDE4_port/rkward/rkconsole.cpp
    branches/KDE4_port/rkward/windows/rkcommandlog.cpp

Modified: branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp	2007-11-13 15:02:31 UTC (rev 2215)
+++ branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp	2007-11-13 17:29:12 UTC (rev 2216)
@@ -209,7 +209,7 @@
 	error_indicator->setPaletteForegroundColor (QColor (255, 0, 0));
 	error_indicator->hide ();
 
-	output_box = new KVBox ();
+	KVBox* output_box = new KVBox ();
 	if (mode_flags & (RKProgressControl::IncludeErrorOutput | RKProgressControl::IncludeRegularOutput)) {
 		QString ocaption;
 		if (mode_flags & RKProgressControl::IncludeRegularOutput) {
@@ -219,7 +219,7 @@
 			output_button_text = i18n ("Errors / Warnings");
 			ocaption = i18n ("Errors / Warnings:");
 		}
-		output_caption = new QLabel (ocaption, output_box);
+		new QLabel (ocaption, output_box);
 
 		output_text = new QTextEdit (output_box);
 		output_text->setReadOnly (true);
@@ -239,6 +239,7 @@
 	if (mode_flags & RKProgressControl::AllowCancel) setButtonText (KDialog::Cancel, i18n ("Cancel"));
 	else (setCloseTextToClose ());
 
+#warning TODO the KDialog size adjustment seems to be somewhat buggy in current kdelibs. Investigate later.
 	setDetailsWidgetVisible (mode_flags & RKProgressControl::OutputShownByDefault);
 
 	prevent_close = (mode_flags & RKProgressControl::PreventClose);
@@ -281,7 +282,7 @@
 
 	is_done = true;
 	setCloseTextToClose ();
-	if (!output_box->isShown ()) reject ();
+	if (!isDetailsWidgetVisible ()) reject ();
 }
 
 void RKProgressControlDialog::closeEvent (QCloseEvent *e) {

Modified: branches/KDE4_port/rkward/misc/rkprogresscontrol.h
===================================================================
--- branches/KDE4_port/rkward/misc/rkprogresscontrol.h	2007-11-13 15:02:31 UTC (rev 2215)
+++ branches/KDE4_port/rkward/misc/rkprogresscontrol.h	2007-11-13 17:29:12 UTC (rev 2216)
@@ -28,7 +28,6 @@
 class QDialog;
 class QLabel;
 class QTextEdit;
-class KVBox;
 
 class RKProgressControlDialog;
 
@@ -123,10 +122,8 @@
 protected:
 	void closeEvent (QCloseEvent *e);
 private:
-	QLabel *output_caption;
 	QLabel *error_indicator;
 	QTextEdit *output_text;
-	KVBox *output_box;
 
 	QString output_button_text;
 

Modified: branches/KDE4_port/rkward/rkconsole.cpp
===================================================================
--- branches/KDE4_port/rkward/rkconsole.cpp	2007-11-13 15:02:31 UTC (rev 2215)
+++ branches/KDE4_port/rkward/rkconsole.cpp	2007-11-13 17:29:12 UTC (rev 2216)
@@ -86,8 +86,16 @@
 	Apparently, things will be different in KDE 4.*/
 	kate_edit_actions = view->findChild<KActionCollection*> ("edit_actions");
 	if (kate_edit_actions) {
-		// so they never get activated by shortcuts
-		kate_edit_actions->clearAssociatedWidgets ();
+		// make sure these actions never get triggered by a shortcut
+		QList<QKeySequence> noshort;
+		noshort.append (QKeySequence ());	// no primary
+		noshort.append (QKeySequence ());	// no secondary
+		noshort.append (QKeySequence ());	// for good measure
+
+		QList<QAction*> keas = kate_edit_actions->actions ();
+		for (int i = 0; i < keas.size (); ++i) {
+			keas[i]->setShortcuts (noshort);
+		}
 	} else {
 		RK_DO (qDebug ("Could not retrieve the katepart's edit action collection"), APP, DL_ERROR);
 	}
@@ -121,6 +129,11 @@
 	current_command = 0;
 	tab_key_pressed_before = false;
 	command_was_piped = false;
+
+// Somehow, in a KDE4 pre-version, this widget reacts real bad, if its parent is shown, before itself is shown
+// probably the kate part is to blame.
+// so we need to set it to visible, explicitely (this will not acutally show it, as the parent is still hidden).
+	show ();
 }
 
 RKConsole::~RKConsole () {

Modified: branches/KDE4_port/rkward/windows/rkcommandlog.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandlog.cpp	2007-11-13 15:02:31 UTC (rev 2215)
+++ branches/KDE4_port/rkward/windows/rkcommandlog.cpp	2007-11-13 17:29:12 UTC (rev 2216)
@@ -259,6 +259,7 @@
 /////////////////////// BEGIN RKCommandLogPart ////////////////////////
 
 #include <kxmlguifactory.h>
+#include <kaction.h>
 
 RKCommandLogPart::RKCommandLogPart (RKCommandLog *for_log) : KParts::Part (0) {
 	RK_TRACE (APP);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list