diff --git a/ubl-settings-manager.c b/ubl-settings-manager.c
index 7add2dc..9431df3 100644
--- a/ubl-settings-manager.c
+++ b/ubl-settings-manager.c
@@ -556,7 +556,45 @@ 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 (widgets->settingsThemeChooser,0);
+ on_settings_accept(window,widgetsD);
+ // main_config.curThemeName="Main";
+ // GtkWidget *loaderWindow=GTK_WIDGET(gtk_builder_get_object(widgets->builder,"LoaderWindow"));
+ // gtk_window_resize(GTK_WINDOW(loaderWindow),main_config.windowWidth,main_config.windowHeight);
+ // gtk_window_move(GTK_WINDOW(loaderWindow),main_config.windowPosX,main_config.windowPosY);
+
+ // gtk_widget_show(loaderWindow);
+ // gtk_window_present(GTK_WINDOW(widgets->SettingsWindow));
+ // gtk_widget_hide(widgets->window);
+ // if (yon_dictionary_find(&widgetsD,main_config.curThemeName)==NULL){
+ // widgetsD->next=yon_theme_new(yon_dictionary_create_empty(),widgets->builder,main_config.curThemeName,widgets->applist,widgets->appssize);
+ // widgetsD->next->prev=widgetsD;
+ // yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,main_config.curThemeName));
+ // widgets=(actionWidgets*)widgetsD->data;
+ // widgets->ICSys=yon_create_icon_section_list(main_config.sections);
+ // for (dictionary *cur=widgets->ICSys->first; cur!=NULL;cur=cur->next){
+ // load_apps((IVGraphicals*)cur->data,widgets->applist,widgets->appssize);
+ // }
+ // yon_show_icon_views(widgets->ICSys,widgets);
+
+ // }
+ // yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,main_config.curThemeName));
+ // if (widgets!=(actionWidgets*)widgetsD->data) widgets=(actionWidgets*)widgetsD->data;
+ // gtk_widget_show(widgets->window);
+ // gtk_widget_hide(loaderWindow);
+
+ }
+}
void launch_app_with_arguments(char *name, char *args){
char *path=malloc(strlen(name)+strlen(args)+4);
memset(path,0,strlen(name)+strlen(args)+4);
@@ -920,6 +958,9 @@ int setup_config(){
main_config.sections->next=NULL;
}
+ if (main_config.windowWidth<1024&&main_config.windowHeight<720){
+ main_config.WindowTheme=0;
+ }
};
@@ -1293,7 +1334,6 @@ dictionary *yon_theme_new(dictionary *widgets, GtkBuilder *builder, char *theme_
curWidgets->GnomeInfoLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"InfoLabel")));
curWidgets->GnomeInfoDetailsLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"InfoDetailsLabel")));
curWidgets->SettingsSections=NULL;
-
gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview");
if (curWidgets->GnomeInfoLabel!=NULL&&curWidgets->GnomeInfoDetailsLabel!=NULL){
@@ -1312,36 +1352,39 @@ dictionary *yon_theme_new(dictionary *widgets, GtkBuilder *builder, char *theme_
}
char *line=NULL;
line="";
- char *prevline=NULL;
+ char *prevline="";
char *pth;
char *preph="";
line="";
while (fgets(path, sizeof(path),fp)!=NULL){
- preph=pth;
- prevline=line;
+
line=strstr(path,": ");
if (line!=NULL){
int size=strlen(path)-strlen(line);
pth=yon_cut(path,size,0);
- // pth=_(pth);;;;
- pth=yon_char_get_augumented(preph,pth);
- pth=yon_char_get_augumented(pth,"\n");
+ pth=yon_char_get_augumented("",pth);
+ pth=yon_char_get_augumented(pth,"");
+ line=yon_char_get_augumented(pth,line);
} else {
line=path;
- pth="\n";
+ pth="\n";
+ line=yon_char_get_augumented(pth,line);
}
- line=yon_char_get_augumented(prevline,line);
+ prevline=yon_char_get_augumented(prevline,line);
+
};
- prevline=line;
+ prevline=yon_char_get_augumented(prevline,"");;
gtk_label_set_text(GTK_LABEL(curWidgets->GnomeInfoDetailsLabel),prevline);
- gtk_label_set_text(GTK_LABEL(curWidgets->GnomeInfoLabel),pth);
-
+ // gtk_label_set_text(GTK_LABEL(curWidgets->GnomeInfoLabel),pth);
+ gtk_label_set_markup (GTK_LABEL(curWidgets->GnomeInfoDetailsLabel),prevline);;
+ // gtk_label_set_markup (GTK_LABEL(curWidgets->GnomeInfoLabel), pth);;
}
if (curWidgets->ButtonBackToMain!=NULL)
gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to settings"));
gtk_window_set_title(GTK_WINDOW(curWidgets->window),"UBLinux Settings Manager");
g_signal_connect(G_OBJECT(curWidgets->window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
+ g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets);
if (curWidgets->ButtonBackToMain!=NULL)
g_signal_connect(G_OBJECT(curWidgets->ButtonBackToMain), "clicked", G_CALLBACK(on_backToSettingsButton_clicked), curWidgets);
curWidgets->LabelTitle=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"LabelTitle"));
diff --git a/ui/ubl-settings-manager.glade b/ui/ubl-settings-manager.glade
index 9ab54e6..c0c0b91 100644
--- a/ui/ubl-settings-manager.glade
+++ b/ui/ubl-settings-manager.glade
@@ -235,6 +235,20 @@
+
1
5
@@ -967,6 +981,7 @@
True
False
+ 3
3
3
3
@@ -983,14 +998,14 @@
True
False
+ center
+ center
True
False
end
- 100
- 50
- ../../../../../../../usr/share/icons/ubmanager-cockpit.svg
+ ../../../../../Загрузки/Telegram Desktop/ublinux-dark-glow.png
False
@@ -1004,17 +1019,12 @@
False
+ desklabel
True
False
center
- label:
right
1
- 0
-
-
-
-
False
@@ -1024,13 +1034,13 @@
+ desclabel
True
False
center
label
- 0
-
+