diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e8e191..983502f 100644 --- a/CMakeLists.txt +++ b/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} diff --git a/data/org.postmarketos.Megapixels.desktop b/data/me.gapixels.Megapixels.desktop similarity index 85% rename from data/org.postmarketos.Megapixels.desktop rename to data/me.gapixels.Megapixels.desktop index 984d831..f8ebf70 100644 --- a/data/org.postmarketos.Megapixels.desktop +++ b/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 diff --git a/data/org.postmarketos.Megapixels.gresource.xml b/data/me.gapixels.Megapixels.gresource.xml similarity index 100% rename from data/org.postmarketos.Megapixels.gresource.xml rename to data/me.gapixels.Megapixels.gresource.xml diff --git a/data/org.postmarketos.Megapixels.gschema.xml b/data/me.gapixels.Megapixels.gschema.xml similarity index 91% rename from data/org.postmarketos.Megapixels.gschema.xml rename to data/me.gapixels.Megapixels.gschema.xml index a581bc9..d9c3f12 100644 --- a/data/org.postmarketos.Megapixels.gschema.xml +++ b/data/me.gapixels.Megapixels.gschema.xml @@ -1,7 +1,7 @@ - + true Don't throw away the .dng file after post processing diff --git a/data/org.postmarketos.Megapixels.metainfo.xml b/data/me.gapixels.Megapixels.metainfo.xml similarity index 98% rename from data/org.postmarketos.Megapixels.metainfo.xml rename to data/me.gapixels.Megapixels.metainfo.xml index cfc9aa3..9bd2a4e 100644 --- a/data/org.postmarketos.Megapixels.metainfo.xml +++ b/data/me.gapixels.Megapixels.metainfo.xml @@ -1,7 +1,7 @@ - org.postmarketos.Megapixels + me.gapixels.Megapixels CC0-1.0 GPL-3.0 Megapixels @@ -14,7 +14,7 @@ quality pictures.

- org.postmarketos.Megapixels.desktop + me.gapixels.Megapixels.desktop megapixels diff --git a/data/org.postmarketos.Megapixels.svg b/data/me.gapixels.Megapixels.svg similarity index 100% rename from data/org.postmarketos.Megapixels.svg rename to data/me.gapixels.Megapixels.svg diff --git a/data/meson.build b/data/meson.build index c16f78b..f4bf2a6 100644 --- a/data/meson.build +++ b/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)) diff --git a/src/main.c b/src/main.c index 4c26ce3..a38f0d8 100644 --- a/src/main.c +++ b/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 diff --git a/src/main.h b/src/main.h index f6730f6..b21ad56 100644 --- a/src/main.h +++ b/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; diff --git a/src/process_pipeline.c b/src/process_pipeline.c index d78e6fa..ec62b43 100644 --- a/src/process_pipeline.c +++ b/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);