git://git.jankratochvil.net
/
udpgate.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a53bb8d
)
+Sanity check+warn if the registrance on/off succeeded but did not turn.
author
short
<>
Sun, 26 Jun 2005 04:04:35 +0000
(
04:04
+0000)
committer
short
<>
Sun, 26 Jun 2005 04:04:35 +0000
(
04:04
+0000)
src/startup.c
patch
|
blob
|
history
diff --git
a/src/startup.c
b/src/startup.c
index
d8e1928
..
e2607c1
100644
(file)
--- a/
src/startup.c
+++ b/
src/startup.c
@@
-45,7
+45,15
@@
gboolean is_on;
if (is_on==TRUE)
return TRUE;
if (is_on==TRUE)
return TRUE;
- return (*UDPGATE_STARTUP_GET_CLASS(udpgate_startup)->on)(udpgate_startup);
+ if (!(*UDPGATE_STARTUP_GET_CLASS(udpgate_startup)->on)(udpgate_startup))
+ return FALSE;
+ if (!udpgate_startup_query(udpgate_startup,&is_on))
+ return FALSE;
+ if (is_on!=TRUE) {
+ g_warning(_("Error registering automatic program startup!"));
+ return FALSE;
+ }
+ return TRUE;
}
gboolean udpgate_startup_off(UdpgateStartup *udpgate_startup)
}
gboolean udpgate_startup_off(UdpgateStartup *udpgate_startup)
@@
-59,7
+67,15
@@
gboolean is_on;
if (is_on==FALSE)
return TRUE;
if (is_on==FALSE)
return TRUE;
- return (*UDPGATE_STARTUP_GET_CLASS(udpgate_startup)->off)(udpgate_startup);
+ if (!(*UDPGATE_STARTUP_GET_CLASS(udpgate_startup)->off)(udpgate_startup))
+ return FALSE;
+ if (!udpgate_startup_query(udpgate_startup,&is_on))
+ return FALSE;
+ if (is_on!=FALSE) {
+ g_warning(_("Error removing program's system startup registrance!"));
+ return FALSE;
+ }
+ return TRUE;
}
UdpgateStartup *udpgate_startup_new(void)
}
UdpgateStartup *udpgate_startup_new(void)