diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-12 17:56:39 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-12 17:56:39 -0500 |
commit | e2c5ea4cdad7dbb560be87a7d3c894e980b5ab6f (patch) | |
tree | b2717634a496f982c82b13c6aa67252caad85268 /kcontrol | |
parent | 1346f6898707e6a4d95abee07c3d1608fc056998 (diff) | |
parent | 68cfc4fec0fed7ef4da9f03da68bd61900654ee3 (diff) | |
download | tdebase-e2c5ea4cdad7dbb560be87a7d3c894e980b5ab6f.tar.gz tdebase-e2c5ea4cdad7dbb560be87a7d3c894e980b5ab6f.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdebase
Diffstat (limited to 'kcontrol')
-rw-r--r-- | kcontrol/clock/main.cpp | 5 | ||||
-rw-r--r-- | kcontrol/info/info_openbsd.cpp | 2 | ||||
-rw-r--r-- | kcontrol/tdefontinst/tdefontinst/GetPid.c | 20 | ||||
-rw-r--r-- | kcontrol/tdm/tdm-shut.cpp | 4 |
4 files changed, 25 insertions, 6 deletions
diff --git a/kcontrol/clock/main.cpp b/kcontrol/clock/main.cpp index 5508d91ac..a59599b71 100644 --- a/kcontrol/clock/main.cpp +++ b/kcontrol/clock/main.cpp @@ -80,8 +80,13 @@ KclockModule::KclockModule(TQWidget *parent, const char *name, const TQStringLis void KclockModule::save() { // The order here is important +#ifdef __OpenBSD__ + tzone->save(); + dtime->save(); +#else dtime->save(); tzone->save(); +#endif // Tell the clock applet about the change so that it can update its timezone kapp->dcopClient()->send( "kicker", "ClockApplet", "reconfigure()", TQByteArray() ); diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp index 12ec8ee2d..7b484da76 100644 --- a/kcontrol/info/info_openbsd.cpp +++ b/kcontrol/info/info_openbsd.cpp @@ -235,7 +235,7 @@ bool GetInfo_Sound (TQListView *lbox) if ((pos = s.find("at ")) >= 0) { pos += 3; // skip "at " start = end = s.ascii(); - for(; (*end!=':') && (*end!='\n'); end++); + for(; *end && (*end!=':') && (*end!='\n'); end++); len = end - start; dev = (char *) malloc(len + 1); strncpy(dev, start, len); diff --git a/kcontrol/tdefontinst/tdefontinst/GetPid.c b/kcontrol/tdefontinst/tdefontinst/GetPid.c index 015ea7ce9..1a633a76b 100644 --- a/kcontrol/tdefontinst/tdefontinst/GetPid.c +++ b/kcontrol/tdefontinst/tdefontinst/GetPid.c @@ -55,6 +55,7 @@ Linux Tested on Linux 2.4 FreeBSD Tested on FreeBSD 5.1 by Brian Ledbetter <brian@shadowcom.net> NetBSD + OpenBSD Irix Solaris Tested on Solaris 8 x86 by Torsten Kasch <tk@Genetik.Uni-Bielefeld.DE> HP-UX Tested on HP-UX B.11.11 U 9000/800 @@ -82,7 +83,7 @@ 6. Email me and let me know if it works! */ -#if defined OS_Linux || defined __Linux__ +#if defined OS_Linux || defined __linux__ #include <dirent.h> #include <ctype.h> @@ -160,7 +161,7 @@ unsigned int kfi_getPid(const char *proc, unsigned int ppid) return error ? 0 : pid; } -#elif defined OS_FreeBSD || defined OS_NetBSD || defined __FreeBSD__ || defined __NetBSD__ || defined OS_Darwin +#elif defined OS_FreeBSD || defined OS_NetBSD || defined __FreeBSD__ || defined __NetBSD__ || defined OS_Darwin || defined OS_OpenBSD || defined __OpenBSD__ #include <ctype.h> #include <dirent.h> @@ -202,6 +203,8 @@ unsigned int kfi_getPid(const char *proc, unsigned int ppid) mib[3] = p[num].ki_pid; #elif defined(__DragonFly__) && __DragonFly_version >= 190000 mib[3] = p[num].kp_pid; +#elif defined(__OpenBSD__) + mib[3] = p[num].p_pid; #else mib[3] = p[num].kp_proc.p_pid; #endif @@ -225,15 +228,22 @@ unsigned int kfi_getPid(const char *proc, unsigned int ppid) pid=p[num].kp_pid; #else #if defined(__DragonFly__) - if(proc_p.kp_eproc.e_ppid==ppid && p[num].kp_thread.td_comm && 0==strcmp(p[num].kp_thread.td_comm, proc)) + if(proc_p.kp_eproc.e_ppid==ppid && p[num].kp_thread.td_comm && 0==strcmp(p[num].kp_thread.td_comm, proc)) +#elif defined(__OpenBSD__) + if(proc_p.p_ppid==ppid && p[num].p_comm && 0==strcmp(p[num].p_comm, proc)) #else if(proc_p.kp_eproc.e_ppid==ppid && p[num].kp_proc.p_comm && 0==strcmp(p[num].kp_proc.p_comm, proc)) #endif - if(pid) + if(pid) { error=true; - else + } else { +#if defined(__OpenBSD__) + pid=p[num].p_pid; +#else pid=p[num].kp_proc.p_pid; #endif + } +#endif } } free(p); diff --git a/kcontrol/tdm/tdm-shut.cpp b/kcontrol/tdm/tdm-shut.cpp index c24f22dd2..14e681d18 100644 --- a/kcontrol/tdm/tdm-shut.cpp +++ b/kcontrol/tdm/tdm-shut.cpp @@ -209,7 +209,11 @@ void TDMSessionsWidget::load() config->setGroup("Shutdown"); restart_lined->setURL(config->readEntry("RebootCmd", "/sbin/reboot")); +#if defined(__OpenBSD__) + shutdown_lined->setURL(config->readEntry("HaltCmd", "/sbin/halt -p")); +#else shutdown_lined->setURL(config->readEntry("HaltCmd", "/sbin/poweroff")); +#endif bm_combo->setCurrentId(config->readEntry("BootManager", "None")); } |