From: <dat...@us...> - 2006-11-17 01:11:20
|
Revision: 17762 http://svn.sourceforge.net/gaim/?rev=17762&view=rev Author: datallah Date: 2006-11-16 17:11:18 -0800 (Thu, 16 Nov 2006) Log Message: ----------- GTK+ Theme selection will now choose the system-wide theme if the installer is being run by the admin user. Also, the theme checkboxes can now be all unselected and we wont mess with the current theme selection. Modified Paths: -------------- trunk/gaim-installer.nsi Modified: trunk/gaim-installer.nsi =================================================================== --- trunk/gaim-installer.nsi 2006-11-17 00:41:28 UTC (rev 17761) +++ trunk/gaim-installer.nsi 2006-11-17 01:11:18 UTC (rev 17762) @@ -49,7 +49,6 @@ !insertmacro VersionCompare !include "TextFunc.nsh" -!insertmacro ConfigRead !insertmacro ConfigWriteS ;-------------------------------- @@ -487,7 +486,7 @@ ;-------------------------------- ;Shortcuts -SubSection /e $(GAIM_SHORTCUTS_SECTION_TITLE) SecShortcuts +SectionGroup /e $(GAIM_SHORTCUTS_SECTION_TITLE) SecShortcuts Section /o $(GAIM_DESKTOP_SHORTCUT_SECTION_TITLE) SecDesktopShortcut SetOverwrite on CreateShortCut "$DESKTOP\Gaim.lnk" "$INSTDIR\gaim.exe" @@ -499,12 +498,12 @@ CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" "$INSTDIR\gaim.exe" SetOverwrite off SectionEnd -SubSectionEnd +SectionGroupEnd ;-------------------------------- ;GTK+ Themes -SubSection /e $(GTK_THEMES_SECTION_TITLE) SecGtkThemes +SectionGroup /e $(GTK_THEMES_SECTION_TITLE) SecGtkThemes Section /o $(GTK_NOTHEME_SECTION_TITLE) SecGtkNone Push "Raleigh" Call WriteGtkThemeConfig @@ -524,12 +523,12 @@ Push "Lighthouseblue" Call WriteGtkThemeConfig SectionEnd -SubSectionEnd +SectionGroupEnd ;-------------------------------- ;Spell Checking -SubSection /e $(GAIM_SPELLCHECK_SECTION_TITLE) SecSpellCheck +SectionGroup /e $(GAIM_SPELLCHECK_SECTION_TITLE) SecSpellCheck Section /o $(GAIM_SPELLCHECK_BRETON) SecSpellCheckBreton Push ${SecSpellCheckBreton} Call InstallAspellAndDict @@ -618,7 +617,7 @@ Push ${SecSpellCheckUkrainian} Call InstallAspellAndDict SectionEnd -SubSectionEnd +SectionGroupEnd ;-------------------------------- ;Uninstaller Section @@ -822,25 +821,37 @@ ;Functions Function WriteGtkThemeConfig -Exch $0 -Push $1 + Exch $0 + Push $1 + Push $2 + Push $3 -ClearErrors -${ConfigRead} "$PROFILE\.gtkrc-2.0" "gtk-theme-name =" $1 -IfErrors new_file -${ConfigWriteS} "$PROFILE\.gtkrc-2.0" "gtk-theme-name =" "$\"$0$\"" $1 -Goto done + Call CheckUserInstallRights + Pop $2 + StrCmp $2 "HKLM" 0 user_theme -new_file: -ClearErrors -FileOpen $1 "$PROFILE\.gtkrc-2.0" w -FileWrite $1 "gtk-theme-name = $\"$0$\"" -FileClose $1 -Goto done + ; Global Theme + ReadRegStr $2 HKLM ${GTK_REG_KEY} "Path" + StrCpy $3 "$2\etc\gtk-2.0\gtkrc" + Goto update_theme + user_theme: + StrCpy $3 "$PROFILE\.gtkrc-2.0" -done: -Pop $1 -Pop $0 + update_theme: + IfFileExists $3 0 new_file + ${ConfigWriteS} $3 "gtk-theme-name =" " $\"$0$\"" $1 + Goto done + + new_file: + FileOpen $1 $3 w + FileWrite $1 "gtk-theme-name = $\"$0$\"" + FileClose $1 + + done: + Pop $3 + Pop $2 + Pop $1 + Pop $0 FunctionEnd !macro CheckUserInstallRightsMacro UN @@ -1177,7 +1188,7 @@ Push $1 Push $2 - !insertmacro StartRadioButtons $GTK_THEME_SEL + !insertmacro StartRadioButtonsUnselectable $GTK_THEME_SEL !insertmacro RadioButton ${SecGtkNone} !insertmacro RadioButton ${SecGtkWimp} !insertmacro RadioButton ${SecGtkBluecurve} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |