summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2009-03-04 09:43:15 +0000
committer(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2009-03-04 09:43:15 +0000
commite2b56bc9c06c95e14d25750caa70e24dfbb0e7b1 (patch)
treed477da2acecf16e2fa76bab7696d36b3de47805e
parenta18f2dba31c9b8500cf84b2af88f925f4b8e46e7 (diff)
fix for the occasional crash
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@437 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--metacontacts/meta_options.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/metacontacts/meta_options.c b/metacontacts/meta_options.c
index 25b13db..b6f7c57 100644
--- a/metacontacts/meta_options.c
+++ b/metacontacts/meta_options.c
@@ -316,10 +316,19 @@ int Meta_ReadOptions(MetaOptions *opt) {
#define ID_STATUS_OUTTOLUNCH 40080 ->3
*/
-int status_order[10] = {8, 0, 4, 7, 6, 5, 1, 0, 2, 3};
-
int GetDefaultPrio(int status) {
- return status_order[status - ID_STATUS_OFFLINE];
+ switch( status ) {
+ case ID_STATUS_OFFLINE: return 8;
+ case ID_STATUS_AWAY: return 4;
+ case ID_STATUS_DND: return 7;
+ case ID_STATUS_NA: return 6;
+ case ID_STATUS_OCCUPIED: return 5;
+ case ID_STATUS_FREECHAT: return 1;
+ case ID_STATUS_ONTHEPHONE: return 2;
+ case ID_STATUS_OUTTOLUNCH: return 3;
+ }
+
+ return 0;
}
typedef struct {