@@ -711,17 +695,17 @@ def infoDIALOG(dlg) # order out info window if $isDIALOG2 - $infoToken = %x{#{$DIALOG} nib --load help --model "{title='GetBundles — Info';path='#{$tempDir}/info.html';}" } + $infoToken = %x{"$DIALOG" nib --load help --model "{title='GetBundles — Info';path='#{$tempDir}/info.html';}" } else - $infoToken = %x{#{$DIALOG} -a help -p "{title='GetBundles — Info';path='#{$tempDir}/info.html';}"} + $infoToken = %x{"$DIALOG" -a help -p "{title='GetBundles — Info';path='#{$tempDir}/info.html';}"} end # close old info window if it exists # unless $infoTokenOld.nil? # if $isDIALOG2 - # %x{#{$DIALOG} nib close #{$infoTokenOld}} + # %x{"$DIALOG" nib close #{$infoTokenOld}} # else - # %x{#{$DIALOG} -x#{$infoTokenOld}} + # %x{"$DIALOG" -x#{$infoTokenOld}} # end # end @@ -737,9 +721,9 @@ def askDIALOG(msg, text, btn1="No", btn2="Yes", style="informational") resStr = 0 if $isDIALOG2 - resStr = %x{#{$DIALOG} alert --alertStyle #{style} --body "#{msg}" --title "#{text}" --button1 "#{btn1}" --button2 "#{btn2}"} + resStr = %x{"$DIALOG" alert --alertStyle #{style} --body "#{msg}" --title "#{text}" --button1 "#{btn1}" --button2 "#{btn2}"} else - resStr = %x{#{$DIALOG} -e -p '{messageTitle="#{msg}";alertStyle=#{style};informativeText="#{text}";buttonTitles=("#{btn1}","#{btn2}");}'} + resStr = %x{"$DIALOG" -e -p '{messageTitle="#{msg}";alertStyle=#{style};informativeText="#{text}";buttonTitles=("#{btn1}","#{btn2}");}'} return resStr.to_i end @@ -1142,9 +1126,9 @@ def buildLocalBundleList res = nil begin if $isDIALOG2 - res = OSX::PropertyList.load(%x{#{$DIALOG} nib --load ResolveSources --model #{e_sh parameters.to_plist}})['result'] + res = OSX::PropertyList.load(%x{"$DIALOG" nib --load ResolveSources --model #{e_sh parameters.to_plist}})['result'] else - res = OSX::PropertyList.load(%x{#{$DIALOG} -m ResolveSources -p #{e_sh parameters.to_plist}})['result'] + res = OSX::PropertyList.load(%x{"$DIALOG" -m ResolveSources -p #{e_sh parameters.to_plist}})['result'] end rescue writeToLogFile("Error while retrieving data from “Resolve Sources” dialog\n#{$!}") @@ -1424,9 +1408,10 @@ def installBundles(dlg) updateDIALOG break if $close - + # deleteBundle($dataarray[item.to_i]['uuid']) if $dataarray[item.to_i]['nameColor'] != '#000000' + case mode - when "svn" + when "svn" installSVN(name, path) when "tar" installTAR(name, path, zip_path) @@ -1445,8 +1430,13 @@ def installBundles(dlg) $errorcnt = 0 break end + + # if File.directory?("#{$pristineCopyFolder}/Bundles/#{bundleData['name']}.tmbundle") $gbPlist['bundleSources'][bundleData['uuid']] = path writeGbPlist + # else + # p "Installation of the bundle “bundleData['name]” was probably canceled by the ‘Bundle Editor’" + # end end $params['isBusy'] = false