grim/glibre

267ec7f57bc0
Parents e657370b2b59
Children 888fbe86d1c6
Start porting everything to the new window widget
--- a/src/glibre-application.c Mon Sep 20 22:46:39 2021 -0500
+++ b/src/glibre-application.c Tue Sep 21 02:23:35 2021 -0500
@@ -18,8 +18,8 @@
#include "glibre-application.h"
-#include "glibre.h"
#include "glibre-about-window.h"
+#include "glibre-window.h"
struct _GlibreApplication {
GtkApplication parent;
@@ -61,7 +61,9 @@
static void
glibre_application_activate(GApplication *app) {
- glibre_main();
+ GtkWidget *window = glibre_window_new(GTK_APPLICATION(app));
+
+ gtk_window_present(GTK_WINDOW(window));
}
/******************************************************************************
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/glibre-window.c Tue Sep 21 02:23:35 2021 -0500
@@ -0,0 +1,384 @@
+/*
+ * GlibRe - The glib regex tester
+ * Copyright (C) 2010-2021 Gary Kramlich <grim@reaperworld.com>
+ *
+ * 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/>.
+ */
+
+#include <glib/gi18n.h>
+
+#include "glibre-window.h"
+
+struct _GlibreWindow {
+ GtkApplicationWindow parent;
+
+ gboolean loaded;
+
+ GRegex *regex;
+ GtkTextBuffer *regex_buffer;
+ GtkWidget *regex_entry;
+
+ GtkWidget *method_match_one;
+ GtkWidget *method_match_all;
+ GtkWidget *method_split;
+
+ GtkWidget *c_caseless;
+ GtkWidget *c_multiline;
+ GtkWidget *c_dotall;
+ GtkWidget *c_extended;
+ GtkWidget *c_anchored;
+ GtkWidget *c_dollar_endonly;
+ GtkWidget *c_ungreedy;
+ GtkWidget *c_raw;
+ GtkWidget *c_no_auto_capture;
+ GtkWidget *c_optimize;
+ GtkWidget *c_dupnames;
+ GtkWidget *c_newline_cr;
+ GtkWidget *c_newline_lf;
+
+ GtkWidget *m_anchored;
+ GtkWidget *m_not_bol;
+ GtkWidget *m_not_eol;
+ GtkWidget *m_not_empty;
+ GtkWidget *m_partial;
+ GtkWidget *m_newline_cr;
+ GtkWidget *m_newline_lf;
+ GtkWidget *m_newline_any;
+
+ GtkTextBuffer *replacement_buffer;
+ GtkWidget *replacement_entry;
+
+ GtkTextBuffer *data_buffer;
+ GtkWidget *data_entry;
+
+ GtkTreeStore *groups_store;
+ GtkWidget *groups_tree;
+
+ GtkTextBuffer *results_buffer;
+ GtkWidget *results_entry;
+};
+
+G_DEFINE_TYPE(GlibreWindow, glibre_window, GTK_TYPE_APPLICATION_WINDOW)
+
+/******************************************************************************
+ * Helpers
+ *****************************************************************************/
+static inline gchar *
+glibre_window_get_buffer_text(GtkTextBuffer *buffer) {
+ GtkTextIter start, end;
+
+ gtk_text_buffer_get_start_iter(buffer, &start);
+ gtk_text_buffer_get_end_iter(buffer, &end);
+
+ return gtk_text_buffer_get_text(buffer, &start, &end, TRUE);
+}
+
+static GRegexCompileFlags
+glibre_window_get_compile_flags(GlibreWindow *window) {
+ GRegexCompileFlags flags = 0;
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_caseless))) {
+ flags |= G_REGEX_CASELESS;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_multiline))) {
+ flags |= G_REGEX_MULTILINE;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_dotall))) {
+ flags |= G_REGEX_DOTALL;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_extended))) {
+ flags |= G_REGEX_EXTENDED;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_anchored))) {
+ flags |= G_REGEX_ANCHORED;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_dollar_endonly))) {
+ flags |= G_REGEX_DOLLAR_ENDONLY;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_ungreedy))) {
+ flags |= G_REGEX_UNGREEDY;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_raw))) {
+ flags |= G_REGEX_RAW;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_no_auto_capture))) {
+ flags |= G_REGEX_NO_AUTO_CAPTURE;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_optimize))) {
+ flags |= G_REGEX_OPTIMIZE;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_dupnames))) {
+ flags |= G_REGEX_DUPNAMES;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_newline_cr))) {
+ flags |= G_REGEX_NEWLINE_CR;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->c_newline_lf))) {
+ flags |= G_REGEX_NEWLINE_LF;
+ }
+
+ return flags;
+}
+
+static GRegexMatchFlags
+glibre_window_get_match_flags(GlibreWindow *window) {
+ GRegexMatchFlags flags = 0;
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_anchored))) {
+ flags |= G_REGEX_MATCH_ANCHORED;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_not_bol))) {
+ flags |= G_REGEX_MATCH_NOTBOL;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_not_eol))) {
+ flags |= G_REGEX_MATCH_NOTEOL;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_not_empty))) {
+ flags |= G_REGEX_MATCH_NOTEMPTY;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_partial))) {
+ flags |= G_REGEX_MATCH_PARTIAL;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_newline_cr))) {
+ flags |= G_REGEX_MATCH_NEWLINE_CR;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_newline_lf))) {
+ flags |= G_REGEX_MATCH_NEWLINE_LF;
+ }
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->m_newline_any))) {
+ flags |= G_REGEX_MATCH_NEWLINE_ANY;
+ }
+
+ return flags;
+}
+
+static void
+glibre_window_update(GlibreWindow *window) {
+ GError *error = NULL;
+ GRegexCompileFlags compile_flags = 0;
+ GRegexMatchFlags match_flags = 0;
+ gchar *pattern = NULL, *data = NULL;
+
+ pattern = glibre_window_get_buffer_text(window->regex_buffer);
+
+ g_clear_pointer(&window->regex, g_regex_unref);
+
+ if(pattern == NULL || *pattern == '\0') {
+ g_free(pattern);
+
+ return;
+ }
+
+ compile_flags = glibre_window_get_compile_flags(window);
+ match_flags = glibre_window_get_match_flags(window);
+
+ window->regex = g_regex_new(pattern, compile_flags, match_flags, &error);
+ g_free(pattern);
+
+ if(error != NULL) {
+ g_warning("failed to compile regex: %s",
+ (error->message != NULL) ? error->message : "unknown");
+ }
+
+ /* clear the groups list */
+ gtk_tree_store_clear(window->groups_store);
+
+ /* grab the data */
+ data = glibre_window_get_buffer_text(window->data_buffer);
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->method_split))) {
+ GtkTreeIter iter;
+ gchar **groups = g_regex_split(window->regex, data, match_flags);
+ gint group = 0;
+
+ for(group = 0; groups[group] != NULL; group++) {
+ gchar *title = g_strdup_printf(_("Group %d"), group);
+
+ gtk_tree_store_append(window->groups_store, &iter, NULL);
+ gtk_tree_store_set(window->groups_store, &iter, 0, title, 1,
+ groups[group], -1);
+
+ g_free(title);
+ }
+
+ g_strfreev(groups);
+ } else {
+ GMatchInfo *match_info = NULL;
+ gboolean matched = FALSE;
+
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->method_match_one))) {
+ matched = g_regex_match(window->regex, data, match_flags,
+ &match_info);
+ } else if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->method_match_all))) {
+ matched = g_regex_match_all(window->regex, data, match_flags,
+ &match_info);
+ }
+
+ if(matched) {
+ gint match = 0;
+
+ do {
+ GtkTreeIter parent;
+ gchar *title = NULL;
+ gchar **groups = NULL;
+ gint group = 0;
+
+ title = g_strdup_printf(_("Match %d"), match);
+ gtk_tree_store_append(window->groups_store, &parent, NULL);
+ gtk_tree_store_set(window->groups_store, &parent, 0, title,
+ -1);
+ g_free(title);
+
+ groups = g_match_info_fetch_all(match_info);
+
+ for(group = 0; groups[group] != NULL; group++) {
+ GtkTreeIter child;
+
+ title = g_strdup_printf(_("Group %d"), group);
+ gtk_tree_store_append(window->groups_store, &child,
+ &parent);
+ gtk_tree_store_set(window->groups_store, &child, 0, title,
+ 1, groups[group], -1);
+
+ g_free(title);
+ }
+
+ g_strfreev(groups);
+
+ match++;
+ } while(g_match_info_next(match_info, NULL));
+ }
+
+ g_match_info_free(match_info);
+ }
+
+ /* expand all of the tree view nodes */
+ gtk_tree_view_expand_all(GTK_TREE_VIEW(window->groups_tree));
+
+ g_free(data);
+}
+
+/******************************************************************************
+ * Callbacks
+ *****************************************************************************/
+static void
+glibre_buffer_changed_cb(GtkTextBuffer *buffer, gpointer data) {
+ GlibreWindow *window = GLIBRE_WINDOW(data);
+
+ if(window->loaded) {
+ glibre_window_update(window);
+ }
+}
+
+static void
+glibre_toggle_toggled_cb(GtkToggleButton *button, gpointer data) {
+ GlibreWindow *window = GLIBRE_WINDOW(data);
+
+ if(window->loaded) {
+ glibre_window_update(window);
+ }
+}
+
+/******************************************************************************
+ * Public API
+ *****************************************************************************/
+static void
+glibre_window_init(GlibreWindow *window) {
+ gtk_widget_init_template(GTK_WIDGET(window));
+
+ window->loaded = TRUE;
+}
+
+static void
+glibre_window_class_init(GlibreWindowClass *klass) {
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
+
+ gtk_widget_class_set_template_from_resource(widget_class,
+ "/org/imfreedom/keep/grim/glibre/window.ui");
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, regex_buffer);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, regex_entry);
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, method_match_one);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, method_match_all);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, method_split);
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_caseless);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_multiline);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_dotall);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_extended);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_anchored);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_dollar_endonly);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_ungreedy);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_raw);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_no_auto_capture);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_optimize);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_dupnames);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_newline_cr);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, c_newline_lf);
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_anchored);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_not_bol);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_not_eol);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_not_empty);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_partial);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_newline_cr);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_newline_lf);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, m_newline_any);
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, replacement_buffer);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, replacement_entry);
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, data_buffer);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, data_entry);
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, groups_store);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, groups_tree);
+
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, results_buffer);
+ gtk_widget_class_bind_template_child(widget_class, GlibreWindow, results_entry);
+
+ gtk_widget_class_bind_template_callback(widget_class, glibre_buffer_changed_cb);
+ gtk_widget_class_bind_template_callback(widget_class, glibre_toggle_toggled_cb);
+}
+
+/******************************************************************************
+ * Public API
+ *****************************************************************************/
+GtkWidget *
+glibre_window_new(GtkApplication *application) {
+ return g_object_new(
+ GLIBRE_TYPE_WINDOW,
+ "application", application,
+ NULL);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/glibre-window.h Tue Sep 21 02:23:35 2021 -0500
@@ -0,0 +1,36 @@
+/*
+ * GlibRe - The glib regex tester
+ * Copyright (C) 2010-2021 Gary Kramlich <grim@reaperworld.com>
+ *
+ * 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 GLIBRE_WINDOW_H
+#define GLIBRE_WINDOW_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GLIBRE_TYPE_WINDOW (glibre_window_get_type())
+G_DECLARE_FINAL_TYPE(GlibreWindow, glibre_window, GLIBRE, WINDOW,
+ GtkApplicationWindow)
+
+GtkWidget *glibre_window_new(GtkApplication *application);
+
+G_END_DECLS
+
+#endif /* GLIBRE_WINDOW_H */
--- a/src/glibre.h Mon Sep 20 22:46:39 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#ifndef GLIBRE_H
-#define GLIBRE_H
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-void glibre_main(void);
-
-G_END_DECLS
-
-#endif /* GLIBRE_H */
--- a/src/meson.build Mon Sep 20 22:46:39 2021 -0500
+++ b/src/meson.build Tue Sep 21 02:23:35 2021 -0500
@@ -7,13 +7,13 @@
source_dir: 'resources')
glibre = executable('glibre',
- 'glibre.c',
- 'glibre.h',
'glibre-about-window.c',
'glibre-about-window.h',
'glibre-application.c',
'glibre-application.h',
'glibre-main.c',
+ 'glibre-window.c',
+ 'glibre-window.h',
glibre_resources,
dependencies: [GLIB, GTK3],
install: true,
--- a/src/resources/glibre.gresource.xml Mon Sep 20 22:46:39 2021 -0500
+++ b/src/resources/glibre.gresource.xml Tue Sep 21 02:23:35 2021 -0500
@@ -2,5 +2,6 @@
<gresources>
<gresource prefix="org/imfreedom/keep/grim/glibre">
<file compressed="true">about.ui</file>
+ <file compressed="true">window.ui</file>
</gresource>
</gresources>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/resources/window.ui Tue Sep 21 02:23:35 2021 -0500
@@ -0,0 +1,792 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface>
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkTextBuffer" id="data_buffer">
+ <signal name="changed" handler="glibre_buffer_changed_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ <object class="GtkTreeStore" id="groups_store">
+ <columns>
+ <!-- column-name Group -->
+ <column type="gchararray"/>
+ <!-- column-name Data -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkTextBuffer" id="regex_buffer">
+ <signal name="changed" handler="glibre_buffer_changed_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ <object class="GtkTextBuffer" id="replacement_buffer">
+ <signal name="changed" handler="glibre_buffer_changed_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ <object class="GtkTextBuffer" id="results_buffer">
+ <signal name="changed" handler="glibre_buffer_changed_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ <template class="GlibreWindow" parent="GtkApplicationWindow">
+ <property name="can-focus">False</property>
+ <property name="title" translatable="yes">Glibre</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkMenuBar">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">_File</property>
+ <property name="use-underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="action-name">app.quit</property>
+ <property name="label" translatable="yes">_Quit</property>
+ <property name="use-underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">_Edit</property>
+ <property name="use-underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="action-name">win.clear</property>
+ <property name="label" translatable="yes">_Clear</property>
+ <property name="use-underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use-underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="action-name">app.about</property>
+ <property name="label" translatable="yes">gtk-about</property>
+ <property name="use-underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">in</property>
+ <child>
+ <object class="GtkTextView" id="regex_entry">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="buffer">regex_buffer</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Regex</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkExpander">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkFlowBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkRadioButton" id="method_match_one">
+ <property name="label" translatable="yes">Match One</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkRadioButton" id="method_match_all">
+ <property name="label" translatable="yes">Match All</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">method_match_one</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="halign">start</property>
+ <child>
+ <object class="GtkRadioButton" id="method_split">
+ <property name="label" translatable="yes">Split</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">method_match_one</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="expander_method">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Method</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkExpander">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkFlowBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_caseless">
+ <property name="label" translatable="yes">Caseless</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_multiline">
+ <property name="label" translatable="yes">Multiline</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_dotall">
+ <property name="label" translatable="yes">Dotall</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_extended">
+ <property name="label" translatable="yes">Extended</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_anchored">
+ <property name="label" translatable="yes">Anchored</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_dollar_endonly">
+ <property name="label" translatable="yes">Dollar Endonly</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_ungreedy">
+ <property name="label" translatable="yes">Ungreedy</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_raw">
+ <property name="label" translatable="yes">Raw</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_no_auto_capture">
+ <property name="label" translatable="yes">No Auto Capture</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_optimize">
+ <property name="label" translatable="yes">Optimize</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_dupnames">
+ <property name="label" translatable="yes">Dupnames</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_newline_cr">
+ <property name="label" translatable="yes">Newline CR</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="c_newline_lf">
+ <property name="label" translatable="yes">Newline LF</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="expander_compile_options">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Compile Flags</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkExpander">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkFlowBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_anchored">
+ <property name="label" translatable="yes">Anchored</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_not_bol">
+ <property name="label" translatable="yes">Not BOL</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_not_eol">
+ <property name="label" translatable="yes">Not EOL</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_not_empty">
+ <property name="label" translatable="yes">Not Empty</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_partial">
+ <property name="label" translatable="yes">Partial</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_newline_cr">
+ <property name="label" translatable="yes">Newline CR</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_newline_lf">
+ <property name="label" translatable="yes">Newline LF</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <child>
+ <object class="GtkCheckButton" id="m_newline_any">
+ <property name="label" translatable="yes">Newline Any</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="glibre_toggle_toggled_cb" object="GlibreWindow" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="expander_match_options">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Match Flags</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">in</property>
+ <child>
+ <object class="GtkTextView" id="replacement_entry">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="buffer">replacement_buffer</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Replacement</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">in</property>
+ <child>
+ <object class="GtkTextView" id="data_entry">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="buffer">data_buffer</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Data</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">in</property>
+ <child>
+ <object class="GtkTreeView" id="groups_tree">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="model">groups_store</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection"/>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn">
+ <property name="title" translatable="yes">Group</property>
+ <child>
+ <object class="GtkCellRendererText"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn">
+ <property name="title" translatable="yes">Data</property>
+ <child>
+ <object class="GtkCellRendererText"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Groups</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">in</property>
+ <child>
+ <object class="GtkTextView" id="results_entry">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="buffer">results_buffer</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Results</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">8</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>