diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index 6e40155..06f20aa 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -68,8 +68,9 @@ void on_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets *appl if (!tempapp){}else{ char arg[100]; memset(arg,0,100); - sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket))); - + 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 --socket-ext-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton))); + if (tempapp[0].Type==2) if (tempapp->Pluggable==1) py_launch_app(tempapp[0].Exec,arg); @@ -101,7 +102,8 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets apps *tempapp=get_app_by_name(applist->applist,name,applist->appssize); char arg[100]; memset(arg,0,100); - sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket))); + 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 --socket-ext-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton))); if (tempapp[0].Type==2) if (tempapp->Pluggable==1) @@ -366,6 +368,7 @@ void on_sections_accept(GtkWidget *button, actionWidgets *widgets){ } }; + void on_sections_cancel(GtkWidget *button, actionWidgets *widgets){ for (dictionary *dct=widgets->SettingsSections->first;dct!=NULL;dct=dct->next){ SectionSettingSegment *segment=(SectionSettingSegment*)dct->data; @@ -389,6 +392,7 @@ void on_sections_cancel(GtkWidget *button, actionWidgets *widgets){ } }; + void on_sections_move_up(GtkWidget *button, actionWidgets *widgets){ for (dictionary *dct=widgets->SettingsSections->first;dct!=NULL;dct=dct->next){ SectionSettingSegment *segment=(SectionSettingSegment*)dct->data; @@ -478,6 +482,7 @@ void on_sections_delete(GtkWidget *button, actionWidgets *widgets){ } } }; + void on_sections_add(GtkWidget *button, actionWidgets *widgets){ dictionary *dict=yon_dictionary_create_empty(); dictionary *dct=NULL; @@ -574,6 +579,7 @@ 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; @@ -615,11 +621,11 @@ void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){ } void on_about_system(GtkWidget *button, actionWidgets *widgets){ - char *socket_id=malloc(sizeof(gtk_socket_get_id(GTK_SOCKET(widgets->socket)))/sizeof(int)); - sprintf(socket_id,"%d",gtk_socket_get_id(GTK_SOCKET(widgets->socket))); - socket_id=yon_char_get_augumented(ubl_settings_infoPathLaunch,socket_id); - socket_id=yon_char_get_augumented(socket_id," &"); - system(socket_id); + char arg[100]; + memset(arg,0,100); + printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(widgets->socket)),gtk_socket_get_id(GTK_SOCKET(widgets->socketbutton))); + 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))); + launch_app_with_arguments("ubl-settings-info",arg); } void launch_app_with_arguments(char *name, char *args){ @@ -708,10 +714,17 @@ int hide_if_unfound(dictionary *widgetsD){ GtkWidget *create_socket(actionWidgets *builder){ GtkWidget *socket; socket = gtk_socket_new(); + GtkWidget *socketbutton=gtk_socket_new(); g_signal_connect(G_OBJECT(socket),"plug-added",G_CALLBACK(on_plug_added),builder); g_signal_connect(G_OBJECT(socket),"plug-removed",G_CALLBACK(on_plug_removed),builder); g_signal_connect(G_OBJECT(socket),"destroy",G_CALLBACK(on_plug_removed),builder); + + g_signal_connect(G_OBJECT(socketbutton),"plug-added",G_CALLBACK(on_plug_added),builder); + g_signal_connect(G_OBJECT(socketbutton),"plug-removed",G_CALLBACK(on_plug_removed),builder); + g_signal_connect(G_OBJECT(socketbutton),"destroy",G_CALLBACK(on_plug_removed),builder); gtk_box_pack_start(GTK_BOX(builder->socketplace),socket,true,true,0); + gtk_box_pack_start(GTK_BOX(builder->socketbuttonplace),socketbutton,1,1,0); + builder->socketbutton=socketbutton; return socket; }; @@ -851,7 +864,6 @@ int check_categories(apps app, char *catstocheck){ int setup_config(){ FILE *file; GError *err=NULL; - printf("1\n"); main_config.sections=malloc(sizeof(dictionary)); main_config.sections->data=NULL; main_config.sections->next=NULL; @@ -860,9 +872,6 @@ int setup_config(){ GKeyFile *configfile = g_key_file_new(); char *pth=malloc(7+strlen(UserConfigPath)+strlen(getlogin())); sprintf(pth,"%s%s%s","/home/",getlogin(),UserConfigPath); - printf("%s\n",getlogin()); - printf("%s\n",pth); - printf("%s\n",GlobalConfigPath); g_key_file_load_from_file(configfile,pth,G_KEY_FILE_KEEP_TRANSLATIONS,&err); if (err){ g_error_free(err); @@ -875,7 +884,6 @@ int setup_config(){ } char *foroutput=NULL; char *line=NULL; - printf("1\n"); main_config.windowPosX=g_key_file_get_integer(configfile,"window","WindowPosX",NULL); main_config.windowPosY=g_key_file_get_integer(configfile,"window","WindowPosY",NULL); main_config.windowWidth=g_key_file_get_integer(configfile,"window","WindowWidth",NULL); @@ -885,7 +893,6 @@ int setup_config(){ main_config.iconSegmentSize=g_key_file_get_integer(configfile,"window","IconSegmentSize",NULL); yon_icon_size_convert(0); gsize length=0; - printf("1\n"); char **a=g_key_file_get_keys(configfile,"sections",&length,NULL); if (!a){yon_set_default_sections(&main_config.sections);} else { @@ -896,12 +903,12 @@ int setup_config(){ main_config.sections->next=NULL; } - printf("1\n"); if (main_config.windowWidth<1024&&main_config.windowHeight<720){ main_config.WindowTheme=0; } return 1; }; + char *yon_cut(char *source, int size, int startpos){ char *cut=NULL; cut=malloc(size+1); @@ -974,6 +981,8 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){ gtk_widget_set_name(iv,"GnomeIcon"); gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(iv),1); gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL); + } else { + gtk_widget_set_name(iv,"Icon"); } GtkWidget *sep=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); @@ -995,6 +1004,7 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){ IVG->IV=iv; IVG->label=label; IVG->sep=sep; + return IVG; } @@ -1098,6 +1108,7 @@ dictionary *yon_dictionary_find(dictionary **dict, char *key){ } return NULL; } + void yon_switch_theme(dictionary **dict, dictionary *newone){ dictionary *dct=*dict; actionWidgets *widgets=(actionWidgets*)dct->data; @@ -1149,7 +1160,6 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){ } - void yon_icon_size_convert(int mode){ if (mode==0){ if (main_config.iconsize==1) main_config.iconsize=24; @@ -1185,7 +1195,6 @@ SectionSettingSegment *yon_create_section_setting(char *name, char *categories){ if (categories[strlen(categories)-1]!=';'){ char *tmp=malloc(strlen(categories)+1); sprintf(tmp,"%s;",categories); - printf("\n\n"); categories=realloc(tmp,strlen(tmp)); } gtk_entry_set_text(GTK_ENTRY(segment->CategoriesEntry),categories); @@ -1330,6 +1339,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them curWidgets->GnomePaned=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"Paned"))); 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->socketbuttonplace=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"socketbuttonplace"))); curWidgets->SettingsSections=NULL; gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview"); curWidgets->socket=GTK_WIDGET(create_socket(curWidgets)); @@ -1344,11 +1354,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them } if (strcmp(theme_id,"Gnome")==0){ - char *socket_id=malloc(sizeof(gtk_socket_get_id(GTK_SOCKET(curWidgets->socket)))/sizeof(int)); - sprintf(socket_id,"%d",gtk_socket_get_id(GTK_SOCKET(curWidgets->socket))); - socket_id=yon_char_get_augumented(ubl_settings_infoPathLaunch,socket_id); - socket_id=yon_char_get_augumented(socket_id," &"); - system(socket_id); + on_about_system(NULL,curWidgets); g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets); g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), widgets); diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index 394f7c2..d87b897 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -135,6 +135,8 @@ typedef struct { GtkWidget *GnomeInfoDetailsLabel; GtkWidget *CautionWindow; GtkWidget *CautionUnderstandButton; + GtkWidget *socketbuttonplace; + GtkWidget *socketbutton; int appssize; apps *applist; GtkWidget *icvpack; diff --git a/ubl-settings-manager.css b/ubl-settings-manager.css index 05d6eb1..0da2d4f 100644 --- a/ubl-settings-manager.css +++ b/ubl-settings-manager.css @@ -1,55 +1,37 @@ -.label { - font-size: 13px; -} -.noborder{ - border:none; - border-width:0px; - border-radius:0px; - box-shadow: none; -} -.darkborder{ - border-width:1px; - border-radius:1px; +* { +padding: 1; + + } .bannerbackground { background-color: #404040; } -.elseps { - border-style:solid; - border-bottom-width: 1px; - border-image: linear-gradient(90deg, #aaaaaa 0%, #dcddde 100%); - border-image-slice: 1; - -} -#Icon { - background-color: transparent; - color: transparent; -} -iconview#GnomeIcon{ + + +#GnomeIcon{ border-style:solid; border-bottom-width: 1px; border-image: linear-gradient(90deg, #aaaaaa 0%, #dcddde 100%); border-image-slice: 1; - background-color: transparent; -} -#noborders{ - border-style:solid; - border: 0px; + background-color: black; } - #iconlabel { font-size:14px; font-weight: bold; } - - #desclabel { - font-size:100%; - } - .bold { - color:#1a5fb4; - } - iconview { - background-image:none; + GtkIconView.view { + + background-color: #000000; + color: #000000; } + GtkIconView.view.cell:selected, +GtkIconView.view.cell:selected:focus { + background-color: #bababa; + border-style: solid; + border-radius: 10px; + border-width: 3px; + border-color: #ffffff; +} + diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 16cf32d..62a5fc9 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -114,11 +114,10 @@ - + False - 450 - 250 - dialog-question + 800 + 600 True @@ -128,40 +127,21 @@ True False - - - True - False - start - 20 - 20 - gtk-dialog-question - 6 - - - False - True - 0 - - True False + True vertical - + True False - start - 10 - 5 - Would yo like to read documentation in the Web? - - - + center + 3 @@ -170,59 +150,188 @@ 0 + + + + False + True + 0 + + + + + True + True + 52 + True + True - + True - False - start - start - 15 - 10 - You will be redirected to documentation website where documentation is translated and supported by community. - True - + True + in + 150 + True + + + True + False + + + True + False + 3 + 3 + 3 + 3 + 3 + vertical + + + + + + + - True - True - 1 + False + True - - Always redirect to online documentation + True - True - False - end - 5 - 10 - 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 + + - False - True - 2 + True + True - True True + end 1 - True @@ -230,22 +339,231 @@ 0 - + + + + + True + False + True + True False + True - - Cancel + True - True - True - - - - + False + + + True + False + UBLinux Settings Manager + + + True + True + 0 + + + + + True + True + 0 + + + + + True + False + + + + + + False + True + 1 + + + + + True + False + + + True + True + False + True + menu1 + none + False + + + + + + False + True + 0 + + + + + False + True + end + 2 + + + + + + + True + False + ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg + 5 + + + + + + + False + 450 + 250 + dialog-question + + + True + False + vertical + + + True + False + + + True + False + start + 20 + 20 + gtk-dialog-question + 6 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + start + 10 + 5 + Would yo 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 + + + Cancel + True + True + True + + + + True True 0 @@ -585,386 +903,98 @@ end 1 - - - - True - True - 0 - - - - - False - True - 4 - - - - - - - True - False - UBLinux Settings - - - - - 1 - 1 - 10 - - - True - False - gtk-go-back - - - True - False - gtk-undelete - - - True - False - ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg - 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 - gtk-ok - - - 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 - 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 - - - - - - - - - True - True - 0 - - - - - True - False - - - Close - True - True - True - 5 - 5 + - False + True True - end 0 - - - Save and apply - True - True - True - 17 - 5 - - - False - True - end - 1 - - False True - 1 + 4 - + True False UBLinux Settings - - - - - - - - Стандартная тема - - - GNOME тема - - + + 1 + 1 + 10 - + + True + False + gtk-go-back + + + True + False + gtk-undelete + + + True + False + ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg + 6 + + True False - + True False - Settings of UBL Settings Manager - Settings - True + Element 1 - + True False - Documentation - True + Element 2 + + + True + False + + + True + False + Element 3 + + + + - + + Element 4 True False - About system... - True + image3 + False - + + True + False + gtk-ok + + False 800 600 @@ -974,192 +1004,169 @@ False vertical - + True - False + True + 5 + 5 + 5 + 5 + in - + True False - True - vertical - + True False - center - 3 - - - - False - True - 0 - - - - - - False - True - 0 - - - - - True - True - 52 - True - True - - - True - True - in - 150 - True + vertical - + True False + 5 + 5 + 5 + 5 + 5 + 5 + vertical - - True - False - 3 - 3 - 3 - 3 - 3 - vertical - - - - + + + False + True + 0 + - - - False - True - - - - - True - False - vertical - + True False - vertical + 5 + 5 + 5 + 5 + 0 + in - + True False - 3 - 3 - 3 - 3 - 3 - 0 - in + 3 + 3 + 5 + 5 - + True False - 12 - + True - False + True + True center - center - - - - False - True - 0 - - + 3 + image2 + + + False + True + 0 + + + + + True + True + True + False + Section name + name + + + True + True + 1 + + + + + True + False - + True False + center - - desklabel + True - False - center - right - 1 + True + True + 5 + image4 False True - 0 + end + 2 + + + + + True + False + 2 + + + True + True + 5 + 5 + 5 + 10 + False + Identifier + + + True + True + 0 + + + + + True + True + 2 - False + True True 1 + + True + True + 2 + - - - - - True - True - 0 - - - - True - True - 0 - - - - - True - False - vertical - - - False - vertical - - - - - - False - True - 0 - + + @@ -1169,18 +1176,8 @@ - - True - True - - - True - True - end - 1 - @@ -1189,59 +1186,99 @@ 0 - - - - - True - False - True - + True False - True - + + Close True - False - UBLinux Settings Manager + True + True + 5 + 5 - True + False True + end 0 - + + Save and apply True True - False True - menu1 - none - False - - - + 17 + 5 False True + end 1 + + False + True + 1 + - - - True - False - ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg - 5 - - + + + + + True + False + UBLinux Settings + + + + + + + + + + + Стандартная тема + + + GNOME тема + + + + + True + False + + + True + False + Settings of UBL Settings Manager + Settings + True + + + + + True + False + Documentation + True + + + + + True + False + About system... + True @@ -1319,10 +1356,6 @@ - - - True @@ -1539,9 +1562,6 @@ 0 - True @@ -1573,9 +1593,6 @@ 1 - True @@ -1596,10 +1613,21 @@ False True - + True False - UBLinux Settings Manager + + + True + False + UBLinux Settings Manager + + + True + True + 0 + + True @@ -1608,14 +1636,9 @@ - + True - True - False - True - menu1 - none - False + False @@ -1626,6 +1649,38 @@ 1 + + + True + False + vertical + + + True + True + False + True + menu1 + none + False + + + + + + False + True + 0 + + + + + False + True + end + 2 + + @@ -1660,10 +1715,6 @@ -