Merge pull request 'master' (#316) from YanTheKaller/ubl-settings-usergroups:master into master

Reviewed-on: #316
pull/317/head^2 v2.53
Dmitry Razumov 2 months ago
commit 8593c53d04

@ -17,6 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:3
msgid ""
"https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-usergroups"
msgstr ""
#: source/ubl-strings.h:3 #: source/ubl-strings.h:3
msgid "Users and groups" msgid "Users and groups"
msgstr "" msgstr ""

@ -17,6 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:3
msgid ""
"https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-usergroups"
msgstr "https://wiki.ublinux.com/ru/software/programs_and_utilities/all/ubl-settings-usergroups"
#: source/ubl-strings.h:3 #: source/ubl-strings.h:3
msgid "Users and groups" msgid "Users and groups"
msgstr "Пользователи и группы" msgstr "Пользователи и группы"

@ -12,6 +12,7 @@ pkg_check_modules(VTE291 REQUIRED vte-2.91)
include_directories(${VTE291_INCLUDE_DIRS}) include_directories(${VTE291_INCLUDE_DIRS})
link_directories(${VTE291_LIBRARY_DIRS}) link_directories(${VTE291_LIBRARY_DIRS})
add_definitions(${VTE291_CFLAGS_OTHER}) add_definitions(${VTE291_CFLAGS_OTHER})
add_definitions(-DVTE_INCLUDE)
pkg_check_modules(PWQ REQUIRED pwquality) pkg_check_modules(PWQ REQUIRED pwquality)
include_directories(${PWQ_INCLUDE_DIRS}) include_directories(${PWQ_INCLUDE_DIRS})
@ -72,7 +73,6 @@ add_custom_target(
) )
add_definitions(-DVTE_INCLUDE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \ -O2 -pipe -fno-plt -fexceptions \

@ -156,11 +156,15 @@ void on_group_save(GtkWidget *self, dictionary *dict){
{ {
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList); GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList);
// char *edit_status = g_object_get_data(G_OBJECT(window->CreateGroupWindow),"edit state");
for_iter(model,&iter){ for_iter(model,&iter){
char *cur; char *cur;
gtk_tree_model_get(model,&iter,1, &cur,-1); gtk_tree_model_get(model,&iter,1, &cur,-1);
if (!yon_char_is_empty(cur)&&!strcmp(cur,group_name)){ if (!yon_char_is_empty(cur)&&!strcmp(cur,group_name)){
if (!gtk_tree_selection_iter_is_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&iter)){ GtkTreeIter child,sort;
gtk_tree_model_filter_convert_child_iter_to_iter(GTK_TREE_MODEL_FILTER(widgets->ConfigGroupsFilter),&child,&iter);
gtk_tree_model_sort_convert_child_iter_to_iter(GTK_TREE_MODEL_SORT(widgets->ConfigGroupsSort),&sort,&child);
if (!gtk_tree_selection_iter_is_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&sort)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),GROUP_EXIST_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),GROUP_EXIST_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry); yon_ubl_status_highlight_incorrect(window->userLoginEntry);

@ -1595,8 +1595,10 @@ void on_main_edit(GtkWidget *, main_window *widgets){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0);
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry), parsed_size>1?parameters[1]:""); gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry), parsed_size>1?parameters[1]:"");
} }
if (!yon_char_is_empty(parameters[1])) if (!yon_char_is_empty(parameters[1])){
window->last_uid=yon_char_new(parameters[1]); window->last_uid=yon_char_new(parameters[1]);
g_object_set_data(G_OBJECT(window->CreateUserWindow),"edit state",yon_char_new(name));
}
} }
if (parsed_size>2){ if (parsed_size>2){
if (!strcmp(parameters[2],"x")||!strcmp(parameters[2],"")) if (!strcmp(parameters[2],"x")||!strcmp(parameters[2],""))
@ -1741,6 +1743,7 @@ void on_main_edit(GtkWidget *, main_window *widgets){
model = GTK_TREE_MODEL(widgets->ConfigGroupsSort); model = GTK_TREE_MODEL(widgets->ConfigGroupsSort);
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&model,&iter)){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&model,&iter)){
ubl_settings_usergroups_group_creation_window *window = yon_ubl_settings_usergroups_group_creation_new(); ubl_settings_usergroups_group_creation_window *window = yon_ubl_settings_usergroups_group_creation_new();
gtk_widget_set_sensitive(window->userLoginEntry,0);
gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),CONFIGURE_GROUP_TITLE_LABEL); gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),CONFIGURE_GROUP_TITLE_LABEL);
gtk_label_set_text(GTK_LABEL(window->userTitleNameLabel),CONFIGURE_GROUP_TITLE_LABEL); gtk_label_set_text(GTK_LABEL(window->userTitleNameLabel),CONFIGURE_GROUP_TITLE_LABEL);
dictionary *dict = NULL; dictionary *dict = NULL;
@ -1766,7 +1769,8 @@ void on_main_edit(GtkWidget *, main_window *widgets){
g_signal_handlers_block_by_func(G_OBJECT(window->userUIDAutoCheck),G_CALLBACK(on_GID_update),window); g_signal_handlers_block_by_func(G_OBJECT(window->userUIDAutoCheck),G_CALLBACK(on_GID_update),window);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0);
g_signal_handlers_unblock_by_func(G_OBJECT(window->userUIDAutoCheck),G_CALLBACK(on_GID_update),window); g_signal_handlers_unblock_by_func(G_OBJECT(window->userUIDAutoCheck),G_CALLBACK(on_GID_update),window);
window->last_gid=yon_char_new(parsed[1]); window->last_gid=yon_char_new(name);
g_object_set_data(G_OBJECT(window->CreateGroupWindow),"edit state",yon_char_new(name));
} }
} }
if (size>2&&!yon_char_is_empty(parsed[2])){ if (size>2&&!yon_char_is_empty(parsed[2])){

@ -20,7 +20,6 @@
#include "ubl-strings.h" #include "ubl-strings.h"
#include "pwquality.h" #include "pwquality.h"
#define WIKI_LINK "https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-usergroups"
#define _(String) gettext(String) #define _(String) gettext(String)

@ -2,6 +2,7 @@
#define TITLE_LABEL _("Users and groups") #define TITLE_LABEL _("Users and groups")
#define TITLE_INFO_LABEL _("System users and groups configuration") #define TITLE_INFO_LABEL _("System users and groups configuration")
#define WIKI_LINK "https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-usergroups"
#define DEFAULT_USER_GROUPS_LABEL _("Default user groups:") #define DEFAULT_USER_GROUPS_LABEL _("Default user groups:")
#define DEFAULT_USER_NAME_LABEL _("Default user name (if there's no another):") #define DEFAULT_USER_NAME_LABEL _("Default user name (if there's no another):")

@ -73,7 +73,7 @@
<object class="GtkTreeView" id="GroupsTree"> <object class="GtkTreeView" id="GroupsTree">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="search-column">2</property> <property name="search-column">1</property>
<property name="enable-grid-lines">vertical</property> <property name="enable-grid-lines">vertical</property>
<child internal-child="selection"> <child internal-child="selection">
<object class="GtkTreeSelection"/> <object class="GtkTreeSelection"/>

Loading…
Cancel
Save