Skip to content

Commit

Permalink
change app_id from io.github.amit9838.weather to io.github.amit9838.m…
Browse files Browse the repository at this point in the history
…ousam
  • Loading branch information
amit9838 committed Feb 4, 2024
1 parent 2ebd587 commit 0e2a054
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 45 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 = 'io.github.amit9838.weather'
application_id = 'io.github.amit9838.mousam'

scalable_dir = join_paths('hicolor', 'scalable', 'apps')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>io.github.amit9838.weather.desktop</id>
<id>io.github.amit9838.mousam.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<name>Weather</name>
<summary>Beautiful and lightweight weather app</summary>
<summary>Beautiful and lightweight mousam app</summary>
<description>
<p>Current Weather conditions and forcasts.</p>
<p>Features:</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[Desktop Entry]
Name=Mousam
Exec=weather
Comment=Beautiful and lightweight weather app
Icon=io.github.amit9838.weather
Exec=mousam
Comment=Beautiful and lightweight mousam app
Icon=io.github.amit9838.mousam
Terminal=false
Type=Application
Categories=Application;Utility;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="weather">
<schema id="io.github.amit9838.weather" path="/io/github/amit9838/weather/">
<schemalist gettext-domain="mousam">
<schema id="io.github.amit9838.mousam" path="/io/github/amit9838/mousam/">

<key name="added-cities" type="as">
<default>['Delhi,India,28.6517178,77.2219388']</default>
Expand All @@ -19,7 +19,7 @@
</key>

<key name="launch-maximized" type="b">
<default>true</default>
<default>false</default>
<summary>Launch the app in maximized mode.</summary>
</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: 'io.github.amit9838.weather.desktop.in',
output: 'io.github.amit9838.weather.desktop',
input: 'io.github.amit9838.mousam.desktop.in',
output: 'io.github.amit9838.mousam.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
Expand All @@ -13,8 +13,8 @@ if desktop_utils.found()
endif

appstream_file = i18n.merge_file(
input: 'io.github.amit9838.weather.appdata.xml.in',
output: 'io.github.amit9838.weather.appdata.xml',
input: 'io.github.amit9838.mousam.appdata.xml.in',
output: 'io.github.amit9838.mousam.appdata.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata')
Expand All @@ -26,7 +26,7 @@ if appstream_util.found()
endif


install_data('io.github.amit9838.weather.gschema.xml',
install_data('io.github.amit9838.mousam.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas'),
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"app-id" : "io.github.amit9838.weather",
"app-id" : "io.github.amit9838.mousam",
"runtime" : "org.gnome.Platform",
"runtime-version" : "45",
"sdk" : "org.gnome.Sdk",
"command" : "weather",
"command" : "mousam",
"finish-args" : [
"--share=network",
"--share=ipc",
Expand All @@ -25,7 +25,7 @@
"modules" : [
"data/dependencies/python3-requests.json",
{
"name" : "weather",
"name" : "mousam",
"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('weather',
project('mousam',
version: '1.0.1',
meson_version: '>= 0.61.0',
default_options: [ 'warning_level=2', 'werror=false', ],
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('weather', preset: 'glib')
i18n.gettext('mousam', preset: 'glib')
2 changes: 1 addition & 1 deletion src/backendWeather.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Weather:

def __init__(self) -> None:
global settings, measurement_type, temperature_unit, wind_speed_unit
settings = Gio.Settings(schema_id="io.github.amit9838.weather")
settings = Gio.Settings(schema_id="io.github.amit9838.mousam")
measurement_type = settings.get_string("measure-type")
if measurement_type == "imperial":
temperature_unit = "fahrenheit"
Expand Down
2 changes: 1 addition & 1 deletion src/frontendCurrentCond.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def paint_ui(self):
)
self.attach(box_right, 1, 0, 1, 1)

self.settings = Gio.Settings(schema_id="io.github.amit9838.weather")
self.settings = Gio.Settings(schema_id="io.github.amit9838.mousam")
self.added_cities = self.settings.get_strv("added-cities")
self.selected_city = self.settings.get_string("selected-city")

Expand Down
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
gi.require_version('Adw', '1')

from gi.repository import Gtk, Gio,Adw,Gdk
from .weather import WeatherMainWindow
from .mousam import WeatherMainWindow
from .css import css

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

def __init__(self):
super().__init__(application_id='io.github.amit9838.weather',
super().__init__(application_id='io.github.amit9838.mousam',
flags=Gio.ApplicationFlags.DEFAULT_FLAGS)
self.create_action('quit', lambda *_: self.quit(), ['<primary>q'])
self.settings = Gio.Settings(schema_id="io.github.amit9838.weather")
self.settings = Gio.Settings(schema_id="io.github.amit9838.mousam")
self.main_window = None

def do_activate(self):
Expand Down
12 changes: 6 additions & 6 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, 'weather')
moduledir = join_paths(pkgdatadir, 'mousam')
gnome = import('gnome')

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

configure_file(
input: 'weather.in',
output: 'weather',
input: 'mousam.in',
output: 'mousam',
configuration: conf,
install: true,
install_dir: get_option('bindir'),
Expand All @@ -28,7 +28,7 @@ configure_file(

weather_sources = [
'main.py',
'weather.py',
'mousam.py',
'weatherData.py',
'Models.py',

Expand Down
2 changes: 1 addition & 1 deletion src/weather.gresource.xml → src/mousam.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="/io/github/amit9838/weather">
<gresource prefix="/io/github/amit9838/mousam">
<file>css/style.css</file>
</gresource>
</gresources>
Expand Down
10 changes: 5 additions & 5 deletions src/weather.in → src/mousam.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ localedir = '@localedir@'

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

if __name__ == '__main__':
import gi

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

from weather import main
from mousam import main
sys.exit(main.main(VERSION))
2 changes: 1 addition & 1 deletion src/weather.py → src/mousam.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, *args, **kwargs):

global application
self.main_window = application = self
self.settings = Gio.Settings(schema_id="io.github.amit9838.weather")
self.settings = Gio.Settings(schema_id="io.github.amit9838.mousam")
self.set_default_size(1220, 860)
self.set_title("")
# Adding a button into header
Expand Down
2 changes: 1 addition & 1 deletion src/units.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from gi.repository import Gio

def get_measurement_type():
settings = Gio.Settings.new("io.github.amit9838.weather")
settings = Gio.Settings.new("io.github.amit9838.mousam")
return settings.get_string("measure-type")
4 changes: 2 additions & 2 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def check_internet_connection():


def get_selected_city_coords():
settings = Gio.Settings.new("io.github.amit9838.weather")
settings = Gio.Settings.new("io.github.amit9838.mousam")
selected_city = int(str(settings.get_value("selected-city")))
added_cities = list(settings.get_value("added-cities"))
city_loc = added_cities[selected_city].split(",")
Expand All @@ -41,7 +41,7 @@ def convert_to_local_time(timestamp, timezone_stamp):


def get_cords():
settings = Gio.Settings(schema_id="io.github.amit9838.weather")
settings = Gio.Settings(schema_id="io.github.amit9838.mousam")
selected_city_ = settings.get_string("selected-city")
return [float(x) for x in selected_city_.split(",")]

Expand Down
2 changes: 1 addition & 1 deletion src/weatherData.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def classify_wind_speed_level(wind_speed):


def transform_visibility_data(unit, data):
settings = Gio.Settings(schema_id="io.github.amit9838.weather")
settings = Gio.Settings(schema_id="io.github.amit9838.mousam")
measurement_type = settings.get_string('measure-type')
dist_unit = "km"
dist = data/1000
Expand Down
2 changes: 1 addition & 1 deletion src/windowAbout.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def AboutWindow(parent,*args):
dialog = Adw.AboutWindow.new()
dialog.set_application_name("Weather")
dialog.set_application_icon("io.github.amit9838.weather")
dialog.set_application_icon("io.github.amit9838.mousam")
dialog.set_version("1.0.1")
dialog.set_developer_name("Amit Chaudhary")
dialog.set_license_type(Gtk.License(Gtk.License.GPL_3_0))
Expand Down
4 changes: 2 additions & 2 deletions src/windowPreferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw,Gio,GLib
from gi.repository import Gtk, Adw,GLib

from .units import get_measurement_type
from .utils import create_toast
Expand Down Expand Up @@ -56,7 +56,7 @@ def __init__(self, application, **kwargs):
# Launch the app in maximize mode
launch_maximized = Adw.ActionRow.new()
launch_maximized.set_activatable(True)
launch_maximized.set_title(_("Open Maximized"))
launch_maximized.set_title(_("Launch Maximized"))
launch_maximized.set_subtitle(_("Launch the weather app in maximized mode (Restart required)"))

self.g_switch_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,valign=Gtk.Align.CENTER)
Expand Down

0 comments on commit 0e2a054

Please sign in to comment.