|
|
|
@ -122,7 +122,6 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
on_about_system(NULL,applist);
|
|
|
|
|
|
|
|
launch_app(tempapp[0].Exec);
|
|
|
|
launch_app(tempapp[0].Exec);
|
|
|
|
gtk_widget_destroy(applist->socketbutton);
|
|
|
|
gtk_widget_destroy(applist->socketbutton);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -178,7 +177,6 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
|
|
|
|
else if (main_config.WindowTheme==1)
|
|
|
|
else if (main_config.WindowTheme==1)
|
|
|
|
main_config.curThemeName="Gnome";
|
|
|
|
main_config.curThemeName="Gnome";
|
|
|
|
dictionary *widgetsD=yon_dictionary_find(widgetsDs,main_config.curThemeName);
|
|
|
|
dictionary *widgetsD=yon_dictionary_find(widgetsDs,main_config.curThemeName);
|
|
|
|
// printf("Saving config...\n");
|
|
|
|
|
|
|
|
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
int theme=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
|
|
|
|
int theme=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
|
|
|
|
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
|
|
|
|
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
|
|
|
|
@ -275,8 +273,7 @@ void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *wi
|
|
|
|
int position=gtk_paned_get_position(GTK_PANED(widgets->GnomePaned));
|
|
|
|
int position=gtk_paned_get_position(GTK_PANED(widgets->GnomePaned));
|
|
|
|
if (position<200) {position=200; gtk_paned_set_position(GTK_PANED(widgets->GnomePaned),200);}
|
|
|
|
if (position<200) {position=200; gtk_paned_set_position(GTK_PANED(widgets->GnomePaned),200);}
|
|
|
|
main_config.iconSegmentSize=position;
|
|
|
|
main_config.iconSegmentSize=position;
|
|
|
|
if (position <70) {position=70;}
|
|
|
|
double pos=((double)position-20);
|
|
|
|
double pos=((double)position);
|
|
|
|
|
|
|
|
if (pos<70) pos=70;
|
|
|
|
if (pos<70) pos=70;
|
|
|
|
for (dictionary *dict=widgets->ICSys;dict!=NULL;dict=dict->next){
|
|
|
|
for (dictionary *dict=widgets->ICSys;dict!=NULL;dict=dict->next){
|
|
|
|
IVGraphicals *IV=(IVGraphicals*)dict->data;
|
|
|
|
IVGraphicals *IV=(IVGraphicals*)dict->data;
|
|
|
|
@ -368,7 +365,7 @@ void on_section_settings_open(GtkButton* self,dictionary *cWidgets){
|
|
|
|
dict=dict->prev;
|
|
|
|
dict=dict->prev;
|
|
|
|
dict->next=NULL;
|
|
|
|
dict->next=NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gtk_widget_show(widgets->SectionSettingsWindow);
|
|
|
|
gtk_window_present(GTK_WINDOW(widgets->SectionSettingsWindow));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_sections_edit(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
void on_sections_edit(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
@ -644,11 +641,6 @@ void on_resized (GtkWidget *window, GdkEventConfigure *event, dictionary *widget
|
|
|
|
gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight);
|
|
|
|
gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight);
|
|
|
|
yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,"Main"));
|
|
|
|
yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,"Main"));
|
|
|
|
*main_config.currentThemeIconSize=24;
|
|
|
|
*main_config.currentThemeIconSize=24;
|
|
|
|
|
|
|
|
|
|
|
|
// for (dictionary *dict=widgets->ICSys->first;dict!=NULL;dict=dict->next){
|
|
|
|
|
|
|
|
// IVGraphicals *IV=(IVGraphicals*)dict->data;
|
|
|
|
|
|
|
|
// load_apps_with_clear(IV,widgets->applist,widgets->appssize);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
gtk_window_resize(GTK_WINDOW(widgets->window),main_config.windowWidth,main_config.windowHeight);
|
|
|
|
gtk_window_resize(GTK_WINDOW(widgets->window),main_config.windowWidth,main_config.windowHeight);
|
|
|
|
gtk_widget_hide(widgets->window);
|
|
|
|
gtk_widget_hide(widgets->window);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -672,23 +664,11 @@ void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_about_system(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
|
|
|
char arg[100];
|
|
|
|
|
|
|
|
memset(arg,0,100);
|
|
|
|
|
|
|
|
gtk_widget_show(widgets->socketbuttonplace);
|
|
|
|
|
|
|
|
if (button){
|
|
|
|
|
|
|
|
gtk_widget_hide(widgets->appSettings);
|
|
|
|
|
|
|
|
sprintf(arg,"--socket-id=%d --socket-ext-id=%d",gtk_socket_get_id(GTK_SOCKET(widgets->socket)),gtk_socket_get_id(GTK_SOCKET(widgets->socketbutton)));
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(widgets->socket)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
launch_app_with_arguments("ubl-settings-info",arg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
|
|
|
|
void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
|
|
|
|
int *icsize;
|
|
|
|
int *icsize;
|
|
|
|
int curthm=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
|
|
|
|
int curthm=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
|
|
|
|
// main_config.changed=1;
|
|
|
|
|
|
|
|
if (curthm==0){
|
|
|
|
if (curthm==0){
|
|
|
|
main_config.currentThemeIconSize=&main_config.Mainiconsize;
|
|
|
|
main_config.currentThemeIconSize=&main_config.Mainiconsize;
|
|
|
|
main_config.currentThemeLabelSize=&main_config.MainlabelSize;
|
|
|
|
main_config.currentThemeLabelSize=&main_config.MainlabelSize;
|
|
|
|
@ -723,7 +703,17 @@ void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_about(GtkWidget *button){
|
|
|
|
|
|
|
|
GtkBuilder *builder = gtk_builder_new_from_file(GladePath);
|
|
|
|
|
|
|
|
GtkWidget *AboutButtons = GTK_WIDGET(gtk_builder_get_object(builder,"AboutButtons"));
|
|
|
|
|
|
|
|
GtkWidget *About = GTK_WIDGET(gtk_builder_get_object(builder, "ublAbloutWindow"));
|
|
|
|
|
|
|
|
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(About),_("Settings manager for UBLinux"));
|
|
|
|
|
|
|
|
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(About),_("UBLinux Settings Manager"));
|
|
|
|
|
|
|
|
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(About),version_application);
|
|
|
|
|
|
|
|
gtk_widget_show(About);
|
|
|
|
|
|
|
|
gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(About),_("Project Home Page"));
|
|
|
|
|
|
|
|
gtk_widget_set_visible(AboutButtons,0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int launch(thread_output *thread){
|
|
|
|
int launch(thread_output *thread){
|
|
|
|
int a=0;
|
|
|
|
int a=0;
|
|
|
|
@ -784,12 +774,12 @@ int load_apps(IVGraphicals *section, apps *applist, int size){
|
|
|
|
GError *err=NULL;
|
|
|
|
GError *err=NULL;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
gtk_list_store_append(section->LV,&iter);
|
|
|
|
gtk_list_store_append(section->LV,&iter);
|
|
|
|
int sz= *main_config.currentThemeIconSize+10;
|
|
|
|
int sz= yon_get_icon_size(*main_config.currentThemeIconSize)+3;
|
|
|
|
if (sz<50) sz=50;
|
|
|
|
if (sz<34) sz=34;
|
|
|
|
GtkIconTheme *icthm=gtk_icon_theme_get_default();
|
|
|
|
GtkIconTheme *icthm=gtk_icon_theme_get_default();
|
|
|
|
GdkPixbuf *pixbuf=gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, applist[i].Icon,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL);
|
|
|
|
GdkPixbuf *pixbuf=gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, applist[i].Icon,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SIZE),NULL);
|
|
|
|
GtkTreePath *pth = gtk_tree_model_get_path(GTK_TREE_MODEL(section->LV),&iter);
|
|
|
|
GtkTreePath *pth = gtk_tree_model_get_path(GTK_TREE_MODEL(section->LV),&iter);
|
|
|
|
gtk_list_store_set(section->LV,&iter,0,applist[i].Name,1,0.0,2,0.5, 3, sz+8, 4, pixbuf, 5,yon_get_icon_size(*main_config.currentThemeIconSize), -1);
|
|
|
|
gtk_list_store_set(section->LV,&iter,0,applist[i].Name,1,0.0,2,0.5, 3, sz+5, 4, pixbuf, 5,yon_get_icon_size(*main_config.currentThemeIconSize)+10, -1);
|
|
|
|
int cols = gtk_icon_view_get_columns(GTK_ICON_VIEW(section->IV));
|
|
|
|
int cols = gtk_icon_view_get_columns(GTK_ICON_VIEW(section->IV));
|
|
|
|
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), -1);
|
|
|
|
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), -1);
|
|
|
|
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), cols);
|
|
|
|
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), cols);
|
|
|
|
@ -937,7 +927,8 @@ int check_categories(apps app, char *catstocheck){
|
|
|
|
if (!found) return 0;
|
|
|
|
if (!found) return 0;
|
|
|
|
n_found++;
|
|
|
|
n_found++;
|
|
|
|
while (cat){
|
|
|
|
while (cat){
|
|
|
|
char *fcat=strstr(app.Categories,";");
|
|
|
|
left_cats=cat+1;
|
|
|
|
|
|
|
|
char *fcat=app.Categories;//strstr(app.Categories,";");
|
|
|
|
cat=strstr(cat+1,";");
|
|
|
|
cat=strstr(cat+1,";");
|
|
|
|
if (!cat) break;
|
|
|
|
if (!cat) break;
|
|
|
|
find_it=yon_cut(left_cats,(strlen(left_cats)-strlen(cat)),0);
|
|
|
|
find_it=yon_cut(left_cats,(strlen(left_cats)-strlen(cat)),0);
|
|
|
|
@ -946,7 +937,7 @@ int check_categories(apps app, char *catstocheck){
|
|
|
|
if (!found) break;
|
|
|
|
if (!found) break;
|
|
|
|
n_found++;
|
|
|
|
n_found++;
|
|
|
|
left_cats=cat+1;
|
|
|
|
left_cats=cat+1;
|
|
|
|
if (strlen(left_cats)==0 ||strcmp(left_cats,'\0')==0) break;
|
|
|
|
if (strlen(left_cats)==0 ||strcmp(left_cats,"")==0) break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (to_find==n_found) return 1; else return 0;
|
|
|
|
if (to_find==n_found) return 1; else return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -987,6 +978,7 @@ int setup_config(){
|
|
|
|
main_config.GnomelabelSize=g_key_file_get_integer(configfile,"window","GnomeLabelSize",NULL);
|
|
|
|
main_config.GnomelabelSize=g_key_file_get_integer(configfile,"window","GnomeLabelSize",NULL);
|
|
|
|
main_config.labelDensity=g_key_file_get_integer(configfile,"window","LabelDensity",NULL);
|
|
|
|
main_config.labelDensity=g_key_file_get_integer(configfile,"window","LabelDensity",NULL);
|
|
|
|
main_config.lastUser=g_key_file_get_string(configfile,"window","User",NULL);
|
|
|
|
main_config.lastUser=g_key_file_get_string(configfile,"window","User",NULL);
|
|
|
|
|
|
|
|
main_config.fullscreen=g_key_file_get_boolean(configfile,"window","fullscreen",NULL);
|
|
|
|
if (main_config.MainlabelSize==0) main_config.MainlabelSize=12;
|
|
|
|
if (main_config.MainlabelSize==0) main_config.MainlabelSize=12;
|
|
|
|
if (main_config.labelDensity==0) main_config.labelDensity=0;
|
|
|
|
if (main_config.labelDensity==0) main_config.labelDensity=0;
|
|
|
|
main_config.MainlabelSize=main_config.MainlabelSize*1000;
|
|
|
|
main_config.MainlabelSize=main_config.MainlabelSize*1000;
|
|
|
|
@ -1065,6 +1057,7 @@ void save_config(actionWidgets *widgets){
|
|
|
|
sprintf(fromint,"%d",main_config.windowHeight);
|
|
|
|
sprintf(fromint,"%d",main_config.windowHeight);
|
|
|
|
g_key_file_set_string(gfile,"window","WindowHeight",fromint);
|
|
|
|
g_key_file_set_string(gfile,"window","WindowHeight",fromint);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_key_file_set_boolean(gfile,"window","fullscreen",main_config.fullscreen);
|
|
|
|
sprintf(fromint,"%d",main_config.WindowTheme);
|
|
|
|
sprintf(fromint,"%d",main_config.WindowTheme);
|
|
|
|
g_key_file_set_string(gfile,"window","WindowTheme",fromint);
|
|
|
|
g_key_file_set_string(gfile,"window","WindowTheme",fromint);
|
|
|
|
sprintf(fromint,"%d",sz);
|
|
|
|
sprintf(fromint,"%d",sz);
|
|
|
|
@ -1144,10 +1137,6 @@ void yon_set_default_sections(dictionary **section){
|
|
|
|
*section=(*section)->first;
|
|
|
|
*section=(*section)->first;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void yon_check_for_space_near_eol(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
|
|
|
|
IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
|
|
|
|
IVGraphicals *IVG = malloc(sizeof(IVGraphicals));
|
|
|
|
IVGraphicals *IVG = malloc(sizeof(IVGraphicals));
|
|
|
|
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
|
|
|
|
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
|
|
|
|
@ -1168,8 +1157,6 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
|
|
|
|
gtk_widget_set_margin_end(label,6);
|
|
|
|
gtk_widget_set_margin_end(label,6);
|
|
|
|
gtk_widget_set_margin_start(label,6);
|
|
|
|
gtk_widget_set_margin_start(label,6);
|
|
|
|
gtk_widget_set_margin_bottom(label,2);
|
|
|
|
gtk_widget_set_margin_bottom(label,2);
|
|
|
|
// gtk_widget_set_name(label,"workingbg");
|
|
|
|
|
|
|
|
// gtk_widget_set_name(box,"workingbg");
|
|
|
|
|
|
|
|
gtk_icon_view_set_spacing(GTK_ICON_VIEW(iv),20);
|
|
|
|
gtk_icon_view_set_spacing(GTK_ICON_VIEW(iv),20);
|
|
|
|
if (main_config.WindowTheme==1) {
|
|
|
|
if (main_config.WindowTheme==1) {
|
|
|
|
gtk_icon_view_set_columns(GTK_ICON_VIEW(iv),1);
|
|
|
|
gtk_icon_view_set_columns(GTK_ICON_VIEW(iv),1);
|
|
|
|
@ -1178,10 +1165,9 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
|
|
|
|
gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
|
|
|
|
gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
gtk_icon_view_set_item_padding(GTK_ICON_VIEW(iv),3);
|
|
|
|
gtk_icon_view_set_item_padding(GTK_ICON_VIEW(iv),3);
|
|
|
|
//gtk_widget_set_name(iv,"workingbg");
|
|
|
|
|
|
|
|
gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
|
|
|
|
gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
|
|
|
|
|
|
|
|
gtk_icon_view_set_row_spacing(GTK_ICON_VIEW(iv),2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gtk_icon_view_set_text_column(GTK_ICON_VIEW(iv),0);
|
|
|
|
|
|
|
|
GtkWidget *sep=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
|
|
|
|
GtkWidget *sep=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
|
|
|
|
GtkListStore *lv=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststoreTemplate"));
|
|
|
|
GtkListStore *lv=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststoreTemplate"));
|
|
|
|
gtk_widget_set_name(sep,"SepIcon");
|
|
|
|
gtk_widget_set_name(sep,"SepIcon");
|
|
|
|
@ -1267,7 +1253,7 @@ void yon_icv_resize_item(dictionary *icdict, GtkWidget *paned){
|
|
|
|
for (dictionary *dict=icdict->first;dict!=NULL;dict=dict->next){
|
|
|
|
for (dictionary *dict=icdict->first;dict!=NULL;dict=dict->next){
|
|
|
|
IVGraphicals *icv=(IVGraphicals*)dict->data;
|
|
|
|
IVGraphicals *icv=(IVGraphicals*)dict->data;
|
|
|
|
int width=gtk_paned_get_position(GTK_PANED(paned));
|
|
|
|
int width=gtk_paned_get_position(GTK_PANED(paned));
|
|
|
|
int pos=(int)((double)width);
|
|
|
|
int pos=(int)((double)width-20);
|
|
|
|
if (pos < 100) pos=100;
|
|
|
|
if (pos < 100) pos=100;
|
|
|
|
|
|
|
|
|
|
|
|
gtk_icon_view_set_item_width(GTK_ICON_VIEW(icv->IV),pos);
|
|
|
|
gtk_icon_view_set_item_width(GTK_ICON_VIEW(icv->IV),pos);
|
|
|
|
@ -1372,7 +1358,7 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){
|
|
|
|
int yon_get_icon_size(int size){
|
|
|
|
int yon_get_icon_size(int size){
|
|
|
|
if (size==1||size==24) return 24;
|
|
|
|
if (size==1||size==24) return 24;
|
|
|
|
if (size==2||size==32) return 32;
|
|
|
|
if (size==2||size==32) return 32;
|
|
|
|
if (size==3||size==48) return 51;
|
|
|
|
if (size==3||size==48) return 48;
|
|
|
|
if (size==4||size==64) return 64;
|
|
|
|
if (size==4||size==64) return 64;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -1603,7 +1589,6 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
|
|
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview");
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview");
|
|
|
|
curWidgets->socket=GTK_WIDGET(create_socket(curWidgets));
|
|
|
|
curWidgets->socket=GTK_WIDGET(create_socket(curWidgets));
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->MenuItemAboutSystem), "activate", G_CALLBACK(on_about_system),curWidgets);
|
|
|
|
|
|
|
|
if (curWidgets->ButtonBackToMain!=NULL)
|
|
|
|
if (curWidgets->ButtonBackToMain!=NULL)
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to all settings"));
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to all settings"));
|
|
|
|
gtk_window_set_title(GTK_WINDOW(curWidgets->window),_("UBLinux Settings Manager"));
|
|
|
|
gtk_window_set_title(GTK_WINDOW(curWidgets->window),_("UBLinux Settings Manager"));
|
|
|
|
@ -1614,7 +1599,6 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets);
|
|
|
|
if (strcmp(theme_id,"Gnome")==0){
|
|
|
|
if (strcmp(theme_id,"Gnome")==0){
|
|
|
|
on_about_system(NULL,curWidgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), widgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), widgets);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1642,6 +1626,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
curWidgets->settingsCancel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsCancel"));
|
|
|
|
curWidgets->settingsCancel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsCancel"));
|
|
|
|
curWidgets->settingsSubmenuLabelSize=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelSize"));
|
|
|
|
curWidgets->settingsSubmenuLabelSize=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelSize"));
|
|
|
|
curWidgets->settingsSubmenuLabelTheme=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelTheme"));
|
|
|
|
curWidgets->settingsSubmenuLabelTheme=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelTheme"));
|
|
|
|
|
|
|
|
curWidgets->settingsSectionsSettingsButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSectionsSettingsButton"));
|
|
|
|
curWidgets->SectionSettingAddButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddButton"));
|
|
|
|
curWidgets->SectionSettingAddButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddButton"));
|
|
|
|
curWidgets->SectionSettingAddNameEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddNameEntry"));
|
|
|
|
curWidgets->SectionSettingAddNameEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddNameEntry"));
|
|
|
|
curWidgets->SectionSettingAddCategoriesEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddCategoriesEntry"));
|
|
|
|
curWidgets->SectionSettingAddCategoriesEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddCategoriesEntry"));
|
|
|
|
@ -1651,6 +1636,8 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
curWidgets->CautionWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionWindow"));
|
|
|
|
curWidgets->CautionWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionWindow"));
|
|
|
|
curWidgets->CautionUnderstandButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionUnderstandButton"));
|
|
|
|
curWidgets->CautionUnderstandButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionUnderstandButton"));
|
|
|
|
curWidgets->infoWarningWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"windowSettings-infoWarning"));
|
|
|
|
curWidgets->infoWarningWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"windowSettings-infoWarning"));
|
|
|
|
|
|
|
|
curWidgets->infoWarningButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"buttonSettings-infoWarning"));
|
|
|
|
|
|
|
|
curWidgets->infoWarningLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"labelSettings-infoWarning"));
|
|
|
|
curWidgets->applist=applist;
|
|
|
|
curWidgets->applist=applist;
|
|
|
|
curWidgets->appssize=appsize;
|
|
|
|
curWidgets->appssize=appsize;
|
|
|
|
GtkIconTheme *icthm=gtk_icon_theme_get_default();
|
|
|
|
GtkIconTheme *icthm=gtk_icon_theme_get_default();
|
|
|
|
@ -1658,7 +1645,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
gtk_window_resize(GTK_WINDOW(curWidgets->window),main_config.windowWidth,main_config.windowHeight);
|
|
|
|
gtk_window_resize(GTK_WINDOW(curWidgets->window),main_config.windowWidth,main_config.windowHeight);
|
|
|
|
gtk_window_set_icon(GTK_WINDOW(curWidgets->window),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
|
|
|
|
gtk_window_set_icon(GTK_WINDOW(curWidgets->window),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
|
|
|
|
gtk_window_set_icon(GTK_WINDOW(curWidgets->SectionSettingsWindow),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
|
|
|
|
gtk_window_set_icon(GTK_WINDOW(curWidgets->SectionSettingsWindow),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->MenuItemDocumentation), "activate", G_CALLBACK(on_ButtonOpenHelp_activated), curWidgets->builder);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->MenuItemDocumentation), "activate", G_CALLBACK(on_about), curWidgets->builder); //on_ButtonOpenHelp_activated
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->MenuItemSettings), "activate", G_CALLBACK(on_settingsOpen), curWidgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->MenuItemSettings), "activate", G_CALLBACK(on_settingsOpen), curWidgets);
|
|
|
|
|
|
|
|
|
|
|
|
if (gnld==0){
|
|
|
|
if (gnld==0){
|
|
|
|
@ -1674,6 +1661,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsCloseButton), "clicked", G_CALLBACK(on_sections_close), curWidgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsCloseButton), "clicked", G_CALLBACK(on_sections_close), curWidgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsSaveButton), "clicked", G_CALLBACK(on_sections_save), curWidgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsSaveButton), "clicked", G_CALLBACK(on_sections_save), curWidgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->CautionUnderstandButton), "clicked", G_CALLBACK(on_caution_understand), curWidgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->CautionUnderstandButton), "clicked", G_CALLBACK(on_caution_understand), curWidgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->settingsSectionsSettingsButton), "clicked", G_CALLBACK(on_section_settings_open), widgets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "destroy", G_CALLBACK(yon_main_quit), curWidgets);
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "destroy", G_CALLBACK(yon_main_quit), curWidgets);
|
|
|
|
gtk_label_set_text(GTK_LABEL(curWidgets->LabelTitle),_("UBLinux Settings Manager"));
|
|
|
|
gtk_label_set_text(GTK_LABEL(curWidgets->LabelTitle),_("UBLinux Settings Manager"));
|
|
|
|
@ -1688,8 +1676,8 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->AlwaysOpenDocumentation),_("Always redirect"));
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->AlwaysOpenDocumentation),_("Always redirect"));
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemSettings),_("Settings"));
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemSettings),_("Settings"));
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),_("About..."));
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),_("About..."));
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemAboutSystem),_("About system"));
|
|
|
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->CautionUnderstandButton),_("Understood"));
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->CautionUnderstandButton),_("Understood"));
|
|
|
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->settingsSectionsSettingsButton),_("Sections management"));
|
|
|
|
return widgets;
|
|
|
|
return widgets;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -1701,7 +1689,8 @@ int main(int argc, char *argv[]){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local=setlocale(LC_ALL, "");
|
|
|
|
local=setlocale(LC_ALL, "");
|
|
|
|
textdomain (LocaleName);
|
|
|
|
textdomain (LocaleName);
|
|
|
|
actionWidgets *widget=malloc(sizeof(actionWidgets));
|
|
|
|
actionWidgets *widget=NULL;
|
|
|
|
|
|
|
|
widget=malloc(sizeof(actionWidgets));
|
|
|
|
dictionary *widgets=yon_dictionary_create_empty();
|
|
|
|
dictionary *widgets=yon_dictionary_create_empty();
|
|
|
|
widgets->data=widget;
|
|
|
|
widgets->data=widget;
|
|
|
|
int *size=malloc(sizeof(int));
|
|
|
|
int *size=malloc(sizeof(int));
|
|
|
|
@ -1776,7 +1765,8 @@ int main(int argc, char *argv[]){
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("Standard theme"));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("Standard theme"));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("GNOME theme"));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("GNOME theme"));
|
|
|
|
widg=(actionWidgets*)widgets->data;
|
|
|
|
widg=(actionWidgets*)widgets->data;
|
|
|
|
gtk_window_maximize(GTK_WINDOW(widg->window));
|
|
|
|
if (main_config.fullscreen==1)
|
|
|
|
|
|
|
|
gtk_window_maximize(GTK_WINDOW(widg->window));
|
|
|
|
gtk_widget_show(widg->window);
|
|
|
|
gtk_widget_show(widg->window);
|
|
|
|
hide_if_unfound(widgets);
|
|
|
|
hide_if_unfound(widgets);
|
|
|
|
if (main_config.WindowTheme==1)
|
|
|
|
if (main_config.WindowTheme==1)
|
|
|
|
|