From 6c1fd2b1209357e46d26e011439a289090a23736 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sat, 18 Feb 2023 20:58:37 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cachyos-welcome.gresource.xml | 5 +++++ data/img/facebook.png | Bin 913 -> 0 bytes data/pages/da/readme | 4 ---- data/pages/en/readme | 4 ---- data/pages/es/readme | 4 ---- data/pages/it/readme | 4 ---- data/pages/nl/readme | 4 ---- data/pages/pl/readme | 4 ---- data/pages/pt-BR/readme | 4 ---- data/pages/pt-PT/readme | 4 ---- data/pages/zh-CN/readme | 4 ---- data/preferences.json | 3 --- postinstall.sh | 2 ++ src/application_browser.rs | 2 -- src/main.rs | 15 ++++++++------- 15 files changed, 15 insertions(+), 48 deletions(-) delete mode 100644 data/img/facebook.png diff --git a/cachyos-welcome.gresource.xml b/cachyos-welcome.gresource.xml index 18c1508..095b349 100644 --- a/cachyos-welcome.gresource.xml +++ b/cachyos-welcome.gresource.xml @@ -3,5 +3,10 @@ ui/cachyos-hello.glade ui/style.css + data/img/external-link.png + data/img/discord.png + data/img/reddit.png + data/img/telegram.png + data/img/twitter.png diff --git a/data/img/facebook.png b/data/img/facebook.png deleted file mode 100644 index 456f138b0f48b63c54ced2d000440dc413151b94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 913 zcmV;C18)3@P)P000>X1^@s6#OZ}&00009a7bBm0000* z0000*0XY6PI{*Lx8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H110G34 zK~zYIt&`nr+hr8TKj+CWOWGyBzA~GN4qP3R!SJOk!%nS6!3#$xDC|ZrhUitnQP{;U zwu~XP7EzE2?#4gCiE|7@aTmJT;2Y}jWi8UOHc8*I?6)*slIM6)W7C*4vD^3Vch2{m z&-0w$bA(OQGo%48l!(Zj(@C!P=VmjeJq z2pNOj=$1z!IqxWd=^4_1s-CO|XxlE!uO9I4ujeb5s-Ef@(tzWIGEuD5eWru^oZo>1 zWucXiF6SpMUd?x`=J926y1PnQ_pR-jr=7J$tADBoclb6e+r(eR_=!()Pt~ha%b*dF z$Lb?sn{VUyA1SMi)FIMqK<{nHymfUuKzpt1%a8iwk3Znc0u1bSHtfQ)dz|KXUkY9V zSjr-2F65r9(WcV@($rYMH=gjX?v41W&b`Z({YQHJ0Hm|}^O*}ZZ?b3v=4z%J)O6aW zYvmM88VgtM6!Ob;Yis31_(r;qXAWE8<7$S^kSw+YB@1xsh2Z3Kdwc_>+~>a)zdC(B zw+kS3)3)7QB~-14Dud2!I{aBzn>P)5f2Co;(~bpCI{=ayI|b|SIGM3BxnS?x^opu8 zoz3n=!&%9z+IKcJZ(VQy8k5@wAldAGfO7dR1LBFa`yqe=DjN zejNg&##$$R)r^RV%CpzULO&L*_5pC83^$w}AQJ{^rQMR-8 n?`A>AMdXXQW%qn({?+t14Vo?|3+qy$00000NkvXXu0mjfOzydX diff --git a/data/pages/da/readme b/data/pages/da/readme index 6936947..165edce 100644 --- a/data/pages/da/readme +++ b/data/pages/da/readme @@ -26,10 +26,6 @@ CachyOS-forummet er opdelt i underfora til forskellige emner og miljøer, så op En anden mulighed er at deltage på Telegram. -Tilmeld dig på en mailingliste - -En tredje måde at få hjælp på er ved at sende spørgsmål via e-mail til en CachyOS-mailingliste (der er også mulighed for at søge efter tidligere diskussioner i historikken). Tilmeld dig blot den liste du ønsker og følge instruktionerne. Der er dedikerede lister til forskellige emner. Se selv. - Andre ressourcer - CachyOS Forum - Officiel CachyOS Forum (engelsk). diff --git a/data/pages/en/readme b/data/pages/en/readme index 32447d4..c5995b6 100644 --- a/data/pages/en/readme +++ b/data/pages/en/readme @@ -22,10 +22,6 @@ For specific help with CachyOS we have a dedicated online forum where you can se The CachyOS forum is divided into sub-forums for different topics and environments, please post your query in the appropriate place! -Sign up to a mailing list - -Another way to get help is to email questions to CachyOS mailing list (you can also search the history for past discussions). Simply sign up to the list you prefer and follow the instructions. There is a list dedicated to several topics, just take a look! - Other resources - AUR Repository - Extra software not in the regular repositories, built from source. diff --git a/data/pages/es/readme b/data/pages/es/readme index 1d77729..f7b67fa 100644 --- a/data/pages/es/readme +++ b/data/pages/es/readme @@ -26,10 +26,6 @@ The CachyOS forum is divided into sub-forums for different topics and environmen Another option is to join us on Telegram. -Sign up to a mailing list - -Another way to get help is to email questions to CachyOS mailing list (you can also search the history for past discussions). Simply sign up to the list you prefer and follow the instructions. There is a list dedicated to several topics, just take a look! - Other resources - AUR Repository - Extra software not in the regular repositories, built from source. diff --git a/data/pages/it/readme b/data/pages/it/readme index ea45a46..c516ad2 100644 --- a/data/pages/it/readme +++ b/data/pages/it/readme @@ -26,10 +26,6 @@ Il forum CachyOS è diviso in sotto-forum per diversi argomenti e ambienti, si p Un'altra opzione è quella di unirti a noi su Telegram. - Iscriviti a una mailing list - -Un altro modo per ottenere aiuto è inviare domande via e-mail alla mailing list di CachyOS (puoi anche cercare nella cronologia le discussioni passate). Iscriviti semplicemente all'elenco che preferisci e segui le istruzioni. C'è un elenco dedicato a diversi argomenti, basta dare un'occhiata! - Altre risorse - Repository AUR - Software aggiuntivo non presente nei normali repository, creato dal codice sorgente. diff --git a/data/pages/nl/readme b/data/pages/nl/readme index 30c2640..9e04823 100644 --- a/data/pages/nl/readme +++ b/data/pages/nl/readme @@ -26,10 +26,6 @@ De CachyOS forums zijn onderverdeeld in sub-forums naar gelang de diverse onderw Een andere optie is om je op Telegram. -Schrijf je in op onze mailing list - -Nog een andere optie om hulp te bekomen is je vragen te emailen naar de CachyOS mailing list (waar je ook kan zoeken naar bestaande oplossingen). Schrijf je gewoon in op de mailing list die je aanspreekt en volg de instructies. Er zijn mailing lists omtrent diverse onderwerpen, dus neem ze even door. - Anderen middelen - CachyOS Forum - Officiële support voor onze Nederlandstalige gemeenschap. diff --git a/data/pages/pl/readme b/data/pages/pl/readme index f993ed7..a25c073 100644 --- a/data/pages/pl/readme +++ b/data/pages/pl/readme @@ -28,10 +28,6 @@ Forum CachyOS jest podzielone na pod-fora dla różnych tematów i środowisk, p Inną opcją jest dołączenie do nas na Telegram. - Zarejestruj się na liście mailingowej - -Innym sposobem uzyskania pomocy jest wysłanie pytań e-mailem na listy mailingowe CachyOS (możesz również przeszukać historię pod kątem wcześniejszych dyskusji). Po prostu zarejestruj się na preferowaną listę i postępuj zgodnie z instrukcjami. Jest lista poświęcona kilku tematom, wystarczy spojrzeć! - Inne zasoby - Repozytorium AUR - Dodatkowe oprogramowanie, którego nie ma w zwykłych repozytoriach, zbudowane ze źródeł. diff --git a/data/pages/pt-BR/readme b/data/pages/pt-BR/readme index ca1364c..99e85f8 100644 --- a/data/pages/pt-BR/readme +++ b/data/pages/pt-BR/readme @@ -26,10 +26,6 @@ O Fórum CachyOS está dividido em sub-fóruns para diferentes tópicos e ambien Outra opção é juntar-se a nós no Telegram. -Inscreva-se em uma lista de discussão - -Outra maneira de obter ajuda é enviar e-mail perguntas para CachyOS mailing list (você também pode pesquisar o histórico de discussões anteriores). Simplesmente inscreva-se na lista que preferir e siga as instruções. Há uma lista dedicada a vários tópicos, basta dar uma olhada! - Outros recursos - AUR Repository - Software extra não disponível nos repositórios normais, construído a partir da fonte. diff --git a/data/pages/pt-PT/readme b/data/pages/pt-PT/readme index 8dcb970..c4e2257 100644 --- a/data/pages/pt-PT/readme +++ b/data/pages/pt-PT/readme @@ -26,10 +26,6 @@ O Fórum do CachyOS está dividido em sub-fóruns para diferentes tópicos e amb Outra opção é juntar-se a nós no Telegram. -Inscreva-se numa lista de discussão - -Outra forma de obter ajuda é enviar as perguntas por email, para o CachyOS mailing list (também pode pesquisar o histórico de discussões anteriores). Inscreva-se na lista que preferir e siga as instruções. Há listas dedicadas a diferentes tópicos; basta passar uma vista de olhos! - Outros recursos - AUR Repository - Software extra indisponível nos repositórios normais; compilado a partir da fonte. diff --git a/data/pages/zh-CN/readme b/data/pages/zh-CN/readme index 1d77729..f7b67fa 100644 --- a/data/pages/zh-CN/readme +++ b/data/pages/zh-CN/readme @@ -26,10 +26,6 @@ The CachyOS forum is divided into sub-forums for different topics and environmen Another option is to join us on Telegram. -Sign up to a mailing list - -Another way to get help is to email questions to CachyOS mailing list (you can also search the history for past discussions). Simply sign up to the list you prefer and follow the instructions. There is a list dedicated to several topics, just take a look! - Other resources - AUR Repository - Extra software not in the regular repositories, built from source. diff --git a/data/preferences.json b/data/preferences.json index 91ab0b2..61b82e3 100644 --- a/data/preferences.json +++ b/data/preferences.json @@ -5,11 +5,8 @@ "desktop_path": "/usr/share/applications/cachyos-hello.desktop", "installer_path": "/usr/bin/calamares", "live_path": "/run/archiso/bootmnt/arch", - "locale_path": "/usr/share/locale/", "logo_path": "/usr/share/icons/hicolor/scalable/apps/", "save_path": "~/.config/cachyos-hello.json", - "ui_path": "/usr/share/cachyos-hello/ui/cachyos-hello.glade", - "style_path": "/usr/share/cachyos-hello/ui/style.css", "urls": { "development": "https://github.com/cachyos", "software": "https://github.com/cachyos/cachyos-pkgbuilds", diff --git a/postinstall.sh b/postinstall.sh index ee2eb12..39bce8e 100755 --- a/postinstall.sh +++ b/postinstall.sh @@ -4,6 +4,8 @@ mkdir -p "${DESTDIR}/${MESON_INSTALL_PREFIX}/share/cachyos-hello/" cp -r "${MESON_SOURCE_ROOT}/src/scripts" "${DESTDIR}/${MESON_INSTALL_PREFIX}/share/cachyos-hello/" cp -r "${MESON_SOURCE_ROOT}/data" "${DESTDIR}/${MESON_INSTALL_PREFIX}/share/cachyos-hello/" +rm -rf "${DESTDIR}/${MESON_INSTALL_PREFIX}/share/cachyos-hello/data/img" + cd "${MESON_SOURCE_ROOT}/po" for lang in $(ls *.po); do lang=${lang::-3} diff --git a/src/application_browser.rs b/src/application_browser.rs index 21097b8..f7b4167 100644 --- a/src/application_browser.rs +++ b/src/application_browser.rs @@ -44,8 +44,6 @@ const ACTIVE: u32 = 4; const PACKAGE: u32 = 5; const INSTALLED: u32 = 6; -// static mut G_APP_BROWSER: Rc> = -// Rc::new(Mutex::new(ApplicationBrowser::new())); static mut G_APP_BROWSER: Lazy> = Lazy::new(|| { let mut app_browser = ApplicationBrowser::new(); app_browser.create_page(); diff --git a/src/main.rs b/src/main.rs index 75f0095..15026bd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,8 +28,9 @@ use serde_json::json; use std::{fs, str}; use subprocess::Exec; -static G_SAVE_JSON: Lazy> = Lazy::new(|| Mutex::new(json!(null))); +const RESPREFIX: &str = "/org/cachyos/hello"; +static G_SAVE_JSON: Lazy> = Lazy::new(|| Mutex::new(json!(null))); static mut G_HELLO_WINDOW: Option> = None; fn quick_message(message: &'static str) { @@ -155,7 +156,7 @@ fn build_ui(application: >k::Application) { // Import Css let provider = gtk::CssProvider::new(); - provider.load_from_resource("/org/cachyos/hello/ui/style.css"); + provider.load_from_resource(&format!("{RESPREFIX}/ui/style.css")); gtk::StyleContext::add_provider_for_screen( &gdk::Screen::default().expect("Error initializing gtk css provider."), &provider, @@ -163,7 +164,7 @@ fn build_ui(application: >k::Application) { ); // Init window - let builder: Builder = Builder::from_resource("/org/cachyos/hello/ui/cachyos-hello.glade"); + let builder: Builder = Builder::from_resource(&format!("{RESPREFIX}/ui/cachyos-hello.glade")); builder.connect_signals(|_builder, handler_name| { match handler_name { // handler_name as defined in the glade file => handler function as defined above @@ -204,9 +205,9 @@ fn build_ui(application: >k::Application) { let social_box: gtk::Box = builder.object("social").unwrap(); for btn in social_box.children() { let name = btn.widget_name(); - let icon_path = format!("{PKGDATADIR}/data/img/{name}.png"); + let icon_path = format!("{RESPREFIX}/data/img/{name}.png"); let image: gtk::Image = builder.object(name.as_str()).unwrap(); - image.set_from_file(Some(&icon_path)); + image.set_from_resource(Some(&icon_path)); } let homepage_grid: gtk::Grid = builder.object("homepage").unwrap(); @@ -220,9 +221,9 @@ fn build_ui(application: >k::Application) { if btn.image_position() != gtk::PositionType::Right { continue; } - let image_path = format!("{PKGDATADIR}/data/img/external-link.png"); + let image_path = format!("{RESPREFIX}/data/img/external-link.png"); let image = gtk::Image::new(); - image.set_from_file(Some(&image_path)); + image.set_from_resource(Some(&image_path)); image.set_margin_start(2); btn.set_image(Some(&image)); }