Browse Source

add patch to allow more than 99 custom starters

master
Dor dicke Gind 2 years ago
parent
commit
a8e1745164
  1. 4
      PKGBUILD
  2. 29
      allow-more-than-99-starters.patch

4
PKGBUILD

@ -3,7 +3,7 @@
# Contributor: erm67 <erm67@yahoo.it> # Contributor: erm67 <erm67@yahoo.it>
pkgname=cairo-dock-git pkgname=cairo-dock-git
pkgver=3.4.1 pkgver=3.4.99.r.6c569e67
pkgrel=1 pkgrel=1
pkgdesc='Light eye-candy fully themable animated dock' pkgdesc='Light eye-candy fully themable animated dock'
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -27,6 +27,8 @@ pkgver() {
build() { build() {
cd cairo-dock cd cairo-dock
git apply ../../allow-more-than-99-starters.patch
if [[ -d build ]]; then if [[ -d build ]]; then
rm -rf build rm -rf build
fi fi

29
allow-more-than-99-starters.patch

@ -0,0 +1,29 @@
diff --git a/src/gldit/cairo-dock-utils.c b/src/gldit/cairo-dock-utils.c
index 76b6d6c6..3b05d22a 100644
--- a/src/gldit/cairo-dock-utils.c
+++ b/src/gldit/cairo-dock-utils.c
@@ -35,14 +35,20 @@ gchar *cairo_dock_generate_unique_filename (const gchar *cBaseName, const gchar
do
{
iPrefixNumber ++;
- g_string_printf (sFileName, "%s/%02d%s", cCairoDockDataDir, iPrefixNumber, cBaseName);
- } while (iPrefixNumber < 99 && g_file_test (sFileName->str, G_FILE_TEST_EXISTS));
+ if (iPrefixNumber < 100)
+ g_string_printf (sFileName, "%s/%02d%s", cCairoDockDataDir, iPrefixNumber, cBaseName);
+ else
+ g_string_printf (sFileName, "%s/%03d%s", cCairoDockDataDir, iPrefixNumber, cBaseName);
+
+ } while (iPrefixNumber < 1000 && g_file_test (sFileName->str, G_FILE_TEST_EXISTS));
g_string_free (sFileName, TRUE);
- if (iPrefixNumber == 99)
+ if (iPrefixNumber < 100)
+ return g_strdup_printf ("%02d%s", iPrefixNumber, cBaseName);
+ if (iPrefixNumber == 1000)
return NULL;
else
- return g_strdup_printf ("%02d%s", iPrefixNumber, cBaseName);
+ return g_strdup_printf ("%03d%s", iPrefixNumber, cBaseName);
}
Loading…
Cancel
Save