Jump to content




Shutdown And Restart Buttons


28 replies to this topic

#1 Egor305

  • Members
  • 34 posts

Posted 01 September 2013 - 07:11 AM

I suggest, that computers (and turtles?) should have little sidebar in gui, that have shutdown and restart buttons.
I know that there's Ctrl-S and Ctrl-R, but sometimes, it's annoying when you need to hold Ctrl-R for 3 seconds. And sometimes you need to do it like 10 times in a row.
It's should be something like that: (well not exactly like that) Posted Image
Terminate button will be cheaty, cause you can do os.pullEvent=os.pullEvenRaw and use it as extra button.

#2 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 01 September 2013 - 07:26 AM

I second this idea!

#3 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 01 September 2013 - 07:32 AM

Thirded. Can't believe we don't have this already.

#4 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 01 September 2013 - 08:25 AM

Fourthded (nice word eh? :P) I do think it would make sense to have a GUI element to do these hard coded shortcuts. It adds for better compatibility, we can just say "click the button" instead of "press this button, unless you're in this locale, then press that one" :P Also to agree with OP even more, I have had times where the shortcuts just weren't being detected and I had to try it multiple times, so I think buttons would work nicely!

#5 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 01 September 2013 - 09:23 AM

I ... it! Yea, I dont know the word for it if its even one xD
But this will come in handy if the shell coroutine errored, you can easily restart the pc. Because then it most of the time doesnt detect the shortcut keys. I really support this since my program lately stops the shell coroutine a lot!

#6 M4sh3dP0t4t03

  • Members
  • 255 posts
  • LocationGermany

Posted 01 September 2013 - 09:48 AM

I also support this idea. But I think a power button would be enough and there is no need for a restart button(because you could just click the power button two times).


#7 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 01 September 2013 - 09:50 AM

View PostKingOfNoobs, on 01 September 2013 - 09:48 AM, said:

I also support this idea. But I think a power button would be enough and there is no need for a restart button(because you could just click the power button two times).
I think that shutdown, restart and terminate would be best

#8 electrodude512

  • Members
  • 167 posts
  • LocationEastern USA

Posted 01 September 2013 - 10:12 AM

View PostKingOfNoobs, on 01 September 2013 - 09:48 AM, said:

I also support this idea. But I think a power button would be enough and there is no need for a restart button(because you could just click the power button two times).

I agree with you; only a power button, no shutdown button.

This shutdown button should call os.shutdown() as opposed to just terminating the computer in case the user wants to override os.shutdown().

There shouldn't be a terminate button, but it would be nice ^T didn't take so long - instead, pushing ^T should immediately fire a terminate_warn event or something to that effect, and then the real terminate event will fire 3 seconds later like it does now. That way, you can terminate programs (that haven't crashed) more quickly. But this terminate_warn event can be easily done in code by a keyboard handler daemon.

#9 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 01 September 2013 - 10:57 AM

View PostKingOfNoobs, on 01 September 2013 - 09:48 AM, said:

I also support this idea. But I think a power button would be enough and there is no need for a restart button(because you could just click the power button two times).
Would also work fine


View PostZudoHackz, on 01 September 2013 - 09:50 AM, said:

I think that shutdown, restart and terminate would be best
I don't so much agree with terminate. It could cause problems if people override it in their programs, they could turn around and complain to Dan/Cloudy saying the button isn't working.


View Postelectrodude512, on 01 September 2013 - 10:12 AM, said:

This shutdown button should call os.shutdown() as opposed to just terminating the computer in case the user wants to override os.shutdown().
I don't agree with this, I feel that the usage of this button would better suit to use the Java-side shutdown over the Lua-side.

View Postelectrodude512, on 01 September 2013 - 10:12 AM, said:

There shouldn't be a terminate button, but it would be nice ^T didn't take so long - instead, pushing ^T should immediately fire a terminate_warn event or something to that effect, and then the real terminate event will fire 3 seconds later like it does now. That way, you can terminate programs (that haven't crashed) more quickly. But this terminate_warn event can be easily done in code by a keyboard handler daemon.
Uhhh what? there is a "terminate" event, this is given to the program when CTRL+T is held so that the program can handle it appropriately, whether it is to nicely quit, or to prevent terminating... Basically as it stands now, when people use any yielding functions (i.e. sleep, read, any turtle or http function, etc) those functions call `os.pullEvent`, which in turn calls `os.pullEventRaw`, which in turn calls `coroutine.yield`. The program waits at `coroutine.yield` until an event occurs, the event then gets passed all the way back to `os.pullEvent` it is in here that the "terminate" event is processed like so
function os.pullEvent( filter )
  local event = { os.pullEventRaw(filter) }
  if event[1] == "terminate" then
    error("Terminated", 0)
  end
  return unpack(event)
end
So basically what I'm saying here it that programs can be made in a way that doesn't terminate a program when CTRL+T is pressed so there is no need to having a "terminate_warn" event.

#10 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 01 September 2013 - 11:57 AM

Simply a power button will do. To compare it to real life:
where is your terminate button?
where is your reboot button?

And please dont say 'go to start and click there on reboot'. Im talking about the hardware.

#11 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 01 September 2013 - 11:58 AM

View PostEngineer, on 01 September 2013 - 11:57 AM, said:

where is your reboot button?
Well actually I used to have a full tower that had power, reboot, and sleep buttons on it.

#12 Egor305

  • Members
  • 34 posts

Posted 01 September 2013 - 12:23 PM

Wow, didn't know so many people will care about this...
How about SysRq button that will trigger "sysrq" event? It's like just what i said about terminate button, but terminate button is overpowered

#13 ElvishJerricco

  • Members
  • 803 posts

Posted 01 September 2013 - 12:55 PM

I like the idea well enough. But it's not hard to do this yourself in code as long as you're using an advanced computer. For that reason I could easily see one of the devs saying this idea's not gonna make it in.

#14 Sebra

  • Members
  • 726 posts

Posted 01 September 2013 - 01:22 PM

Idea is quite good really.
Power and Reset buttons like on real life computers.
I would not be against Terminate and would be glad if System key added to throw special event.
Place them on the border as small icons. Like window icons. May be with mouseover hints.

#15 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 01 September 2013 - 01:49 PM

View PostEgor305, on 01 September 2013 - 12:23 PM, said:

Wow, didn't know so many people will care about this...
How about SysRq button that will trigger "sysrq" event? It's like just what i said about terminate button, but terminate button is overpowered
I like this idea :)

#16 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 01 September 2013 - 01:57 PM

View PostElvishJerricco, on 01 September 2013 - 12:55 PM, said:

I like the idea well enough. But it's not hard to do this yourself in code as long as you're using an advanced computer. For that reason I could easily see one of the devs saying this idea's not gonna make it in.
Can you add GUI buttons with Lua code? Yes in the border, but if you see the image in the OP the buttons are outside the range of the screen where we as Lua programmers can reach.

#17 ElvishJerricco

  • Members
  • 803 posts

Posted 01 September 2013 - 04:01 PM

View PostEngineer, on 01 September 2013 - 01:57 PM, said:

View PostElvishJerricco, on 01 September 2013 - 12:55 PM, said:

I like the idea well enough. But it's not hard to do this yourself in code as long as you're using an advanced computer. For that reason I could easily see one of the devs saying this idea's not gonna make it in.
Can you add GUI buttons with Lua code? Yes in the border, but if you see the image in the OP the buttons are outside the range of the screen where we as Lua programmers can reach.

Yea but that's a rather unimportant distinction. A button is a button whether it's on the screen or on the edge

#18 Symmetryc

  • Members
  • 434 posts

Posted 01 September 2013 - 04:11 PM

I feel as though something as fundamental as being able to shutdown your computer shouldn't be a button that you have to code in yourself...

#19 ElvishJerricco

  • Members
  • 803 posts

Posted 01 September 2013 - 04:20 PM

View PostSymmetryc, on 01 September 2013 - 04:11 PM, said:

I feel as though something as fundamental as being able to shutdown your computer shouldn't be a button that you have to code in yourself...

Which is why the keyboard shortcuts exist. And don't get me wrong I'd like to have this included, but there's been countless suggestions denied because they could be easily programmed yourself. Obviously I can't know what the devs would say and I don't mean to speak for them. But if I were to guess based on past events, I'd say don't get your hopes up. Especially since the keyboard shortcuts are already good enough to function with.

#20 Symmetryc

  • Members
  • 434 posts

Posted 01 September 2013 - 04:27 PM

View PostElvishJerricco, on 01 September 2013 - 04:20 PM, said:

View PostSymmetryc, on 01 September 2013 - 04:11 PM, said:

I feel as though something as fundamental as being able to shutdown your computer shouldn't be a button that you have to code in yourself...

Which is why the keyboard shortcuts exist. And don't get me wrong I'd like to have this included, but there's been countless suggestions denied because they could be easily programmed yourself. Obviously I can't know what the devs would say and I don't mean to speak for them. But if I were to guess based on past events, I'd say don't get your hopes up. Especially since the keyboard shortcuts are already good enough to function with.
I understand what you're saying and I see you're point, but I still think that clearly defined button trumps any keyboard shortcut that requires previous knowledge in order to operate.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users