? rc_role_weights.patch
Index: template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/rootcandy/template.php,v
retrieving revision 1.36.2.14
diff -u -p -r1.36.2.14 template.php
--- template.php	12 Feb 2009 10:43:56 -0000	1.36.2.14
+++ template.php	15 Feb 2009 14:49:35 -0000
@@ -42,8 +42,16 @@ function _rootcandy_admin_navigation() {
    */
   // get users role
   global $user;
+
   if ($user->uid != 1) {
-    $role = end(array_keys($user->roles));
+    // get sorted roles
+    $role_weights = theme_get_setting('role-weight');
+    $filter_out = array_keys($user->roles);
+    $roles = array_intersect(array_flip($role_weights), $filter_out);
+    ksort($roles);
+    $keys = array_keys($roles);
+    $role = $roles[$keys[0]];
+
     $rootcandy_navigation = theme_get_setting('rootcandy_navigation_source_'.$role);
   }
   else {
@@ -370,4 +378,4 @@ function _rootcandy_countmatches($arrayo
     if ($arrayone[$i] == $part) $matches = $i+1;
   }
   return $matches;
-}
+}
\ No newline at end of file
Index: theme-settings.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/rootcandy/theme-settings.php,v
retrieving revision 1.6.2.8
diff -u -p -r1.6.2.8 theme-settings.php
--- theme-settings.php	23 Oct 2008 05:36:33 -0000	1.6.2.8
+++ theme-settings.php	15 Feb 2009 14:49:35 -0000
@@ -111,6 +111,24 @@ function rootcandy_settings($saved_setti
     );
   }
 
+  $form['navigation']['role-weight'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Role weight'),
+    '#weight' => 1,
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#tree' => TRUE,
+  );
+
+  foreach ($roles as $rid => $role) {
+    $form['navigation']['role-weight'][$rid] = array(
+      '#type' => 'weight',
+      '#delta' => 5,
+      '#title' => $role,
+      '#default_value' => $settings['role-weight'][$rid],
+    );
+  }
+
   $form['navigation']['custom-icons'] = array(
     '#type' => 'fieldset',
     '#title' => t('Custom icons'),