pull/129/head
Ivan Yartsev 6 months ago
parent d3189e567b
commit a1fe0204a4

@ -1291,7 +1291,25 @@ void on_logrotate_save(GtkWidget *, dictionary *dict){
}
int create_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->CreateLogCombo));
if (create_active){
create = yon_char_unite("create ", gtk_entry_get_text(GTK_ENTRY(window->CreateLogEntry))," ",gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateLogUserCombo))," ",gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateGroupCombo)),NULL);
char *rule = (char*)gtk_entry_get_text(GTK_ENTRY(window->CreateLogEntry));
char *rule_user = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateLogUserCombo));
char *rule_group = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateGroupCombo));
if (yon_char_is_empty(rule)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->CreateLogEntry);
return;
}
if (yon_char_is_empty(rule_user)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->CreateLogUserCombo);
return;
}
if (yon_char_is_empty(rule_group)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->CreateGroupCombo);
return;
}
create = yon_char_unite("create ", rule," ",rule_user," ",rule_group,NULL);
}
char *commandline = yon_char_unite(period,
@ -3060,7 +3078,9 @@ void yon_main_window_complete(template_main_window **window){
g_signal_connect(G_OBJECT(widgets->UpgradePermissionsMenuItem),"activate",G_CALLBACK(on_permissions_changed),widgets);
g_signal_connect(G_OBJECT(widgets->MainTree),"cursor-changed",G_CALLBACK(on_main_window_tree_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->MainTree),"unselect-all",G_CALLBACK(on_main_window_tree_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->ServicesTree),"cursor-changed",G_CALLBACK(on_main_window_services_tree_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->ServicesTree),"unselect-all",G_CALLBACK(on_main_window_services_tree_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->ServicesStartStopButton),"clicked",G_CALLBACK(on_start_stop_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->ServicesEnableDisableButton),"clicked",G_CALLBACK(on_enable_disable_clicked),widgets);

@ -21,7 +21,7 @@
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.cancel-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>

Loading…
Cancel
Save