|
|
|
@ -1796,23 +1796,14 @@ gboolean on_tooltip_show(GtkWidget*, gint x, gint y, gboolean, GtkTooltip* toolt
|
|
|
|
if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree), tree_x, tree_y, &path, NULL, NULL, NULL)) {
|
|
|
|
if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree), tree_x, tree_y, &path, NULL, NULL, NULL)) {
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
if (gtk_tree_model_get_iter(model, &iter, path)) {
|
|
|
|
if (gtk_tree_model_get_iter(model, &iter, path)) {
|
|
|
|
gchar *name, *description, *state, *name_target, *load_status, *active_status,*unit_path;
|
|
|
|
gchar *name, *description, *state, *name_target, *load_status, *active_status,*unit_path,*activate_time,*deactivate_time;
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
gtk_tree_model_get(model, &iter, 5, &name, 6, &description, 13, &state, 14,&load_status,15,&active_status,16,&unit_path, -1);
|
|
|
|
gtk_tree_model_get(model, &iter, 5, &name, 6, &description, 13, &state, 14,&load_status,15,&active_status,16,&unit_path,17,&activate_time,18,&deactivate_time, -1);
|
|
|
|
name_target = yon_char_new(name);
|
|
|
|
name_target = yon_char_new(name);
|
|
|
|
if (name[0]=='-'){
|
|
|
|
if (name[0]=='-'){
|
|
|
|
name_target = yon_char_append("-- ",name_target);
|
|
|
|
name_target = yon_char_append("-- ",name_target);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
config_str target = yon_config_load(yon_debug_output("%s\n",get_activate_deactivate_times(name_target)), &size);
|
|
|
|
|
|
|
|
free(name_target);
|
|
|
|
|
|
|
|
if (target){
|
|
|
|
|
|
|
|
free(yon_char_divide_search(target[0], "=", -1));
|
|
|
|
|
|
|
|
yon_char_remove_last_symbol(target[0], '\n');
|
|
|
|
|
|
|
|
free(yon_char_divide_search(target[1], "=", -1));
|
|
|
|
|
|
|
|
yon_char_remove_last_symbol(target[1], '\n');
|
|
|
|
|
|
|
|
free(yon_char_divide_search(target[2], "=", -1));
|
|
|
|
|
|
|
|
yon_char_remove_last_symbol(target[2], '\n');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state[0]=g_ascii_toupper(state[0]);
|
|
|
|
state[0]=g_ascii_toupper(state[0]);
|
|
|
|
load_status[0]=g_ascii_toupper(load_status[0]);
|
|
|
|
load_status[0]=g_ascii_toupper(load_status[0]);
|
|
|
|
@ -1829,6 +1820,18 @@ gboolean on_tooltip_show(GtkWidget*, gint x, gint y, gboolean, GtkTooltip* toolt
|
|
|
|
free(description);
|
|
|
|
free(description);
|
|
|
|
free(state);
|
|
|
|
free(state);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (yon_char_is_empty(activate_time)||yon_char_is_empty(deactivate_time)){
|
|
|
|
|
|
|
|
config_str target = yon_config_load(yon_debug_output("%s\n",get_activate_deactivate_times(name_target)), &size);
|
|
|
|
|
|
|
|
free(name_target);
|
|
|
|
|
|
|
|
if (target){
|
|
|
|
|
|
|
|
free(yon_char_divide_search(target[0], "=", -1));
|
|
|
|
|
|
|
|
yon_char_remove_last_symbol(target[0], '\n');
|
|
|
|
|
|
|
|
free(yon_char_divide_search(target[1], "=", -1));
|
|
|
|
|
|
|
|
yon_char_remove_last_symbol(target[1], '\n');
|
|
|
|
|
|
|
|
free(yon_char_divide_search(target[2], "=", -1));
|
|
|
|
|
|
|
|
yon_char_remove_last_symbol(target[2], '\n');
|
|
|
|
|
|
|
|
}
|
|
|
|
if (target){
|
|
|
|
if (target){
|
|
|
|
gchar *formatted_activa = g_strdup(NULL_LABEL);//!yon_char_is_empty(target[1])&&strcmp(target[1],"0")?target[1]:g_strdup(NULL_LABEL);
|
|
|
|
gchar *formatted_activa = g_strdup(NULL_LABEL);//!yon_char_is_empty(target[1])&&strcmp(target[1],"0")?target[1]:g_strdup(NULL_LABEL);
|
|
|
|
gchar *formatted_deactiva = g_strdup(NULL_LABEL);//!yon_char_is_empty(target[2])&&strcmp(target[2],"0")?target[2]:g_strdup(NULL_LABEL);
|
|
|
|
gchar *formatted_deactiva = g_strdup(NULL_LABEL);//!yon_char_is_empty(target[2])&&strcmp(target[2],"0")?target[2]:g_strdup(NULL_LABEL);
|
|
|
|
@ -1860,12 +1863,22 @@ gboolean on_tooltip_show(GtkWidget*, gint x, gint y, gboolean, GtkTooltip* toolt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (deactivated_size) yon_char_parsed_free(deactivated_parsed,deactivated_size);
|
|
|
|
if (deactivated_size) yon_char_parsed_free(deactivated_parsed,deactivated_size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkTreeIter itar;
|
|
|
|
|
|
|
|
yon_tree_model_sort_filter_get_model_iter(GTK_TREE_MODEL_SORT(model),&iter,&itar);
|
|
|
|
|
|
|
|
GtkTreeModel *filter_model = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(model));
|
|
|
|
|
|
|
|
GtkTreeModel *list = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model));
|
|
|
|
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->ActivateLabel), formatted_activa);
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->DeactivateLabel), formatted_deactiva);
|
|
|
|
gtk_list_store_set(GTK_LIST_STORE(list),&itar,17,formatted_activa,18,formatted_deactiva,-1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
activate_time = yon_char_new(formatted_activa);
|
|
|
|
|
|
|
|
deactivate_time = yon_char_new(formatted_deactiva);
|
|
|
|
|
|
|
|
|
|
|
|
g_free(formatted_activa);
|
|
|
|
g_free(formatted_activa);
|
|
|
|
g_free(formatted_deactiva);
|
|
|
|
g_free(formatted_deactiva);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->ActivateLabel), activate_time);
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->DeactivateLabel), deactivate_time);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gtk_tree_path_free(path);
|
|
|
|
gtk_tree_path_free(path);
|
|
|
|
return TRUE;
|
|
|
|
return TRUE;
|
|
|
|
|