diff options
author | Dylan Carlson <absinthe@gentoo.org> | 2003-06-09 07:07:37 +0000 |
---|---|---|
committer | Dylan Carlson <absinthe@gentoo.org> | 2003-06-09 07:07:37 +0000 |
commit | 8608a779939ef5e5096259dc6eb677ad2f62b8f6 (patch) | |
tree | 18d2d04365f6a2d96077eee781486cd0e9009bbc /x11-misc/idesk | |
parent | Version bump. We probably should never mark this version as stable as (diff) | |
download | historical-8608a779939ef5e5096259dc6eb677ad2f62b8f6.tar.gz historical-8608a779939ef5e5096259dc6eb677ad2f62b8f6.tar.bz2 historical-8608a779939ef5e5096259dc6eb677ad2f62b8f6.zip |
Added single-click/clickbox patch.
Diffstat (limited to 'x11-misc/idesk')
-rw-r--r-- | x11-misc/idesk/ChangeLog | 13 | ||||
-rw-r--r-- | x11-misc/idesk/Manifest | 12 | ||||
-rw-r--r-- | x11-misc/idesk/files/digest-idesk-0.3.5-r2 | 1 | ||||
-rw-r--r-- | x11-misc/idesk/files/idesk-0.3.5-clickbox-and-singleclick.patch | 207 | ||||
-rw-r--r-- | x11-misc/idesk/idesk-0.3.5-r2.ebuild | 46 |
5 files changed, 278 insertions, 1 deletions
diff --git a/x11-misc/idesk/ChangeLog b/x11-misc/idesk/ChangeLog index 14c244d2e0cf..3781b18b4e09 100644 --- a/x11-misc/idesk/ChangeLog +++ b/x11-misc/idesk/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for x11-misc/idesk # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/idesk/ChangeLog,v 1.6 2003/02/12 09:29:26 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/idesk/ChangeLog,v 1.7 2003/06/09 07:07:33 absinthe Exp $ + +*idesk-0.3.5-r2 (09 Jun 2003) + + 09 Jun 2003; Dylan Carlson <absinthe@gentoo.org> idesk-0.3.5-r2.ebuild, + files/idesk-0.3.5-clickbox-and-singleclick.patch: + Added the "clickbox-and-singleclick" patch. What this does is makes + double-clicking & single-clicking user selectable. See the README for + more specific detail on how to add this to your .ideskrc. + + This patch was pulled from Slackware, but not 100% sure who credit + should go to. Please contact me if you have this information. *idesk-0.3.5-r1 (07 Dec 2002) diff --git a/x11-misc/idesk/Manifest b/x11-misc/idesk/Manifest index e69de29bb2d1..21e631d59292 100644 --- a/x11-misc/idesk/Manifest +++ b/x11-misc/idesk/Manifest @@ -0,0 +1,12 @@ +MD5 aa24bca5b5d637121b5fc16b9a55a84d idesk-0.3.5-r1.ebuild 1749 +MD5 1e2f5916f5d6b5ff9c816fd1decc2f10 idesk-0.3.3.ebuild 1739 +MD5 4921b8b75ad4682f8c17210c9e57de1f idesk-0.3.5.ebuild 1739 +MD5 de159bc9c928a82b224cff25432bf349 idesk-0.3.5-r2.ebuild 1807 +MD5 7174d8dbede1c0bded84fdb5372ef427 ChangeLog 1399 +MD5 c05165d09278f218e5eafbbd3e188f86 idesk-0.3.4.ebuild 1739 +MD5 8b29339fdf933c6dfac6f605f3b306e4 files/idesk-0.3.5-clickbox-and-singleclick.patch 6762 +MD5 2aae27b79a7df7030bfec00195d5a04c files/digest-idesk-0.3.3 61 +MD5 3ca11c23ec8a78f704507b8d75fee01f files/digest-idesk-0.3.4 61 +MD5 cf9fcef8d97bb24948cfe2ee88de481e files/digest-idesk-0.3.5 61 +MD5 cf9fcef8d97bb24948cfe2ee88de481e files/digest-idesk-0.3.5-r1 61 +MD5 cf9fcef8d97bb24948cfe2ee88de481e files/digest-idesk-0.3.5-r2 61 diff --git a/x11-misc/idesk/files/digest-idesk-0.3.5-r2 b/x11-misc/idesk/files/digest-idesk-0.3.5-r2 new file mode 100644 index 000000000000..4252c52b980f --- /dev/null +++ b/x11-misc/idesk/files/digest-idesk-0.3.5-r2 @@ -0,0 +1 @@ +MD5 4c87edbc3d7db462df576b7e26a04161 idesk-0.3.5.tar.gz 7966 diff --git a/x11-misc/idesk/files/idesk-0.3.5-clickbox-and-singleclick.patch b/x11-misc/idesk/files/idesk-0.3.5-clickbox-and-singleclick.patch new file mode 100644 index 000000000000..3faa33b87128 --- /dev/null +++ b/x11-misc/idesk/files/idesk-0.3.5-clickbox-and-singleclick.patch @@ -0,0 +1,207 @@ +diff -ru idesk-0.3.5/Desk.cc idesk-0.3.5-simeng/Desk.cc +--- idesk-0.3.5/Desk.cc 2002-11-09 19:06:16.000000000 +0100 ++++ idesk-0.3.5-simeng/Desk.cc 2003-02-14 02:56:30.000000000 +0100 +@@ -100,7 +100,12 @@ + + if( HighContrast ) + Back.color.alpha = 21845; +- ++ ++ if ( !strcmp( (char*)Config->Query( "DoubleClick" ).c_str(), "true" ) ) ++ DoubleClick = true; ++ else ++ DoubleClick = false; ++ + Transparency = atoi( (char*)Config->Query( "Transparency" ).c_str() ); + + if( !strcmp( ( char * )Config->Query( "Locked" ).c_str(), "true" ) ) LockDesk(); +@@ -123,13 +128,22 @@ + for(int i=0; i<FileCount; i++) { + FileName = DirName + Files[i]->d_name; + IconDb = new Database(FileName); +- if(!(IconTb = IconDb->Query("Icon"))) ++ ++ if(IconDb->Tables.size() == 0) + { + free( Files[ i ] ); + delete IconDb; + continue; + } +- AddIcon( (char*)FileName.c_str(), (char*)IconTb->Query("Icon").c_str(), (char*)IconTb->Query("Caption").c_str(), (char*)IconTb->Query("Command").c_str(), atoi(IconTb->Query("X").c_str()), atoi(IconTb->Query("Y").c_str()) ); ++ for (int y=0; y<IconDb->Tables.size(); y++) { ++ IconTb = IconDb->Tables[y]; ++ AddIcon( (char*)FileName.c_str(), ++ (char*)IconTb->Query("Icon").c_str(), ++ (char*)IconTb->Query("Caption").c_str(), ++ (char*)IconTb->Query("Command").c_str(), ++ atoi(IconTb->Query("X").c_str()), ++ atoi(IconTb->Query("Y").c_str()) ); ++ } + free( Files[ i ] ); + delete IconDb; + delete IconTb; +@@ -151,12 +165,20 @@ + char Num[10]; + + IconDb = new Database(I->FileName); +- if(!(IconTb = IconDb->Query("Icon"))) return; +- sprintf(Num, "%d", I->X); +- IconTb->Set("X", Num); +- sprintf(Num, "%d", I->Y); +- IconTb->Set("Y", Num); ++ if(IconDb->Tables.size() == 0) return; ++ ++ for (int i=0; i<IconDb->Tables.size(); i++) { ++ IconTb = IconDb->Tables[i]; ++ if (IconTb->Query("Caption") == I->Caption) ++ { ++ sprintf(Num, "%d", I->X); ++ IconTb->Set("X", Num); ++ sprintf(Num, "%d", I->Y); ++ IconTb->Set("Y", Num); ++ } ++ } + IconDb->Write(); ++ delete IconTb; + delete IconDb; + } + +@@ -292,6 +314,10 @@ + return( Transparency ); + } + ++ bool Desk::GetDoubleClick( ) { ++ return( DoubleClick ); ++ } ++ + bool Desk::GetContrast( ) { + return( HighContrast ); + } +diff -ru idesk-0.3.5/Desk.h idesk-0.3.5-simeng/Desk.h +--- idesk-0.3.5/Desk.h 2002-11-09 19:06:16.000000000 +0100 ++++ idesk-0.3.5-simeng/Desk.h 2003-02-14 02:47:20.000000000 +0100 +@@ -24,6 +24,7 @@ + bool Locked; + bool HighContrast; + bool ShadowFlag; ++ bool DoubleClick; + int ShadowX; + int ShadowY; + int BoldVal; +@@ -44,6 +45,7 @@ + void SaveIcon( Icon *I ); + void Loop(); + int GetTransparency( ); ++ bool GetDoubleClick( ); + bool GetContrast( ); + bool GetShadow(int &x, int &y ); + +diff -ru idesk-0.3.5/Icon.cc idesk-0.3.5-simeng/Icon.cc +--- idesk-0.3.5/Icon.cc 2002-11-09 19:06:16.000000000 +0100 ++++ idesk-0.3.5-simeng/Icon.cc 2003-02-14 02:57:27.000000000 +0100 +@@ -73,14 +73,11 @@ + + for( int i=0, a=0; i<(3*Width*Height); i+=3, a++) { + int alevel = ( (alpha_levels != 0) ? alpha_levels[a] : 255 ); +- if( alevel == 0 ) { bgrgb[i] = bgrgb[i+2] = 255; bgrgb[i+1] = 0; continue; } + bgrgb[i+0] = (bgrgb[i+0] * (255-alevel))/255 + (rgb[i+0] * alevel)/255; + bgrgb[i+1] = (bgrgb[i+1] * (255-alevel))/255 + (rgb[i+1] * alevel)/255; + bgrgb[i+2] = (bgrgb[i+2] * (255-alevel))/255 + (rgb[i+2] * alevel)/255; + } + +- ImlibColor IClr={255,0,255,0}; +- Imlib_set_image_shape(D->Data, Bg, &IClr); + Imlib_apply_image( D->Data, Bg, Win ); + + Imlib_kill_image( D->Data, Bg ); +@@ -146,17 +143,33 @@ + + bool locked = D->IsLocked(); + +- if( Ev->type == ButtonRelease ) ++ if( D->GetDoubleClick() ) + { +- // Something of a special case. +- if( Ev->xbutton.time - Time <= 200 ) ++ if( Ev->type == ButtonRelease ) + { +- D->Execute( Command ); +- Time = 0; ++ // Something of a special case. Doubleclick ++ if( Ev->xbutton.time - Time <= 200 ) ++ { ++ D->Execute( Command ); ++ Time = 0; ++ } ++ else Time = Ev->xbutton.time; + } +- else Time = Ev->xbutton.time; + } +- ++ else ++ { ++ // If buttontime is less than 200ms we click, else we drag. Singleclick ++ if( Ev->type == ButtonPress ) ++ Time = Ev->xbutton.time; ++ ++ if( Ev->type == ButtonRelease && ++ Ev->xbutton.time - Time <= 200 ) ++ { ++ D->Execute( Command ); ++ Time = 0; ++ } ++ } ++ + if( locked ) return; + + switch( Ev->type ) +diff -ru idesk-0.3.5/Icon.h idesk-0.3.5-simeng/Icon.h +--- idesk-0.3.5/Icon.h 2002-10-28 22:30:03.000000000 +0100 ++++ idesk-0.3.5-simeng/Icon.h 2003-02-13 21:46:42.000000000 +0100 +@@ -7,7 +7,7 @@ + class Icon { + private: + Desk *D; +- char *Command, *Caption; ++ char *Command; + XGlyphInfo FontInfo; + bool FreeAlpha; + bool Glowing; +@@ -18,6 +18,7 @@ + + Window Win, Text; + XftDraw *Draw; ++ char *Caption; + char FileName[128]; + unsigned char *rgb, *alpha, *alpha2; + int LoadPng( char *filename ); +diff -ru idesk-0.3.5/README idesk-0.3.5-simeng/README +--- idesk-0.3.5/README 2002-11-09 19:06:16.000000000 +0100 ++++ idesk-0.3.5-simeng/README 2003-02-14 03:05:08.000000000 +0100 +@@ -26,6 +26,7 @@ + PaddingY: 25 + Locked: false + HighContrast: false ++ DoubleClick: true + Transparency: 150 + Shadow: true + ShadowColor: #000000 +@@ -41,6 +42,9 @@ + it is true. It will draw it in an arbitary colour if it "#aa00aa", for + example. And it will not draw anything at all if it is set to "false". + ++"DoubleClick" when set true it requires you to doubleclick on an icon to ++execute programs while only a single click is required when set to false. ++ + "Shadow" is boolean (true/false). Turning this on will draw a drop shadow + of color ShadowColor behind the text. The shadow will be ShadowX pixels right + and ShadowY pixels down (negative values will work). Both ShadowX and ShadowY +@@ -62,7 +66,7 @@ + executes the command you assigned it. + + You can double-middle click on any icon to reload the icon files in the +-.idestop directory and the .ideskrc settings. ++.idesktop directory and the .ideskrc settings. + + After you move your icons around to get them where you want them, you can + change "Locked" from false to true in the config file. diff --git a/x11-misc/idesk/idesk-0.3.5-r2.ebuild b/x11-misc/idesk/idesk-0.3.5-r2.ebuild new file mode 100644 index 000000000000..1b35b3971a6d --- /dev/null +++ b/x11-misc/idesk/idesk-0.3.5-r2.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/idesk/idesk-0.3.5-r2.ebuild,v 1.1 2003/06/09 07:07:33 absinthe Exp $ +DESCRIPTION="Utility to place icons on the root window" + +HOMEPAGE="http://linuxhelp.hn.org/idesk.php" +SRC_URI="http://linuxhelp.hn.org/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~x86 ~ppc" + +DEPEND=">media-libs/imlib-1.9.14 + virtual/x11 + media-libs/freetype" + +S="${WORKDIR}/${P}" + +src_unpack() { + unpack ${A} + cd ${S} + + # fix for xft2 the ugly way + CXXFLAGS="${CXXFLAGS} -I/usr/include/freetype2 -U__linux__" + #Allow for more robust CXXFLAGS + mv Makefile Makefile.orig + sed -e "s:-g -O2:${CXXFLAGS}:" Makefile.orig > Makefile +} + +src_compile() { + epatch ${FILESDIR}/${P}-clickbox-and-singleclick.patch + emake || die +} + +src_install() { + exeinto /usr/bin + doexe idesk + dodoc README +} + +pkg_postinst() { + einfo + einfo "NOTE: Please refer to ${HOMEPAGE}" + einfo "NOTE: For info on configuring ${PN}" + einfo +} |