Upgrade GLib dependency to 2.38

This commit is contained in:
Gergely Polonkai 2014-06-29 16:53:52 +02:00
parent 172518f472
commit f744cb0150
6 changed files with 8 additions and 22 deletions

View File

@ -27,7 +27,7 @@ GTK_DOC_CHECK([1.19], [--flavour no-tmpl])
PKG_PROG_PKG_CONFIG
GLIB_GSETTINGS
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.30])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.38])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.8])
PKG_CHECK_MODULES([LIBXML], [libxml-2.0])

View File

@ -5,9 +5,6 @@
#include "config.h"
#include "astrognome.h"
struct _AgAppPrivate {
};
G_DEFINE_TYPE(AgApp, ag_app, GTK_TYPE_APPLICATION);
GtkWindow *

View File

@ -16,11 +16,9 @@ G_BEGIN_DECLS
typedef struct _AgApp AgApp;
typedef struct _AgAppClass AgAppClass;
typedef struct _AgAppPrivate AgAppPrivate;
struct _AgApp {
GtkApplication parent_instance;
AgAppPrivate *priv;
};
struct _AgAppClass {

View File

@ -33,9 +33,8 @@ typedef enum {
G_DEFINE_QUARK(ag_chart_error_quark, ag_chart_error);
G_DEFINE_TYPE(AgChart, ag_chart, GSWE_TYPE_MOMENT);
G_DEFINE_TYPE_WITH_PRIVATE(AgChart, ag_chart, GSWE_TYPE_MOMENT);
#define GET_PRIVATE(instance) (G_TYPE_INSTANCE_GET_PRIVATE((instance), AG_TYPE_CHART, AgChartPrivate))
#define ag_g_variant_unref(v) \
if ((v) != NULL) { \
g_variant_unref((v)); \
@ -56,8 +55,6 @@ ag_chart_class_init(AgChartClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
g_type_class_add_private(klass, sizeof(AgChartPrivate));
gobject_class->set_property = ag_chart_set_property;
gobject_class->get_property = ag_chart_get_property;
gobject_class->finalize = ag_chart_finalize;
@ -70,7 +67,7 @@ ag_chart_class_init(AgChartClass *klass)
static void
ag_chart_init(AgChart *chart)
{
chart->priv = GET_PRIVATE(chart);
chart->priv = ag_chart_get_instance_private(chart);
chart->priv->name = NULL;
chart->priv->country = NULL;
chart->priv->city = NULL;

View File

@ -1,9 +1,5 @@
#include "ag-settings.h"
G_DEFINE_TYPE(AgSettings, ag_settings, G_TYPE_OBJECT);
#define AG_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), AG_TYPE_SETTINGS, AgSettingsPrivate))
#define SETTINGS_SCHEMA_ID_WINDOW "eu.polonkai.gergely.Astrognome.state.window"
#define SETTINGS_SCHEMA_ID_CHART "eu.polonkai.gergely.Astrognome.state.chart"
@ -14,10 +10,12 @@ struct _AgSettingsPrivate {
GSettings *settings_chart;
};
G_DEFINE_TYPE_WITH_PRIVATE(AgSettings, ag_settings, G_TYPE_OBJECT);
static void
ag_settings_init(AgSettings *settings)
{
settings->priv = AG_SETTINGS_GET_PRIVATE(settings);
settings->priv = ag_settings_get_instance_private(settings);
settings->priv->settings_window = g_settings_new(SETTINGS_SCHEMA_ID_WINDOW);
settings->priv->settings_chart = g_settings_new(SETTINGS_SCHEMA_ID_CHART);
}
@ -45,7 +43,6 @@ ag_settings_class_init(AgSettingsClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
g_type_class_add_private(gobject_class, sizeof(AgSettingsPrivate));
gobject_class->dispose = ag_settings_dispose;
gobject_class->finalize = ag_settings_finalize;
}

View File

@ -46,9 +46,7 @@ struct _AgWindowPrivate {
G_DEFINE_QUARK(ag_window_error_quark, ag_window_error);
G_DEFINE_TYPE(AgWindow, ag_window, GTK_TYPE_APPLICATION_WINDOW);
#define GET_PRIVATE(instance) (G_TYPE_INSTANCE_GET_PRIVATE((instance), AG_TYPE_WINDOW, AgWindowPrivate))
G_DEFINE_TYPE_WITH_PRIVATE(AgWindow, ag_window, GTK_TYPE_APPLICATION_WINDOW);
static void recalculate_chart(AgWindow *window);
@ -408,7 +406,7 @@ ag_window_init(AgWindow *window)
GtkAccelGroup *accel_group;
GError *err = NULL;
window->priv = priv = GET_PRIVATE(window);
window->priv = priv = ag_window_get_instance_private(window);
priv->chart = NULL;
priv->uri = NULL;
@ -451,7 +449,6 @@ ag_window_class_init(AgWindowClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
g_type_class_add_private(klass, sizeof(AgWindowPrivate));
gobject_class->dispose = ag_window_dispose;
}