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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Oct 23 12:57:53 UTC 2007


Revision: 2115
          http://rkward.svn.sourceforge.net/rkward/?rev=2115&view=rev
Author:   tfry
Date:     2007-10-23 05:57:52 -0700 (Tue, 23 Oct 2007)

Log Message:
-----------
Assorted small fixes

Modified Paths:
--------------
    branches/KDE4_port/rkward/misc/rkspinbox.cpp
    branches/KDE4_port/rkward/settings/rksettings.cpp
    branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp
    branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h
    branches/KDE4_port/rkward/windows/rkcommandeditorwindowpart.rc

Modified: branches/KDE4_port/rkward/misc/rkspinbox.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkspinbox.cpp	2007-10-23 12:31:46 UTC (rev 2114)
+++ branches/KDE4_port/rkward/misc/rkspinbox.cpp	2007-10-23 12:57:52 UTC (rev 2115)
@@ -132,6 +132,8 @@
 			if (step < 1) step = 1;
 
 			int_value += change * step;
+			if (int_value > int_max) int_value = int_max;
+			if (int_value < int_min) int_value = int_min;
 		}
 	}
 }

Modified: branches/KDE4_port/rkward/settings/rksettings.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettings.cpp	2007-10-23 12:31:46 UTC (rev 2114)
+++ branches/KDE4_port/rkward/settings/rksettings.cpp	2007-10-23 12:57:52 UTC (rev 2115)
@@ -53,9 +53,9 @@
 		settings_dialog = new RKSettings (parent);
 	}
 
+	settings_dialog->raisePage (page);
 	settings_dialog->show ();
 	settings_dialog->raise ();
-	settings_dialog->raisePage (page);
 }
 
 //static
@@ -109,7 +109,7 @@
 
 	ModuleMap::const_iterator it;
 	for (it = modules.constBegin (); it != modules.constEnd (); ++it) {
-		pages[it.key ()] = addPage (it.value (), it.value ()->caption ());
+		pages[it.key ()-1] = addPage (it.value (), it.value ()->caption ());
 	}
 }
 

Modified: branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp	2007-10-23 12:31:46 UTC (rev 2114)
+++ branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp	2007-10-23 12:57:52 UTC (rev 2115)
@@ -48,6 +48,7 @@
 
 #include "../misc/rkcommonfunctions.h"
 #include "../core/robjectlist.h"
+#include "../settings/rksettings.h"
 #include "../settings/rksettingsmodulecommandeditor.h"
 #include "../rkconsole.h"
 #include "../rkglobals.h"
@@ -243,6 +244,12 @@
 	RK_TRACE (COMMANDEDITOR);
 	if (!completion_model) return;
 
+	KTextEditor::CodeCompletionInterface *iface = qobject_cast<KTextEditor::CodeCompletionInterface*> (m_view);
+	if (!iface) {
+		RK_ASSERT (false);
+		return;
+	}
+
 	KTextEditor::Cursor c = m_view->cursorPosition();
 	uint para=c.line(); uint cursor_pos=c.column();
 
@@ -255,16 +262,13 @@
 	if ((end - start) >= RKSettingsModuleCommandEditor::completionMinChars ()) {
 		KTextEditor::Range range (para, start, para, end);
 
-		KTextEditor::CodeCompletionInterface *iface = qobject_cast<KTextEditor::CodeCompletionInterface*> (m_view);
-		if (!iface) {
-			RK_ASSERT (false);
-			return;
-		}
 		if (iface->isCompletionActive ()) {
 			completion_model->completionInvoked (m_view, range, KTextEditor::CodeCompletionModel::ManualInvocation);
 		} else {
 			iface->startCompletion (range, completion_model);
 		}
+	} else {
+		iface->abortCompletion ();
 	}
 }
 
@@ -317,7 +321,12 @@
 	RKConsole::pipeUserCommand (command);
 }
 
+void RKCommandEditorWindow::configure () {
+	RK_TRACE (COMMANDEDITOR);
 
+	RKSettings::configureSettings (RKSettings::PageCommandEditor, this);
+}
+
 //////////////////////// RKFunctionArgHinter //////////////////////////////
 
 #include "../core/rfunctionobject.h"

Modified: branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h	2007-10-23 12:31:46 UTC (rev 2114)
+++ branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h	2007-10-23 12:57:52 UTC (rev 2115)
@@ -142,6 +142,8 @@
 	void runLine ();
 /** run the entire script */
 	void runAll ();
+/** invoke the settings page for the command editor */
+	void configure ();
 protected:
 /** reimplemented from KMdiChildView: give the editor window a chance to object to being closed (if unsaved) */
 	void closeEvent (QCloseEvent *e);

Modified: branches/KDE4_port/rkward/windows/rkcommandeditorwindowpart.rc
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandeditorwindowpart.rc	2007-10-23 12:31:46 UTC (rev 2114)
+++ branches/KDE4_port/rkward/windows/rkcommandeditorwindowpart.rc	2007-10-23 12:57:52 UTC (rev 2115)
@@ -14,6 +14,9 @@
 			<Action name="run_all"/>
 			<Separator/>
 		</Menu>
+		<Menu name="settings"><text>&Settings</text>
+			<Action name="configure_commandeditor"></Action>
+		</Menu>
 		<Menu name="help"><text>&Help</text>
 			<Action name="function_reference"></Action>
 		</Menu>


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