Commit 18ddcf98 authored by Christian Hergert's avatar Christian Hergert

initial commit.

parents
aclocal.m4
autom4te.cache
config.h
config.h.in
config.h.in~
config.log
config.status
configure
*.deps
.dirstamp
gnome-builder
*.libs
libtool
Makefile
Makefile.in
Makefile.in
*.o
stamp-h1
*.swp
This diff is collapsed.
include build/autotools/automake/Defaults.mk
include build/autotools/automake/ChangeLog.mk
include build/autotools/automake/AutomakeDocs.mk
ACLOCAL_AMFLAGS = -I build/autotools/m4 ${ACLOCAL_FLAGS}
include src/gnome-builder.mk
Builder - Develop software for GNOME
====================================
Bugs: https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-builder
Design: https://live.gnome.org/Design/Apps/Builder
Download: http://download.gnome.org/sources/gnome-builder
Git: http://git.gnome.org/browse/gnome-builder
Website: https://wiki.gnome.org/Apps/Builder
IRC: irc.gimp.net #gnome-builder
----
Builder attempts to be an IDE for writing software for GNOME. It does not try
to be a generic IDE, but one specialized for writing GNOME software. We believe
this this focus will help us to build something great.
If you would like to help in this effort, join our IRC channel and we will help
you find something to work on.
Builder is written in C, but some aspects of Builder may be written in another
language if it makes sense.
----
Builder is licensed under the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
#!/bin/sh
#
# Run this to generate all of the initial configure scripts and Makefiles.
#
# Switch to the source directory to initialize autoconf.
olddir=`pwd`
test -n "${srcdir}" || srcdir=`dirname "$0"`
test -n "${srcdir}" || srcdir=.
cd "${srcdir}"
# Load all of our autogen scripts for various features.
for script in build/autotools/autogen.d/*.sh; do
. "${script}"
done
# Discover the location of autoconf.
AUTORECONF=`which autoreconf`
if test -z "${AUTORECONF}"; then
echo "*** No autoreconf found, please install it ***"
exit 1
fi
# Generate m4 sub-configure scripts for inclusion by configure.ac.
for group in ac am config lt output print; do
for mode in pre post; do
FILE="build/autotools/autoconf.d/${mode}-${group}.m4"
cat build/autotools/autoconf.d/*.${mode}-${group} 2>/dev/null> ${FILE}
done
done
# Run autoconf to build configure.
autoreconf --force --install --verbose -I build/autotools ${ACLOCAL_FLAGS} || exit $?
# Remove that pesky autom4te.cache
rm -rf autom4te.cache
# Return to the original directory.
cd "$olddir"
# Unless NOCONFIGURE is set, run configure too.
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
compile
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
post-ac.m4
post-am.m4
post-config.m4
post-lt.m4
post-output.m4
pre-ac.m4
pre-am.m4
pre-config.m4
pre-lt.m4
pre-output.m4
echo " Debug ............................ : ${enable_debug}"
AC_ARG_ENABLE([tracing],
[AS_HELP_STRING([--enable-tracing=@<:@no/yes@:>@],
[turn on tracing @<:@default=no@:>@])],
[],
[enable_debug=no])
# use strict compiler flags only on development releases
m4_define([maintainer_flags_default], [m4_if(m4_eval(project_minor_version % 2), [1], [yes], [no])])
AC_ARG_ENABLE([maintainer-flags],
[AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],
[Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
[],
[enable_maintainer_flags=maintainer_flags_default])
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.12.0)
PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.40.0)
PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview-3.0 >= 3.12.0)
PKG_CHECK_MODULES(DEVHELP, libdevhelp-3.0 >= 3.12.0)
PKG_CHECK_MODULES(WEBKIT, webkit2gtk-4.0 >= 2.5.3)
PACKAGE_LT_CURRENT=lt_current
PACKAGE_LT_REVISION=lt_revision
PACKAGE_LT_AGE=lt_age
PACKAGE_LT_VERSION="$PACKAGE_LT_CURRENT:$PACKAGE_LT_REVISION:$PACKAGE_LT_AGE"
PACKAGE_LT_LDFLAGS="-version-info $PACKAGE_LT_VERSION"
# Check for various compiler flags.
AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"],
[AX_CHECK_COMPILE_FLAG([-Wall], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wall"])
AX_CHECK_COMPILE_FLAG([-Waggregate-return], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Waggregate-return"])
AX_CHECK_COMPILE_FLAG([-Wcast-align], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wcast-align"])
AX_CHECK_COMPILE_FLAG([-Wdeclaration-after-statement], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wdeclaration-after-statement"])
AX_CHECK_COMPILE_FLAG([-Wempty-body], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wempty-body"])
AX_CHECK_COMPILE_FLAG([-Wformat], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wformat"])
AX_CHECK_COMPILE_FLAG([-Wformat-nonliteral], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wformat-nonliteral"])
AX_CHECK_COMPILE_FLAG([-Wformat-security], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wformat-security"])
AX_CHECK_COMPILE_FLAG([-Winit-self], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Winit-self"])
AX_CHECK_COMPILE_FLAG([-Winline], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Winline"])
AX_CHECK_COMPILE_FLAG([-Wmissing-include-dirs], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wmissing-include-dirs"])
AX_CHECK_COMPILE_FLAG([-Wno-strict-aliasing], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wno-strict-aliasing"])
AX_CHECK_COMPILE_FLAG([-Wno-uninitialized], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wno-uninitialized"])
AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wredundant-decls"])
AX_CHECK_COMPILE_FLAG([-Wreturn-type], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wreturn-type"])
AX_CHECK_COMPILE_FLAG([-Wshadow], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wshadow"])
AX_CHECK_COMPILE_FLAG([-Wswitch-default], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wswitch-default"])
AX_CHECK_COMPILE_FLAG([-Wswitch-enum], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wswitch-enum"])
AX_CHECK_COMPILE_FLAG([-Wundef], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wundef"])
AX_CHECK_COMPILE_FLAG([-Wuninitialized], [MAINTAINER_CFLAGS="$MAINTAINER_CFLAGS -Wuninitialized"])])
AC_SUBST(MAINTAINER_CFLAGS)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
AM_CONDITIONAL([ENABLE_TRACING], [test "$enable_tracing" = "yes"])
m4_define([project_version], [project_major_version.project_minor_version.project_micro_version])
m4_define([project_binary_age], [m4_eval(100 * project_minor_version + project_micro_version)])
m4_define([lt_current], [m4_eval(100 * project_minor_version + project_micro_version - project_interface_age)])
m4_define([lt_revision], [project_interface_age])
m4_define([lt_age], [m4_eval(project_binary_age - project_interface_age)])
# Define the minimum version of Clang compiler.
m4_define(clang_major_required_version, 3)
m4_define(clang_minor_required_version, 3)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#if !(defined(__clang__) && ((__clang_major__ > clang_major_required_version) || ((__clang_major__ == clang_major_required_version) && (__clang_minor__ >= clang_minor_required_version))))
#error Not a supported Clang compiler
#endif
])], [c_compiler="clang"], [])
# Define the minimum version of GCC.
m4_define(gcc_major_required_version, 4)
m4_define(gcc_minor_required_version, 1)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#if !(defined(__GNUC__) && ((__GNUC__ > gcc_major_required_version) || ((__GNUC__ == gcc_major_required_version) && (__GNUC_MINOR__ >= gcc_minor_required_version))))
#error Not a supported GCC compiler
#endif
])], [c_compiler="gcc"], [])
# Define the minimum version of Sun C compiler.
m4_define(sunpro_c_required_version, 0x570)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#if !(defined(__SUNPRO_C) && __SUNPRO_C >= sunpro_c_required_version)
#error Not a supported Sun compiler
#endif
])], [c_compiler="sunpro_c"], [])
m4_include([build/autotools/autoconf.d/pre-config.m4])
PROJECT_NAME=project_name
echo "
${PROJECT_NAME} configured with the following options:
"
m4_include([build/autotools/autoconf.d/post-config.m4])
echo "
Run \"make\" to build ${PROJECT_NAME}.
"
LT_PREREQ([2.2])
AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
if [ -d .git ]; then
git submodule init
git submodule update
fi
automakedocsdir = $(docdir)
automakedocs_DATA = COPYING NEWS README
EXTRA_DIST += $(automakedocs_DATA)
dist-hook:
@if test -d "$(srcdir)/.git"; then \
(cd "$(srcdir)" && \
$(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
|| (rm -f ChangeLog.tmp; \
echo Failed to generate ChangeLog >&2); \
else \
echo A git checkout is required to generate a ChangeLog >&2; \
fi
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
bin_PROGRAMS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
noinst_PROGRAMS =
m4_define([project_name],[gnome-builder])
m4_define([project_major_version],[0])
m4_define([project_minor_version],[1])
m4_define([project_micro_version],[0])
m4_define([project_interface_age],[0])
m4_define([project_bugreport_url],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-builder])
AC_PREREQ(2.60)
m4_include([build/autotools/project_info.m4])
# Initialize autoconf and things that go with it.
m4_include([build/autotools/autoconf.d/pre-ac.m4])
AC_INIT([project_name],[project_version],[project_bugreport_url])
AC_CONFIG_MACRO_DIRS([build/autotools/m4])
AC_CONFIG_AUX_DIR([build/autotools])
AC_SUBST(ACLOCAL_AMFLAGS, "-I build/autotools")
AC_CONFIG_HEADERS([config.h])
m4_include([build/autotools/autoconf.d/post-ac.m4])
# Initlize libtool and things that go with it.
m4_include([build/autotools/autoconf.d/pre-lt.m4])
m4_include([build/autotools/autoconf.d/setup_libtool.m4])
LT_INIT
m4_include([build/autotools/autoconf.d/post-lt.m4])
# Initialize automake and things that go with it.
# We would put AM initialization in a file but autoreconf requires it.
m4_include([build/autotools/autoconf.d/pre-am.m4])
AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
AM_MAINTAINER_MODE([enable])
m4_include([build/autotools/autoconf.d/post-am.m4])
# If we are using gtk-doc, enable it.
# We would put this in a file but gtkdocize requires it.
m4_ifdef([GTK_DOC_CHECK],[
GTK_DOC_CHECK
])
# Define our known config files.
AC_CONFIG_FILES([Makefile])
# Last change to configure things and write configuration files.
m4_include([build/autotools/autoconf.d/pre-output.m4])
AC_OUTPUT
m4_include([build/autotools/autoconf.d/post-output.m4])
# Print configuration information.
m4_include([build/autotools/autoconf.d/print_config.m4])
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">Builder</name>
<shortdesc xml:lang="en">
An IDE for writing GNOME-based software.
</shortdesc>
<homepage rdf:resource="https://wiki.gnome.org/Apps/Builder" />
<download-page rdf:resource="http://download.gnome.org/sources/gnome-builder/" />
<bug-database rdf:resource="https://bugzilla.gnome.org/browse.cgi?product=gnome-builder" />
<category rdf:resource="http://api.gnome.org/doap-extensions#apps" />
<maintainer>
<foaf:Person>
<foaf:name>Christian Hergert</foaf:name>
<foaf:mbox rdf:resource="mailto:christian@hergert.me" />
<gnome:userid>chergert</gnome:userid>
</foaf:Person>
</maintainer>
</Project>
This diff is collapsed.
/* gb-animation.h
*
* Copyright (C) 2013 Christian Hergert <christian@hergert.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GB_ANIMATION_H
#define GB_ANIMATION_H
#include <gdk/gdk.h>
G_BEGIN_DECLS
#define GB_TYPE_ANIMATION (gb_animation_get_type())
#define GB_TYPE_ANIMATION_MODE (gb_animation_mode_get_type())
#define GB_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GB_TYPE_ANIMATION, GbAnimation))
#define GB_ANIMATION_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GB_TYPE_ANIMATION, GbAnimation const))
#define GB_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GB_TYPE_ANIMATION, GbAnimationClass))
#define GB_IS_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GB_TYPE_ANIMATION))
#define GB_IS_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GB_TYPE_ANIMATION))
#define GB_ANIMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GB_TYPE_ANIMATION, GbAnimationClass))
typedef struct _GbAnimation GbAnimation;
typedef struct _GbAnimationClass GbAnimationClass;
typedef struct _GbAnimationPrivate GbAnimationPrivate;
typedef enum _GbAnimationMode GbAnimationMode;
enum _GbAnimationMode
{
GB_ANIMATION_LINEAR,
GB_ANIMATION_EASE_IN_QUAD,
GB_ANIMATION_EASE_OUT_QUAD,
GB_ANIMATION_EASE_IN_OUT_QUAD,
GB_ANIMATION_EASE_IN_CUBIC,
GB_ANIMATION_EASE_OUT_CUBIC,
GB_ANIMATION_LAST
};
struct _GbAnimation
{
GInitiallyUnowned parent;
/*< private >*/
GbAnimationPrivate *priv;
};
struct _GbAnimationClass
{
GInitiallyUnownedClass parent_class;
};
GType gb_animation_get_type (void) G_GNUC_CONST;
GType gb_animation_mode_get_type (void) G_GNUC_CONST;
void gb_animation_start (GbAnimation *animation);
void gb_animation_stop (GbAnimation *animation);
void gb_animation_add_property (GbAnimation *animation,
GParamSpec *pspec,
const GValue *value);
GbAnimation* gb_object_animate (gpointer object,
GbAnimationMode mode,
guint duration_msec,
GdkFrameClock *frame_clock,
const gchar *first_property,
...) G_GNUC_NULL_TERMINATED;
GbAnimation* gb_object_animate_full (gpointer object,
GbAnimationMode mode,
guint duration_msec,
GdkFrameClock *frame_clock,
GDestroyNotify notify,
gpointer notify_data,
const gchar *first_property,
...) G_GNUC_NULL_TERMINATED;
G_END_DECLS
#endif /* GB_ANIMATION_H */
/*
* Based upon code from Clutter:
*
* Authored By Neil Roberts <neil@linux.intel.com>
*
* Copyright (C) 2009 Intel Corporation.
* Copyright (C) 2012 Christian Hergert.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gb-frame-source.h"
typedef struct
{
GSource parent;
guint fps;
guint frame_count;
gint64 start_time;
} GbFrameSource;
static gboolean
gb_frame_source_prepare (GSource *source,
gint *timeout_)
{
GbFrameSource *fsource = (GbFrameSource *)source;
gint64 current_time;
guint elapsed_time;
guint new_frame_num;
guint frame_time;
current_time = g_source_get_time(source) / 1000;
elapsed_time = current_time - fsource->start_time;
new_frame_num = elapsed_time * fsource->fps / 1000;
/* If time has gone backwards or the time since the last frame is
* greater than the two frames worth then reset the time and do a
* frame now */
if (new_frame_num < fsource->frame_count ||
new_frame_num - fsource->frame_count > 2) {
/* Get the frame time rounded up to the nearest ms */
frame_time = (1000 + fsource->fps - 1) / fsource->fps;
/* Reset the start time */
fsource->start_time = current_time;
/* Move the start time as if one whole frame has elapsed */
fsource->start_time -= frame_time;
fsource->frame_count = 0;
*timeout_ = 0;
return TRUE;
} else if (new_frame_num > fsource->frame_count) {
*timeout_ = 0;
return TRUE;
} else {
*timeout_ = (fsource->frame_count + 1) * 1000 / fsource->fps - elapsed_time;
return FALSE;
}
}
static gboolean
gb_frame_source_check (GSource *source)
{
gint timeout_;
return gb_frame_source_prepare(source, &timeout_);
}
static gboolean
gb_frame_source_dispatch (GSource *source,
GSourceFunc source_func,
gpointer user_data)
{
GbFrameSource *fsource = (GbFrameSource *)source;
gboolean ret;
if ((ret = source_func(user_data)))
fsource->frame_count++;
return ret;
}
static GSourceFuncs source_funcs = {
gb_frame_source_prepare,
gb_frame_source_check,
gb_frame_source_dispatch,
};
/**
* gb_frame_source_add:
* @frames_per_sec: (in): Target frames per second.
* @callback: (in) (scope notified): A #GSourceFunc to execute.
* @user_data: (in): User data for @callback.
*
* Creates a new frame source that will execute when the timeout interval
* for the source has elapsed. The timing will try to synchronize based
* on the end time of the animation.
*
* Returns: A source id that can be removed with g_source_remove().
*/
guint
gb_frame_source_add (guint frames_per_sec,
GSourceFunc callback,
gpointer user_data)
{
GbFrameSource *fsource;
GSource *source;
guint ret;
g_return_val_if_fail(frames_per_sec > 0, 0);
g_return_val_if_fail(frames_per_sec < 120, 0);
source = g_source_new(&source_funcs, sizeof(GbFrameSource));
fsource = (GbFrameSource *)source;
fsource->fps = frames_per_sec;
fsource->frame_count = 0;
fsource->start_time = g_get_monotonic_time() / 1000;
g_source_set_callback(source, callback, user_data, NULL);
g_source_set_name(source, "GbFrameSource");
ret = g_source_attach(source, NULL);
g_source_unref(source);
return ret;
}
/* gb-frame-source.h
*
* Copyright (C) 2013 Christian Hergert <christian@hergert.me>
*
* This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GB_FRAME_SOURCE_H
#define GB_FRAME_SOURCE_H
#include <glib.h>
G_BEGIN_DECLS
guint gb_frame_source_add (guint frames_per_sec,
GSourceFunc callback,
gpointer user_data);
G_END_DECLS
#endif /* GB_FRAME_SOURCE_H */
/* gb-application.c
*
* Copyright (C) 2014 Christian Hergert <christian@hergert.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define G_LOG_DOMAIN "app"
#define ADWAITA_CSS "resource:///org/gnome/builder/css/builder.Adwaita.css"
#include <glib/gi18n.h>
#include "gb-application.h"
#include "gb-log.h"
#include "gb-keybindings.h"
#include "gb-resources.h"
#include "gb-workbench.h"
G_DEFINE_TYPE (GbApplication, gb_application, GTK_TYPE_APPLICATION)
static void
theme_changed (GtkSettings *settings)
{
static GtkCssProvider *provider = NULL;
GdkScreen *screen;
gchar *theme;
ENTRY;
g_object_get (settings, "gtk-theme-name", &theme, NULL);
screen = gdk_screen_get_default ();
if (g_str_equal (theme, "Adwaita"))
{
if (provider == NULL)
{
GFile *file;
provider = gtk_css_provider_new ();
file = g_file_new_for_uri (ADWAITA_CSS);
gtk_css_provider_load_from_file (provider, file, NULL);
g_object_unref (file);
}
gtk_style_context_add_provider_for_screen (screen,
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
else if (provider != NULL)
{
gtk_style_context_remove_provider_for_screen (screen,
GTK_STYLE_PROVIDER (provider));
g_clear_object (&provider);
}
g_free (theme);
EXIT;
}
static void
setup_theme_extensions (void)
{
GtkSettings *settings;
ENTRY;
/* Set up a handler to load our custom css for Adwaita.
* See https://bugzilla.gnome.org/show_bug.cgi?id=732959
* for a more automatic solution that is still under discussion.
*/
settings = gtk_settings_get_default ();
g_signal_connect (settings,
"notify::gtk-theme-name",
G_CALLBACK (theme_changed),
NULL);
theme_changed (settings);
EXIT;