Skip to content

Commit

Permalink
Merge remote-tracking branch 'mcepl/remove_gconf-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-hellings committed Mar 17, 2020
2 parents 5b2eeb9 + 13801fb commit 732f496
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 77 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Expand Up @@ -81,7 +81,6 @@ requires:
- itstool
- libbiblesync-dev
- libdbus-glib-1-dev
- libgconf2-dev
- libglade2-dev
- libgsf-1-dev
- libenchant-dev
Expand All @@ -106,7 +105,6 @@ requires:
- desktop-file-utils
- docbook-utils
- gcc-c++
- gconfmm26-devel
- gtk3-devel
- gtkhtml3-devel
- intltool
Expand Down Expand Up @@ -163,7 +161,6 @@ before_scripts:
su -l aur_install -c "cd $1 && makepkg --noconfirm -si"
}
aur_install biblesync
aur_install gconf
aur_install gtkhtml4
fi
if [ "${DISTRO_NAME}" == "debian" -o "${DISTRO_NAME}" == "ubuntu" ]; then
Expand Down
1 change: 0 additions & 1 deletion cmake/XiphosDependencies.cmake
Expand Up @@ -86,7 +86,6 @@ pkg_check_modules(Gnome REQUIRED IMPORTED_TARGET
"gobject-2.0"
"libsoup-2.4"
"pango"
"gconf-2.0"
"libgsf-1>=1.14"
"libxml-2.0>=2.7.8"
)
Expand Down
66 changes: 0 additions & 66 deletions src/gtk/gui.c
Expand Up @@ -68,9 +68,6 @@ void gui_init(int argc, char *argv[])
if (!gtk_init_with_args(&argc, &argv, NULL, NULL, NULL, NULL)) {
exit(1);
};
#ifndef WIN32
gconf_setup();
#endif
#ifdef HAVE_DBUS
ipc = ipc_init_dbus_connection(ipc);
#endif
Expand All @@ -81,69 +78,6 @@ void gui_main(void)
gtk_main();
}

/******************************************************************************
* Name
* gconf_setup
*
* Synopsis
* #include "main/settings.h"
*
* void gconf_setup()
*
* Description
* verifies and initializes the GConf subsystem, so that "sword://" and
* similar can be handled by url-comprehending programs such as browsers.
* dialogs for permission/success/failure => conditional on debug build.
*
* Return value
* void
*/

/* NOTE: removed query for user permission to install handlers around -r4528. */
/* we don't ask any more, because there's no good reason not to take over. */

char *gconf_keys[GS_GCONF_MAX][2] = {
{"/desktop/gnome/url-handlers/bible/command", "xiphos-nav \"%s\""},
{"/desktop/gnome/url-handlers/bible/enabled", (char *)1},
{"/desktop/gnome/url-handlers/bible/needs_terminal", (char *)0},
{"/desktop/gnome/url-handlers/sword/command", "xiphos-nav \"%s\""},
{"/desktop/gnome/url-handlers/sword/enabled", (char *)1},
{"/desktop/gnome/url-handlers/sword/needs_terminal", (char *)0}};

#ifndef WIN32
void gconf_setup()
{
gchar *str;
GConfClient *client = gconf_client_get_default();

if (client == NULL)
return; /* we're not running under GConf */

/*
* This is deliberately somewhat simple-minded, at least for now.
* We care about one thing: Is anything set to handle "bible://"?
*
* Unfortunate consequence of changing xiphos2 => xiphos:
* We must fix broken keys.
*/
if ((((str = gconf_client_get_string(client, gconf_keys[0][0],
NULL)) == NULL) ||
(strncmp(str, "xiphos ", 7) == 0))) {
/*
* Mechanical as can be, one after another.
*/
int i;
for (i = 0; i < GS_GCONF_MAX; ++i) {
(((i % 3) == 0) /* contrived hack */
? gconf_client_set_string(client, gconf_keys[i][0], gconf_keys[i][1], NULL)
: gconf_client_set_bool(client,
gconf_keys[i][0],
(gconf_keys[i][1] ? TRUE : FALSE), NULL));
}
}
}
#endif /* WIN32 */

#ifdef DEBUG

/* NOTE: these routines are here only and exactly because there is no other */
Expand Down
7 changes: 0 additions & 7 deletions src/gui/gui.h
Expand Up @@ -4,13 +4,6 @@
void gui_init(int argc, char *argv[]);
void gui_main(void);

#ifndef WIN32
#include <gconf/gconf-client.h>
void gconf_setup(void);
#endif

#define GS_GCONF_MAX 6

#ifdef DEBUG

gchar *XI_g_strdup_printf(const char *filename,
Expand Down

0 comments on commit 732f496

Please sign in to comment.