Settings window functions WIP

pull/38/head
Ivan Dmitrievich Yartsev 10 months ago
parent dbd6370246
commit 14b8c32f57

@ -228,7 +228,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</object>
<object class="GtkWindow" id="MainWindow">
<property name="width-request">640</property>
<property name="height-request">440</property>
<property name="can-focus">False</property>
<property name="default-width">1024</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3</property>

@ -0,0 +1,32 @@
#include "libublsettingsui-gtk3.h"
typedef struct {
dictionary_fields
} yon_configuration_parameters;
ubl_settings_window *yon_ubl_settings_window_new(){
ubl_settings_window *window = malloc(sizeof(ubl_settings_window));
GtkBuilder *builder = gtk_builder_new_from_resource("/com/ublinux/libublsettingsui-gtk3-config-window.glade");
window->window = yon_gtk_builder_get_widget(builder,"Window");
window->WorkZoneBox = yon_gtk_builder_get_widget(builder,"WorkZoneBox");
return window;
}
yon_configuration_parameters *__yon_settings_parameters = NULL;
void __yon_on_ubl_settings_window_open(){
}
void yon_ubl_settings_window_init(){
GtkMenuItem *menu_item = gtk_menu_item_new();
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
GtkWidget *label = gtk_label_new(CONFIG_WINDOW_MENU_LABEL);
GtkWidget *image = gtk_image_new_from_icon_name("com.ublinux.libublsettingsui-gtk3.settings-symbolic",GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(menu_item),box);
gtk_box_pack_start(GTK_BOX(box),image,0,0,0);
gtk_box_pack_start(GTK_BOX(box),label,0,0,0);
gtk_widget_show_all(menu_item);
g_signal_connect(G_OBJECT(menu_item),"activate",G_CALLBACK(__yon_on_ubl_settings_window_open),NULL);
}

@ -250,6 +250,11 @@ char *yon_get_default_label_with_parameter(char *section, char *parameter);
template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...);
typedef struct {
GtkWidget *window;
GtkWidget *WorkZoneBox;
} ubl_settings_window;
#define VERSION_LABEL yon_char_unite(_("Version:")," ",!yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",NULL)
#define HELP_LABEL(rest) yon_char_unite(template_app_information.app_tech_name,_(" version:")," ", !yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",template_app_information.app_title,"\n",_("Usage:"), " ",template_app_information.app_tech_name," ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n\t--clear-config\t\t\t",_("Reset application settings"),"\n",!yon_char_is_empty(rest)?rest:NULL,NULL)
@ -320,4 +325,6 @@ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...);
#define CUSTOM_CONFIG_CREATION_ERROR_LABEL _("New configuration file creation failed")
#define ROOT_CHECK_LABEL _("Upgrade to root")
#define SETTINGS_TITLE_LABEL _("Settings")
#define CONFIG_WINDOW_MENU_LABEL _("Application settigs")
#endif
Loading…
Cancel
Save