|
|
#include <gtk/gtk.h>
|
|
|
#include <gtk/gtkx.h>
|
|
|
#include "ubl-utils.h"
|
|
|
#include <locale.h>
|
|
|
#include <stdio.h>
|
|
|
#include <unistd.h>
|
|
|
#include <stdlib.h>
|
|
|
#include <libintl.h>
|
|
|
#include <getopt.h>
|
|
|
#include <libintl.h>
|
|
|
#include "ubl-cmake.h"
|
|
|
#ifdef WEBKIT_FOUND
|
|
|
#include <webkit2/webkit2.h>
|
|
|
#endif
|
|
|
#include "ubl-strings.h"
|
|
|
|
|
|
#define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-usergroups"
|
|
|
|
|
|
#define _(String) gettext(String)
|
|
|
|
|
|
#define glade_path "/com/ublinux/ui/ubl-settings-usergroups.glade"
|
|
|
#define glade_user_path "/com/ublinux/ui/ubl-settings-usergroups-user.glade"
|
|
|
#define glade_groups_path "/com/ublinux/ui/ubl-settings-usergroups-group.glade"
|
|
|
#define banner_path "/com/ublinux/images/ubl-settings-usergroups-banner.png"
|
|
|
#define CssPath "/com/ublinux/css/ubl-settings-usergroups.css"
|
|
|
#define config_path yon_char_unite("/home/",yon_ubl_root_user_get(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
|
|
|
|
|
|
#define yon_col(mean) yon_char_append(mean,":")
|
|
|
|
|
|
#define LocalePath "/usr/share/locale"
|
|
|
#define LocaleName "ubl-settings-usergroups"
|
|
|
typedef char* string;
|
|
|
string version_application;
|
|
|
|
|
|
char *local;
|
|
|
|
|
|
typedef struct {
|
|
|
int always_open_documentation;
|
|
|
int win_pos_x;
|
|
|
int win_pos_y;
|
|
|
int win_width;
|
|
|
int win_height;
|
|
|
|
|
|
int socket_id;
|
|
|
int load_socket_id;
|
|
|
int save_socket_id;
|
|
|
|
|
|
int lock_help;
|
|
|
int lock_save_local;
|
|
|
int lock_save_global;
|
|
|
int lock_load_global;
|
|
|
} config;
|
|
|
|
|
|
typedef struct {
|
|
|
GtkWidget *Window;
|
|
|
GtkWidget *HatLabel;
|
|
|
GtkWidget *PlugBox;
|
|
|
|
|
|
GtkWidget *HeadOverlay;
|
|
|
GtkWidget *HeadImage;
|
|
|
GtkWidget *HeadBox;
|
|
|
GtkWidget *HeadTitleLabel;
|
|
|
GtkWidget *HeadInfoLabel;
|
|
|
|
|
|
GtkWidget *StatusBox;
|
|
|
GtkWidget *StatusIcon;
|
|
|
GtkWidget *StatusLabel;
|
|
|
|
|
|
GtkWidget *SaveLabel;
|
|
|
GtkWidget *SaveMenuItem;
|
|
|
GtkWidget *SaveGlobalMenuItem;
|
|
|
GtkWidget *SaveLocalMenuItem;
|
|
|
GtkWidget *RightBox;
|
|
|
|
|
|
GtkWidget *LoadLabel;
|
|
|
GtkWidget *LoadGlobalMenuItem;
|
|
|
GtkWidget *LoadLocalMenuItem;
|
|
|
GtkWidget *LeftBox;
|
|
|
|
|
|
GtkWidget *DocumentationMenuItem;
|
|
|
GtkWidget *AboutMenuItem;
|
|
|
|
|
|
GtkWidget *MainAddUserButton;
|
|
|
GtkWidget *MainEditUserButton;
|
|
|
GtkWidget *MainDeleteUserButton;
|
|
|
|
|
|
GtkWidget *MainEditGroupsButton;
|
|
|
|
|
|
|
|
|
|
|
|
} main_window;
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
GtkWidget *Window;
|
|
|
|
|
|
GtkWidget *HatText;
|
|
|
GtkWidget *HeaderText;
|
|
|
GtkWidget *InfoText;
|
|
|
GtkWidget *AlwaysOpenCheck;
|
|
|
|
|
|
GtkWidget *CloseButton;
|
|
|
GtkWidget *AcceptButton;
|
|
|
} documentation_confirmation_window;
|
|
|
|
|
|
typedef struct {
|
|
|
GtkWidget *Window;
|
|
|
GtkWidget *GroupsCancelButton;
|
|
|
GtkWidget *GroupsOkButton;
|
|
|
} groups_window;
|
|
|
|
|
|
typedef struct {
|
|
|
GtkWidget *Window;
|
|
|
GtkWidget *UserAdditionalGroupsButton;
|
|
|
GtkWidget *UserCancelButton;
|
|
|
GtkWidget *UserOkButton;
|
|
|
} user_window;
|
|
|
|
|
|
main_window *setup_window(); |