Browse Source

Change app-id to me.gapixels.Megapixels

Martijn Braam 1 year ago
parent
commit
8ca9028d45

+ 1 - 1
CMakeLists.txt

@@ -56,7 +56,7 @@ ADD_DEFINITIONS(
 
 find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
 set(GRESOURCE_C   megapixels.gresource.c)
-set(GRESOURCE_XML data/org.postmarketos.Megapixels.gresource.xml)
+set(GRESOURCE_XML data/me.gapixels.Megapixels.gresource.xml)
 
 add_custom_command(
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}

+ 1 - 1
data/org.postmarketos.Megapixels.desktop → data/me.gapixels.Megapixels.desktop

@@ -4,7 +4,7 @@ Exec=megapixels
 Terminal=false
 Type=Application
 Categories=GTK;Photography;Graphics;
-Icon=org.postmarketos.Megapixels
+Icon=me.gapixels.Megapixels
 X-Purism-FormFactor=Workstation;Mobile;
 X-Phosh-UsesFeedback=true
 StartupNotify=true

+ 0 - 0
data/org.postmarketos.Megapixels.gresource.xml → data/me.gapixels.Megapixels.gresource.xml


+ 1 - 1
data/org.postmarketos.Megapixels.gschema.xml → data/me.gapixels.Megapixels.gschema.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <schemalist>
-  <schema path="/org/postmarketos/megapixels/" id="org.postmarketos.Megapixels">
+  <schema path="/me/gapixels/megapixels/" id="me.gapixels.Megapixels">
     <key name="save-raw" type='b'>
       <default>true</default>
       <summary>Don't throw away the .dng file after post processing</summary>

+ 2 - 2
data/org.postmarketos.Megapixels.metainfo.xml → data/me.gapixels.Megapixels.metainfo.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Copyright 2020 Martijn Braam -->
 <component type="desktop-application">
-	<id>org.postmarketos.Megapixels</id>
+	<id>me.gapixels.Megapixels</id>
 	<metadata_license>CC0-1.0</metadata_license>
 	<project_license>GPL-3.0</project_license>
 	<name>Megapixels</name>
@@ -14,7 +14,7 @@
 			quality pictures.
 		</p>
 	</description>
-	<launchable type="desktop-id">org.postmarketos.Megapixels.desktop</launchable>
+	<launchable type="desktop-id">me.gapixels.Megapixels.desktop</launchable>
 	<provides>
 		<binary>megapixels</binary>
 	</provides>

+ 0 - 0
data/org.postmarketos.Megapixels.svg → data/me.gapixels.Megapixels.svg


+ 5 - 5
data/meson.build

@@ -1,20 +1,20 @@
 resources = gnome.compile_resources('megapixels-resources',
-  'org.postmarketos.Megapixels.gresource.xml')
+  'me.gapixels.Megapixels.gresource.xml')
 
-install_data(['org.postmarketos.Megapixels.desktop'],
+install_data(['me.gapixels.Megapixels.desktop'],
   install_dir: get_option('datadir') / 'applications')
 
-install_data(['org.postmarketos.Megapixels.metainfo.xml'],
+install_data(['me.gapixels.Megapixels.metainfo.xml'],
   install_dir: get_option('datadir') / 'metainfo')
 
-install_data('org.postmarketos.Megapixels.svg',
+install_data('me.gapixels.Megapixels.svg',
   install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps'))
 
 install_data(['postprocess.sh'],
   install_dir: get_option('datadir') / 'megapixels/',
   install_mode: 'rwxr-xr-x')
 
-settings_schemas = ['org.postmarketos.Megapixels.gschema.xml']
+settings_schemas = ['me.gapixels.Megapixels.gschema.xml']
 schemas_dir = get_option('datadir') / 'glib-2.0' / 'schemas'
 install_data(settings_schemas, install_dir: schemas_dir)
 gnome.compile_schemas(depend_files: files(settings_schemas))

+ 2 - 4
src/main.c

@@ -44,8 +44,6 @@
 RENDERDOC_API_1_1_2 *rdoc_api = NULL;
 #endif
 
-#define APP_ID "org.postmarketos.Megapixels"
-
 mp_state_main state;
 
 static MPProcessPipelineBuffer *current_preview_buffer = NULL;
@@ -576,7 +574,7 @@ run_about_action(GSimpleAction *action, GVariant *param, GApplication *app)
                               "title",
                               "Megapixels",
                               "logo-icon-name",
-                              "org.postmarketos.Megapixels",
+                              "me.gapixels.Megapixels",
                               "comments",
                               "The postmarketOS camera application",
                               "website",
@@ -1234,7 +1232,7 @@ activate(GtkApplication *app, gpointer data)
         gtk_application_set_accels_for_action(app, "app.quit", quit_accels);
 
         // Setup settings
-        settings = g_settings_new("org.postmarketos.Megapixels");
+        settings = g_settings_new(APP_ID);
         char *setting_postproc = g_settings_get_string(settings, "postprocessor");
 
         // Initialize the postprocessing gsetting to the old processor if

+ 2 - 0
src/main.h

@@ -5,6 +5,8 @@
 #include "state.h"
 #include "zbar_pipeline.h"
 
+#define APP_ID "me.gapixels.Megapixels"
+
 struct mp_main_state {
         const struct mp_camera_config *camera;
         libmegapixels_mode *mode;

+ 7 - 4
src/process_pipeline.c

@@ -150,7 +150,7 @@ static void
 setup(MPPipeline *pipeline, const void *data)
 {
         libdng_init();
-        settings = g_settings_new("org.postmarketos.Megapixels");
+        settings = g_settings_new(APP_ID);
 }
 
 void
@@ -508,9 +508,12 @@ process_image_for_capture(const uint8_t *image, int count)
 
         libdng_set_datetime_now(&dng);
         libdng_set_mode_from_pixfmt(&dng, state_proc.mode->v4l_pixfmt);
-        libdng_set_make_model(&dng,
-                              state_proc.configuration->make,
-                              state_proc.configuration->model);
+        if (state_proc.configuration->make != NULL &&
+            state_proc.configuration->model != NULL) {
+                libdng_set_make_model(&dng,
+                                      state_proc.configuration->make,
+                                      state_proc.configuration->model);
+        }
         libdng_set_orientation(&dng, orientation);
         libdng_set_software(&dng, "Megapixels");
         libdng_set_neutral(&dng, state_proc.red, 1.0f, state_proc.blue);