<commit_before>/*
 Copyright (C) 2007-2009 <NAME> <<EMAIL>>

 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.1 of the License, or (at your option) any later version.

 See the file COPYING for the full license text.
*/

#include "katze-utils.h"

#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include <gio/gio.h>

#include <string.h>

#if HAVE_CONFIG_H
    #include "config.h"
#endif

#if HAVE_UNISTD_H
    #include <unistd.h>
#endif

#ifdef HAVE_HILDON_2_2
    #include <hildon/hildon.h>
#endif

#if !GTK_CHECK_VERSION (2, 18, 0)
    #define gtk_widget_get_has_window(wdgt) !GTK_WIDGET_NO_WINDOW (wdgt)
    #define gtk_widget_get_allocation (wdgt, alloc) *alloc = wdgt->allocation
#endif

static void
proxy_toggle_button_toggled_cb (GtkToggleButton* button,
                                GObject*         object)
{
    gboolean toggled;
    const gchar* property;

    #ifdef HAVE_HILDON_2_2
    if (HILDON_IS_CHECK_BUTTON (button))
        toggled = hildon_check_button_get_active (HILDON_CHECK_BUTTON (button));<commit_msg>Declare widget allocation macros for GTK+ < 2.18 properly<commit_after>/*
 Copyright (C) 2007-2009 <NAME> <<EMAIL>>

 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.1 of the License, or (at your option) any later version.

 See the file COPYING for the full license text.
*/

#include "katze-utils.h"

#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include <gio/gio.h>

#include <string.h>

#if HAVE_CONFIG_H
    #include "config.h"
#endif

#if HAVE_UNISTD_H
    #include <unistd.h>
#endif

#ifdef HAVE_HILDON_2_2
    #include <hildon/hildon.h>
#endif

#if !GTK_CHECK_VERSION (2, 18, 0)
    #define gtk_widget_get_has_window(wdgt) !GTK_WIDGET_NO_WINDOW (wdgt)
    #define gtk_widget_get_allocation(wdgt, alloc) *alloc = wdgt->allocation
#endif

static void
proxy_toggle_button_toggled_cb (GtkToggleButton* button,
                                GObject*         object)
{
    gboolean toggled;
    const gchar* property;

    #ifdef HAVE_HILDON_2_2
    if (HILDON_IS_CHECK_BUTTON (button))
        toggled = hildon_check_button_get_active (HILDON_CHECK_BUTTON (button));
{'fraction_non_alphanumeric': 0.09204498125780924, 'fraction_numerical': 0.01790920449812578, 'mean_word_length': 3.8329979879275653, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1026816', 'n_tokens_mistral': 883, 'n_tokens_neox': 855, 'n_words': 243}