new function to get the correct screensaver command to run. (apply_config,
2005-07-20 Rodrigo Moya <rodrigo@novell.com> * main.c (get_screensaver_command): new function to get the correct screensaver command to run. (apply_config, revert_config): use gnome-screensaver if available.
This commit is contained in:
parent
c6f063ff7a
commit
cf87a9a2c9
2 changed files with 26 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-07-20 Rodrigo Moya <rodrigo@novell.com>
|
||||
|
||||
* main.c (get_screensaver_command): new function to get the correct
|
||||
screensaver command to run.
|
||||
(apply_config, revert_config): use gnome-screensaver if available.
|
||||
|
||||
2005-02-08 Sebastien Bacher <seb128@debian.org>
|
||||
|
||||
* main.c: (wrap_in_label):
|
||||
|
|
|
@ -191,10 +191,17 @@ apply_config (struct DisplayInfo *info)
|
|||
|
||||
update_display_info (info, display);
|
||||
|
||||
/* xscreensaver should handle this itself, but does not currently so we hack
|
||||
* it. Ignore failures in case xscreensaver is not installed */
|
||||
if (changed)
|
||||
g_spawn_command_line_async ("xscreensaver-command -restart", NULL);
|
||||
if (changed) {
|
||||
gchar *cmd;
|
||||
|
||||
if ((cmd = g_find_program_in_path ("gnome-screensaver-command")))
|
||||
g_free (cmd);
|
||||
else {
|
||||
/* xscreensaver should handle this itself, but does not currently so we hack
|
||||
* it. Ignore failures in case xscreensaver is not installed */
|
||||
g_spawn_command_line_async ("xscreensaver-command -restart", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
@ -206,6 +213,7 @@ revert_config (struct DisplayInfo *info)
|
|||
GdkDisplay *display;
|
||||
Display *xdisplay;
|
||||
GdkScreen *screen;
|
||||
char *cmd;
|
||||
|
||||
display = gdk_display_get_default ();
|
||||
xdisplay = gdk_x11_display_get_xdisplay (display);
|
||||
|
@ -240,10 +248,14 @@ revert_config (struct DisplayInfo *info)
|
|||
generate_rate_menu (screen_info);
|
||||
}
|
||||
|
||||
/* xscreensaver should handle this itself, but does not currently so we hack
|
||||
* it. Ignore failures in case xscreensaver is not installed */
|
||||
g_spawn_command_line_async ("xscreensaver-command -restart", NULL);
|
||||
|
||||
if ((cmd = g_find_program_in_path ("gnome-screensaver-command")))
|
||||
g_free (cmd);
|
||||
else {
|
||||
/* xscreensaver should handle this itself, but does not currently so we hack
|
||||
* it. Ignore failures in case xscreensaver is not installed */
|
||||
g_spawn_command_line_async ("xscreensaver-command -restart", NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue