Bug#424943: suspend2-userui: Should not show the reboot option when resuming

2009-01-20 Thread Arnaud Fontaine
tags 424943 + pending patch
thanks

 Josh == Josh Triplett j...@freedesktop.org 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.0 +
+++ tuxonice-userui-0.7.3/userui_text.c	2009-01-20 05:53:22.0 +
@@ -77,11 +77,17 @@
  */
 static void update_help(int update_all)
 {
-	const char intro_text[] = %-18sR: %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, %-18sR: %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


pgpu4yna1Jhj9.pgp
Description: PGP signature


Bug#424943: suspend2-userui: Should not show the reboot option when resuming

2007-05-17 Thread Josh Triplett
Package: suspend2-userui
Version: 0.7.0-1
Severity: normal

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

- Josh Triplett

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-rc1 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages suspend2-userui depends on:
ii  libc6 2.5-7  GNU C Library: Shared libraries

Versions of packages suspend2-userui recommends:
ii  hibernate 1.94-2 smartly puts your computer to slee

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]