Config window rename #69

Merged
asmeron merged 2 commits from YanTheKaller/libublsettingsui-gtk3:master into master 2 weeks ago

@ -7,6 +7,7 @@
<property name="width-request">450</property>
<property name="height-request">176</property>
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3</property>
<property name="type-hint">dialog</property>
<child>

@ -140,8 +140,6 @@ ubl_settings_window *yon_ubl_settings_window_new(){
window->WorkZoneBox = yon_gtk_builder_get_widget(builder,"WorkZoneBox");
// window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
// window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
char *icon_name = yon_char_unite("com.ublinux.",template_app_information.app_tech_name,NULL);
yon_gtk_window_setup(GTK_WINDOW(window->window),NULL,template_app_information.app_title,icon_name,"SETTINGS_WINDOW");
g_signal_connect(G_OBJECT(window->window),"delete-event",G_CALLBACK(yon_on_settings_window_accept),window);
return window;
}
@ -154,9 +152,11 @@ struct yon_configuration_custom_parameter {
dictionary *__yon_configuration_custom_parameters = NULL;
void __yon_on_ubl_settings_window_open(){
void __yon_on_ubl_settings_window_open(GtkWidget *self){
if (!__yon_configuration_custom_parameters) return;
ubl_settings_window *window = yon_ubl_settings_window_new();
char *icon_name = yon_char_unite("com.ublinux.",template_app_information.app_tech_name,NULL);
yon_gtk_window_setup(GTK_WINDOW(window->window),GTK_WINDOW(gtk_widget_get_toplevel(self)),SETTINGS_TITLE_LABEL,icon_name,"SETTINGS_WINDOW");
dictionary *current = NULL;
for_dictionaries(current,__yon_configuration_custom_parameters){
struct yon_configuration_custom_parameter *parameter = ((struct yon_configuration_custom_parameter*)current->data);

@ -447,10 +447,13 @@ int yon_ubl_setup_arguments(int argc, char *argv[],config_str *unfound_arguments
if(optarg)
template_config->load_socket_id=atoi(optarg);
break;
case 'c': char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",template_app_information.app_tech_name,"/",NULL);
struct passwd *user = getpwnam(yon_ubl_root_user_get());
if (chown(path,user->pw_uid,user->pw_gid)){};
if (system(remove_config_dir_command)){};
case 'c':
{
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",template_app_information.app_tech_name,"/",NULL);
struct passwd *user = getpwnam(yon_ubl_root_user_get());
if (chown(path,user->pw_uid,user->pw_gid)){};
if (system(remove_config_dir_command)){};
}
break;
case 'd': template_config->debug_mode=1;
break;

@ -659,7 +659,7 @@ yon_window *yon_window_new();
#define SAVE_MODE_HDD_HOME_LABEL _("HDD sandbox with profile saving")
#define CUSTOM_CONFIG_CREATION_ERROR_LABEL _("New configuration file creation failed")
#define ROOT_CHECK_LABEL _("Grant root access")
#define SETTINGS_TITLE_LABEL _("Settings")
#define SETTINGS_TITLE_LABEL yon_char_get_localised_from_lib("Settings")
#define CONFIG_WINDOW_MENU_LABEL _("Settigs")

Loading…
Cancel
Save