Changeset View
Changeset View
Standalone View
Standalone View
Modules/memory/memory.cpp
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 106 | QGroupBox* KCMMemory::initializeText() { | |||
---|---|---|---|---|---|
122 | for (int i = TOTAL_MEM; i < MEM_LAST_ENTRY; ++i) { | 122 | for (int i = TOTAL_MEM; i < MEM_LAST_ENTRY; ++i) { | ||
123 | switch (i) { | 123 | switch (i) { | ||
124 | case TOTAL_MEM: | 124 | case TOTAL_MEM: | ||
125 | title = i18n("Total physical memory:"); | 125 | title = i18n("Total physical memory:"); | ||
126 | break; | 126 | break; | ||
127 | case FREE_MEM: | 127 | case FREE_MEM: | ||
128 | title = i18n("Free physical memory:"); | 128 | title = i18n("Free physical memory:"); | ||
129 | break; | 129 | break; | ||
130 | #if !defined(__svr4__) || !defined(sun) | | |||
131 | #if !defined(__NetBSD__) && !defined(__OpenBSD__) | 130 | #if !defined(__NetBSD__) && !defined(__OpenBSD__) | ||
132 | case SHARED_MEM: | 131 | case SHARED_MEM: | ||
133 | title = i18n("Shared memory:"); | 132 | title = i18n("Shared memory:"); | ||
134 | break; | 133 | break; | ||
135 | case BUFFER_MEM: | 134 | case BUFFER_MEM: | ||
136 | title = i18n("Disk buffers:"); | 135 | title = i18n("Disk buffers:"); | ||
137 | break; | 136 | break; | ||
138 | #else | 137 | #else | ||
139 | case ACTIVE_MEM: | 138 | case ACTIVE_MEM: | ||
140 | title = i18n("Active memory:"); | 139 | title = i18n("Active memory:"); | ||
141 | break; | 140 | break; | ||
142 | case INACTIVE_MEM: | 141 | case INACTIVE_MEM: | ||
143 | title = i18n("Inactive memory:"); | 142 | title = i18n("Inactive memory:"); | ||
144 | break; | 143 | break; | ||
145 | #endif | 144 | #endif | ||
146 | #endif | | |||
147 | case CACHED_MEM: | 145 | case CACHED_MEM: | ||
148 | title = i18n("Disk cache:"); | 146 | title = i18n("Disk cache:"); | ||
149 | break; | 147 | break; | ||
150 | case SWAP_MEM: | 148 | case SWAP_MEM: | ||
151 | vbox->addSpacing(SPACING); | 149 | vbox->addSpacing(SPACING); | ||
152 | title = i18n("Total swap memory:"); | 150 | title = i18n("Total swap memory:"); | ||
153 | break; | 151 | break; | ||
154 | case FREESWAP_MEM: | 152 | case FREESWAP_MEM: | ||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Line(s) | 273 | void KCMMemory::updateMemoryGraphics() { | |||
283 | swapMemory->refresh(); | 281 | swapMemory->refresh(); | ||
284 | 282 | | |||
285 | } | 283 | } | ||
286 | 284 | | |||
287 | /* Include system-specific code */ | 285 | /* Include system-specific code */ | ||
288 | 286 | | |||
289 | #ifdef __linux__ | 287 | #ifdef __linux__ | ||
290 | #include "memory_linux.cpp" | 288 | #include "memory_linux.cpp" | ||
291 | #elif defined(__APPLE__) | | |||
292 | #include "memory_osx.cpp" | | |||
293 | #elif defined(sgi) && sgi | | |||
294 | #include "memory_sgi.cpp" | | |||
295 | #elif defined(__svr4__) && defined(sun) | | |||
296 | #include "memory_solaris.cpp" | | |||
297 | #elif defined(__FreeBSD__) || defined(__DragonFly__) | 289 | #elif defined(__FreeBSD__) || defined(__DragonFly__) | ||
298 | #include "memory_fbsd.cpp" | 290 | #include "memory_fbsd.cpp" | ||
299 | #elif defined(__hpux) | | |||
300 | #include "memory_hpux.cpp" | | |||
301 | #elif defined(__NetBSD__) || defined(__OpenBSD__) | 291 | #elif defined(__NetBSD__) || defined(__OpenBSD__) | ||
302 | #include "memory_netbsd.cpp" | 292 | #include "memory_netbsd.cpp" | ||
303 | #elif defined(__osf__) | | |||
304 | #include "memory_tru64.cpp" | | |||
305 | #else | 293 | #else | ||
306 | 294 | | |||
307 | /* Default for unsupported systems */ | 295 | /* Default for unsupported systems */ | ||
308 | void KCMMemory::fetchValues() { | 296 | void KCMMemory::fetchValues() { | ||
309 | int i; | 297 | int i; | ||
310 | for (i = TOTAL_MEM; i < MEM_LAST_ENTRY; ++i) { | 298 | for (i = TOTAL_MEM; i < MEM_LAST_ENTRY; ++i) { | ||
311 | memoryInfos[i] = NO_MEMORY_INFO; | 299 | memoryInfos[i] = NO_MEMORY_INFO; | ||
312 | } | 300 | } | ||
313 | } | 301 | } | ||
314 | 302 | | |||
315 | #endif | 303 | #endif | ||
316 | 304 | | |||
317 | #include "memory.moc" | 305 | #include "memory.moc" |