tags 424943 + pending patch
thanks

>>>>> "Josh" == Josh Triplett <[email protected]> writes:

Hi Josh,

    Josh> When resuming, the UI should not show the option to press R to
    Josh> reboot after suspending.

As the upstream author has never replied, and it was ages ago, I decided
to have a  look at the code and  make a patch. Sorry about  the delay, I
could  have  done  that  before  but  I  was  stuck  on  more  important
things. I'm attaching to this mail the patch I wrote and will include it
in the next upload which should happen soon...

Regards,
Arnaud Fontaine

diff --exclude=debian -urN tuxonice-userui-0.7.3.orig/userui_text.c tuxonice-userui-0.7.3/userui_text.c
--- tuxonice-userui-0.7.3.orig/userui_text.c	2009-01-08 01:56:27.000000000 +0000
+++ tuxonice-userui-0.7.3/userui_text.c	2009-01-20 05:53:22.000000000 +0000
@@ -77,11 +77,17 @@
  */
 static void update_help(int update_all)
 {
-	const char intro_text[] = "%-18s    R: %s reboot after suspend ";
-	move_cursor_to(video_num_columns - sizeof(intro_text) - 16, video_num_lines);
-	printf(intro_text, 
-			(can_use_escape) ? "Esc: Abort suspend / resume" : "",
+	char intro_text[64];
+
+	if (resuming)
+		sprintf(intro_text, "%-18s ", (can_use_escape) ? "Esc: Abort resume" : "");
+	else
+		sprintf(intro_text, "%-18s    R: %s reboot after suspend ",
+			(can_use_escape) ? "Esc: Abort suspend" : "",
 			(suspend_action & (1 << SUSPEND_REBOOT)) ?  "Disable":"Enable");
+
+	move_cursor_to(video_num_columns - sizeof(intro_text) - 16, video_num_lines);
+	printf(intro_text);
 }
 
 /* text_prepare_status

Attachment: pgpu4yna1Jhj9.pgp
Description: PGP signature

Reply via email to