Skip to content

Commit 0341890

Browse files
author
Sebastien Bourdeauducq
committedNov 27, 2011
shutdown: simplify
1 parent adc8774 commit 0341890

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed
 

Diff for: ‎src/gui/shutdown.c

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Flickernoise
3-
* Copyright (C) 2010 Sebastien Bourdeauducq
3+
* Copyright (C) 2010, 2011 Sebastien Bourdeauducq
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -50,21 +50,18 @@ void init_shutdown()
5050
mtk_cmd_seq(appid,
5151
"g = new Grid()",
5252
"g2 = new Grid()",
53-
"l = new Label(-text \"Do you want to power off or reboot the system?\")",
54-
"b_shutdown = new Button(-text \"Power off\")",
55-
"b_reboot = new Button(-text \"Reboot\")",
53+
"l = new Label(-text \"Are you sure?\")",
54+
"b_shutdown = new Button(-text \"Shutdown\")",
5655
"b_cancel = new Button(-text \"Cancel\")",
5756
"g.place(l, -column 1 -row 1)",
5857
"g.rowconfig(1, -size 50)",
5958
"g2.place(b_shutdown, -column 1 -row 1)",
60-
"g2.place(b_reboot, -column 2 -row 1)",
61-
"g2.place(b_cancel, -column 3 -row 1)",
59+
"g2.place(b_cancel, -column 2 -row 1)",
6260
"g.place(g2, -column 1 -row 2)",
6361
"w = new Window(-content g -title \"Shutdown\")",
6462
0);
6563

6664
mtk_bind(appid, "b_shutdown", "clack", shutdown_callback, (void *)1);
67-
mtk_bind(appid, "b_reboot", "clack", shutdown_callback, (void *)0);
6865

6966
mtk_bind(appid, "b_cancel", "clack", cancel_callback, NULL);
7067
mtk_bind(appid, "w", "close", cancel_callback, NULL);

Diff for: ‎src/shortcuts.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void shortcuts_callback(mtk_event *e, int count)
7676
else if(e[i].press.code == MTK_KEY_LEFTALT)
7777
alt = 1;
7878
else if(ctrl && alt && (e[i].press.code == MTK_KEY_DELETE))
79-
clean_shutdown(0);
79+
clean_shutdown(1);
8080
else if(ctrl && (e[i].press.code == MTK_KEY_F1))
8181
switch_resolution();
8282
else if(ctrl && (e[i].press.code == MTK_KEY_PAUSE))

Diff for: ‎src/translations/french.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,7 @@ struct mtk_i18n_entry translation_french[] = {
246246
"Web: www.milkymist.org" },
247247

248248
// Shutdown
249-
{ "Do you want to power off or reboot the system?", "Souhaitez-vous arr\xea""ter ou red\xe9""marrer le syst\xe8""me ?" },
250-
{ "Power off", "Arr\xea""ter" },
251-
{ "Reboot", "Red\xe9""marrer" },
249+
{ "Are you sure?", "Confirmation:" },
252250

253251
{ "Messagebox", "Bo\xee""te de message" },
254252

0 commit comments

Comments
 (0)
Please sign in to comment.