From: Danielle Madeley Date: Thu, 10 Jun 2010 08:47:38 +0000 (+1000) Subject: Convert to new-style schema X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=a9c56d98390d3c2c592c00ceef0d10151d6f9c49 Convert to new-style schema --- diff --git a/configure.ac b/configure.ac index 8e09f4de..18094002 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ AC_COPYRIGHT([ ]) # Minimal version required -GLIB_REQUIRED=2.22.0 +GLIB_REQUIRED=2.25.9 GTK_REQUIRED=2.21.2 GCONF_REQUIRED=1.2.0 TELEPATHY_GLIB_REQUIRED=0.11.7 @@ -82,8 +82,7 @@ IT_PROG_INTLTOOL([0.35.0]) GNOME_DOC_INIT([0.17.3]) IDT_COMPILE_WARNINGS AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool) -AC_PATH_PROG(GCONFTOOL, gconftool-2) -AM_GCONF_SOURCE_2 +GLIB_GSETTINGS GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal` AC_SUBST(GLIB_GENMARSHAL) CONTROL_CENTER_EXTENSIONDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center-extension` diff --git a/data/.gitignore b/data/.gitignore index 423507ea..56560b3b 100644 --- a/data/.gitignore +++ b/data/.gitignore @@ -1,6 +1,6 @@ empathy.desktop empathy.desktop.in -empathy.schemas +org.gnome.Empathy.gschema.valid org.freedesktop.Telepathy.Client.Empathy.service empathy-accounts.desktop empathy-accounts.desktop.in diff --git a/data/Makefile.am b/data/Makefile.am index 8ba57bd2..13276a26 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -8,10 +8,11 @@ desktop_in_files = \ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ -schemasdir = $(GCONF_SCHEMA_FILE_DIR) -schemas_in_files = empathy.schemas.in -schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) -@INTLTOOL_SCHEMAS_RULE@ +gsettings_SCHEMAS = \ + org.gnome.Empathy.gschema.xml \ + $(NULL) + +@GSETTINGS_RULES@ streamingprefsdir = $(datadir)/empathy streamingprefs_DATA = \ @@ -28,24 +29,13 @@ org.freedesktop.Telepathy.Client.Empathy.service: org.freedesktop.Telepathy.Clie clientfiledir = $(datarootdir)/telepathy/clients clientfile_DATA = Empathy.client -if GCONF_SCHEMAS_INSTALL -install-data-local: - if test -z "$(DESTDIR)" ; then \ - for p in $(schemas_DATA) ; do \ - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p ; \ - done \ - fi -else -install-data-local: -endif - htmldir = $(datadir)/empathy html_DATA = Template.html EXTRA_DIST = \ $(desktop_in_files) \ $(desktop_DATA) \ - $(schemas_in_files) \ + $(gsettings_SCHEMAS) \ $(schemas_DATA) \ $(streamingprefs_DATA) \ $(html_DATA) \ diff --git a/data/empathy.schemas.in b/data/empathy.schemas.in deleted file mode 100644 index 5ed04e75..00000000 --- a/data/empathy.schemas.in +++ /dev/null @@ -1,651 +0,0 @@ - - - - - /schemas/apps/empathy/ui/show_offline - /apps/empathy/ui/show_offline - empathy - bool - true - - Show offline contacts - - Whether to show contacts that are offline in the contact list. - - - - - - /schemas/apps/empathy/contacts/sort_criterium - /apps/empathy/contacts/sort_criterium - empathy - string - state - - Contact list sort criterion - - Which criterion to use when sorting the contact list. - Default is to sort by the contact's name with the value - "name". A value of "state" will sort the contact list by state. - - - - - - /schemas/apps/empathy/ui/show_avatars - /apps/empathy/ui/show_avatars - empathy - bool - true - - Show avatars - - Whether to show avatars for contacts in the contact - list and chat windows. - - - - - - /schemas/apps/empathy/ui/show_protocols - /apps/empathy/ui/show_protocols - empathy - bool - false - - Show protocols - - Whether to show protocols for contacts in the contact - list. - - - - - - /schemas/apps/empathy/ui/compact_contact_list - /apps/empathy/ui/compact_contact_list - empathy - bool - false - - Compact contact list - - Whether to show the contact list in compact mode. - - - - - - /schemas/apps/empathy/ui/main_window_hidden - /apps/empathy/ui/main_window_hidden - empathy - bool - false - - Hide main window - - Hide the main window. - - - - - - /schemas/apps/empathy/ui/avatar_directory - /apps/empathy/ui/avatar_directory - empathy - string - - - Default directory to select an avatar image from - - The last directory that an avatar image was chosen from. - - - - - - /schemas/apps/empathy/sounds/sounds_enabled - /apps/empathy/sounds/sounds_enabled - empathy - bool - true - - Use notification sounds - - Whether to play a sound to notify of events. - - - - - - /schemas/apps/empathy/sounds/sounds_disabled_away - /apps/empathy/sounds/sounds_disabled_away - empathy - bool - true - - Disable sounds when away - - Whether to play sound notifications when away or busy. - - - - - - /schemas/apps/empathy/sounds/sounds_incoming_message - /apps/empathy/sounds/sounds_incoming_message - empathy - bool - true - - Play a sound for incoming messages - - Whether to play a sound to notify of incoming messages. - - - - - - /schemas/apps/empathy/sounds/sounds_outgoing_message - /apps/empathy/sounds/sounds_outgoing_message - empathy - bool - false - - Play a sound for outgoing messages - - Whether to play a sound to notify of outgoing messages. - - - - - - /schemas/apps/empathy/sounds/sounds_new_conversation - /apps/empathy/sounds/sounds_new_conversation - empathy - bool - true - - Play a sound for new conversations - - Whether to play a sound to notify of new conversations. - - - - - - /schemas/apps/empathy/sounds/sounds_contact_login - /apps/empathy/sounds/sounds_contact_login - empathy - bool - false - - Play a sound when a contact logs in - - Whether to play a sound to notify of contacts logging into the - network. - - - - - - /schemas/apps/empathy/sounds/sounds_contact_logout - /apps/empathy/sounds/sounds_contact_logout - empathy - bool - false - - Play a sound when a contact logs out - - Whether to play a sound to notify of contacts logging out of the - network. - - - - - - /schemas/apps/empathy/sounds/sounds_service_login - /apps/empathy/sounds/sounds_service_login - empathy - bool - false - - Play a sound when we log in - - Whether to play a sound when logging into a network. - - - - - - /schemas/apps/empathy/sounds/sounds_service_logout - /apps/empathy/sounds/sounds_service_logout - empathy - bool - false - - Play a sound when we log out - - Whether to play a sound when logging out of a network. - - - - - - /schemas/apps/empathy/notifications/notifications_enabled - /apps/empathy/notifications/notifications_enabled - empathy - bool - true - - Enable popup notifications for new messages - - Whether to show a popup notification when receiving a new - message. - - - - - - /schemas/apps/empathy/notifications/notifications_disabled_away - /apps/empathy/notifications/notifications_disabled_away - empathy - bool - true - - Disable popup notifications when away - - Whether to show popup notifications when away or busy. - - - - - - /schemas/apps/empathy/notifications/notifications_focus - /apps/empathy/notifications/notifications_focus - empathy - bool - false - - Pop up notifications if the chat isn't focused - - Whether to show a popup notification when receiving a new - message even if the chat is already opened, but not focused. - - - - - - /schemas/apps/empathy/notifications/notifications_contact_signin - /apps/empathy/notifications/notifications_contact_signin - empathy - bool - false - - Pop up notifications when a contact logs in - - Whether to show a popup notification when a contact goes - online. - - - - - - /schemas/apps/empathy/notifications/notifications_contact_signout - /apps/empathy/notifications/notifications_contact_signout - empathy - bool - false - - Pop up notifications when a contact logs out - - Whether to show a popup notification when a contact goes - offline. - - - - - - /schemas/apps/empathy/ui/separate_chat_windows - /apps/empathy/ui/separate_chat_windows - empathy - bool - false - - Open new chats in separate windows - - Always open a separate chat window for new chats. - - - - - - /schemas/apps/empathy/conversation/graphical_smileys - /apps/empathy/conversation/graphical_smileys - empathy - bool - true - - Use graphical smileys - - Whether to convert smileys into graphical images in - conversations. - - - - - - /schemas/apps/empathy/conversation/show_contacts_in_rooms - /apps/empathy/conversation/show_contacts_in_rooms - empathy - bool - true - - Show contact list in rooms - - Whether to show the contact list in chat rooms. - - - - - - /schemas/apps/empathy/conversation/theme - /apps/empathy/conversation/theme - empathy - string - classic - - Chat window theme - - The theme that is used to display the conversation in chat windows. - - - - - - /schemas/apps/empathy/conversation/adium_path - /apps/empathy/conversation/adium_path - empathy - string - - - Path of the Adium theme to use - - Path of the Adium theme to use if the theme used for chat is Adium. - - - - - - /schemas/apps/empathy/conversation/enable_webkit_developer_tools - /apps/empathy/conversation/enable_webkit_developer_tools - empathy - bool - false - - Enable WebKit Developer Tools - - Whether WebKit developer tools, such as the Web Inspector, should be enabled. - - - - - - /schemas/apps/empathy/conversation/theme_chat_room - /apps/empathy/conversation/theme_chat_room - empathy - bool - true - - Use theme for chat rooms - - Whether to use the theme for chat rooms. - - - - - - /schemas/apps/empathy/conversation/spell_checker_languages - /apps/empathy/conversation/spell_checker_languages - empathy - string - en - - Spell checking languages - - Comma-separated list of spell checker languages to use (e.g. "en, fr, nl"). - - - - - - /schemas/apps/empathy/conversation/spell_checker_enabled - /apps/empathy/conversation/spell_checker_enabled - empathy - bool - true - - Enable spell checker - - Whether to check words typed against the languages you - want to check with. - - - - - - /schemas/apps/empathy/conversation/nick_completion_char - /apps/empathy/conversation/nick_completion_char - empathy - string - : - - Nick completed character - - Character to add after nickname when using nick completion (tab) - in group chat. - - - - - - - /schemas/apps/empathy/conversation/avatar_in_icon - /apps/empathy/conversation/avatar_in_icon - empathy - bool - false - - Empathy should use the avatar of the contact as the chat window icon - - Whether Empathy should use the avatar of the contact as the chat window icon. - - - - - - /schemas/apps/empathy/hints/close_main_window - /apps/empathy/hints/close_main_window - empathy - bool - true - - Show hint about closing the main window - - Whether to show the message dialog about closing the - main window with the 'x' button in the title bar. - - - - - - /schemas/apps/empathy/accounts/imported_mc4_accounts - /apps/empathy/accounts/imported_mc4_accounts - empathy - bool - false - - MC 4 accounts have been imported - - MC 4 accounts have been imported. - - - - - - /schemas/apps/empathy/use_conn - /apps/empathy/use_conn - empathy - bool - true - - Connection managers should be used - - Whether connectivity managers should be used to automatically - disconnect/reconnect. - - - - - - /schemas/apps/empathy/autoconnect - /apps/empathy/autoconnect - empathy - bool - true - - Empathy should auto-connect on startup - - Whether Empathy should automatically log into your accounts on startup. - - - - - - /schemas/apps/empathy/autoaway - /apps/empathy/autoaway - empathy - bool - true - - Empathy should auto-away when idle - - Whether Empathy should go into away mode automatically if user is idle. - - - - - - /schemas/apps/empathy/import_asked - /apps/empathy/import_asked - empathy - bool - false - - Empathy has asked about importing accounts - - Whether Empathy has asked about importing accounts from other programs. - - - - - - /schemas/apps/empathy/butterfly_logs_migrated - /apps/empathy/butterfly_logs_migrated - empathy - bool - false - - Empathy has migrated butterfly logs - - Whether Empathy has migrated butterfly logs. - - - - - - /schemas/apps/empathy/file_transfer/default_folder - /apps/empathy/file_transfer_default_folder - empathy - string - - - Empathy default download folder - - The default folder to save file transfers in. - - - - - - /schemas/apps/empathy/location/publish - /apps/empathy/location/publish - empathy - bool - false - - Empathy can publish the user's location - - Whether Empathy can publish the user's location to their contacts. - - - - - - /schemas/apps/empathy/location/resource_network - /apps/empathy/location/resource_network - empathy - bool - true - - Empathy can use the network to guess the location - - Whether Empathy can use the network to guess the location. - - - - - - /schemas/apps/empathy/location/resource_cell - /apps/empathy/location/resource_cell - empathy - bool - true - - Empathy can use the cellular network to guess the location - - Whether Empathy can use the cellular network to guess the location. - - - - - - /schemas/apps/empathy/location/resource_gps - /apps/empathy/location/resource_gps - empathy - bool - false - - Empathy can use the GPS to guess the location - - Whether Empathy can use the GPS to guess the location. - - - - - - /schemas/apps/empathy/location/reduce_accuracy - /apps/empathy/location/reduce_accuracy - empathy - bool - true - - Empathy should reduce the location's accuracy - - Whether Empathy should reduce the location's accuracy for privacy reasons. - - - - - - diff --git a/data/org.gnome.Empathy.gschema.xml b/data/org.gnome.Empathy.gschema.xml new file mode 100644 index 00000000..ca3c48c2 --- /dev/null +++ b/data/org.gnome.Empathy.gschema.xml @@ -0,0 +1,253 @@ + + + + true + Connection managers should be used + Whether connectivity managers should be used to automatically disconnect/reconnect. + + + true + Empathy should auto-connect on startup + Whether Empathy should automatically log into your accounts on startup. + + + true + Empathy should auto-away when idle + Whether Empathy should go into away mode automatically if user is idle. + + + false + Empathy has asked about importing accounts + Whether Empathy has asked about importing accounts from other programs. + + + false + Empathy has migrated butterfly logs + Whether Empathy has migrated butterfly logs. + + + '' + Empathy default download folder + The default folder to save file transfers in. + + + + + + + + + + + + + true + Show offline contacts + Whether to show contacts that are offline in the contact list. + + + true + Show avatars + Whether to show avatars for contacts in the contact list and chat windows. + + + false + Show protocols + Whether to show protocols for contacts in the contact list. + + + false + Compact contact list + Whether to show the contact list in compact mode. + + + false + Hide main window + Hide the main window. + + + '' + Default directory to select an avatar image from + The last directory that an avatar image was chosen from. + + + false + Open new chats in separate windows + Always open a separate chat window for new chats. + + + + + 'state' + Contact list sort criterion + Which criterion to use when sorting the contact list. Default is to sort by the contact's name with the value "name". A value of "state" will sort the contact list by state. + + + + + true + Use notification sounds + Whether to play a sound to notify of events. + + + true + Disable sounds when away + Whether to play sound notifications when away or busy. + + + true + Play a sound for incoming messages + Whether to play a sound to notify of incoming messages. + + + false + Play a sound for outgoing messages + Whether to play a sound to notify of outgoing messages. + + + true + Play a sound for new conversations + Whether to play a sound to notify of new conversations. + + + false + Play a sound when a contact logs in + Whether to play a sound to notify of contacts logging into the network. + + + false + Play a sound when a contact logs out + Whether to play a sound to notify of contacts logging out of the network. + + + false + Play a sound when we log in + Whether to play a sound when logging into a network. + + + false + Play a sound when we log out + Whether to play a sound when logging out of a network. + + + + + true + Enable popup notifications for new messages + Whether to show a popup notification when receiving a new message. + + + true + Disable popup notifications when away + Whether to show popup notifications when away or busy. + + + false + Pop up notifications if the chat isn't focused + Whether to show a popup notification when receiving a new message even if the chat is already opened, but not focused. + + + false + Pop up notifications when a contact logs in + Whether to show a popup notification when a contact goes online. + + + false + Pop up notifications when a contact logs out + Whether to show a popup notification when a contact goes offline. + + + + + true + Use graphical smileys + Whether to convert smileys into graphical images in conversations. + + + true + Show contact list in rooms + Whether to show the contact list in chat rooms. + + + 'classic' + Chat window theme + The theme that is used to display the conversation in chat windows. + + + '' + Path of the Adium theme to use + Path of the Adium theme to use if the theme used for chat is Adium. + + + false + Enable WebKit Developer Tools + Whether WebKit developer tools, such as the Web Inspector, should be enabled. + + + true + Use theme for chat rooms + Whether to use the theme for chat rooms. + + + 'en' + Spell checking languages + Comma-separated list of spell checker languages to use (e.g. "en, fr, nl"). + + + true + Enable spell checker + Whether to check words typed against the languages you want to check with. + + + ':' + Nick completed character + Character to add after nickname when using nick completion (tab) in group chat. + + + false + Empathy should use the avatar of the contact as the chat window icon + Whether Empathy should use the avatar of the contact as the chat window icon. + + + + + true + Show hint about closing the main window + Whether to show the message dialog about closing the main window with the 'x' button in the title bar. + + + + + false + MC 4 accounts have been imported + MC 4 accounts have been imported. + + + + + false + Empathy can publish the user's location + Whether Empathy can publish the user's location to their contacts. + + + true + Empathy can use the network to guess the location + Whether Empathy can use the network to guess the location. + + + true + Empathy can use the cellular network to guess the location + Whether Empathy can use the cellular network to guess the location. + + + false + Empathy can use the GPS to guess the location + Whether Empathy can use the GPS to guess the location. + + + true + Empathy should reduce the location's accuracy + Whether Empathy should reduce the location's accuracy for privacy reasons. + + + diff --git a/m4/gsettings.m4 b/m4/gsettings.m4 new file mode 100644 index 00000000..b6869898 --- /dev/null +++ b/m4/gsettings.m4 @@ -0,0 +1,80 @@ +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, + AC_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]) + AC_SUBST(GLIB_COMPILE_SCHEMAS, `$PKG_CONFIG --variable glib_compile_schemas gio-2.0`) + if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then + AC_MSG_ERROR([glib-compile-schemas not found.]) + fi + + GSETTINGS_RULES=' +.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas + +mostlyclean-am: clean-gsettings-schemas + +%.gschema.valid: %.gschema.xml + $(AM_V_GEN) if test -f "$^"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --dry-run --schema-file=$${d}$^ && touch [$]@ + +all-am: $(gsettings_SCHEMAS:.xml=.valid) +uninstall-am: uninstall-gsettings-schemas +install-data-am: install-gsettings-schemas + +.SECONDARY: $(gsettings_SCHEMAS) + +gsettings__base_list = \ + sed "$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g" | \ + sed "$$!N;$$!N;$$!N;$$!N;s/\n/ /g" + +install-gsettings-schemas: $(gsettings_SCHEMAS:.xml=.valid) + @$(NORMAL_INSTALL) + test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)" + @list='\''$(gsettings_SCHEMAS)'\''; test -n "$(gsettingsschemadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(gsettings__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '\''$(DESTDIR)$(gsettingsschemadir)'\''"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gsettingsschemadir)" || exit $$?; \ + done + test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) + +uninstall-gsettings-schemas: + @$(NORMAL_UNINSTALL) + @list='\''$(gsettings_SCHEMAS)'\''; 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) --uninstall $(gsettingsschemadir) + +clean-gsettings-schemas: + rm -f $(gsettings_SCHEMAS:.xml=.valid) + +' + _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])]) +] +)