Hi!

These are 2 little patches.
1st is because it didn't find my themes, because if it did not find
themes at the first place it looked for, it stoped to look at the other
places. Now it goes on.

2nd is because I'm working on a WinAmp Theme, in wich I use ChangeWindow.
The old one always put the new window to (0,0). Now it puts to the right
place.

And some questions:
1. It was a lot of time for me to get the theme.xml's things out from the
code. There should be a howto for it!

2. Is it possible in the not so far future to make some features in the
xml format? This is what I'd need: Somehow I need to tell freeamp, that
the buttons I us (from the winamp skin) are not in horizontal, but
vertical order.
It could be like: <ButtonControl Name="n" Direction="Vertical">

Or the best would be if it's more general! For example:
<Controls DefaultDirection="V" First="Normal" Second="Pressed">
This way people could use skins where isn't button for OnMousOver.

3. Does anyone know how to make something like ButtonControl, but without
pressing. Something like ControlLabel.

4. Generally what is the format of the Rect-s? "x1,y1,x2,y2" or "x1,y1,lx,ly"

FlöcsyŽ

URL: http://flocsy.spedia.net           MAIL:[EMAIL PROTECTED]
SMS: [EMAIL PROTECTED]                 ICQ:27733935
Ha meg szeretnéd tudni hogyan kereshetsz böngészés közben egy kis zsebpénzt:
http://www.spedia.net/cgi-bin/dir/tz.cgi?run=show_svc&fl=8&vid=119891
*** freeamp/ui/freeamp/unix/src/ThemeManager.cpp        Tue Oct 19 09:13:20 1999
--- ../patches/2.0/ui/freeamp/unix/src/ThemeManager.cpp Wed Oct 20 20:07:42 1999
***************
*** 39,44 ****
--- 39,46 ----
  {
  }
  
+ #define BURNED_IN_THEME_PATH "/../share/freeamp/themes"
+ 
  Error ThemeManager::GetDefaultTheme(string &oThemePath)
  {
      char              dir[MAX_PATH];
***************
*** 46,52 ****
  
      m_pContext->prefs->GetInstallDirectory(dir, &len);
      oThemePath = string(dir);
!     oThemePath += string("/../share/freeamp/themes/freeamp.fat");    
  
      return kError_NoErr;
  }
--- 48,55 ----
  
      m_pContext->prefs->GetInstallDirectory(dir, &len);
      oThemePath = string(dir);
!     oThemePath += string(BURNED_IN_THEME_PATH);
!     oThemePath += string("/freeamp.fat");
  
      return kError_NoErr;
  }
***************
*** 60,81 ****
      string          oThemePath, oThemeBasePath, oThemeFile;
  
      m_pContext->prefs->GetInstallDirectory(dir, &len);
!     oThemeBasePath = string(dir) + "/../share/freeamp/themes";
      oThemePath = oThemeBasePath + string("/*.fat");    
  
      handle = FindFirstFile((char *)oThemePath.c_str(), &find);
!     if(handle == INVALID_HANDLE_VALUE)
!         return kError_NoErr;
! 
!     do {
!       oThemeFile = oThemeBasePath + string("/") + string(find.cFileName);
!       ptr = strrchr(find.cFileName, '.');
!         if (ptr)
!            *ptr = 0;
! 
!         oThemeFileMap[find.cFileName] = oThemeFile;
!     }
!     while(FindNextFile(handle, &find));
  
      oThemeBasePath = FreeampDir(NULL) + string("/themes");
  
--- 63,81 ----
      string          oThemePath, oThemeBasePath, oThemeFile;
  
      m_pContext->prefs->GetInstallDirectory(dir, &len);
!     oThemeBasePath = string(dir) + BURNED_IN_THEME_PATH;
      oThemePath = oThemeBasePath + string("/*.fat");    
  
      handle = FindFirstFile((char *)oThemePath.c_str(), &find);
!     if(handle != INVALID_HANDLE_VALUE)
!       do {
!           oThemeFile = oThemeBasePath + string("/") + string(find.cFileName);
!           ptr = strrchr(find.cFileName, '.');
!           if (ptr)
!               *ptr = 0;
!       oThemeFileMap[find.cFileName] = oThemeFile;
!       }
!       while(FindNextFile(handle, &find));
  
      oThemeBasePath = FreeampDir(NULL) + string("/themes");
  
***************
*** 84,115 ****
          mkdir(oThemeBasePath.c_str(), 0755);
      oThemePath = oThemeBasePath + string("/*.fat");
      handle = FindFirstFile((char *)oThemePath.c_str(), &find);
!     if(handle == INVALID_HANDLE_VALUE)
!         return kError_NoErr;
! 
!     do {
!         oThemeFile = oThemeBasePath + string("/") + string(find.cFileName);
!         ptr = strrchr(find.cFileName, '.');
!         if (ptr)
!            *ptr = 0;
!         oThemeFileMap[find.cFileName] = oThemeFile;
!     }
!     while(FindNextFile(handle, &find));
  
      oThemeBasePath = "./themes";
      oThemePath = oThemeBasePath + string("/*.fat");
      handle = FindFirstFile((char *)oThemePath.c_str(), &find);
!     if(handle == INVALID_HANDLE_VALUE)
!         return kError_NoErr;
! 
!     do {
!         oThemeFile = oThemeBasePath + string("/") + string(find.cFileName);
!         ptr = strrchr(find.cFileName, '.');
!         if (ptr)
!            *ptr = 0;
!         oThemeFileMap[find.cFileName] = oThemeFile;
!     }
!     while(FindNextFile(handle, &find));
  
      return kError_NoErr;
  }
--- 84,111 ----
          mkdir(oThemeBasePath.c_str(), 0755);
      oThemePath = oThemeBasePath + string("/*.fat");
      handle = FindFirstFile((char *)oThemePath.c_str(), &find);
!     if(handle != INVALID_HANDLE_VALUE)
!       do {
!           oThemeFile = oThemeBasePath + string("/") + string(find.cFileName);
!           ptr = strrchr(find.cFileName, '.');
!           if (ptr)
!                *ptr = 0;
!           oThemeFileMap[find.cFileName] = oThemeFile;
!       }
!       while(FindNextFile(handle, &find));
  
      oThemeBasePath = "./themes";
      oThemePath = oThemeBasePath + string("/*.fat");
      handle = FindFirstFile((char *)oThemePath.c_str(), &find);
!     if(handle != INVALID_HANDLE_VALUE)
!       do {
!           oThemeFile = oThemeBasePath + string("/") + string(find.cFileName);
!           ptr = strrchr(find.cFileName, '.');
!           if (ptr)
!                *ptr = 0;
!           oThemeFileMap[find.cFileName] = oThemeFile;
!       }
!       while(FindNextFile(handle, &find));
  
      return kError_NoErr;
  }
*** freeamp/ui/freeamp/unix/src/GTKWindow.cpp   Tue Oct 19 09:13:20 1999
--- ../patches/2.0/ui/freeamp/unix/src/GTKWindow.cpp    Wed Oct 20 22:56:43 1999
***************
*** 170,176 ****
  
      m_pCanvas->GetBackgroundRect(oRect);
      pOther->GetWindowPosition(oRect);
!     SetWindowPosition(oRect);
      GdkBitmap *mask = ((GTKCanvas *)m_pCanvas)->GetMask();
  
      gdk_threads_enter();
--- 170,176 ----
  
      m_pCanvas->GetBackgroundRect(oRect);
      pOther->GetWindowPosition(oRect);
!     pOther->SetWindowPosition(oRect);
      GdkBitmap *mask = ((GTKCanvas *)m_pCanvas)->GetMask();
  
      gdk_threads_enter();

Reply via email to