Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename to align with COSMIC trademark policy #13

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cosmic-backups"
name = "stellarshot"
version = "0.1.0"
edition = "2021"
license = "GPL-3.0"
Expand Down
4 changes: 2 additions & 2 deletions i18n/en/cosmic_backups.ftl → i18n/en/stellarshot.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cosmic-backups = COSMIC Backups
app-title = COSMIC Backups
stellarshot = Stellarshot
app-title = stellarshot
welcome = Backup often! ✨

# Dialogs
Expand Down
12 changes: 6 additions & 6 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct App {
selected_repository: Option<Repository>,
app_themes: Vec<String>,
config_handler: Option<cosmic_config::Config>,
config: config::CosmicBackupsConfig,
config: config::StellarshotConfig,
context_page: ContextPage,
dialog_pages: VecDeque<DialogPage>,
dialog_text_input: widget::Id,
Expand Down Expand Up @@ -106,7 +106,7 @@ pub enum DialogPage {
#[derive(Clone, Debug)]
pub struct Flags {
pub config_handler: Option<cosmic_config::Config>,
pub config: config::CosmicBackupsConfig,
pub config: config::StellarshotConfig,
}

#[derive(Clone, Copy, Debug, Eq, PartialEq)]
Expand Down Expand Up @@ -144,7 +144,7 @@ impl App {

fn about(&self) -> Element<Message> {
let cosmic_theme::Spacing { space_xxs, .. } = cosmic::theme::active().cosmic().spacing;
let repository = "https://github.com/ahoneybun/cosmic-backups";
let repository = "https://github.com/ahoneybun/Stellarshot";
let hash = env!("VERGEN_GIT_SHA");
let short_hash: String = hash.chars().take(7).collect();
let date = env!("VERGEN_GIT_COMMIT_DATE");
Expand All @@ -155,7 +155,7 @@ impl App {
)[..],
))
.into(),
widget::text::title3(fl!("cosmic-backups")).into(),
widget::text::title3(fl!("stellarshot")).into(),
widget::button::link(repository)
.on_press(Message::LaunchUrl(repository.to_string()))
.padding(0)
Expand Down Expand Up @@ -216,7 +216,7 @@ impl Application for App {

type Message = Message;

const APP_ID: &'static str = "com.github.ahoneybun.CosmicExtBackups";
const APP_ID: &'static str = "com.github.ahoneybun.Stellarshot";

fn core(&self) -> &Core {
&self.core
Expand Down Expand Up @@ -319,7 +319,7 @@ impl Application for App {

if let Some(repository) = self.nav_model.data::<Repository>(entity) {
self.selected_repository = Some(repository.clone());
let window_title = format!("{} - {}", repository.name, fl!("cosmic-backups"));
let window_title = format!("{} - {}", repository.name, fl!("stellarshot"));
commands.push(self.set_window_title(window_title, self.main_window_id()));
}

Expand Down
10 changes: 5 additions & 5 deletions src/app/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ use serde::{Deserialize, Serialize};
pub const CONFIG_VERSION: u64 = 1;

#[derive(Clone, Default, Debug, Eq, PartialEq, Deserialize, Serialize, CosmicConfigEntry)]
pub struct CosmicBackupsConfig {
pub struct StellarshotConfig {
pub app_theme: AppTheme,
pub repositories: Vec<Repository>,
}

impl CosmicBackupsConfig {
impl StellarshotConfig {
pub fn config_handler() -> Option<Config> {
Config::new(App::APP_ID, CONFIG_VERSION).ok()
}

pub fn config() -> CosmicBackupsConfig {
pub fn config() -> StellarshotConfig {
match Self::config_handler() {
Some(config_handler) => {
CosmicBackupsConfig::get_entry(&config_handler).unwrap_or_else(|(errs, config)| {
StellarshotConfig::get_entry(&config_handler).unwrap_or_else(|(errs, config)| {
log::info!("errors loading config: {:?}", errs);
config
})
}
None => CosmicBackupsConfig::default(),
None => StellarshotConfig::default(),
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/app/settings.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Mutex;

use super::config::CosmicBackupsConfig;
use super::config::StellarshotConfig;
use super::icon_cache::{IconCache, ICON_CACHE};
use crate::app::Flags;
use cosmic::app::Settings;
Expand All @@ -15,7 +15,7 @@ pub fn init() -> (Settings, Flags) {
}

pub fn get_app_settings() -> Settings {
let config = CosmicBackupsConfig::config();
let config = StellarshotConfig::config();

let mut settings = Settings::default();
settings = settings.theme(config.app_theme.theme());
Expand All @@ -35,8 +35,8 @@ pub fn set_icon_cache() {

pub fn get_flags() -> Flags {
let (config_handler, config) = (
CosmicBackupsConfig::config_handler(),
CosmicBackupsConfig::config(),
StellarshotConfig::config_handler(),
StellarshotConfig::config(),
);

let flags = Flags {
Expand Down