Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (12) </ ... 4 5 6 7 8 [9] 10 11 12 >/

[ Track this topic :: Email this topic :: Print this topic ]

new topic new poll
Topic: DSL v4.0rc5< Next Oldest | Next Newest >
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Oct. 17 2007,01:40 QUOTE

Quote
I haven't looked at your (robert's) code yet, but I plan to make a slight modification to exit.lua. Its current behavior, if you uncheck "backup" and then select "reboot" (or "shutdown" if reboot is already selected), is to automatically re-check "backup". This doesn't seem like a logical behavior, and I assume it will be a minor thing to change.

I did that by design. Intended to be pesky. Don't want no oops; lost data as no backup.
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Oct. 17 2007,02:28 QUOTE

I see.

Well, anyway, I messed with it=o)

Regardless of whether or not you want to encourage the backup, there were two things about the script that I didn't think are necessary. The first (w:callback) I'm not sure about, but the second (backupBtn:callback) I'm pretty sure is a kluge for a bug created by the use of backupBtn:type(). "type" when applied to buttons implies button type, but the type you supplied was a box type. I can't see why this would cause the check button to consistently be "on", but removing the type line stopped it.

Code Sample


[code]w = fltk:Fl_Double_Window(205, 175, "DSL Exit Options")
--[[
-- I don't think this is needed?
w:callback(
function(w)
 os.exit(0)
end)
]]

shutdownGroup = fltk:Fl_Group(40, 15, 135, 75)

shutdownBtn = fltk:Fl_Round_Button(55, 15, 95, 25, "Shutdown")
shutdownBtn:type(fltk.FL_RADIO_BUTTON)
shutdownBtn:value(1)
shutdownBtn:callback(
function(shutdownBtn)
--  backupBtn:value(1)
 backupBtn:show()
end)

rebootBtn = fltk:Fl_Round_Button(55, 35, 100, 25, "Reboot")
rebootBtn:type(fltk.FL_RADIO_BUTTON)
rebootBtn:value(0)
rebootBtn:callback(
function(rebootBtn)
--  backupBtn:value(1)
 backupBtn:show()
end)

promptBtn = fltk:Fl_Round_Button(55, 55, 115, 25, "Exit to Prompt");
promptBtn:type(fltk.FL_RADIO_BUTTON)
promptBtn:value(0)
promptBtn:callback(
function(promptBtn)
--  backupBtn:value(0)
 backupBtn:hide()
end)

fltk:Fl_End()  -- End of shutdown group

backupBtn = fltk:Fl_Check_Button(70, 85, 80, 30, "Backup")
backupBtn:tooltip("Uncheck to skip backup")
backupBtn:value(1)
--[[
-- I know this isn't needed. The value of backupBtn will normally
-- change itself automatically. Setting the button type to a
-- boxtype causes the problem that this callback fixes.
backupBtn:type(fltk.FL_DOWN_BOX)
backupBtn:callback(
function(backupBtn)
 if backupBtn:value() == 0 then
   backupBtn:value(1)
 else
   backupBtn:value(0)
 end
end)
]]

--[[ the backup and reboot checks are now nested
    inside the prompt check. If the prompt is
    true, the others are not checked, and there
    is no need to check backup
]]
okBtn = fltk:Fl_Return_Button(25, 130, 60, 25, "OK")
okBtn:callback(
function(okBtn)
 if promptBtn:value() == 1 then
    os.execute("pidof jwm >/dev/null && pkill jwm")
    os.execute("pidof fluxbox && pkill fluxbox")
    os.execute("pidof swm && pkill swm")
    os.exit(0)
 else
    if backupBtn:value() == 0 then
       os.execute("> /opt/.backup_device")
       backupReq = ""
    else
       backupReq = "yes"
    end
    if rebootBtn:value() == 1 then
       os.execute("/usr/local/bin/exitcheck.sh reboot " .. backupReq)
    else
       os.execute("/usr/local/bin/exitcheck.sh shutdown " .. backupReq)
    end
 end
 os.exit(0)
end)

cancelBtn = fltk:Fl_Button(115, 130, 60, 25, "Cancel")
cancelBtn:callback(
function(cancelBtn)
 os.exit(1)
end)

w:show()
Fl:run()


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
ChiJoan Offline





Group: Members
Posts: 4
Joined: July 2005
Posted: Oct. 17 2007,05:39 QUOTE

I agree about the NAG screen to backup, I knew there was a three-finger salute or two to cure that.  But I prefer how Puppy gives you three choices instead.

I came across some old laptops so I'm trying DSL 4.5 on them.  Tonight it was the WinBook XL2 with a P2 in it and about 200 MB of RAM.  It had no problems so far and I first tried my Dlink NIC PC Card, then I tried the Belkin USB to NIC in the 2-port USB PC Card as I'm typing on it.

DSL saw the sound card, but I didn't hear anything.  I'm just happy the old ATI video onboard is supported and that it didn't stall out on the PC Card testing.

If I buy one of your fine books will I be entitled to the corrected info for the newer version 4 or 5 of DSL?

Thanks for DSL,
ChiJoan
Back to top
Profile PM 
Richard (MQ) Offline





Group: Members
Posts: 6
Joined: Sep. 2007
Posted: Oct. 17 2007,19:27 QUOTE

My ancient Toshiba Tecra is now on-line with DSL 4.0-rc5 but without any sound. It worked in M$ win98...

BIOS settings say 'Soundblaster', 0x220, IRQ5, DMA1 so I tried
Code Sample
modprobe sb io=0x220 irq=5 dma=1
. This looks OK and the mixer starts but as soon as I 'play' anything it locks up!

Is there a lua gui for configuring sound? I can't find anything.

Cheers
Richard (MQ)
Back to top
Profile PM 
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: Oct. 17 2007,20:59 QUOTE

Quote (roberts @ Oct. 16 2007,07:48)
Neverless, I have script updated many extensions to add a resized 32x32 .xpm icon. The original 48x48 icon in .xtdesktop remains for continued compatibiliy with DSL 3.x and prior versions.

Now when 4.0 is loading an extension, either at boot up or dynamically a check is made to see if an xpm icon is in /tmp/mydsl.icons and if so the application specific one is used otherwise the fallback generic "open box" icon will be used.

So let me get this straight, future extension makers catering for
both 4.x and pre-4.x will put a 48x48 icon in .xtdesktop as usual, and add a 32x32 icon in /tmp/mydsl.icons/ ?
Back to top
Profile PM 
59 replies since Oct. 09 2007,04:13 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (12) </ ... 4 5 6 7 8 [9] 10 11 12 >/
new topic new poll
Quick Reply: DSL v4.0rc5

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code