Blob Blame History Raw
/* result-panel.c generated by valac 0.40.2, the Vala compiler
 * generated from result-panel.vala, do not modify */

/*
* Copyright (C) 2015 The Lemon Man
*
* 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 2, 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gedit/gedit-window.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <gedit/gedit-commands.h>
#include <gio/gio.h>


#define GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL (gedit_find_in_files_plugin_result_panel_get_type ())
#define GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL, GeditFindInFilesPluginResultPanel))
#define GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL, GeditFindInFilesPluginResultPanelClass))
#define GEDIT_FIND_IN_FILES_PLUGIN_IS_RESULT_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL))
#define GEDIT_FIND_IN_FILES_PLUGIN_IS_RESULT_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL))
#define GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL, GeditFindInFilesPluginResultPanelClass))

typedef struct _GeditFindInFilesPluginResultPanel GeditFindInFilesPluginResultPanel;
typedef struct _GeditFindInFilesPluginResultPanelClass GeditFindInFilesPluginResultPanelClass;
typedef struct _GeditFindInFilesPluginResultPanelPrivate GeditFindInFilesPluginResultPanelPrivate;

#define GEDIT_FIND_IN_FILES_PLUGIN_TYPE_FIND_JOB (gedit_find_in_files_plugin_find_job_get_type ())
#define GEDIT_FIND_IN_FILES_PLUGIN_FIND_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_FIND_JOB, GeditFindInFilesPluginFindJob))
#define GEDIT_FIND_IN_FILES_PLUGIN_FIND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_FIND_JOB, GeditFindInFilesPluginFindJobClass))
#define GEDIT_FIND_IN_FILES_PLUGIN_IS_FIND_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_FIND_JOB))
#define GEDIT_FIND_IN_FILES_PLUGIN_IS_FIND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_FIND_JOB))
#define GEDIT_FIND_IN_FILES_PLUGIN_FIND_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_FIND_JOB, GeditFindInFilesPluginFindJobClass))

typedef struct _GeditFindInFilesPluginFindJob GeditFindInFilesPluginFindJob;
typedef struct _GeditFindInFilesPluginFindJobClass GeditFindInFilesPluginFindJobClass;
enum  {
	GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL_0_PROPERTY,
	GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL_NUM_PROPERTIES
};
static GParamSpec* gedit_find_in_files_plugin_result_panel_properties[GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL_NUM_PROPERTIES];
#define _gedit_find_in_files_plugin_find_job_unref0(var) ((var == NULL) ? NULL : (var = (gedit_find_in_files_plugin_find_job_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

#define GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT (gedit_find_in_files_plugin_result_get_type ())
typedef struct _GeditFindInFilesPluginResult GeditFindInFilesPluginResult;
typedef struct _Block3Data Block3Data;

struct _GeditFindInFilesPluginResultPanel {
	GtkOverlay parent_instance;
	GeditFindInFilesPluginResultPanelPrivate * priv;
};

struct _GeditFindInFilesPluginResultPanelClass {
	GtkOverlayClass parent_class;
};

struct _GeditFindInFilesPluginResultPanelPrivate {
	GeditFindInFilesPluginFindJob* job;
	gchar* root;
	GtkTreeView* list;
	GtkTreeStore* results_model;
	GtkButton* stop_button;
	GeditWindow* win;
};

struct _Block2Data {
	int _ref_count_;
	GeditFindInFilesPluginResultPanel* self;
	GHashTable* it_table;
};

struct _GeditFindInFilesPluginResult {
	gchar* path;
	gsize line;
	gchar* context;
};

struct _Block3Data {
	int _ref_count_;
	Block2Data * _data2_;
	GeditFindInFilesPluginResult _result_;
};


static gpointer gedit_find_in_files_plugin_result_panel_parent_class = NULL;
static GType gedit_find_in_files_plugin_result_panel_type_id = 0;

void gedit_find_in_files_plugin_toggle_fold (GtkTreeView* tv,
                                             GtkTreePath* path);
GType gedit_find_in_files_plugin_result_panel_get_type (void) G_GNUC_CONST;
gpointer gedit_find_in_files_plugin_find_job_ref (gpointer instance);
void gedit_find_in_files_plugin_find_job_unref (gpointer instance);
GParamSpec* gedit_find_in_files_plugin_param_spec_find_job (const gchar* name,
                                                            const gchar* nick,
                                                            const gchar* blurb,
                                                            GType object_type,
                                                            GParamFlags flags);
void gedit_find_in_files_plugin_value_set_find_job (GValue* value,
                                                    gpointer v_object);
void gedit_find_in_files_plugin_value_take_find_job (GValue* value,
                                                     gpointer v_object);
gpointer gedit_find_in_files_plugin_value_get_find_job (const GValue* value);
GType gedit_find_in_files_plugin_find_job_get_type (void) G_GNUC_CONST;
#define GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL, GeditFindInFilesPluginResultPanelPrivate))
void gedit_find_in_files_plugin_find_job_halt (GeditFindInFilesPluginFindJob* self);
void gedit_find_in_files_plugin_result_panel_grab_focus (GeditFindInFilesPluginResultPanel* self);
static gboolean gedit_find_in_files_plugin_result_panel_list_search (GeditFindInFilesPluginResultPanel* self,
                                                              GtkTreeModel* model,
                                                              gint column,
                                                              const gchar* key,
                                                              GtkTreeIter* iter);
static gboolean gedit_find_in_files_plugin_result_panel_on_button_press (GeditFindInFilesPluginResultPanel* self,
                                                                  GdkEventButton* event);
static void ___lambda7_ (GeditFindInFilesPluginResultPanel* self);
static void ____lambda7__gtk_menu_item_activate (GtkMenuItem* _sender,
                                          gpointer self);
static void gedit_find_in_files_plugin_result_panel_on_row_activated (GeditFindInFilesPluginResultPanel* self,
                                                               GtkTreePath* path,
                                                               GtkTreeViewColumn* column);
static gchar* gedit_find_in_files_plugin_result_panel_get_relative_path (GeditFindInFilesPluginResultPanel* self,
                                                                  const gchar* path,
                                                                  const gchar* from);
static void gedit_find_in_files_plugin_result_panel_column_data_func (GeditFindInFilesPluginResultPanel* self,
                                                               GtkTreeViewColumn* column,
                                                               GtkCellRenderer* cell,
                                                               GtkTreeModel* model,
                                                               GtkTreeIter* iter);
GeditFindInFilesPluginResultPanel* gedit_find_in_files_plugin_result_panel_new_for_job (GeditFindInFilesPluginFindJob* job_,
                                                                                        const gchar* root_,
                                                                                        GeditWindow* win_);
GeditFindInFilesPluginResultPanel* gedit_find_in_files_plugin_result_panel_construct_for_job (GType object_type,
                                                                                              GeditFindInFilesPluginFindJob* job_,
                                                                                              const gchar* root_,
                                                                                              GeditWindow* win_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void _g_free0_ (gpointer var);
GType gedit_find_in_files_plugin_result_get_type (void) G_GNUC_CONST;
GeditFindInFilesPluginResult* gedit_find_in_files_plugin_result_dup (const GeditFindInFilesPluginResult* self);
void gedit_find_in_files_plugin_result_free (GeditFindInFilesPluginResult* self);
void gedit_find_in_files_plugin_result_copy (const GeditFindInFilesPluginResult* self,
                                             GeditFindInFilesPluginResult* dest);
void gedit_find_in_files_plugin_result_destroy (GeditFindInFilesPluginResult* self);
static void __lambda8_ (Block2Data* _data2_,
                 GeditFindInFilesPluginResult* _result_);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean __lambda9_ (Block3Data* _data3_);
static GtkTreeIter* _gtk_tree_iter_dup (GtkTreeIter* self);
static gboolean ___lambda9__gsource_func (gpointer self);
static void ___lambda8__gedit_find_in_files_plugin_find_job_on_match_found (GeditFindInFilesPluginFindJob* _sender,
                                                                     GeditFindInFilesPluginResult* _result_,
                                                                     gpointer self);
static void __lambda10_ (GeditFindInFilesPluginResultPanel* self);
static void ___lambda10__gedit_find_in_files_plugin_find_job_on_search_finished (GeditFindInFilesPluginFindJob* _sender,
                                                                          gpointer self);
static gboolean _gedit_find_in_files_plugin_result_panel_list_search_gtk_tree_view_search_equal_func (GtkTreeModel* model,
                                                                                               gint column,
                                                                                               const gchar* key,
                                                                                               GtkTreeIter* iter,
                                                                                               gpointer self);
static void _gedit_find_in_files_plugin_result_panel_column_data_func_gtk_tree_cell_data_func (GtkTreeViewColumn* tree_column,
                                                                                        GtkCellRenderer* cell,
                                                                                        GtkTreeModel* tree_model,
                                                                                        GtkTreeIter* iter,
                                                                                        gpointer self);
static void _gedit_find_in_files_plugin_result_panel_on_row_activated_gtk_tree_view_row_activated (GtkTreeView* _sender,
                                                                                            GtkTreePath* path,
                                                                                            GtkTreeViewColumn* column,
                                                                                            gpointer self);
static gboolean _gedit_find_in_files_plugin_result_panel_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                                 GdkEventButton* event,
                                                                                                 gpointer self);
static void __lambda11_ (GeditFindInFilesPluginResultPanel* self);
static void ___lambda11__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
void gedit_find_in_files_plugin_result_panel_toggle_stop_button (GeditFindInFilesPluginResultPanel* self,
                                                                 gboolean show);
GeditFindInFilesPluginResultPanel* gedit_find_in_files_plugin_result_panel_new (void);
GeditFindInFilesPluginResultPanel* gedit_find_in_files_plugin_result_panel_construct (GType object_type);
static void gedit_find_in_files_plugin_result_panel_finalize (GObject * obj);


void
gedit_find_in_files_plugin_toggle_fold (GtkTreeView* tv,
                                        GtkTreePath* path)
{
	g_return_if_fail (tv != NULL);
	g_return_if_fail (path != NULL);
	if (gtk_tree_view_row_expanded (tv, path)) {
		gtk_tree_view_collapse_row (tv, path);
	} else {
		gtk_tree_view_expand_row (tv, path, FALSE);
	}
}


void
gedit_find_in_files_plugin_result_panel_grab_focus (GeditFindInFilesPluginResultPanel* self)
{
	GtkTreeView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->list;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
}


static gboolean
gedit_find_in_files_plugin_result_panel_list_search (GeditFindInFilesPluginResultPanel* self,
                                                     GtkTreeModel* model,
                                                     gint column,
                                                     const gchar* key,
                                                     GtkTreeIter* iter)
{
	gboolean result = FALSE;
	GValue val = {0};
	GtkTreeIter _tmp0_;
	GValue _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (model != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = *iter;
	gtk_tree_model_get_value (model, &_tmp0_, 0, &_tmp1_);
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
	val = _tmp1_;
	_tmp3_ = g_value_get_string (&val);
	_tmp4_ = strstr (_tmp3_, key);
	if (_tmp4_ != NULL) {
		_tmp2_ = FALSE;
	} else {
		_tmp2_ = TRUE;
	}
	result = _tmp2_;
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
	return result;
}


static void
___lambda7_ (GeditFindInFilesPluginResultPanel* self)
{
	gtk_widget_destroy ((GtkWidget*) self);
}


static void
____lambda7__gtk_menu_item_activate (GtkMenuItem* _sender,
                                     gpointer self)
{
	___lambda7_ ((GeditFindInFilesPluginResultPanel*) self);
}


static gboolean
gedit_find_in_files_plugin_result_panel_on_button_press (GeditFindInFilesPluginResultPanel* self,
                                                         GdkEventButton* event)
{
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	GdkEventType _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp1_ = event->type;
	if (_tmp1_ == GDK_BUTTON_PRESS) {
		guint _tmp2_;
		_tmp2_ = event->button;
		_tmp0_ = _tmp2_ == ((guint) 3);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkMenu* popup = NULL;
		GtkMenu* _tmp3_;
		GtkMenuItem* close_item = NULL;
		GtkMenuItem* _tmp4_;
		GtkMenuItem* _tmp5_;
		GtkMenu* _tmp6_;
		GtkMenu* _tmp7_;
		GtkMenuItem* _tmp8_;
		GtkMenu* _tmp9_;
		GtkMenu* _tmp10_;
		guint _tmp11_;
		guint32 _tmp12_;
		_tmp3_ = (GtkMenu*) gtk_menu_new ();
		g_object_ref_sink (_tmp3_);
		popup = _tmp3_;
		_tmp4_ = (GtkMenuItem*) gtk_menu_item_new_with_mnemonic (_ ("_Close"));
		g_object_ref_sink (_tmp4_);
		close_item = _tmp4_;
		_tmp5_ = close_item;
		g_signal_connect_object (_tmp5_, "activate", (GCallback) ____lambda7__gtk_menu_item_activate, self, 0);
		_tmp6_ = popup;
		gtk_menu_attach_to_widget (_tmp6_, (GtkWidget*) self, NULL);
		_tmp7_ = popup;
		_tmp8_ = close_item;
		gtk_container_add ((GtkContainer*) _tmp7_, (GtkWidget*) _tmp8_);
		_tmp9_ = popup;
		gtk_widget_show_all ((GtkWidget*) _tmp9_);
		_tmp10_ = popup;
		_tmp11_ = event->button;
		_tmp12_ = event->time;
		gtk_menu_popup (_tmp10_, NULL, NULL, NULL, NULL, _tmp11_, _tmp12_);
		result = TRUE;
		_g_object_unref0 (close_item);
		_g_object_unref0 (popup);
		return result;
	}
	result = FALSE;
	return result;
}


static void
gedit_find_in_files_plugin_result_panel_on_row_activated (GeditFindInFilesPluginResultPanel* self,
                                                          GtkTreePath* path,
                                                          GtkTreeViewColumn* column)
{
	GtkTreeIter iter = {0};
	GtkTreeIter parent = {0};
	GtkTreeStore* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
	GtkTreeStore* _tmp3_;
	GtkTreeIter _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	gboolean _tmp6_;
	GValue val0 = {0};
	GValue val1 = {0};
	GtkTreeStore* _tmp8_;
	GtkTreeIter _tmp9_;
	GValue _tmp10_ = {0};
	GtkTreeStore* _tmp11_;
	GtkTreeIter _tmp12_;
	GValue _tmp13_ = {0};
	gchar* selection_path = NULL;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gint selection_line = 0;
	GeditWindow* _tmp16_;
	const gchar* _tmp17_;
	GFile* _tmp18_;
	GFile* _tmp19_;
	gint _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	g_return_if_fail (column != NULL);
	_tmp0_ = self->priv->results_model;
	_tmp2_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp1_, path);
	iter = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = self->priv->results_model;
	_tmp4_ = iter;
	_tmp6_ = gtk_tree_model_iter_parent ((GtkTreeModel*) _tmp3_, &_tmp5_, &_tmp4_);
	parent = _tmp5_;
	if (!_tmp6_) {
		GtkTreeView* _tmp7_;
		_tmp7_ = self->priv->list;
		gedit_find_in_files_plugin_toggle_fold (_tmp7_, path);
		return;
	}
	_tmp8_ = self->priv->results_model;
	_tmp9_ = parent;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp8_, &_tmp9_, 0, &_tmp10_);
	G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
	val0 = _tmp10_;
	_tmp11_ = self->priv->results_model;
	_tmp12_ = iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp11_, &_tmp12_, 1, &_tmp13_);
	G_IS_VALUE (&val1) ? (g_value_unset (&val1), NULL) : NULL;
	val1 = _tmp13_;
	_tmp14_ = g_value_get_string (&val0);
	_tmp15_ = g_strdup (_tmp14_);
	selection_path = _tmp15_;
	selection_line = g_value_get_int (&val1);
	_tmp16_ = self->priv->win;
	_tmp17_ = selection_path;
	_tmp18_ = g_file_new_for_path (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = selection_line;
	gedit_commands_load_location (_tmp16_, _tmp19_, NULL, _tmp20_, 0);
	_g_object_unref0 (_tmp19_);
	_g_free0 (selection_path);
	G_IS_VALUE (&val1) ? (g_value_unset (&val1), NULL) : NULL;
	G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
}


static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}


static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp6_;
	gchar* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		glong _tmp3_;
		_tmp3_ = string_length;
		offset = _tmp3_ + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		glong _tmp4_;
		_tmp4_ = string_length;
		g_return_val_if_fail (offset <= _tmp4_, NULL);
	}
	if (len < ((glong) 0)) {
		glong _tmp5_;
		_tmp5_ = string_length;
		len = _tmp5_ - offset;
	}
	_tmp6_ = string_length;
	g_return_val_if_fail ((offset + len) <= _tmp6_, NULL);
	_tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp7_;
	return result;
}


static gchar*
gedit_find_in_files_plugin_result_panel_get_relative_path (GeditFindInFilesPluginResultPanel* self,
                                                           const gchar* path,
                                                           const gchar* from)
{
	gchar* result = NULL;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	g_return_val_if_fail (from != NULL, NULL);
	if (g_str_has_prefix (path, from)) {
		gint _tmp0_;
		gint _tmp1_;
		gchar* _tmp2_;
		_tmp0_ = strlen (from);
		_tmp1_ = _tmp0_;
		_tmp2_ = string_substring (path, (glong) (_tmp1_ + 1), (glong) -1);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = g_strdup (path);
	result = _tmp3_;
	return result;
}


static void
gedit_find_in_files_plugin_result_panel_column_data_func (GeditFindInFilesPluginResultPanel* self,
                                                          GtkTreeViewColumn* column,
                                                          GtkCellRenderer* cell,
                                                          GtkTreeModel* model,
                                                          GtkTreeIter* iter)
{
	GtkTreeIter parent = {0};
	GtkTreeStore* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (column != NULL);
	g_return_if_fail (cell != NULL);
	g_return_if_fail (model != NULL);
	g_return_if_fail (iter != NULL);
	_tmp0_ = self->priv->results_model;
	_tmp1_ = *iter;
	_tmp3_ = gtk_tree_model_iter_parent ((GtkTreeModel*) _tmp0_, &_tmp2_, &_tmp1_);
	parent = _tmp2_;
	if (!_tmp3_) {
		GValue val0 = {0};
		GValue val1 = {0};
		GtkTreeIter _tmp4_;
		GValue _tmp5_ = {0};
		GtkTreeIter _tmp6_;
		GValue _tmp7_ = {0};
		gchar* path = NULL;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gint hits = 0;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gint _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp4_ = *iter;
		gtk_tree_model_get_value (model, &_tmp4_, 0, &_tmp5_);
		G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
		val0 = _tmp5_;
		_tmp6_ = *iter;
		gtk_tree_model_get_value (model, &_tmp6_, 1, &_tmp7_);
		G_IS_VALUE (&val1) ? (g_value_unset (&val1), NULL) : NULL;
		val1 = _tmp7_;
		_tmp8_ = g_value_get_string (&val0);
		_tmp9_ = g_strdup (_tmp8_);
		path = _tmp9_;
		hits = g_value_get_int (&val1);
		_tmp11_ = hits;
		if (_tmp11_ == 1) {
			_tmp10_ = "hit";
		} else {
			_tmp10_ = "hits";
		}
		_tmp12_ = path;
		_tmp13_ = self->priv->root;
		_tmp14_ = gedit_find_in_files_plugin_result_panel_get_relative_path (self, _tmp12_, _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = hits;
		_tmp17_ = g_strdup_printf ("<b>%s</b> (%d %s)", _tmp15_, _tmp16_, _tmp10_);
		_tmp18_ = _tmp17_;
		g_object_set (G_TYPE_CHECK_INSTANCE_TYPE (cell, gtk_cell_renderer_text_get_type ()) ? ((GtkCellRendererText*) cell) : NULL, "markup", _tmp18_, NULL);
		_g_free0 (_tmp18_);
		_g_free0 (_tmp15_);
		_g_free0 (path);
		G_IS_VALUE (&val1) ? (g_value_unset (&val1), NULL) : NULL;
		G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
	} else {
		GValue val0 = {0};
		GValue val1 = {0};
		GtkTreeIter _tmp19_;
		GValue _tmp20_ = {0};
		GtkTreeIter _tmp21_;
		GValue _tmp22_ = {0};
		gint at = 0;
		gchar* line = NULL;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		gint _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		gchar* _tmp28_;
		_tmp19_ = *iter;
		gtk_tree_model_get_value (model, &_tmp19_, 0, &_tmp20_);
		G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
		val0 = _tmp20_;
		_tmp21_ = *iter;
		gtk_tree_model_get_value (model, &_tmp21_, 1, &_tmp22_);
		G_IS_VALUE (&val1) ? (g_value_unset (&val1), NULL) : NULL;
		val1 = _tmp22_;
		at = g_value_get_int (&val1);
		_tmp23_ = g_value_get_string (&val0);
		_tmp24_ = g_strdup (_tmp23_);
		line = _tmp24_;
		_tmp25_ = at;
		_tmp26_ = line;
		_tmp27_ = g_strdup_printf ("%d:%s", _tmp25_, _tmp26_);
		_tmp28_ = _tmp27_;
		g_object_set (G_TYPE_CHECK_INSTANCE_TYPE (cell, gtk_cell_renderer_text_get_type ()) ? ((GtkCellRendererText*) cell) : NULL, "text", _tmp28_, NULL);
		_g_free0 (_tmp28_);
		_g_free0 (line);
		G_IS_VALUE (&val1) ? (g_value_unset (&val1), NULL) : NULL;
		G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
	}
}


static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		GeditFindInFilesPluginResultPanel* self;
		self = _data2_->self;
		_g_hash_table_unref0 (_data2_->it_table);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static gpointer
_gedit_find_in_files_plugin_find_job_ref0 (gpointer self)
{
	return self ? gedit_find_in_files_plugin_find_job_ref (self) : NULL;
}


static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}


static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}


static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		GeditFindInFilesPluginResultPanel* self;
		self = _data3_->_data2_->self;
		gedit_find_in_files_plugin_result_destroy (&_data3_->_result_);
		block2_data_unref (_data3_->_data2_);
		_data3_->_data2_ = NULL;
		g_slice_free (Block3Data, _data3_);
	}
}


static GtkTreeIter*
_gtk_tree_iter_dup (GtkTreeIter* self)
{
	GtkTreeIter* dup;
	dup = g_new0 (GtkTreeIter, 1);
	memcpy (dup, self, sizeof (GtkTreeIter));
	return dup;
}


static gpointer
__gtk_tree_iter_dup0 (gpointer self)
{
	return self ? _gtk_tree_iter_dup (self) : NULL;
}


static gboolean
__lambda9_ (Block3Data* _data3_)
{
	Block2Data* _data2_;
	GeditFindInFilesPluginResultPanel* self;
	gboolean result = FALSE;
	GtkTreeIter iter = {0};
	GtkTreeIter* parent = NULL;
	GeditFindInFilesPluginResult _tmp0_;
	const gchar* _tmp1_;
	gconstpointer _tmp2_;
	GtkTreeIter* _tmp3_;
	GtkTreeIter* _tmp4_;
	GValue val0 = {0};
	GtkTreeStore* _tmp19_;
	GtkTreeIter* _tmp20_;
	GtkTreeIter _tmp21_;
	GValue _tmp22_ = {0};
	GtkTreeStore* _tmp23_;
	GtkTreeIter* _tmp24_;
	GtkTreeIter _tmp25_;
	GtkTreeStore* _tmp26_;
	GtkTreeIter* _tmp27_;
	GtkTreeIter _tmp28_ = {0};
	GtkTreeStore* _tmp29_;
	GtkTreeIter _tmp30_;
	GeditFindInFilesPluginResult _tmp31_;
	const gchar* _tmp32_;
	GeditFindInFilesPluginResult _tmp33_;
	gsize _tmp34_;
	_data2_ = _data3_->_data2_;
	self = _data2_->self;
	_tmp0_ = _data3_->_result_;
	_tmp1_ = _tmp0_.path;
	_tmp2_ = g_hash_table_lookup (_data2_->it_table, _tmp1_);
	_tmp3_ = __gtk_tree_iter_dup0 ((GtkTreeIter*) _tmp2_);
	parent = _tmp3_;
	_tmp4_ = parent;
	if (_tmp4_ == NULL) {
		GtkTreeStore* _tmp5_;
		GtkTreeIter _tmp6_ = {0};
		GtkTreeIter _tmp7_;
		GtkTreeIter* _tmp8_;
		GtkTreeStore* _tmp9_;
		GtkTreeIter* _tmp10_;
		GeditFindInFilesPluginResult _tmp11_;
		const gchar* _tmp12_;
		GtkTreeIter _tmp13_;
		GeditFindInFilesPluginResult _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		GtkTreeIter* _tmp17_;
		GtkTreeIter* _tmp18_;
		_tmp5_ = self->priv->results_model;
		gtk_tree_store_append (_tmp5_, &_tmp6_, NULL);
		_g_free0 (parent);
		_tmp7_ = _tmp6_;
		_tmp8_ = __gtk_tree_iter_dup0 (&_tmp7_);
		parent = _tmp8_;
		_tmp9_ = self->priv->results_model;
		_tmp10_ = parent;
		_tmp11_ = _data3_->_result_;
		_tmp12_ = _tmp11_.path;
		_tmp13_ = *_tmp10_;
		gtk_tree_store_set (_tmp9_, &_tmp13_, 0, _tmp12_, 1, 0, -1);
		_tmp14_ = _data3_->_result_;
		_tmp15_ = _tmp14_.path;
		_tmp16_ = g_strdup (_tmp15_);
		_tmp17_ = parent;
		_tmp18_ = __gtk_tree_iter_dup0 (_tmp17_);
		g_hash_table_insert (_data2_->it_table, _tmp16_, _tmp18_);
	}
	_tmp19_ = self->priv->results_model;
	_tmp20_ = parent;
	_tmp21_ = *_tmp20_;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp19_, &_tmp21_, 1, &_tmp22_);
	G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
	val0 = _tmp22_;
	_tmp23_ = self->priv->results_model;
	_tmp24_ = parent;
	_tmp25_ = *_tmp24_;
	gtk_tree_store_set (_tmp23_, &_tmp25_, 1, g_value_get_int (&val0) + 1, -1);
	_tmp26_ = self->priv->results_model;
	_tmp27_ = parent;
	gtk_tree_store_append (_tmp26_, &_tmp28_, _tmp27_);
	iter = _tmp28_;
	_tmp29_ = self->priv->results_model;
	_tmp30_ = iter;
	_tmp31_ = _data3_->_result_;
	_tmp32_ = _tmp31_.context;
	_tmp33_ = _data3_->_result_;
	_tmp34_ = _tmp33_.line;
	gtk_tree_store_set (_tmp29_, &_tmp30_, 0, _tmp32_, 1, _tmp34_, -1);
	result = FALSE;
	G_IS_VALUE (&val0) ? (g_value_unset (&val0), NULL) : NULL;
	_g_free0 (parent);
	return result;
}


static gboolean
___lambda9__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda9_ (self);
	return result;
}


static void
__lambda8_ (Block2Data* _data2_,
            GeditFindInFilesPluginResult* _result_)
{
	GeditFindInFilesPluginResultPanel* self;
	Block3Data* _data3_;
	GeditFindInFilesPluginResult _tmp0_;
	GeditFindInFilesPluginResult _tmp1_ = {0};
	self = _data2_->self;
	g_return_if_fail (_result_ != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->_data2_ = block2_data_ref (_data2_);
	_tmp0_ = *_result_;
	gedit_find_in_files_plugin_result_copy (&_tmp0_, &_tmp1_);
	gedit_find_in_files_plugin_result_destroy (&_data3_->_result_);
	_data3_->_result_ = _tmp1_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda9__gsource_func, block3_data_ref (_data3_), block3_data_unref);
	block3_data_unref (_data3_);
	_data3_ = NULL;
}


static void
___lambda8__gedit_find_in_files_plugin_find_job_on_match_found (GeditFindInFilesPluginFindJob* _sender,
                                                                GeditFindInFilesPluginResult* _result_,
                                                                gpointer self)
{
	__lambda8_ (self, _result_);
}


static void
__lambda10_ (GeditFindInFilesPluginResultPanel* self)
{
	GeditFindInFilesPluginFindJob* _tmp0_;
	GtkButton* _tmp1_;
	GtkTreeView* _tmp2_;
	GtkTreeIter dummy = {0};
	GtkTreeStore* _tmp3_;
	GtkTreeIter _tmp4_ = {0};
	gboolean _tmp5_;
	_tmp0_ = self->priv->job;
	gedit_find_in_files_plugin_find_job_halt (_tmp0_);
	_tmp1_ = self->priv->stop_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	_tmp2_ = self->priv->list;
	gtk_tree_view_expand_all (_tmp2_);
	_tmp3_ = self->priv->results_model;
	_tmp5_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp3_, &_tmp4_);
	dummy = _tmp4_;
	if (!_tmp5_) {
		GtkTreeStore* _tmp6_;
		GtkTreeIter _tmp7_ = {0};
		GtkTreeStore* _tmp8_;
		GtkTreeIter _tmp9_;
		_tmp6_ = self->priv->results_model;
		gtk_tree_store_append (_tmp6_, &_tmp7_, NULL);
		dummy = _tmp7_;
		_tmp8_ = self->priv->results_model;
		_tmp9_ = dummy;
		gtk_tree_store_set (_tmp8_, &_tmp9_, 0, _ ("No results found"), -1);
	}
}


static void
___lambda10__gedit_find_in_files_plugin_find_job_on_search_finished (GeditFindInFilesPluginFindJob* _sender,
                                                                     gpointer self)
{
	__lambda10_ ((GeditFindInFilesPluginResultPanel*) self);
}


static gboolean
_gedit_find_in_files_plugin_result_panel_list_search_gtk_tree_view_search_equal_func (GtkTreeModel* model,
                                                                                      gint column,
                                                                                      const gchar* key,
                                                                                      GtkTreeIter* iter,
                                                                                      gpointer self)
{
	gboolean result;
	result = gedit_find_in_files_plugin_result_panel_list_search ((GeditFindInFilesPluginResultPanel*) self, model, column, key, iter);
	return result;
}


static void
_gedit_find_in_files_plugin_result_panel_column_data_func_gtk_tree_cell_data_func (GtkTreeViewColumn* tree_column,
                                                                                   GtkCellRenderer* cell,
                                                                                   GtkTreeModel* tree_model,
                                                                                   GtkTreeIter* iter,
                                                                                   gpointer self)
{
	gedit_find_in_files_plugin_result_panel_column_data_func ((GeditFindInFilesPluginResultPanel*) self, tree_column, cell, tree_model, iter);
}


static void
_gedit_find_in_files_plugin_result_panel_on_row_activated_gtk_tree_view_row_activated (GtkTreeView* _sender,
                                                                                       GtkTreePath* path,
                                                                                       GtkTreeViewColumn* column,
                                                                                       gpointer self)
{
	gedit_find_in_files_plugin_result_panel_on_row_activated ((GeditFindInFilesPluginResultPanel*) self, path, column);
}


static gboolean
_gedit_find_in_files_plugin_result_panel_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                        GdkEventButton* event,
                                                                                        gpointer self)
{
	gboolean result;
	result = gedit_find_in_files_plugin_result_panel_on_button_press ((GeditFindInFilesPluginResultPanel*) self, event);
	return result;
}


static void
__lambda11_ (GeditFindInFilesPluginResultPanel* self)
{
	GtkButton* _tmp0_;
	GeditFindInFilesPluginFindJob* _tmp1_;
	_tmp0_ = self->priv->stop_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = self->priv->job;
	gedit_find_in_files_plugin_find_job_halt (_tmp1_);
}


static void
___lambda11__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda11_ ((GeditFindInFilesPluginResultPanel*) self);
}


GeditFindInFilesPluginResultPanel*
gedit_find_in_files_plugin_result_panel_construct_for_job (GType object_type,
                                                           GeditFindInFilesPluginFindJob* job_,
                                                           const gchar* root_,
                                                           GeditWindow* win_)
{
	GeditFindInFilesPluginResultPanel * self = NULL;
	Block2Data* _data2_;
	GtkTreeStore* _tmp0_;
	GeditFindInFilesPluginFindJob* _tmp1_;
	GeditWindow* _tmp2_;
	gchar* _tmp3_;
	GHashFunc _tmp4_;
	GEqualFunc _tmp5_;
	GHashTable* _tmp6_;
	GeditFindInFilesPluginFindJob* _tmp7_;
	GeditFindInFilesPluginFindJob* _tmp8_;
	GtkTreeStore* _tmp9_;
	GtkTreeView* _tmp10_;
	GtkTreeView* _tmp11_;
	GtkTreeView* _tmp12_;
	GtkTreeView* _tmp13_;
	GtkCellRendererText* _tmp14_;
	GtkCellRendererText* _tmp15_;
	GtkTreeView* _tmp16_;
	GtkTreeView* _tmp17_;
	GtkButton* _tmp18_;
	GtkButton* _tmp19_;
	GtkButton* _tmp20_;
	GtkButton* _tmp21_;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	GtkButton* _tmp24_;
	GtkButton* _tmp25_;
	GtkScrolledWindow* scroll = NULL;
	GtkScrolledWindow* _tmp26_;
	GtkTreeView* _tmp27_;
	GtkButton* _tmp28_;
	g_return_val_if_fail (job_ != NULL, NULL);
	g_return_val_if_fail (root_ != NULL, NULL);
	g_return_val_if_fail (win_ != NULL, NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	self = (GeditFindInFilesPluginResultPanel*) g_object_new (object_type, NULL);
	_data2_->self = g_object_ref (self);
	_tmp0_ = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_INT);
	_g_object_unref0 (self->priv->results_model);
	self->priv->results_model = _tmp0_;
	_tmp1_ = _gedit_find_in_files_plugin_find_job_ref0 (job_);
	_gedit_find_in_files_plugin_find_job_unref0 (self->priv->job);
	self->priv->job = _tmp1_;
	_tmp2_ = _g_object_ref0 (win_);
	_g_object_unref0 (self->priv->win);
	self->priv->win = _tmp2_;
	_tmp3_ = g_strdup (root_);
	_g_free0 (self->priv->root);
	self->priv->root = _tmp3_;
	_tmp4_ = g_str_hash;
	_tmp5_ = g_str_equal;
	_tmp6_ = g_hash_table_new_full (_tmp4_, _tmp5_, _g_free0_, _g_free0_);
	_data2_->it_table = _tmp6_;
	_tmp7_ = self->priv->job;
	g_signal_connect_data (_tmp7_, "on-match-found", (GCallback) ___lambda8__gedit_find_in_files_plugin_find_job_on_match_found, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp8_ = self->priv->job;
	g_signal_connect_object (_tmp8_, "on-search-finished", (GCallback) ___lambda10__gedit_find_in_files_plugin_find_job_on_search_finished, self, 0);
	_tmp9_ = self->priv->results_model;
	_tmp10_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp9_);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->list);
	self->priv->list = _tmp10_;
	_tmp11_ = self->priv->list;
	gtk_tree_view_set_search_column (_tmp11_, 0);
	_tmp12_ = self->priv->list;
	gtk_tree_view_set_search_equal_func (_tmp12_, _gedit_find_in_files_plugin_result_panel_list_search_gtk_tree_view_search_equal_func, g_object_ref (self), g_object_unref);
	_tmp13_ = self->priv->list;
	_tmp14_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp14_);
	_tmp15_ = _tmp14_;
	gtk_tree_view_insert_column_with_data_func (_tmp13_, -1, "File", (GtkCellRenderer*) _tmp15_, _gedit_find_in_files_plugin_result_panel_column_data_func_gtk_tree_cell_data_func, g_object_ref (self), g_object_unref);
	_g_object_unref0 (_tmp15_);
	_tmp16_ = self->priv->list;
	g_signal_connect_object (_tmp16_, "row-activated", (GCallback) _gedit_find_in_files_plugin_result_panel_on_row_activated_gtk_tree_view_row_activated, self, 0);
	_tmp17_ = self->priv->list;
	g_signal_connect_object ((GtkWidget*) _tmp17_, "button-press-event", (GCallback) _gedit_find_in_files_plugin_result_panel_on_button_press_gtk_widget_button_press_event, self, 0);
	_tmp18_ = (GtkButton*) gtk_button_new_from_icon_name ("process-stop-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->stop_button);
	self->priv->stop_button = _tmp18_;
	_tmp19_ = self->priv->stop_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp19_, _ ("Stop the search"));
	_tmp20_ = self->priv->stop_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp20_, FALSE);
	_tmp21_ = self->priv->stop_button;
	gtk_widget_set_valign ((GtkWidget*) _tmp21_, GTK_ALIGN_END);
	_tmp22_ = self->priv->stop_button;
	gtk_widget_set_halign ((GtkWidget*) _tmp22_, GTK_ALIGN_END);
	_tmp23_ = self->priv->stop_button;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp23_, 4);
	_tmp24_ = self->priv->stop_button;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp24_, 4);
	_tmp25_ = self->priv->stop_button;
	g_signal_connect_object (_tmp25_, "clicked", (GCallback) ___lambda11__gtk_button_clicked, self, 0);
	_tmp26_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp26_);
	scroll = _tmp26_;
	gtk_scrolled_window_set_policy (scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
	_tmp27_ = self->priv->list;
	gtk_container_add ((GtkContainer*) scroll, (GtkWidget*) _tmp27_);
	_tmp28_ = self->priv->stop_button;
	gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp28_);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) scroll);
	_g_object_unref0 (scroll);
	block2_data_unref (_data2_);
	_data2_ = NULL;
	return self;
}


GeditFindInFilesPluginResultPanel*
gedit_find_in_files_plugin_result_panel_new_for_job (GeditFindInFilesPluginFindJob* job_,
                                                     const gchar* root_,
                                                     GeditWindow* win_)
{
	return gedit_find_in_files_plugin_result_panel_construct_for_job (GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL, job_, root_, win_);
}


void
gedit_find_in_files_plugin_result_panel_toggle_stop_button (GeditFindInFilesPluginResultPanel* self,
                                                            gboolean show)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stop_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, show);
}


GeditFindInFilesPluginResultPanel*
gedit_find_in_files_plugin_result_panel_construct (GType object_type)
{
	GeditFindInFilesPluginResultPanel * self = NULL;
	self = (GeditFindInFilesPluginResultPanel*) g_object_new (object_type, NULL);
	return self;
}


GeditFindInFilesPluginResultPanel*
gedit_find_in_files_plugin_result_panel_new (void)
{
	return gedit_find_in_files_plugin_result_panel_construct (GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL);
}


static void
gedit_find_in_files_plugin_result_panel_class_init (GeditFindInFilesPluginResultPanelClass * klass)
{
	gedit_find_in_files_plugin_result_panel_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GeditFindInFilesPluginResultPanelPrivate));
	G_OBJECT_CLASS (klass)->finalize = gedit_find_in_files_plugin_result_panel_finalize;
}


static void
gedit_find_in_files_plugin_result_panel_instance_init (GeditFindInFilesPluginResultPanel * self)
{
	self->priv = GEDIT_FIND_IN_FILES_PLUGIN_RESULT_PANEL_GET_PRIVATE (self);
}


static void
gedit_find_in_files_plugin_result_panel_finalize (GObject * obj)
{
	GeditFindInFilesPluginResultPanel * self;
	GeditFindInFilesPluginFindJob* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEDIT_FIND_IN_FILES_PLUGIN_TYPE_RESULT_PANEL, GeditFindInFilesPluginResultPanel);
	_tmp0_ = self->priv->job;
	gedit_find_in_files_plugin_find_job_halt (_tmp0_);
	_gedit_find_in_files_plugin_find_job_unref0 (self->priv->job);
	_g_free0 (self->priv->root);
	_g_object_unref0 (self->priv->list);
	_g_object_unref0 (self->priv->results_model);
	_g_object_unref0 (self->priv->stop_button);
	_g_object_unref0 (self->priv->win);
	G_OBJECT_CLASS (gedit_find_in_files_plugin_result_panel_parent_class)->finalize (obj);
}


GType
gedit_find_in_files_plugin_result_panel_get_type (void)
{
	return gedit_find_in_files_plugin_result_panel_type_id;
}


GType
gedit_find_in_files_plugin_result_panel_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeditFindInFilesPluginResultPanelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gedit_find_in_files_plugin_result_panel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeditFindInFilesPluginResultPanel), 0, (GInstanceInitFunc) gedit_find_in_files_plugin_result_panel_instance_init, NULL };
	gedit_find_in_files_plugin_result_panel_type_id = g_type_module_register_type (module, gtk_overlay_get_type (), "GeditFindInFilesPluginResultPanel", &g_define_type_info, 0);
	return gedit_find_in_files_plugin_result_panel_type_id;
}