|
|
|
|
@ -155,8 +155,7 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
|
|
|
|
|
printf("Saving config...\n");
|
|
|
|
|
|
|
|
|
|
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
|
gtk_window_get_size(GTK_WINDOW(widgets->window),&main_config.windowWidth,&main_config.windowHeight);
|
|
|
|
|
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
|
|
|
|
|
|
|
|
|
|
int theme=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
|
|
|
|
|
|
|
|
|
|
if (theme==0)
|
|
|
|
|
@ -564,21 +563,69 @@ void on_section_delete(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
}
|
|
|
|
|
void on_resized (GtkWidget *window, GdkEventConfigure *event, dictionary *widgetsD){
|
|
|
|
|
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
|
int x,y;
|
|
|
|
|
gtk_window_get_size(GTK_WINDOW(widgets->window),&x,&y);
|
|
|
|
|
printf("worked\n%d - %d\n",x,y);
|
|
|
|
|
if (main_config.WindowTheme!=0)
|
|
|
|
|
if (x<1024&&y<720){
|
|
|
|
|
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
|
//main_config.WindowTheme=0;
|
|
|
|
|
main_config.iconsize=24;
|
|
|
|
|
gtk_combo_box_set_active (GTK_COMBO_BOX(widgets->settingsThemeChooser),0);
|
|
|
|
|
if (widgetsD->next==NULL)
|
|
|
|
|
widgetsD=widgetsD->prev;
|
|
|
|
|
else
|
|
|
|
|
widgetsD=widgetsD->next;
|
|
|
|
|
on_settings_accept(window,&widgetsD);
|
|
|
|
|
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
|
|
|
|
|
gtk_window_get_size(GTK_WINDOW(widgets->window),&main_config.windowWidth,&main_config.windowHeight);
|
|
|
|
|
dictionary *dct;
|
|
|
|
|
if (yon_dictionary_find(&widgetsD,"Main")==NULL){
|
|
|
|
|
dct=yon_dictionary_create_empty();
|
|
|
|
|
dictionary *newd=yon_theme_new(&dct,widgets->builder,"Main", widgets->applist,widgets->appssize);
|
|
|
|
|
widgetsD->next=newd;
|
|
|
|
|
newd->prev=widgetsD;
|
|
|
|
|
newd->first=widgetsD;
|
|
|
|
|
actionWidgets *widgetss=(actionWidgets*)widgetsD->data;
|
|
|
|
|
widgetss->ICSys=yon_create_icon_section_list(main_config.sections);
|
|
|
|
|
for (dictionary *cur=widgetss->ICSys->first; cur!=NULL;cur=cur->next){
|
|
|
|
|
load_apps((IVGraphicals*)cur->data,widgetss->applist,widgetss->appssize);
|
|
|
|
|
}
|
|
|
|
|
yon_show_icon_views(widgetss->ICSys,widgetss);
|
|
|
|
|
}
|
|
|
|
|
dictionary *newdd;
|
|
|
|
|
if (yon_dictionary_find(&widgetsD,"Gnome")==NULL){
|
|
|
|
|
newdd=yon_theme_new(&dct,widgets->builder,"Gnome", widgets->applist,widgets->appssize);
|
|
|
|
|
widgetsD->next=newdd;
|
|
|
|
|
newdd->prev=widgetsD;
|
|
|
|
|
newdd->first=widgetsD;
|
|
|
|
|
actionWidgets *widgetss=(actionWidgets*)widgetsD->data;
|
|
|
|
|
widgetss->ICSys=yon_create_icon_section_list(main_config.sections);
|
|
|
|
|
for (dictionary *cur=widgetss->ICSys->first; cur!=NULL;cur=cur->next){
|
|
|
|
|
load_apps((IVGraphicals*)cur->data,widgetss->applist,widgetss->appssize);
|
|
|
|
|
}
|
|
|
|
|
yon_show_icon_views(widgetss->ICSys,widgetss);
|
|
|
|
|
}
|
|
|
|
|
if (main_config.WindowTheme==1){
|
|
|
|
|
printf("\nAaAaAaAa\n");
|
|
|
|
|
actionWidgets *widgetss=(actionWidgets*)widgetsD->data;
|
|
|
|
|
GtkWidget *loaderWindow=GTK_WIDGET(gtk_builder_get_object(widgets->builder,"LoaderWindow"));
|
|
|
|
|
// gtk_window_resize(GTK_WINDOW(widgetss->window),main_config.windowWidth,main_config.windowHeight);
|
|
|
|
|
widgetsD=yon_dictionary_find(&widgetsD,"Gnome");
|
|
|
|
|
if (gtk_widget_get_visible(widgetss->window)==1){
|
|
|
|
|
widgetsD=yon_dictionary_find(&widgetsD,"Gnome");
|
|
|
|
|
gtk_window_resize(GTK_WINDOW(widgetss->window),1025,721);
|
|
|
|
|
if (main_config.windowWidth<1024&&main_config.windowHeight<720){
|
|
|
|
|
gtk_widget_hide(widgetss->window);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgetss->settingsThemeChooser),0);
|
|
|
|
|
widgetsD=yon_dictionary_find(&widgetsD,"Main");
|
|
|
|
|
actionWidgets *widgetss=(actionWidgets*)widgetsD->data;
|
|
|
|
|
// gtk_window_resize(GTK_WINDOW(widgetss->window),1023,719);
|
|
|
|
|
gtk_widget_show(widgetss->window);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
widgetsD=yon_dictionary_find(&widgetsD,"Main");
|
|
|
|
|
gtk_window_resize(GTK_WINDOW(widgetss->window),1024,720);
|
|
|
|
|
if (main_config.windowWidth>1024&&main_config.windowHeight>720){
|
|
|
|
|
gtk_widget_hide(widgetss->window);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgetss->settingsThemeChooser),1);
|
|
|
|
|
widgetsD=yon_dictionary_find(&widgetsD,"Gnome");
|
|
|
|
|
actionWidgets *widgetss=(actionWidgets*)widgetsD->data;
|
|
|
|
|
// gtk_window_resize(GTK_WINDOW(widgetss->window),1025,721);
|
|
|
|
|
gtk_widget_show(widgetss->window);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
gtk_window_get_size(GTK_WINDOW(widgets->window),&main_config.windowWidth,&main_config.windowHeight);
|
|
|
|
|
}
|
|
|
|
|
void launch_app_with_arguments(char *name, char *args){
|
|
|
|
|
char *path=malloc(strlen(name)+strlen(args)+4);
|
|
|
|
|
@ -1297,6 +1344,9 @@ void yon_dictionary_make_first(dictionary *dict){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_small_window_theme_change(actionWidgets *widgets){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *theme_id, apps *applist, int appsize){
|
|
|
|
|
|
|
|
|
|
@ -1354,7 +1404,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
line=yon_char_get_augumented(pth,line);
|
|
|
|
|
} else {
|
|
|
|
|
line=path;
|
|
|
|
|
pth="<span size=\"15pt\">\n";
|
|
|
|
|
pth="<span size=\"14pt\">\n";
|
|
|
|
|
line=yon_char_get_augumented(pth,line);
|
|
|
|
|
}
|
|
|
|
|
prevline=yon_char_get_augumented(prevline,line);
|
|
|
|
|
|