Skip to content

Commit

Permalink
updated app name
Browse files Browse the repository at this point in the history
  • Loading branch information
mijorus committed May 24, 2023
1 parent 925741b commit 2395b92
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 58 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Boutique
# Gear lever

This project is no longer in development 😢, sorry for that...

___

<p align="center">
<img width="150" src="data/icons/hicolor/scalable/apps/it.mijorus.boutique.svg">
<img width="150" src="data/icons/hicolor/scalable/apps/it.mijorus.gearlever.svg">
</p>

<p align="center">
Expand Down Expand Up @@ -38,8 +38,8 @@ Thanks!

```sh
# builds the project
flatpak-builder build/ it.mijorus.boutique.json --user --force-clean
flatpak-builder build/ it.mijorus.gearlever.json --user --force-clean

# runs the project
flatpak-builder --run build/ it.mijorus.boutique.json boutique
flatpak-builder --run build/ it.mijorus.gearlever.json gearlever
```
2 changes: 1 addition & 1 deletion data/icons/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
application_id = 'it.mijorus.boutique'
application_id = 'it.mijorus.gearlever'

scalable_dir = join_paths('hicolor', 'scalable', 'apps')
install_data(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>it.mijorus.boutique.desktop</id>
<id>it.mijorus.gearlever.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Boutique
Exec=boutique %U
Icon=it.mijorus.boutique
Name=Gear lever
Exec=gearlever %U
Icon=it.mijorus.gearlever
Terminal=false
Type=Application
Categories=GTK;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="boutique">
<schema id="it.mijorus.boutique" path="/it/mijorus/boutique/">
<schemalist gettext-domain="gearlever">
<schema id="it.mijorus.gearlever" path="/it/mijorus/gearlever/">
<key name="appimages-default-folder" type="s">
<default>"~/AppImages"</default>
</key>
Expand Down
10 changes: 5 additions & 5 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
desktop_file = i18n.merge_file(
input: 'it.mijorus.boutique.desktop.in',
output: 'it.mijorus.boutique.desktop',
input: 'it.mijorus.gearlever.desktop.in',
output: 'it.mijorus.gearlever.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
Expand All @@ -15,8 +15,8 @@ if desktop_utils.found()
endif

appstream_file = i18n.merge_file(
input: 'it.mijorus.boutique.appdata.xml.in',
output: 'it.mijorus.boutique.appdata.xml',
input: 'it.mijorus.gearlever.appdata.xml.in',
output: 'it.mijorus.gearlever.appdata.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata')
Expand All @@ -29,7 +29,7 @@ if appstream_util.found()
)
endif

install_data('it.mijorus.boutique.gschema.xml',
install_data('it.mijorus.gearlever.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)

Expand Down
6 changes: 3 additions & 3 deletions it.mijorus.boutique.Devel.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"app-id" : "it.mijorus.boutique",
"app-id" : "it.mijorus.gearlever",
"runtime" : "org.gnome.Platform",
"runtime-version" : "43",
"sdk" : "org.gnome.Sdk",
"command" : "boutique",
"command" : "gearlever",
"finish-args" : [
"--share=ipc",
"--share=network",
Expand Down Expand Up @@ -34,7 +34,7 @@
"modules" : [
"./python3-requirements.json",
{
"name" : "boutique",
"name" : "gearlever",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('boutique',
project('gearlever',
version: '0.1.0',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
Expand Down
6 changes: 3 additions & 3 deletions po/POTFILES
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data/it.mijorus.boutique.desktop.in
data/it.mijorus.boutique.appdata.xml.in
data/it.mijorus.boutique.gschema.xml
data/it.mijorus.gearlever.desktop.in
data/it.mijorus.gearlever.appdata.xml.in
data/it.mijorus.gearlever.gschema.xml
src/window.ui
src/main.py
src/window.py
Expand Down
2 changes: 1 addition & 1 deletion po/meson.build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
i18n.gettext('boutique', preset: 'glib')
i18n.gettext('gearlever', preset: 'glib')
4 changes: 2 additions & 2 deletions src/AboutDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
class AboutDialog(Gtk.AboutDialog):
def __init__(self, parent, version):
Gtk.AboutDialog.__init__(self)
self.props.program_name = 'boutique'
self.props.program_name = 'gearlever'
self.props.version = version
self.props.authors = ['Lorenzo Paderi']
self.props.copyright = '2022 Lorenzo Paderi'
self.props.logo_icon_name = 'it.mijorus.boutique'
self.props.logo_icon_name = 'it.mijorus.gearlever'
self.props.modal = True
self.set_transient_for(parent)
10 changes: 5 additions & 5 deletions src/BoutiqueWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from gi.repository import Gtk, Adw, Gio, Gdk, GObject


class BoutiqueWindow(Gtk.ApplicationWindow):
class GearleverWindow(Gtk.ApplicationWindow):
def __init__(self, from_file=False, **kwargs):
super().__init__(**kwargs)
self.from_file = from_file
Expand All @@ -40,7 +40,7 @@ def __init__(self, from_file=False, **kwargs):
self.view_title_widget = Adw.ViewSwitcherTitle(stack=self.app_lists_stack)
self.left_button = Gtk.Button(icon_name='go-previous', visible=False)

menu_obj = Gtk.Builder.new_from_resource('/it/mijorus/boutique/gtk/main-menu.xml')
menu_obj = Gtk.Builder.new_from_resource('/it/mijorus/gearlever/gtk/main-menu.xml')
self.menu_button = Gtk.MenuButton(icon_name='open-menu', menu_model=menu_obj.get_object('primary_menu'))

self.titlebar.pack_start(self.left_button)
Expand All @@ -49,7 +49,7 @@ def __init__(self, from_file=False, **kwargs):
self.titlebar.set_title_widget(self.view_title_widget)
self.set_titlebar(self.titlebar)

self.set_title('Boutique')
self.set_title('Gear lever')
self.set_default_size(700, 700)

# Create the "stack" widget for the "installed apps" view
Expand Down Expand Up @@ -78,7 +78,7 @@ def __init__(self, from_file=False, **kwargs):
# change visible child of the container stack
self.container_stack.connect('notify::visible-child', self.on_container_stack_change)

builder = Gtk.Builder.new_from_resource('/it/mijorus/boutique/gtk/drag-drop.ui')
builder = Gtk.Builder.new_from_resource('/it/mijorus/gearlever/gtk/drag-drop.ui')
self.drag_drop_ui = builder.get_object('drag-drop')

self.drop_target_controller = Gtk.DropTarget.new(Gio.File, Gdk.DragAction.COPY)
Expand Down Expand Up @@ -117,7 +117,7 @@ def on_selected_local_file(self, file: Gio.File) -> bool:


utils.send_notification(
Gio.Notification.new('Unsupported file type: Boutique can\'t handle these types of files.')
Gio.Notification.new('Unsupported file type: Gear lever can\'t handle these types of files.')
)

return False
Expand Down
2 changes: 1 addition & 1 deletion src/boutique.gresource.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/it/mijorus/boutique">
<gresource prefix="/it/mijorus/gearlever">
<file>window.ui</file>
<file>gtk/main-menu.xml</file>
<file>gtk/drag-drop.ui</file>
Expand Down
12 changes: 6 additions & 6 deletions src/boutique.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!@PYTHON@

# boutique.in
# gearlever.in
#
# Copyright 2022 Lorenzo Paderi
#
Expand Down Expand Up @@ -29,16 +29,16 @@ localedir = '@localedir@'

sys.path.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL)
locale.bindtextdomain('boutique', localedir)
locale.textdomain('boutique')
gettext.install('boutique', localedir)
locale.bindtextdomain('gearlever', localedir)
locale.textdomain('gearlever')
gettext.install('gearlever', localedir)

if __name__ == '__main__':
import gi

from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'boutique.gresource'))
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'gearlever.gresource'))
resource._register()

from boutique import main
from gearlever import main
sys.exit(main.main(VERSION))
2 changes: 1 addition & 1 deletion src/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def send_notification(notification=Gio.Notification, tag=None):


def get_gsettings() -> Gio.Settings:
return Gio.Settings.new('it.mijorus.boutique')
return Gio.Settings.new('it.mijorus.gearlever')


def create_dict(*args: str):
Expand Down
16 changes: 8 additions & 8 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .lib.utils import log
from .providers.providers_list import appimage_provider
from .AboutDialog import AboutDialog
from .BoutiqueWindow import BoutiqueWindow
from .GearleverWindow import GearleverWindow
import sys
import gi
import logging
Expand All @@ -33,11 +33,11 @@

from gi.repository import Gtk, Gio, Adw, Gdk, GLib # noqa

class BoutiqueApplication(Adw.Application):
class GearleverApplication(Adw.Application):
"""The main application singleton class."""

def __init__(self, version):
super().__init__(application_id='it.mijorus.boutique', flags=Gio.ApplicationFlags.HANDLES_OPEN)
super().__init__(application_id='it.mijorus.gearlever', flags=Gio.ApplicationFlags.HANDLES_OPEN)
self.create_action('about', self.on_about_action)
self.create_action('preferences', self.on_preferences_action)
self.create_action('open_file', self.on_open_file_chooser)
Expand All @@ -50,7 +50,7 @@ def do_startup(self):
Adw.Application.do_startup(self)

css_provider = Gtk.CssProvider()
css_provider.load_from_resource('/it/mijorus/boutique/assets/style.css')
css_provider.load_from_resource('/it/mijorus/gearlever/assets/style.css')
Gtk.StyleContext.add_provider_for_display(Gdk.Display.get_default(), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)

def do_activate(self, from_file=False):
Expand All @@ -62,7 +62,7 @@ def do_activate(self, from_file=False):
self.win = self.props.active_window

if not self.win:
self.win = BoutiqueWindow(application=self, from_file=from_file)
self.win = GearleverWindow(application=self, from_file=from_file)

self.win.present()

Expand Down Expand Up @@ -101,7 +101,7 @@ def on_open_file_chooser(self, widget, _):
def on_open_file_chooser_reponse(widget, id):
selected_file = widget.get_file()

if selected_file and isinstance(self.props.active_window, BoutiqueWindow):
if selected_file and isinstance(self.props.active_window, GearleverWindow):
self.props.active_window.on_selected_local_file(selected_file)

self.file_chooser_dialog = Gtk.FileChooserNative(
Expand All @@ -124,7 +124,7 @@ def on_open_log_file(self, widget, _):
def main(version):
"""The application's entry point."""

log_file = GLib.get_user_cache_dir() + '/logs/boutique.log'
log_file = GLib.get_user_cache_dir() + '/logs/gearlever.log'

if not os.path.exists(GLib.get_user_cache_dir() + '/logs'):
os.makedirs(GLib.get_user_cache_dir() + '/logs')
Expand All @@ -141,7 +141,7 @@ def main(version):
with open(log_file, 'w+') as f:
f.write('')

app = BoutiqueApplication(version)
app = GearleverApplication(version)
logging.basicConfig(
filename=log_file,
filemode='a',
Expand Down
10 changes: 5 additions & 5 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
moduledir = join_paths(pkgdatadir, 'boutique')
moduledir = join_paths(pkgdatadir, 'gearlever')
gnome = import('gnome')

gnome.compile_resources('boutique',
'boutique.gresource.xml',
gnome.compile_resources('gearlever',
'gearlever.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
Expand All @@ -20,8 +20,8 @@ conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)

configure_file(
input: 'boutique.in',
output: 'boutique',
input: 'gearlever.in',
output: 'gearlever',
configuration: conf,
install: true,
install_dir: get_option('bindir')
Expand Down
8 changes: 4 additions & 4 deletions src/providers/AppImageProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, file_path: str, desktop_entry: Optional[DesktopEntry.DesktopE
class AppImageProvider():
def __init__(self):
self.name = 'appimage'
self.icon = "/it/mijorus/boutique/assets/App-image-logo.png"
self.icon = "/it/mijorus/gearlever/assets/App-image-logo.png"
logging.info(f'Activating {self.name} provider')

self.supported_mimes = ['application/vnd.appimage', 'application/x-iso9660-appimage']
Expand All @@ -56,7 +56,7 @@ def __init__(self):

self.modal_gfile: Optional[Gio.File] = None
self.modal_gfile_createshortcut_check: Optional[Gtk.CheckButton] = None
self.extraction_folder = GLib.get_tmp_dir() + '/it.mijorus.boutique/appimages'
self.extraction_folder = GLib.get_tmp_dir() + '/it.mijorus.gearlever/appimages'

def list_installed(self) -> List[AppImageListElement]:
default_folder_path = self.get_appimages_default_destination_path()
Expand Down Expand Up @@ -212,7 +212,7 @@ def install_file(self, el: AppImageListElement):
os.mkdir(f'{appimages_destination_path}')

# how the appimage will be called
safe_app_name = f'boutique_{dest_file_info.get_name()}'
safe_app_name = f'gearlever_{dest_file_info.get_name()}'
if extracted_appimage.desktop_entry:
safe_app_name = f'{terminal.sanitize(extracted_appimage.desktop_entry.getName())}_{dest_file_info.get_name()}'

Expand Down Expand Up @@ -353,7 +353,7 @@ def extract_appimage(self, el: AppImageListElement) -> ExtractedAppImage:

# hash file
md5_hash = get_file_hash(file)
temp_file = 'boutique_appimage_' + md5_hash
temp_file = 'gearlever_appimage_' + md5_hash
folder = Gio.File.new_for_path(f'{self.extraction_folder}/{temp_file}')

if folder.query_exists():
Expand Down
4 changes: 2 additions & 2 deletions src/window.ui
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="BoutiqueWindow" parent="GtkApplicationWindow">
<template class="BearleverWindow" parent="GtkApplicationWindow">
<property name="default-width">600</property>
<property name="default-height">300</property>
<child type="titlebar">
Expand Down Expand Up @@ -36,7 +36,7 @@
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About boutique</attribute>
<attribute name="label" translatable="yes">_About Gear lever</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
Expand Down

0 comments on commit 2395b92

Please sign in to comment.