From 260ce91e032634c78c8afdcfe5a6a5cceff3c451 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 9 Mar 2023 12:57:18 +0600 Subject: [PATCH 1/8] divided config parameters for each theme, unfound icons fix --- source/ubl-settings-manager.c | 123 +++++++++++++++++++++------------- source/ubl-settings-manager.h | 1 + ubl-settings-manager.glade | 18 ++--- 3 files changed, 85 insertions(+), 57 deletions(-) diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index 0ff72da..95b04e6 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -82,7 +82,7 @@ void on_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets *appl if (!tempapp){}else{ char arg[100]; memset(arg,0,100); - printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton))); + // printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton))); sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton))); if (tempapp[0].Type==1){ @@ -210,13 +210,13 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){ int sz=1,szm=1; if (main_config.Gnomeiconsize==64) sz=4; - if (main_config.Gnomeiconsize==48) sz=3; - if (main_config.Gnomeiconsize==32) sz=2; - if (main_config.Gnomeiconsize==24) sz=1; + else if (main_config.Gnomeiconsize==48) sz=3; + else if (main_config.Gnomeiconsize==32) sz=2; + else if (main_config.Gnomeiconsize==24) sz=1; if (main_config.Mainiconsize==64) szm=4; - if (main_config.Mainiconsize==48) szm=3; - if (main_config.Mainiconsize==32) szm=2; - if (main_config.Mainiconsize==24) szm=1; + else if (main_config.Mainiconsize==48) szm=3; + else if (main_config.Mainiconsize==32) szm=2; + else if (main_config.Mainiconsize==24) szm=1; char *fromint=malloc(5); memset(fromint,0,5); GError *err=NULL; @@ -693,28 +693,39 @@ void on_about_system(GtkWidget *button, actionWidgets *widgets){ void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){ int *icsize; - printf("changed\n"); + // printf("changed\n"); int curthm=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser)); - if (curthm==0) - *icsize=main_config.Mainiconsize; - else if (curthm==1) - *icsize=main_config.Gnomeiconsize; - if (*icsize<=24){ + // main_config.changed=1; + if (curthm==0){ + main_config.currentThemeIconSize=&main_config.Mainiconsize; + main_config.currentThemeLabelSize=&main_config.MainlabelSize; + icsize=main_config.currentThemeIconSize; + } + else if (curthm==1){ + main_config.currentThemeIconSize=&main_config.Gnomeiconsize; + main_config.currentThemeLabelSize=&main_config.GnomelabelSize; + icsize=main_config.currentThemeIconSize; + } + if (*icsize==24 || *icsize==1){ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"24x24"); gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale(AppIconPath,24,24,1,NULL)); gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),1.0); - } else if (*icsize<=32){ + *icsize=24; + } else if (*icsize==32 || *icsize==2){ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"32x32"); gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale(AppIconPath,32,32,1,NULL)); gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),2.0); - } else if (*icsize<=48){ + *icsize=32; + } else if (*icsize==48 || *icsize==3){ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"48x48"); gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale(AppIconPath,48,48,1,NULL)); gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),3.0); + *icsize=48; } else{ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"64x64"); gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale(AppIconPath,64,64,1,NULL)); gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),4.0); + *icsize=64; } } @@ -763,36 +774,38 @@ int load_apps(IVGraphicals *section, apps *applist, int size){ for (int i=0;icategories)==1){ GError *err=NULL; - char *path=malloc(strlen(IconPicturesPath)+strlen(applist[i].Icon)+7); - memset(path,0,strlen(IconPicturesPath)+strlen(applist[i].Icon)+7); - memcpy(path,IconPicturesPath,strlen(IconPicturesPath)); - path=yon_char_get_augumented(path,applist[i].Icon); - GdkPixbuf *pixbuf; - pixbuf=gdk_pixbuf_new_from_file_at_size(yon_char_get_augumented(path,PictureFormatMain),*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL); - if (!pixbuf) { - pixbuf=gdk_pixbuf_new_from_file_at_size(yon_char_get_augumented(path,PictureFormatExtra),*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL); - if (!pixbuf){ - GtkWidget *imag=gtk_image_new_from_icon_name(applist[i].Icon,GTK_ICON_SIZE_DIALOG); - void *a=GTK_ICON_SIZE_DIALOG; - pixbuf=gtk_image_get_pixbuf(GTK_IMAGE(imag)); - printf("%s\n",applist[i].Icon); - if (!pixbuf) - pixbuf=gdk_pixbuf_new_from_file_at_size(ErrIconPicturePath,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL); - else { - gdk_pixbuf_scale(pixbuf,pixbuf,0,0,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,0,0,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,GDK_INTERP_NEAREST); - GValue a = G_VALUE_INIT; - g_value_init (&a, G_TYPE_STRING); - g_value_set_string (&a, applist[i].Icon); - g_object_set_property(G_OBJECT(section->iconRender),"icon-name", &a); - } - } - }; + // char *path=malloc(strlen(IconPicturesPath)+strlen(applist[i].Icon)+7); + // memset(path,0,strlen(IconPicturesPath)+strlen(applist[i].Icon)+7); + // memcpy(path,IconPicturesPath,strlen(IconPicturesPath)); + // path=yon_char_get_augumented(path,applist[i].Icon); + // GdkPixbuf *pixbuf; + // pixbuf=gdk_pixbuf_new_from_file_at_size(yon_char_get_augumented(path,PictureFormatMain),*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL); + // if (!pixbuf) { + // pixbuf=gdk_pixbuf_new_from_file_at_size(yon_char_get_augumented(path,PictureFormatExtra),*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL); + // if (!pixbuf){ + // GtkWidget *imag=gtk_image_new_from_icon_name(applist[i].Icon,yon_get_icon_size(*main_config.currentThemeIconSize)); + // void *a=GTK_ICON_SIZE_DIALOG; + // pixbuf=gtk_image_get_pixbuf(GTK_IMAGE(imag)); + // // printf("%s\n",applist[i].Icon); + // if (!pixbuf) + // pixbuf=gdk_pixbuf_new_from_file_at_size(ErrIconPicturePath,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL); + // else { + // gdk_pixbuf_scale(pixbuf,pixbuf,0,0,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,0,0,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,GDK_INTERP_NEAREST); + // GValue a = G_VALUE_INIT; + // g_value_init (&a, G_TYPE_STRING); + // g_value_set_string (&a, applist[i].Icon); + // g_object_set_property(G_OBJECT(section->iconRender),"icon-name", &a); + // } + // } + // }; GtkTreeIter iter; gtk_list_store_append(section->LV,&iter); - int sz= *main_config.currentThemeIconSize; + int sz= *main_config.currentThemeIconSize+10; if (sz<50) sz=50; + 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); GtkTreePath *pth = gtk_tree_model_get_path(GTK_TREE_MODEL(section->LV),&iter); - gtk_list_store_set(section->LV,&iter,0, pixbuf, 1,applist[i].Name,2,0.0,3,0.5, 4, sz+8, 5, applist[i].Icon, -1); + 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); 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), cols); @@ -801,7 +814,7 @@ int load_apps(IVGraphicals *section, apps *applist, int size){ } } - printf("среднее время на каждую проверку: %f\n",yon_time_average(times)/1000); + // printf("среднее время на каждую проверку: %f\n",yon_time_average(times)/1000); gtk_icon_view_set_model(GTK_ICON_VIEW(section->IV),GTK_TREE_MODEL(section->LV)); }; @@ -1187,7 +1200,7 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){ //gtk_widget_set_name(iv,"workingbg"); gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL); } - gtk_icon_view_set_text_column(GTK_ICON_VIEW(iv),1); + gtk_icon_view_set_text_column(GTK_ICON_VIEW(iv),0); GtkWidget *sep=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); GtkListStore *lv=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststoreTemplate")); gtk_widget_set_name(sep,"SepIcon"); @@ -1375,6 +1388,13 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){ } +int yon_get_icon_size(int size){ + if (size==1||size==24) return 24; + if (size==2||size==32) return 32; + if (size==3||size==48) return 51; + if (size==4||size==64) return 64; +} + void yon_icon_size_convert(int mode){ if (mode==0){ if (*main_config.currentThemeIconSize==1) *main_config.currentThemeIconSize=24; @@ -1716,7 +1736,7 @@ int main(int argc, char *argv[]){ for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){ load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize); } - printf("\n\n"); + // printf("\n\n"); yon_show_icon_views(widg->ICSys,widg); yon_icv_resize_item(widg->ICSys,widg->GnomePaned); theme="Main"; @@ -1729,13 +1749,16 @@ int main(int argc, char *argv[]){ widg->applist=applist; widg->appssize=*size; widg->ICSys=yon_create_icon_section_list(main_config.sections); + main_config.currentThemeIconSize=&main_config.Mainiconsize; + main_config.currentThemeLabelSize=&main_config.MainlabelSize; for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){ load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize); } - printf("\n\n"); + // printf("\n\n"); yon_show_icon_views(widg->ICSys,widg); main_config.WindowTheme=1; - + main_config.currentThemeIconSize=&main_config.Gnomeiconsize; + main_config.currentThemeLabelSize=&main_config.GnomelabelSize; } else { theme="Main"; @@ -1746,7 +1769,7 @@ int main(int argc, char *argv[]){ for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){ load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize); } - printf("\n\n"); + // printf("\n\n"); yon_show_icon_views(widg->ICSys,widg); theme="Gnome"; main_config.WindowTheme=1; @@ -1757,14 +1780,18 @@ int main(int argc, char *argv[]){ widg=(actionWidgets*)widgets->next->data; widg->applist=applist; widg->appssize=*size; + main_config.currentThemeIconSize=&main_config.Gnomeiconsize; + main_config.currentThemeLabelSize=&main_config.GnomelabelSize; widg->ICSys=yon_create_icon_section_list(main_config.sections); for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){ load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize); } - printf("\n\n"); + // printf("\n\n"); yon_show_icon_views(widg->ICSys,widg); main_config.WindowTheme=0; yon_icv_resize_item(widg->ICSys,widg->GnomePaned); + main_config.currentThemeIconSize=&main_config.Mainiconsize; + main_config.currentThemeLabelSize=&main_config.MainlabelSize; } if (geteuid()==0){ } diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index 5c8f997..fa2a799 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -220,5 +220,6 @@ float yon_time_average(dictionary *times); void yon_time_reg_for_average(dictionary *listofregs, int size, time_t tm); void yon_dictionary_switch_to_last(dictionary **dict); dictionary *yon_dictionary_create_conneced(dictionary *targetdict); +int yon_get_icon_size(int size); #endif \ No newline at end of file diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 2db0b73..86dc2b0 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -1539,8 +1539,6 @@ - - @@ -1549,8 +1547,10 @@ - - + + + + @@ -1568,11 +1568,11 @@ - 4 - 2 - 3 - 5 - 0 + 3 + 1 + 2 + 4 + 5 @@ -985,7 +1002,7 @@ True False center - gtk-missing-image + ubl-settings-manager-banner 3 - + False - 800 - 600 - ubconfig-gui + 450 + 250 + dialog-question True @@ -152,21 +152,40 @@ True False + + + True + False + start + 20 + 20 + dialog-question-symbolic + 6 + + + False + True + 0 + + True False - True vertical - + True False - center - 3 + start + 10 + 5 + Would you like to read documentation in the Web? + + + @@ -175,190 +194,59 @@ 0 - - - - False - True - 0 - - - - - True - True - 52 - True - True - + True - True - external - in - - - True - False - immediate - - - True - False - vertical - - - - - - - - + False + start + start + 15 + 10 + You will be redirected to documentation website where documentation is translated and supported by community. + True + - False - True + True + True + 1 - + + Always redirect to online documentation True - False - vertical - - - True - False - vertical - - - True - False - 3 - 3 - 3 - 3 - 3 - 0 - in - - - True - False - 12 - - - True - False - center - center - - - - False - True - 0 - - - - - True - False - - - desklabel - True - False - center - right - 1 - - - False - True - 0 - - - - - False - True - 1 - - - - - - - - - - - - - True - True - 0 - - - - - True - True - 0 - - - - - True - False - vertical - - - False - vertical - - - - - - False - True - 0 - - - - - False - True - 1 - - + True + False + end + 5 + 10 + True + - True - True + False + True + 2 + True True - end 1 + True @@ -366,226 +254,8 @@ 0 - - - - - True - False - True - - True - False - 32 - ubconfig-gui - 5 - - - - - Back to settings - True - False - False - False - center - center - 10 - 10 - image5 - - - 1 - - - - - True - False - - - True - True - False - True - center - center - GnomeMenu - none - - - - - - - False - True - 0 - - - - - end - 2 - - - - - True - False - center - center - - - - - - end - 3 - - - - - True - False - center - center - vertical - - - - - - 4 - - - - - - - - False - 450 - 250 - dialog-question - - - True - False - vertical - - - True - False - - - True - False - start - 20 - 20 - dialog-question-symbolic - 6 - - - False - True - 0 - - - - - True - False - vertical - - - True - False - start - 10 - 5 - Would you like to read documentation in the Web? - - - - - - - False - True - 0 - - - - - True - False - start - start - 15 - 10 - You will be redirected to documentation website where documentation is translated and supported by community. - True - - - - True - True - 1 - - - - - Always redirect to online documentation - True - True - False - end - 5 - 10 - True - - - - False - True - 2 - - - - - - True - True - 1 - - - - - - True - True - 0 - - - - + True False 5 @@ -960,7 +630,7 @@ True False 32 - ubconfig-gui + ubl-settings-manager 5 @@ -1132,7 +802,7 @@ True False 32 - ubconfig-gui + ubl-settings-manager 5 @@ -1164,301 +834,588 @@ - + + + + 2 + + + + + True + False + vertical + + + True + True + False + True + center + center + MainMenu + none + False + + + + + + False + True + 0 + + + + + end + 3 + + + + + True + False + center + center + + + + + + + end + 4 + + + + + + + + True + False + gtk-undelete + + + True + False + ubconfig-gui + 6 + + + True + False + + + True + False + Element 1 + + + + + True + False + Element 2 + + + True + False + + + True + False + Element 3 + + + + + + + + + Element 4 + True + False + image3 + False + + + + + True + False + object-select-symbolic + + + False + 800 + 600 + + + True + False + vertical + + + True + True + 5 + 5 + 5 + 5 + in + + + True + False + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + vertical + + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 3 + 3 + 5 + 5 + + + True + False + + + True + True + True + center + 3 + image2 + + + False + True + 0 + + + + + True + True + True + False + Section name + name + + + True + True + 1 + + + + + True + False + + + True + False + center + + + True + True + True + 5 + image4 + + + False + True + end + 2 + + + + + True + False + 2 + + + True + True + 5 + 5 + 5 + 10 + False + Identifier + + + True + True + 0 + + + + + True + True + 2 + + + + + True + True + 1 + + + + + True + True + 2 + + + + + + + + + + + + False + True + 1 + + + + + + - 2 + True + True + 0 True False - vertical - + + Close True True - False True - center - center - MainMenu - none - False - - - + 5 + 5 False True + end 0 - - - end - 3 - - - - - True - False - center - center - + + Save and apply + True + True + True + 17 + 5 + + + False + True + end + 1 + - - end - 4 + False + True + 1 - - - - - - True - False - gtk-undelete - - - True - False - ubconfig-gui - 6 - - - True - False - - - True - False - Element 1 - - + + True False - Element 2 - - + UBLinux Settings + + True False - - - True - False - Element 3 - - + 32 + ubl-settings-manager + 5 - - - Element 4 - True - False - image3 - False - - - + True False - object-select-symbolic + go-first-symbolic - + False 800 600 + ubconfig-gui True False vertical - + True - True - 5 - 5 - 5 - 5 - in + False - + True False + True + vertical - + True False - vertical + center + 3 + + + + False + True + 0 + + + + + + False + True + 0 + + + + + True + True + 52 + True + True + + + True + True + external + in - + True False - 5 - 5 - 5 5 - 5 - 5 - vertical + immediate + natural - + + True + False + vertical + + + + + - - False - True - 0 - + + + False + True + + + + + True + False + vertical - + True False - 5 - 5 - 5 - 5 - 0.019999999552965164 - in + vertical - + True False - 3 - 3 - 5 - 5 + 3 + 3 + 3 + 3 + 3 + 0 + in - + True False - - - True - True - True - center - 3 - image2 - - - False - True - 0 - - - - - True - True - True - False - Section name - name - - - True - True - 1 - - + 12 True False + center + center - + + + False + True + 0 + + + + True False - center - - - True - True - True - 5 - image4 - - - False - True - end - 2 - - - + + desklabel True False - 2 - - - True - True - 5 - 5 - 5 - 10 - False - Identifier - - - True - True - 0 - - + center + right + 1 - True + False True - 2 + 0 - True + False True 1 - - True - True - 2 - + + + + + + True + True + 0 + - - + + + True + True + 0 + + + + + True + False + vertical + + + False + vertical + + + + + + False + True + 0 + @@ -1468,8 +1425,18 @@ + + True + True + + + True + True + end + 1 + @@ -1478,73 +1445,108 @@ 0 + + + + + True + False + True + + + True + False + 32 + ubl-settings-manager + 5 + + + + + Back to settings + True + False + False + False + center + center + 10 + 10 + image5 + + + 1 + + True False - - Close + True True + False True - 5 - 5 + center + center + GnomeMenu + none + + + + False True - end 0 + + + end + 2 + + + + + True + False + center + center - - Save and apply - True - True - True - 17 - 5 - - - False - True - end - 1 - + - False - True - 1 + end + 3 - - - - - True - False - UBLinux Settings - + True False - 32 - ubconfig-gui - 5 + center + center + vertical + + + + + 4 + + - - True - False - go-first-symbolic - @@ -1579,10 +1581,10 @@ True True 4 + natural horizontal liststoreTemplate 135 - 10 0 0 0 @@ -1874,7 +1876,7 @@ True False 32 - ubconfig-gui + ubl-settings-manager 5 From c5f5d813a2e13ac940b048850c15a0dae211ad3e Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 10 Mar 2023 11:53:13 +0600 Subject: [PATCH 5/8] fixed compilation error --- source/ubl-settings-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index 7fb72cc..9fa132c 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -45,8 +45,8 @@ void on_plug_added(GtkSocket* self, actionWidgets *builder){ gtk_widget_set_vexpand(GTK_WIDGET(builder->socketplace),1); gtk_widget_set_vexpand(GTK_WIDGET(self),1); gtk_widget_show(builder->socketplace); - if main_c - gtk_widget_hide(applist->appSettings); + if (main_config.WindowTheme==0) + gtk_widget_hide(builder->appSettings); // if (main_config.WindowTheme==0) // else From f7527b94362da88ee0d79187fcc71840bf94626d Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 10 Mar 2023 15:06:58 +0600 Subject: [PATCH 6/8] hiding options in Gnome theme returned --- source/ubl-settings-manager.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index 9fa132c..37d7c97 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -45,12 +45,7 @@ void on_plug_added(GtkSocket* self, actionWidgets *builder){ gtk_widget_set_vexpand(GTK_WIDGET(builder->socketplace),1); gtk_widget_set_vexpand(GTK_WIDGET(self),1); gtk_widget_show(builder->socketplace); - if (main_config.WindowTheme==0) gtk_widget_hide(builder->appSettings); - // if (main_config.WindowTheme==0) - - // else - // gtk_widget_show(builder->appSettings); if (builder->ButtonBackToMain!=NULL) gtk_widget_show(builder->ButtonBackToMain); gtk_widget_show(GTK_WIDGET(self)); gtk_widget_show(builder->socketbuttonplace); @@ -69,14 +64,11 @@ void on_plug_removed(GtkSocket* self, actionWidgets *widgets){ gtk_widget_destroy(widgets->socketbutton); if(widgets->ThirdSocket) gtk_widget_destroy(widgets->ThirdSocket); - - gtk_widget_show(widgets->appSettings); } void on_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets *applist){ GtkTreeIter iter; char *name; - gtk_widget_hide(applist->appSettings); gtk_tree_model_get_iter(gtk_icon_view_get_model(self),&iter,path); gtk_tree_model_get(gtk_icon_view_get_model(self),&iter,0,&name,-1); @@ -119,7 +111,6 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets if (tempapp->Pluggable==1){ if (tempapp->DualPluggable==1){ - //gtk_widget_hide(applist->appSettings); char *dualarg=malloc(strlen("--socket-id= --socket-ext-id= --socket-trd-id=")+30); sprintf(dualarg,"--socket-id=%d --socket-ext-id=%d --socket-trd-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)),gtk_socket_get_id(GTK_SOCKET(applist->ThirdSocket))); if (launch_app_with_arguments(tempapp[0].Exec,dualarg)==32512) From eaafd607cd093755b9e5e0e87c62a527129acc40 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 10 Mar 2023 15:59:59 +0600 Subject: [PATCH 7/8] increased padding between icon elements --- ubl-settings-manager.glade | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 9724b45..43378f6 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -181,6 +181,7 @@ 10 5 Would you like to read documentation in the Web? + 0 @@ -204,6 +205,7 @@ 10 You will be redirected to documentation website where documentation is translated and supported by community. True + 0 @@ -1279,7 +1281,6 @@ True False - 5 immediate natural @@ -1585,12 +1586,14 @@ horizontal liststoreTemplate 135 - 0 - 0 - 0 + 2 + 2 + 5 True - + + 2 + 3 1 From 2605be7163633b9defb2f9dc52c73fbdb9969762 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 10 Mar 2023 16:58:38 +0600 Subject: [PATCH 8/8] deprecated variables removal --- source/ubl-settings-manager.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index b6bb96f..d10ecef 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -13,11 +13,9 @@ #define AppBannerPath "/usr/share/ubl-settings-manager/ui/ubl-settings-manager-banner.png" #define DesktopPath "/usr/share/applications/" #define IconPicturesPath "/usr/share/icons/hicolor/scalable/apps/" -#define ErrIconPicturePath "/usr/share/icons/Faenza/emblems/32/emblem-important.png" #define ublinux_logo "/usr/share/ubl-settings-manager/ui/ublinux-logo.svg" #define LocalePath "/usr/share/locale" #define LocaleName "ubl-settings-manager" -#define LogoPath "/usr/share/icons/hicolor/scalable/apps/ubl-settings-manager.svg" #define ubl_settings_infoPath "ubl-settings-info" #define ubl_settings_infoPathLaunch "ubl-settings-info --socket-id=" char *version_application = "1.3";