Added administrator highlighting

pull/288/head
parent 1d7a433f09
commit a962740dae
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -156,6 +156,17 @@ void yon_interface_update(main_window *widgets){
pars = DEFAULT_USER_LABEL;
}
GdkRGBA rgba = {0};
char *wheel = yon_char_parsed_check_exist_begins_with(main_config.shadow,main_config.shadow_size,"wheel");
int wheel_size;
config_str wheel_parsed = yon_char_parse(wheel,&wheel_size,":");
char *param = config(ADDADM_parameter);
if ((atoi(parameters[1])==1000&&!yon_char_is_empty(param)&&!strcmp(param,"yes"))||yon_char_parsed_check_exist(wheel_parsed,wheel_size,login)>-1){
rgba.red=253.0/255.0;
rgba.green=251.0/255.0;
rgba.blue=216.0/255.0;
rgba.alpha=1;
}
gtk_list_store_set(widgets->UsersList,&iter,
0,parameters_size>5?(parameters[5][0]=='!'&&parameters[5][1]=='*')?check_checked_icon_name:(parameters[5][0]=='!'||parameters[5][0]=='*')?check_attention_icon_name:NULL:NULL,
2,login,
@ -166,6 +177,7 @@ void yon_interface_update(main_window *widgets){
6,parameters_size>4?!strcmp(parameters[4],"x")?"":parameters[4]:"",
7,!yon_char_is_empty(pars)?pars:"",
8,!yon_char_is_empty(tooltip)?tooltip:"",
9,rgba.alpha==1?&rgba:NULL,
-1);
if(parameters)
free(parameters);
@ -1372,8 +1384,20 @@ void yon_system_load(main_window *window){
}
yon_char_parsed_free(parsed_group,parsed_gr_size);
}
GdkRGBA rgba = {0};
char *wheel = yon_char_parsed_check_exist_begins_with(main_config.shadow,main_config.shadow_size,"wheel");
int wheel_size;
config_str wheel_parsed = yon_char_parse(wheel,&wheel_size,":");
char *param = config(ADDADM_parameter);
if ((atoi(parsed[2])==1000&&!yon_char_is_empty(param)&&!strcmp(param,"yes"))||yon_char_parsed_check_exist(wheel_parsed,wheel_size,parsed[0])>-1){
rgba.red=253.0/255.0;
rgba.green=251.0/255.0;
rgba.blue=216.0/255.0;
rgba.alpha=1;
}
gtk_list_store_append(window->liststore1,&iter);
gtk_list_store_set(window->liststore1,&iter,1,atol(parsed[2]),2,parsed[0],3,parsed[4],4,main_group_name,5,groups_string,6,parsed[5],-1);
gtk_list_store_set(window->liststore1,&iter,1,atol(parsed[2]),2,parsed[0],3,parsed[4],4,main_group_name,5,groups_string,6,parsed[5],14,&rgba,-1);
yon_char_parsed_free(wheel_parsed,wheel_size);
yon_char_parsed_free(parsed,parsed_size);
}
int shadow_size;

@ -73,6 +73,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<column type="gchararray"/>
<!-- column-name Tooltip -->
<column type="gchararray"/>
<!-- column-name Color -->
<column type="GdkRGBA"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="ConfigUsersFilter">
@ -156,6 +158,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<column type="gchararray"/>
<!-- column-name ActivityDays -->
<column type="gchararray"/>
<!-- column-name Color -->
<column type="GdkRGBA"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="SystemUsersFilter">
@ -472,6 +476,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<child>
<object class="GtkCellRendererPixbuf"/>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="icon-name">0</attribute>
</attributes>
</child>
@ -489,6 +494,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
@ -505,6 +511,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="text">2</attribute>
</attributes>
</child>
@ -522,6 +529,7 @@ name</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="text">3</attribute>
</attributes>
</child>
@ -539,6 +547,7 @@ group</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="text">4</attribute>
</attributes>
</child>
@ -559,6 +568,7 @@ groups</property>
<property name="wrap-width">150</property>
</object>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="text">5</attribute>
</attributes>
</child>
@ -579,6 +589,7 @@ parameters</property>
<property name="wrap-width">150</property>
</object>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="text">6</attribute>
</attributes>
</child>
@ -595,6 +606,7 @@ status</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">9</attribute>
<attribute name="text">7</attribute>
</attributes>
</child>
@ -869,6 +881,7 @@ status</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="active">0</attribute>
</attributes>
</child>
@ -886,6 +899,7 @@ status</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
@ -902,6 +916,7 @@ status</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">2</attribute>
</attributes>
</child>
@ -918,6 +933,7 @@ status</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">3</attribute>
</attributes>
</child>
@ -935,6 +951,7 @@ group</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">4</attribute>
</attributes>
</child>
@ -954,6 +971,7 @@ groups</property>
<property name="wrap-width">150</property>
</object>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">5</attribute>
</attributes>
</child>
@ -969,6 +987,7 @@ directory</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">6</attribute>
</attributes>
</child>
@ -983,6 +1002,7 @@ path</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">7</attribute>
</attributes>
</child>
@ -997,6 +1017,7 @@ been changed</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">8</attribute>
</attributes>
</child>
@ -1011,6 +1032,7 @@ date</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">9</attribute>
</attributes>
</child>
@ -1025,6 +1047,7 @@ interval (min)</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">10</attribute>
</attributes>
</child>
@ -1039,6 +1062,7 @@ interval (max)</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">11</attribute>
</attributes>
</child>
@ -1053,6 +1077,7 @@ warning</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">12</attribute>
</attributes>
</child>
@ -1067,6 +1092,7 @@ without activity</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="cell-background-rgba">14</attribute>
<attribute name="text">13</attribute>
</attributes>
</child>

Loading…
Cancel
Save