Commit 9f7f5a68 authored by Christopher Davis's avatar Christopher Davis 🌱
Browse files

weather: Unify App ID

The app ID was a mix of `org.gnome.Weather` and `org.gnome.Weather.Application` used differently in different
spots.

This simplifies it to only using `org.gnome.Weather`
parent 6e5770c5
......@@ -8,8 +8,8 @@ data_conf.set('DATA_DIR', DATA_DIR)
message('Compiling resources')
gnome.compile_resources(
application_id_stable + '.Application.data',
application_id_stable + '.Application.data.gresource.xml',
application_id_stable + '.data',
application_id_stable + '.data.gresource.xml',
gresource_bundle: true,
source_dir: '.',
install_dir: DATA_DIR,
......@@ -27,7 +27,7 @@ gnome.compile_resources(
# Installing the schema file
install_data(
application_id_stable + '.Application.gschema.xml',
application_id_stable + '.gschema.xml',
install_dir: 'share/glib-2.0/schemas'
)
......@@ -38,11 +38,11 @@ desktop_conf.set('APP_ID', application_id)
desktop = custom_target(
'desktop-file',
input: configure_file(
input: '@0@.Application.desktop.in.in'.format(application_id_stable),
output: '@0@.Application.desktop.in'.format(application_id_stable),
input: '@0@.desktop.in.in'.format(application_id_stable),
output: '@0@.desktop.in'.format(application_id_stable),
configuration: desktop_conf,
),
output: '@0@.Application.desktop'.format(application_id),
output: '@0@.desktop'.format(application_id),
install: true,
install_dir: join_paths(get_option('datadir'), 'applications'),
command: [msgfmt, '--desktop',
......@@ -58,7 +58,7 @@ if desktop_file_validate.found()
test (
'Validate desktop file',
desktop_file_validate,
args: join_paths(meson.current_build_dir(), application_id + '.Application.desktop')
args: join_paths(meson.current_build_dir(), application_id + '.desktop')
)
endif
......@@ -75,8 +75,8 @@ appdata = i18n.merge_file(
configure_file(
input: application_id_stable + '.Application.service.in',
output: application_id + '.Application.service',
input: application_id_stable + '.service.in',
output: application_id + '.service',
configuration: data_conf,
install: true,
install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services')
......@@ -92,7 +92,7 @@ configure_file(
# Search Provider
install_data(
application_id_stable + '.Application.search-provider.ini',
application_id_stable + '.search-provider.ini',
install_dir: 'share/gnome-shell/search-providers'
)
......
[D-BUS Service]
Name=@APP_ID@.Application
Exec=@DATA_DIR@/@APP_ID@.Application --gapplication-service
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Giovanni Campagna -->
<component type="desktop">
<id>org.gnome.Weather.Application.desktop</id>
<id>org.gnome.Weather</id>
<name>Weather</name>
<summary>Show weather conditions and forecast</summary>
<metadata_license>CC0-1.0</metadata_license>
......@@ -41,4 +41,7 @@
<url type="bugtracker">https://gitlab.gnome.org/GNOME/gnome-weather/issues</url>
<updatecontact>gcampagna_at_src.gnome.org</updatecontact>
<translation type="gettext">org.gnome.Weather</translation>
<provides>
<id>org.gnome.Weather.Application.desktop</id>
</provides>
</component>
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/Weather/Application">
<gresource prefix="/org/gnome/Weather">
<file preprocess="xml-stripblanks">city.ui</file>
<file preprocess="xml-stripblanks">places-popover.ui</file>
<file preprocess="xml-stripblanks">primary-menu.ui</file>
......
......@@ -4,7 +4,7 @@ Name=Weather
Comment=Show weather conditions and forecast
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@APP_ID@
Exec=gapplication launch @APP_ID@.Application
Exec=gapplication launch @APP_ID@
DBusActivatable=true
StartupNotify=true
Categories=GNOME;GTK;Utility;Core;
......
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="org.gnome.Weather">
<schema id="org.gnome.Weather.Application" path="/org/gnome/Weather/Application/">
<schema id="org.gnome.Weather" path="/org/gnome/Weather/">
<key name="locations" type="av">
<default>[]</default>
<summary>Configured cities to show weather for</summary>
......
[Shell Search Provider]
DesktopId=org.gnome.Weather.Application.desktop
DesktopId=org.gnome.Weather.desktop
BusName=org.gnome.Weather.BackgroundService
ObjectPath=/org/gnome/Weather/BackgroundService
Version=2
......
[D-BUS Service]
Name=@APP_ID@
Exec=@DATA_DIR@/@APP_ID@ --gapplication-service
......@@ -2,8 +2,8 @@
# Please keep this file sorted alphabetically.
data/city.ui
data/org.gnome.Weather.appdata.xml.in
data/org.gnome.Weather.Application.desktop.in.in
data/org.gnome.Weather.Application.gschema.xml
data/org.gnome.Weather.desktop.in.in
data/org.gnome.Weather.gschema.xml
data/places-popover.ui
data/primary-menu.ui
data/weather-widget.ui
......
......@@ -34,7 +34,7 @@ const SCROLLING_ANIMATION_TIME = 400000; //us
var WeatherWidget = new Lang.Class({
Name: 'WeatherWidget',
Extends: Gtk.Frame,
Template: 'resource:///org/gnome/Weather/Application/weather-widget.ui',
Template: 'resource:///org/gnome/Weather/weather-widget.ui',
InternalChildren: ['contentFrame', 'outerGrid', 'conditionsImage',
'temperatureLabel', 'conditionsLabel',
'timeLabel', 'timeGrid', 'forecastStack',
......@@ -204,7 +204,7 @@ var WeatherWidget = new Lang.Class({
var WeatherView = new Lang.Class({
Name: 'WeatherView',
Extends: Gtk.Stack,
Template: 'resource:///org/gnome/Weather/Application/city.ui',
Template: 'resource:///org/gnome/Weather/city.ui',
InternalChildren: ['spinner'],
_init: function(params) {
......
......@@ -34,7 +34,7 @@ var CurrentLocationController = class CurrentLocationController {
constructor(world) {
this._world = world;
this._processStarted = false;
this._settings = Util.getSettings('org.gnome.Weather.Application');
this._settings = Util.getSettings('org.gnome.Weather');
let autoLocation = this._settings.get_value('automatic-location').deep_unpack();
this._syncAutoLocation(autoLocation);
if (this.autoLocation == AutoLocation.ENABLED)
......
......@@ -80,7 +80,7 @@ const Application = new Lang.Class({
// ensure the type before we call to GtkBuilder
GWeather.LocationEntry;
Util.loadStyleSheet('/org/gnome/Weather/Application/application.css');
Util.loadStyleSheet('/org/gnome/Weather/application.css');
let settings = Gtk.Settings.get_for_screen(Gdk.Screen.get_default());
settings.gtk_application_prefer_dark_theme = true;
......
......@@ -53,8 +53,8 @@ var MainWindow = new Lang.Class({
activate: this.update }]);
let builder = new Gtk.Builder();
builder.add_from_resource('/org/gnome/Weather/Application/window.ui');
builder.add_from_resource('/org/gnome/Weather/Application/primary-menu.ui');
builder.add_from_resource('/org/gnome/Weather/window.ui');
builder.add_from_resource('/org/gnome/Weather/primary-menu.ui');
let grid = builder.get_object('main-panel');
this._header = builder.get_object('header-bar');
......
......@@ -39,7 +39,7 @@ var WorldContentView = new Lang.Class({
this.get_accessible().accessible_name = _("World view");
let builder = new Gtk.Builder();
builder.add_from_resource('/org/gnome/Weather/Application/places-popover.ui');
builder.add_from_resource('/org/gnome/Weather/places-popover.ui');
let grid = builder.get_object('popover-grid');
this.add(grid);
......
......@@ -6,8 +6,8 @@ source_conf.set('libdir', EXTENSION_DIR)
source_conf.set('prefix', prefix)
application = configure_file(
input: application_id_stable + '.Application.in',
output: application_id + '.Application',
input: application_id_stable + '.in',
output: application_id,
configuration: source_conf,
install: true,
install_dir: DATA_DIR
......@@ -22,8 +22,8 @@ configure_file(
)
application_sources = gnome.compile_resources(
application_id_stable + '.Application.src',
application_id_stable + '.Application.src.gresource.xml',
application_id_stable + '.src',
application_id_stable + '.src.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: DATA_DIR
......
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/Weather/Application/js">
<gresource prefix="/org/gnome/Weather/js">
<file>app/city.js</file>
<file>app/currentLocationController.js</file>
<file>app/forecast.js</file>
......
......@@ -202,8 +202,8 @@ var SearchProvider = class WeatherSearchProvider {
else
wrappedParam = [];
Gio.DBus.session.call('org.gnome.Weather.Application',
'/org/gnome/Weather/Application',
Gio.DBus.session.call('org.gnome.Weather',
'/org/gnome/Weather',
'org.freedesktop.Application',
'ActivateAction',
new GLib.Variant('(sava{sv})', [action, wrappedParam,
......
......@@ -41,7 +41,7 @@ var WorldModel = new Lang.Class({
this._world = world;
this._settings = Util.getSettings('org.gnome.Weather.Application');
this._settings = Util.getSettings('org.gnome.Weather');
this._providers = Util.getEnabledProviders();
this._loadingCount = 0;
......
......@@ -14,7 +14,7 @@ from dogtail.procedural import *
import os, sys
import subprocess
APPLICATION_ID = "org.gnome.Weather.Application"
APPLICATION_ID = "org.gnome.Weather"
_bus = None
......@@ -71,7 +71,7 @@ def reset_settings():
def init():
global settings, _previous_locations
settings = Gio.Settings("org.gnome.Weather.Application")
settings = Gio.Settings("org.gnome.Weather")
_previous_locations = settings.get_value("locations")
reset_settings()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment