diff --git a/Makefile b/Makefile index b66026b..e166a62 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ uninstall: done; \ done @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" - @$(RM) "${DESTDIR}${PREFIX}/etc/xdg/${PKGNAME}/${PKGNAME}.conf" + @$(RM) "${DESTDIR}/etc/xdg/${PKGNAME}/${PKGNAME}.conf" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" @$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}" @@ -112,8 +112,8 @@ install: check uninstall @install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" - @install -dm755 "${DESTDIR}${PREFIX}/etc/xdg" - @install -Dm744 -t "${DESTDIR}${PREFIX}/etc/xdg/${PKGNAME}/" "${PKGNAME}.conf" + @install -dm755 "${DESTDIR}/etc/xdg" + @install -Dm744 -t "${DESTDIR}/etc/xdg/${PKGNAME}/" "${PKGNAME}.conf" @install -dm755 "${DESTDIR}${PREFIX}/share/applications" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -dm755 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images} diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index c7a18d3..39f23f8 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -257,6 +257,8 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){ sprintf(fromint,"%d",(int)((float)main_config.labelDensity/1000)); g_key_file_set_string(gfile,"window","LabelDensity",fromint); g_key_file_set_string(gfile,"window","User",login); + g_key_file_set_boolean(gfile,"window","GnomeDoubleClick",main_config.GnomeDoubleClick); + g_key_file_set_boolean(gfile,"window","MainDoubleClick",main_config.MainDoubleClick); g_key_file_remove_group(gfile, "sections",NULL); for (dictionary *dict=widgets->ICSys->first;dict!=NULL;dict=dict->next){ @@ -276,7 +278,7 @@ void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *wi if (position<200) {position=200; gtk_paned_set_position(GTK_PANED(widgets->GnomePaned),200);} main_config.iconSegmentSize=position; double pos=((double)position-20); - if (pos<70) pos=70; + if (pos<50) pos=50; for (dictionary *dict=widgets->ICSys;dict!=NULL;dict=dict->next){ IVGraphicals *IV=(IVGraphicals*)dict->data; gtk_icon_view_set_item_width(GTK_ICON_VIEW(IV->IV),pos); @@ -292,6 +294,7 @@ int on_settingsOpen(GtkWidget *button, actionWidgets *widgets){ gtk_window_set_icon(GTK_WINDOW(widgets->SettingsWindow),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_widget_show_all(widgets->SettingsWindow); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->settingsThemeChooser),main_config.WindowTheme); + gtk_switch_set_state(GTK_SWITCH(widgets->settingsDoubleClickSwitch),*main_config.currentDoubleClick); int sz=1; if (*main_config.currentThemeIconSize==64) sz=4; if (*main_config.currentThemeIconSize==48) sz=3; @@ -357,7 +360,7 @@ void on_section_settings_open(GtkButton* self,dictionary *cWidgets){ main_config.SettingsSections->first->key=name; yon_segments_hide(widgets); yon_segment_show(widgets, (SectionSettingSegment*)main_config.SettingsSections->data); - for (dictionary *dct=main_config.sections->first->next;dct!=NULL;dct=dct->next){ // ошибка если меньше двух + for (dictionary *dct=main_config.sections->first->next;dct!=NULL;dct=dct->next){ name=((IconSection*)dct->data)->section; categories=((IconSection*)dct->data)->categories; main_config.SettingsSections=yon_dictionary_create_with_data_connected(main_config.SettingsSections,name,yon_create_section_setting(name, categories)); @@ -492,7 +495,7 @@ void on_sections_add(GtkWidget *button, actionWidgets *widgets){ SectionSettingSegment *segment=yon_create_section_setting(category_name,category_categories); dictionary *newsection = yon_dictionary_get_last(main_config.SettingsSections); newsection=yon_dictionary_create_with_data_connected(newsection,category_name,segment); - printf("%s\n",category_name); + // printf("%s\n",category_name); dictionary *newsec=yon_dictionary_create_empty(); newsec=yon_section_new(newsec,category_name,category_categories); main_config.sections=yon_dictionary_create_with_data_connected(main_config.sections,category_name,newsec->data); @@ -515,8 +518,12 @@ void on_sections_close(GtkWidget *button, actionWidgets *widgets){ } void on_sections_save(GtkWidget *button, dictionary *widgetsD){ + int temptheme=main_config.WindowTheme; for (dictionary *dict=widgetsD->first;dict!=NULL;dict=dict->next){ actionWidgets *widgets=(actionWidgets*)dict->data; + if (strcmp(dict->key,"Gnome")==0) main_config.WindowTheme=1; + else main_config.WindowTheme=0; + for (dictionary *ICSys=widgets->ICSys->first;ICSys!=NULL;ICSys=ICSys->next){ gtk_container_remove(GTK_CONTAINER(widgets->icvpack),((IVGraphicals*)ICSys->data)->Box); } @@ -526,7 +533,10 @@ void on_sections_save(GtkWidget *button, dictionary *widgetsD){ } yon_show_icon_views(widgets->ICSys,widgets); hide_if_unfound(widgetsD); + if (main_config.WindowTheme==1) + yon_icv_resize_item(dict,widgets->GnomePaned); } + main_config.WindowTheme=temptheme; } void on_section_delete(GtkWidget *button, actionWidgets *widgets){ @@ -546,35 +556,16 @@ 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; - if (gtk_window_is_maximized(GTK_WINDOW(widgets->window))==0) + if (gtk_window_is_maximized(GTK_WINDOW(widgets->window))==0){ main_config.fullscreen=0; + gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight); + gtk_window_get_position(GTK_WINDOW(window),&main_config.windowPosX,&main_config.windowPosY); + } else main_config.fullscreen=1; - gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight); - if (main_config.WindowTheme==1){ - if (main_config.windowWidth<1240){ - if (stld==0){ - stld=1; - main_config.WindowTheme=0; - - gtk_window_set_resizable(GTK_WINDOW(window),0); - gtk_window_get_position(GTK_WINDOW(window),&main_config.windowPosX,&main_config.windowPosY); - gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight); - yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,"Main")); - *main_config.currentThemeIconSize=24; - gtk_window_resize(GTK_WINDOW(widgets->window),main_config.windowWidth,main_config.windowHeight); - gtk_widget_hide(widgets->window); - } - }else { - yon_segments_hide(widgets); - yon_segments_show(widgets); - if (stld==1){ - stld=0; - cmld=0; - } - } - } + gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->Revealer),!gtk_revealer_get_child_revealed(GTK_REVEALER(widgets->Revealer))); + gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->Revealer),gtk_revealer_get_child_revealed(GTK_REVEALER(widgets->Revealer))); + } void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){ @@ -594,13 +585,16 @@ void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){ if (curthm==0){ main_config.currentThemeIconSize=&main_config.Mainiconsize; main_config.currentThemeLabelSize=&main_config.MainlabelSize; + main_config.currentDoubleClick=&main_config.MainDoubleClick; icsize=main_config.currentThemeIconSize; } else if (curthm==1){ main_config.currentThemeIconSize=&main_config.Gnomeiconsize; main_config.currentThemeLabelSize=&main_config.GnomelabelSize; + main_config.currentDoubleClick=&main_config.GnomeDoubleClick; icsize=main_config.currentThemeIconSize; } + gtk_switch_set_state(GTK_SWITCH(widgets->settingsDoubleClickSwitch),*main_config.currentDoubleClick); GtkIconTheme *icthm=gtk_icon_theme_get_default(); if (*icsize==24 || *icsize==1){ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"24x24"); @@ -625,6 +619,28 @@ void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){ } } +void on_reveal_banner(GtkWidget *button, actionWidgets *widgets){ + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->BannerRevealer))==1){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->BannerRevealer),0); + if (gtk_revealer_get_reveal_child(GTK_REVEALER(widgets->Revealer))==1){ + gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->Revealer),0); + gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerRevealer),GTK_ARROW_RIGHT); + main_config.BannerHidden=1; + } + else { + gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->Revealer),1); + gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerRevealer),GTK_ARROW_LEFT); + main_config.BannerHidden=0; + } + } +} + +void on_double_click_changed(GtkWidget *Switch, gboolean state, dictionary *widgetsD){ + // printf("%s\n","SGRBHSDRFJHNSDRJHNSDRJHNDRDJR"); + *main_config.currentDoubleClick=state; + update_double_clicks(widgetsD); +} + void on_about(GtkWidget *button){ GtkBuilder *builder = gtk_builder_new_from_file(GladePath); GtkWidget *AboutButtons = GTK_WIDGET(gtk_builder_get_object(builder,"AboutButtons")); @@ -688,6 +704,28 @@ int reload_list(IVGraphicals *section){ gtk_icon_view_set_model(GTK_ICON_VIEW(section->IV),GTK_TREE_MODEL(section->LV)); } +void update_double_clicks(dictionary *widgetsD){ + printf("%s\n","1"); + for (dictionary *dict=widgetsD->first;dict!=NULL;dict=dict->next){ + printf("%s\n","2"); + actionWidgets *widgets=(actionWidgets*)dict->data; + printf("%s\n","3"); + for (dictionary *ivdct=widgets->ICSys->first;ivdct!=NULL;ivdct=ivdct->next){ + printf("%s\n","4"); + IVGraphicals *IV=(IVGraphicals*)ivdct->data; + printf("%s\n","5"); + if (strcmp(dict->key,"Gnome")==0){ + printf("%s\n","6"); + gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(IV->IV),!main_config.GnomeDoubleClick); + printf("%s\n","7"); + } else{ + gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(IV->IV),!main_config.MainDoubleClick); + printf("%s\n","8"); + } + } + } +} + int load_apps(IVGraphicals *section, apps *applist, int size){ int catstofind=sizeof(section->categories)/sizeof(char*); int i=0,sz=0; @@ -886,6 +924,8 @@ int setup_config(){ } char *foroutput=NULL; char *line=NULL; + main_config.GnomeDoubleClick=g_key_file_get_boolean(configfile,"window", "GnomeDoubleClick",NULL); + main_config.MainDoubleClick=g_key_file_get_boolean(configfile,"window", "MainDoubleClick",NULL); 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); @@ -899,6 +939,7 @@ int setup_config(){ 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.fullscreen=g_key_file_get_boolean(configfile,"window","fullscreen",NULL); + main_config.BannerHidden=g_key_file_get_boolean(configfile,"window","BannerHidden",NULL); if (main_config.MainlabelSize==0) main_config.MainlabelSize=12; if (main_config.labelDensity==0) main_config.labelDensity=0; main_config.MainlabelSize=main_config.MainlabelSize*1000; @@ -908,9 +949,11 @@ int setup_config(){ if (main_config.WindowTheme==0){ main_config.currentThemeLabelSize=&main_config.MainlabelSize; main_config.currentThemeIconSize=&main_config.Mainiconsize; + main_config.currentDoubleClick=&main_config.MainDoubleClick; } else if (main_config.WindowTheme==1){ main_config.currentThemeLabelSize=&main_config.GnomelabelSize; main_config.currentThemeIconSize=&main_config.Gnomeiconsize; + main_config.currentDoubleClick=&main_config.GnomeDoubleClick; } yon_icon_size_convert(0); @@ -925,9 +968,9 @@ int setup_config(){ main_config.sections->next=NULL; } - if (main_config.windowWidth<1024&&main_config.windowHeight<720){ - main_config.WindowTheme=0; - } + // if (main_config.windowWidth<1024&&main_config.windowHeight<720){ + // main_config.WindowTheme=0; + // } return 1; }; @@ -936,13 +979,15 @@ void save_config(actionWidgets *widgets){ 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; + else sz=3; 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; + else szm=3; char *fromint=malloc(5); memset(fromint,0,5); GError *err=NULL; @@ -978,6 +1023,7 @@ void save_config(actionWidgets *widgets){ g_key_file_set_string(gfile,"window","WindowHeight",fromint); } g_key_file_set_boolean(gfile,"window","fullscreen",main_config.fullscreen); + g_key_file_set_boolean(gfile,"window","BannerHidden",main_config.BannerHidden); sprintf(fromint,"%d",main_config.WindowTheme); g_key_file_set_string(gfile,"window","WindowTheme",fromint); sprintf(fromint,"%d",sz); @@ -1025,11 +1071,8 @@ char *yon_char_divide_search(char *source, char* dividepos, int delete_divider){ void yon_set_default_sections(dictionary *section){ yon_section_new(section,"Personal","X-UBL-SettingsManager;X-UBL-PersonalSettings;"); - section=yon_dictionary_create_conneced(section); yon_section_new(section,"Hardware","X-UBL-SettingsManager;X-UBL-HardwareSettings;"); - section=yon_dictionary_create_conneced(section); yon_section_new(section,"System","X-UBL-SettingsManager;X-UBL-SystemSettings;"); - section=yon_dictionary_create_conneced(section); yon_section_new(section,"Misc","X-UBL-SettingsManager;X-UBL-MiscSettings;"); } @@ -1058,11 +1101,12 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){ if (main_config.WindowTheme==1) { gtk_icon_view_set_columns(GTK_ICON_VIEW(iv),1); gtk_widget_set_name(iv,"GnomeIcon"); - gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(iv),1); + gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(iv),!main_config.GnomeDoubleClick); gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL); } else { gtk_icon_view_set_item_padding(GTK_ICON_VIEW(iv),3); gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL); + gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(iv),!main_config.MainDoubleClick); gtk_icon_view_set_row_spacing(GTK_ICON_VIEW(iv),2); } GtkWidget *sep=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); @@ -1122,21 +1166,18 @@ void yon_check_path(char *path){ } dictionary *yon_section_new(dictionary *section, char *section_name, char *categories){ - section->next=NULL; IconSection *sct=malloc(sizeof(IconSection)); - dictionary *dict=yon_dictionary_create_empty();//malloc(sizeof(dictionary)); - sct->section=section_name; - sct->categories=categories; - dict->data=sct; - if (!section->data){ - section->data=dict->data; + sct->section=section_name; + sct->categories=categories; + if (!section->data&&!section->prev){ + section->data=sct; section->first=section; section->key=section_name; } else { - dict->first=section->first; - section->next=dict; - dict->prev=section; - dict->key=section_name; + section=yon_dictionary_get_last(section); + section->next=yon_dictionary_create_conneced(section); + section->next->data=sct; + section->next->key=section_name; section=section->next; } @@ -1219,6 +1260,14 @@ dictionary *yon_dictionary_rip(dictionary *dict){ } } +dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect){ + dictionary *dict=yon_dictionary_get_last(old); + dict->next=toconnect; + toconnect->prev=dict; + toconnect->first=dict->first; + return toconnect; +} + void yon_switch_theme(dictionary **dict, dictionary *newone){ dictionary *dct=*dict; actionWidgets *widgets=(actionWidgets*)dct->data; @@ -1247,14 +1296,6 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){ main_config.curThemeName="Main"; gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->settingsThemeChooser),0); gtk_window_present(GTK_WINDOW(widgets->CautionWindow)); - gtk_widget_show(widgets->MenuItemAboutSystem); - } else if (x<1240){ - gtk_window_resize(GTK_WINDOW(widgets->window),1245,y); - main_config.WindowTheme=1; - main_config.curThemeName="Gnome"; - gtk_widget_show(widgets->window); - gtk_widget_hide(widgets->MenuItemAboutSystem); - }else{ main_config.WindowTheme=1; main_config.curThemeName="Gnome"; @@ -1553,15 +1594,23 @@ dictionary *yon_dictionary_switch_places(dictionary *dict,int aim){ } dictionary *yon_dictionary_get_last(dictionary *dict){ - for (dictionary *dct=dict;dct!=NULL;dct=dct->next){} - return dict; + dictionary *dct=NULL; + for (dct=dict->first;dct->next!=NULL;dct=dct->next){} + return dct; } void yon_main_quit(actionWidgets *widgets){ + // GtkWindow *wnd=GTK_WINDOW(widgets->window); + // gtk_window_get_position(wnd,&main_config.windowPosX,&main_config.windowPosY); + // gtk_window_get_size(wnd,&main_config.windowWidth,&main_config.windowHeight); save_config(widgets); gtk_main_quit(); } +void confugure_setings_window(actionWidgets *widgets){ + +} + dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *theme_id, apps *applist, int appsize){ dictionary *widgets=*widgetss; @@ -1590,7 +1639,13 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them curWidgets->MenuItemSettings=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemSettings"))); curWidgets->MenuItemDocumentation=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemDocumentation"))); curWidgets->MenuItemAboutSystem=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemAboutSystem"))); + curWidgets->BannerRevealer=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"RevealButton"))); + curWidgets->Revealer=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"Revealer"))); curWidgets->SettingsSections=main_config.SettingsSections; + if (main_config.BannerHidden==0){ + gtk_revealer_set_reveal_child(GTK_REVEALER(curWidgets->Revealer),1); + gtk_menu_button_set_direction(GTK_MENU_BUTTON(curWidgets->BannerRevealer),GTK_ARROW_LEFT); + } if (main_config.lock_settings==1){ gtk_widget_set_sensitive(curWidgets->MenuItemSettings,0); } @@ -1605,15 +1660,14 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them } g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets); - if (strcmp(theme_id,"Gnome")==0){ - g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), widgets); + // if (strcmp(theme_id,"Gnome")==0){ + // g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), 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")); gtk_window_set_title(GTK_WINDOW(curWidgets->window),_("UBLinux Settings Manager")); - + gtk_window_move(GTK_WINDOW(curWidgets->window),main_config.windowPosX,main_config.windowPosY); // Standard for all themes curWidgets->settingsThemeChooser=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsThemeChooser")); @@ -1645,6 +1699,8 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them 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->settingsDoubleClickSwitch=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsDoubleClickSwitch")); + curWidgets->settingsDoubleClickLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsDoubleClickLabel")); curWidgets->applist=applist; curWidgets->appssize=appsize; GtkIconTheme *icthm=gtk_icon_theme_get_default(); @@ -1654,6 +1710,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them 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_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->BannerRevealer), "clicked", G_CALLBACK(on_reveal_banner), curWidgets); if (gnld==0){ gnld=1; @@ -1669,9 +1726,17 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them g_signal_connect(G_OBJECT(curWidgets->SectionSettingsSaveButton), "clicked", G_CALLBACK(on_sections_save), widgets); 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->settingsDoubleClickSwitch), "state-set", G_CALLBACK(on_double_click_changed), widgets); } + gtk_widget_hide_on_delete(curWidgets->window); 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(gtk_builder_get_object(builder,"MainHeaderNameLabel")),_("UBLinux Settings Manager")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"sectionsHeaderNameLabel")),_("UBLinux Settings Manager")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"GnomeHeaderNameLabel")),_("UBLinux Settings Manager")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"UBLinux Settings")),_("UBLinux Settings Manager")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"webHeaderNameLabel")),_("UBLinux Settings Manager")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"warningHeaderNameLabel")),_("UBLinux Settings Manager")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder,"LoaderHeaderNameLabel")),_("UBLinux Settings Manager")); gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelSize),_("Icon size")); gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelTheme),_("Window theme")); gtk_label_set_text(GTK_LABEL(curWidgets->helpHeader),_("Would you like to read documentation in the Web?")); @@ -1680,11 +1745,13 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them gtk_button_set_label(GTK_BUTTON(curWidgets->CancelHelpButton),_("Cancel")); gtk_button_set_label(GTK_BUTTON(curWidgets->settingsCancel),_("Close")); gtk_button_set_label(GTK_BUTTON(curWidgets->settingsAccept),_("Save and apply")); + gtk_button_set_label(GTK_BUTTON(curWidgets->SectionSettingsSaveButton),_("Apply")); 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->MenuItemDocumentation),_("About...")); gtk_button_set_label(GTK_BUTTON(curWidgets->CautionUnderstandButton),_("Understood")); gtk_button_set_label(GTK_BUTTON(curWidgets->settingsSectionsSettingsButton),_("Sections management")); + gtk_label_set_text(GTK_LABEL(curWidgets->settingsDoubleClickLabel),_("Double click selection")); return widgets; } diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index af8076c..b06def6 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -83,7 +83,11 @@ typedef struct { int changed; int fullscreen; int lock_settings; + int GnomeDoubleClick; + int MainDoubleClick; + int *currentDoubleClick; dictionary *SettingsSections; + int BannerHidden; } config; typedef struct { @@ -165,6 +169,10 @@ typedef struct { GtkWidget *infoWarningWindow; GtkWidget *infoWarningButton; GtkWidget *infoWarningLabel; + GtkWidget *BannerRevealer; + GtkWidget *Revealer; + GtkWidget *settingsDoubleClickSwitch; + GtkWidget *settingsDoubleClickLabel; } actionWidgets; @@ -203,6 +211,7 @@ void sort_apps(apps *applist,int size); apps *find_apps(int *sizef); int check_categories(apps app, char *catstocheck); int setup_config(); +void update_double_clicks(dictionary *widgetsD); void yon_icv_resize_item(dictionary *icdict, GtkWidget *paned); dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *theme_id, apps *applist, int appsize); char *yon_char_get_augumented(char *source, char *append); @@ -221,6 +230,7 @@ dictionary *yon_dictionary_get_last(dictionary *dict); dictionary *yon_dictionary_switch_places(dictionary *dict,int aim); dictionary *yon_dictionary_create_with_data(char *key, void *data); dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data); +dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect); SectionSettingSegment *yon_create_section_setting(char *name, char *categories); void yon_segments_show(actionWidgets *widgets); void yon_segments_hide(actionWidgets *widgets); diff --git a/ubl-settings-manager-banner.png b/ubl-settings-manager-banner.png index b7f6b74..4c36d69 100644 Binary files a/ubl-settings-manager-banner.png and b/ubl-settings-manager-banner.png differ diff --git a/ubl-settings-manager.conf b/ubl-settings-manager.conf index e8ceb76..3e8a48b 100644 --- a/ubl-settings-manager.conf +++ b/ubl-settings-manager.conf @@ -11,6 +11,9 @@ MainLabelSize=12 GnomeLabelSize=12 LabelDensity=0 User= +GnomeDoubleClick=false +MainDoubleClick=true +BannerHidden=false [sections] Personal=X-UBL-SettingsManager;X-UBL-PersonalSettings; diff --git a/ubl-settings-manager.css b/ubl-settings-manager.css index 67166dc..c5b88a3 100644 --- a/ubl-settings-manager.css +++ b/ubl-settings-manager.css @@ -2,6 +2,20 @@ background-color: #404040; } +.thin{ + padding:0px; + margin:0px; + transition: 0ms ease-out; +} +.thin:active { + background-color: @theme_selected_bg_color; + transition: 10ms ease-out; +} +.transparent { + background:none; + border:none; + transition: 0ms ease-out; +} #GnomeIcon{ border-style:solid; @@ -19,41 +33,48 @@ background-color: #404040; font-weight: bold; } -.roundborder * { +.roundborder > * { + border-width:0px; +} +.roundborder:backdrop > * { border-width:0px; border-radius:5px; } .noborder { border: none; } -.menu:hover { - border-color:alpha(@theme_text_color, 0.01); -} -.menu { - border-color:alpha(@theme_text_color, 0.01); -} -.menu:hover >* { - border-color:alpha(@theme_text_color, 0.01); -} + .menuitembottom{ margin-top:0px; margin-bottom:3px; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemmiddle{ margin-top:0px; margin-bottom:0px; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemtop{ margin-bottom:0px; + border-color:inherit; + border-top-width:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemtop *{ margin:2px 2px 0 2px; padding: 5px 10px 3px 5px; + border:transparent; } .menuitemmiddle *{ margin:0 2px 0 2px; padding: 3px 10px 3px 5px; + border:transparent; } .menuitembottom *{ margin:0 2px 2px 2px; @@ -61,12 +82,23 @@ background-color: #404040; } .menuitemtop:hover { background:@theme_bg_color; + border-color:inherit; + border-top-width:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemmiddle:hover { background:@theme_bg_color; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitembottom:hover { background:@theme_bg_color; + border-color:inherit; + border-bottom-width:0px; + border-left-width:inherit; + border-right-width:inherit; } .menuitemtop:hover* { @@ -91,14 +123,17 @@ background-color: #404040; .workingbg, #workingbg { background-color:@theme_base_color; } + .workingbg.view.cell:selected { background-color:@theme_selected_bg_color; } + .workingbg.view.cell:hover { background-color:darker(@theme_selected_bg_color); color:@theme_selected_text_color; border-radius:3px; } + .bkim { transition: 200ms ease-out; background-image: none; diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 107cc48..4c46be2 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -5,6 +5,10 @@ False + start + False + dialog-information-symbolic + False True @@ -24,7 +28,7 @@ 20 20 20 - dialog-question-symbolic + dialog-information-symbolic 6 @@ -39,13 +43,13 @@ False center start - 5 + 10 25 20 20 - You are not allowed to change theme on such low resolution! + Changing the theme is not available due to the small screen resolution! True - 0.019999999552965164 + 0 True @@ -83,13 +87,22 @@ True False - UBLinux Settings Manager + + + True + False + UBLinux Settings + + + + + True False 32 - dialog-question-symbolic + dialog-information-symbolic 5 @@ -123,15 +136,15 @@ - False + start + start + False 450 250 - dialog-question + dialog-question-symbolic True @@ -170,6 +183,7 @@ 10 5 Would you like to read documentation in the Web? + True 0 @@ -302,7 +316,16 @@ True False - UBLinux Settings + + + True + False + UBLinux Settings + + + + + True @@ -338,13 +361,10 @@ Documentation True - True @@ -370,6 +390,7 @@ + 1 5 @@ -381,6 +402,7 @@ False 440 250 + ru.ublinux.ubl-settings-manager True @@ -456,6 +478,7 @@ 64 True False + 32 com.ublinux.ubl-settings-manager @@ -541,9 +564,52 @@ 1 + + + True + False + 3 + 3 + + + True + False + center + 12 + 12 + Double click selection + 0.019999999552965164 + + + True + True + 0 + + + + + True + True + 10 + 10 + + + False + True + end + 1 + + + + + False + True + 2 + + - button + Section management True True True @@ -555,64 +621,76 @@ False True - 2 + 3 True False + vertical True False - 5 - 5 - 3 - 30 - True - - Close - 200 + True - True - True - 2 + False + 5 + 5 + 3 + 30 + True + + + Close + 200 + True + True + True + 2 + + + False + True + 0 + + + + + Apply + 200 + True + True + True + 2 + + + False + True + 1 + + - False + True True 0 - - - Save and apply - 200 - True - True - True - 2 - - - False - True - 1 - - - True + False True - 0 + 1 False True - 4 + 5 @@ -621,7 +699,16 @@ True False - UBLinux Settings + + + True + False + UBLinux Settings + + + + + True @@ -648,7 +735,7 @@ False 800 - 600 + 558 ubconfig-gui @@ -665,22 +752,69 @@ True False - vertical - + True False - center - 3 + start + slide-left + + + True + False + start + start + 3 + + + + + + False + True + 0 + + + + + True + False + vertical + + + action1 + True + True + False + True + right + + + + + + + True + True + 1 + + False True - 0 + 1 + + + + + False + True + 0 + + + + + True + False + vertical + + + action1 + True + True + False + True + True + right + + + + + + + True + True + 1 + + False True - 0 + 1 @@ -1450,6 +1622,16 @@ True False True + + + True + False + UBLinux Settings + + + + + True @@ -1491,9 +1673,6 @@ - False @@ -1581,6 +1760,7 @@ natural horizontal liststoreTemplate + 135 0 2 5 @@ -1601,7 +1781,7 @@ 0 word - 150 + 130 3 @@ -1706,7 +1886,7 @@ False 800 - 600 + 558 ubconfig-gui @@ -1848,10 +2028,13 @@ False True - + True False - UBLinux Settings Manager + UBLinux Settings + + + True @@ -1960,7 +2143,7 @@ False True center - ubl-settings-manager + com.ublinux.ubl-settings-manager dialog True UBLinux Settings Manager @@ -1971,7 +2154,7 @@ Project Home Page UBGroup UBGroup - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager gpl-2-0 @@ -1995,99 +2178,4 @@ - - False - - - True - False - vertical - - - True - False - - - True - False - start - 20 - 20 - 20 - 20 - True - dialog-question-symbolic - 6 - - - True - True - 0 - - - - - True - False - start - 10 - 15 - 20 - 20 - Looks like you don't have ubl-settings-info installed on your PC. - True - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - Ok - True - True - True - end - end - 5 - 5 - 5 - 5 - - - False - True - end - 1 - - - - - - - True - False - Warning - False - - - True - False - 32 - dialog-question-symbolic - - - - - diff --git a/ubl-settings-manager.pot b/ubl-settings-manager.pot index 0f94860..8678dcd 100644 --- a/ubl-settings-manager.pot +++ b/ubl-settings-manager.pot @@ -68,6 +68,10 @@ msgstr "" msgid "Save and apply" msgstr "" +#: source/ubl-settings-manager.c:1742 +msgid "Apply" +msgstr "" + #: source/ubl-settings-manager.c:1683 msgid "Always redirect" msgstr "" @@ -88,6 +92,10 @@ msgstr "" msgid "Sections management" msgstr "" +#: source/ubl-settings-manager.c:1748 +msgid "Double click selection" +msgstr "" + #: source/ubl-settings-manager.c:1792 msgid "Standard theme" msgstr "" @@ -126,3 +134,4 @@ msgstr "" msgid "Misc" msgstr "" + diff --git a/ubl-settings-manager_ru.po b/ubl-settings-manager_ru.po index 24c6e99..c648825 100644 --- a/ubl-settings-manager_ru.po +++ b/ubl-settings-manager_ru.po @@ -4,7 +4,7 @@ # UBLinux Team , 2022 # #, fuzzy -msgid "" +msgid "translation_info\n" msgstr "" "Project-Id-Version: ubl-settings-manager 1.0\n" "Report-Msgid-Bugs-To: info@ublinux.com\n" @@ -17,82 +17,90 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: source/ubl-settings-manager.c:724 +#: source/ubl-settings-manager.c:667 msgid "Settings manager for UBLinux" msgstr "Менеджер настроек для UBLinux" -#: source/ubl-settings-manager.c:725 source/ubl-settings-manager.c:1584 -#: source/ubl-settings-manager.c:1598 source/ubl-settings-manager.c:1657 +#: source/ubl-settings-manager.c:668 source/ubl-settings-manager.c:1655 +#: source/ubl-settings-manager.c:1669 source/ubl-settings-manager.c:1733 msgid "UBLinux Settings Manager" msgstr "Настройки UBLinux" -#: source/ubl-settings-manager.c:728 +#: source/ubl-settings-manager.c:671 msgid "Project Home Page" msgstr "Домашняя страница проекта" -#: source/ubl-settings-manager.c:1583 +#: source/ubl-settings-manager.c:1654 msgid "Back to all settings" msgstr "Назад ко всем настройкам" -#: source/ubl-settings-manager.c:1658 +#: source/ubl-settings-manager.c:1734 msgid "Icon size" msgstr "Размер иконок" -#: source/ubl-settings-manager.c:1659 +#: source/ubl-settings-manager.c:1735 msgid "Window theme" msgstr "Выбор темы" -#: source/ubl-settings-manager.c:1660 +#: source/ubl-settings-manager.c:1736 msgid "Would you like to read documentation in the Web?" -msgstr "Вы хотите прочитать документацию в Сети?" +msgstr "Вы хотите прочитать справку в Сети?" -#: source/ubl-settings-manager.c:1661 +#: source/ubl-settings-manager.c:1737 msgid "" "You will be redirected to documentation site, where user help pages are " "translated and supported by community." msgstr "Вы будете перенаправлены на сайт с документацией где страницы помощи переводятся и поддерживаются сообществом." -#: source/ubl-settings-manager.c:1662 +#: source/ubl-settings-manager.c:1738 msgid "Read online" msgstr "Прочитать онлайн" -#: source/ubl-settings-manager.c:1663 +#: source/ubl-settings-manager.c:1739 msgid "Cancel" msgstr "Отменить" -#: source/ubl-settings-manager.c:1664 +#: source/ubl-settings-manager.c:1740 msgid "Close" msgstr "Закрыть" -#: source/ubl-settings-manager.c:1665 +#: source/ubl-settings-manager.c:1741 msgid "Save and apply" msgstr "Сохранить и применить" -#: source/ubl-settings-manager.c:1666 +#: source/ubl-settings-manager.c:1742 +msgid "Apply" +msgstr "Применить" + +#: source/ubl-settings-manager.c:1743 msgid "Always redirect" msgstr "Всегда перенаправлять" -#: source/ubl-settings-manager.c:1667 +#: source/ubl-settings-manager.c:1744 msgid "Settings" msgstr "Настройки" -#: source/ubl-settings-manager.c:1668 +#: source/ubl-settings-manager.c:1745 msgid "About..." msgstr "О программе" -#: source/ubl-settings-manager.c:1669 +#: source/ubl-settings-manager.c:1746 msgid "Understood" msgstr "Понятно" -#: source/ubl-settings-manager.c:1670 +#: source/ubl-settings-manager.c:1747 msgid "Sections management" msgstr "Настройка разделов" -#: source/ubl-settings-manager.c:1768 +#: source/ubl-settings-manager.c:1748 +msgid "Double click selection" +msgstr "Открывать приложения двойным нажатием" + +#: source/ubl-settings-manager.c:1853 msgid "Standard theme" msgstr "Стандартная тема" -#: source/ubl-settings-manager.c:1769 +#: source/ubl-settings-manager.c:1854 msgid "GNOME theme" msgstr "GNOME тема" @@ -100,11 +108,11 @@ msgstr "GNOME тема" msgid "Version: " msgstr "Версия: " -#: source/ubl-settings-manager.h:8 +#: source/ubl-settings-manager.h:9 msgid "ubl-settings-manager version: " msgstr "ubl-settings-manager версия: " -#: source/ubl-settings-manager.h:8 +#: source/ubl-settings-manager.h:9 msgid "" "\n" "GTK settings manager for UBLinux\n" @@ -122,6 +130,7 @@ msgstr "" " -V, --version\t \t Показать версию пакета\n" " --lock-settings \t Заблокировать окно настроек\n" + msgid "Personal" msgstr "Личные"