aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Makefile.in6
-rw-r--r--aclocal.m4132
-rwxr-xr-xconfigure254
-rw-r--r--configure.ac8
-rw-r--r--data/Makefile.am16
-rw-r--r--data/Makefile.in80
-rw-r--r--data/camorama.schemas.in307
-rw-r--r--data/org.gnome.camorama.gschema.xml129
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/Makefile.in6
-rw-r--r--src/callbacks.c88
-rw-r--r--src/callbacks.h7
-rw-r--r--src/fileio.c8
-rw-r--r--src/interface.h51
-rw-r--r--src/main.c94
-rw-r--r--src/v4l.h3
17 files changed, 479 insertions, 714 deletions
diff --git a/.gitignore b/.gitignore
index 600dad6..8cac092 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,8 +7,9 @@ camorama.desktop
config.h
config.log
config.status
-data/camorama.schemas
data/Makefile
+data/org.gnome.camorama.gschema.valid
+data/org.gnome.camorama.gschema.xml
intltool-extract
intltool-merge
intltool-update
diff --git a/Makefile.in b/Makefile.in
index 216e466..7417b79 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -259,13 +259,12 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-GCONFTOOL = @GCONFTOOL@
-GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
-GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -335,6 +334,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
diff --git a/aclocal.m4 b/aclocal.m4
index eca63e5..0205649 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -988,51 +988,6 @@ AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
])dnl AX_REQUIRE_DEFINED
-dnl AM_GCONF_SOURCE_2
-dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
-dnl (i.e. pass to gconftool-2
-dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
-dnl you should install foo.schemas files
-dnl
-
-AC_DEFUN([AM_GCONF_SOURCE_2],
-[
- if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
- GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
- else
- GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
- fi
-
- AC_ARG_WITH([gconf-source],
- AC_HELP_STRING([--with-gconf-source=sourceaddress],
- [Config database for installing schema files.]),
- [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
-
- AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
- AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
-
- if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
- GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
- fi
-
- AC_ARG_WITH([gconf-schema-file-dir],
- AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
- [Directory for installing schema files.]),
- [GCONF_SCHEMA_FILE_DIR="$withval"],)
-
- AC_SUBST(GCONF_SCHEMA_FILE_DIR)
- AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
-
- AC_ARG_ENABLE(schemas-install,
- AC_HELP_STRING([--disable-schemas-install],
- [Disable the schemas installation]),
- [case ${enableval} in
- yes|no) ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
- esac])
- AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
-])
-
# gettext.m4 serial 68 (gettext-0.19.8)
dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -1454,6 +1409,93 @@ AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
+# Increment this whenever this file is changed.
+#serial 1
+
+dnl GLIB_GSETTINGS
+dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
+dnl the schema should be compiled
+dnl
+
+AC_DEFUN([GLIB_GSETTINGS],
+[
+ m4_pattern_allow([AM_V_GEN])
+ AC_ARG_ENABLE(schemas-compile,
+ AS_HELP_STRING([--disable-schemas-compile],
+ [Disable regeneration of gschemas.compiled on install]),
+ [case ${enableval} in
+ yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
+ no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
+ esac])
+ AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
+ PKG_PROG_PKG_CONFIG([0.16])
+ AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
+ if test x$cross_compiling != xyes; then
+ GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
+ else
+ AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
+ fi
+ AC_SUBST(GLIB_COMPILE_SCHEMAS)
+ if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
+ ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
+ else
+ ifelse([$1],,[:],[$1])
+ fi
+
+ GSETTINGS_RULES='
+.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
+
+mostlyclean-am: clean-gsettings-schemas
+
+gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
+
+%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
+ $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
+
+all-am: $(gsettings_SCHEMAS:.xml=.valid)
+uninstall-am: uninstall-gsettings-schemas
+install-data-am: install-gsettings-schemas
+
+.SECONDARY: $(gsettings_SCHEMAS)
+
+install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
+ @$(NORMAL_INSTALL)
+ if test -n "$^"; then \
+ test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
+ $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
+ test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
+ fi
+
+uninstall-gsettings-schemas:
+ @$(NORMAL_UNINSTALL)
+ @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
+ test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
+
+clean-gsettings-schemas:
+ rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
+
+ifdef gsettings_ENUM_NAMESPACE
+$(gsettings__enum_file): $(gsettings_ENUM_FILES)
+ $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
+endif
+'
+ _GSETTINGS_SUBST(GSETTINGS_RULES)
+])
+
+dnl _GSETTINGS_SUBST(VARIABLE)
+dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
+AC_DEFUN([_GSETTINGS_SUBST],
+[
+AC_SUBST([$1])
+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
+]
+)
+
# iconv.m4 serial 19 (gettext-0.18.2)
dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
diff --git a/configure b/configure
index 1cf18c9..204ed26 100755
--- a/configure
+++ b/configure
@@ -627,17 +627,16 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
-GCONF_SCHEMAS_INSTALL_FALSE
-GCONF_SCHEMAS_INSTALL_TRUE
-GCONF_SCHEMA_FILE_DIR
-GCONF_SCHEMA_CONFIG_SOURCE
-GCONFTOOL
CAMORAMA_UI
PACKAGE_LIBS
PACKAGE_CFLAGS
+GSETTINGS_RULES
+GLIB_COMPILE_SCHEMAS
+gsettingsschemadir
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
+GSETTINGS_DISABLE_SCHEMAS_COMPILE
WARN_SCANNERFLAGS
WARN_LDFLAGS
WARN_CFLAGS
@@ -767,9 +766,7 @@ enable_compile_warnings
enable_Werror
enable_gtk2
enable_gtk4
-with_gconf_source
-with_gconf_schema_file_dir
-enable_schemas_install
+enable_schemas_compile
'
ac_precious_vars='build_alias
host_alias
@@ -1416,8 +1413,8 @@ Optional Features:
--disable-Werror Unconditionally make all compiler warnings non-fatal
--enable-gtk2 Compile against GTK 2.x instead of GTK 3.x
--enable-gtk4 Compile against GTK 4.x
- --disable-schemas-install
- Disable the schemas installation
+ --disable-schemas-compile
+ Disable regeneration of gschemas.compiled on install
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1427,10 +1424,6 @@ Optional Packages:
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and libdir
- --with-gconf-source=sourceaddress
- Config database for installing schema files.
- --with-gconf-schema-file-dir=dir
- Directory for installing schema files.
Some influential environment variables:
CC C compiler command
@@ -9651,17 +9644,14 @@ else
fi
-pkg_modules="gdk-pixbuf-2.0 gconf-2.0"
-if test "x$enable_gtk4" = xyes; then
- pkg_modules="$pkg_modules gtk+-4.0 >= 3.92"
- CAMORAMA_UI="camorama-gtk4.ui"
-elif test "x$enable_gtk2" = xyes; then
- pkg_modules="$pkg_modules gtk+-2.0 >= 2.24"
- CAMORAMA_UI="camorama-gtk2.ui"
-else
- pkg_modules="$pkg_modules gtk+-3.0 >= 3.10 cairo"
- CAMORAMA_UI="camorama-gtk3.ui"
+ # Check whether --enable-schemas-compile was given.
+if test "${enable_schemas_compile+set}" = set; then :
+ enableval=$enable_schemas_compile; case ${enableval} in
+ yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
+ no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-schemas-compile" "$LINENO" 5 ;;
+ esac
fi
@@ -9671,6 +9661,7 @@ fi
+
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -9772,7 +9763,7 @@ fi
fi
if test -n "$PKG_CONFIG"; then
- _pkg_min_version=0.9.0
+ _pkg_min_version=0.16
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
@@ -9784,6 +9775,120 @@ $as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
+ gsettingsschemadir=${datadir}/glib-2.0/schemas
+
+ if test x$cross_compiling != xyes; then
+ GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
+ else
+ # Extract the first word of "glib-compile-schemas", so it can be a program name with args.
+set dummy glib-compile-schemas; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GLIB_COMPILE_SCHEMAS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GLIB_COMPILE_SCHEMAS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GLIB_COMPILE_SCHEMAS="$GLIB_COMPILE_SCHEMAS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GLIB_COMPILE_SCHEMAS="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GLIB_COMPILE_SCHEMAS=$ac_cv_path_GLIB_COMPILE_SCHEMAS
+if test -n "$GLIB_COMPILE_SCHEMAS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_SCHEMAS" >&5
+$as_echo "$GLIB_COMPILE_SCHEMAS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+
+ if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
+ as_fn_error $? "glib-compile-schemas not found." "$LINENO" 5
+ else
+ :
+ fi
+
+ GSETTINGS_RULES='
+.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
+
+mostlyclean-am: clean-gsettings-schemas
+
+gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
+
+%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
+ $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p $(@D) && touch $@
+
+all-am: $(gsettings_SCHEMAS:.xml=.valid)
+uninstall-am: uninstall-gsettings-schemas
+install-data-am: install-gsettings-schemas
+
+.SECONDARY: $(gsettings_SCHEMAS)
+
+install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
+ @$(NORMAL_INSTALL)
+ if test -n "$^"; then \
+ test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
+ $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
+ test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
+ fi
+
+uninstall-gsettings-schemas:
+ @$(NORMAL_UNINSTALL)
+ @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
+ test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
+
+clean-gsettings-schemas:
+ rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
+
+ifdef gsettings_ENUM_NAMESPACE
+$(gsettings__enum_file): $(gsettings_ENUM_FILES)
+ $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" $^ > $@.tmp && mv $@.tmp $@
+endif
+'
+
+
+
+
+
+
+
+pkg_modules="gdk-pixbuf-2.0"
+
+if test "x$enable_gtk4" = xyes; then
+ pkg_modules="$pkg_modules gtk+-4.0 >= 3.92"
+ CAMORAMA_UI="camorama-gtk4.ui"
+elif test "x$enable_gtk2" = xyes; then
+ pkg_modules="$pkg_modules gtk+-2.0 >= 2.24"
+ CAMORAMA_UI="camorama-gtk2.ui"
+else
+ pkg_modules="$pkg_modules gtk+-3.0 >= 3.10 cairo"
+ CAMORAMA_UI="camorama-gtk3.ui"
+fi
+
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGE" >&5
@@ -9882,99 +9987,7 @@ fi
$as_echo "#define HAVE_GCONF 1" >>confdefs.h
-# Extract the first word of "gconftool-2", so it can be a program name with args.
-set dummy gconftool-2; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GCONFTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $GCONFTOOL in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GCONFTOOL="$GCONFTOOL" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GCONFTOOL="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-GCONFTOOL=$ac_cv_path_GCONFTOOL
-if test -n "$GCONFTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONFTOOL" >&5
-$as_echo "$GCONFTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
- GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
- else
- GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
- fi
-
-
-# Check whether --with-gconf-source was given.
-if test "${with_gconf_source+set}" = set; then :
- withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval"
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5
-$as_echo "Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; }
-
- if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
- GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
- fi
-
-
-# Check whether --with-gconf-schema-file-dir was given.
-if test "${with_gconf_schema_file_dir+set}" = set; then :
- withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval"
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5
-$as_echo "Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; }
-
- # Check whether --enable-schemas-install was given.
-if test "${enable_schemas_install+set}" = set; then :
- enableval=$enable_schemas_install; case ${enableval} in
- yes|no) ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-schemas-install" "$LINENO" 5 ;;
- esac
-fi
-
- if test "$enable_schemas_install" != no; then
- GCONF_SCHEMAS_INSTALL_TRUE=
- GCONF_SCHEMAS_INSTALL_FALSE='#'
-else
- GCONF_SCHEMAS_INSTALL_TRUE='#'
- GCONF_SCHEMAS_INSTALL_FALSE=
-fi
-
-
-
-
-ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/camorama.schemas po/Makefile.in"
+ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile po/Makefile.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -10116,10 +10129,6 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then
- as_fn_error $? "conditional \"GCONF_SCHEMAS_INSTALL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -10725,7 +10734,6 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
- "data/camorama.schemas") CONFIG_FILES="$CONFIG_FILES data/camorama.schemas" ;;
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
diff --git a/configure.ac b/configure.ac
index 7dcfaa9..d0526c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,8 +38,9 @@ AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
AC_ARG_ENABLE(gtk2, [AC_HELP_STRING([--enable-gtk2], [Compile against GTK 2.x instead of GTK 3.x])], [enable_gtk2=$enableval], [enable_gtk2="no"])
AC_ARG_ENABLE(gtk4, [AC_HELP_STRING([--enable-gtk4], [Compile against GTK 4.x])], [enable_gtk4=$enableval], [enable_gtk4="no"])
+GLIB_GSETTINGS
-pkg_modules="gdk-pixbuf-2.0 gconf-2.0"
+pkg_modules="gdk-pixbuf-2.0"
if test "x$enable_gtk4" = xyes; then
pkg_modules="$pkg_modules gtk+-4.0 >= 3.92"
@@ -58,15 +59,10 @@ AC_SUBST(PACKAGE_LIBS)
AC_SUBST(CAMORAMA_UI)
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
-AM_GCONF_SOURCE_2
-
-
AC_OUTPUT([
Makefile
src/Makefile
data/Makefile
- data/camorama.schemas
po/Makefile.in
])
diff --git a/data/Makefile.am b/data/Makefile.am
index 271c637..c7052e2 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -11,9 +11,10 @@ stuff_DATA = \
gladedir = $(datadir)/camorama
glade_DATA= $(CAMORAMA_UI)
-schemadir = @GCONF_SCHEMA_FILE_DIR@
-schema_in_files = camorama.schemas.in
-schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+
+gsettings_SCHEMAS = org.gnome.camorama.gschema.xml
+
+@GSETTINGS_RULES@
# For the sake of some users
user-install: $(app_DATA) $(keys_DATA)
@@ -21,12 +22,5 @@ user-install: $(app_DATA) $(keys_DATA)
cp $(app_DATA) ~/.gnome/application-registry
cp $(keys_DATA) ~/.gnome/mime-info/
-install-data-local:
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
- $(GCONFTOOL) --shutdown
-
-EXTRA_DIST = $(glade_DATA) $(schema_in_files) $(stuff_DATA)
-
-CLEANFILES=\
- $(schema_DATA)
+EXTRA_DIST = $(glade_DATA) $(stuff_DATA)
diff --git a/data/Makefile.in b/data/Makefile.in
index b18e449..7347fdb 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -96,7 +96,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = camorama.schemas
+CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -144,12 +144,10 @@ am__uninstall_files_from_dir = { \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
-am__installdirs = "$(DESTDIR)$(gladedir)" "$(DESTDIR)$(schemadir)" \
- "$(DESTDIR)$(stuffdir)"
-DATA = $(glade_DATA) $(schema_DATA) $(stuff_DATA)
+am__installdirs = "$(DESTDIR)$(gladedir)" "$(DESTDIR)$(stuffdir)"
+DATA = $(glade_DATA) $(stuff_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/camorama.schemas.in \
- $(top_srcdir)/mkinstalldirs
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -173,13 +171,12 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-GCONFTOOL = @GCONFTOOL@
-GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
-GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -249,6 +246,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -289,13 +287,8 @@ stuff_DATA = \
gladedir = $(datadir)/camorama
glade_DATA = $(CAMORAMA_UI)
-schemadir = @GCONF_SCHEMA_FILE_DIR@
-schema_in_files = camorama.schemas.in
-schema_DATA = $(schema_in_files:.schemas.in=.schemas)
-EXTRA_DIST = $(glade_DATA) $(schema_in_files) $(stuff_DATA)
-CLEANFILES = \
- $(schema_DATA)
-
+gsettings_SCHEMAS = org.gnome.camorama.gschema.xml
+EXTRA_DIST = $(glade_DATA) $(stuff_DATA)
all: all-am
.SUFFIXES:
@@ -328,8 +321,6 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-camorama.schemas: $(top_builddir)/config.status $(srcdir)/camorama.schemas.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-gladeDATA: $(glade_DATA)
@$(NORMAL_INSTALL)
@list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \
@@ -351,27 +342,6 @@ uninstall-gladeDATA:
@list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(gladedir)'; $(am__uninstall_files_from_dir)
-install-schemaDATA: $(schema_DATA)
- @$(NORMAL_INSTALL)
- @list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(schemadir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(schemadir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemadir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(schemadir)" || exit $$?; \
- done
-
-uninstall-schemaDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(schemadir)'; $(am__uninstall_files_from_dir)
install-stuffDATA: $(stuff_DATA)
@$(NORMAL_INSTALL)
@list='$(stuff_DATA)'; test -n "$(stuffdir)" || list=; \
@@ -434,7 +404,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(gladedir)" "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(stuffdir)"; do \
+ for dir in "$(DESTDIR)$(gladedir)" "$(DESTDIR)$(stuffdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -459,7 +429,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -488,8 +457,7 @@ info: info-am
info-am:
-install-data-am: install-data-local install-gladeDATA \
- install-schemaDATA install-stuffDATA
+install-data-am: install-gladeDATA install-stuffDATA
install-dvi: install-dvi-am
@@ -533,37 +501,33 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-gladeDATA uninstall-schemaDATA \
- uninstall-stuffDATA
+uninstall-am: uninstall-gladeDATA uninstall-stuffDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
ctags-am distclean distclean-generic distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-data-local install-dvi install-dvi-am \
- install-exec install-exec-am install-gladeDATA install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-schemaDATA install-strip install-stuffDATA \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags-am uninstall uninstall-am \
- uninstall-gladeDATA uninstall-schemaDATA uninstall-stuffDATA
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-gladeDATA install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-stuffDATA installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-gladeDATA uninstall-stuffDATA
.PRECIOUS: Makefile
+@GSETTINGS_RULES@
+
# For the sake of some users
user-install: $(app_DATA) $(keys_DATA)
mkdir -p ~/.gnome/application-registry ~/.gnome/mime-info/
cp $(app_DATA) ~/.gnome/application-registry
cp $(keys_DATA) ~/.gnome/mime-info/
-install-data-local:
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
- $(GCONFTOOL) --shutdown
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/data/camorama.schemas.in b/data/camorama.schemas.in
deleted file mode 100644
index d248247..0000000
--- a/data/camorama.schemas.in
+++ /dev/null
@@ -1,307 +0,0 @@
-<gconfschemafile>
- <schemalist>
-
- <schema>
- <key>/schemas/apps/camorama/device</key>
- <applyto>/apps/camorama/device</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>/dev/video0</default>
- <locale name="C">
- <short>Video device</short>
- <long>The unix file system path to the device that's assigned to your camera.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/width</key>
- <applyto>/apps/camorama/width</applyto>
- <owner>camorama</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Image width</short>
- <long>Image width used by the camera. Zero means autoselect</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/height</key>
- <applyto>/apps/camorama/height</applyto>
- <owner>camorama</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Image height</short>
- <long>Image height used by the camera. Zero means autoselect</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/append_ts_to_file</key>
- <applyto>/apps/camorama/preferences/append_ts_to_file</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Append timestamp to filename</short>
- <long>Appends a timestamp, in UNIX time, to the ends of filenames</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/auto_capture</key>
- <applyto>/apps/camorama/preferences/auto_capture</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Toggles auto-capture</short>
- <long>Toggles automatic capturing of pictures.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/auto_capture_interval</key>
- <applyto>/apps/camorama/preferences/auto_capture_interval</applyto>
- <owner>camorama</owner>
- <type>int</type>
- <default>1200000</default>
- <locale name="C">
- <short>Interval for auto-capture</short>
- <long>Specifies the interval for automatic capture of pictures.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/drawdate</key>
- <applyto>/apps/camorama/preferences/drawdate</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Toggles the datestamp in captures</short>
- <long>Toggles the drawing of a datestamp within the captured pictures</long>
- </locale>
- </schema>
-
-
- <schema>
- <key>/schemas/apps/camorama/preferences/file_type</key>
- <applyto>/apps/camorama/preferences/file_type</applyto>
- <owner>camorama</owner>
- <type>int</type>
- <default>1</default>
- <locale name="C">
- <short>Local capture image format</short>
- <long>Specifies the image format to be used for locally saved pictures</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/hostname</key>
- <applyto>/apps/camorama/preferences/hostname</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>yourdomain.org</default>
- <locale name="C">
- <short>Hostname for FTP server</short>
- <long>Hostname for the FTP server for remote captures.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/local_capture</key>
- <applyto>/apps/camorama/preferences/local_capture</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Toggles local capture</short>
- <long>When capturing pictures via the "Take Picture" button, or with auto capture, this key toggles the saving of pictures locally.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_proto</key>
- <applyto>/apps/camorama/preferences/remote_proto</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>your-username</default>
- <locale name="C">
- <short>Protocol to use for remote access</short>
- <long>The URI name of the protocol that will be used to connect
- to a remote server. Can be ftp, sftp or smb</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_uri</key>
- <applyto>/apps/camorama/preferences/remote_uri</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>your-username</default>
- <locale name="C">
- <short>Complete URI used to store image snapshots remotely</short>
- <long>The complete URI of the last successful access to a remote
- server, including protocol, host and remote directory</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_append_ts_to_file</key>
- <applyto>/apps/camorama/preferences/remote_append_ts_to_file</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Append timestamp to remote filename</short>
- <long>Appends a timestamp, in UNIX time, to the ends of remote filenames</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_capture</key>
- <applyto>/apps/camorama/preferences/remote_capture</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Toggles remote capture</short>
- <long>When capturing pictures via the "Take Picture" button, or with auto capture, this key toggles the saving of pictures to a remote server.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_file_type</key>
- <applyto>/apps/camorama/preferences/remote_file_type</applyto>
- <owner>camorama</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Remote capture image format</short>
- <long>Specifies the image format to be used for remotely saved pictures</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_save_dir</key>
- <applyto>/apps/camorama/preferences/remote_save_dir</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>your/upload/folder</default>
- <locale name="C">
- <short>Folder for remote captures</short>
- <long>Folder for saving captured pictures remotely</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_save_file</key>
- <applyto>/apps/camorama/preferences/remote_save_file</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>Webcam</default>
- <locale name="C">
- <short>Remote save filename</short>
- <long>Name for the filename of uploaded images.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/remote_timestamp</key>
- <applyto>/apps/camorama/preferences/remote_timestamp</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Toggles timestamp for remote captures</short>
- <long>Toggles the insertion of a timestamp into the images for FTP upload.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/save_dir</key>
- <applyto>/apps/camorama/preferences/save_dir</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>~/Webcam_Pictures</default>
- <locale name="C">
- <short>Folder for local captures</short>
- <long>Folder for saving captured pictures to locally</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/save_file</key>
- <applyto>/apps/camorama/preferences/save_file</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>Webcam</default>
- <locale name="C">
- <short>Filename for local captures</short>
- <long>Filename for saving captured pictures to locally</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/timestamp</key>
- <applyto>/apps/camorama/preferences/timestamp</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Toggles timestamp for local captures</short>
- <long>Toggles the insertion of a timestamp into local images</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/timestamp_string</key>
- <applyto>/apps/camorama/preferences/timestamp_string</applyto>
- <owner>camorama</owner>
- <type>string</type>
- <default>Camorama!</default>
- <locale name="C">
- <short>Custom text for the timestamp</short>
- <long>Defines a string of custom text to be inserted into the image.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/camorama/preferences/use_custom_string</key>
- <applyto>/apps/camorama/preferences/use_custom_string</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Toggles the custom string</short>
- <long>Toggles the use of the custom string for the timestamp in images.</long>
- </locale>
- </schema>
-
-<schema>
- <key>/schemas/apps/camorama/preferences/show_adjustments</key>
- <applyto>/apps/camorama/preferences/show_adjustments</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Toggles the video adjustment sliders</short>
- <long>Toggles the use of the sliders to adjust the video properties</long>
- </locale>
- </schema>
-<schema>
- <key>/schemas/apps/camorama/preferences/show_effects</key>
- <applyto>/apps/camorama/preferences/show_effects</applyto>
- <owner>camorama</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Toggles the video effects buttons</short>
- <long>Toggles the use of the buttons to adjust the video filters</long>
- </locale>
- </schema>
-
-</schemalist>
-</gconfschemafile>
diff --git a/data/org.gnome.camorama.gschema.xml b/data/org.gnome.camorama.gschema.xml
new file mode 100644
index 0000000..f21147c
--- /dev/null
+++ b/data/org.gnome.camorama.gschema.xml
@@ -0,0 +1,129 @@
+<schemalist>
+ <schema id="org.gnome.camorama" path="/org/gnome/camorama/">
+ <key name="append-ts-to-file" type="b">
+ <default>true</default>
+ <summary>Append timestamp to filename</summary>
+ <description>Appends a timestamp, in UNIX time, to the ends of filenames</description>
+ </key>
+ <key name="auto-capture" type="b">
+ <default>false</default>
+ <summary>Toggles auto-capture</summary>
+ <description>Toggles automatic capturing of pictures.</description>
+ </key>
+ <key name="auto-capture-interval" type="i">
+ <default>1200000</default>
+ <summary>Interval for auto-capture</summary>
+ <description>Specifies the interval for automatic capture of pictures.</description>
+ </key>
+ <key name="device" type="s">
+ <default>'/dev/video0'</default>
+ <summary>Video device</summary>
+ <description>The unix file system path to the device that's assigned to your camera.</description>
+ </key>
+ <key name="drawdate" type="b">
+ <default>false</default>
+ <summary>Toggles the datestamp in captures</summary>
+ <description>Toggles the drawing of a datestamp within the captured pictures</description>
+ </key>
+ <key name="file-type" type="i">
+ <default>1</default>
+ <summary>Local capture image format</summary>
+ <description>Specifies the image format to be used for locally saved pictures</description>
+ </key>
+ <key name="height" type="i">
+ <default>0</default>
+ <summary>Image height</summary>
+ <description>Image height used by the camera. Zero means autoselect</description>
+ </key>
+ <key name="hostname" type="s">
+ <default>'yourdomain.org'</default>
+ <summary>Hostname for FTP server</summary>
+ <description>Hostname for the FTP server for remote captures.</description>
+ </key>
+ <key name="local-capture" type="b">
+ <default>true</default>
+ <summary>Toggles local capture</summary>
+ <description>When capturing pictures via the "Take Picture" button, or with auto capture, this key toggles the saving of pictures locally.</description>
+ </key>
+ <key name="remote-proto" type="s">
+ <default>'your-username'</default>
+ <summary>Protocol to use for remote access</summary>
+ <description>The URI name of the protocol that will be used to connect to a remote server. Can be ftp, sftp or smb</description>
+ </key>
+ <key name="remote-uri" type="s">
+ <default>'your-username'</default>
+ <summary>Complete URI used to store image snapshots remotely</summary>
+ <description>The complete URI of the last successful access to a remote server, including protocol, host and remote directory</description>
+ </key>
+ <key name="remote-append-ts-to-file" type="b">
+ <default>false</default>
+ <summary>Append timestamp to remote filename</summary>
+ <description>Appends a timestamp, in UNIX time, to the ends of remote filenames</description>
+ </key>
+ <key name="remote-capture" type="b">
+ <default>false</default>
+ <summary>Toggles remote capture</summary>
+ <description>When capturing pictures via the "Take Picture" button, or with auto capture, this key toggles the saving of pictures to a remote server.</description>
+ </key>
+ <key name="remote-file-type" type="i">
+ <default>0</default>
+ <summary>Remote capture image format</summary>
+ <description>Specifies the image format to be used for remotely saved pictures</description>
+ </key>
+ <key name="remote-save-dir" type="s">
+ <default>'your/upload/folder'</default>
+ <summary>Folder for remote captures</summary>
+ <description>Folder for saving captured pictures remotely</description>
+ </key>
+ <key name="remote-save-file" type="s">
+ <default>'Webcam'</default>
+ <summary>Remote save filename</summary>
+ <description>Name for the filename of uploaded images.</description>
+ </key>
+ <key name="remote-timestamp" type="b">
+ <default>false</default>
+ <summary>Toggles timestamp for remote captures</summary>
+ <description>Toggles the insertion of a timestamp into the images for FTP upload.</description>
+ </key>
+ <key name="save-dir" type="s">
+ <default>'~/Webcam_Pictures'</default>
+ <summary>Folder for local captures</summary>
+ <description>Folder for saving captured pictures to locally</description>
+ </key>
+ <key name="save-file" type="s">
+ <default>'Webcam'</default>
+ <summary>Filename for local captures</summary>
+ <description>Filename for saving captured pictures to locally</description>
+ </key>
+ <key name="timestamp" type="b">
+ <default>false</default>
+ <summary>Toggles timestamp for local captures</summary>
+ <description>Toggles the insertion of a timestamp into local images</description>
+ </key>
+ <key name="timestamp-string" type="s">
+ <default>'Camorama!'</default>
+ <summary>Custom text for the timestamp</summary>
+ <description>Defines a string of custom text to be inserted into the image.</description>
+ </key>
+ <key name="use-custom-string" type="b">
+ <default>false</default>
+ <summary>Toggles the custom string</summary>
+ <description>Toggles the use of the custom string for the timestamp in images.</description>
+ </key>
+ <key name="show-adjustments" type="b">
+ <default>true</default>
+ <summary>Toggles the video adjustment sliders</summary>
+ <description>Toggles the use of the sliders to adjust the video properties</description>
+ </key>
+ <key name="show-effects" type="b">
+ <default>true</default>
+ <summary>Toggles the video effects buttons</summary>
+ <description>Toggles the use of the buttons to adjust the video filters</description>
+ </key>
+ <key name="width" type="i">
+ <default>0</default>
+ <summary>Image width</summary>
+ <description>Image width used by the camera. Zero means autoselect</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index bd8b8de..1d29fe9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,6 @@ camorama.desktop.in
data/camorama-gtk2.ui
data/camorama-gtk3.ui
data/camorama-gtk4.ui
-data/camorama.schemas
src/callbacks.c
src/camorama-filter-chain.c
src/camorama-filter-laplace.c
diff --git a/src/Makefile.in b/src/Makefile.in
index 79b5482..7e93ed8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -191,13 +191,12 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-GCONFTOOL = @GCONFTOOL@
-GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
-GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -267,6 +266,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
diff --git a/src/callbacks.c b/src/callbacks.c
index 7966014..be7a4ac 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -36,14 +36,14 @@ extern const gchar *const protos[];
void ts_func(GtkWidget *rb, cam_t *cam)
{
cam->timestamp = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_TIMESTAMP, cam->timestamp, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_TIMESTAMP, cam->timestamp);
}
void customstring_func(GtkWidget *rb, cam_t *cam)
{
cam->usestring = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_USE_CUSTOM_STRING,
- cam->usestring, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_USE_CUSTOM_STRING,
+ cam->usestring);
gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(cam->xml, "string_entry")),
cam->usestring);
}
@@ -51,40 +51,40 @@ void customstring_func(GtkWidget *rb, cam_t *cam)
void drawdate_func(GtkWidget *rb, cam_t *cam)
{
cam->usedate = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_DRAWDATE, cam->usedate, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_DRAWDATE, cam->usedate);
}
void append_func(GtkWidget *rb, cam_t *cam)
{
cam->timefn = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_LOCAL_APPEND_TS, cam->timefn, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_LOCAL_APPEND_TS, cam->timefn);
}
void rappend_func(GtkWidget *rb, cam_t *cam)
{
cam->rtimefn = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_REMOTE_APPEND_TS, cam->rtimefn, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_REMOTE_APPEND_TS, cam->rtimefn);
}
void jpg_func(GtkWidget *rb, cam_t *cam)
{
cam->savetype = JPEG;
- gconf_client_set_int(cam->gc, GCONF_FILE_TYPE, cam->savetype, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_FILE_TYPE, cam->savetype);
}
void png_func(GtkWidget *rb, cam_t *cam)
{
cam->savetype = PNG;
- gconf_client_set_int(cam->gc, GCONF_FILE_TYPE, cam->savetype, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_FILE_TYPE, cam->savetype);
}
void ppm_func(GtkWidget *rb, cam_t *cam)
{
cam->savetype = PPM;
- gconf_client_set_int(cam->gc, GCONF_FILE_TYPE, cam->savetype, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_FILE_TYPE, cam->savetype);
}
void set_sensitive(cam_t *cam)
@@ -118,7 +118,7 @@ void cap_func(GtkWidget *rb, cam_t *cam)
{
cam->cap = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_LOCAL_CAPTURE, cam->cap, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_LOCAL_CAPTURE, cam->cap);
set_sensitive(cam);
}
@@ -126,7 +126,7 @@ void rcap_func(GtkWidget *rb, cam_t *cam)
{
cam->rcap = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_REMOTE_CAPTURE, cam->rcap, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_REMOTE_CAPTURE, cam->rcap);
set_sensitive(cam);
}
@@ -135,7 +135,7 @@ void acap_func(GtkWidget *rb, cam_t *cam)
{
cam->acap = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_AUTO_CAPTURE, cam->acap, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_AUTO_CAPTURE, cam->acap);
if (cam->acap == TRUE) {
cam->timeout_id = g_timeout_add(cam->timeout_interval,
@@ -157,8 +157,8 @@ void acap_func(GtkWidget *rb, cam_t *cam)
void interval_change(GtkWidget *sb, cam_t *cam)
{
cam->timeout_interval = gtk_spin_button_get_value((GtkSpinButton *) sb) * 60000;
- gconf_client_set_int(cam->gc, GCONF_AUTO_CAPTURE_INTERVAL,
- cam->timeout_interval, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_AUTO_CAPTURE_INTERVAL,
+ cam->timeout_interval);
if (cam->acap == TRUE) {
if (cam->debug == TRUE) {
printf("interval_change; old timeout_id = %d old interval = %d\n",
@@ -177,57 +177,27 @@ void interval_change(GtkWidget *sb, cam_t *cam)
void rjpg_func(GtkWidget *rb, cam_t *cam)
{
cam->rsavetype = JPEG;
- gconf_client_set_int(cam->gc, GCONF_REMOTE_FILE_TYPE, cam->rsavetype, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_REMOTE_FILE_TYPE, cam->rsavetype);
}
void rpng_func(GtkWidget *rb, cam_t *cam)
{
cam->rsavetype = PNG;
- gconf_client_set_int(cam->gc, GCONF_REMOTE_FILE_TYPE, cam->rsavetype, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_REMOTE_FILE_TYPE, cam->rsavetype);
}
void rppm_func(GtkWidget *rb, cam_t *cam)
{
cam->rsavetype = PPM;
- gconf_client_set_int(cam->gc, GCONF_REMOTE_FILE_TYPE, cam->rsavetype, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_REMOTE_FILE_TYPE, cam->rsavetype);
}
void rts_func(GtkWidget *rb, cam_t *cam)
{
cam->rtimestamp = gtk_toggle_button_get_active((GtkToggleButton *) rb);
- gconf_client_set_bool(cam->gc, GCONF_REMOTE_TIMESTAMP,
- cam->rtimestamp, NULL);
-
-}
-
-void gconf_notify_func(GConfClient *client, guint cnxn_id, GConfEntry *entry,
- char **str)
-{
- GConfValue *value;
-
- value = gconf_entry_get_value(entry);
- *str = g_strdup(gconf_value_get_string(value));
-}
-
-void gconf_notify_func_bool(GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gboolean *val)
-{
- GConfValue *value;
-
- value = gconf_entry_get_value(entry);
- *val = gconf_value_get_bool(value);
-
-}
-
-void gconf_notify_func_int(GConfClient *client, guint cnxn_id,
- GConfEntry *entry, int *val)
-{
- GConfValue *value;
-
- value = gconf_entry_get_value(entry);
- *val = gconf_value_get_int(value);
-
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_REMOTE_TIMESTAMP,
+ cam->rtimestamp);
}
static int apply_remote_pref(cam_t *cam)
@@ -305,7 +275,7 @@ void prefs_func(GtkWidget *okbutton, cam_t *cam)
if (cam->pixdir)
g_free(cam->pixdir);
cam->pixdir = gtk_file_chooser_get_current_folder((GtkFileChooser *) dentry);
- gconf_client_set_string(cam->gc, GCONF_SAVE_DIR, cam->pixdir, NULL);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_SAVE_DIR, cam->pixdir);
} else {
if (cam->debug == TRUE)
fprintf(stderr, "null directory\ndirectory unchanged.");
@@ -322,16 +292,16 @@ void prefs_func(GtkWidget *okbutton, cam_t *cam)
if(cam->capturefile)
g_free(cam->capturefile);
cam->capturefile = g_strdup(gtk_entry_get_text((GtkEntry *) entry2));
- gconf_client_set_string(cam->gc, GCONF_SAVE_FILE,
- cam->capturefile, NULL);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_SAVE_FILE,
+ cam->capturefile);
}
if (strlen(gtk_entry_get_text((GtkEntry *) string_entry)) > 0) {
if (cam->ts_string)
g_free(cam->ts_string);
cam->ts_string = g_strdup(gtk_entry_get_text((GtkEntry *)string_entry));
- gconf_client_set_string(cam->gc, GCONF_TIMESTAMP_STRING,
- cam->ts_string, NULL);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_TIMESTAMP_STRING,
+ cam->ts_string);
}
if (cam->debug == TRUE) {
fprintf(stderr, "dir now = %s\nfile now = %s\n", cam->pixdir,
@@ -395,8 +365,8 @@ void set_image_scale(cam_t *cam)
title);
g_free(title);
- gconf_client_set_int(cam->gc, GCONF_WIDTH, cam->width, NULL);
- gconf_client_set_int(cam->gc, GCONF_HEIGHT, cam->height, NULL);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_WIDTH, cam->width);
+ g_settings_set_int(cam->gc, CAM_SETTINGS_HEIGHT, cam->height);
}
void on_change_size_activate(GtkWidget *widget, cam_t *cam)
@@ -452,8 +422,8 @@ void on_show_adjustments_activate(GtkToggleButton *button, cam_t *cam)
gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(cam->xml, "adjustments_table")));
cam->show_adjustments = TRUE;
}
- gconf_client_set_bool(cam->gc, GCONF_SHOW_ADJUSTMENTS,
- cam->show_adjustments, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_SHOW_ADJUSTMENTS,
+ cam->show_adjustments);
}
void on_show_effects_activate(GtkMenuItem *menuitem, cam_t *cam)
@@ -470,7 +440,7 @@ void on_show_effects_activate(GtkMenuItem *menuitem, cam_t *cam)
gtk_widget_show(effects);
}
- gconf_client_set_bool(cam->gc, GCONF_SHOW_EFFECTS, cam->show_effects, NULL);
+ g_settings_set_boolean(cam->gc, CAM_SETTINGS_SHOW_EFFECTS, cam->show_effects);
}
static void about_widget_destroy(GtkWidget *widget)
diff --git a/src/callbacks.h b/src/callbacks.h
index 1b55606..678d261 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -3,18 +3,11 @@
#include "v4l.h"
#include "fileio.h"
-#include <gconf/gconf-client.h>
G_BEGIN_DECLS
void on_change_size_activate(GtkWidget * widget, cam_t *cam);
void on_quit_activate(GtkMenuItem *menuitem, cam_t *cam);
-void gconf_notify_func(GConfClient *client, guint cnxn_id,
- GConfEntry *entry, char **);
-void gconf_notify_func_bool(GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gboolean *val);
-void gconf_notify_func_int(GConfClient *client, guint cnxn_id,
- GConfEntry *entry, int *val);
int delete_event(GtkWidget *, gpointer data);
void cap_func(GtkWidget *, cam_t *);
void rcap_func(GtkWidget *, cam_t *);
diff --git a/src/fileio.c b/src/fileio.c
index 79bd7d4..4f684a2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -164,10 +164,10 @@ static void mount_cb(GObject *obj, GAsyncResult *res, gpointer user_data)
if (ret) {
cam->rdir_ok = TRUE;
- gconf_client_set_string(cam->gc, GCONF_HOSTNAME, cam->host, NULL);
- gconf_client_set_string(cam->gc, GCONF_REMOTE_PROTO, cam->proto, NULL);
- gconf_client_set_string(cam->gc, GCONF_REMOTE_SAVE_DIR, cam->rdir, NULL);
- gconf_client_set_string(cam->gc, GCONF_REMOTE_SAVE_FILE, cam->rcapturefile, NULL);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_HOSTNAME, cam->host);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_REMOTE_PROTO, cam->proto);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_REMOTE_SAVE_DIR, cam->rdir);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_REMOTE_SAVE_FILE, cam->rcapturefile);
} else {
gchar *error_message = g_strdup_printf(_("An error occurred mounting %s:%s."),
cam->uri, err->message);
diff --git a/src/interface.h b/src/interface.h
index 7083b38..857d147 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -1,27 +1,26 @@
-#define GCONF_PARENT "/apps/camorama"
-#define GCONF_PREFS GCONF_PARENT "/preferences"
+#define CAM_SETTINGS_SCHEMA "org.gnome.camorama"
-#define GCONF_DEVICE GCONF_PARENT "/device"
-#define GCONF_WIDTH GCONF_PARENT "/width"
-#define GCONF_HEIGHT GCONF_PARENT "/height"
-#define GCONF_SAVE_DIR GCONF_PREFS "/save_dir"
-#define GCONF_SAVE_FILE GCONF_PREFS "/save_file"
-#define GCONF_FILE_TYPE GCONF_PREFS "/file_type"
-#define GCONF_TIMESTAMP GCONF_PREFS "/timestamp"
-#define GCONF_HOSTNAME GCONF_PREFS "/hostname"
-#define GCONF_REMOTE_PROTO GCONF_PREFS "/remote_proto"
-#define GCONF_REMOTE_SAVE_DIR GCONF_PREFS "/remote_save_dir"
-#define GCONF_REMOTE_SAVE_FILE GCONF_PREFS "/remote_save_file"
-#define GCONF_REMOTE_FILE_TYPE GCONF_PREFS "/remote_file_type"
-#define GCONF_REMOTE_TIMESTAMP GCONF_PREFS "/remote_timestamp"
-#define GCONF_LOCAL_CAPTURE GCONF_PREFS "/local_capture"
-#define GCONF_REMOTE_CAPTURE GCONF_PREFS "/remote_capture"
-#define GCONF_LOCAL_APPEND_TS GCONF_PREFS "/append_ts_to_file"
-#define GCONF_REMOTE_APPEND_TS GCONF_PREFS "/remote_append_ts_to_file"
-#define GCONF_TIMESTAMP_STRING GCONF_PREFS "/timestamp_string"
-#define GCONF_USE_CUSTOM_STRING GCONF_PREFS "/use_custom_string"
-#define GCONF_DRAWDATE GCONF_PREFS "/drawdate"
-#define GCONF_AUTO_CAPTURE GCONF_PREFS "/auto_capture"
-#define GCONF_AUTO_CAPTURE_INTERVAL GCONF_PREFS "/auto_capture_interval"
-#define GCONF_SHOW_ADJUSTMENTS GCONF_PREFS "/show_adjustments"
-#define GCONF_SHOW_EFFECTS GCONF_PREFS "/show_effects"
+#define CAM_SETTINGS_DEVICE "device"
+#define CAM_SETTINGS_WIDTH "width"
+#define CAM_SETTINGS_HEIGHT "height"
+#define CAM_SETTINGS_SAVE_DIR "save-dir"
+#define CAM_SETTINGS_SAVE_FILE "save-file"
+#define CAM_SETTINGS_FILE_TYPE "file-type"
+#define CAM_SETTINGS_TIMESTAMP "timestamp"
+#define CAM_SETTINGS_HOSTNAME "hostname"
+#define CAM_SETTINGS_REMOTE_PROTO "remote-proto"
+#define CAM_SETTINGS_REMOTE_SAVE_DIR "remote-save-dir"
+#define CAM_SETTINGS_REMOTE_SAVE_FILE "remote-save-file"
+#define CAM_SETTINGS_REMOTE_FILE_TYPE "remote-file-type"
+#define CAM_SETTINGS_REMOTE_TIMESTAMP "remote-timestamp"
+#define CAM_SETTINGS_LOCAL_CAPTURE "local-capture"
+#define CAM_SETTINGS_REMOTE_CAPTURE "remote-capture"
+#define CAM_SETTINGS_LOCAL_APPEND_TS "append-ts-to-file"
+#define CAM_SETTINGS_REMOTE_APPEND_TS "remote-append-ts-to-file"
+#define CAM_SETTINGS_TIMESTAMP_STRING "timestamp-string"
+#define CAM_SETTINGS_USE_CUSTOM_STRING "use-custom-string"
+#define CAM_SETTINGS_DRAWDATE "drawdate"
+#define CAM_SETTINGS_AUTO_CAPTURE "auto-capture"
+#define CAM_SETTINGS_AUTO_CAPTURE_INTERVAL "auto-capture-interval"
+#define CAM_SETTINGS_SHOW_ADJUSTMENTS "show-adjustments"
+#define CAM_SETTINGS_SHOW_EFFECTS "show-effects"
diff --git a/src/main.c b/src/main.c
index d49e1f2..b38d368 100644
--- a/src/main.c
+++ b/src/main.c
@@ -106,7 +106,7 @@ static void activate(GtkApplication *app)
#endif
{
cam_t *cam = &cam_object;
- GConfClient *gc;
+ GSettings *gc;
GtkWidget *widget, *window;
unsigned int bufsize;
@@ -148,32 +148,11 @@ static void activate(GtkApplication *app)
printf("Forcing read mode\n");
cam->read = TRUE;
}
- gc = gconf_client_get_default();
+ gc = g_settings_new(CAM_SETTINGS_SCHEMA);
cam->gc = gc;
- gconf_client_add_dir(cam->gc, GCONF_PARENT, GCONF_CLIENT_PRELOAD_NONE, NULL);
- gconf_client_notify_add(cam->gc, GCONF_SAVE_DIR, (void *)gconf_notify_func,
- &cam->pixdir, NULL, NULL);
- gconf_client_notify_add(cam->gc, GCONF_SAVE_FILE, (void *)gconf_notify_func,
- &cam->capturefile, NULL, NULL);
- gconf_client_notify_add(cam->gc, GCONF_FILE_TYPE,
- (void *)gconf_notify_func_int,
- &cam->savetype, NULL, NULL);
- gconf_client_notify_add(cam->gc, GCONF_TIMESTAMP,
- (void *)gconf_notify_func_bool,
- &cam->timestamp, NULL, NULL);
- gconf_client_notify_add(cam->gc, GCONF_HOSTNAME, (void *)gconf_notify_func,
- &cam->host, NULL, NULL);
- gconf_client_notify_add(cam->gc, GCONF_REMOTE_PROTO, (void *)gconf_notify_func,
- &cam->proto, NULL, NULL);
- gconf_client_notify_add(cam->gc, GCONF_REMOTE_SAVE_DIR, (void *)gconf_notify_func,
- &cam->rdir, NULL, NULL);
- gconf_client_notify_add(cam->gc, GCONF_REMOTE_SAVE_FILE, (void *)gconf_notify_func,
- &cam->rcapturefile, NULL, NULL);
-
if (!poopoo) {
- gchar const *gconf_device = gconf_client_get_string(cam->gc, GCONF_DEVICE,
- NULL);
+ gchar const *gconf_device = g_settings_get_string(cam->gc, CAM_SETTINGS_DEVICE);
if (gconf_device)
cam->video_dev = g_strdup(gconf_device);
else
@@ -187,46 +166,45 @@ static void activate(GtkApplication *app)
cam->date_format = "%Y-%m-%d %H:%M:%S";
#pragma GCC diagnostic pop
- cam->pixdir = gconf_client_get_string(cam->gc, GCONF_SAVE_DIR, NULL);
- cam->capturefile = gconf_client_get_string(cam->gc, GCONF_SAVE_FILE, NULL);
- cam->savetype = gconf_client_get_int(cam->gc, GCONF_FILE_TYPE, NULL);
- cam->host = gconf_client_get_string(cam->gc, GCONF_HOSTNAME, NULL);
- cam->proto = gconf_client_get_string(cam->gc, GCONF_REMOTE_PROTO, NULL);
- cam->rdir = gconf_client_get_string(cam->gc, GCONF_REMOTE_SAVE_DIR, NULL);
- cam->rcapturefile = gconf_client_get_string(cam->gc,
- GCONF_REMOTE_SAVE_FILE, NULL);
- cam->rsavetype = gconf_client_get_int(cam->gc,
- GCONF_REMOTE_FILE_TYPE, NULL);
- cam->ts_string = gconf_client_get_string(cam->gc,
- GCONF_TIMESTAMP_STRING, NULL);
- cam->timestamp = gconf_client_get_bool(cam->gc, GCONF_TIMESTAMP, NULL);
- cam->rtimestamp = gconf_client_get_bool(cam->gc, GCONF_REMOTE_TIMESTAMP, NULL);
-
- cam->cap = gconf_client_get_bool(cam->gc, GCONF_LOCAL_CAPTURE, NULL);
- cam->rcap = gconf_client_get_bool(cam->gc, GCONF_REMOTE_CAPTURE, NULL);
- cam->timefn = gconf_client_get_bool(cam->gc, GCONF_LOCAL_APPEND_TS, NULL);
- cam->rtimefn = gconf_client_get_bool(cam->gc,
- GCONF_REMOTE_APPEND_TS, NULL);
- cam->usestring = gconf_client_get_bool(cam->gc,
- GCONF_USE_CUSTOM_STRING, NULL);
- cam->usedate = gconf_client_get_bool(cam->gc, GCONF_DRAWDATE, NULL);
- cam->acap = gconf_client_get_bool(cam->gc, GCONF_AUTO_CAPTURE, NULL);
- cam->timeout_interval = gconf_client_get_int(cam->gc,
- GCONF_AUTO_CAPTURE_INTERVAL, NULL);
- cam->show_adjustments = gconf_client_get_bool(cam->gc,
- GCONF_SHOW_ADJUSTMENTS,
- NULL);
- cam->show_effects = gconf_client_get_bool(cam->gc,
- GCONF_SHOW_EFFECTS, NULL);
+ cam->pixdir = g_settings_get_string(cam->gc, CAM_SETTINGS_SAVE_DIR);
+ cam->capturefile = g_settings_get_string(cam->gc, CAM_SETTINGS_SAVE_FILE);
+ cam->savetype = g_settings_get_int(cam->gc, CAM_SETTINGS_FILE_TYPE);
+ cam->host = g_settings_get_string(cam->gc, CAM_SETTINGS_HOSTNAME);
+ cam->proto = g_settings_get_string(cam->gc, CAM_SETTINGS_REMOTE_PROTO);
+ cam->rdir = g_settings_get_string(cam->gc, CAM_SETTINGS_REMOTE_SAVE_DIR);
+ cam->rcapturefile = g_settings_get_string(cam->gc,
+ CAM_SETTINGS_REMOTE_SAVE_FILE);
+ cam->rsavetype = g_settings_get_int(cam->gc,
+ CAM_SETTINGS_REMOTE_FILE_TYPE);
+ cam->ts_string = g_settings_get_string(cam->gc,
+ CAM_SETTINGS_TIMESTAMP_STRING);
+ cam->timestamp = g_settings_get_boolean(cam->gc, CAM_SETTINGS_TIMESTAMP);
+ cam->rtimestamp = g_settings_get_boolean(cam->gc, CAM_SETTINGS_REMOTE_TIMESTAMP);
+
+ cam->cap = g_settings_get_boolean(cam->gc, CAM_SETTINGS_LOCAL_CAPTURE);
+ cam->rcap = g_settings_get_boolean(cam->gc, CAM_SETTINGS_REMOTE_CAPTURE);
+ cam->timefn = g_settings_get_boolean(cam->gc, CAM_SETTINGS_LOCAL_APPEND_TS);
+ cam->rtimefn = g_settings_get_boolean(cam->gc,
+ CAM_SETTINGS_REMOTE_APPEND_TS);
+ cam->usestring = g_settings_get_boolean(cam->gc,
+ CAM_SETTINGS_USE_CUSTOM_STRING);
+ cam->usedate = g_settings_get_boolean(cam->gc, CAM_SETTINGS_DRAWDATE);
+ cam->acap = g_settings_get_boolean(cam->gc, CAM_SETTINGS_AUTO_CAPTURE);
+ cam->timeout_interval = g_settings_get_int(cam->gc,
+ CAM_SETTINGS_AUTO_CAPTURE_INTERVAL);
+ cam->show_adjustments = g_settings_get_boolean(cam->gc,
+ CAM_SETTINGS_SHOW_ADJUSTMENTS);
+ cam->show_effects = g_settings_get_boolean(cam->gc,
+ CAM_SETTINGS_SHOW_EFFECTS);
if (x)
cam->width = x;
else
- cam->width = gconf_client_get_int(cam->gc, GCONF_WIDTH, NULL);
+ cam->width = g_settings_get_int(cam->gc, CAM_SETTINGS_WIDTH);
if (y)
cam->height = y;
else
- cam->height = gconf_client_get_int(cam->gc, GCONF_HEIGHT, NULL);
+ cam->height = g_settings_get_int(cam->gc, CAM_SETTINGS_HEIGHT);
if (use_read)
cam->dev = v4l2_open(cam->video_dev, O_RDWR);
@@ -270,7 +248,7 @@ static void activate(GtkApplication *app)
exit(1);
}
- gconf_client_set_string(cam->gc, GCONF_DEVICE, cam->video_dev, NULL);
+ g_settings_set_string(cam->gc, CAM_SETTINGS_DEVICE, cam->video_dev);
load_interface(cam);
diff --git a/src/v4l.h b/src/v4l.h
index 7b1391c..2fc706e 100644
--- a/src/v4l.h
+++ b/src/v4l.h
@@ -17,7 +17,6 @@
#include <libv4l2.h>
#include <signal.h>
#include <png.h>
-#include <gconf/gconf-client.h>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
@@ -80,7 +79,7 @@ typedef struct camera {
unsigned char *pic_buf, *tmp;
guint timeout_id, timeout_fps_id, idle_id;
guint32 timeout_interval;
- GConfClient *gc;
+ GSettings *gc;
GtkBuilder *xml;
GdkPixbuf *pb;

Privacy Policy