Descriptions has been updated

pull/1/head
parent ba217e33ea
commit 497d5e677b

@ -1,2 +1,66 @@
# libublsettings-ui # libublsettings-ui
# ubl-settings-logging
# Выполнить
# Build
In order to build ubl-settings-logging you will need:
- CMake
- C compiler
- GTK+ 3 & dependencies
- webkit2gtk (optional)
- vte-2.91
Once you have all the necessary dependencies, you can use:
```sh
$ make
```
# Installation
After a successful build, just use:
```sh
$ sudo make install clean
```
# Uninstallation
After a successful build, just use:
```sh
$ sudo make uninstall
```
# Library usage
Libublsettings-ui provides 2 libraries:
```C
#include <ublsettings-ui.h>
#include <ubl-utils.h>
```
## ublsettings-ui
Ublsettings-ui provides API to use ubl-settings- applications shared interface: main window, about dialog, confirmation window.
First of all, you need to connect config structure to standard interface:
```C
_template_config config;
yon_ubl_connect_config(config);
```
Next step you should initialize all necceccary information for standard interface:
```C
yon_ubl_window_init("Title of util","Description of util",".po file name","path to css file (must be connected as resource)","filename of your util","Version of util","About dialog wiki link");
```
And finaly you get interface structure:
```C
template_main_window *widgets = yon_ubl_window_setup();
```
## ubl-utils
Ubl-utils provides various utility functions used in ubl-settings- applications. They are divided into sections as:
**Dictionary functions** yon_dictionary;
**String functions** yon_char;
**String array functions** yon_char_parsed;
**UBL misc functions** yon_ubl
**Parsing functions**
**File manipulating functions** yon_file
**UBconfig manipulation functions** yon_config
**Terminal functions** yon_launch
**GTK functions** yon_gtk and yon_ubl_gtk
**GTK VTE functions** yon_terminal
**GTK Webkit functions** yon_ubl_browser
**GTK window configuration manipulation and saving functions** yon_window_config
**GTK status line renderer functions** yon_ubl_status

@ -137,8 +137,7 @@ template_main_window *setup_window(){
return widgets; return widgets;
} }
int yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki){ int yon_ubl_window_init(char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki){
template_app_information.interface=interface;
template_app_information.app_title=app_title; template_app_information.app_title=app_title;
template_app_information.css_path=css; template_app_information.css_path=css;
template_app_information.app_tech_name=tech_name; template_app_information.app_tech_name=tech_name;
@ -149,12 +148,9 @@ int yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_descri
template_app_information.app_locale=locale; template_app_information.app_locale=locale;
} }
template_main_window *yon_ubl_window_init(int argc, char *argv[]){ template_main_window *yon_ubl_window_setup(){
textdomain (template_ui_LocaleName); textdomain (template_ui_LocaleName);
setlocale(LC_ALL,""); setlocale(LC_ALL,"");
// gtk_init(&argc,&argv);
template_main_window *widgets = setup_window(); template_main_window *widgets = setup_window();
yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,ui_banner_path); yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,ui_banner_path);

@ -155,7 +155,7 @@ int yon_ubl_connect_config(_template_config *config);
* [RU] * [RU]
* Создаёт и настраивает основное окно приложения. * Создаёт и настраивает основное окно приложения.
*/ */
template_main_window *yon_ubl_window_init(int argc, char *argv[]); template_main_window *yon_ubl_window_setup();
/**yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki) /**yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki)
* [EN] * [EN]
@ -169,7 +169,7 @@ template_main_window *yon_ubl_window_init(int argc, char *argv[]);
* [version] - строка с версией приложения; * [version] - строка с версией приложения;
* [wiki] - ссылка на вики страницу; * [wiki] - ссылка на вики страницу;
*/ */
int yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki); int yon_ubl_window_init(char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki);
/**on_about() /**on_about()
* [EN] * [EN]

@ -2,12 +2,6 @@
// dictionary functions // dictionary functions
/**yon_dictionary_new():
* [EN]
* Creates and returns empty dictionary
* [RU]
* Создаёт и возвращает пустой словарь.
*/
dictionary *yon_dictionary_new() dictionary *yon_dictionary_new()
{ {
dictionary *dict = malloc(sizeof(dictionary)); dictionary *dict = malloc(sizeof(dictionary));
@ -20,24 +14,12 @@ dictionary *yon_dictionary_new()
return dict; return dict;
} }
/**yon_dictionary_copy(dictionary *dict)
* [EN]
*
* [RU]
* Создаёт и возвращает копию элемента словаря [dict]
*/
dictionary *yon_dictinoary_copy(dictionary *dict){ dictionary *yon_dictinoary_copy(dictionary *dict){
dictionary *dct = yon_dictionary_new_with_data(dict->key,dict->data); dictionary *dct = yon_dictionary_new_with_data(dict->key,dict->data);
dct->data_type= dict->data_type; dct->data_type= dict->data_type;
return dct; return dct;
} }
/**yon_dictionary_copy_deep(dictionary *dict)
* [EN]
*
* [RU]
* Создаёт полную копию словаря [dict] и возвращает первый элемент
*/
dictionary *yon_dictionary_copy_deep(dictionary *dict){ dictionary *yon_dictionary_copy_deep(dictionary *dict){
dictionary *dct = NULL; dictionary *dct = NULL;
dictionary *newone=NULL; dictionary *newone=NULL;
@ -48,69 +30,33 @@ dictionary *yon_dictionary_copy_deep(dictionary *dict){
return newone->first; return newone->first;
} }
/**int yon_dictionary_set_data(dictionary *dict, void *data)
* [EN]
*
* [RU]
* Установить элементу словаря [dict] значение [data]
*/
int yon_dictionary_set_data(dictionary *dict, void *data){ int yon_dictionary_set_data(dictionary *dict, void *data){
dict->data=data; dict->data=data;
} }
/**int yon_dictionary_set_key(dictionary *dict, char *key)
* [EN]
*
* [RU]
* Изменяет ключ элемента словаря [dict] на [key]
*/
int yon_dictionary_set_key(dictionary *dict, char *key){ int yon_dictionary_set_key(dictionary *dict, char *key){
dict->key=key; dict->key=key;
return 1; return 1;
} }
/** int yon_dictionary_set(dictionary *dict, char *key, void *data)
* [EN]
*
* [RU]
* Устанавливает значение ключа элемента словаря [dict] на [key] и его данные на [data]
*/
int yon_dictionary_set(dictionary *dict, char *key, void *data){ int yon_dictionary_set(dictionary *dict, char *key, void *data){
dict->key=key; dict->key=key;
dict->data=data; dict->data=data;
return 1; return 1;
} }
/**int yon_dictionary_empty(dictionary *dict)
* [EN]
*
* [RU]
* Очищает элемент словаря [dict] от данных
*/
int yon_dictionary_empty(dictionary *dict){ int yon_dictionary_empty(dictionary *dict){
dict->data=NULL; dict->data=NULL;
dict->data_type=DICTIONARY_OTHER_TYPE; dict->data_type=DICTIONARY_OTHER_TYPE;
return 1; return 1;
} }
/**yon_dictionary_switch_to_last(dictionary **dict)
* [EN]
*
* [RU]
* Переключает словарь [dict] на последний элемент.
*/
void yon_dictionary_switch_to_last(dictionary **dict) void yon_dictionary_switch_to_last(dictionary **dict)
{ {
dictionary *dct=NULL, *dact=*dict; dictionary *dct=NULL, *dact=*dict;
for_dictionaries(dct,dact); for_dictionaries(dct,dact);
} }
/**yon_dictionary_create_conneced(dictionary *targetdict)
* [EN]
*
* [RU]
* Создаёт новый элемент словаря [targetdict]
*/
dictionary *yon_dictionary_append(dictionary *targetdict) dictionary *yon_dictionary_append(dictionary *targetdict)
{ {
targetdict = yon_dictionary_get_last(targetdict); targetdict = yon_dictionary_get_last(targetdict);
@ -121,14 +67,6 @@ dictionary *yon_dictionary_append(dictionary *targetdict)
return targetdict->next; return targetdict->next;
} }
/**yon_dictionary_get_last(dictionary *dict)
* [EN]
*
* [RU]
* Возвращает последний элемент словаря [dict].
* В отличае от yon_dictionary_switch_to_last()
* словарь [dict] остаётся на прежнем элементе.
*/
dictionary *yon_dictionary_get_last(dictionary *dict) dictionary *yon_dictionary_get_last(dictionary *dict)
{ {
if (dict->next){ if (dict->next){
@ -138,14 +76,6 @@ dictionary *yon_dictionary_get_last(dictionary *dict)
} else return dict; } else return dict;
} }
/**yon_dictionary_switch_places(dictionary *dict, int aim)
* [EN]
*
* [RU]
* Меняет элемент словаря [dict] местами с другим элементом.
* если [aim]<0 элемент меняется местами с левым элементом;
* если [aim]>0 элемент меняется местами с правым элементом;
*/
dictionary *yon_dictionary_swap(dictionary *dict, int aim) dictionary *yon_dictionary_swap(dictionary *dict, int aim)
{ {
if (aim < 0) if (aim < 0)
@ -247,13 +177,6 @@ dictionary *yon_dictionary_swap(dictionary *dict, int aim)
} }
} }
/**yon_dictionary_make_first(dictionary *dict)
* [EN]
*
* [RU]
* Устанавливает указатель первого элемента словаря [dict]
* на текущий элемент. Не использовать.
*/
void yon_dictionary_make_first(dictionary *dict) void yon_dictionary_make_first(dictionary *dict)
{ {
for (dictionary *dct = dict->first; dct != NULL; dct = dct->next) for (dictionary *dct = dict->first; dct != NULL; dct = dct->next)
@ -262,12 +185,6 @@ void yon_dictionary_make_first(dictionary *dict)
} }
} }
/**yon_dictionary_make_nth(dictionary *dict, int nth)
* [EN]
*
* [RU]
* Перемещает элемент словаря [dict] на позицию [nth].
*/
void yon_dictionary_make_nth(dictionary *dict, int nth) void yon_dictionary_make_nth(dictionary *dict, int nth)
{ {
dictionary *dct = dict->first; dictionary *dct = dict->first;
@ -286,12 +203,6 @@ void yon_dictionary_make_nth(dictionary *dict, int nth)
dct->prev = dict; dct->prev = dict;
} }
/**yon_dictionary_create_with_data(char *key, void *data)
* [EN]
*
* [RU]
* Создаёт новый словарь с ключом [key] и указателем на данные [data]
*/
dictionary *yon_dictionary_new_with_data(char *key, void *data) dictionary *yon_dictionary_new_with_data(char *key, void *data)
{ {
dictionary *dct = yon_dictionary_new(); dictionary *dct = yon_dictionary_new();
@ -301,12 +212,6 @@ dictionary *yon_dictionary_new_with_data(char *key, void *data)
return dct; return dct;
} }
/** void *yon_dictionary_free_all(dictionary *dictionary,void *data_manipulation)
* [EN]
* Frees whole [dictionary] and activates [data_manipulation] function if not NULL with [dictionary]->data argument for each dictionary.
* [RU]
* Освобождает память для всех элементов словаря [dictionary] и активирует функцию [data_manipulation], если она была передана, с аргументом [dictionary]->data на каждый элемент словаря.
*/
void *yon_dictionary_free_all(dictionary *dictionary_to_free,void (*data_manipulation)(void*)){ void *yon_dictionary_free_all(dictionary *dictionary_to_free,void (*data_manipulation)(void*)){
dictionary *dict=NULL; dictionary *dict=NULL;
for_dictionaries(dict,dictionary_to_free){ for_dictionaries(dict,dictionary_to_free){
@ -319,13 +224,6 @@ void *yon_dictionary_free_all(dictionary *dictionary_to_free,void (*data_manipul
return NULL; return NULL;
} }
/**yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data)
* [EN]
*
* [RU]
* Создаёт новый элемент словаря, присоединяемый в конец словаря [dict]
* с ключом [key] и указателем на данные [data]
*/
dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data) dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data)
{ {
dictionary *dct = yon_dictionary_append(dict); dictionary *dct = yon_dictionary_append(dict);
@ -335,12 +233,6 @@ dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *d
return dct; return dct;
} }
/**yon_dictionary_connect(dictionary *old, dictionary *toconnect)
* [EN]
*
* [RU]
* Присоединяет словарь [toconnect] в конец словаря [old].
*/
dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect) dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect)
{ {
dictionary *dict = yon_dictionary_get_last(old); dictionary *dict = yon_dictionary_get_last(old);
@ -350,13 +242,6 @@ dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect)
return toconnect; return toconnect;
} }
/**yon_dictionary_get(dictionary **dict, char *key)
* [EN]
*
* [RU]
* Возвращает элемент словаря [dict] с ключом [key].
* Если такого элемента не было обнаружено, возвращается NULL
*/
dictionary *yon_dictionary_get(dictionary **dict, char *key) dictionary *yon_dictionary_get(dictionary **dict, char *key)
{ {
dictionary *dct = *dict; dictionary *dct = *dict;
@ -371,12 +256,6 @@ dictionary *yon_dictionary_get(dictionary **dict, char *key)
return NULL; return NULL;
} }
/**yon_dictionary_rip(dictionary *dict)
* [EN]
*
* [RU]
* Вырезает элемент из словаря и возвращает вырезанный элемент.
*/
dictionary *yon_dictionary_rip(dictionary *dict) dictionary *yon_dictionary_rip(dictionary *dict)
{ {
if (!dict->next&&!dict->prev) return NULL; if (!dict->next&&!dict->prev) return NULL;
@ -412,12 +291,6 @@ dictionary *yon_dictionary_rip(dictionary *dict)
} }
} }
/**yon_dictionary_get_nth(dictionary *dict, int place)
* [EN]
*
* [RU]
* Возвращает [place]-й элемент словаря [dict]
*/
dictionary *yon_dictionary_get_nth(dictionary *dict, int place) dictionary *yon_dictionary_get_nth(dictionary *dict, int place)
{ {
if (dict){ if (dict){
@ -444,10 +317,6 @@ int yon_char_find_last(char *source, char find){
return i; return i;
} }
/**[EN]
*
* creates new char string by combining two char strings.
*/
char *yon_char_append(char *source, char *append) char *yon_char_append(char *source, char *append)
{ {
if (source && append) if (source && append)
@ -465,10 +334,6 @@ char *yon_char_append(char *source, char *append)
return NULL; return NULL;
} }
/**[EN]
*
* creates new char string by copying another char.
*/
char *yon_char_new(char *chr) char *yon_char_new(char *chr)
{ {
if (chr){ if (chr){
@ -480,12 +345,6 @@ char *yon_char_new(char *chr)
return NULL; return NULL;
} }
/**yon_char_unite(char *source, ...)
* [En]
*
* [RU]
* Объединяет строку [source] со всеми строками, написанными в [...]
*/
char *yon_char_unite(char *source, ...){ char *yon_char_unite(char *source, ...){
va_list arglist; va_list arglist;
char *new_char=NULL; char *new_char=NULL;
@ -501,10 +360,6 @@ char *yon_char_unite(char *source, ...){
return new_char; return new_char;
} }
/**yon_cut(char *source, int size, int startpos)
* [EN]
* cuts source string by size length from startpos position.
*/
char *yon_cut(char *source, int size, int startpos) char *yon_cut(char *source, int size, int startpos)
{ {
char *cut = NULL; char *cut = NULL;
@ -514,12 +369,6 @@ char *yon_cut(char *source, int size, int startpos)
return cut; return cut;
} }
/**yon_char_divide(char *source, int dividepos)
* [EN]
* divides source string in dividepos position,
* returning left part of divided string and
* inserting right part to source string.
*/
char *yon_char_divide(char *source, int dividepos) char *yon_char_divide(char *source, int dividepos)
{ {
if (source){ if (source){
@ -536,12 +385,6 @@ char *yon_char_divide(char *source, int dividepos)
return NULL; return NULL;
} }
/**yon_char_find_count(char *source, char *find)
* [EN]
*
* [RU]
* Считает количество символов [find] в строке [source]
*/
int yon_char_find_count(char *source, char *find){ int yon_char_find_count(char *source, char *find){
char *working_string=yon_char_new(source); char *working_string=yon_char_new(source);
int i=0; int i=0;
@ -556,24 +399,6 @@ int yon_char_find_count(char *source, char *find){
return i; return i;
} }
/**yon_char_divide_search(char *source, char *dividepos, int delete_divider)
* [EN]
* char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
* searches string [dividepos] in [source] string and divides it,
* returning left part of divided string and
* inserting right part to [source] string.
* if [delete_divider] is 0, left part will contain [delete_divider] substring, else
* if [delete_divider] is 1 it will stay in right part, else
* if [delete_divider] is -1 it will be deleted from string.
*
* [RU]
* char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
* Ищет строку [dividepos] в строке [source] и делит её в этом месте,
* возвращая левую часть разделённой строки и устанавливает в [source] правую часть.
* Если [delete_divider] равен 0, [dividepos] останется в левой строке, иначе
* если [delete_divider] равен 1, [dividepos] останется в правой строке, иначе
* если [delete_divider] равен -1, [dividepos] удаляется из строки.
*/
char *yon_char_divide_search(char *source, char *dividepos, int delete_divider) char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
{ {
if (source&&dividepos){ if (source&&dividepos){
@ -588,15 +413,6 @@ char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
return source; return source;
} }
/**yon_char_from_int(int int_to_convert)
* [EN]
* char *yon_char_from_int(int int_to_convert)
* converts int to char*.
*
* [RU]
* char *yon_char_from_int(int int_to_convert)
* Конвертирует int в char*
*/
char *yon_char_from_int(int int_to_convert) char *yon_char_from_int(int int_to_convert)
{ {
int i = 1; int i = 1;
@ -610,13 +426,6 @@ char *yon_char_from_int(int int_to_convert)
return ch; return ch;
} }
/**yon_char_from_float(int int_to_convert)
* [EN]
* converts float to char*.
*
* [RU]
* Конвертирует float в char*
*/
char *yon_char_from_float(float int_to_convert) char *yon_char_from_float(float int_to_convert)
{ {
int i = 1; int i = 1;
@ -630,13 +439,6 @@ char *yon_char_from_float(float int_to_convert)
return ch; return ch;
} }
/**yon_char_from_long(int int_to_convert)
* [EN]
* converts long to char*.
*
* [RU]
* Конвертирует long в char*
*/
char *yon_char_from_long(long int_to_convert) char *yon_char_from_long(long int_to_convert)
{ {
int i = 1; int i = 1;
@ -650,12 +452,6 @@ char *yon_char_from_long(long int_to_convert)
return ch; return ch;
} }
/**yon_char_replace(char *source, char *find, char*replace)
* [EN]
*
* [RU]
* Заменяет в строке [source] все вхождения строки [find] на [replace]
*/
char *yon_char_replace(char *source, char *find, char*replace){ char *yon_char_replace(char *source, char *find, char*replace){
if (!strstr(replace,find)){ if (!strstr(replace,find)){
@ -676,12 +472,6 @@ char *yon_char_replace(char *source, char *find, char*replace){
return source; return source;
} }
/**yon_char_parse(char *parameters, int *size, char *divider)
* [EN]
* Parses string [parameters], divided by [divider],
* then returns parsed string array and sets [size] to
* size of returned array
*/
char **yon_char_parse(char *parameters, int *size, char *divider){ char **yon_char_parse(char *parameters, int *size, char *divider){
if (parameters){ if (parameters){
char **string=NULL; char **string=NULL;
@ -701,13 +491,6 @@ char **yon_char_parse(char *parameters, int *size, char *divider){
return NULL; return NULL;
} }
/**yon_char_parsed_rip(char **char_string, int *size, int item_to_delete)
* [EN]
*
* [RU]
* Удаляет элемент [item_to_delete] из массива строк [char_string], размера [size]
* Возвращает получившийся массив, в [size] загружается размер нового массива.
*/
char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete){ char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete){
char **new_char_parsed=NULL; char **new_char_parsed=NULL;
new_char_parsed=malloc(sizeof(char*)*((*size)-1)); new_char_parsed=malloc(sizeof(char*)*((*size)-1));
@ -727,14 +510,6 @@ char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete){
return new_char_parsed; return new_char_parsed;
} }
/**yon_char_parsed_check_exist(char **parameters, int size, char *param)
* [EN]
* Checks if [parameters] string array of length [size]
* has [param] element;
* [RU]
* Проверяет есть ли в массиве строк [parameters], размера [size]
* элемент [param]
*/
int yon_char_parsed_check_exist(char **parameters, int size, char *param){ int yon_char_parsed_check_exist(char **parameters, int size, char *param){
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
@ -747,14 +522,6 @@ int yon_char_parsed_check_exist(char **parameters, int size, char *param){
return -1; return -1;
} }
/**yon_char_parsed_check_repeats(char **parameters, int size)
* [EN]
* Checks if [parameters] string array of length [size]
* has repeated elements;
* [RU]
* Проверяет есть ли в массиве строк [parameters], размера [size]
* повторения
*/
int yon_char_parsed_check_repeats(char **parameters, int size, int *first_overlap, int *second_overlap){ int yon_char_parsed_check_repeats(char **parameters, int size, int *first_overlap, int *second_overlap){
if (parameters){ if (parameters){
*first_overlap=0; *first_overlap=0;
@ -771,13 +538,6 @@ int yon_char_parsed_check_repeats(char **parameters, int size, int *first_overla
return 0; return 0;
} }
/**yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size)
* [EN]
*
* [RU]
* Проверяет, включает ли в себя [source] размера [source_size]
* массив строк [to_check] размера [check_size]
*/
int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size){ int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size){
int overall_found=0; int overall_found=0;
for (int i=0;i<source_size;i++){ for (int i=0;i<source_size;i++){
@ -791,13 +551,6 @@ int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check
else return 0; else return 0;
} }
/**yon_char_parsed_new (config_str old, int *old_size, ...)
* [EN]
*
* [RU]
* Создаёт новый массив строк. В [size] выгружается его размер
* [...] - неограниченное количество строк.
*/
config_str yon_char_parsed_new (int *size, ...){ config_str yon_char_parsed_new (int *size, ...){
va_list arglist; va_list arglist;
config_str new_parsed=NULL; config_str new_parsed=NULL;
@ -823,12 +576,6 @@ void yon_char_parsed_free(config_str source, int size){
free(source); free(source);
} }
/**yon_char_parsed_copy(config_str *source, config_str *to_copy)
* [EN]
*
* [RU]
* Копирует массив строк [to_copy] в [source]
*/
void yon_char_parsed_copy(config_str *source, config_str *to_copy){ void yon_char_parsed_copy(config_str *source, config_str *to_copy){
if (source&&!*source&&to_copy){ if (source&&!*source&&to_copy){
int size=0; int size=0;
@ -840,12 +587,6 @@ 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)
* [EN]
* Adds [string] at the end of [parsed] string array of [size] length.
* [RU]
* Добавляет строку [string] в конец массива строк [parsed] с длинной [size].
*/
config_str yon_char_parsed_append(config_str parsed, int *size, char *string){ config_str yon_char_parsed_append(config_str parsed, int *size, char *string){
config_str new_parsed=realloc(parsed,(*size+1)*sizeof(char*)); config_str new_parsed=realloc(parsed,(*size+1)*sizeof(char*));
new_parsed[(*size)]=yon_char_new(string); new_parsed[(*size)]=yon_char_new(string);
@ -853,24 +594,11 @@ config_str yon_char_parsed_append(config_str parsed, int *size, char *string){
return new_parsed; return new_parsed;
} }
/**yon_ubl_check_root()
* [EN]
*
* [RU]
* Возвращает 1 если приложение было запущено от root
*/
int yon_ubl_check_root(){ int yon_ubl_check_root(){
if (getuid()==0) return 1; if (getuid()==0) return 1;
else return 0; else return 0;
} }
/**yon_ubl_root_user_get()
* [EN]
*
* [RU]
* Возвращает имя пользователя.
* Если пользователь запустил приложение через root, выводится имя пользователя, запустившего приложение через root
*/
char *yon_ubl_root_user_get(){ char *yon_ubl_root_user_get(){
char *user=NULL; char *user=NULL;
if (yon_ubl_check_root()){ if (yon_ubl_check_root()){
@ -912,12 +640,6 @@ config_str yon_ubl_get_all_users(int *user_size){
// parsing functions // parsing functions
/** yon_size_convert_automatic(int bytes, int *size)
* [EN]
*
* [RU]
*
*/
float yon_size_convert_automatic(int bytes, int *size){ float yon_size_convert_automatic(int bytes, int *size){
float byte_float=bytes; float byte_float=bytes;
for (*size=-1;byte_float>1024;*size=*size+1){ for (*size=-1;byte_float>1024;*size=*size+1){
@ -1045,16 +767,6 @@ apps *yon_apps_get_by_name(apps *applist, char *name, int size)
return NULL; return NULL;
}; };
/**
* yon_dir_get_contents(char *dir_path, int *size)
* [EN]
*
* [RU]
* Проверяет существует ли папка [dir_path] и
* возвращает список всех вложенных файлов и папок,
* передавая в [size] длину списка.
*/
config_str yon_dir_get_contents(char *dir_path, int *size){ config_str yon_dir_get_contents(char *dir_path, int *size){
config_str dir = NULL; config_str dir = NULL;
*size=0; *size=0;
@ -1112,13 +824,6 @@ static yon_config_parameter *__yon__config__strings = NULL;
#define yon_config_parameter_add_or_create_if_exists_with_data(dict,key,data) {if (!dict) dict=yon_config_parameter_new_with_data(key,data); \ #define yon_config_parameter_add_or_create_if_exists_with_data(dict,key,data) {if (!dict) dict=yon_config_parameter_new_with_data(key,data); \
else dict=yon_config_parameter_append_with_data(dict,key,data);} else dict=yon_config_parameter_append_with_data(dict,key,data);}
/**yon_config_load_register(char *command)
* [EN]
*
* [RU]
* Выполняет команду [command].
* Полученные данные парсятся и регистрируются в конфиг.
*/
int yon_config_load_register(YON_CONFIG_TYPE config_type,char *section,char *parameter, ...){ int yon_config_load_register(YON_CONFIG_TYPE config_type,char *section,char *parameter, ...){
if (__yon__config__strings){ if (__yon__config__strings){
__yon__config__strings = yon_dictionary_free_all((dictionary*)__yon__config__strings,NULL); __yon__config__strings = yon_dictionary_free_all((dictionary*)__yon__config__strings,NULL);
@ -1163,12 +868,6 @@ int yon_config_load_register(YON_CONFIG_TYPE config_type,char *section,char *par
else return 0; else return 0;
} }
/**yon_config_remove_by_key(char *key)
* [EN]
*
* [RU]
* Удаляет параметр конфига по ключу [key]
*/
int yon_config_remove_by_key(char *key){ int yon_config_remove_by_key(char *key){
check_config{ check_config{
dictionary *dict = yon_dictionary_get((dictionary**)&__yon__config__strings,key); dictionary *dict = yon_dictionary_get((dictionary**)&__yon__config__strings,key);
@ -1180,12 +879,6 @@ int yon_config_remove_by_key(char *key){
return 0; return 0;
} }
/**yon_config_remove_element(char *key, char *deleted)
* [EN]
*
* [RU]
* Удаляет элемент [deleted] из массива параметров с ключом [key]
*/
int yon_config_remove_element(char *key, char *deleted){ int yon_config_remove_element(char *key, char *deleted){
check_config{ check_config{
yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key); yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key);
@ -1207,12 +900,6 @@ int yon_config_remove_element(char *key, char *deleted){
} else return 0; } else return 0;
} }
/**yon_config_get_by_key(char *key)
* [EN]
*
* [RU]
* Возвращает значение параметра конфига с ключом [key]
*/
void *yon_config_get_by_key(char *key){ void *yon_config_get_by_key(char *key){
check_config{ check_config{
dictionary *dict = NULL; dictionary *dict = NULL;
@ -1240,31 +927,6 @@ void *yon_config_get_all_by_key(char *key, int *size){
} }
} }
/**yon_config_get_key_by_data(char *data)
* [EN]
*
* [RU]
* Возвращает ключ параметра конфига со значением [data].
* Если параметр с таким значением не найден, возвращается NULL
*/
char *yon_config_get_key_by_data(char *data){
check_config{
dictionary *dict = NULL;
for_dictionaries(dict, (dictionary*)__yon__config__strings){
if (strcmp(((char*)dict->data),data)==0){
return dict->key;
}
}
}
return NULL;
}
/**yon_config_set(char *key, void *data)
* [EN]
*
* [RU]
* Производит поиск по конфигу и заменяет значение параметра с ключом [key] на новое значение [data];
*/
int yon_config_set(char *key, void *data){ int yon_config_set(char *key, void *data){
check_config{ check_config{
yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key); yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key);
@ -1274,13 +936,6 @@ int yon_config_set(char *key, void *data){
} else return 0; } else return 0;
} }
/**yon_config_append(char *key, void *data)
* [EN]
*
* [RU]
* Производит поиск по конфигу и дополняет значение параметра с ключом [key] значением [data];
*/
int yon_config_append(char *key, char *data){ int yon_config_append(char *key, char *data){
check_config{ check_config{
yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key); yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key);
@ -1292,13 +947,6 @@ int yon_config_append(char *key, char *data){
} else return 0; } else return 0;
} }
/**yon_config_clean()
* [EN]
* Erase all parameters from config;
* [RU]
* Удаляет все параметры из конфига;
*/
int yon_config_clean(){ int yon_config_clean(){
check_config{ check_config{
__yon__config__strings = (yon_config_parameter*)yon_dictionary_free_all((dictionary*)__yon__config__strings, NULL); __yon__config__strings = (yon_config_parameter*)yon_dictionary_free_all((dictionary*)__yon__config__strings, NULL);
@ -1307,14 +955,6 @@ int yon_config_clean(){
else return 0; else return 0;
} }
/**yon_config_register(char *key, void *data)
* [EN]
*
* [RU]
* Регистрирует новый параметр конфига.
* [key] - ключ параметра;
* [data] - значение параметра;
*/
void yon_config_register(char *key, char *config_section, void *data){ void yon_config_register(char *key, char *config_section, void *data){
if (!__yon__config__strings||!yon_dictionary_get((dictionary**)&__yon__config__strings,key)){ if (!__yon__config__strings||!yon_dictionary_get((dictionary**)&__yon__config__strings,key)){
yon_config_parameter_add_or_create_if_exists_with_data(__yon__config__strings,key,data); yon_config_parameter_add_or_create_if_exists_with_data(__yon__config__strings,key,data);
@ -1325,13 +965,6 @@ void yon_config_register(char *key, char *config_section, void *data){
__yon__config__strings->section=yon_char_new(config_section); __yon__config__strings->section=yon_char_new(config_section);
} }
/**yon_config_load(char *command, int *str_len)
* [EN]
*
* [RU]
* Выполняет команду [command] и возвращает распаршеный результат выполнения команды.
* В [str_len] возвращается длина возвращаемого массива
*/
config_str yon_config_load(char *command, int *str_len){ config_str yon_config_load(char *command, int *str_len){
FILE *output = popen(command, "r"); FILE *output = popen(command, "r");
char **output_strings = NULL; char **output_strings = NULL;
@ -1359,18 +992,6 @@ config_str yon_config_load(char *command, int *str_len){
} }
} }
/**int yon_config_save_registered(char *path)
* [EN]
* Saves config at [path] config.
* [path] can be:
* system
* global
* [RU]
* Сохраняет конфигурацию в [path] конфиг.
* [path] может быть
* system - локальный конфиг
* global - глобальный конфиг
*/
int yon_config_save_registered(char *path){ int yon_config_save_registered(char *path){
check_config{ check_config{
dictionary *dct; dictionary *dct;
@ -1404,18 +1025,6 @@ int yon_config_save_registered(char *path){
} else return 1; } else return 1;
} }
/**int yon_config_force_save_registered(char *path, char *section)
* [EN]
* Force config to save at [path] config ignoring parameter save status.
* [path] can be:
* system
* global
* [RU]
* Принудительно сохраняет конфигурацию в [path] конфиг игнорируя статус параметра.
* [path] может быть
* system - локальный конфиг
* global - глобальный конфиг
*/
int yon_config_force_save_registered(char *path){ int yon_config_force_save_registered(char *path){
check_config{ check_config{
dictionary *dct; dictionary *dct;
@ -1448,13 +1057,6 @@ int yon_config_force_save_registered(char *path){
} else return 1; } else return 1;
} }
/**yon_config_get_all(int *size)
* [EN]
*
* [RU]
* Возвращает массив со всеми параметрами конфига, оканчивающаяся NULL
* [size] - указатель, в который выгружается длина массива
*/
config_str yon_config_get_all(int *size){ config_str yon_config_get_all(int *size){
check_config{ check_config{
*size = 1; *size = 1;
@ -1472,14 +1074,6 @@ config_str yon_config_get_all(int *size){
} else return NULL; } else return NULL;
} }
/**char *yon_config_get_parameter(config parameters, int size, char *param)
* [EN]
* Gets parameter [param] from parameter list [parameters] of size [size];
* or NULL if nothing were found
* [RU]
* Возвращает параметр [param] из массива строк [parameters] размером [size]
* или NULL если такой не был найден
*/
char *yon_config_get_parameter(config_str parameters, int size, char *param) char *yon_config_get_parameter(config_str parameters, int size, char *param)
{ {
if (param[0]==' ') if (param[0]==' ')
@ -1518,13 +1112,6 @@ config_str yon_file_open(char *file_path, int *size){
} }
} }
/**yon_file_create(char *path, char *name, int rules)
* [EN]
*
* [RU]
* Создать файл с названием [name], находящимся по пути [path]
* С правами доступа [rules] (от 0000 до 0777)
*/
int yon_file_create(char *path, char *name, int rules){ int yon_file_create(char *path, char *name, int rules){
if (path&&name){ if (path&&name){
char *full_path = yon_char_unite(path,"/",name,NULL); char *full_path = yon_char_unite(path,"/",name,NULL);
@ -1545,13 +1132,6 @@ int yon_file_create(char *path, char *name, int rules){
} }
} }
/**yon_file_create_full_path(char *path, char *name, int rules)
* [EN]
*
* [RU]
* Создать файл по пути [path]
* С правами доступа [rules] (от 0000 до 0777)
*/
int yon_file_create_full_path(char *path, int rules){ int yon_file_create_full_path(char *path, int rules){
if (path){ if (path){
if (access(path,F_OK)){ if (access(path,F_OK)){
@ -1573,12 +1153,6 @@ int yon_file_create_full_path(char *path, int rules){
// terminal-using functions // terminal-using functions
/**yon_launch_app_with_arguments(char *name, char *args)
* [EN]
* Execute [command] in separate thread;
* [RU]
* Выполнить команду [command] в отдельном потоке;
*/
int yon_launch_app_with_arguments(char *name, char *args) int yon_launch_app_with_arguments(char *name, char *args)
{ {
char *path = yon_char_unite("/usr/bin/", name, " ", args,NULL); char *path = yon_char_unite("/usr/bin/", name, " ", args,NULL);
@ -1588,12 +1162,6 @@ int yon_launch_app_with_arguments(char *name, char *args)
pthread_create(&thread_id, NULL, (void *)yon_launch, command); pthread_create(&thread_id, NULL, (void *)yon_launch, command);
}; };
/**yon_launch(char *command)
* [EN]
* Execute command [command]
* [RU]
* Выполнить команду [command]
*/
void yon_launch(char *command) void yon_launch(char *command)
{ {
system(command); system(command);
@ -1616,17 +1184,6 @@ static void child_ready(VteTerminal *terminal, GPid pid, GError *error, gpointer
else vte_terminal_feed_child(VTE_TERMINAL(terminal),(char*)user_data,strlen((char*)user_data)); else vte_terminal_feed_child(VTE_TERMINAL(terminal),(char*)user_data,strlen((char*)user_data));
} }
/**
* void yon_terminal_integrated_launch(GtkWidget *place_to_show, void *endwork_function, void* endwork_function_argument)
* [EN]
* launches terminal with specific [command],
* terminal is shown in [place_to_show] container,
* after terminal done its work [endwork_function] is called with [endwork_function_argument] argument.
* [RU]
* Запускает терминал с командой [command],
* терминал добавляется в контейнер [place_to_show] виджета,
* после завершения работы терминала вызывается функция [endwork_function] с аргументом [endwork_function_argument].
*/
void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument){ void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument){
char **commands=new_arr(char*,2); char **commands=new_arr(char*,2);
gchar **envp = g_get_environ(); gchar **envp = g_get_environ();
@ -1672,16 +1229,6 @@ void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, voi
gtk_widget_show_all(terminal); gtk_widget_show_all(terminal);
} }
/**yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument)
* [EN]
* launches terminal with specific [command],
* terminal is shown in [place_to_show] container,
* after terminal done its work [endwork_function] is called with [endwork_function_argument] argument.
* [RU]
* Запускает терминал с командой [command],
* терминал добавляется в контейнер [place_to_show] виджета,
* после завершения работы терминала вызывается функция [endwork_function] с аргументом [endwork_function_argument].
*/
void yon_terminal_integrated_start(GtkWidget *terminal, 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){
char **commands=new_arr(char*,2); char **commands=new_arr(char*,2);
gchar **envp = g_get_environ(); gchar **envp = g_get_environ();
@ -1839,12 +1386,6 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
} }
} }
/**yon_window_config_setup(GtkWindow *window)
* [EN]
*
* [RU]
* Устанавливает указатель на окно для отслеживания его положения и размера
*/
void yon_window_config_setup(GtkWindow *window){ void yon_window_config_setup(GtkWindow *window){
__yon_window_config_target_window = window; __yon_window_config_target_window = window;
g_signal_connect(G_OBJECT(window),"delete-event",G_CALLBACK(yon_on_configured_window_destroy),NULL); g_signal_connect(G_OBJECT(window),"delete-event",G_CALLBACK(yon_on_configured_window_destroy),NULL);
@ -1856,12 +1397,6 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
if(__yon_main_window_config.fullscreen ==1) gtk_window_maximize(__yon_window_config_target_window); if(__yon_main_window_config.fullscreen ==1) gtk_window_maximize(__yon_window_config_target_window);
} }
/**yon_window_config_load(char *path)
* [EN]
*
* [RU]
* Загружает конфиг окна и инициализирует отслеживание его параметров
*/
int yon_window_config_load(char *path){ int yon_window_config_load(char *path){
__yon_window_config_file = g_key_file_new(); __yon_window_config_file = g_key_file_new();
__yon_window_config_path=yon_char_new(path); __yon_window_config_path=yon_char_new(path);
@ -1925,12 +1460,6 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
return key; return key;
} }
/**yon_window_config_add_custom_parameter(GtkWidget *widget, char *param_name, char *widget_property)
* [EN]
*
* [RU]
* Добавляет параметр виджета [widget] по названию [widget_property] для отслеживания и сохраняет его в конфиг под ключом [param_name].
*/
void yon_window_config_add_listener(GtkWidget *widget, char *param_name, char *widget_property, enum YON_TYPE val_type){ void yon_window_config_add_listener(GtkWidget *widget, char *param_name, char *widget_property, enum YON_TYPE val_type){
__yon_listener_parameter *param = NULL; __yon_listener_parameter *param = NULL;
param = yon_remalloc(param,sizeof(__yon_listener_parameter)); param = yon_remalloc(param,sizeof(__yon_listener_parameter));
@ -2107,12 +1636,6 @@ GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname){
// other Gtk functions // other Gtk functions
/**yon_gtk_combo_box_fill(GtkWidget *combo, config_str parameters,int size)
* [EN]
*
* [RU]
* Добавляет в Комбобокс [combo] все строки из массива строк [parameters] размера [size]
*/
int yon_gtk_combo_box_fill(GtkWidget *combo, config_str parameters,int size){ int yon_gtk_combo_box_fill(GtkWidget *combo, config_str parameters,int size){
if (combo&&parameters){ if (combo&&parameters){
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
@ -2123,13 +1646,6 @@ int yon_gtk_combo_box_fill(GtkWidget *combo, config_str parameters,int size){
return 0; return 0;
} }
/**yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find)
* [EN]
*
* [RU]
* Проивзодит поиск по GtkComboBoxText [combo_box]
* возвращает 1 если элемент [text_to_find] найден, иначе возвращает 0
*/
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find){ int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find){
if (combo_box&&text_to_find){ if (combo_box&&text_to_find){
int active=gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box)); int active=gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box));
@ -2148,15 +1664,6 @@ void yon_gtk_column_minimal_fixed_size_set(GtkTreeViewColumn *column){
gtk_tree_view_column_set_min_width(column,width); gtk_tree_view_column_set_min_width(column,width);
} }
/**yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...)
* [EN]
*
* [RU]
* Добвляет [destination] все виджеты, прописанные после [padding]. Добавление происходит с начала контейнера.
* [expand] - расширяемость выделенного для виджетов места
* [fill] - заполнять ли виджетом всё ему выделенное место
* [padding] - отступ од других элементов
*/
int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...){ int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...){
va_list args; va_list args;
va_start(args,padding); va_start(args,padding);
@ -2168,15 +1675,6 @@ int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean
return 1; return 1;
} }
/**yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...)
* [EN]
*
* [RU]
* Добвляет в [destination] все виджеты, прописанные после [padding]. Добавление происходит с конца контейнера.
* [expand] - расширяемость выделенного для виджетов места
* [fill] - заполнять ли виджетом всё ему выделенное место
* [padding] - отступ од других элементов
*/
int yon_dictionary_gtk_pack_end_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, ...){
va_list args; va_list args;
va_start(args,padding); va_start(args,padding);
@ -2366,24 +1864,6 @@ void yon_ubl_status_box_spawn(GtkContainer *container,char *display_text, int ti
} }
} }
/**yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id)
* [EN]
* Set up plugs for using with GtkSockets insine ubl-settings-manager.
* [main_window] is container widget, which holds main application functionality.
* [left_window] is container widget, which holds widgets, have to be shown at left part of ubl-settings-manager header.
* [right_window] is container widget, which holds widgets, have to be shown at right part of ubl-settings-manager header.
* [socket_main_id] is id of socket for [main_window].
* [socket_left_id] is id of socket for [left_window].
* [socket_right_id] is id of socket for [right_window].
* [RU]
* Настраивает плаги для работы с сокетами в утилите ubl-settings-manager.
* [main_window] - контейнер основного интерфейса приложения.
* [left_window] - контейнер для виджетов которые должны отображаться в левой части шапки ubl-settings-manager.
* [right_window] - контейнер для виджетов которые должны отображаться в правой части шапки ubl-settings-manager.
* [socket_main_id] - id сокета для [main_window].
* [socket_left_id] - id сокета для [left_window].
* [socket_right_id] - id сокета для [right_window].
*/
void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id){ void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id){
if (main_window&&socket_main_id>-1){ if (main_window&&socket_main_id>-1){
gtk_widget_hide(gtk_widget_get_toplevel(main_window)); gtk_widget_hide(gtk_widget_get_toplevel(main_window));
@ -2447,12 +1927,6 @@ void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWi
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
/**yon_ubl_browser_window_open(char *link, char *browser_window_name)
* [EN]
* Launches integrated browser window, named [browser_window_name] at header with [link].
* [RU]
* Открывает встроенный браузер с именем [browser_window_name] и показываемой страницей по ссылке [link]
*/
void yon_ubl_browser_window_open(char *link, char *browser_window_name){ void yon_ubl_browser_window_open(char *link, char *browser_window_name){
GtkWidget *browser=gtk_window_new(GTK_WINDOW_TOPLEVEL); GtkWidget *browser=gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget *web_place=gtk_box_new(GTK_ORIENTATION_VERTICAL,0); GtkWidget *web_place=gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
@ -2471,14 +1945,6 @@ void yon_ubl_browser_window_open(char *link, char *browser_window_name){
} }
#else #else
/**yon_ubl_browser_window_open(char *link, char *browser_window_name)
* [EN]
* Launches browser with [link].
* [browser_window_name] is't used. It's needed for compatibility with webkit version of that function.
* [RU]
* Открывает браузер со страницей по ссылке [link]
* [browser_window_name] не используется. Нужна для совместимости с webkit версией этой функции.
*/
void yon_ubl_browser_window_open(char *link, char *browser_window_name){ void yon_ubl_browser_window_open(char *link, char *browser_window_name){
char *user=getenv("SUDO_USER"); char *user=getenv("SUDO_USER");
if (!user) if (!user)

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save