Code redesign for template

pull/4/head
parent 9e1eeeb0f8
commit b6edfe8dad

4
.gitignore vendored

@ -6,4 +6,6 @@ ubl-settings-repo-back/ubl-settings-repo-back
build/
compile/
terminal-commands/
source/ubl-cmake.h
source/ubl-cmake.h
.BUILD.md
.updatebuild.sh

@ -110,27 +110,29 @@ void on_save(){
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.tree_store),&iter);
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),&iter)){
remove_flagged = NULL;
add_flagged = "";
add_flagged = NULL;
int repostatus=0;
gboolean renamed=0;
char *old_name=NULL;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&iter,1,&name_flagged,3,&origin_flagged,4,&repostatus,6,&old_name,7,&renamed,-1);
if (!strstr(name_flagged,".db.tar.gz")) name_flagged = yon_char_get_augumented(name_flagged,".db.tar.gz");
remove_command = yon_char_unite(command," remove -d ", origin_flagged, " -r ", name_flagged, " -p ",NULL);
add_command = yon_char_unite(command," add -d ", origin_flagged, " -r ", name_flagged, " -p ",NULL);
// if (!strstr(name_flagged,".db.tar.gz")) name_flagged = yon_char_append(name_flagged,".db.tar.gz");
remove_command = yon_char_unite(command," remove -d ", origin_flagged, " -r ", name_flagged, NULL);
add_command = yon_char_unite(command," add -d ", origin_flagged, " -r ", name_flagged, NULL);
int valid_child=gtk_tree_model_iter_children(GTK_TREE_MODEL(main_config.tree_store),&childIter,&iter);
for (;valid_child;valid_child=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.tree_store),&childIter)){
int status = 0,deleted = 0;
char *path=NULL;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&childIter,3,&path,4,&status,5,&deleted,-1);
if (status==-1) { remove_flagged = yon_char_unite(remove_flagged ? remove_flagged : "",path,NULL); gtk_tree_store_remove(main_config.tree_store,&childIter);}
else if (status == 1&&deleted==0) add_flagged = yon_char_unite(add_flagged ? add_flagged : "",path,NULL);
gtk_tree_store_set(main_config.tree_store,&childIter,4,0,5,0,-1);
if (status==-1) { remove_flagged = yon_char_unite(remove_flagged ? yon_char_append(remove_flagged,",") : " -p ",path,NULL); /*gtk_tree_store_remove(main_config.tree_store,&childIter);*/}
else if (status == 1&&deleted==0) { add_flagged = yon_char_unite(add_flagged ? yon_char_append(add_flagged,",") : " -p ",path,NULL);gtk_tree_store_set(main_config.tree_store,&childIter,0,"com.ublinux.ubl-settings-repomanager.document-symbolic",-1); }
}
if (origin_flagged)
remove_command = remove_flagged ? yon_char_unite(remove_command,remove_flagged,NULL) : NULL;
add_command = add_flagged ? yon_char_unite(add_command, add_flagged,NULL) : NULL;
printf("%s\n%s\n",remove_command,add_command);
if (remove_command) system(remove_command);
if (add_command) system(add_command);
}
@ -138,11 +140,14 @@ void on_save(){
void on_tree_selection_changed(GtkWidget *self,main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
GtkTreeIter *iter=NULL;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,iter)){
char *codeName,*branch,*version,*architecture,*components,*signature,*ipAdress,*port;
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){
char *codeName=NULL,*version=NULL,*architecture=NULL;
int serverType=0,trusted=0,published=0;
gtk_tree_model_get(model,iter,3,&codeName,4,&branch,5,&version,6,&architecture,7,&components,8,&signature,9,&trusted,10,&serverType,11,&ipAdress,12,&port,13,published,-1);
gtk_tree_model_get(model,&iter,11,&codeName,12,&version,13,&architecture,-1);
gtk_label_set_text(GTK_LABEL(widgets->CodeNameInfoLabel),codeName ? codeName : "");
gtk_label_set_text(GTK_LABEL(widgets->VersionInfoLabel),version ? version : "");
gtk_label_set_text(GTK_LABEL(widgets->ArchitectureInfoLabel),architecture ? architecture : "");
}
}
@ -202,8 +207,8 @@ void on_repo_new (GtkWidget *self, main_window *widgets){
repo_create_window *window = new(repo_create_window);
window->path=NULL;
on_choose_repo_folder(self,window);
dictionary *dict = yon_dictionary_create_with_data("",widgets);
dict = yon_dictionary_create_with_data_connected(dict,"",window);
dictionary *dict = yon_dictionary_new_with_data("",widgets);
dict = yon_dictionary_append_with_data(dict,"",window);
on_repo_add_new(self,dict);
}
@ -232,8 +237,8 @@ void on_repo_configure(GtkWidget *self, main_window *widgets){
window->BranchesTree=yon_gtk_builder_get_widget(builder,"repoEditBranchTree");
window->BranchesListStore=GTK_LIST_STORE(gtk_builder_get_object(builder,"curRepoEditList"));
gtk_widget_show(window->Window);
dictionary *dict = yon_dictionary_create_with_data("",widgets);
dict = yon_dictionary_create_with_data_connected(dict,"",window);
dictionary *dict = yon_dictionary_new_with_data("",widgets);
dict = yon_dictionary_append_with_data(dict,"",window);
g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_repo_configure_done),dict);
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_close_subwindow),NULL);
gtk_list_store_clear(window->BranchesListStore);
@ -304,7 +309,7 @@ GtkTreeIter *yon_repo_append(main_window *widgets, char *name, YON_REPO_LINE_TYP
GtkTreeIter repo;
gtk_tree_store_append(main_config.tree_store,&iter,&branch);
gtk_tree_store_set(main_config.tree_store,&iter,0, "com.ublinux.ubl-settings-repomanager.document-symbolic", 1, name_short,3,name,4,1,5,fls,-1);
retIter = gtk_tree_iter_copy(&branch);
retIter = gtk_tree_iter_copy(&iter);
} else {
gtk_tree_store_append(main_config.tree_store,&iter,&parentIter);
@ -336,9 +341,10 @@ void yon_repo_remove_package(main_window *widgets){
// gtk_tree_store_remove(main_config.tree_store,&iter);
int status = 0;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.tree_store),&iter,4,&status,-1);
if (status != 1)
if (status != 1){
gtk_tree_store_set(main_config.tree_store,&iter,4,-1,-1);
gtk_tree_store_set(main_config.tree_store,&iter,0,"com.ublinux.ubl-settings-repomanager.document-red-symbolic",-1);
} else gtk_tree_store_remove(main_config.tree_store,&iter);
yon_ubl_status_box_render(OPERATION_DONE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
}else yon_ubl_status_box_render(CHOOSE_PACK_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
}
@ -349,7 +355,7 @@ void yon_repo_remove(main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.tree_store);
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepoTree)),&model,&iter)){
if(gtk_tree_store_iter_depth(main_config.tree_store,&iter)==0){
gtk_tree_store_set(main_config.tree_store,&iter,4,-1,5,1,-1);
gtk_tree_store_set(main_config.tree_store,&iter,4,-1,0,"com.ublinux.ubl-settings-repomanager.folder-red-symbolic",-1);
}else yon_ubl_status_box_render(CHOOSE_REPO_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
} else yon_ubl_status_box_render(NOTHING_CHOSEN_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
}
@ -365,8 +371,19 @@ void yon_add_file(main_window *widgets){
if (res==GTK_RESPONSE_ACCEPT){
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser));
FILE *file = popen(yon_char_unite("LC_ALL=EN pacman -Q --info --file ",filename," |grep -E \"Name|Version|Architecture\" |sed -e 's/ *//g'",NULL),"r");
char *cur_string=g_malloc0(sizeof(char)*4096);
char *packname=NULL, *packver=NULL, *packarch=NULL;
while (fgets(cur_string,4096,file)){
cur_string = yon_char_divide_search(cur_string,"\n",-1);
char *p = yon_char_divide_search(cur_string,":",-1);
if (strstr(p,"Name")) packname = yon_char_new(cur_string);
else if (strstr(p,"Version")) packver = yon_char_new(cur_string);
else if (strstr(p,"Architecture")) packarch = yon_char_new(cur_string);
}
GtkTreeIter *iter = yon_repo_append(widgets,filename,YON_REPO_LINE_FILE_TYPE);
gtk_tree_store_set(main_config.tree_store,iter,0,"com.ublinux.ubl-settings-repomanager.document-green-symbolic",-1);
gtk_tree_store_set(main_config.tree_store,iter,0,"com.ublinux.ubl-settings-repomanager.document-green-symbolic",11,packname,12,packver,13,packarch,-1);
}
on_close_subwindow(chooser);
@ -421,8 +438,8 @@ main_window *setup_window(){
widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem");
widgets->LeftBox = yon_gtk_builder_get_widget(builder,"HeaderLeftBox");
widgets->DocumentationMenuItem = yon_gtk_builder_get_widget(builder,"DocumentationMenuItem");
widgets->AboutMenuItem = yon_gtk_builder_get_widget(builder,"AboutMenuItem");
// widgets->DocumentationMenuItem = yon_gtk_builder_get_widget(builder,"DocumentationMenuItem");
// widgets->AboutMenuItem = yon_gtk_builder_get_widget(builder,"AboutMenuItem");
widgets->GeneralTabLabel = yon_gtk_builder_get_widget(builder,"GeneralTabLabel");
widgets->PublicationTabLabel = yon_gtk_builder_get_widget(builder,"PublicationTabLabel");
@ -462,6 +479,14 @@ main_window *setup_window(){
widgets->Finder = yon_gtk_builder_get_widget(builder,"RepoFinder");
widgets->SaveButton = yon_gtk_builder_get_widget(builder,"mainSaveButton");
main_config.tree_store = GTK_TREE_STORE(gtk_builder_get_object(builder,"RepoStore"));
widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL); // yon_gtk_builder_get_widget(builder,"DocumentationMenuItem");
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL); // yon_gtk_builder_get_widget(builder,"AboutMenuItem");
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
if (main_config.lock_load_global == 1){
gtk_widget_set_sensitive(widgets->LoadGlobalMenuItem,0);
@ -490,6 +515,7 @@ main_window *setup_window(){
g_signal_connect(G_OBJECT(widgets->LoadFromLocalButton),"clicked",G_CALLBACK(on_repo_load_local),widgets);
g_signal_connect(G_OBJECT(widgets->ConfigureButton),"clicked",G_CALLBACK(on_repo_configure),widgets);
g_signal_connect(G_OBJECT(widgets->SaveButton),"clicked",G_CALLBACK(on_save),widgets);
g_signal_connect(G_OBJECT(widgets->RepoTree),"cursor-changed",G_CALLBACK(on_tree_selection_changed),widgets);
/* Localisation | Локализация */
gtk_widget_show(widgets->Window);
@ -503,7 +529,8 @@ int main(int argc, char *argv[]){
textdomain (LocaleName);
config_init();
int option_index=0;
int show_help=0;
int show_help=0;
int debug_mode=0;
{
struct option long_options[] = {
{"help", 0, 0, 'h'},
@ -516,10 +543,11 @@ int main(int argc, char *argv[]){
{"socket-id", 1, 0, 's'},
{"socket-ext-id", 1,0, 'e'},
{"socket-trd-id", 1,0, 't'},
{"debug", 0,0, 'd'},
{ NULL, 0, NULL, 0 }
};
for (int i=0;i<argc;i++){
int argument=getopt_long(argc,argv,"hVvs:e:t:",long_options,&option_index);
int argument=getopt_long(argc,argv,"hVvs:e:t:d",long_options,&option_index);
switch(argument){
case 'h':
show_help=1;
@ -564,22 +592,30 @@ int main(int argc, char *argv[]){
exit(0);
}
}
if (getuid()!=0){
main_config.lock_load_global=1;
main_config.lock_save_global=1;
main_config.lock_save_local=1;
}
gtk_init(&argc,&argv);
main_window *widgets = setup_window();
yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,banner_path);
if (yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel))
yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel);
if (getuid()!=0)
yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
else
yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id);
yon_window_config_setup(GTK_WINDOW(widgets->Window));
yon_window_config_load(config_path);
GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(css),
-1);
GTK_STYLE_PROVIDER(css),
-1);
gtk_main();
}

@ -5,9 +5,12 @@
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <libintl.h>
#include <getopt.h>
#include <libintl.h>
#include "ubl-cmake.h"
#include <sys/types.h>
#include <fcntl.h>
#include "../compile/ubl-cmake.h"
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
@ -21,6 +24,7 @@
#define glade_repo_path "/com/ublinux/ui/ubl-settings-repomanager-windows.glade"
#define banner_path "/com/ublinux/images/ubl-settings-repomanager-banner.png"
#define CssPath "/com/ublinux/css/ubl-settings-repomanager.css"
#define config_path yon_char_unite("/home/",yon_ubl_root_user_get(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
#define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-repomanager"

@ -3,13 +3,17 @@
#define TITLE_LABEL _("Repository manager")
#define TITLE_INFO_LABEL _("Repository management and configuring")
#define SUCCESS_LABEL _("Operation succeeded")
#define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked")
#define ABOUT_LABEL _("About")
#define DOCUMENTATION_LABEL _("Documentation")
#define SAVE_LOCAL_LABEL _("Save to local configuration")
#define SAVE_GLOBAL_LABEL _("Save to global configuration")
#define SAVE_CONFIGURATION_LABEL _("Save configuration")
#define SAVE_LABEL _("Save")
#define LOAD_LOCAL_LABEL _("Load local configuration")
#define LOAD_GLOBAL_LABEL _("Load global configuration")
#define LOAD_LABEL _("Load")
@ -23,7 +27,14 @@
#define PROJECT_HOME_LABEL _("Project Home Page")
#define NOTHING_CHOSEN_LABEL _("Nothing were chosen")
#define GLOBAL_LOAD_SUCCESS_LABEL _("Global configuration loading succseeded.")
#define LOCAL_LOAD_SUCCESS_LABEL _("Local configuration loading succseeded.")
#define LOAD_FAILED_LABEL _("Config loading failed")
#define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL _("Local and global configuration saving succseeded.")
#define GLOBAL_SAVE_SUCCESS_LABEL _("Global configuration saving succseeded.")
#define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succseeded.")
#define SAVE_FAILED_LABEL
#define GLOBAL_LOAD_SUCCESS _("Global configuration loading succseeded.")
#define LOCAL_LOAD_SUCCESS _("Local configuration loading succseeded.")

File diff suppressed because it is too large Load Diff

@ -7,11 +7,13 @@
#include <pthread.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <locale.h>
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include "ubl-cmake.h"
#include "../compile/ubl-cmake.h"
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
@ -22,32 +24,19 @@
#define new(type) malloc(sizeof(type))
#define new_arr(type,size) malloc(sizeof(type)*size)
#define yon_ubl_set_config_save_data_pointer(command) config_commands.config_save_data = command
#define yon_ubl_load_global_config(command, size_pointer) yon_config_load(command, size_pointer)
#define yon_ubl_load_local_config(command, size_pointer) yon_config_load(command, size_pointer)
#define yon_ubl_save_global_config(command) yon_config_save(command)
#define yon_ubl_save_local_config(command) yon_config_save(command)
#define for_liststore_each(liststore) GtkTreeIter iter;\
for (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(liststore),&iter);gtk_list_store_iter_is_valid(liststore,&iter);gtk_tree_model_iter_next(GTK_TREE_MODEL(liststore),&iter))
typedef enum
{
#ifdef __GTK_H__
DICTIONARY_GTK_WIDGETS_TYPE,
#endif
DICTIONARY_OTHER_TYPE
DICTIONARY_OTHER_TYPE=0,
DICTIONARY_CHAR_TYPE,
DICTIONARY_INT_TYPE,
DICTIONARY_BOOL_TYPE,
} DICT_TYPE;
typedef struct
{
char *command;
int *exitcode;
} thread_output;
typedef struct dictionary
{
char *key;
@ -56,6 +45,7 @@ typedef struct dictionary
struct dictionary *prev;
struct dictionary *first;
DICT_TYPE data_type;
int flag1;
} dictionary;
typedef struct apps
@ -70,6 +60,15 @@ typedef struct apps
} apps;
typedef char** config_str;
static dictionary *__yon__config__strings = NULL;
#define check_config if(__yon__config__strings&&__yon__config__strings->data_type==DICTIONARY_CHAR_TYPE)
#define config(key) yon_config_get_by_key(key)
#define for_config dictionary temp = NULL; for_dictionary(temp,__yon__config__strings)
#define yon_remalloc(pointer, size) (!pointer) ? malloc(size) : realloc(pointer, size)
// dictionary functions
/**yon_dictionary_get_data(dictionary, type)
@ -83,28 +82,36 @@ typedef char** config_str;
* [type] - тип данных, хранящихся в словаре [dictionary].
*/
#define yon_dictionary_get_data(dictionary, type) ((type)dictionary->data)
#define yon_dictionary_add_or_create_if_exists_with_data(dict,key,data) {if (!dict) dict=yon_dictionary_create_with_data(key,data); \
else dict=yon_dictionary_create_with_data_connected(dict,key,data);}
dictionary *yon_dictionary_create_empty();
/**yon_dictionary_add_or_create_if_exists_with_data(dict,key,data)
* [EN]
*
* [RU]
* Добавляет элемент словаря в конец словаря [dict] c ключом [key] и данными [data].
* Если словарь не существует, создаёт его
*/
#define yon_dictionary_add_or_create_if_exists_with_data(dict,key,data) {if (!dict) dict=yon_dictionary_new_with_data(key,data); \
else dict=yon_dictionary_append_with_data(dict,key,data);}
dictionary *yon_dictionary_new();
dictionary *yon_dictionary_create_conneced(dictionary *targetdict);
dictionary *yon_dictionary_append(dictionary *targetdict);
dictionary *yon_dictionary_get_last(dictionary *dict);
dictionary *yon_dictionary_switch_places(dictionary *dict, int aim);
dictionary *yon_dictionary_swap(dictionary *dict, int aim);
void yon_dictionary_make_first(dictionary *dict);
void yon_dictionary_make_nth(dictionary *dict, int nth);
dictionary *yon_dictionary_create_with_data(char *key, void *data);
dictionary *yon_dictionary_new_with_data(char *key, void *data);
dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data);
dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data);
dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect);
dictionary *yon_dictionary_find(dictionary **dict, char *key);
dictionary *yon_dictionary_get(dictionary **dict, char *key);
dictionary *yon_dictionary_rip(dictionary *dict);
@ -114,7 +121,7 @@ void *yon_dictionary_free_all(dictionary *dictionary,void (data_manipulation)(vo
// char functions
char *yon_char_get_augumented(char *source, char *append);
char *yon_char_append(char *source, char *append);
char *yon_char_new(char *chr);
@ -132,7 +139,7 @@ char *yon_char_replace(char *source, char *find, char*replace);
char **yon_char_parse(char *parameters, int *size, char *divider);
char **yon_char_parsed_shrink(char **char_string, int *size, int item_to_delete);
char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete);
int yon_char_parsed_check_exist(char **parameters, int size, char *param);
@ -140,10 +147,20 @@ int yon_char_find_count(char *source, char *find);
int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size);
config_str yon_char_parsed_new (config_str old, int *old_size, ...);
config_str yon_char_parsed_new (int *size, ...);
void yon_char_parsed_copy(config_str *source, config_str *to_copy);
config_str yon_char_parsed_append(config_str parsed, int *size, char *string);
int yon_ubl_check_root();
char *yon_ubl_root_user_get();
// parsing functions
config_str philos_list_user(int* size);
apps *yon_apps_scan_and_parse_desktops(int *sizef);
void yon_apps_sort(apps *applist, int size);
@ -152,31 +169,49 @@ apps *yon_apps_get_by_name(apps *applist, char *name, int size);
config_str yon_config_load(char *command, int *str_len);
int yon_config_save(char *command);
int yon_config_save_registered(char *command);
char *yon_config_get_parameter(config_str parameters, int size, char *param);
char *yon_config_make_save_parameter_with_multiple_arguments(char *parameter_string, char *config_parameter, char *divider);
int yon_config_load_register(char *command);
// terminal-using functions
int yon_config_remove_by_key(char *key);
int yon_config_remove_by_data(void *data);
int yon_config_remove_element(char *key, char *deleted);
void *yon_config_get_by_key(char *key);
int yon_launch_app(char *name);
char *yon_config_get_key_by_data(char *data);
int yon_config_set(char *key, void *data);
int yon_config_clean();
void yon_config_register(char *key, void *data);
config_str yon_config_get_all();
// terminal-using functions
int yon_launch_app_with_arguments(char *name, char *args);
int yon_launch(thread_output *thread);
void yon_launch(char *command);
// Gtk functions
#ifdef __GTK_H__
#ifdef VTE_TERMINAL
/**
*
*/
void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument);
void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument);
#endif
GtkWidget *yon_ubl_menu_item_about_new(char *buttonname);
GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname);
/**yon_gtk_builder_get_widget(builder, widget_name)
* [EN]
* Returns GtkWidget from GtkBuilder *[builder].
@ -193,11 +228,9 @@ typedef struct
GtkListStore *List;
} expander_icon_view;
// GtkWidget *yon_gtk_app_chooser_apps_create();
void yon_window_config_setup(GtkWindow *window);
// dictionary *yon_gtk_app_chooser_create();
// expander_icon_view yon_gtk_icon_view_expander_create(GtkWidget *pack, ...);
int yon_window_config_load(char *path);
int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size);
@ -205,8 +238,9 @@ int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find);
int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment);
int yon_dictionary_gtk_pack_start_multiple_widgets(dictionary *dict, GtkWidget *destination, gboolean expand, gboolean fill, int padding);
int yon_dictionary_gtk_pack_end_multiple_widgets(dictionary *dict, GtkWidget *destination, gboolean expand, gboolean fill, int padding);
int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);
int yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);

@ -48,17 +48,23 @@ background:transparent;
}
.menuitemtop *{
margin:2px 2px 0 2px;
padding: 5px 10px 3px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 5px 0px 3px 5px; */
border:transparent;
}
.menuitemmiddle *{
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 3px 5px; */
border:transparent;
}
.menuitembottom *{
margin:0 2px 2px 2px;
padding: 3px 10px 5px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 5px 5px; */
}
.menuitemtop:hover {
background:@theme_bg_color;
@ -83,19 +89,25 @@ background:transparent;
}
.menuitemtop:hover* {
margin:2px 2px 0 2px;
padding: 5px 10px 3px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 5px 0 3px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitemmiddle:hover* {
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
margin:0 2px 0px 2px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 3px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitembottom:hover* {
margin:0 2px 2px 2px;
padding: 3px 10px 5px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 5px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}

@ -214,6 +214,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<column type="gchararray"/>
<!-- column-name Moved -->
<column type="gboolean"/>
<!-- column-name PackageName -->
<column type="gchararray"/>
<!-- column-name PackageVersion -->
<column type="gchararray"/>
<!-- column-name PackageArch -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkAdjustment" id="adjustment1">
@ -487,28 +493,6 @@ translated and supported by community.</property>
<property name="can-focus">False</property>
<property name="take-focus">False</property>
<property name="reserve-toggle-size">False</property>
<child>
<object class="GtkMenuItem" id="DocumentationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Documentation</property>
<property name="use-underline">True</property>
<style>
<class name="menuitemtop"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="AboutMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">About</property>
<style>
<class name="menuitemsolo"/>
<class name="menuitembottom"/>
</style>
</object>
</child>
</object>
<object class="GtkMenu" id="menu3">
<property name="visible">True</property>
@ -867,11 +851,11 @@ translated and supported by community.</property>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="shadow-type">none</property>
<child>
<object class="GtkTreeView" id="RepoTree">
<property name="visible">True</property>
@ -924,6 +908,9 @@ translated and supported by community.</property>
<child type="label_item">
<placeholder/>
</child>
<style>
<class name="workingbg"/>
</style>
</object>
<packing>
<property name="expand">True</property>
@ -981,7 +968,6 @@ translated and supported by community.</property>
<object class="GtkLabel" id="CodeNameInfoLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">extend</property>
</object>
<packing>
<property name="expand">False</property>
@ -998,7 +984,6 @@ translated and supported by community.</property>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">20</property>
<child>
@ -1021,7 +1006,6 @@ translated and supported by community.</property>
<object class="GtkLabel" id="BranchInfoLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">stable</property>
</object>
<packing>
<property name="expand">False</property>
@ -1061,7 +1045,6 @@ translated and supported by community.</property>
<object class="GtkLabel" id="VersionInfoLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">2204</property>
</object>
<packing>
<property name="expand">False</property>
@ -1101,7 +1084,6 @@ translated and supported by community.</property>
<object class="GtkLabel" id="ArchitectureInfoLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">amd64</property>
</object>
<packing>
<property name="expand">False</property>
@ -1118,7 +1100,6 @@ translated and supported by community.</property>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">20</property>
<child>
@ -1141,7 +1122,6 @@ translated and supported by community.</property>
<object class="GtkLabel" id="ComponentsInfoLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">main contrib non-free</property>
</object>
<packing>
<property name="expand">False</property>
@ -1158,7 +1138,6 @@ translated and supported by community.</property>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">20</property>
<child>
@ -1181,7 +1160,6 @@ translated and supported by community.</property>
<object class="GtkLabel" id="SignatureInfoLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">signed</property>
</object>
<packing>
<property name="expand">False</property>

Loading…
Cancel
Save