paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/themes theme_priv.cpp,1.3.2.1,1.3.2.2 the


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/themes theme_priv.cpp,1.3.2.1,1.3.2.2 theme_priv.h,1.3.2.2,1.3.2.3 themeloader.cpp,1.3.2.1,1.3.2.2
Date: Sat, 31 Aug 2002 00:01:27 -0400

Update of /cvsroot/paragui/paragui/src/themes
In directory subversions:/tmp/cvs-serv4328/src/themes

Modified Files:
      Tag: devel-opengl
        theme_priv.cpp theme_priv.h themeloader.cpp 
Log Message:
massive changes - updates from main trunk and various bugfixes


Index: theme_priv.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/themes/theme_priv.cpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** theme_priv.cpp      18 Jun 2002 22:40:39 -0000      1.3.2.1
--- theme_priv.cpp      31 Aug 2002 04:01:25 -0000      1.3.2.2
***************
*** 60,64 ****
--- 60,66 ----
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        THEME_OBJECT* object = widget->FindObject(objectname);
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        return object;
***************
*** 72,75 ****
--- 74,78 ----
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        return object->FindSurface(name);
  }
***************
*** 188,195 ****
--- 191,200 ----
        THEME_OBJECT* result = object[objectname];
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(result == NULL) {
                return NULL;
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        return result;
  }
***************
*** 220,223 ****
--- 225,230 ----
        }
        strings.clear();
+       
+       delete font;
  }
  
***************
*** 231,234 ****
--- 238,242 ----
                return NULL;
        }
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        return result->surface;

Index: theme_priv.h
===================================================================
RCS file: /cvsroot/paragui/paragui/src/themes/theme_priv.h,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C2 -r1.3.2.2 -r1.3.2.3
*** theme_priv.h        26 Jun 2002 03:25:04 -0000      1.3.2.2
--- theme_priv.h        31 Aug 2002 04:01:25 -0000      1.3.2.3
***************
*** 108,112 ****
--- 108,116 ----
  struct pg_hashstr {
        size_t operator()(std::string s1) const {
+ #if PG_VERSIONNUM(__GNUC__, __GNUC_MINOR__, 0) >= PG_VERSIONNUM(3, 1, 0)
+               return __gnu_cxx::hash<const char *>()(s1.c_str());
+ #else
                return std::hash<const char *>()(s1.c_str());
+ #endif
        }
  };

Index: themeloader.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/themes/themeloader.cpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** themeloader.cpp     18 Jun 2002 22:40:39 -0000      1.3.2.1
--- themeloader.cpp     31 Aug 2002 04:01:25 -0000      1.3.2.2
***************
*** 28,33 ****
--- 28,36 ----
  
  #include "paragui.h"
+ 
+ 
  #include "theme_priv.h"
  #include "pglog.h"
+ #include "pgfilearchive.h"
  #include "pgdraw.h"
  
***************
*** 400,406 ****
--- 403,411 ----
        std::string filename;
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        // create new parse info
        PARSE_INFO info;
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        // init parseinfo
        info.theme = NULL;
***************
*** 411,440 ****
  
        filename = xmltheme;
  
        // check if we have a compressed themefile somewhere
        filename = (std::string)xmltheme + (std::string)".zip";
  
        // and add it to the searchpath
!       if(info.archive.Exists(filename.c_str())) {
!               const char* path = info.archive.GetRealDir(filename.c_str());
!               std::string fullpath = (std::string)path + (std::string)"/" + 
filename;
  
!               bool rc = info.archive.AddArchive(fullpath.c_str());
                if(rc) {
                        PG_LogMSG("added '%s' to the searchpath", 
fullpath.c_str());
                } else {
                        PG_LogWRN("failed to add '%s'", fullpath.c_str());
!                       PG_LogWRN("%s", info.archive.GetLastError());
                }
        }
  
        // try to open the theme
  
        filename = (std::string)xmltheme + (std::string)THEME_SUFFIX;
!       if(!info.archive.Exists(filename.c_str())) {
                PG_LogERR("theme '%s' not found !", filename.c_str());
                return NULL;
        }
  
        info.themename = xmltheme;
  
--- 416,455 ----
  
        filename = xmltheme;
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        // check if we have a compressed themefile somewhere
        filename = (std::string)xmltheme + (std::string)".zip";
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        // and add it to the searchpath
!       if(PG_FileArchive::Exists(filename.c_str())) {
!               const char* path = PG_FileArchive::GetRealDir(filename.c_str());
!               char sep = PG_FileArchive::GetDirSeparator()[0];
!               
!               std::string fullpath = (std::string)path;
!               if(fullpath[fullpath.size()-1] != sep) {
!                       fullpath += sep;
!               }
!               fullpath += filename;
  
!               bool rc = PG_FileArchive::AddArchive(fullpath.c_str());
                if(rc) {
                        PG_LogMSG("added '%s' to the searchpath", 
fullpath.c_str());
                } else {
                        PG_LogWRN("failed to add '%s'", fullpath.c_str());
!                       PG_LogWRN("%s", PG_FileArchive::GetLastError());
                }
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        // try to open the theme
  
        filename = (std::string)xmltheme + (std::string)THEME_SUFFIX;
!       if(!PG_FileArchive::Exists(filename.c_str())) {
                PG_LogERR("theme '%s' not found !", filename.c_str());
                return NULL;
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        info.themename = xmltheme;
  
***************
*** 446,452 ****
        XML_SetElementHandler(p, handlerStart, handlerEnd);
  
        // create an input-stream
  
!       PG_File* file = info.archive.OpenFile(filename.c_str());
  
        if(!file) {
--- 461,468 ----
        XML_SetElementHandler(p, handlerStart, handlerEnd);
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        // create an input-stream
  
!       PG_File* file = PG_FileArchive::OpenFile(filename.c_str());
  
        if(!file) {
***************
*** 455,458 ****
--- 471,475 ----
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        // do the parsing
        while (!file->eof()) {
***************
*** 474,477 ****
--- 491,495 ----
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        // free the parser
        XML_ParserFree(p);
***************
*** 481,487 ****
  
        PG_LogMSG("theme '%s' loaded sucessfully", filename.c_str());
- 
-       //PG_Theme *theme = info.theme;
-       //return theme;
  
        return info.theme;
--- 499,502 ----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]