/* SavedSearchDialog.c generated by valac 0.56.19, the Vala compiler
 * generated from SavedSearchDialog.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */
/* This dialog displays a boolean search configuration.*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <gee.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <gobject/gvaluecollector.h>
#include <glib/gi18n-lib.h>

#define SAVED_SEARCH_DIALOG_SEARCH_ROW_DATE_DATE_FORMAT "%x"
#define RESOURCES_CANCEL_LABEL _ ("_Cancel")
#define RESOURCES_OK_LABEL _ ("_OK")
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_SAVED_SEARCH_DIALOG (saved_search_dialog_get_type ())
#define SAVED_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH_DIALOG, SavedSearchDialog))
#define SAVED_SEARCH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH_DIALOG, SavedSearchDialogClass))
#define IS_SAVED_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH_DIALOG))
#define IS_SAVED_SEARCH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH_DIALOG))
#define SAVED_SEARCH_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH_DIALOG, SavedSearchDialogClass))

typedef struct _SavedSearchDialog SavedSearchDialog;
typedef struct _SavedSearchDialogClass SavedSearchDialogClass;
typedef struct _SavedSearchDialogPrivate SavedSearchDialogPrivate;

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER (saved_search_dialog_search_row_container_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, SavedSearchDialogSearchRowContainer))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, SavedSearchDialogSearchRowContainerClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, SavedSearchDialogSearchRowContainerClass))

typedef struct _SavedSearchDialogSearchRowContainer SavedSearchDialogSearchRowContainer;
typedef struct _SavedSearchDialogSearchRowContainerClass SavedSearchDialogSearchRowContainerClass;

#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;

#define TYPE_SAVED_SEARCH (saved_search_get_type ())
#define SAVED_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH, SavedSearch))
#define SAVED_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH, SavedSearchClass))
#define IS_SAVED_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH))
#define IS_SAVED_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH))
#define SAVED_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH, SavedSearchClass))

typedef struct _SavedSearch SavedSearch;
typedef struct _SavedSearchClass SavedSearchClass;
enum  {
	SAVED_SEARCH_DIALOG_0_PROPERTY,
	SAVED_SEARCH_DIALOG_NUM_PROPERTIES
};
static GParamSpec* saved_search_dialog_properties[SAVED_SEARCH_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_SAVED_SEARCH_TABLE (saved_search_table_get_type ())
#define SAVED_SEARCH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH_TABLE, SavedSearchTable))
#define SAVED_SEARCH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH_TABLE, SavedSearchTableClass))
#define IS_SAVED_SEARCH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH_TABLE))
#define IS_SAVED_SEARCH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH_TABLE))
#define SAVED_SEARCH_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH_TABLE, SavedSearchTableClass))

typedef struct _SavedSearchTable SavedSearchTable;
typedef struct _SavedSearchTableClass SavedSearchTableClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _saved_search_table_unref0(var) ((var == NULL) ? NULL : (var = (saved_search_table_unref (var), NULL)))
#define _saved_search_dialog_search_row_container_unref0(var) ((var == NULL) ? NULL : (var = (saved_search_dialog_search_row_container_unref (var), NULL)))
typedef enum  {
	SEARCH_OPERATOR_ANY = 0,
	SEARCH_OPERATOR_ALL,
	SEARCH_OPERATOR_NONE
} SearchOperator;

#define TYPE_SEARCH_OPERATOR (search_operator_get_type ())

#define TYPE_SEARCH_CONDITION (search_condition_get_type ())
#define SEARCH_CONDITION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_CONDITION, SearchCondition))
#define SEARCH_CONDITION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_CONDITION, SearchConditionClass))
#define IS_SEARCH_CONDITION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_CONDITION))
#define IS_SEARCH_CONDITION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_CONDITION))
#define SEARCH_CONDITION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_CONDITION, SearchConditionClass))

typedef struct _SearchCondition SearchCondition;
typedef struct _SearchConditionClass SearchConditionClass;
#define _search_condition_unref0(var) ((var == NULL) ? NULL : (var = (search_condition_unref (var), NULL)))

#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))

typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;

#define TYPE_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))

typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;
typedef struct _SavedSearchDialogSearchRowContainerPrivate SavedSearchDialogSearchRowContainerPrivate;
typedef enum  {
	SEARCH_CONDITION_SEARCH_TYPE_ANY_TEXT = 0,
	SEARCH_CONDITION_SEARCH_TYPE_TITLE,
	SEARCH_CONDITION_SEARCH_TYPE_TAG,
	SEARCH_CONDITION_SEARCH_TYPE_EVENT_NAME,
	SEARCH_CONDITION_SEARCH_TYPE_FILE_NAME,
	SEARCH_CONDITION_SEARCH_TYPE_FACE,
	SEARCH_CONDITION_SEARCH_TYPE_MEDIA_TYPE,
	SEARCH_CONDITION_SEARCH_TYPE_FLAG_STATE,
	SEARCH_CONDITION_SEARCH_TYPE_MODIFIED_STATE,
	SEARCH_CONDITION_SEARCH_TYPE_RATING,
	SEARCH_CONDITION_SEARCH_TYPE_COMMENT,
	SEARCH_CONDITION_SEARCH_TYPE_DATE
} SearchConditionSearchType;

#define SEARCH_CONDITION_TYPE_SEARCH_TYPE (search_condition_search_type_get_type ())

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW (saved_search_dialog_search_row_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRowClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRowClass))

typedef struct _SavedSearchDialogSearchRow SavedSearchDialogSearchRow;
typedef struct _SavedSearchDialogSearchRowClass SavedSearchDialogSearchRowClass;
#define _saved_search_dialog_search_row_unref0(var) ((var == NULL) ? NULL : (var = (saved_search_dialog_search_row_unref (var), NULL)))

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT (saved_search_dialog_search_row_text_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowText))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowTextClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowTextClass))

typedef struct _SavedSearchDialogSearchRowText SavedSearchDialogSearchRowText;
typedef struct _SavedSearchDialogSearchRowTextClass SavedSearchDialogSearchRowTextClass;

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE (saved_search_dialog_search_row_media_type_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_MEDIA_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaType))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_MEDIA_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaTypeClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_MEDIA_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_MEDIA_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_MEDIA_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaTypeClass))

typedef struct _SavedSearchDialogSearchRowMediaType SavedSearchDialogSearchRowMediaType;
typedef struct _SavedSearchDialogSearchRowMediaTypeClass SavedSearchDialogSearchRowMediaTypeClass;

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED (saved_search_dialog_search_row_flagged_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_FLAGGED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlagged))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_FLAGGED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlaggedClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_FLAGGED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_FLAGGED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_FLAGGED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlaggedClass))

typedef struct _SavedSearchDialogSearchRowFlagged SavedSearchDialogSearchRowFlagged;
typedef struct _SavedSearchDialogSearchRowFlaggedClass SavedSearchDialogSearchRowFlaggedClass;

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED (saved_search_dialog_search_row_modified_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_MODIFIED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModified))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_MODIFIED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModifiedClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_MODIFIED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_MODIFIED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_MODIFIED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModifiedClass))

typedef struct _SavedSearchDialogSearchRowModified SavedSearchDialogSearchRowModified;
typedef struct _SavedSearchDialogSearchRowModifiedClass SavedSearchDialogSearchRowModifiedClass;

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING (saved_search_dialog_search_row_rating_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_RATING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRating))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRatingClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_RATING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_RATING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRatingClass))

typedef struct _SavedSearchDialogSearchRowRating SavedSearchDialogSearchRowRating;
typedef struct _SavedSearchDialogSearchRowRatingClass SavedSearchDialogSearchRowRatingClass;

#define SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE (saved_search_dialog_search_row_date_get_type ())
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_DATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDate))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_DATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDateClass))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE))
#define SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE))
#define SAVED_SEARCH_DIALOG_SEARCH_ROW_DATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDateClass))

typedef struct _SavedSearchDialogSearchRowDate SavedSearchDialogSearchRowDate;
typedef struct _SavedSearchDialogSearchRowDateClass SavedSearchDialogSearchRowDateClass;
typedef struct _SavedSearchDialogParamSpecSearchRowContainer SavedSearchDialogParamSpecSearchRowContainer;
enum  {
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_REMOVE_SIGNAL,
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL,
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_NUM_SIGNALS
};
static guint saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_NUM_SIGNALS] = {0};
typedef struct _SavedSearchDialogSearchRowPrivate SavedSearchDialogSearchRowPrivate;
typedef struct _SavedSearchDialogParamSpecSearchRow SavedSearchDialogParamSpecSearchRow;
typedef struct _SavedSearchDialogSearchRowTextPrivate SavedSearchDialogSearchRowTextPrivate;
typedef enum  {
	SEARCH_CONDITION_TEXT_CONTEXT_CONTAINS = 0,
	SEARCH_CONDITION_TEXT_CONTEXT_IS_EXACTLY,
	SEARCH_CONDITION_TEXT_CONTEXT_STARTS_WITH,
	SEARCH_CONDITION_TEXT_CONTEXT_ENDS_WITH,
	SEARCH_CONDITION_TEXT_CONTEXT_DOES_NOT_CONTAIN,
	SEARCH_CONDITION_TEXT_CONTEXT_IS_NOT_SET,
	SEARCH_CONDITION_TEXT_CONTEXT_IS_SET
} SearchConditionTextContext;

#define SEARCH_CONDITION_TEXT_TYPE_CONTEXT (search_condition_text_context_get_type ())

#define TYPE_SEARCH_CONDITION_TEXT (search_condition_text_get_type ())
#define SEARCH_CONDITION_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_CONDITION_TEXT, SearchConditionText))
#define SEARCH_CONDITION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_CONDITION_TEXT, SearchConditionTextClass))
#define IS_SEARCH_CONDITION_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_CONDITION_TEXT))
#define IS_SEARCH_CONDITION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_CONDITION_TEXT))
#define SEARCH_CONDITION_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_CONDITION_TEXT, SearchConditionTextClass))

typedef struct _SearchConditionText SearchConditionText;
typedef struct _SearchConditionTextClass SearchConditionTextClass;
typedef struct _SavedSearchDialogSearchRowMediaTypePrivate SavedSearchDialogSearchRowMediaTypePrivate;
typedef enum  {
	SEARCH_CONDITION_MEDIA_TYPE_CONTEXT_IS = 0,
	SEARCH_CONDITION_MEDIA_TYPE_CONTEXT_IS_NOT
} SearchConditionMediaTypeContext;

#define SEARCH_CONDITION_MEDIA_TYPE_TYPE_CONTEXT (search_condition_media_type_context_get_type ())
typedef enum  {
	SEARCH_CONDITION_MEDIA_TYPE_MEDIA_TYPE_PHOTO_ALL = 0,
	SEARCH_CONDITION_MEDIA_TYPE_MEDIA_TYPE_PHOTO_RAW,
	SEARCH_CONDITION_MEDIA_TYPE_MEDIA_TYPE_VIDEO
} SearchConditionMediaTypeMediaType;

#define SEARCH_CONDITION_MEDIA_TYPE_TYPE_MEDIA_TYPE (search_condition_media_type_media_type_get_type ())

#define TYPE_SEARCH_CONDITION_MEDIA_TYPE (search_condition_media_type_get_type ())
#define SEARCH_CONDITION_MEDIA_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_CONDITION_MEDIA_TYPE, SearchConditionMediaType))
#define SEARCH_CONDITION_MEDIA_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_CONDITION_MEDIA_TYPE, SearchConditionMediaTypeClass))
#define IS_SEARCH_CONDITION_MEDIA_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_CONDITION_MEDIA_TYPE))
#define IS_SEARCH_CONDITION_MEDIA_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_CONDITION_MEDIA_TYPE))
#define SEARCH_CONDITION_MEDIA_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_CONDITION_MEDIA_TYPE, SearchConditionMediaTypeClass))

typedef struct _SearchConditionMediaType SearchConditionMediaType;
typedef struct _SearchConditionMediaTypeClass SearchConditionMediaTypeClass;
typedef struct _SavedSearchDialogSearchRowModifiedPrivate SavedSearchDialogSearchRowModifiedPrivate;
typedef enum  {
	SEARCH_CONDITION_MODIFIED_CONTEXT_HAS = 0,
	SEARCH_CONDITION_MODIFIED_CONTEXT_HAS_NO
} SearchConditionModifiedContext;

#define SEARCH_CONDITION_MODIFIED_TYPE_CONTEXT (search_condition_modified_context_get_type ())
typedef enum  {
	SEARCH_CONDITION_MODIFIED_STATE_MODIFIED = 0,
	SEARCH_CONDITION_MODIFIED_STATE_INTERNAL_CHANGES,
	SEARCH_CONDITION_MODIFIED_STATE_EXTERNAL_CHANGES
} SearchConditionModifiedState;

#define SEARCH_CONDITION_MODIFIED_TYPE_STATE (search_condition_modified_state_get_type ())

#define TYPE_SEARCH_CONDITION_MODIFIED (search_condition_modified_get_type ())
#define SEARCH_CONDITION_MODIFIED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_CONDITION_MODIFIED, SearchConditionModified))
#define SEARCH_CONDITION_MODIFIED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_CONDITION_MODIFIED, SearchConditionModifiedClass))
#define IS_SEARCH_CONDITION_MODIFIED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_CONDITION_MODIFIED))
#define IS_SEARCH_CONDITION_MODIFIED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_CONDITION_MODIFIED))
#define SEARCH_CONDITION_MODIFIED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_CONDITION_MODIFIED, SearchConditionModifiedClass))

typedef struct _SearchConditionModified SearchConditionModified;
typedef struct _SearchConditionModifiedClass SearchConditionModifiedClass;
typedef struct _SavedSearchDialogSearchRowFlaggedPrivate SavedSearchDialogSearchRowFlaggedPrivate;
typedef enum  {
	SEARCH_CONDITION_FLAGGED_STATE_FLAGGED = 0,
	SEARCH_CONDITION_FLAGGED_STATE_UNFLAGGED
} SearchConditionFlaggedState;

#define SEARCH_CONDITION_FLAGGED_TYPE_STATE (search_condition_flagged_state_get_type ())

#define TYPE_SEARCH_CONDITION_FLAGGED (search_condition_flagged_get_type ())
#define SEARCH_CONDITION_FLAGGED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_CONDITION_FLAGGED, SearchConditionFlagged))
#define SEARCH_CONDITION_FLAGGED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_CONDITION_FLAGGED, SearchConditionFlaggedClass))
#define IS_SEARCH_CONDITION_FLAGGED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_CONDITION_FLAGGED))
#define IS_SEARCH_CONDITION_FLAGGED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_CONDITION_FLAGGED))
#define SEARCH_CONDITION_FLAGGED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_CONDITION_FLAGGED, SearchConditionFlaggedClass))

typedef struct _SearchConditionFlagged SearchConditionFlagged;
typedef struct _SearchConditionFlaggedClass SearchConditionFlaggedClass;
typedef struct _SavedSearchDialogSearchRowRatingPrivate SavedSearchDialogSearchRowRatingPrivate;
typedef enum  {
	RATING_REJECTED = -1,
	RATING_UNRATED = 0,
	RATING_ONE = 1,
	RATING_TWO = 2,
	RATING_THREE = 3,
	RATING_FOUR = 4,
	RATING_FIVE = 5
} Rating;

#define TYPE_RATING (rating_get_type ())
typedef enum  {
	SEARCH_CONDITION_RATING_CONTEXT_AND_HIGHER = 0,
	SEARCH_CONDITION_RATING_CONTEXT_ONLY,
	SEARCH_CONDITION_RATING_CONTEXT_AND_LOWER
} SearchConditionRatingContext;

#define SEARCH_CONDITION_RATING_TYPE_CONTEXT (search_condition_rating_context_get_type ())

#define TYPE_SEARCH_CONDITION_RATING (search_condition_rating_get_type ())
#define SEARCH_CONDITION_RATING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_CONDITION_RATING, SearchConditionRating))
#define SEARCH_CONDITION_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_CONDITION_RATING, SearchConditionRatingClass))
#define IS_SEARCH_CONDITION_RATING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_CONDITION_RATING))
#define IS_SEARCH_CONDITION_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_CONDITION_RATING))
#define SEARCH_CONDITION_RATING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_CONDITION_RATING, SearchConditionRatingClass))

typedef struct _SearchConditionRating SearchConditionRating;
typedef struct _SearchConditionRatingClass SearchConditionRatingClass;
typedef struct _SavedSearchDialogSearchRowDatePrivate SavedSearchDialogSearchRowDatePrivate;
typedef enum  {
	SEARCH_CONDITION_DATE_CONTEXT_EXACT = 0,
	SEARCH_CONDITION_DATE_CONTEXT_AFTER,
	SEARCH_CONDITION_DATE_CONTEXT_BEFORE,
	SEARCH_CONDITION_DATE_CONTEXT_BETWEEN,
	SEARCH_CONDITION_DATE_CONTEXT_IS_NOT_SET
} SearchConditionDateContext;

#define SEARCH_CONDITION_DATE_TYPE_CONTEXT (search_condition_date_context_get_type ())
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define TYPE_SEARCH_CONDITION_DATE (search_condition_date_get_type ())
#define SEARCH_CONDITION_DATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_CONDITION_DATE, SearchConditionDate))
#define SEARCH_CONDITION_DATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_CONDITION_DATE, SearchConditionDateClass))
#define IS_SEARCH_CONDITION_DATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_CONDITION_DATE))
#define IS_SEARCH_CONDITION_DATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_CONDITION_DATE))
#define SEARCH_CONDITION_DATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_CONDITION_DATE, SearchConditionDateClass))

typedef struct _SearchConditionDate SearchConditionDate;
typedef struct _SearchConditionDateClass SearchConditionDateClass;
typedef struct _Block11Data Block11Data;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _SavedSearchDialog {
	GtkDialog parent_instance;
	SavedSearchDialogPrivate * priv;
};

struct _SavedSearchDialogClass {
	GtkDialogClass parent_class;
};

struct _SavedSearchDialogPrivate {
	GtkButton* add_criteria;
	GtkComboBoxText* operator;
	GtkEntry* search_title;
	GtkListBox* row_listbox;
	GeeArrayList* row_list;
	gboolean edit_mode;
	SavedSearch* previous_search;
	gboolean valid;
	gulong notify_id;
	gdouble upper;
};

struct _SavedSearchDialogSearchRowContainer {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SavedSearchDialogSearchRowContainerPrivate * priv;
};

struct _SavedSearchDialogSearchRowContainerClass {
	GTypeClass parent_class;
	void (*finalize) (SavedSearchDialogSearchRowContainer *self);
};

struct _SavedSearchDialogSearchRowContainerPrivate {
	GtkComboBoxText* type_combo;
	GtkBox* box;
	GtkButton* remove_button;
	SearchConditionSearchType* search_types;
	gint search_types_length1;
	gint _search_types_size_;
	GeeHashMap* search_types_index;
	SavedSearchDialogSearchRow* my_row;
};

struct _SavedSearchDialogParamSpecSearchRowContainer {
	GParamSpec parent_instance;
};

struct _SavedSearchDialogSearchRow {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SavedSearchDialogSearchRowPrivate * priv;
};

struct _SavedSearchDialogSearchRowClass {
	GTypeClass parent_class;
	void (*finalize) (SavedSearchDialogSearchRow *self);
	GtkWidget* (*get_widget) (SavedSearchDialogSearchRow* self);
	SearchCondition* (*get_search_condition) (SavedSearchDialogSearchRow* self);
	void (*populate) (SavedSearchDialogSearchRow* self, SearchCondition* sc);
	gboolean (*is_complete) (SavedSearchDialogSearchRow* self);
};

struct _SavedSearchDialogParamSpecSearchRow {
	GParamSpec parent_instance;
};

struct _SavedSearchDialogSearchRowText {
	SavedSearchDialogSearchRow parent_instance;
	SavedSearchDialogSearchRowTextPrivate * priv;
};

struct _SavedSearchDialogSearchRowTextClass {
	SavedSearchDialogSearchRowClass parent_class;
};

struct _SavedSearchDialogSearchRowTextPrivate {
	GtkBox* box;
	GtkComboBoxText* text_context;
	GtkEntry* entry;
	SavedSearchDialogSearchRowContainer* parent;
};

struct _SavedSearchDialogSearchRowMediaType {
	SavedSearchDialogSearchRow parent_instance;
	SavedSearchDialogSearchRowMediaTypePrivate * priv;
};

struct _SavedSearchDialogSearchRowMediaTypeClass {
	SavedSearchDialogSearchRowClass parent_class;
};

struct _SavedSearchDialogSearchRowMediaTypePrivate {
	GtkBox* box;
	GtkComboBoxText* media_context;
	GtkComboBoxText* media_type;
	SavedSearchDialogSearchRowContainer* parent;
};

struct _SavedSearchDialogSearchRowModified {
	SavedSearchDialogSearchRow parent_instance;
	SavedSearchDialogSearchRowModifiedPrivate * priv;
};

struct _SavedSearchDialogSearchRowModifiedClass {
	SavedSearchDialogSearchRowClass parent_class;
};

struct _SavedSearchDialogSearchRowModifiedPrivate {
	GtkBox* box;
	GtkComboBoxText* modified_context;
	GtkComboBoxText* modified_state;
	SavedSearchDialogSearchRowContainer* parent;
};

struct _SavedSearchDialogSearchRowFlagged {
	SavedSearchDialogSearchRow parent_instance;
	SavedSearchDialogSearchRowFlaggedPrivate * priv;
};

struct _SavedSearchDialogSearchRowFlaggedClass {
	SavedSearchDialogSearchRowClass parent_class;
};

struct _SavedSearchDialogSearchRowFlaggedPrivate {
	GtkBox* box;
	GtkComboBoxText* flagged_state;
	SavedSearchDialogSearchRowContainer* parent;
};

struct _SavedSearchDialogSearchRowRating {
	SavedSearchDialogSearchRow parent_instance;
	SavedSearchDialogSearchRowRatingPrivate * priv;
};

struct _SavedSearchDialogSearchRowRatingClass {
	SavedSearchDialogSearchRowClass parent_class;
};

struct _SavedSearchDialogSearchRowRatingPrivate {
	GtkBox* box;
	GtkComboBoxText* rating;
	GtkComboBoxText* context;
	SavedSearchDialogSearchRowContainer* parent;
};

struct _SavedSearchDialogSearchRowDate {
	SavedSearchDialogSearchRow parent_instance;
	SavedSearchDialogSearchRowDatePrivate * priv;
};

struct _SavedSearchDialogSearchRowDateClass {
	SavedSearchDialogSearchRowClass parent_class;
};

struct _SavedSearchDialogSearchRowDatePrivate {
	GtkBox* box;
	GtkComboBoxText* context;
	GtkButton* label_one;
	GtkButton* label_two;
	GtkCalendar* cal_one;
	GtkCalendar* cal_two;
	GtkLabel* and;
	SavedSearchDialogSearchRowContainer* parent;
};

struct _Block11Data {
	int _ref_count_;
	SavedSearchDialogSearchRowDate* self;
	GtkDialog* d;
};

static gint SavedSearchDialog_private_offset;
static gpointer saved_search_dialog_parent_class = NULL;
static gint SavedSearchDialogSearchRowContainer_private_offset;
static gpointer saved_search_dialog_search_row_container_parent_class = NULL;
static gpointer saved_search_dialog_search_row_parent_class = NULL;
static gint SavedSearchDialogSearchRowText_private_offset;
static gpointer saved_search_dialog_search_row_text_parent_class = NULL;
static gint SavedSearchDialogSearchRowMediaType_private_offset;
static gpointer saved_search_dialog_search_row_media_type_parent_class = NULL;
static gint SavedSearchDialogSearchRowModified_private_offset;
static gpointer saved_search_dialog_search_row_modified_parent_class = NULL;
static gint SavedSearchDialogSearchRowFlagged_private_offset;
static gpointer saved_search_dialog_search_row_flagged_parent_class = NULL;
static gint SavedSearchDialogSearchRowRating_private_offset;
static gpointer saved_search_dialog_search_row_rating_parent_class = NULL;
static gint SavedSearchDialogSearchRowDate_private_offset;
static gpointer saved_search_dialog_search_row_date_parent_class = NULL;
VALA_EXTERN GTimeZone* application_timezone;

VALA_EXTERN GType saved_search_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialog, g_object_unref)
static gpointer saved_search_dialog_search_row_container_ref (gpointer instance);
static void saved_search_dialog_search_row_container_unref (gpointer instance);
static GParamSpec* saved_search_dialog_param_spec_search_row_container (const gchar* name,
                                                                 const gchar* nick,
                                                                 const gchar* blurb,
                                                                 GType object_type,
                                                                 GParamFlags flags) G_GNUC_UNUSED ;
static void saved_search_dialog_value_set_search_row_container (GValue* value,
                                                         gpointer v_object) G_GNUC_UNUSED ;
static void saved_search_dialog_value_take_search_row_container (GValue* value,
                                                          gpointer v_object) G_GNUC_UNUSED ;
static gpointer saved_search_dialog_value_get_search_row_container (const GValue* value) G_GNUC_UNUSED ;
static GType saved_search_dialog_search_row_container_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRowContainer, saved_search_dialog_search_row_container_unref)
VALA_EXTERN GType data_object_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataObject, g_object_unref)
VALA_EXTERN GType data_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataSource, g_object_unref)
VALA_EXTERN GType saved_search_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearch, g_object_unref)
VALA_EXTERN SavedSearchDialog* saved_search_dialog_new (void);
VALA_EXTERN SavedSearchDialog* saved_search_dialog_construct (GType object_type);
VALA_EXTERN gint resources_use_header_bar (void);
static void saved_search_dialog_setup_dialog (SavedSearchDialog* self);
VALA_EXTERN gpointer saved_search_table_ref (gpointer instance);
VALA_EXTERN void saved_search_table_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_saved_search_table (const gchar* name,
                                           const gchar* nick,
                                           const gchar* blurb,
                                           GType object_type,
                                           GParamFlags flags);
VALA_EXTERN void value_set_saved_search_table (GValue* value,
                                   gpointer v_object);
VALA_EXTERN void value_take_saved_search_table (GValue* value,
                                    gpointer v_object);
VALA_EXTERN gpointer value_get_saved_search_table (const GValue* value);
VALA_EXTERN GType saved_search_table_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchTable, saved_search_table_unref)
VALA_EXTERN SavedSearchTable* saved_search_table_get_instance (void);
VALA_EXTERN gchar* saved_search_table_generate_unique_name (SavedSearchTable* self);
static void saved_search_dialog_add_text_search (SavedSearchDialog* self);
static void saved_search_dialog_search_row_container_allow_removal (SavedSearchDialogSearchRowContainer* self,
                                                             gboolean allow);
static void saved_search_dialog_set_valid (SavedSearchDialog* self,
                                    gboolean v);
VALA_EXTERN SavedSearchDialog* saved_search_dialog_new_edit_existing (SavedSearch* saved_search);
VALA_EXTERN SavedSearchDialog* saved_search_dialog_construct_edit_existing (GType object_type,
                                                                SavedSearch* saved_search);
VALA_EXTERN GType search_operator_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SearchOperator saved_search_get_operator (SavedSearch* self);
VALA_EXTERN gchar* data_object_get_name (DataObject* self);
VALA_EXTERN gpointer search_condition_ref (gpointer instance);
VALA_EXTERN void search_condition_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_search_condition (const gchar* name,
                                         const gchar* nick,
                                         const gchar* blurb,
                                         GType object_type,
                                         GParamFlags flags);
VALA_EXTERN void value_set_search_condition (GValue* value,
                                 gpointer v_object);
VALA_EXTERN void value_take_search_condition (GValue* value,
                                  gpointer v_object);
VALA_EXTERN gpointer value_get_search_condition (const GValue* value);
VALA_EXTERN GType search_condition_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchCondition, search_condition_unref)
VALA_EXTERN GeeList* saved_search_get_conditions (SavedSearch* self);
static void saved_search_dialog_add_row (SavedSearchDialog* self,
                                  SavedSearchDialogSearchRowContainer* row);
static SavedSearchDialogSearchRowContainer* saved_search_dialog_search_row_container_new_edit_existing (SearchCondition* sc);
static SavedSearchDialogSearchRowContainer* saved_search_dialog_search_row_container_construct_edit_existing (GType object_type,
                                                                                                       SearchCondition* sc);
VALA_EXTERN GType page_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PageWindow, g_object_unref)
VALA_EXTERN GType app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AppWindow, g_object_unref)
VALA_EXTERN AppWindow* app_window_get_instance (void);
static void saved_search_dialog_on_response (SavedSearchDialog* self,
                                      gint response_id);
static void _saved_search_dialog_on_response_gtk_dialog_response (GtkDialog* _sender,
                                                           gint response_id,
                                                           gpointer self);
static void saved_search_dialog_on_add_criteria (SavedSearchDialog* self);
static void _saved_search_dialog_on_add_criteria_gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self);
static void saved_search_dialog_on_title_changed (SavedSearchDialog* self);
static void _saved_search_dialog_on_title_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                 gpointer self);
VALA_EXTERN void saved_search_dialog_show (SavedSearchDialog* self);
static void saved_search_dialog_on_scroll (SavedSearchDialog* self);
static void _saved_search_dialog_on_scroll_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self);
static SavedSearchDialogSearchRowContainer* saved_search_dialog_search_row_container_new (void);
static SavedSearchDialogSearchRowContainer* saved_search_dialog_search_row_container_construct (GType object_type);
static GtkWidget* saved_search_dialog_search_row_container_get_widget (SavedSearchDialogSearchRowContainer* self);
static void saved_search_dialog_on_remove_row (SavedSearchDialog* self,
                                        SavedSearchDialogSearchRowContainer* row);
static void _saved_search_dialog_on_remove_row_saved_search_dialog_search_row_container_remove (SavedSearchDialogSearchRowContainer* _sender,
                                                                                         SavedSearchDialogSearchRowContainer* this_row,
                                                                                         gpointer self);
static void saved_search_dialog_on_row_changed (SavedSearchDialog* self,
                                         SavedSearchDialogSearchRowContainer* row);
static void _saved_search_dialog_on_row_changed_saved_search_dialog_search_row_container_changed (SavedSearchDialogSearchRowContainer* _sender,
                                                                                           SavedSearchDialogSearchRowContainer* this_row,
                                                                                           gpointer self);
static gboolean saved_search_dialog_search_row_container_is_complete (SavedSearchDialogSearchRowContainer* self);
VALA_EXTERN gboolean saved_search_table_exists (SavedSearchTable* self,
                                    const gchar* search_name);
VALA_EXTERN void app_window_error_message (const gchar* message,
                               GtkWindow* parent);
VALA_EXTERN gchar* resources_rename_search_exists_message (const gchar* name);
VALA_EXTERN void saved_search_table_remove (SavedSearchTable* self,
                                SavedSearch* search);
static SearchCondition* saved_search_dialog_search_row_container_get_search_condition (SavedSearchDialogSearchRowContainer* self);
VALA_EXTERN SavedSearch* saved_search_table_create (SavedSearchTable* self,
                                        const gchar* name,
                                        SearchOperator operator,
                                        GeeArrayList* conditions);
static gboolean saved_search_dialog_is_title_valid (SavedSearchDialog* self);
VALA_EXTERN GType search_condition_search_type_get_type (void) G_GNUC_CONST ;
static gpointer saved_search_dialog_search_row_ref (gpointer instance);
static void saved_search_dialog_search_row_unref (gpointer instance);
static GParamSpec* saved_search_dialog_param_spec_search_row (const gchar* name,
                                                       const gchar* nick,
                                                       const gchar* blurb,
                                                       GType object_type,
                                                       GParamFlags flags) G_GNUC_UNUSED ;
static void saved_search_dialog_value_set_search_row (GValue* value,
                                               gpointer v_object) G_GNUC_UNUSED ;
static void saved_search_dialog_value_take_search_row (GValue* value,
                                                gpointer v_object) G_GNUC_UNUSED ;
static gpointer saved_search_dialog_value_get_search_row (const GValue* value) G_GNUC_UNUSED ;
static GType saved_search_dialog_search_row_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRow, saved_search_dialog_search_row_unref)
static void saved_search_dialog_search_row_container_setup_gui (SavedSearchDialogSearchRowContainer* self);
static void saved_search_dialog_search_row_container_set_type (SavedSearchDialogSearchRowContainer* self,
                                                        SearchConditionSearchType type);
VALA_EXTERN SearchConditionSearchType search_condition_get_search_type (SearchCondition* self);
static void saved_search_dialog_search_row_container_set_type_combo_box (SavedSearchDialogSearchRowContainer* self,
                                                                  SearchConditionSearchType st);
static void saved_search_dialog_search_row_populate (SavedSearchDialogSearchRow* self,
                                              SearchCondition* sc);
VALA_EXTERN SearchConditionSearchType* search_condition_search_type_as_array (gint* result_length1);
VALA_EXTERN void search_condition_search_type_sort_array (SearchConditionSearchType** array,
                                              gint* array_length1);
VALA_EXTERN gchar* search_condition_search_type_display_text (SearchConditionSearchType self);
static void saved_search_dialog_search_row_container_on_type_changed (SavedSearchDialogSearchRowContainer* self);
static void _saved_search_dialog_search_row_container_on_type_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                      gpointer self);
static void saved_search_dialog_search_row_container_on_removed (SavedSearchDialogSearchRowContainer* self);
static void _saved_search_dialog_search_row_container_on_removed_gtk_button_clicked (GtkButton* _sender,
                                                                              gpointer self);
static SearchConditionSearchType saved_search_dialog_search_row_container_get_search_type (SavedSearchDialogSearchRowContainer* self);
static GtkWidget* saved_search_dialog_search_row_get_widget (SavedSearchDialogSearchRow* self);
static SavedSearchDialogSearchRowText* saved_search_dialog_search_row_text_new (SavedSearchDialogSearchRowContainer* parent);
static SavedSearchDialogSearchRowText* saved_search_dialog_search_row_text_construct (GType object_type,
                                                                               SavedSearchDialogSearchRowContainer* parent);
static GType saved_search_dialog_search_row_text_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRowText, saved_search_dialog_search_row_unref)
static SavedSearchDialogSearchRowMediaType* saved_search_dialog_search_row_media_type_new (SavedSearchDialogSearchRowContainer* parent);
static SavedSearchDialogSearchRowMediaType* saved_search_dialog_search_row_media_type_construct (GType object_type,
                                                                                          SavedSearchDialogSearchRowContainer* parent);
static GType saved_search_dialog_search_row_media_type_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRowMediaType, saved_search_dialog_search_row_unref)
static SavedSearchDialogSearchRowFlagged* saved_search_dialog_search_row_flagged_new (SavedSearchDialogSearchRowContainer* parent);
static SavedSearchDialogSearchRowFlagged* saved_search_dialog_search_row_flagged_construct (GType object_type,
                                                                                     SavedSearchDialogSearchRowContainer* parent);
static GType saved_search_dialog_search_row_flagged_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRowFlagged, saved_search_dialog_search_row_unref)
static SavedSearchDialogSearchRowModified* saved_search_dialog_search_row_modified_new (SavedSearchDialogSearchRowContainer* parent);
static SavedSearchDialogSearchRowModified* saved_search_dialog_search_row_modified_construct (GType object_type,
                                                                                       SavedSearchDialogSearchRowContainer* parent);
static GType saved_search_dialog_search_row_modified_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRowModified, saved_search_dialog_search_row_unref)
static SavedSearchDialogSearchRowRating* saved_search_dialog_search_row_rating_new (SavedSearchDialogSearchRowContainer* parent);
static SavedSearchDialogSearchRowRating* saved_search_dialog_search_row_rating_construct (GType object_type,
                                                                                   SavedSearchDialogSearchRowContainer* parent);
static GType saved_search_dialog_search_row_rating_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRowRating, saved_search_dialog_search_row_unref)
static SavedSearchDialogSearchRowDate* saved_search_dialog_search_row_date_new (SavedSearchDialogSearchRowContainer* parent);
static SavedSearchDialogSearchRowDate* saved_search_dialog_search_row_date_construct (GType object_type,
                                                                               SavedSearchDialogSearchRowContainer* parent);
static GType saved_search_dialog_search_row_date_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SavedSearchDialogSearchRowDate, saved_search_dialog_search_row_unref)
static SearchCondition* saved_search_dialog_search_row_get_search_condition (SavedSearchDialogSearchRow* self);
static gboolean saved_search_dialog_search_row_is_complete (SavedSearchDialogSearchRow* self);
static void g_cclosure_user_marshal_VOID__SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER (GClosure * closure,
                                                                             GValue * return_value,
                                                                             guint n_param_values,
                                                                             const GValue * param_values,
                                                                             gpointer invocation_hint,
                                                                             gpointer marshal_data);
static void saved_search_dialog_search_row_container_finalize (SavedSearchDialogSearchRowContainer * obj);
static GType saved_search_dialog_search_row_container_get_type_once (void);
static GtkWidget* saved_search_dialog_search_row_real_get_widget (SavedSearchDialogSearchRow* self);
static SearchCondition* saved_search_dialog_search_row_real_get_search_condition (SavedSearchDialogSearchRow* self);
static void saved_search_dialog_search_row_real_populate (SavedSearchDialogSearchRow* self,
                                                   SearchCondition* sc);
static gboolean saved_search_dialog_search_row_real_is_complete (SavedSearchDialogSearchRow* self);
static SavedSearchDialogSearchRow* saved_search_dialog_search_row_construct (GType object_type);
static void saved_search_dialog_search_row_finalize (SavedSearchDialogSearchRow * obj);
static GType saved_search_dialog_search_row_get_type_once (void);
static void saved_search_dialog_search_row_text_on_changed (SavedSearchDialogSearchRowText* self);
static void _saved_search_dialog_search_row_text_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                            gpointer self);
static void _saved_search_dialog_search_row_text_on_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                           gpointer self);
static GtkWidget* saved_search_dialog_search_row_text_real_get_widget (SavedSearchDialogSearchRow* base);
static SearchCondition* saved_search_dialog_search_row_text_real_get_search_condition (SavedSearchDialogSearchRow* base);
VALA_EXTERN GType search_condition_text_context_get_type (void) G_GNUC_CONST ;
static SearchConditionTextContext saved_search_dialog_search_row_text_get_text_context (SavedSearchDialogSearchRowText* self);
VALA_EXTERN GType search_condition_text_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchConditionText, search_condition_unref)
VALA_EXTERN SearchConditionText* search_condition_text_new (SearchConditionSearchType search_type,
                                                const gchar* text,
                                                SearchConditionTextContext context);
VALA_EXTERN SearchConditionText* search_condition_text_construct (GType object_type,
                                                      SearchConditionSearchType search_type,
                                                      const gchar* text,
                                                      SearchConditionTextContext context);
static void saved_search_dialog_search_row_text_real_populate (SavedSearchDialogSearchRow* base,
                                                        SearchCondition* sc);
VALA_EXTERN SearchConditionTextContext search_condition_text_get_context (SearchConditionText* self);
VALA_EXTERN const gchar* search_condition_text_get_text (SearchConditionText* self);
static gboolean saved_search_dialog_search_row_text_real_is_complete (SavedSearchDialogSearchRow* base);
static void saved_search_dialog_search_row_text_finalize (SavedSearchDialogSearchRow * obj);
static GType saved_search_dialog_search_row_text_get_type_once (void);
static void saved_search_dialog_search_row_media_type_on_changed (SavedSearchDialogSearchRowMediaType* self);
static void _saved_search_dialog_search_row_media_type_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                  gpointer self);
static GtkWidget* saved_search_dialog_search_row_media_type_real_get_widget (SavedSearchDialogSearchRow* base);
static SearchCondition* saved_search_dialog_search_row_media_type_real_get_search_condition (SavedSearchDialogSearchRow* base);
VALA_EXTERN GType search_condition_media_type_context_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType search_condition_media_type_media_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType search_condition_media_type_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchConditionMediaType, search_condition_unref)
VALA_EXTERN SearchConditionMediaType* search_condition_media_type_new (SearchConditionSearchType search_type,
                                                           SearchConditionMediaTypeContext context,
                                                           SearchConditionMediaTypeMediaType media_type);
VALA_EXTERN SearchConditionMediaType* search_condition_media_type_construct (GType object_type,
                                                                 SearchConditionSearchType search_type,
                                                                 SearchConditionMediaTypeContext context,
                                                                 SearchConditionMediaTypeMediaType media_type);
static void saved_search_dialog_search_row_media_type_real_populate (SavedSearchDialogSearchRow* base,
                                                              SearchCondition* sc);
VALA_EXTERN SearchConditionMediaTypeContext search_condition_media_type_get_context (SearchConditionMediaType* self);
VALA_EXTERN SearchConditionMediaTypeMediaType search_condition_media_type_get_media_type (SearchConditionMediaType* self);
static gboolean saved_search_dialog_search_row_media_type_real_is_complete (SavedSearchDialogSearchRow* base);
static void saved_search_dialog_search_row_media_type_finalize (SavedSearchDialogSearchRow * obj);
static GType saved_search_dialog_search_row_media_type_get_type_once (void);
static void saved_search_dialog_search_row_modified_on_changed (SavedSearchDialogSearchRowModified* self);
static void _saved_search_dialog_search_row_modified_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                gpointer self);
static GtkWidget* saved_search_dialog_search_row_modified_real_get_widget (SavedSearchDialogSearchRow* base);
static SearchCondition* saved_search_dialog_search_row_modified_real_get_search_condition (SavedSearchDialogSearchRow* base);
VALA_EXTERN GType search_condition_modified_context_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType search_condition_modified_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType search_condition_modified_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchConditionModified, search_condition_unref)
VALA_EXTERN SearchConditionModified* search_condition_modified_new (SearchConditionSearchType search_type,
                                                        SearchConditionModifiedContext context,
                                                        SearchConditionModifiedState state);
VALA_EXTERN SearchConditionModified* search_condition_modified_construct (GType object_type,
                                                              SearchConditionSearchType search_type,
                                                              SearchConditionModifiedContext context,
                                                              SearchConditionModifiedState state);
static void saved_search_dialog_search_row_modified_real_populate (SavedSearchDialogSearchRow* base,
                                                            SearchCondition* sc);
VALA_EXTERN SearchConditionModifiedState search_condition_modified_get_state (SearchConditionModified* self);
VALA_EXTERN SearchConditionModifiedContext search_condition_modified_get_context (SearchConditionModified* self);
static gboolean saved_search_dialog_search_row_modified_real_is_complete (SavedSearchDialogSearchRow* base);
static void saved_search_dialog_search_row_modified_finalize (SavedSearchDialogSearchRow * obj);
static GType saved_search_dialog_search_row_modified_get_type_once (void);
static void saved_search_dialog_search_row_flagged_on_changed (SavedSearchDialogSearchRowFlagged* self);
static void _saved_search_dialog_search_row_flagged_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                               gpointer self);
static GtkWidget* saved_search_dialog_search_row_flagged_real_get_widget (SavedSearchDialogSearchRow* base);
static SearchCondition* saved_search_dialog_search_row_flagged_real_get_search_condition (SavedSearchDialogSearchRow* base);
VALA_EXTERN GType search_condition_flagged_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType search_condition_flagged_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchConditionFlagged, search_condition_unref)
VALA_EXTERN SearchConditionFlagged* search_condition_flagged_new (SearchConditionSearchType search_type,
                                                      SearchConditionFlaggedState state);
VALA_EXTERN SearchConditionFlagged* search_condition_flagged_construct (GType object_type,
                                                            SearchConditionSearchType search_type,
                                                            SearchConditionFlaggedState state);
static void saved_search_dialog_search_row_flagged_real_populate (SavedSearchDialogSearchRow* base,
                                                           SearchCondition* sc);
VALA_EXTERN SearchConditionFlaggedState search_condition_flagged_get_state (SearchConditionFlagged* self);
static gboolean saved_search_dialog_search_row_flagged_real_is_complete (SavedSearchDialogSearchRow* base);
static void saved_search_dialog_search_row_flagged_finalize (SavedSearchDialogSearchRow * obj);
static GType saved_search_dialog_search_row_flagged_get_type_once (void);
static void saved_search_dialog_search_row_rating_on_changed (SavedSearchDialogSearchRowRating* self);
static void _saved_search_dialog_search_row_rating_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                              gpointer self);
VALA_EXTERN GType rating_get_type (void) G_GNUC_CONST ;
VALA_EXTERN const gchar* resources_rating_combo_box (Rating rating);
static GtkWidget* saved_search_dialog_search_row_rating_real_get_widget (SavedSearchDialogSearchRow* base);
static SearchCondition* saved_search_dialog_search_row_rating_real_get_search_condition (SavedSearchDialogSearchRow* base);
VALA_EXTERN GType search_condition_rating_context_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType search_condition_rating_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchConditionRating, search_condition_unref)
VALA_EXTERN SearchConditionRating* search_condition_rating_new (SearchConditionSearchType search_type,
                                                    Rating rating,
                                                    SearchConditionRatingContext context);
VALA_EXTERN SearchConditionRating* search_condition_rating_construct (GType object_type,
                                                          SearchConditionSearchType search_type,
                                                          Rating rating,
                                                          SearchConditionRatingContext context);
static void saved_search_dialog_search_row_rating_real_populate (SavedSearchDialogSearchRow* base,
                                                          SearchCondition* sc);
VALA_EXTERN SearchConditionRatingContext search_condition_rating_get_context (SearchConditionRating* self);
VALA_EXTERN Rating search_condition_rating_get_rating (SearchConditionRating* self);
static gboolean saved_search_dialog_search_row_rating_real_is_complete (SavedSearchDialogSearchRow* base);
static void saved_search_dialog_search_row_rating_finalize (SavedSearchDialogSearchRow * obj);
static GType saved_search_dialog_search_row_rating_get_type_once (void);
static void saved_search_dialog_search_row_date_on_changed (SavedSearchDialogSearchRowDate* self);
static void _saved_search_dialog_search_row_date_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                            gpointer self);
static void saved_search_dialog_search_row_date_on_one_clicked (SavedSearchDialogSearchRowDate* self);
static void _saved_search_dialog_search_row_date_on_one_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self);
static void saved_search_dialog_search_row_date_on_two_clicked (SavedSearchDialogSearchRowDate* self);
static void _saved_search_dialog_search_row_date_on_two_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self);
static void saved_search_dialog_search_row_date_update_date_labels (SavedSearchDialogSearchRowDate* self);
VALA_EXTERN GType search_condition_date_context_get_type (void) G_GNUC_CONST ;
static GDateTime* saved_search_dialog_search_row_date_get_date_one (SavedSearchDialogSearchRowDate* self);
static GDateTime* saved_search_dialog_search_row_date_get_date_two (SavedSearchDialogSearchRowDate* self);
static GtkWidget* saved_search_dialog_search_row_date_real_get_widget (SavedSearchDialogSearchRow* base);
static void saved_search_dialog_search_row_date_set_date_one (SavedSearchDialogSearchRowDate* self,
                                                       GDateTime* date);
static void saved_search_dialog_search_row_date_set_date_two (SavedSearchDialogSearchRowDate* self,
                                                       GDateTime* date);
static SearchCondition* saved_search_dialog_search_row_date_real_get_search_condition (SavedSearchDialogSearchRow* base);
VALA_EXTERN GType search_condition_date_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchConditionDate, search_condition_unref)
VALA_EXTERN SearchConditionDate* search_condition_date_new (SearchConditionSearchType search_type,
                                                SearchConditionDateContext context,
                                                GDateTime* date_one,
                                                GDateTime* date_two);
VALA_EXTERN SearchConditionDate* search_condition_date_construct (GType object_type,
                                                      SearchConditionSearchType search_type,
                                                      SearchConditionDateContext context,
                                                      GDateTime* date_one,
                                                      GDateTime* date_two);
static void saved_search_dialog_search_row_date_real_populate (SavedSearchDialogSearchRow* base,
                                                        SearchCondition* sc);
VALA_EXTERN SearchConditionDateContext search_condition_date_get_context (SearchConditionDate* self);
VALA_EXTERN GDateTime* search_condition_date_get_date_one (SearchConditionDate* self);
VALA_EXTERN GDateTime* search_condition_date_get_date_two (SearchConditionDate* self);
static gboolean saved_search_dialog_search_row_date_real_is_complete (SavedSearchDialogSearchRow* base);
static void saved_search_dialog_search_row_date_popup_calendar (SavedSearchDialogSearchRowDate* self,
                                                         GtkCalendar* cal);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static void __lambda16_ (SavedSearchDialogSearchRowDate* self);
static void ___lambda16__gtk_calendar_day_selected (GtkCalendar* _sender,
                                             gpointer self);
static void __lambda17_ (Block11Data* _data11_);
static void ___lambda17__gtk_calendar_day_selected_double_click (GtkCalendar* _sender,
                                                          gpointer self);
static void saved_search_dialog_search_row_date_finalize (SavedSearchDialogSearchRow * obj);
static GType saved_search_dialog_search_row_date_get_type_once (void);
static void saved_search_dialog_finalize (GObject * obj);
static GType saved_search_dialog_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
saved_search_dialog_get_instance_private (SavedSearchDialog* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialog_private_offset);
}

SavedSearchDialog*
saved_search_dialog_construct (GType object_type)
{
	SavedSearchDialog * self = NULL;
	GtkEntry* _tmp0_;
	SavedSearchTable* _tmp1_;
	SavedSearchTable* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkEntry* _tmp5_;
	GeeArrayList* _tmp6_;
	gpointer _tmp7_;
	SavedSearchDialogSearchRowContainer* _tmp8_;
	self = (SavedSearchDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL);
	saved_search_dialog_setup_dialog (self);
	_tmp0_ = self->priv->search_title;
	_tmp1_ = saved_search_table_get_instance ();
	_tmp2_ = _tmp1_;
	_tmp3_ = saved_search_table_generate_unique_name (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_entry_set_text (_tmp0_, _tmp4_);
	_g_free0 (_tmp4_);
	_saved_search_table_unref0 (_tmp2_);
	_tmp5_ = self->priv->search_title;
	gtk_editable_select_region (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_editable_get_type (), GtkEditable), 0, -1);
	saved_search_dialog_add_text_search (self);
	_tmp6_ = self->priv->row_list;
	_tmp7_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
	_tmp8_ = (SavedSearchDialogSearchRowContainer*) _tmp7_;
	saved_search_dialog_search_row_container_allow_removal (_tmp8_, FALSE);
	_saved_search_dialog_search_row_container_unref0 (_tmp8_);
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	saved_search_dialog_set_valid (self, FALSE);
	return self;
}

SavedSearchDialog*
saved_search_dialog_new (void)
{
	return saved_search_dialog_construct (TYPE_SAVED_SEARCH_DIALOG);
}

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

SavedSearchDialog*
saved_search_dialog_construct_edit_existing (GType object_type,
                                             SavedSearch* saved_search)
{
	SavedSearchDialog * self = NULL;
	SavedSearch* _tmp0_;
	GtkComboBoxText* _tmp1_;
	GtkEntry* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GeeArrayList* _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	g_return_val_if_fail (IS_SAVED_SEARCH (saved_search), NULL);
	self = (SavedSearchDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL);
	_tmp0_ = _g_object_ref0 (saved_search);
	_g_object_unref0 (self->priv->previous_search);
	self->priv->previous_search = _tmp0_;
	self->priv->edit_mode = TRUE;
	saved_search_dialog_setup_dialog (self);
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp1_ = self->priv->operator;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox), (gint) ((SearchOperator) saved_search_get_operator (saved_search)));
	_tmp2_ = self->priv->search_title;
	_tmp3_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (saved_search, TYPE_DATA_OBJECT, DataObject));
	_tmp4_ = _tmp3_;
	gtk_entry_set_text (_tmp2_, _tmp4_);
	_g_free0 (_tmp4_);
	{
		GeeList* _sc_list = NULL;
		GeeList* _tmp5_;
		gint _sc_size = 0;
		GeeList* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		gint _sc_index = 0;
		_tmp5_ = saved_search_get_conditions (saved_search);
		_sc_list = _tmp5_;
		_tmp6_ = _sc_list;
		_tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
		_tmp8_ = _tmp7_;
		_sc_size = _tmp8_;
		_sc_index = -1;
		while (TRUE) {
			gint _tmp9_;
			gint _tmp10_;
			SearchCondition* sc = NULL;
			GeeList* _tmp11_;
			gpointer _tmp12_;
			SearchCondition* _tmp13_;
			SavedSearchDialogSearchRowContainer* _tmp14_;
			SavedSearchDialogSearchRowContainer* _tmp15_;
			_sc_index = _sc_index + 1;
			_tmp9_ = _sc_index;
			_tmp10_ = _sc_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _sc_list;
			_tmp12_ = gee_list_get (_tmp11_, _sc_index);
			sc = (SearchCondition*) _tmp12_;
			_tmp13_ = sc;
			_tmp14_ = saved_search_dialog_search_row_container_new_edit_existing (_tmp13_);
			_tmp15_ = _tmp14_;
			saved_search_dialog_add_row (self, _tmp15_);
			_saved_search_dialog_search_row_container_unref0 (_tmp15_);
			_search_condition_unref0 (sc);
		}
		_g_object_unref0 (_sc_list);
	}
	_tmp16_ = self->priv->row_list;
	_tmp17_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
	_tmp18_ = _tmp17_;
	if (_tmp18_ == 1) {
		GeeArrayList* _tmp19_;
		gpointer _tmp20_;
		SavedSearchDialogSearchRowContainer* _tmp21_;
		_tmp19_ = self->priv->row_list;
		_tmp20_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
		_tmp21_ = (SavedSearchDialogSearchRowContainer*) _tmp20_;
		saved_search_dialog_search_row_container_allow_removal (_tmp21_, FALSE);
		_saved_search_dialog_search_row_container_unref0 (_tmp21_);
	}
	saved_search_dialog_set_valid (self, TRUE);
	return self;
}

SavedSearchDialog*
saved_search_dialog_new_edit_existing (SavedSearch* saved_search)
{
	return saved_search_dialog_construct_edit_existing (TYPE_SAVED_SEARCH_DIALOG, saved_search);
}

static void
_saved_search_dialog_on_response_gtk_dialog_response (GtkDialog* _sender,
                                                      gint response_id,
                                                      gpointer self)
{
	saved_search_dialog_on_response ((SavedSearchDialog*) self, response_id);
}

static void
_saved_search_dialog_on_add_criteria_gtk_button_clicked (GtkButton* _sender,
                                                         gpointer self)
{
	saved_search_dialog_on_add_criteria ((SavedSearchDialog*) self);
}

static void
_saved_search_dialog_on_title_changed_gtk_editable_changed (GtkEditable* _sender,
                                                            gpointer self)
{
	saved_search_dialog_on_title_changed ((SavedSearchDialog*) self);
}

static void
saved_search_dialog_setup_dialog (SavedSearchDialog* self)
{
	AppWindow* _tmp0_;
	AppWindow* _tmp1_;
	GtkButton* _tmp2_;
	GtkEntry* _tmp3_;
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	_tmp0_ = app_window_get_instance ();
	_tmp1_ = _tmp0_;
	gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow));
	_g_object_unref0 (_tmp1_);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), "response", (GCallback) _saved_search_dialog_on_response_gtk_dialog_response, self, 0);
	_tmp2_ = self->priv->add_criteria;
	g_signal_connect_object (_tmp2_, "clicked", (GCallback) _saved_search_dialog_on_add_criteria_gtk_button_clicked, self, 0);
	_tmp3_ = self->priv->search_title;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_editable_get_type (), GtkEditable), "changed", (GCallback) _saved_search_dialog_on_title_changed_gtk_editable_changed, self, 0);
	if (resources_use_header_bar () == 1) {
		GtkContainer* box = NULL;
		GtkEntry* _tmp4_;
		GtkContainer* _tmp5_;
		GtkContainer* _tmp6_;
		GtkContainer* _tmp7_;
		GtkEntry* _tmp8_;
		GtkContainer* _tmp9_;
		GtkContainer* _tmp10_;
		GtkContainer* _tmp11_;
		GtkHeaderBar* _tmp12_;
		GtkEntry* _tmp13_;
		_tmp4_ = self->priv->search_title;
		_tmp5_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
		_tmp6_ = _g_object_ref0 (_tmp5_);
		box = _tmp6_;
		_tmp7_ = box;
		_tmp8_ = self->priv->search_title;
		gtk_container_remove (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
		_tmp9_ = box;
		_tmp10_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
		_tmp11_ = box;
		gtk_container_remove (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget));
		_tmp12_ = gtk_dialog_get_header_bar (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		_tmp13_ = self->priv->search_title;
		gtk_header_bar_set_custom_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_header_bar_get_type (), GtkHeaderBar), G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (box);
	}
}

void
saved_search_dialog_show (SavedSearchDialog* self)
{
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
}

static void
_saved_search_dialog_on_scroll_g_object_notify (GObject* _sender,
                                                GParamSpec* pspec,
                                                gpointer self)
{
	saved_search_dialog_on_scroll ((SavedSearchDialog*) self);
}

static void
saved_search_dialog_on_add_criteria (SavedSearchDialog* self)
{
	GtkListBox* _tmp0_;
	GtkAdjustment* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	GtkListBox* _tmp4_;
	GtkAdjustment* _tmp5_;
	gulong _tmp6_;
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	_tmp0_ = self->priv->row_listbox;
	_tmp1_ = gtk_list_box_get_adjustment (_tmp0_);
	_tmp2_ = gtk_adjustment_get_upper (_tmp1_);
	_tmp3_ = _tmp2_;
	self->priv->upper = _tmp3_;
	_tmp4_ = self->priv->row_listbox;
	_tmp5_ = gtk_list_box_get_adjustment (_tmp4_);
	_tmp6_ = g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G_TYPE_OBJECT, GObject), "notify::upper", (GCallback) _saved_search_dialog_on_scroll_g_object_notify, self, 0);
	self->priv->notify_id = _tmp6_;
	saved_search_dialog_add_text_search (self);
}

static void
saved_search_dialog_add_text_search (SavedSearchDialog* self)
{
	SavedSearchDialogSearchRowContainer* text = NULL;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	_tmp0_ = saved_search_dialog_search_row_container_new ();
	text = _tmp0_;
	saved_search_dialog_add_row (self, text);
	_saved_search_dialog_search_row_container_unref0 (text);
}

static void
_saved_search_dialog_on_remove_row_saved_search_dialog_search_row_container_remove (SavedSearchDialogSearchRowContainer* _sender,
                                                                                    SavedSearchDialogSearchRowContainer* this_row,
                                                                                    gpointer self)
{
	saved_search_dialog_on_remove_row ((SavedSearchDialog*) self, this_row);
}

static void
_saved_search_dialog_on_row_changed_saved_search_dialog_search_row_container_changed (SavedSearchDialogSearchRowContainer* _sender,
                                                                                      SavedSearchDialogSearchRowContainer* this_row,
                                                                                      gpointer self)
{
	saved_search_dialog_on_row_changed ((SavedSearchDialog*) self, this_row);
}

static void
saved_search_dialog_add_row (SavedSearchDialog* self,
                             SavedSearchDialogSearchRowContainer* row)
{
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GtkListBox* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* _tmp8_;
	GeeArrayList* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	GeeArrayList* _tmp12_;
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (row));
	_tmp0_ = self->priv->row_list;
	_tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
	_tmp2_ = _tmp1_;
	if (_tmp2_ == 1) {
		GeeArrayList* _tmp3_;
		gpointer _tmp4_;
		SavedSearchDialogSearchRowContainer* _tmp5_;
		_tmp3_ = self->priv->row_list;
		_tmp4_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
		_tmp5_ = (SavedSearchDialogSearchRowContainer*) _tmp4_;
		saved_search_dialog_search_row_container_allow_removal (_tmp5_, TRUE);
		_saved_search_dialog_search_row_container_unref0 (_tmp5_);
	}
	_tmp6_ = self->priv->row_listbox;
	_tmp7_ = saved_search_dialog_search_row_container_get_widget (row);
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->row_list;
	_tmp10_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
	_tmp11_ = _tmp10_;
	gtk_list_box_insert (_tmp6_, _tmp8_, _tmp11_);
	_g_object_unref0 (_tmp8_);
	_tmp12_ = self->priv->row_list;
	gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), row);
	g_signal_connect_object (row, "remove", (GCallback) _saved_search_dialog_on_remove_row_saved_search_dialog_search_row_container_remove, self, 0);
	g_signal_connect_object (row, "changed", (GCallback) _saved_search_dialog_on_row_changed_saved_search_dialog_search_row_container_changed, self, 0);
	saved_search_dialog_set_valid (self, saved_search_dialog_search_row_container_is_complete (row));
}

static void
saved_search_dialog_on_scroll (SavedSearchDialog* self)
{
	GtkAdjustment* adj = NULL;
	GtkListBox* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	GtkAdjustment* _tmp7_;
	GtkAdjustment* _tmp8_;
	gdouble _tmp9_;
	gdouble _tmp10_;
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	_tmp0_ = self->priv->row_listbox;
	_tmp1_ = gtk_list_box_get_adjustment (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	adj = _tmp2_;
	_tmp3_ = adj;
	_tmp4_ = gtk_adjustment_get_upper (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ < self->priv->upper) {
		_g_object_unref0 (adj);
		return;
	}
	if (self->priv->notify_id != ((gulong) 0)) {
		GtkAdjustment* _tmp6_;
		_tmp6_ = adj;
		g_signal_handler_disconnect (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, G_TYPE_OBJECT, GObject), self->priv->notify_id);
		self->priv->notify_id = (gulong) 0;
	}
	_tmp7_ = adj;
	_tmp8_ = adj;
	_tmp9_ = gtk_adjustment_get_upper (_tmp8_);
	_tmp10_ = _tmp9_;
	gtk_adjustment_set_value (_tmp7_, _tmp10_);
	_g_object_unref0 (adj);
}

static void
saved_search_dialog_on_remove_row (SavedSearchDialog* self,
                                   SavedSearchDialogSearchRowContainer* row)
{
	guint _tmp0_;
	guint _tmp1_;
	GtkListBox* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	GtkContainer* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (row));
	g_signal_parse_name ("remove", SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, &_tmp0_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (row, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _saved_search_dialog_on_remove_row_saved_search_dialog_search_row_container_remove, self);
	g_signal_parse_name ("changed", SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (row, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _saved_search_dialog_on_row_changed_saved_search_dialog_search_row_container_changed, self);
	_tmp2_ = self->priv->row_listbox;
	_tmp3_ = saved_search_dialog_search_row_container_get_widget (row);
	_tmp4_ = _tmp3_;
	_tmp5_ = gtk_widget_get_parent (_tmp4_);
	gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (_tmp4_);
	_tmp6_ = self->priv->row_list;
	gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), row);
	_tmp7_ = self->priv->row_list;
	_tmp8_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
	_tmp9_ = _tmp8_;
	if (_tmp9_ == 1) {
		GeeArrayList* _tmp10_;
		gpointer _tmp11_;
		SavedSearchDialogSearchRowContainer* _tmp12_;
		_tmp10_ = self->priv->row_list;
		_tmp11_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
		_tmp12_ = (SavedSearchDialogSearchRowContainer*) _tmp11_;
		saved_search_dialog_search_row_container_allow_removal (_tmp12_, FALSE);
		_saved_search_dialog_search_row_container_unref0 (_tmp12_);
	}
	saved_search_dialog_set_valid (self, TRUE);
}

static void
saved_search_dialog_on_response (SavedSearchDialog* self,
                                 gint response_id)
{
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	if (response_id == ((gint) GTK_RESPONSE_OK)) {
		gboolean _tmp0_ = FALSE;
		SavedSearchTable* _tmp1_;
		SavedSearchTable* _tmp2_;
		GtkEntry* _tmp3_;
		const gchar* _tmp4_;
		gboolean _tmp5_;
		GeeArrayList* conditions = NULL;
		GeeArrayList* _tmp19_;
		SearchOperator search_operator = 0;
		GtkComboBoxText* _tmp32_;
		SavedSearchTable* _tmp33_;
		SavedSearchTable* _tmp34_;
		GtkEntry* _tmp35_;
		const gchar* _tmp36_;
		GeeArrayList* _tmp37_;
		SavedSearch* _tmp38_;
		SavedSearch* _tmp39_;
		_tmp1_ = saved_search_table_get_instance ();
		_tmp2_ = _tmp1_;
		_tmp3_ = self->priv->search_title;
		_tmp4_ = gtk_entry_get_text (_tmp3_);
		_tmp5_ = saved_search_table_exists (_tmp2_, _tmp4_);
		_saved_search_table_unref0 (_tmp2_);
		if (_tmp5_) {
			gboolean _tmp6_ = FALSE;
			if (self->priv->edit_mode) {
				SavedSearch* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				GtkEntry* _tmp10_;
				const gchar* _tmp11_;
				_tmp7_ = self->priv->previous_search;
				_tmp8_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_OBJECT, DataObject));
				_tmp9_ = _tmp8_;
				_tmp10_ = self->priv->search_title;
				_tmp11_ = gtk_entry_get_text (_tmp10_);
				_tmp6_ = g_strcmp0 (_tmp9_, _tmp11_) == 0;
				_g_free0 (_tmp9_);
			} else {
				_tmp6_ = FALSE;
			}
			_tmp0_ = !_tmp6_;
		} else {
			_tmp0_ = FALSE;
		}
		if (_tmp0_) {
			GtkEntry* _tmp12_;
			const gchar* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			_tmp12_ = self->priv->search_title;
			_tmp13_ = gtk_entry_get_text (_tmp12_);
			_tmp14_ = resources_rename_search_exists_message (_tmp13_);
			_tmp15_ = _tmp14_;
			app_window_error_message (_tmp15_, NULL);
			_g_free0 (_tmp15_);
			return;
		}
		if (self->priv->edit_mode) {
			SavedSearchTable* _tmp16_;
			SavedSearchTable* _tmp17_;
			SavedSearch* _tmp18_;
			_tmp16_ = saved_search_table_get_instance ();
			_tmp17_ = _tmp16_;
			_tmp18_ = self->priv->previous_search;
			saved_search_table_remove (_tmp17_, _tmp18_);
			_saved_search_table_unref0 (_tmp17_);
		}
		_tmp19_ = gee_array_list_new (TYPE_SEARCH_CONDITION, (GBoxedCopyFunc) search_condition_ref, (GDestroyNotify) search_condition_unref, NULL, NULL, NULL);
		conditions = _tmp19_;
		{
			GeeArrayList* _c_list = NULL;
			GeeArrayList* _tmp20_;
			gint _c_size = 0;
			GeeArrayList* _tmp21_;
			gint _tmp22_;
			gint _tmp23_;
			gint _c_index = 0;
			_tmp20_ = self->priv->row_list;
			_c_list = _tmp20_;
			_tmp21_ = _c_list;
			_tmp22_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
			_tmp23_ = _tmp22_;
			_c_size = _tmp23_;
			_c_index = -1;
			while (TRUE) {
				gint _tmp24_;
				gint _tmp25_;
				SavedSearchDialogSearchRowContainer* c = NULL;
				GeeArrayList* _tmp26_;
				gpointer _tmp27_;
				GeeArrayList* _tmp28_;
				SavedSearchDialogSearchRowContainer* _tmp29_;
				SearchCondition* _tmp30_;
				SearchCondition* _tmp31_;
				_c_index = _c_index + 1;
				_tmp24_ = _c_index;
				_tmp25_ = _c_size;
				if (!(_tmp24_ < _tmp25_)) {
					break;
				}
				_tmp26_ = _c_list;
				_tmp27_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _c_index);
				c = (SavedSearchDialogSearchRowContainer*) _tmp27_;
				_tmp28_ = conditions;
				_tmp29_ = c;
				_tmp30_ = saved_search_dialog_search_row_container_get_search_condition (_tmp29_);
				_tmp31_ = _tmp30_;
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp31_);
				_search_condition_unref0 (_tmp31_);
				_saved_search_dialog_search_row_container_unref0 (c);
			}
		}
		_tmp32_ = self->priv->operator;
		search_operator = (SearchOperator) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_combo_box_get_type (), GtkComboBox));
		_tmp33_ = saved_search_table_get_instance ();
		_tmp34_ = _tmp33_;
		_tmp35_ = self->priv->search_title;
		_tmp36_ = gtk_entry_get_text (_tmp35_);
		_tmp37_ = conditions;
		_tmp38_ = saved_search_table_create (_tmp34_, _tmp36_, search_operator, _tmp37_);
		_tmp39_ = _tmp38_;
		_g_object_unref0 (_tmp39_);
		_saved_search_table_unref0 (_tmp34_);
		_g_object_unref0 (conditions);
	}
}

static void
saved_search_dialog_on_row_changed (SavedSearchDialog* self,
                                    SavedSearchDialogSearchRowContainer* row)
{
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (row));
	saved_search_dialog_set_valid (self, saved_search_dialog_search_row_container_is_complete (row));
}

static void
saved_search_dialog_on_title_changed (SavedSearchDialog* self)
{
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	saved_search_dialog_set_valid (self, saved_search_dialog_is_title_valid (self));
}

static gchar*
string_chomp (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strchomp (_result_);
	result = _result_;
	return result;
}

static gboolean
saved_search_dialog_is_title_valid (SavedSearchDialog* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkEntry* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gboolean _tmp12_;
	SavedSearchTable* _tmp13_;
	SavedSearchTable* _tmp14_;
	GtkEntry* _tmp15_;
	const gchar* _tmp16_;
	gboolean _tmp17_;
	gboolean result;
	g_return_val_if_fail (IS_SAVED_SEARCH_DIALOG (self), FALSE);
	if (self->priv->edit_mode) {
		SavedSearch* _tmp2_;
		_tmp2_ = self->priv->previous_search;
		_tmp1_ = _tmp2_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		SavedSearch* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		GtkEntry* _tmp6_;
		const gchar* _tmp7_;
		_tmp3_ = self->priv->previous_search;
		_tmp4_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject));
		_tmp5_ = _tmp4_;
		_tmp6_ = self->priv->search_title;
		_tmp7_ = gtk_entry_get_text (_tmp6_);
		_tmp0_ = g_strcmp0 (_tmp5_, _tmp7_) == 0;
		_g_free0 (_tmp5_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		result = TRUE;
		return result;
	}
	_tmp8_ = self->priv->search_title;
	_tmp9_ = gtk_entry_get_text (_tmp8_);
	_tmp10_ = string_chomp (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strcmp0 (_tmp11_, "") == 0;
	_g_free0 (_tmp11_);
	if (_tmp12_) {
		result = FALSE;
		return result;
	}
	_tmp13_ = saved_search_table_get_instance ();
	_tmp14_ = _tmp13_;
	_tmp15_ = self->priv->search_title;
	_tmp16_ = gtk_entry_get_text (_tmp15_);
	_tmp17_ = saved_search_table_exists (_tmp14_, _tmp16_);
	_saved_search_table_unref0 (_tmp14_);
	if (_tmp17_) {
		result = FALSE;
		return result;
	}
	result = TRUE;
	return result;
}

static void
saved_search_dialog_set_valid (SavedSearchDialog* self,
                               gboolean v)
{
	g_return_if_fail (IS_SAVED_SEARCH_DIALOG (self));
	if (!v) {
		self->priv->valid = FALSE;
	} else {
		if (v != self->priv->valid) {
			if (saved_search_dialog_is_title_valid (self)) {
				gint valid_rows = 0;
				GeeArrayList* _tmp10_;
				gint _tmp11_;
				gint _tmp12_;
				valid_rows = 0;
				{
					GeeArrayList* _c_list = NULL;
					GeeArrayList* _tmp0_;
					gint _c_size = 0;
					GeeArrayList* _tmp1_;
					gint _tmp2_;
					gint _tmp3_;
					gint _c_index = 0;
					_tmp0_ = self->priv->row_list;
					_c_list = _tmp0_;
					_tmp1_ = _c_list;
					_tmp2_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
					_tmp3_ = _tmp2_;
					_c_size = _tmp3_;
					_c_index = -1;
					while (TRUE) {
						gint _tmp4_;
						gint _tmp5_;
						SavedSearchDialogSearchRowContainer* c = NULL;
						GeeArrayList* _tmp6_;
						gpointer _tmp7_;
						SavedSearchDialogSearchRowContainer* _tmp8_;
						_c_index = _c_index + 1;
						_tmp4_ = _c_index;
						_tmp5_ = _c_size;
						if (!(_tmp4_ < _tmp5_)) {
							break;
						}
						_tmp6_ = _c_list;
						_tmp7_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _c_index);
						c = (SavedSearchDialogSearchRowContainer*) _tmp7_;
						_tmp8_ = c;
						if (saved_search_dialog_search_row_container_is_complete (_tmp8_)) {
							gint _tmp9_;
							_tmp9_ = valid_rows;
							valid_rows = _tmp9_ + 1;
						}
						_saved_search_dialog_search_row_container_unref0 (c);
					}
				}
				_tmp10_ = self->priv->row_list;
				_tmp11_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
				_tmp12_ = _tmp11_;
				self->priv->valid = valid_rows == _tmp12_;
			} else {
				self->priv->valid = FALSE;
			}
		}
	}
	gtk_dialog_set_response_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_OK, self->priv->valid);
}

static inline gpointer
saved_search_dialog_search_row_container_get_instance_private (SavedSearchDialogSearchRowContainer* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialogSearchRowContainer_private_offset);
}

static SavedSearchDialogSearchRowContainer*
saved_search_dialog_search_row_container_construct (GType object_type)
{
	SavedSearchDialogSearchRowContainer* self = NULL;
	self = (SavedSearchDialogSearchRowContainer*) g_type_create_instance (object_type);
	saved_search_dialog_search_row_container_setup_gui (self);
	saved_search_dialog_search_row_container_set_type (self, SEARCH_CONDITION_SEARCH_TYPE_ANY_TEXT);
	return self;
}

static SavedSearchDialogSearchRowContainer*
saved_search_dialog_search_row_container_new (void)
{
	return saved_search_dialog_search_row_container_construct (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER);
}

static SavedSearchDialogSearchRowContainer*
saved_search_dialog_search_row_container_construct_edit_existing (GType object_type,
                                                                  SearchCondition* sc)
{
	SavedSearchDialogSearchRowContainer* self = NULL;
	SearchConditionSearchType _tmp0_;
	SearchConditionSearchType _tmp1_;
	SearchConditionSearchType _tmp2_;
	SearchConditionSearchType _tmp3_;
	SavedSearchDialogSearchRow* _tmp4_;
	g_return_val_if_fail (IS_SEARCH_CONDITION (sc), NULL);
	self = (SavedSearchDialogSearchRowContainer*) g_type_create_instance (object_type);
	saved_search_dialog_search_row_container_setup_gui (self);
	_tmp0_ = search_condition_get_search_type (sc);
	_tmp1_ = _tmp0_;
	saved_search_dialog_search_row_container_set_type (self, _tmp1_);
	_tmp2_ = search_condition_get_search_type (sc);
	_tmp3_ = _tmp2_;
	saved_search_dialog_search_row_container_set_type_combo_box (self, _tmp3_);
	_tmp4_ = self->priv->my_row;
	saved_search_dialog_search_row_populate (_tmp4_, sc);
	return self;
}

static SavedSearchDialogSearchRowContainer*
saved_search_dialog_search_row_container_new_edit_existing (SearchCondition* sc)
{
	return saved_search_dialog_search_row_container_construct_edit_existing (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, sc);
}

static void
_saved_search_dialog_search_row_container_on_type_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                 gpointer self)
{
	saved_search_dialog_search_row_container_on_type_changed ((SavedSearchDialogSearchRowContainer*) self);
}

static void
_saved_search_dialog_search_row_container_on_removed_gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self)
{
	saved_search_dialog_search_row_container_on_removed ((SavedSearchDialogSearchRowContainer*) self);
}

static void
saved_search_dialog_search_row_container_setup_gui (SavedSearchDialogSearchRowContainer* self)
{
	gint _tmp0_ = 0;
	SearchConditionSearchType* _tmp1_;
	GeeHashMap* _tmp2_;
	GtkComboBoxText* _tmp3_;
	GtkComboBoxText* _tmp13_;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkBox* _tmp17_;
	GtkBox* _tmp18_;
	GtkComboBoxText* _tmp19_;
	GtkBox* _tmp20_;
	GtkButton* _tmp21_;
	GtkBox* _tmp22_;
	GtkBox* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* _tmp25_;
	GtkBox* _tmp26_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self));
	_tmp1_ = search_condition_search_type_as_array (&_tmp0_);
	self->priv->search_types = (g_free (self->priv->search_types), NULL);
	self->priv->search_types = _tmp1_;
	self->priv->search_types_length1 = _tmp0_;
	self->priv->_search_types_size_ = self->priv->search_types_length1;
	_tmp2_ = gee_hash_map_new (SEARCH_CONDITION_TYPE_SEARCH_TYPE, NULL, NULL, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->search_types_index);
	self->priv->search_types_index = _tmp2_;
	search_condition_search_type_sort_array (&self->priv->search_types, (gint*) (&self->priv->search_types_length1));
	self->priv->_search_types_size_ = self->priv->search_types_length1;
	_tmp3_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->type_combo);
	self->priv->type_combo = _tmp3_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				SearchConditionSearchType* _tmp6_;
				gint _tmp6__length1;
				SearchConditionSearchType st = 0;
				SearchConditionSearchType* _tmp7_;
				gint _tmp7__length1;
				SearchConditionSearchType _tmp8_;
				GeeHashMap* _tmp9_;
				GtkComboBoxText* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = self->priv->search_types;
				_tmp6__length1 = self->priv->search_types_length1;
				if (!(i < _tmp6__length1)) {
					break;
				}
				_tmp7_ = self->priv->search_types;
				_tmp7__length1 = self->priv->search_types_length1;
				_tmp8_ = _tmp7_[i];
				st = _tmp8_;
				_tmp9_ = self->priv->search_types_index;
				gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) st), (gpointer) ((gintptr) i));
				_tmp10_ = self->priv->type_combo;
				_tmp11_ = search_condition_search_type_display_text (st);
				_tmp12_ = _tmp11_;
				gtk_combo_box_text_append_text (_tmp10_, _tmp12_);
				_g_free0 (_tmp12_);
			}
		}
	}
	saved_search_dialog_search_row_container_set_type_combo_box (self, SEARCH_CONDITION_SEARCH_TYPE_ANY_TEXT);
	_tmp13_ = self->priv->type_combo;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_container_on_type_changed_gtk_combo_box_changed, self);
	_tmp14_ = (GtkButton*) gtk_button_new_from_icon_name ("window-close-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->remove_button);
	self->priv->remove_button = _tmp14_;
	_tmp15_ = self->priv->remove_button;
	gtk_button_set_relief (_tmp15_, GTK_RELIEF_NONE);
	_tmp16_ = self->priv->remove_button;
	g_signal_connect (_tmp16_, "clicked", (GCallback) _saved_search_dialog_search_row_container_on_removed_gtk_button_clicked, self);
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp17_;
	_tmp18_ = self->priv->box;
	_tmp19_ = self->priv->type_combo;
	gtk_box_pack_start (_tmp18_, G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp20_ = self->priv->box;
	_tmp21_ = self->priv->remove_button;
	gtk_box_pack_end (_tmp20_, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp22_ = self->priv->box;
	gtk_widget_set_margin_top (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget), 2);
	_tmp23_ = self->priv->box;
	gtk_widget_set_margin_bottom (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget), 2);
	_tmp24_ = self->priv->box;
	gtk_widget_set_margin_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget), 8);
	_tmp25_ = self->priv->box;
	gtk_widget_set_margin_end (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget), 8);
	_tmp26_ = self->priv->box;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget));
}

static void
saved_search_dialog_search_row_container_on_type_changed (SavedSearchDialogSearchRowContainer* self)
{
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self));
	saved_search_dialog_search_row_container_set_type (self, saved_search_dialog_search_row_container_get_search_type (self));
	g_signal_emit (self, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL], 0, self);
}

static void
saved_search_dialog_search_row_container_set_type_combo_box (SavedSearchDialogSearchRowContainer* self,
                                                             SearchConditionSearchType st)
{
	GtkComboBoxText* _tmp0_;
	GeeHashMap* _tmp1_;
	gpointer _tmp2_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self));
	_tmp0_ = self->priv->type_combo;
	_tmp1_ = self->priv->search_types_index;
	_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) st));
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox), (gint) ((gintptr) _tmp2_));
}

static void
saved_search_dialog_search_row_container_set_type (SavedSearchDialogSearchRowContainer* self,
                                                   SearchConditionSearchType type)
{
	SavedSearchDialogSearchRow* _tmp0_;
	GtkBox* _tmp11_;
	SavedSearchDialogSearchRow* _tmp12_;
	GtkWidget* _tmp13_;
	GtkWidget* _tmp14_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self));
	_tmp0_ = self->priv->my_row;
	if (_tmp0_ != NULL) {
		GtkBox* _tmp1_;
		SavedSearchDialogSearchRow* _tmp2_;
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp1_ = self->priv->box;
		_tmp2_ = self->priv->my_row;
		_tmp3_ = saved_search_dialog_search_row_get_widget (_tmp2_);
		_tmp4_ = _tmp3_;
		gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_container_get_type (), GtkContainer), _tmp4_);
		_g_object_unref0 (_tmp4_);
	}
	switch (type) {
		case SEARCH_CONDITION_SEARCH_TYPE_ANY_TEXT:
		case SEARCH_CONDITION_SEARCH_TYPE_EVENT_NAME:
		case SEARCH_CONDITION_SEARCH_TYPE_FILE_NAME:
		case SEARCH_CONDITION_SEARCH_TYPE_FACE:
		case SEARCH_CONDITION_SEARCH_TYPE_TAG:
		case SEARCH_CONDITION_SEARCH_TYPE_COMMENT:
		case SEARCH_CONDITION_SEARCH_TYPE_TITLE:
		{
			SavedSearchDialogSearchRowText* _tmp5_;
			_tmp5_ = saved_search_dialog_search_row_text_new (self);
			_saved_search_dialog_search_row_unref0 (self->priv->my_row);
			self->priv->my_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow);
			break;
		}
		case SEARCH_CONDITION_SEARCH_TYPE_MEDIA_TYPE:
		{
			SavedSearchDialogSearchRowMediaType* _tmp6_;
			_tmp6_ = saved_search_dialog_search_row_media_type_new (self);
			_saved_search_dialog_search_row_unref0 (self->priv->my_row);
			self->priv->my_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow);
			break;
		}
		case SEARCH_CONDITION_SEARCH_TYPE_FLAG_STATE:
		{
			SavedSearchDialogSearchRowFlagged* _tmp7_;
			_tmp7_ = saved_search_dialog_search_row_flagged_new (self);
			_saved_search_dialog_search_row_unref0 (self->priv->my_row);
			self->priv->my_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow);
			break;
		}
		case SEARCH_CONDITION_SEARCH_TYPE_MODIFIED_STATE:
		{
			SavedSearchDialogSearchRowModified* _tmp8_;
			_tmp8_ = saved_search_dialog_search_row_modified_new (self);
			_saved_search_dialog_search_row_unref0 (self->priv->my_row);
			self->priv->my_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow);
			break;
		}
		case SEARCH_CONDITION_SEARCH_TYPE_RATING:
		{
			SavedSearchDialogSearchRowRating* _tmp9_;
			_tmp9_ = saved_search_dialog_search_row_rating_new (self);
			_saved_search_dialog_search_row_unref0 (self->priv->my_row);
			self->priv->my_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow);
			break;
		}
		case SEARCH_CONDITION_SEARCH_TYPE_DATE:
		{
			SavedSearchDialogSearchRowDate* _tmp10_;
			_tmp10_ = saved_search_dialog_search_row_date_new (self);
			_saved_search_dialog_search_row_unref0 (self->priv->my_row);
			self->priv->my_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow);
			break;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
	_tmp11_ = self->priv->box;
	_tmp12_ = self->priv->my_row;
	_tmp13_ = saved_search_dialog_search_row_get_widget (_tmp12_);
	_tmp14_ = _tmp13_;
	gtk_box_pack_start (_tmp11_, _tmp14_, TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp14_);
}

static SearchConditionSearchType
saved_search_dialog_search_row_container_get_search_type (SavedSearchDialogSearchRowContainer* self)
{
	SearchConditionSearchType* _tmp0_;
	gint _tmp0__length1;
	GtkComboBoxText* _tmp1_;
	SearchConditionSearchType _tmp2_;
	SearchConditionSearchType result;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self), 0);
	_tmp0_ = self->priv->search_types;
	_tmp0__length1 = self->priv->search_types_length1;
	_tmp1_ = self->priv->type_combo;
	_tmp2_ = _tmp0_[gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox))];
	result = _tmp2_;
	return result;
}

static void
saved_search_dialog_search_row_container_on_removed (SavedSearchDialogSearchRowContainer* self)
{
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self));
	g_signal_emit (self, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_REMOVE_SIGNAL], 0, self);
}

static void
saved_search_dialog_search_row_container_allow_removal (SavedSearchDialogSearchRowContainer* self,
                                                        gboolean allow)
{
	GtkButton* _tmp0_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self));
	_tmp0_ = self->priv->remove_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), allow);
}

static GtkWidget*
saved_search_dialog_search_row_container_get_widget (SavedSearchDialogSearchRowContainer* self)
{
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self), NULL);
	_tmp0_ = self->priv->box;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static SearchCondition*
saved_search_dialog_search_row_container_get_search_condition (SavedSearchDialogSearchRowContainer* self)
{
	SavedSearchDialogSearchRow* _tmp0_;
	SearchCondition* _tmp1_;
	SearchCondition* result;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self), NULL);
	_tmp0_ = self->priv->my_row;
	_tmp1_ = saved_search_dialog_search_row_get_search_condition (_tmp0_);
	result = _tmp1_;
	return result;
}

static gboolean
saved_search_dialog_search_row_container_is_complete (SavedSearchDialogSearchRowContainer* self)
{
	SavedSearchDialogSearchRow* _tmp0_;
	gboolean result;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (self), FALSE);
	_tmp0_ = self->priv->my_row;
	result = saved_search_dialog_search_row_is_complete (_tmp0_);
	return result;
}

static void
g_cclosure_user_marshal_VOID__SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER (GClosure * closure,
                                                                        GValue * return_value,
                                                                        guint n_param_values,
                                                                        const GValue * param_values,
                                                                        gpointer invocation_hint,
                                                                        gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_VOID__SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER) (marshal_data ? marshal_data : cc->callback);
	callback (data1, saved_search_dialog_value_get_search_row_container (param_values + 1), data2);
}

static void
saved_search_dialog_value_search_row_container_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
saved_search_dialog_value_search_row_container_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		saved_search_dialog_search_row_container_unref (value->data[0].v_pointer);
	}
}

static void
saved_search_dialog_value_search_row_container_copy_value (const GValue* src_value,
                                                           GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = saved_search_dialog_search_row_container_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
saved_search_dialog_value_search_row_container_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
saved_search_dialog_value_search_row_container_collect_value (GValue* value,
                                                              guint n_collect_values,
                                                              GTypeCValue* collect_values,
                                                              guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		SavedSearchDialogSearchRowContainer * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = saved_search_dialog_search_row_container_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
saved_search_dialog_value_search_row_container_lcopy_value (const GValue* value,
                                                            guint n_collect_values,
                                                            GTypeCValue* collect_values,
                                                            guint collect_flags)
{
	SavedSearchDialogSearchRowContainer ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = saved_search_dialog_search_row_container_ref (value->data[0].v_pointer);
	}
	return NULL;
}

static GParamSpec*
saved_search_dialog_param_spec_search_row_container (const gchar* name,
                                                     const gchar* nick,
                                                     const gchar* blurb,
                                                     GType object_type,
                                                     GParamFlags flags)
{
	SavedSearchDialogParamSpecSearchRowContainer* spec;
	g_return_val_if_fail (g_type_is_a (object_type, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

static gpointer
saved_search_dialog_value_get_search_row_container (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER), NULL);
	return value->data[0].v_pointer;
}

static void
saved_search_dialog_value_set_search_row_container (GValue* value,
                                                    gpointer v_object)
{
	SavedSearchDialogSearchRowContainer * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		saved_search_dialog_search_row_container_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		saved_search_dialog_search_row_container_unref (old);
	}
}

static void
saved_search_dialog_value_take_search_row_container (GValue* value,
                                                     gpointer v_object)
{
	SavedSearchDialogSearchRowContainer * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		saved_search_dialog_search_row_container_unref (old);
	}
}

static void
saved_search_dialog_search_row_container_class_init (SavedSearchDialogSearchRowContainerClass * klass,
                                                     gpointer klass_data)
{
	saved_search_dialog_search_row_container_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowContainerClass *) klass)->finalize = saved_search_dialog_search_row_container_finalize;
	g_type_class_adjust_private_offset (klass, &SavedSearchDialogSearchRowContainer_private_offset);
	saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_REMOVE_SIGNAL] = g_signal_new ("remove", SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER, G_TYPE_NONE, 1, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER);
	saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL] = g_signal_new ("changed", SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER, G_TYPE_NONE, 1, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER);
}

static void
saved_search_dialog_search_row_container_instance_init (SavedSearchDialogSearchRowContainer * self,
                                                        gpointer klass)
{
	self->priv = saved_search_dialog_search_row_container_get_instance_private (self);
	self->priv->my_row = NULL;
	self->ref_count = 1;
}

static void
saved_search_dialog_search_row_container_finalize (SavedSearchDialogSearchRowContainer * obj)
{
	SavedSearchDialogSearchRowContainer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, SavedSearchDialogSearchRowContainer);
	g_signal_handlers_destroy (self);
	_g_object_unref0 (self->priv->type_combo);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->remove_button);
	self->priv->search_types = (g_free (self->priv->search_types), NULL);
	_g_object_unref0 (self->priv->search_types_index);
	_saved_search_dialog_search_row_unref0 (self->priv->my_row);
}

static GType
saved_search_dialog_search_row_container_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { saved_search_dialog_value_search_row_container_init, saved_search_dialog_value_search_row_container_free_value, saved_search_dialog_value_search_row_container_copy_value, saved_search_dialog_value_search_row_container_peek_pointer, "p", saved_search_dialog_value_search_row_container_collect_value, "p", saved_search_dialog_value_search_row_container_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRowContainer), 0, (GInstanceInitFunc) saved_search_dialog_search_row_container_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType saved_search_dialog_search_row_container_type_id;
	saved_search_dialog_search_row_container_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SavedSearchDialogSearchRowContainer", &g_define_type_info, &g_define_type_fundamental_info, 0);
	SavedSearchDialogSearchRowContainer_private_offset = g_type_add_instance_private (saved_search_dialog_search_row_container_type_id, sizeof (SavedSearchDialogSearchRowContainerPrivate));
	return saved_search_dialog_search_row_container_type_id;
}

static GType
saved_search_dialog_search_row_container_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_container_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_container_type_id__once)) {
		GType saved_search_dialog_search_row_container_type_id;
		saved_search_dialog_search_row_container_type_id = saved_search_dialog_search_row_container_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_container_type_id__once, saved_search_dialog_search_row_container_type_id);
	}
	return saved_search_dialog_search_row_container_type_id__once;
}

static gpointer
saved_search_dialog_search_row_container_ref (gpointer instance)
{
	SavedSearchDialogSearchRowContainer * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

static void
saved_search_dialog_search_row_container_unref (gpointer instance)
{
	SavedSearchDialogSearchRowContainer * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static GtkWidget*
saved_search_dialog_search_row_real_get_widget (SavedSearchDialogSearchRow* self)
{
	g_critical ("Type `%s' does not implement abstract method `saved_search_dialog_search_row_get_widget'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

GtkWidget*
saved_search_dialog_search_row_get_widget (SavedSearchDialogSearchRow* self)
{
	SavedSearchDialogSearchRowClass* _klass_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW (self), NULL);
	_klass_ = SAVED_SEARCH_DIALOG_SEARCH_ROW_GET_CLASS (self);
	if (_klass_->get_widget) {
		return _klass_->get_widget (self);
	}
	return NULL;
}

static SearchCondition*
saved_search_dialog_search_row_real_get_search_condition (SavedSearchDialogSearchRow* self)
{
	g_critical ("Type `%s' does not implement abstract method `saved_search_dialog_search_row_get_search_condition'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

SearchCondition*
saved_search_dialog_search_row_get_search_condition (SavedSearchDialogSearchRow* self)
{
	SavedSearchDialogSearchRowClass* _klass_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW (self), NULL);
	_klass_ = SAVED_SEARCH_DIALOG_SEARCH_ROW_GET_CLASS (self);
	if (_klass_->get_search_condition) {
		return _klass_->get_search_condition (self);
	}
	return NULL;
}

static void
saved_search_dialog_search_row_real_populate (SavedSearchDialogSearchRow* self,
                                              SearchCondition* sc)
{
	g_critical ("Type `%s' does not implement abstract method `saved_search_dialog_search_row_populate'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
saved_search_dialog_search_row_populate (SavedSearchDialogSearchRow* self,
                                         SearchCondition* sc)
{
	SavedSearchDialogSearchRowClass* _klass_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW (self));
	_klass_ = SAVED_SEARCH_DIALOG_SEARCH_ROW_GET_CLASS (self);
	if (_klass_->populate) {
		_klass_->populate (self, sc);
	}
}

static gboolean
saved_search_dialog_search_row_real_is_complete (SavedSearchDialogSearchRow* self)
{
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `saved_search_dialog_search_row_is_complete'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

gboolean
saved_search_dialog_search_row_is_complete (SavedSearchDialogSearchRow* self)
{
	SavedSearchDialogSearchRowClass* _klass_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW (self), FALSE);
	_klass_ = SAVED_SEARCH_DIALOG_SEARCH_ROW_GET_CLASS (self);
	if (_klass_->is_complete) {
		return _klass_->is_complete (self);
	}
	return FALSE;
}

static SavedSearchDialogSearchRow*
saved_search_dialog_search_row_construct (GType object_type)
{
	SavedSearchDialogSearchRow* self = NULL;
	self = (SavedSearchDialogSearchRow*) g_type_create_instance (object_type);
	return self;
}

static void
saved_search_dialog_value_search_row_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
saved_search_dialog_value_search_row_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		saved_search_dialog_search_row_unref (value->data[0].v_pointer);
	}
}

static void
saved_search_dialog_value_search_row_copy_value (const GValue* src_value,
                                                 GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = saved_search_dialog_search_row_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
saved_search_dialog_value_search_row_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
saved_search_dialog_value_search_row_collect_value (GValue* value,
                                                    guint n_collect_values,
                                                    GTypeCValue* collect_values,
                                                    guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		SavedSearchDialogSearchRow * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = saved_search_dialog_search_row_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
saved_search_dialog_value_search_row_lcopy_value (const GValue* value,
                                                  guint n_collect_values,
                                                  GTypeCValue* collect_values,
                                                  guint collect_flags)
{
	SavedSearchDialogSearchRow ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = saved_search_dialog_search_row_ref (value->data[0].v_pointer);
	}
	return NULL;
}

static GParamSpec*
saved_search_dialog_param_spec_search_row (const gchar* name,
                                           const gchar* nick,
                                           const gchar* blurb,
                                           GType object_type,
                                           GParamFlags flags)
{
	SavedSearchDialogParamSpecSearchRow* spec;
	g_return_val_if_fail (g_type_is_a (object_type, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

static gpointer
saved_search_dialog_value_get_search_row (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW), NULL);
	return value->data[0].v_pointer;
}

static void
saved_search_dialog_value_set_search_row (GValue* value,
                                          gpointer v_object)
{
	SavedSearchDialogSearchRow * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		saved_search_dialog_search_row_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		saved_search_dialog_search_row_unref (old);
	}
}

static void
saved_search_dialog_value_take_search_row (GValue* value,
                                           gpointer v_object)
{
	SavedSearchDialogSearchRow * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		saved_search_dialog_search_row_unref (old);
	}
}

static void
saved_search_dialog_search_row_class_init (SavedSearchDialogSearchRowClass * klass,
                                           gpointer klass_data)
{
	saved_search_dialog_search_row_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowClass *) klass)->finalize = saved_search_dialog_search_row_finalize;
	((SavedSearchDialogSearchRowClass *) klass)->get_widget = (GtkWidget* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_real_get_widget;
	((SavedSearchDialogSearchRowClass *) klass)->get_search_condition = (SearchCondition* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_real_get_search_condition;
	((SavedSearchDialogSearchRowClass *) klass)->populate = (void (*) (SavedSearchDialogSearchRow*, SearchCondition*)) saved_search_dialog_search_row_real_populate;
	((SavedSearchDialogSearchRowClass *) klass)->is_complete = (gboolean (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_real_is_complete;
}

static void
saved_search_dialog_search_row_instance_init (SavedSearchDialogSearchRow * self,
                                              gpointer klass)
{
	self->ref_count = 1;
}

static void
saved_search_dialog_search_row_finalize (SavedSearchDialogSearchRow * obj)
{
	SavedSearchDialogSearchRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, SavedSearchDialogSearchRow);
	g_signal_handlers_destroy (self);
}

static GType
saved_search_dialog_search_row_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { saved_search_dialog_value_search_row_init, saved_search_dialog_value_search_row_free_value, saved_search_dialog_value_search_row_copy_value, saved_search_dialog_value_search_row_peek_pointer, "p", saved_search_dialog_value_search_row_collect_value, "p", saved_search_dialog_value_search_row_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRow), 0, (GInstanceInitFunc) saved_search_dialog_search_row_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType saved_search_dialog_search_row_type_id;
	saved_search_dialog_search_row_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SavedSearchDialogSearchRow", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
	return saved_search_dialog_search_row_type_id;
}

static GType
saved_search_dialog_search_row_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_type_id__once)) {
		GType saved_search_dialog_search_row_type_id;
		saved_search_dialog_search_row_type_id = saved_search_dialog_search_row_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_type_id__once, saved_search_dialog_search_row_type_id);
	}
	return saved_search_dialog_search_row_type_id__once;
}

static gpointer
saved_search_dialog_search_row_ref (gpointer instance)
{
	SavedSearchDialogSearchRow * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

static void
saved_search_dialog_search_row_unref (gpointer instance)
{
	SavedSearchDialogSearchRow * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		SAVED_SEARCH_DIALOG_SEARCH_ROW_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
saved_search_dialog_search_row_text_get_instance_private (SavedSearchDialogSearchRowText* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialogSearchRowText_private_offset);
}

static void
_saved_search_dialog_search_row_text_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                       gpointer self)
{
	saved_search_dialog_search_row_text_on_changed ((SavedSearchDialogSearchRowText*) self);
}

static void
_saved_search_dialog_search_row_text_on_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                      gpointer self)
{
	saved_search_dialog_search_row_text_on_changed ((SavedSearchDialogSearchRowText*) self);
}

static gpointer
_saved_search_dialog_search_row_container_ref0 (gpointer self)
{
	return self ? saved_search_dialog_search_row_container_ref (self) : NULL;
}

static SavedSearchDialogSearchRowText*
saved_search_dialog_search_row_text_construct (GType object_type,
                                               SavedSearchDialogSearchRowContainer* parent)
{
	SavedSearchDialogSearchRowText* self = NULL;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	GtkComboBoxText* _tmp1_;
	GtkComboBoxText* _tmp2_;
	GtkComboBoxText* _tmp3_;
	GtkComboBoxText* _tmp4_;
	GtkComboBoxText* _tmp5_;
	GtkComboBoxText* _tmp6_;
	GtkComboBoxText* _tmp7_;
	GtkComboBoxText* _tmp8_;
	GtkComboBoxText* _tmp9_;
	GtkComboBoxText* _tmp10_;
	GtkEntry* _tmp11_;
	GtkEntry* _tmp12_;
	GtkEntry* _tmp13_;
	GtkEntry* _tmp14_;
	GtkBox* _tmp15_;
	GtkBox* _tmp16_;
	GtkComboBoxText* _tmp17_;
	GtkBox* _tmp18_;
	GtkEntry* _tmp19_;
	GtkBox* _tmp20_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (parent), NULL);
	self = (SavedSearchDialogSearchRowText*) saved_search_dialog_search_row_construct (object_type);
	_tmp0_ = _saved_search_dialog_search_row_container_ref0 (parent);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	self->priv->parent = _tmp0_;
	_tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->text_context);
	self->priv->text_context = _tmp1_;
	_tmp2_ = self->priv->text_context;
	gtk_combo_box_text_append_text (_tmp2_, _ ("contains"));
	_tmp3_ = self->priv->text_context;
	gtk_combo_box_text_append_text (_tmp3_, _ ("is exactly"));
	_tmp4_ = self->priv->text_context;
	gtk_combo_box_text_append_text (_tmp4_, _ ("starts with"));
	_tmp5_ = self->priv->text_context;
	gtk_combo_box_text_append_text (_tmp5_, _ ("ends with"));
	_tmp6_ = self->priv->text_context;
	gtk_combo_box_text_append_text (_tmp6_, _ ("does not contain"));
	_tmp7_ = self->priv->text_context;
	gtk_combo_box_text_append_text (_tmp7_, _ ("is not set"));
	_tmp8_ = self->priv->text_context;
	gtk_combo_box_text_append_text (_tmp8_, _ ("is set"));
	_tmp9_ = self->priv->text_context;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp10_ = self->priv->text_context;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_text_on_changed_gtk_combo_box_changed, self);
	_tmp11_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->entry);
	self->priv->entry = _tmp11_;
	_tmp12_ = self->priv->entry;
	gtk_entry_set_width_chars (_tmp12_, 25);
	_tmp13_ = self->priv->entry;
	gtk_entry_set_activates_default (_tmp13_, TRUE);
	_tmp14_ = self->priv->entry;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_editable_get_type (), GtkEditable), "changed", (GCallback) _saved_search_dialog_search_row_text_on_changed_gtk_editable_changed, self);
	_tmp15_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp15_;
	_tmp16_ = self->priv->box;
	_tmp17_ = self->priv->text_context;
	gtk_box_pack_start (_tmp16_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp18_ = self->priv->box;
	_tmp19_ = self->priv->entry;
	gtk_box_pack_start (_tmp18_, G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp20_ = self->priv->box;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget));
	return self;
}

static SavedSearchDialogSearchRowText*
saved_search_dialog_search_row_text_new (SavedSearchDialogSearchRowContainer* parent)
{
	return saved_search_dialog_search_row_text_construct (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, parent);
}

static GtkWidget*
saved_search_dialog_search_row_text_real_get_widget (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowText * self;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowText);
	_tmp0_ = self->priv->box;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static SearchCondition*
saved_search_dialog_search_row_text_real_get_search_condition (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowText * self;
	SearchConditionSearchType type = 0;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	gchar* text = NULL;
	GtkEntry* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	SearchConditionTextContext context = 0;
	SearchConditionText* c = NULL;
	SearchConditionText* _tmp4_;
	SearchCondition* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowText);
	_tmp0_ = self->priv->parent;
	type = saved_search_dialog_search_row_container_get_search_type (_tmp0_);
	_tmp1_ = self->priv->entry;
	_tmp2_ = gtk_entry_get_text (_tmp1_);
	_tmp3_ = g_strdup (_tmp2_);
	text = _tmp3_;
	context = saved_search_dialog_search_row_text_get_text_context (self);
	_tmp4_ = search_condition_text_new (type, text, context);
	c = _tmp4_;
	result = G_TYPE_CHECK_INSTANCE_CAST (c, TYPE_SEARCH_CONDITION, SearchCondition);
	_g_free0 (text);
	return result;
}

static gpointer
_search_condition_ref0 (gpointer self)
{
	return self ? search_condition_ref (self) : NULL;
}

static void
saved_search_dialog_search_row_text_real_populate (SavedSearchDialogSearchRow* base,
                                                   SearchCondition* sc)
{
	SavedSearchDialogSearchRowText * self;
	SearchConditionText* text = NULL;
	SearchConditionText* _tmp0_;
	GtkComboBoxText* _tmp1_;
	SearchConditionTextContext _tmp2_;
	SearchConditionTextContext _tmp3_;
	GtkEntry* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowText);
	g_return_if_fail (IS_SEARCH_CONDITION (sc));
	_tmp0_ = _search_condition_ref0 (IS_SEARCH_CONDITION_TEXT (sc) ? ((SearchConditionText*) sc) : NULL);
	text = _tmp0_;
	_vala_assert (text != NULL, "text != null");
	_tmp1_ = self->priv->text_context;
	_tmp2_ = search_condition_text_get_context (text);
	_tmp3_ = _tmp2_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp3_);
	_tmp4_ = self->priv->entry;
	_tmp5_ = search_condition_text_get_text (text);
	_tmp6_ = _tmp5_;
	gtk_entry_set_text (_tmp4_, _tmp6_);
	saved_search_dialog_search_row_text_on_changed (self);
	_search_condition_unref0 (text);
}

static gboolean
saved_search_dialog_search_row_text_real_is_complete (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowText * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkEntry* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowText);
	_tmp2_ = self->priv->entry;
	_tmp3_ = gtk_entry_get_text (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = string_chomp (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strcmp0 (_tmp6_, "") != 0;
	_g_free0 (_tmp6_);
	if (_tmp7_) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = saved_search_dialog_search_row_text_get_text_context (self) == SEARCH_CONDITION_TEXT_CONTEXT_IS_NOT_SET;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = saved_search_dialog_search_row_text_get_text_context (self) == SEARCH_CONDITION_TEXT_CONTEXT_IS_SET;
	}
	result = _tmp0_;
	return result;
}

static SearchConditionTextContext
saved_search_dialog_search_row_text_get_text_context (SavedSearchDialogSearchRowText* self)
{
	GtkComboBoxText* _tmp0_;
	SearchConditionTextContext result;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_TEXT (self), 0);
	_tmp0_ = self->priv->text_context;
	result = (SearchConditionTextContext) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox));
	return result;
}

static void
saved_search_dialog_search_row_text_on_changed (SavedSearchDialogSearchRowText* self)
{
	gboolean _tmp0_ = FALSE;
	SavedSearchDialogSearchRowContainer* _tmp3_;
	SavedSearchDialogSearchRowContainer* _tmp4_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_TEXT (self));
	if (saved_search_dialog_search_row_text_get_text_context (self) == SEARCH_CONDITION_TEXT_CONTEXT_IS_NOT_SET) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = saved_search_dialog_search_row_text_get_text_context (self) == SEARCH_CONDITION_TEXT_CONTEXT_IS_SET;
	}
	if (_tmp0_) {
		GtkEntry* _tmp1_;
		_tmp1_ = self->priv->entry;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
	} else {
		GtkEntry* _tmp2_;
		_tmp2_ = self->priv->entry;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
	}
	_tmp3_ = self->priv->parent;
	_tmp4_ = self->priv->parent;
	g_signal_emit (_tmp3_, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL], 0, _tmp4_);
}

static void
saved_search_dialog_search_row_text_class_init (SavedSearchDialogSearchRowTextClass * klass,
                                                gpointer klass_data)
{
	saved_search_dialog_search_row_text_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowClass *) klass)->finalize = saved_search_dialog_search_row_text_finalize;
	g_type_class_adjust_private_offset (klass, &SavedSearchDialogSearchRowText_private_offset);
	((SavedSearchDialogSearchRowClass *) klass)->get_widget = (GtkWidget* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_text_real_get_widget;
	((SavedSearchDialogSearchRowClass *) klass)->get_search_condition = (SearchCondition* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_text_real_get_search_condition;
	((SavedSearchDialogSearchRowClass *) klass)->populate = (void (*) (SavedSearchDialogSearchRow*, SearchCondition*)) saved_search_dialog_search_row_text_real_populate;
	((SavedSearchDialogSearchRowClass *) klass)->is_complete = (gboolean (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_text_real_is_complete;
}

static void
saved_search_dialog_search_row_text_instance_init (SavedSearchDialogSearchRowText * self,
                                                   gpointer klass)
{
	self->priv = saved_search_dialog_search_row_text_get_instance_private (self);
}

static void
saved_search_dialog_search_row_text_finalize (SavedSearchDialogSearchRow * obj)
{
	SavedSearchDialogSearchRowText * self;
	GtkComboBoxText* _tmp0_;
	guint _tmp1_;
	GtkEntry* _tmp2_;
	guint _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_TEXT, SavedSearchDialogSearchRowText);
	_tmp0_ = self->priv->text_context;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _saved_search_dialog_search_row_text_on_changed_gtk_combo_box_changed, self);
	_tmp2_ = self->priv->entry;
	g_signal_parse_name ("changed", gtk_editable_get_type (), &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_editable_get_type (), GtkEditable), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _saved_search_dialog_search_row_text_on_changed_gtk_editable_changed, self);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->text_context);
	_g_object_unref0 (self->priv->entry);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CLASS (saved_search_dialog_search_row_text_parent_class)->finalize (obj);
}

static GType
saved_search_dialog_search_row_text_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowTextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_text_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRowText), 0, (GInstanceInitFunc) saved_search_dialog_search_row_text_instance_init, NULL };
	GType saved_search_dialog_search_row_text_type_id;
	saved_search_dialog_search_row_text_type_id = g_type_register_static (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, "SavedSearchDialogSearchRowText", &g_define_type_info, 0);
	SavedSearchDialogSearchRowText_private_offset = g_type_add_instance_private (saved_search_dialog_search_row_text_type_id, sizeof (SavedSearchDialogSearchRowTextPrivate));
	return saved_search_dialog_search_row_text_type_id;
}

static GType
saved_search_dialog_search_row_text_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_text_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_text_type_id__once)) {
		GType saved_search_dialog_search_row_text_type_id;
		saved_search_dialog_search_row_text_type_id = saved_search_dialog_search_row_text_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_text_type_id__once, saved_search_dialog_search_row_text_type_id);
	}
	return saved_search_dialog_search_row_text_type_id__once;
}

static inline gpointer
saved_search_dialog_search_row_media_type_get_instance_private (SavedSearchDialogSearchRowMediaType* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialogSearchRowMediaType_private_offset);
}

static void
_saved_search_dialog_search_row_media_type_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                             gpointer self)
{
	saved_search_dialog_search_row_media_type_on_changed ((SavedSearchDialogSearchRowMediaType*) self);
}

static SavedSearchDialogSearchRowMediaType*
saved_search_dialog_search_row_media_type_construct (GType object_type,
                                                     SavedSearchDialogSearchRowContainer* parent)
{
	SavedSearchDialogSearchRowMediaType* self = NULL;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	GtkComboBoxText* _tmp1_;
	GtkComboBoxText* _tmp2_;
	GtkComboBoxText* _tmp3_;
	GtkComboBoxText* _tmp4_;
	GtkComboBoxText* _tmp5_;
	GtkComboBoxText* _tmp6_;
	GtkComboBoxText* _tmp7_;
	GtkComboBoxText* _tmp8_;
	GtkComboBoxText* _tmp9_;
	GtkComboBoxText* _tmp10_;
	GtkComboBoxText* _tmp11_;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	GtkComboBoxText* _tmp14_;
	GtkBox* _tmp15_;
	GtkComboBoxText* _tmp16_;
	GtkBox* _tmp17_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (parent), NULL);
	self = (SavedSearchDialogSearchRowMediaType*) saved_search_dialog_search_row_construct (object_type);
	_tmp0_ = _saved_search_dialog_search_row_container_ref0 (parent);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	self->priv->parent = _tmp0_;
	_tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->media_context);
	self->priv->media_context = _tmp1_;
	_tmp2_ = self->priv->media_context;
	gtk_combo_box_text_append_text (_tmp2_, _ ("is"));
	_tmp3_ = self->priv->media_context;
	gtk_combo_box_text_append_text (_tmp3_, _ ("is not"));
	_tmp4_ = self->priv->media_context;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp5_ = self->priv->media_context;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_media_type_on_changed_gtk_combo_box_changed, self);
	_tmp6_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->media_type);
	self->priv->media_type = _tmp6_;
	_tmp7_ = self->priv->media_type;
	gtk_combo_box_text_append_text (_tmp7_, _ ("any photo"));
	_tmp8_ = self->priv->media_type;
	gtk_combo_box_text_append_text (_tmp8_, _ ("a raw photo"));
	_tmp9_ = self->priv->media_type;
	gtk_combo_box_text_append_text (_tmp9_, _ ("a video"));
	_tmp10_ = self->priv->media_type;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp11_ = self->priv->media_type;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_media_type_on_changed_gtk_combo_box_changed, self);
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp12_;
	_tmp13_ = self->priv->box;
	_tmp14_ = self->priv->media_context;
	gtk_box_pack_start (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp15_ = self->priv->box;
	_tmp16_ = self->priv->media_type;
	gtk_box_pack_start (_tmp15_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp17_ = self->priv->box;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget));
	return self;
}

static SavedSearchDialogSearchRowMediaType*
saved_search_dialog_search_row_media_type_new (SavedSearchDialogSearchRowContainer* parent)
{
	return saved_search_dialog_search_row_media_type_construct (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, parent);
}

static GtkWidget*
saved_search_dialog_search_row_media_type_real_get_widget (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowMediaType * self;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaType);
	_tmp0_ = self->priv->box;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static SearchCondition*
saved_search_dialog_search_row_media_type_real_get_search_condition (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowMediaType * self;
	SearchConditionSearchType search_type = 0;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SearchConditionMediaTypeContext context = 0;
	GtkComboBoxText* _tmp1_;
	SearchConditionMediaTypeMediaType type = 0;
	GtkComboBoxText* _tmp2_;
	SearchConditionMediaType* c = NULL;
	SearchConditionMediaType* _tmp3_;
	SearchCondition* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaType);
	_tmp0_ = self->priv->parent;
	search_type = saved_search_dialog_search_row_container_get_search_type (_tmp0_);
	_tmp1_ = self->priv->media_context;
	context = (SearchConditionMediaTypeContext) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox));
	_tmp2_ = self->priv->media_type;
	type = (SearchConditionMediaTypeMediaType) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox));
	_tmp3_ = search_condition_media_type_new (search_type, context, type);
	c = _tmp3_;
	result = G_TYPE_CHECK_INSTANCE_CAST (c, TYPE_SEARCH_CONDITION, SearchCondition);
	return result;
}

static void
saved_search_dialog_search_row_media_type_real_populate (SavedSearchDialogSearchRow* base,
                                                         SearchCondition* sc)
{
	SavedSearchDialogSearchRowMediaType * self;
	SearchConditionMediaType* media = NULL;
	SearchConditionMediaType* _tmp0_;
	GtkComboBoxText* _tmp1_;
	SearchConditionMediaTypeContext _tmp2_;
	SearchConditionMediaTypeContext _tmp3_;
	GtkComboBoxText* _tmp4_;
	SearchConditionMediaTypeMediaType _tmp5_;
	SearchConditionMediaTypeMediaType _tmp6_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaType);
	g_return_if_fail (IS_SEARCH_CONDITION (sc));
	_tmp0_ = _search_condition_ref0 (IS_SEARCH_CONDITION_MEDIA_TYPE (sc) ? ((SearchConditionMediaType*) sc) : NULL);
	media = _tmp0_;
	_vala_assert (media != NULL, "media != null");
	_tmp1_ = self->priv->media_context;
	_tmp2_ = search_condition_media_type_get_context (media);
	_tmp3_ = _tmp2_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp3_);
	_tmp4_ = self->priv->media_type;
	_tmp5_ = search_condition_media_type_get_media_type (media);
	_tmp6_ = _tmp5_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp6_);
	_search_condition_unref0 (media);
}

static gboolean
saved_search_dialog_search_row_media_type_real_is_complete (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowMediaType * self;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaType);
	result = TRUE;
	return result;
}

static void
saved_search_dialog_search_row_media_type_on_changed (SavedSearchDialogSearchRowMediaType* self)
{
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SavedSearchDialogSearchRowContainer* _tmp1_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_MEDIA_TYPE (self));
	_tmp0_ = self->priv->parent;
	_tmp1_ = self->priv->parent;
	g_signal_emit (_tmp0_, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL], 0, _tmp1_);
}

static void
saved_search_dialog_search_row_media_type_class_init (SavedSearchDialogSearchRowMediaTypeClass * klass,
                                                      gpointer klass_data)
{
	saved_search_dialog_search_row_media_type_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowClass *) klass)->finalize = saved_search_dialog_search_row_media_type_finalize;
	g_type_class_adjust_private_offset (klass, &SavedSearchDialogSearchRowMediaType_private_offset);
	((SavedSearchDialogSearchRowClass *) klass)->get_widget = (GtkWidget* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_media_type_real_get_widget;
	((SavedSearchDialogSearchRowClass *) klass)->get_search_condition = (SearchCondition* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_media_type_real_get_search_condition;
	((SavedSearchDialogSearchRowClass *) klass)->populate = (void (*) (SavedSearchDialogSearchRow*, SearchCondition*)) saved_search_dialog_search_row_media_type_real_populate;
	((SavedSearchDialogSearchRowClass *) klass)->is_complete = (gboolean (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_media_type_real_is_complete;
}

static void
saved_search_dialog_search_row_media_type_instance_init (SavedSearchDialogSearchRowMediaType * self,
                                                         gpointer klass)
{
	self->priv = saved_search_dialog_search_row_media_type_get_instance_private (self);
}

static void
saved_search_dialog_search_row_media_type_finalize (SavedSearchDialogSearchRow * obj)
{
	SavedSearchDialogSearchRowMediaType * self;
	GtkComboBoxText* _tmp0_;
	guint _tmp1_;
	GtkComboBoxText* _tmp2_;
	guint _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MEDIA_TYPE, SavedSearchDialogSearchRowMediaType);
	_tmp0_ = self->priv->media_context;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _saved_search_dialog_search_row_media_type_on_changed_gtk_combo_box_changed, self);
	_tmp2_ = self->priv->media_type;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _saved_search_dialog_search_row_media_type_on_changed_gtk_combo_box_changed, self);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->media_context);
	_g_object_unref0 (self->priv->media_type);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CLASS (saved_search_dialog_search_row_media_type_parent_class)->finalize (obj);
}

static GType
saved_search_dialog_search_row_media_type_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowMediaTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_media_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRowMediaType), 0, (GInstanceInitFunc) saved_search_dialog_search_row_media_type_instance_init, NULL };
	GType saved_search_dialog_search_row_media_type_type_id;
	saved_search_dialog_search_row_media_type_type_id = g_type_register_static (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, "SavedSearchDialogSearchRowMediaType", &g_define_type_info, 0);
	SavedSearchDialogSearchRowMediaType_private_offset = g_type_add_instance_private (saved_search_dialog_search_row_media_type_type_id, sizeof (SavedSearchDialogSearchRowMediaTypePrivate));
	return saved_search_dialog_search_row_media_type_type_id;
}

static GType
saved_search_dialog_search_row_media_type_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_media_type_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_media_type_type_id__once)) {
		GType saved_search_dialog_search_row_media_type_type_id;
		saved_search_dialog_search_row_media_type_type_id = saved_search_dialog_search_row_media_type_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_media_type_type_id__once, saved_search_dialog_search_row_media_type_type_id);
	}
	return saved_search_dialog_search_row_media_type_type_id__once;
}

static inline gpointer
saved_search_dialog_search_row_modified_get_instance_private (SavedSearchDialogSearchRowModified* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialogSearchRowModified_private_offset);
}

static void
_saved_search_dialog_search_row_modified_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                           gpointer self)
{
	saved_search_dialog_search_row_modified_on_changed ((SavedSearchDialogSearchRowModified*) self);
}

static SavedSearchDialogSearchRowModified*
saved_search_dialog_search_row_modified_construct (GType object_type,
                                                   SavedSearchDialogSearchRowContainer* parent)
{
	SavedSearchDialogSearchRowModified* self = NULL;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	GtkComboBoxText* _tmp1_;
	GtkComboBoxText* _tmp2_;
	GtkComboBoxText* _tmp3_;
	GtkComboBoxText* _tmp4_;
	GtkComboBoxText* _tmp5_;
	GtkComboBoxText* _tmp6_;
	GtkComboBoxText* _tmp7_;
	GtkComboBoxText* _tmp8_;
	GtkComboBoxText* _tmp9_;
	GtkComboBoxText* _tmp10_;
	GtkComboBoxText* _tmp11_;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	GtkComboBoxText* _tmp14_;
	GtkBox* _tmp15_;
	GtkComboBoxText* _tmp16_;
	GtkBox* _tmp17_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (parent), NULL);
	self = (SavedSearchDialogSearchRowModified*) saved_search_dialog_search_row_construct (object_type);
	_tmp0_ = _saved_search_dialog_search_row_container_ref0 (parent);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	self->priv->parent = _tmp0_;
	_tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->modified_context);
	self->priv->modified_context = _tmp1_;
	_tmp2_ = self->priv->modified_context;
	gtk_combo_box_text_append_text (_tmp2_, _ ("has"));
	_tmp3_ = self->priv->modified_context;
	gtk_combo_box_text_append_text (_tmp3_, _ ("has no"));
	_tmp4_ = self->priv->modified_context;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp5_ = self->priv->modified_context;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_modified_on_changed_gtk_combo_box_changed, self);
	_tmp6_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->modified_state);
	self->priv->modified_state = _tmp6_;
	_tmp7_ = self->priv->modified_state;
	gtk_combo_box_text_append_text (_tmp7_, _ ("modifications"));
	_tmp8_ = self->priv->modified_state;
	gtk_combo_box_text_append_text (_tmp8_, _ ("internal modifications"));
	_tmp9_ = self->priv->modified_state;
	gtk_combo_box_text_append_text (_tmp9_, _ ("external modifications"));
	_tmp10_ = self->priv->modified_state;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp11_ = self->priv->modified_state;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_modified_on_changed_gtk_combo_box_changed, self);
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp12_;
	_tmp13_ = self->priv->box;
	_tmp14_ = self->priv->modified_context;
	gtk_box_pack_start (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp15_ = self->priv->box;
	_tmp16_ = self->priv->modified_state;
	gtk_box_pack_start (_tmp15_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp17_ = self->priv->box;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget));
	return self;
}

static SavedSearchDialogSearchRowModified*
saved_search_dialog_search_row_modified_new (SavedSearchDialogSearchRowContainer* parent)
{
	return saved_search_dialog_search_row_modified_construct (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, parent);
}

static GtkWidget*
saved_search_dialog_search_row_modified_real_get_widget (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowModified * self;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModified);
	_tmp0_ = self->priv->box;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static SearchCondition*
saved_search_dialog_search_row_modified_real_get_search_condition (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowModified * self;
	SearchConditionSearchType search_type = 0;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SearchConditionModifiedContext context = 0;
	GtkComboBoxText* _tmp1_;
	SearchConditionModifiedState state = 0;
	GtkComboBoxText* _tmp2_;
	SearchConditionModified* c = NULL;
	SearchConditionModified* _tmp3_;
	SearchCondition* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModified);
	_tmp0_ = self->priv->parent;
	search_type = saved_search_dialog_search_row_container_get_search_type (_tmp0_);
	_tmp1_ = self->priv->modified_context;
	context = (SearchConditionModifiedContext) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox));
	_tmp2_ = self->priv->modified_state;
	state = (SearchConditionModifiedState) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox));
	_tmp3_ = search_condition_modified_new (search_type, context, state);
	c = _tmp3_;
	result = G_TYPE_CHECK_INSTANCE_CAST (c, TYPE_SEARCH_CONDITION, SearchCondition);
	return result;
}

static void
saved_search_dialog_search_row_modified_real_populate (SavedSearchDialogSearchRow* base,
                                                       SearchCondition* sc)
{
	SavedSearchDialogSearchRowModified * self;
	SearchConditionModified* scm = NULL;
	SearchConditionModified* _tmp0_;
	GtkComboBoxText* _tmp1_;
	SearchConditionModifiedState _tmp2_;
	SearchConditionModifiedState _tmp3_;
	GtkComboBoxText* _tmp4_;
	SearchConditionModifiedContext _tmp5_;
	SearchConditionModifiedContext _tmp6_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModified);
	g_return_if_fail (IS_SEARCH_CONDITION (sc));
	_tmp0_ = _search_condition_ref0 (IS_SEARCH_CONDITION_MODIFIED (sc) ? ((SearchConditionModified*) sc) : NULL);
	scm = _tmp0_;
	_vala_assert (scm != NULL, "scm != null");
	_tmp1_ = self->priv->modified_state;
	_tmp2_ = search_condition_modified_get_state (scm);
	_tmp3_ = _tmp2_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp3_);
	_tmp4_ = self->priv->modified_context;
	_tmp5_ = search_condition_modified_get_context (scm);
	_tmp6_ = _tmp5_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp6_);
	_search_condition_unref0 (scm);
}

static gboolean
saved_search_dialog_search_row_modified_real_is_complete (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowModified * self;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModified);
	result = TRUE;
	return result;
}

static void
saved_search_dialog_search_row_modified_on_changed (SavedSearchDialogSearchRowModified* self)
{
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SavedSearchDialogSearchRowContainer* _tmp1_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_MODIFIED (self));
	_tmp0_ = self->priv->parent;
	_tmp1_ = self->priv->parent;
	g_signal_emit (_tmp0_, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL], 0, _tmp1_);
}

static void
saved_search_dialog_search_row_modified_class_init (SavedSearchDialogSearchRowModifiedClass * klass,
                                                    gpointer klass_data)
{
	saved_search_dialog_search_row_modified_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowClass *) klass)->finalize = saved_search_dialog_search_row_modified_finalize;
	g_type_class_adjust_private_offset (klass, &SavedSearchDialogSearchRowModified_private_offset);
	((SavedSearchDialogSearchRowClass *) klass)->get_widget = (GtkWidget* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_modified_real_get_widget;
	((SavedSearchDialogSearchRowClass *) klass)->get_search_condition = (SearchCondition* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_modified_real_get_search_condition;
	((SavedSearchDialogSearchRowClass *) klass)->populate = (void (*) (SavedSearchDialogSearchRow*, SearchCondition*)) saved_search_dialog_search_row_modified_real_populate;
	((SavedSearchDialogSearchRowClass *) klass)->is_complete = (gboolean (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_modified_real_is_complete;
}

static void
saved_search_dialog_search_row_modified_instance_init (SavedSearchDialogSearchRowModified * self,
                                                       gpointer klass)
{
	self->priv = saved_search_dialog_search_row_modified_get_instance_private (self);
}

static void
saved_search_dialog_search_row_modified_finalize (SavedSearchDialogSearchRow * obj)
{
	SavedSearchDialogSearchRowModified * self;
	GtkComboBoxText* _tmp0_;
	guint _tmp1_;
	GtkComboBoxText* _tmp2_;
	guint _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_MODIFIED, SavedSearchDialogSearchRowModified);
	_tmp0_ = self->priv->modified_state;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _saved_search_dialog_search_row_modified_on_changed_gtk_combo_box_changed, self);
	_tmp2_ = self->priv->modified_context;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _saved_search_dialog_search_row_modified_on_changed_gtk_combo_box_changed, self);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->modified_context);
	_g_object_unref0 (self->priv->modified_state);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CLASS (saved_search_dialog_search_row_modified_parent_class)->finalize (obj);
}

static GType
saved_search_dialog_search_row_modified_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowModifiedClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_modified_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRowModified), 0, (GInstanceInitFunc) saved_search_dialog_search_row_modified_instance_init, NULL };
	GType saved_search_dialog_search_row_modified_type_id;
	saved_search_dialog_search_row_modified_type_id = g_type_register_static (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, "SavedSearchDialogSearchRowModified", &g_define_type_info, 0);
	SavedSearchDialogSearchRowModified_private_offset = g_type_add_instance_private (saved_search_dialog_search_row_modified_type_id, sizeof (SavedSearchDialogSearchRowModifiedPrivate));
	return saved_search_dialog_search_row_modified_type_id;
}

static GType
saved_search_dialog_search_row_modified_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_modified_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_modified_type_id__once)) {
		GType saved_search_dialog_search_row_modified_type_id;
		saved_search_dialog_search_row_modified_type_id = saved_search_dialog_search_row_modified_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_modified_type_id__once, saved_search_dialog_search_row_modified_type_id);
	}
	return saved_search_dialog_search_row_modified_type_id__once;
}

static inline gpointer
saved_search_dialog_search_row_flagged_get_instance_private (SavedSearchDialogSearchRowFlagged* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialogSearchRowFlagged_private_offset);
}

static void
_saved_search_dialog_search_row_flagged_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                          gpointer self)
{
	saved_search_dialog_search_row_flagged_on_changed ((SavedSearchDialogSearchRowFlagged*) self);
}

static SavedSearchDialogSearchRowFlagged*
saved_search_dialog_search_row_flagged_construct (GType object_type,
                                                  SavedSearchDialogSearchRowContainer* parent)
{
	SavedSearchDialogSearchRowFlagged* self = NULL;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	GtkComboBoxText* _tmp1_;
	GtkComboBoxText* _tmp2_;
	GtkComboBoxText* _tmp3_;
	GtkComboBoxText* _tmp4_;
	GtkComboBoxText* _tmp5_;
	GtkBox* _tmp6_;
	GtkBox* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkBox* _tmp10_;
	GtkComboBoxText* _tmp11_;
	GtkBox* _tmp12_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (parent), NULL);
	self = (SavedSearchDialogSearchRowFlagged*) saved_search_dialog_search_row_construct (object_type);
	_tmp0_ = _saved_search_dialog_search_row_container_ref0 (parent);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	self->priv->parent = _tmp0_;
	_tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->flagged_state);
	self->priv->flagged_state = _tmp1_;
	_tmp2_ = self->priv->flagged_state;
	gtk_combo_box_text_append_text (_tmp2_, _ ("flagged"));
	_tmp3_ = self->priv->flagged_state;
	gtk_combo_box_text_append_text (_tmp3_, _ ("not flagged"));
	_tmp4_ = self->priv->flagged_state;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp5_ = self->priv->flagged_state;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_flagged_on_changed_gtk_combo_box_changed, self);
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp6_;
	_tmp7_ = self->priv->box;
	_tmp8_ = (GtkLabel*) gtk_label_new (_ ("is"));
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	gtk_box_pack_start (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = self->priv->box;
	_tmp11_ = self->priv->flagged_state;
	gtk_box_pack_start (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp12_ = self->priv->box;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget));
	return self;
}

static SavedSearchDialogSearchRowFlagged*
saved_search_dialog_search_row_flagged_new (SavedSearchDialogSearchRowContainer* parent)
{
	return saved_search_dialog_search_row_flagged_construct (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, parent);
}

static GtkWidget*
saved_search_dialog_search_row_flagged_real_get_widget (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowFlagged * self;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlagged);
	_tmp0_ = self->priv->box;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static SearchCondition*
saved_search_dialog_search_row_flagged_real_get_search_condition (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowFlagged * self;
	SearchConditionSearchType search_type = 0;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SearchConditionFlaggedState state = 0;
	GtkComboBoxText* _tmp1_;
	SearchConditionFlagged* c = NULL;
	SearchConditionFlagged* _tmp2_;
	SearchCondition* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlagged);
	_tmp0_ = self->priv->parent;
	search_type = saved_search_dialog_search_row_container_get_search_type (_tmp0_);
	_tmp1_ = self->priv->flagged_state;
	state = (SearchConditionFlaggedState) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox));
	_tmp2_ = search_condition_flagged_new (search_type, state);
	c = _tmp2_;
	result = G_TYPE_CHECK_INSTANCE_CAST (c, TYPE_SEARCH_CONDITION, SearchCondition);
	return result;
}

static void
saved_search_dialog_search_row_flagged_real_populate (SavedSearchDialogSearchRow* base,
                                                      SearchCondition* sc)
{
	SavedSearchDialogSearchRowFlagged * self;
	SearchConditionFlagged* f = NULL;
	SearchConditionFlagged* _tmp0_;
	GtkComboBoxText* _tmp1_;
	SearchConditionFlaggedState _tmp2_;
	SearchConditionFlaggedState _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlagged);
	g_return_if_fail (IS_SEARCH_CONDITION (sc));
	_tmp0_ = _search_condition_ref0 (IS_SEARCH_CONDITION_FLAGGED (sc) ? ((SearchConditionFlagged*) sc) : NULL);
	f = _tmp0_;
	_vala_assert (f != NULL, "f != null");
	_tmp1_ = self->priv->flagged_state;
	_tmp2_ = search_condition_flagged_get_state (f);
	_tmp3_ = _tmp2_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp3_);
	_search_condition_unref0 (f);
}

static gboolean
saved_search_dialog_search_row_flagged_real_is_complete (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowFlagged * self;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlagged);
	result = TRUE;
	return result;
}

static void
saved_search_dialog_search_row_flagged_on_changed (SavedSearchDialogSearchRowFlagged* self)
{
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SavedSearchDialogSearchRowContainer* _tmp1_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_FLAGGED (self));
	_tmp0_ = self->priv->parent;
	_tmp1_ = self->priv->parent;
	g_signal_emit (_tmp0_, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL], 0, _tmp1_);
}

static void
saved_search_dialog_search_row_flagged_class_init (SavedSearchDialogSearchRowFlaggedClass * klass,
                                                   gpointer klass_data)
{
	saved_search_dialog_search_row_flagged_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowClass *) klass)->finalize = saved_search_dialog_search_row_flagged_finalize;
	g_type_class_adjust_private_offset (klass, &SavedSearchDialogSearchRowFlagged_private_offset);
	((SavedSearchDialogSearchRowClass *) klass)->get_widget = (GtkWidget* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_flagged_real_get_widget;
	((SavedSearchDialogSearchRowClass *) klass)->get_search_condition = (SearchCondition* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_flagged_real_get_search_condition;
	((SavedSearchDialogSearchRowClass *) klass)->populate = (void (*) (SavedSearchDialogSearchRow*, SearchCondition*)) saved_search_dialog_search_row_flagged_real_populate;
	((SavedSearchDialogSearchRowClass *) klass)->is_complete = (gboolean (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_flagged_real_is_complete;
}

static void
saved_search_dialog_search_row_flagged_instance_init (SavedSearchDialogSearchRowFlagged * self,
                                                      gpointer klass)
{
	self->priv = saved_search_dialog_search_row_flagged_get_instance_private (self);
}

static void
saved_search_dialog_search_row_flagged_finalize (SavedSearchDialogSearchRow * obj)
{
	SavedSearchDialogSearchRowFlagged * self;
	GtkComboBoxText* _tmp0_;
	guint _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_FLAGGED, SavedSearchDialogSearchRowFlagged);
	_tmp0_ = self->priv->flagged_state;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _saved_search_dialog_search_row_flagged_on_changed_gtk_combo_box_changed, self);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->flagged_state);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CLASS (saved_search_dialog_search_row_flagged_parent_class)->finalize (obj);
}

static GType
saved_search_dialog_search_row_flagged_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowFlaggedClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_flagged_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRowFlagged), 0, (GInstanceInitFunc) saved_search_dialog_search_row_flagged_instance_init, NULL };
	GType saved_search_dialog_search_row_flagged_type_id;
	saved_search_dialog_search_row_flagged_type_id = g_type_register_static (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, "SavedSearchDialogSearchRowFlagged", &g_define_type_info, 0);
	SavedSearchDialogSearchRowFlagged_private_offset = g_type_add_instance_private (saved_search_dialog_search_row_flagged_type_id, sizeof (SavedSearchDialogSearchRowFlaggedPrivate));
	return saved_search_dialog_search_row_flagged_type_id;
}

static GType
saved_search_dialog_search_row_flagged_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_flagged_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_flagged_type_id__once)) {
		GType saved_search_dialog_search_row_flagged_type_id;
		saved_search_dialog_search_row_flagged_type_id = saved_search_dialog_search_row_flagged_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_flagged_type_id__once, saved_search_dialog_search_row_flagged_type_id);
	}
	return saved_search_dialog_search_row_flagged_type_id__once;
}

static inline gpointer
saved_search_dialog_search_row_rating_get_instance_private (SavedSearchDialogSearchRowRating* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialogSearchRowRating_private_offset);
}

static void
_saved_search_dialog_search_row_rating_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                         gpointer self)
{
	saved_search_dialog_search_row_rating_on_changed ((SavedSearchDialogSearchRowRating*) self);
}

static SavedSearchDialogSearchRowRating*
saved_search_dialog_search_row_rating_construct (GType object_type,
                                                 SavedSearchDialogSearchRowContainer* parent)
{
	SavedSearchDialogSearchRowRating* self = NULL;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	GtkComboBoxText* _tmp1_;
	GtkComboBoxText* _tmp2_;
	const gchar* _tmp3_;
	GtkComboBoxText* _tmp4_;
	const gchar* _tmp5_;
	GtkComboBoxText* _tmp6_;
	const gchar* _tmp7_;
	GtkComboBoxText* _tmp8_;
	const gchar* _tmp9_;
	GtkComboBoxText* _tmp10_;
	const gchar* _tmp11_;
	GtkComboBoxText* _tmp12_;
	const gchar* _tmp13_;
	GtkComboBoxText* _tmp14_;
	const gchar* _tmp15_;
	GtkComboBoxText* _tmp16_;
	GtkComboBoxText* _tmp17_;
	GtkComboBoxText* _tmp18_;
	GtkComboBoxText* _tmp19_;
	GtkComboBoxText* _tmp20_;
	GtkComboBoxText* _tmp21_;
	GtkComboBoxText* _tmp22_;
	GtkComboBoxText* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* _tmp25_;
	GtkLabel* _tmp26_;
	GtkLabel* _tmp27_;
	GtkBox* _tmp28_;
	GtkComboBoxText* _tmp29_;
	GtkBox* _tmp30_;
	GtkComboBoxText* _tmp31_;
	GtkBox* _tmp32_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (parent), NULL);
	self = (SavedSearchDialogSearchRowRating*) saved_search_dialog_search_row_construct (object_type);
	_tmp0_ = _saved_search_dialog_search_row_container_ref0 (parent);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	self->priv->parent = _tmp0_;
	_tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->rating);
	self->priv->rating = _tmp1_;
	_tmp2_ = self->priv->rating;
	_tmp3_ = resources_rating_combo_box (RATING_REJECTED);
	gtk_combo_box_text_append_text (_tmp2_, _tmp3_);
	_tmp4_ = self->priv->rating;
	_tmp5_ = resources_rating_combo_box (RATING_UNRATED);
	gtk_combo_box_text_append_text (_tmp4_, _tmp5_);
	_tmp6_ = self->priv->rating;
	_tmp7_ = resources_rating_combo_box (RATING_ONE);
	gtk_combo_box_text_append_text (_tmp6_, _tmp7_);
	_tmp8_ = self->priv->rating;
	_tmp9_ = resources_rating_combo_box (RATING_TWO);
	gtk_combo_box_text_append_text (_tmp8_, _tmp9_);
	_tmp10_ = self->priv->rating;
	_tmp11_ = resources_rating_combo_box (RATING_THREE);
	gtk_combo_box_text_append_text (_tmp10_, _tmp11_);
	_tmp12_ = self->priv->rating;
	_tmp13_ = resources_rating_combo_box (RATING_FOUR);
	gtk_combo_box_text_append_text (_tmp12_, _tmp13_);
	_tmp14_ = self->priv->rating;
	_tmp15_ = resources_rating_combo_box (RATING_FIVE);
	gtk_combo_box_text_append_text (_tmp14_, _tmp15_);
	_tmp16_ = self->priv->rating;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp17_ = self->priv->rating;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_rating_on_changed_gtk_combo_box_changed, self);
	_tmp18_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->context);
	self->priv->context = _tmp18_;
	_tmp19_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp19_, _ ("and higher"));
	_tmp20_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp20_, _ ("only"));
	_tmp21_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp21_, _ ("and lower"));
	_tmp22_ = self->priv->context;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp23_ = self->priv->context;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_rating_on_changed_gtk_combo_box_changed, self);
	_tmp24_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
	g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp24_;
	_tmp25_ = self->priv->box;
	_tmp26_ = (GtkLabel*) gtk_label_new (_ ("is"));
	g_object_ref_sink (_tmp26_);
	_tmp27_ = _tmp26_;
	gtk_box_pack_start (_tmp25_, G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_g_object_unref0 (_tmp27_);
	_tmp28_ = self->priv->box;
	_tmp29_ = self->priv->rating;
	gtk_box_pack_start (_tmp28_, G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp30_ = self->priv->box;
	_tmp31_ = self->priv->context;
	gtk_box_pack_start (_tmp30_, G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp32_ = self->priv->box;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_widget_get_type (), GtkWidget));
	return self;
}

static SavedSearchDialogSearchRowRating*
saved_search_dialog_search_row_rating_new (SavedSearchDialogSearchRowContainer* parent)
{
	return saved_search_dialog_search_row_rating_construct (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, parent);
}

static GtkWidget*
saved_search_dialog_search_row_rating_real_get_widget (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowRating * self;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRating);
	_tmp0_ = self->priv->box;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static SearchCondition*
saved_search_dialog_search_row_rating_real_get_search_condition (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowRating * self;
	SearchConditionSearchType search_type = 0;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	Rating search_rating = 0;
	GtkComboBoxText* _tmp1_;
	SearchConditionRatingContext search_context = 0;
	GtkComboBoxText* _tmp2_;
	SearchConditionRating* c = NULL;
	SearchConditionRating* _tmp3_;
	SearchCondition* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRating);
	_tmp0_ = self->priv->parent;
	search_type = saved_search_dialog_search_row_container_get_search_type (_tmp0_);
	_tmp1_ = self->priv->rating;
	search_rating = ((Rating) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox))) + RATING_REJECTED;
	_tmp2_ = self->priv->context;
	search_context = (SearchConditionRatingContext) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox));
	_tmp3_ = search_condition_rating_new (search_type, search_rating, search_context);
	c = _tmp3_;
	result = G_TYPE_CHECK_INSTANCE_CAST (c, TYPE_SEARCH_CONDITION, SearchCondition);
	return result;
}

static void
saved_search_dialog_search_row_rating_real_populate (SavedSearchDialogSearchRow* base,
                                                     SearchCondition* sc)
{
	SavedSearchDialogSearchRowRating * self;
	SearchConditionRating* r = NULL;
	SearchConditionRating* _tmp0_;
	GtkComboBoxText* _tmp1_;
	SearchConditionRatingContext _tmp2_;
	SearchConditionRatingContext _tmp3_;
	GtkComboBoxText* _tmp4_;
	Rating _tmp5_;
	Rating _tmp6_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRating);
	g_return_if_fail (IS_SEARCH_CONDITION (sc));
	_tmp0_ = _search_condition_ref0 (IS_SEARCH_CONDITION_RATING (sc) ? ((SearchConditionRating*) sc) : NULL);
	r = _tmp0_;
	_vala_assert (r != NULL, "r != null");
	_tmp1_ = self->priv->context;
	_tmp2_ = search_condition_rating_get_context (r);
	_tmp3_ = _tmp2_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp3_);
	_tmp4_ = self->priv->rating;
	_tmp5_ = search_condition_rating_get_rating (r);
	_tmp6_ = _tmp5_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_combo_box_get_type (), GtkComboBox), (gint) (_tmp6_ - RATING_REJECTED));
	_search_condition_unref0 (r);
}

static gboolean
saved_search_dialog_search_row_rating_real_is_complete (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowRating * self;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRating);
	result = TRUE;
	return result;
}

static void
saved_search_dialog_search_row_rating_on_changed (SavedSearchDialogSearchRowRating* self)
{
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SavedSearchDialogSearchRowContainer* _tmp1_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_RATING (self));
	_tmp0_ = self->priv->parent;
	_tmp1_ = self->priv->parent;
	g_signal_emit (_tmp0_, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL], 0, _tmp1_);
}

static void
saved_search_dialog_search_row_rating_class_init (SavedSearchDialogSearchRowRatingClass * klass,
                                                  gpointer klass_data)
{
	saved_search_dialog_search_row_rating_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowClass *) klass)->finalize = saved_search_dialog_search_row_rating_finalize;
	g_type_class_adjust_private_offset (klass, &SavedSearchDialogSearchRowRating_private_offset);
	((SavedSearchDialogSearchRowClass *) klass)->get_widget = (GtkWidget* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_rating_real_get_widget;
	((SavedSearchDialogSearchRowClass *) klass)->get_search_condition = (SearchCondition* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_rating_real_get_search_condition;
	((SavedSearchDialogSearchRowClass *) klass)->populate = (void (*) (SavedSearchDialogSearchRow*, SearchCondition*)) saved_search_dialog_search_row_rating_real_populate;
	((SavedSearchDialogSearchRowClass *) klass)->is_complete = (gboolean (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_rating_real_is_complete;
}

static void
saved_search_dialog_search_row_rating_instance_init (SavedSearchDialogSearchRowRating * self,
                                                     gpointer klass)
{
	self->priv = saved_search_dialog_search_row_rating_get_instance_private (self);
}

static void
saved_search_dialog_search_row_rating_finalize (SavedSearchDialogSearchRow * obj)
{
	SavedSearchDialogSearchRowRating * self;
	GtkComboBoxText* _tmp0_;
	guint _tmp1_;
	GtkComboBoxText* _tmp2_;
	guint _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_RATING, SavedSearchDialogSearchRowRating);
	_tmp0_ = self->priv->rating;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _saved_search_dialog_search_row_rating_on_changed_gtk_combo_box_changed, self);
	_tmp2_ = self->priv->context;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _saved_search_dialog_search_row_rating_on_changed_gtk_combo_box_changed, self);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->rating);
	_g_object_unref0 (self->priv->context);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CLASS (saved_search_dialog_search_row_rating_parent_class)->finalize (obj);
}

static GType
saved_search_dialog_search_row_rating_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowRatingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_rating_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRowRating), 0, (GInstanceInitFunc) saved_search_dialog_search_row_rating_instance_init, NULL };
	GType saved_search_dialog_search_row_rating_type_id;
	saved_search_dialog_search_row_rating_type_id = g_type_register_static (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, "SavedSearchDialogSearchRowRating", &g_define_type_info, 0);
	SavedSearchDialogSearchRowRating_private_offset = g_type_add_instance_private (saved_search_dialog_search_row_rating_type_id, sizeof (SavedSearchDialogSearchRowRatingPrivate));
	return saved_search_dialog_search_row_rating_type_id;
}

static GType
saved_search_dialog_search_row_rating_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_rating_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_rating_type_id__once)) {
		GType saved_search_dialog_search_row_rating_type_id;
		saved_search_dialog_search_row_rating_type_id = saved_search_dialog_search_row_rating_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_rating_type_id__once, saved_search_dialog_search_row_rating_type_id);
	}
	return saved_search_dialog_search_row_rating_type_id__once;
}

static inline gpointer
saved_search_dialog_search_row_date_get_instance_private (SavedSearchDialogSearchRowDate* self)
{
	return G_STRUCT_MEMBER_P (self, SavedSearchDialogSearchRowDate_private_offset);
}

static void
_saved_search_dialog_search_row_date_on_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                       gpointer self)
{
	saved_search_dialog_search_row_date_on_changed ((SavedSearchDialogSearchRowDate*) self);
}

static void
_saved_search_dialog_search_row_date_on_one_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self)
{
	saved_search_dialog_search_row_date_on_one_clicked ((SavedSearchDialogSearchRowDate*) self);
}

static void
_saved_search_dialog_search_row_date_on_two_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self)
{
	saved_search_dialog_search_row_date_on_two_clicked ((SavedSearchDialogSearchRowDate*) self);
}

static SavedSearchDialogSearchRowDate*
saved_search_dialog_search_row_date_construct (GType object_type,
                                               SavedSearchDialogSearchRowContainer* parent)
{
	SavedSearchDialogSearchRowDate* self = NULL;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	GtkComboBoxText* _tmp1_;
	GtkComboBoxText* _tmp2_;
	GtkComboBoxText* _tmp3_;
	GtkComboBoxText* _tmp4_;
	GtkComboBoxText* _tmp5_;
	GtkComboBoxText* _tmp6_;
	GtkComboBoxText* _tmp7_;
	GtkComboBoxText* _tmp8_;
	GtkCalendar* _tmp9_;
	GtkCalendar* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_;
	GtkLabel* _tmp15_;
	GtkBox* _tmp16_;
	GtkBox* _tmp17_;
	GtkComboBoxText* _tmp18_;
	GtkBox* _tmp19_;
	GtkButton* _tmp20_;
	GtkBox* _tmp21_;
	GtkLabel* _tmp22_;
	GtkBox* _tmp23_;
	GtkButton* _tmp24_;
	GtkBox* _tmp25_;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_CONTAINER (parent), NULL);
	self = (SavedSearchDialogSearchRowDate*) saved_search_dialog_search_row_construct (object_type);
	_tmp0_ = _saved_search_dialog_search_row_container_ref0 (parent);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	self->priv->parent = _tmp0_;
	_tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->context);
	self->priv->context = _tmp1_;
	_tmp2_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp2_, _ ("is exactly"));
	_tmp3_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp3_, _ ("is after"));
	_tmp4_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp4_, _ ("is before"));
	_tmp5_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp5_, _ ("is between"));
	_tmp6_ = self->priv->context;
	gtk_combo_box_text_append_text (_tmp6_, _ ("is not set"));
	_tmp7_ = self->priv->context;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp8_ = self->priv->context;
	g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _saved_search_dialog_search_row_date_on_changed_gtk_combo_box_changed, self);
	_tmp9_ = (GtkCalendar*) gtk_calendar_new ();
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->cal_one);
	self->priv->cal_one = _tmp9_;
	_tmp10_ = (GtkCalendar*) gtk_calendar_new ();
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->cal_two);
	self->priv->cal_two = _tmp10_;
	_tmp11_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->label_one);
	self->priv->label_one = _tmp11_;
	_tmp12_ = self->priv->label_one;
	g_signal_connect (_tmp12_, "clicked", (GCallback) _saved_search_dialog_search_row_date_on_one_clicked_gtk_button_clicked, self);
	_tmp13_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->label_two);
	self->priv->label_two = _tmp13_;
	_tmp14_ = self->priv->label_two;
	g_signal_connect (_tmp14_, "clicked", (GCallback) _saved_search_dialog_search_row_date_on_two_clicked_gtk_button_clicked, self);
	_tmp15_ = (GtkLabel*) gtk_label_new (_ ("and"));
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->and);
	self->priv->and = _tmp15_;
	_tmp16_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp16_;
	_tmp17_ = self->priv->box;
	_tmp18_ = self->priv->context;
	gtk_box_pack_start (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp19_ = self->priv->box;
	_tmp20_ = self->priv->label_one;
	gtk_box_pack_start (_tmp19_, G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp21_ = self->priv->box;
	_tmp22_ = self->priv->and;
	gtk_box_pack_start (_tmp21_, G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp23_ = self->priv->box;
	_tmp24_ = self->priv->label_two;
	gtk_box_pack_start (_tmp23_, G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
	_tmp25_ = self->priv->box;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget));
	saved_search_dialog_search_row_date_update_date_labels (self);
	return self;
}

static SavedSearchDialogSearchRowDate*
saved_search_dialog_search_row_date_new (SavedSearchDialogSearchRowContainer* parent)
{
	return saved_search_dialog_search_row_date_construct (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, parent);
}

static void
saved_search_dialog_search_row_date_update_date_labels (SavedSearchDialogSearchRowDate* self)
{
	SearchConditionDateContext c = 0;
	GtkComboBoxText* _tmp0_;
	GtkButton* _tmp10_;
	GDateTime* _tmp11_;
	GDateTime* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	GtkButton* _tmp15_;
	GDateTime* _tmp16_;
	GDateTime* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self));
	_tmp0_ = self->priv->context;
	c = (SearchConditionDateContext) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox));
	if (c == SEARCH_CONDITION_DATE_CONTEXT_BETWEEN) {
		GtkButton* _tmp1_;
		GtkLabel* _tmp2_;
		GtkButton* _tmp3_;
		_tmp1_ = self->priv->label_one;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
		_tmp2_ = self->priv->and;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
		_tmp3_ = self->priv->label_two;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	} else {
		if (c == SEARCH_CONDITION_DATE_CONTEXT_IS_NOT_SET) {
			GtkButton* _tmp4_;
			GtkLabel* _tmp5_;
			GtkButton* _tmp6_;
			_tmp4_ = self->priv->label_one;
			gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
			_tmp5_ = self->priv->and;
			gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
			_tmp6_ = self->priv->label_two;
			gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
		} else {
			GtkButton* _tmp7_;
			GtkLabel* _tmp8_;
			GtkButton* _tmp9_;
			_tmp7_ = self->priv->label_one;
			gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
			_tmp8_ = self->priv->and;
			gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
			_tmp9_ = self->priv->label_two;
			gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
		}
	}
	_tmp10_ = self->priv->label_one;
	_tmp11_ = saved_search_dialog_search_row_date_get_date_one (self);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_date_time_format (_tmp12_, SAVED_SEARCH_DIALOG_SEARCH_ROW_DATE_DATE_FORMAT);
	_tmp14_ = _tmp13_;
	gtk_button_set_label (_tmp10_, _tmp14_);
	_g_free0 (_tmp14_);
	_g_date_time_unref0 (_tmp12_);
	_tmp15_ = self->priv->label_two;
	_tmp16_ = saved_search_dialog_search_row_date_get_date_two (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_date_time_format (_tmp17_, SAVED_SEARCH_DIALOG_SEARCH_ROW_DATE_DATE_FORMAT);
	_tmp19_ = _tmp18_;
	gtk_button_set_label (_tmp15_, _tmp19_);
	_g_free0 (_tmp19_);
	_g_date_time_unref0 (_tmp17_);
}

static GtkWidget*
saved_search_dialog_search_row_date_real_get_widget (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowDate * self;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDate);
	_tmp0_ = self->priv->box;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static GDateTime*
saved_search_dialog_search_row_date_get_date_one (SavedSearchDialogSearchRowDate* self)
{
	GTimeZone* _tmp0_;
	GtkCalendar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GtkCalendar* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	GtkCalendar* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* result;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self), NULL);
	_tmp0_ = application_timezone;
	_tmp1_ = self->priv->cal_one;
	g_object_get (_tmp1_, "year", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->cal_one;
	g_object_get (_tmp4_, "month", &_tmp5_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->cal_one;
	g_object_get (_tmp7_, "day", &_tmp8_, NULL);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_date_time_new (_tmp0_, _tmp3_, _tmp6_ + 1, _tmp9_, 0, 0, 0.0);
	result = _tmp10_;
	return result;
}

static GDateTime*
saved_search_dialog_search_row_date_get_date_two (SavedSearchDialogSearchRowDate* self)
{
	GTimeZone* _tmp0_;
	GtkCalendar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GtkCalendar* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	GtkCalendar* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* result;
	g_return_val_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self), NULL);
	_tmp0_ = application_timezone;
	_tmp1_ = self->priv->cal_two;
	g_object_get (_tmp1_, "year", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->cal_two;
	g_object_get (_tmp4_, "month", &_tmp5_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->cal_two;
	g_object_get (_tmp7_, "day", &_tmp8_, NULL);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_date_time_new (_tmp0_, _tmp3_, _tmp6_ + 1, _tmp9_, 0, 0, 0.0);
	result = _tmp10_;
	return result;
}

static void
saved_search_dialog_search_row_date_set_date_one (SavedSearchDialogSearchRowDate* self,
                                                  GDateTime* date)
{
	GtkCalendar* _tmp0_;
	GtkCalendar* _tmp1_;
	GtkCalendar* _tmp2_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self));
	g_return_if_fail (date != NULL);
	_tmp0_ = self->priv->cal_one;
	g_object_set (_tmp0_, "day", g_date_time_get_day_of_month (date), NULL);
	_tmp1_ = self->priv->cal_one;
	g_object_set (_tmp1_, "month", g_date_time_get_month (date) - 1, NULL);
	_tmp2_ = self->priv->cal_one;
	g_object_set (_tmp2_, "year", g_date_time_get_year (date), NULL);
}

static void
saved_search_dialog_search_row_date_set_date_two (SavedSearchDialogSearchRowDate* self,
                                                  GDateTime* date)
{
	GtkCalendar* _tmp0_;
	GtkCalendar* _tmp1_;
	GtkCalendar* _tmp2_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self));
	g_return_if_fail (date != NULL);
	_tmp0_ = self->priv->cal_two;
	g_object_set (_tmp0_, "day", g_date_time_get_day_of_month (date), NULL);
	_tmp1_ = self->priv->cal_two;
	g_object_set (_tmp1_, "month", g_date_time_get_month (date) - 1, NULL);
	_tmp2_ = self->priv->cal_two;
	g_object_set (_tmp2_, "year", g_date_time_get_year (date), NULL);
}

static SearchCondition*
saved_search_dialog_search_row_date_real_get_search_condition (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowDate * self;
	SearchConditionSearchType search_type = 0;
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SearchConditionDateContext search_context = 0;
	GtkComboBoxText* _tmp1_;
	SearchConditionDate* c = NULL;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	SearchConditionDate* _tmp6_;
	SearchConditionDate* _tmp7_;
	SearchCondition* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDate);
	_tmp0_ = self->priv->parent;
	search_type = saved_search_dialog_search_row_container_get_search_type (_tmp0_);
	_tmp1_ = self->priv->context;
	search_context = (SearchConditionDateContext) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox));
	_tmp2_ = saved_search_dialog_search_row_date_get_date_one (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = saved_search_dialog_search_row_date_get_date_two (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = search_condition_date_new (search_type, search_context, _tmp3_, _tmp5_);
	_tmp7_ = _tmp6_;
	_g_date_time_unref0 (_tmp5_);
	_g_date_time_unref0 (_tmp3_);
	c = _tmp7_;
	result = G_TYPE_CHECK_INSTANCE_CAST (c, TYPE_SEARCH_CONDITION, SearchCondition);
	return result;
}

static void
saved_search_dialog_search_row_date_real_populate (SavedSearchDialogSearchRow* base,
                                                   SearchCondition* sc)
{
	SavedSearchDialogSearchRowDate * self;
	SearchConditionDate* cond = NULL;
	SearchConditionDate* _tmp0_;
	GtkComboBoxText* _tmp1_;
	SearchConditionDateContext _tmp2_;
	SearchConditionDateContext _tmp3_;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* _tmp6_;
	GDateTime* _tmp7_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDate);
	g_return_if_fail (IS_SEARCH_CONDITION (sc));
	_tmp0_ = _search_condition_ref0 (IS_SEARCH_CONDITION_DATE (sc) ? ((SearchConditionDate*) sc) : NULL);
	cond = _tmp0_;
	_vala_assert (cond != NULL, "cond != null");
	_tmp1_ = self->priv->context;
	_tmp2_ = search_condition_date_get_context (cond);
	_tmp3_ = _tmp2_;
	gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp3_);
	_tmp4_ = search_condition_date_get_date_one (cond);
	_tmp5_ = _tmp4_;
	saved_search_dialog_search_row_date_set_date_one (self, _tmp5_);
	_tmp6_ = search_condition_date_get_date_two (cond);
	_tmp7_ = _tmp6_;
	saved_search_dialog_search_row_date_set_date_two (self, _tmp7_);
	saved_search_dialog_search_row_date_update_date_labels (self);
	_search_condition_unref0 (cond);
}

static gboolean
saved_search_dialog_search_row_date_real_is_complete (SavedSearchDialogSearchRow* base)
{
	SavedSearchDialogSearchRowDate * self;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDate);
	result = TRUE;
	return result;
}

static void
saved_search_dialog_search_row_date_on_changed (SavedSearchDialogSearchRowDate* self)
{
	SavedSearchDialogSearchRowContainer* _tmp0_;
	SavedSearchDialogSearchRowContainer* _tmp1_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self));
	_tmp0_ = self->priv->parent;
	_tmp1_ = self->priv->parent;
	g_signal_emit (_tmp0_, saved_search_dialog_search_row_container_signals[SAVED_SEARCH_DIALOG_SEARCH_ROW_CONTAINER_CHANGED_SIGNAL], 0, _tmp1_);
	saved_search_dialog_search_row_date_update_date_labels (self);
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		SavedSearchDialogSearchRowDate* self;
		self = _data11_->self;
		_g_object_unref0 (_data11_->d);
		_saved_search_dialog_search_row_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static void
__lambda16_ (SavedSearchDialogSearchRowDate* self)
{
	saved_search_dialog_search_row_date_update_date_labels (self);
}

static void
___lambda16__gtk_calendar_day_selected (GtkCalendar* _sender,
                                        gpointer self)
{
	__lambda16_ ((SavedSearchDialogSearchRowDate*) self);
}

static void
__lambda17_ (Block11Data* _data11_)
{
	SavedSearchDialogSearchRowDate* self;
	GtkDialog* _tmp0_;
	self = _data11_->self;
	_tmp0_ = _data11_->d;
	gtk_dialog_response (_tmp0_, (gint) GTK_RESPONSE_ACCEPT);
}

static void
___lambda17__gtk_calendar_day_selected_double_click (GtkCalendar* _sender,
                                                     gpointer self)
{
	__lambda17_ (self);
}

static void
saved_search_dialog_search_row_date_popup_calendar (SavedSearchDialogSearchRowDate* self,
                                                    GtkCalendar* cal)
{
	Block11Data* _data11_;
	gint orig_day = 0;
	gint _tmp0_;
	gint _tmp1_;
	gint orig_month = 0;
	gint _tmp2_;
	gint _tmp3_;
	gint orig_year = 0;
	gint _tmp4_;
	gint _tmp5_;
	GtkDialog* _tmp6_;
	GtkDialog* _tmp7_;
	GtkDialog* _tmp8_;
	GtkDialog* _tmp9_;
	GtkDialog* _tmp10_;
	GtkBox* _tmp11_;
	gulong id_1 = 0UL;
	gulong _tmp12_;
	gulong id_2 = 0UL;
	gulong _tmp13_;
	GtkDialog* _tmp14_;
	gint res = 0;
	GtkDialog* _tmp15_;
	GtkDialog* _tmp16_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (cal, gtk_calendar_get_type ()));
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = saved_search_dialog_search_row_ref (self);
	g_object_get (cal, "day", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	orig_day = _tmp1_;
	g_object_get (cal, "month", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	orig_month = _tmp3_;
	g_object_get (cal, "year", &_tmp4_, NULL);
	_tmp5_ = _tmp4_;
	orig_year = _tmp5_;
	_tmp6_ = (GtkDialog*) gtk_dialog_new_with_buttons (NULL, NULL, GTK_DIALOG_MODAL, RESOURCES_CANCEL_LABEL, GTK_RESPONSE_REJECT, RESOURCES_OK_LABEL, GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp6_);
	_data11_->d = _tmp6_;
	_tmp7_ = _data11_->d;
	gtk_window_set_modal (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_window_get_type (), GtkWindow), TRUE);
	_tmp8_ = _data11_->d;
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_window_get_type (), GtkWindow), FALSE);
	_tmp9_ = _data11_->d;
	gtk_window_set_decorated (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_window_get_type (), GtkWindow), FALSE);
	_tmp10_ = _data11_->d;
	_tmp11_ = gtk_dialog_get_content_area (_tmp10_);
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_box_get_type (), GtkBox), gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (cal, gtk_widget_get_type (), GtkWidget));
	_tmp12_ = g_signal_connect (cal, "day-selected", (GCallback) ___lambda16__gtk_calendar_day_selected, self);
	id_1 = _tmp12_;
	_tmp13_ = g_signal_connect_data (cal, "day-selected-double-click", (GCallback) ___lambda17__gtk_calendar_day_selected_double_click, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
	id_2 = _tmp13_;
	_tmp14_ = _data11_->d;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget));
	_tmp15_ = _data11_->d;
	res = gtk_dialog_run (_tmp15_);
	if (res != ((gint) GTK_RESPONSE_ACCEPT)) {
		g_object_set (cal, "day", orig_day, NULL);
		g_object_set (cal, "month", orig_month, NULL);
		g_object_set (cal, "year", orig_year, NULL);
	}
	g_signal_handler_disconnect (G_TYPE_CHECK_INSTANCE_CAST (cal, G_TYPE_OBJECT, GObject), id_1);
	g_signal_handler_disconnect (G_TYPE_CHECK_INSTANCE_CAST (cal, G_TYPE_OBJECT, GObject), id_2);
	_tmp16_ = _data11_->d;
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget));
	saved_search_dialog_search_row_date_update_date_labels (self);
	block11_data_unref (_data11_);
	_data11_ = NULL;
}

static void
saved_search_dialog_search_row_date_on_one_clicked (SavedSearchDialogSearchRowDate* self)
{
	GtkCalendar* _tmp0_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self));
	_tmp0_ = self->priv->cal_one;
	saved_search_dialog_search_row_date_popup_calendar (self, _tmp0_);
}

static void
saved_search_dialog_search_row_date_on_two_clicked (SavedSearchDialogSearchRowDate* self)
{
	GtkCalendar* _tmp0_;
	g_return_if_fail (SAVED_SEARCH_DIALOG_IS_SEARCH_ROW_DATE (self));
	_tmp0_ = self->priv->cal_two;
	saved_search_dialog_search_row_date_popup_calendar (self, _tmp0_);
}

static void
saved_search_dialog_search_row_date_class_init (SavedSearchDialogSearchRowDateClass * klass,
                                                gpointer klass_data)
{
	saved_search_dialog_search_row_date_parent_class = g_type_class_peek_parent (klass);
	((SavedSearchDialogSearchRowClass *) klass)->finalize = saved_search_dialog_search_row_date_finalize;
	g_type_class_adjust_private_offset (klass, &SavedSearchDialogSearchRowDate_private_offset);
	((SavedSearchDialogSearchRowClass *) klass)->get_widget = (GtkWidget* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_date_real_get_widget;
	((SavedSearchDialogSearchRowClass *) klass)->get_search_condition = (SearchCondition* (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_date_real_get_search_condition;
	((SavedSearchDialogSearchRowClass *) klass)->populate = (void (*) (SavedSearchDialogSearchRow*, SearchCondition*)) saved_search_dialog_search_row_date_real_populate;
	((SavedSearchDialogSearchRowClass *) klass)->is_complete = (gboolean (*) (SavedSearchDialogSearchRow*)) saved_search_dialog_search_row_date_real_is_complete;
}

static void
saved_search_dialog_search_row_date_instance_init (SavedSearchDialogSearchRowDate * self,
                                                   gpointer klass)
{
	self->priv = saved_search_dialog_search_row_date_get_instance_private (self);
}

static void
saved_search_dialog_search_row_date_finalize (SavedSearchDialogSearchRow * obj)
{
	SavedSearchDialogSearchRowDate * self;
	GtkComboBoxText* _tmp0_;
	guint _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_DATE, SavedSearchDialogSearchRowDate);
	_tmp0_ = self->priv->context;
	g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _saved_search_dialog_search_row_date_on_changed_gtk_combo_box_changed, self);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->context);
	_g_object_unref0 (self->priv->label_one);
	_g_object_unref0 (self->priv->label_two);
	_g_object_unref0 (self->priv->cal_one);
	_g_object_unref0 (self->priv->cal_two);
	_g_object_unref0 (self->priv->and);
	_saved_search_dialog_search_row_container_unref0 (self->priv->parent);
	SAVED_SEARCH_DIALOG_SEARCH_ROW_CLASS (saved_search_dialog_search_row_date_parent_class)->finalize (obj);
}

static GType
saved_search_dialog_search_row_date_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogSearchRowDateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_search_row_date_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialogSearchRowDate), 0, (GInstanceInitFunc) saved_search_dialog_search_row_date_instance_init, NULL };
	GType saved_search_dialog_search_row_date_type_id;
	saved_search_dialog_search_row_date_type_id = g_type_register_static (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW, "SavedSearchDialogSearchRowDate", &g_define_type_info, 0);
	SavedSearchDialogSearchRowDate_private_offset = g_type_add_instance_private (saved_search_dialog_search_row_date_type_id, sizeof (SavedSearchDialogSearchRowDatePrivate));
	return saved_search_dialog_search_row_date_type_id;
}

static GType
saved_search_dialog_search_row_date_get_type (void)
{
	static volatile gsize saved_search_dialog_search_row_date_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_search_row_date_type_id__once)) {
		GType saved_search_dialog_search_row_date_type_id;
		saved_search_dialog_search_row_date_type_id = saved_search_dialog_search_row_date_get_type_once ();
		g_once_init_leave (&saved_search_dialog_search_row_date_type_id__once, saved_search_dialog_search_row_date_type_id);
	}
	return saved_search_dialog_search_row_date_type_id__once;
}

static void
saved_search_dialog_class_init (SavedSearchDialogClass * klass,
                                gpointer klass_data)
{
	saved_search_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SavedSearchDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = saved_search_dialog_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Shotwell/ui/saved_search_dialog.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "add_criteria", FALSE, SavedSearchDialog_private_offset + G_STRUCT_OFFSET (SavedSearchDialogPrivate, add_criteria));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "operator", FALSE, SavedSearchDialog_private_offset + G_STRUCT_OFFSET (SavedSearchDialogPrivate, operator));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_title", FALSE, SavedSearchDialog_private_offset + G_STRUCT_OFFSET (SavedSearchDialogPrivate, search_title));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "row_listbox", FALSE, SavedSearchDialog_private_offset + G_STRUCT_OFFSET (SavedSearchDialogPrivate, row_listbox));
}

static void
saved_search_dialog_instance_init (SavedSearchDialog * self,
                                   gpointer klass)
{
	GeeArrayList* _tmp0_;
	self->priv = saved_search_dialog_get_instance_private (self);
	_tmp0_ = gee_array_list_new (SAVED_SEARCH_DIALOG_TYPE_SEARCH_ROW_CONTAINER, (GBoxedCopyFunc) saved_search_dialog_search_row_container_ref, (GDestroyNotify) saved_search_dialog_search_row_container_unref, NULL, NULL, NULL);
	self->priv->row_list = _tmp0_;
	self->priv->edit_mode = FALSE;
	self->priv->previous_search = NULL;
	self->priv->valid = FALSE;
	self->priv->notify_id = (gulong) 0;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
saved_search_dialog_finalize (GObject * obj)
{
	SavedSearchDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SAVED_SEARCH_DIALOG, SavedSearchDialog);
	_g_object_unref0 (self->priv->row_list);
	_g_object_unref0 (self->priv->previous_search);
	G_OBJECT_CLASS (saved_search_dialog_parent_class)->finalize (obj);
}

static GType
saved_search_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SavedSearchDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) saved_search_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SavedSearchDialog), 0, (GInstanceInitFunc) saved_search_dialog_instance_init, NULL };
	GType saved_search_dialog_type_id;
	saved_search_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "SavedSearchDialog", &g_define_type_info, 0);
	SavedSearchDialog_private_offset = g_type_add_instance_private (saved_search_dialog_type_id, sizeof (SavedSearchDialogPrivate));
	return saved_search_dialog_type_id;
}

GType
saved_search_dialog_get_type (void)
{
	static volatile gsize saved_search_dialog_type_id__once = 0;
	if (g_once_init_enter (&saved_search_dialog_type_id__once)) {
		GType saved_search_dialog_type_id;
		saved_search_dialog_type_id = saved_search_dialog_get_type_once ();
		g_once_init_leave (&saved_search_dialog_type_id__once, saved_search_dialog_type_id);
	}
	return saved_search_dialog_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

