diff --git a/app/src/gambas3/.src/Debug/Design.module b/app/src/gambas3/.src/Debug/Design.module index 5ace48b5f..2ce6a0e32 100644 --- a/app/src/gambas3/.src/Debug/Design.module +++ b/app/src/gambas3/.src/Debug/Design.module @@ -1371,6 +1371,8 @@ Public Sub InitEditorWithBreakpoints(hEditor As FEditor) Dim I As Integer Dim sPrefix As String + If Project.IsFake() Then Return + sPrefix = hEditor.Name & "." While I < $aBreakpoint.Count sBreakpoint = $aBreakpoint[I] diff --git a/app/src/gambas3/.src/Editor/Code/FEditor.class b/app/src/gambas3/.src/Editor/Code/FEditor.class index a65029df2..c652b4fa7 100644 --- a/app/src/gambas3/.src/Editor/Code/FEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FEditor.class @@ -1041,6 +1041,7 @@ Public Function CanSetBreakpoint(iLine As Integer) As Boolean Dim sLine As String Dim iPos As Integer + If Project.IsFake() Then Return If iLine < 0 Or If iLine >= $hEditor.Count Then Return '$hEditor[iLine].Refresh @@ -1082,6 +1083,7 @@ Public Sub CheckBreakpoints() Dim iLine As Integer + If Project.IsFake() Then Return For Each iLine In $hEditor.Breakpoints If Not CanSetBreakpoint(iLine) Then SetBreakpoint(iLine, False, False) Next @@ -3350,6 +3352,7 @@ End Public Sub mnuBreakpoint_Click() + If Not CanSetBreakpoint($hEditor.Line) Then Return Design.SetBreakpoint(Me.Name & "." & CStr($hEditor.Line), Not HasBreakpoint($hEditor.Line)) End diff --git a/app/src/gambas3/.src/FMain.class b/app/src/gambas3/.src/FMain.class index 722af9b16..a9c25665b 100644 --- a/app/src/gambas3/.src/FMain.class +++ b/app/src/gambas3/.src/FMain.class @@ -146,6 +146,7 @@ Public Sub tvwProject_Activate() Dim sMime As String Dim hProgList As DesktopFile[] Dim hProcess As Process + Dim sKeyClass As String sKey = tvwProject.Key @@ -153,8 +154,9 @@ Public Sub tvwProject_Activate() tvwProject[sKey].Expanded = True If CanEdit(sKey) Then If $bCtrl Then - If File.Ext(sKey) <> "module" Then - sKey = File.SetExt(sKey, "class") + If Project.IsSourcePath(sKey) And If File.Ext(sKey) <> "module" Then + sKeyClass = File.SetExt(sKey, "class") + If Project.IsSourcePath(sKeyClass) Then sKey = sKeyClass Endif Endif Project.OpenFile(sKey,,, True) diff --git a/app/src/gambas3/.src/Project/Farm/CSoftware.class b/app/src/gambas3/.src/Project/Farm/CSoftware.class index abc0493c9..2e1840bae 100644 --- a/app/src/gambas3/.src/Project/Farm/CSoftware.class +++ b/app/src/gambas3/.src/Project/Farm/CSoftware.class @@ -442,6 +442,7 @@ Public Sub Install(Optional bJustDownload As Boolean) As String If LCase(Vendor) <> "example" And If Tags.Exist("example", gb.IgnoreCase) Then Try Mkdir File.SetName(sSrcDir, "example") + Try Kill File.SetName(sSrcDir, "example") &/ sName Link ".." &/ File.Name(sSrcDir) &/ sName To File.SetName(sSrcDir, "example") &/ sName Endif diff --git a/gb.pdf/configure.ac b/gb.pdf/configure.ac index be4bf9557..765007707 100644 --- a/gb.pdf/configure.ac +++ b/gb.pdf/configure.ac @@ -31,6 +31,8 @@ if test "$have_poppler" = "yes"; then AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_20, $((1-$?)), Poppler version >= 0.20) pkg-config --atleast-version=0.58.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_58, $((1-$?)), Poppler version >= 0.58) + pkg-config --atleast-version=0.64.0 poppler + AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_64, $((1-$?)), Poppler version >= 0.64) fi AC_OUTPUT( \ diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp index 80d2d97c5..291a6f416 100644 --- a/gb.pdf/src/CPdfDocument.cpp +++ b/gb.pdf/src/CPdfDocument.cpp @@ -99,7 +99,7 @@ END_PROPERTY ****************************************************************************/ -static void return_unicode_string(Unicode *unicode, int len) +static void return_unicode_string(const Unicode *unicode, int len) { static UnicodeMap *uMap = NULL; @@ -128,7 +128,7 @@ static void aux_return_string_info(void *_object, const char *key) { Object obj; Object dst; - GooString *goo_value; + const_GooString *goo_value; Dict *info_dict; char *tmpstr; @@ -170,7 +170,7 @@ static void aux_return_date_info(void *_object, const char *key) GB_DATE ret; Object obj; Object dst; - GooString *goo; + const_GooString *goo; Dict *info_dict; char *datestr=NULL,*tofree=NULL; int nnum; @@ -221,7 +221,7 @@ static void aux_return_date_info(void *_object, const char *key) #endif } -static LinkDest *get_dest(LinkAction *act) +static const_LinkDest *get_dest(const_LinkAction *act) { if (!act) return 0; @@ -234,12 +234,12 @@ static LinkDest *get_dest(LinkAction *act) } } -static uint32_t aux_get_page_from_action(void *_object, LinkAction *act) +static uint32_t aux_get_page_from_action(void *_object, const_LinkAction *act) { Ref pref; - LinkDest *dest = get_dest(act); + const_LinkDest *dest = get_dest(act); #if POPPLER_VERSION_0_6 - GooString *name; + const_GooString *name; #else UGooString *name; #endif @@ -252,8 +252,15 @@ static uint32_t aux_get_page_from_action(void *_object, LinkAction *act) if (act->getKind () == actionGoTo) { name = ((LinkGoTo*)act)->getNamedDest(); - if (name) + if (name) { + #if POPPLER_VERSION_0_64 dest = THIS->doc->findDest(name); + #elif POPPLER_VERSION_0_6 + dest = THIS->doc->findDest((GooString *) name); + #else + dest = THIS->doc->findDest((UGooString *) name); + #endif + } } } @@ -270,9 +277,9 @@ static uint32_t aux_get_page_from_action(void *_object, LinkAction *act) } -static void aux_get_dimensions_from_action(LinkAction *act, CPDFRECT *rect) +static void aux_get_dimensions_from_action(const_LinkAction *act, CPDFRECT *rect) { - LinkDest *dest = get_dest(act); + const_LinkDest *dest = get_dest(act); if (!dest) return; @@ -282,20 +289,20 @@ static void aux_get_dimensions_from_action(LinkAction *act, CPDFRECT *rect) rect->h = dest->getBottom() - rect->y; } -static double aux_get_zoom_from_action(LinkAction *act) +static double aux_get_zoom_from_action(const_LinkAction *act) { - LinkDest *dest = get_dest(act); + const_LinkDest *dest = get_dest(act); if (dest) return dest->getZoom(); else return 1; } -static char* aux_get_target_from_action(LinkAction *act) +static char* aux_get_target_from_action(const_LinkAction *act) { char *vl=NULL; char *uni=NULL; - GooString *tmp=NULL; + const_GooString *tmp=NULL; switch (act->getKind()) { diff --git a/gb.pdf/src/CPdfDocument.h b/gb.pdf/src/CPdfDocument.h index d45c68203..fa80d47a9 100644 --- a/gb.pdf/src/CPdfDocument.h +++ b/gb.pdf/src/CPdfDocument.h @@ -32,6 +32,18 @@ #include #include +#if POPPLER_VERSION_0_64 +#define const_LinkAction const LinkAction +#define const_LinkDest const LinkDest +#define const_GooList const GooList +#define const_GooString const GooString +#else +#define const_LinkAction LinkAction +#define const_LinkDest LinkDest +#define const_GooList GooList +#define const_GooString GooString +#endif + #ifndef __CPDFDOCUMENT_C extern GB_DESC PdfRectDesc[]; @@ -79,18 +91,19 @@ typedef SplashOutputDev *dev; Page *page; uint currpage; - - void **pindex; // Parent of current index entries - GooList *index; // Current entries - uint currindex; // Current entry - uint *oldindex; // Parent entry - Links *links; // Page bookmarks - uint lcurrent; // Current bookmark + void **pindex; // Parent of current index entries + const_GooList *index; // Current entries + + uint currindex; // Current entry + uint *oldindex; // Parent entry - CPDFFIND *Found; // Found text elements + Links *links; // Page bookmarks + uint lcurrent; // Current bookmark - LinkAction *action; // Current link action + CPDFFIND *Found; // Found text elements + + const_LinkAction *action; // Current link action double scale; int rotation; diff --git a/gb.xml/src/node.cpp b/gb.xml/src/node.cpp index bd0d61975..f53b82d22 100644 --- a/gb.xml/src/node.cpp +++ b/gb.xml/src/node.cpp @@ -340,7 +340,7 @@ void XMLNode_addGBChildrenByAttributeValue(Node *node, const char *attrName, con for(Node *tNode = node->firstChild; tNode != 0; tNode = tNode->nextNode) { if(tNode->type != Node::ElementNode) continue; - Attribute *attr = XMLElement_GetAttribute((Element*)node, attrName, lenAttrName); + Attribute *attr = XMLElement_GetAttribute((Element*)tNode, attrName, lenAttrName); if(attr) { if(GB_MatchString(attr->attrValue, attr->lenAttrValue, attrValue, lenAttrValue, mode))