[CONFIGURATION]

* NEW: Update VERSION file.

[DEVELOPMENT ENVIRONMENT]
* BUG: If the desktop password wallet is not available, do not crash 
  anymore, but display an error message instead.

[INTERPRETER]
* BUG: Some fixes in Application_Error method management.

[GB.EVAL.HIGHLIGHT]
* BUG: Some fixes in HTML highlighting.

[GB.QT.4.EXT]
* NEW: Editor: jumping to the next procedure from the current one now goes 
  to the end of the file.


git-svn-id: svn://localhost/gambas/trunk@5684 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2013-05-28 20:48:43 +00:00
parent 1601ba5519
commit 0812020209
13 changed files with 92 additions and 53 deletions

View file

@ -1 +1 @@
3.4.0
3.4.90

View file

@ -987,35 +987,36 @@ msgstr ""
msgid "unlimited"
msgstr ""
#: FConnectionEditor.class:571 MConnection.module:93 MErrorMessage.module:47
#: FConnectionEditor.class:571 MConnection.module:114 MErrorMessage.module:47
msgid "Boolean"
msgstr ""
#: FConnectionEditor.class:571 MConnection.module:85
#: FConnectionEditor.class:571 MConnection.module:106
msgid "Integer"
msgstr ""
#: FConnectionEditor.class:571 MConnection.module:87
#: FConnectionEditor.class:571 MConnection.module:108
msgid "Long"
msgstr ""
#: FConnectionEditor.class:571 MConnection.module:97
#: FConnectionEditor.class:571 MConnection.module:118
msgid "Serial"
msgstr ""
#: FConnectionEditor.class:571 MConnection.module:89
#: FConnectionEditor.class:571 MConnection.module:110
msgid "Float"
msgstr ""
#: FConnectionEditor.class:571 MConnection.module:95 MErrorMessage.module:155
#: FConnectionEditor.class:571 MConnection.module:116 MErrorMessage.module:155
msgid "String"
msgstr ""
#: FConnectionEditor.class:571 FProjectVersion.class:280 MConnection.module:91
#: FConnectionEditor.class:571 FProjectVersion.class:280
#: MConnection.module:112
msgid "Date"
msgstr ""
#: FConnectionEditor.class:571 MConnection.module:99
#: FConnectionEditor.class:571 MConnection.module:120
msgid "Blob"
msgstr ""
@ -3298,7 +3299,7 @@ msgstr ""
msgid "Please enter the name of the new table."
msgstr ""
#: FNewTable.class:59 MConnection.module:269
#: FNewTable.class:59 MConnection.module:290
msgid "Table '&1' already exists."
msgstr ""
@ -4887,7 +4888,15 @@ msgstr ""
msgid "Unknown"
msgstr ""
#: MConnection.module:282
#: MConnection.module:47
msgid "Unable to retrieve password."
msgstr ""
#: MConnection.module:62
msgid "Unable to save password."
msgstr ""
#: MConnection.module:303
msgid "Cannot create table '&1'."
msgstr ""

View file

@ -3,7 +3,7 @@
Title=Gambas 3
Startup=Project
Icon=img/logo/logo-ide.png
Version=3.4.0
Version=3.4.90
VersionFile=1
Component=gb.image
Component=gb.qt4

View file

@ -2,6 +2,8 @@
Public Password As New Collection
Private $bError As Boolean
Public Sub InitFrom(hConn As Connection, hConfig As Object, sName As String, Optional bWithDatabase As Boolean)
hConn.Type = LCase(hConfig["Connection/Type"])
@ -20,6 +22,19 @@ Public Sub InitFrom(hConn As Connection, hConfig As Object, sName As String, Opt
End
Private Sub ErrorMessage(sMsg As String, sError As String)
If sError Then
If Not $bError Then
$bError = True
Message.Error(sMsg & "\n\n" & sError)
Endif
Else
$bError = False
Endif
End
Public Sub LoadPassword(sName As String, bDesktop As Boolean) As String
Dim sPassword As String
@ -27,7 +42,9 @@ Public Sub LoadPassword(sName As String, bDesktop As Boolean) As String
sPassword = Password[sName]
If Not sPassword Then
If bDesktop Then
sPassword = Desktop.Passwords[Project.Name &/ "Connection" &/ sName]
Error.Clear
Try sPassword = Desktop.Passwords[Project.Name &/ "Connection" &/ sName]
ErrorMessage(("Unable to retrieve password."), Error.Text)
Password[sName] = sPassword
Endif
Endif
@ -39,7 +56,11 @@ End
Public Sub SavePassword(sName As String, sPassword As String, (bDesktop) As Boolean)
Password[sName] = sPassword
If sPassword Then Desktop.Passwords[Project.Name &/ "Connection" &/ sName] = sPassword
If sPassword Then
Error.Clear
Try Desktop.Passwords[Project.Name &/ "Connection" &/ sName] = sPassword
ErrorMessage(("Unable to save password."), Error.Text)
Endif
End

View file

@ -5,7 +5,7 @@ Public Struct UndoCommand
Arg As Variant[]
End Struct
Private Const DEBUG_ME As Boolean = True
Private Const DEBUG_ME As Boolean = False
Private Enum CONTEXT_NONE, CONTEXT_UNDO, CONTEXT_REDO

View file

@ -19,22 +19,9 @@ SearchString=True
[OpenFile]
Active=1
File[1]=".src/HighlightHTML.module:239.0"
File[2]=".src/HighlightSQL.module:63.0"
File[3]=".src/Main.module:56.2"
File[4]=".src/Highlight.class:6.18"
File[5]=".src/HighlightDiff.module:0.0"
File[6]=".src/HighlightCSS.module:208.18"
File[7]="css/properties:176.0"
File[8]=".src/Helper.module:0.0"
File[9]="sql/datatypes:0.0"
File[10]="sql/functions:0.0"
File[11]="sql/keywords:0.0"
File[12]="sql/operators:0.0"
File[13]=".src/HighlightJavascript.module:29.4"
File[14]=".src/HighlightC.module:0.0"
File[15]=".src/HighlightCPlusPlus.module:0.0"
Count=15
File[1]=".src/HighlightHTML.module:336.4"
File[2]=".src/HighlightJavascript.module:29.4"
Count=2
[Watches]
Count=0

View file

@ -463,15 +463,16 @@ READ_CODE:
Highlight.AlternateState = False
iTagCode = 0
Inc I
PopHighlightState
iNextState = Highlight.State
Else
$sBufferAfter &= AnalyzeCode(String.Mid$(sText, iStart))
iTagCode = TAG_CODE
iTagMode = Highlight.Tag
iNextState = Highlight.State
PopHighlightState
Endif
PopHighlightState
Return
READ_CODE_COMMENT:

View file

@ -54,7 +54,9 @@ Public Sub Run()
If HighlightHTML.AllowCode And If sCar = "<" And String.Mid$(sText, iPos, 2) = "<%" Then
HighlightHTML.MeetCodeAt = iPos
Break
Highlight.State = iState
Highlight.Tag = iTag
Return
Endif
If iState = Highlight.Normal Then

View file

@ -776,16 +776,16 @@ fflush(stderr);
if ((retcode != SQL_SUCCESS) && (retcode != SQL_SUCCESS_WITH_INFO))
{
GB.Error("ODBC - Error - cannor allocate the handle");
GB.Error("Cannot allocate statement handle");
return retcode;
}
retcode =SQLSetStmtAttr(odbcres->odbcStatHandle, SQL_ATTR_CURSOR_SCROLLABLE, (SQLPOINTER) SQL_SCROLLABLE, 0);
retcode = SQLSetStmtAttr(odbcres->odbcStatHandle, SQL_ATTR_CURSOR_SCROLLABLE, (SQLPOINTER) SQL_SCROLLABLE, 0);
if ((retcode != SQL_SUCCESS) && (retcode != SQL_SUCCESS_WITH_INFO))
{
odbcres->Cursor_Scrollable=SQL_FALSE;
odbcres->Cursor_Scrollable = SQL_FALSE;
}
else odbcres->Cursor_Scrollable=SQL_TRUE;
@ -799,7 +799,7 @@ fflush(stderr);
if ((retcode != SQL_SUCCESS) && (retcode != SQL_SUCCESS_WITH_INFO))
{
SQLFreeHandle(SQL_HANDLE_STMT, odbcres->odbcStatHandle);
GB.Error("Error executing the statement");
GB.Error("Error while executing the statement");
return retcode;
}

View file

@ -1,8 +1,8 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.4.0
# Compiled with Gambas 3.4.90
Title=Desktop-neutral routines from Portland project
Startup=Main
Version=3.4.0
Version=3.4.90
VersionFile=1
Component=gb.image
Component=gb.gui

View file

@ -15,7 +15,7 @@ Private Sub OpenWallet()
If $bOpen Then Return
Select Case Desktop.Type
Select Case Desktop.Type
Case "KDE"

View file

@ -1681,7 +1681,11 @@ void GEditor::cursorUp(bool shift, bool ctrl, bool alt)
}
}
else if (ctrl)
cursorGoto(doc->getPreviousLimit(y), xx, shift);
{
int yl = doc->getPreviousLimit(y);
if (yl >= 0)
cursorGoto(yl, xx, shift);
}
else
cursorGoto(viewToReal(realToView(y) - 1), xx, shift);
}
@ -1733,7 +1737,14 @@ void GEditor::cursorDown(bool shift, bool ctrl, bool alt)
else if (!ctrl)
cursorGoto(QMIN(numLines() - 1, viewToReal(realToView(y) + 1)), xx, shift);
else
cursorGoto(doc->getNextLimit(y), xx, shift);
{
int yl = doc->getNextLimit(y);
if (yl >= 0)
cursorGoto(yl, xx, shift);
else
cursorGoto(numLines(), 0, shift);
}
}
void GEditor::movePreviousSameIndent(bool shift)
@ -2714,15 +2725,17 @@ QVariant GEditor::inputMethodQuery(Qt::InputMethodQuery property) const
return QRect(px, py, 1, _cellh);
}
case Qt::ImFont:
return font();
return font();
case Qt::ImCursorPosition:
return QVariant(x);
return QVariant(x);
case Qt::ImSurroundingText:
return QVariant(doc->getLine(y).getString());
return QVariant(doc->getLine(y).getString());
case Qt::ImCurrentSelection:
return QVariant(doc->getSelectedText(_insertMode).getString());
return QVariant(QString());
case Qt::ImAnchorPosition:
return QVariant(x);
default:
return QVariant();
return QVariant();
}
}

View file

@ -617,20 +617,27 @@ void ERROR_print(void)
DEBUG_print_backtrace(ERROR_backtrace);
}
void ERROR_save(ERROR_INFO *save, ERROR_INFO *last)
static void ERROR_copy(ERROR_INFO *save, ERROR_INFO *last)
{
ERROR_reset(save);
*save = ERROR_current->info;
CLEAR(&ERROR_current->info);
if (last)
{
ERROR_reset(last);
*last = ERROR_last;
CLEAR(&ERROR_last);
}
}
void ERROR_save(ERROR_INFO *save, ERROR_INFO *last)
{
ERROR_copy(save, last);
CLEAR(&ERROR_current->info);
if (last)
CLEAR(&ERROR_last);
}
void ERROR_restore(ERROR_INFO *save, ERROR_INFO *last)
{
ERROR_reset(&ERROR_current->info);
@ -709,11 +716,10 @@ void ERROR_hook(void)
if (handle_error)
{
no_rec = TRUE;
ERROR_save(&save, &last);
ERROR_copy(&save, &last);
TRY
{
ERROR_restore(&save, &last);
EXEC_public_desc(PROJECT_class, NULL, handle_error, 0);
}
CATCH