<commit_before>/* Theming/Style Classes :: theming.ui
 *
 * GTK+ uses CSS for theming. Style classes can be associated
 * with widgets to inform the theme about intended rendering.
 *
 * This demo shows some common examples where theming features
 * of GTK+ are used for certain effects: primary toolbars,
 * inline toolbars and linked buttons.
 */

#include <gtk/gtk.h>
#include "demo-common.h"

static GtkWidget *window = NULL;

GtkWidget *
do_theming_style_classes (GtkWidget *do_widget)
{
  GtkWidget *grid;
  GtkBuilder *builder;
  gchar *filename;
  GError *err = NULL;

  if (!window)
    {
      window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
      gtk_window_set_screen (GTK_WINDOW (window),
                             gtk_widget_get_screen (do_widget));
      gtk_window_set_title (GTK_WINDOW (window), "Theming");
      gtk_container_set_border_width (GTK_CONTAINER (window), 12);
      g_signal_connect (window, "destroy",
                        G_CALLBACK (gtk_widget_destroyed), &window);

      builder = gtk_builder_new ();
      filename = demo_find_file ("theming.ui", NULL);
      gtk_builder_add_from_file (builder, filename, &err);
      g_free (filename);
      if (err)
        {
          g_error ("ERROR: %s\n", err->message);
          return NULL;
        }

      grid = (GtkWidget *)gtk_builder_get_object (builder, "grid");
      gtk_widget_show_all (grid);
      gtk_container_add (GTK_CONTAINER (window), grid);
      g_object_unref (builder);
    }

  if (!gtk_widget_get_visible (window))
    {
      gtk_widget_show (window);
    }<commit_msg>Update window title<commit_after>/* Theming/Style Classes :: theming.ui
 *
 * GTK+ uses CSS for theming. Style classes can be associated
 * with widgets to inform the theme about intended rendering.
 *
 * This demo shows some common examples where theming features
 * of GTK+ are used for certain effects: primary toolbars,
 * inline toolbars and linked buttons.
 */

#include <gtk/gtk.h>
#include "demo-common.h"

static GtkWidget *window = NULL;

GtkWidget *
do_theming_style_classes (GtkWidget *do_widget)
{
  GtkWidget *grid;
  GtkBuilder *builder;
  gchar *filename;
  GError *err = NULL;

  if (!window)
    {
      window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
      gtk_window_set_screen (GTK_WINDOW (window),
                             gtk_widget_get_screen (do_widget));
      gtk_window_set_title (GTK_WINDOW (window), "Style Classes");
      gtk_container_set_border_width (GTK_CONTAINER (window), 12);
      g_signal_connect (window, "destroy",
                        G_CALLBACK (gtk_widget_destroyed), &window);

      builder = gtk_builder_new ();
      filename = demo_find_file ("theming.ui", NULL);
      gtk_builder_add_from_file (builder, filename, &err);
      g_free (filename);
      if (err)
        {
          g_error ("ERROR: %s\n", err->message);
          return NULL;
        }

      grid = (GtkWidget *)gtk_builder_get_object (builder, "grid");
      gtk_widget_show_all (grid);
      gtk_container_add (GTK_CONTAINER (window), grid);
      g_object_unref (builder);
    }

  if (!gtk_widget_get_visible (window))
    {
      gtk_widget_show (window);
    }
{'fraction_non_alphanumeric': 0.10270951480781348, 'fraction_numerical': 0.001260239445494644, 'mean_word_length': 3.0705128205128207, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3090181', 'n_tokens_mistral': 1058, 'n_tokens_neox': 1009, 'n_words': 261}