/* Generated by GOB (v2.0.20)   (do not edit directly) */

/* End world hunger, donate to the World Food Programme, http://www.wfp.org */

#define GOB_VERSION_MAJOR 2
#define GOB_VERSION_MINOR 0
#define GOB_VERSION_PATCHLEVEL 20

#define selfp (self->_priv)

#include <string.h> /* memset() */

#include "gmpc-mpddata-treeview.h"

#include "gmpc-mpddata-treeview-private.h"

#ifdef G_LIKELY
#define ___GOB_LIKELY(expr) G_LIKELY(expr)
#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
#else /* ! G_LIKELY */
#define ___GOB_LIKELY(expr) (expr)
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */

#line 52 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"

GtkTargetEntry gmt_targetentries[] =
{
	{ (gchar *)"GTK_TREE_MODEL_ROW",					GTK_TARGET_SAME_APP		, DND_SONG}
};
static int col_ids[NUM_COLS] = {
    MPDDATA_MODEL_COL_MARKUP,
    MPDDATA_MODEL_COL_SONG_ARTIST,			      /* album name */
    MPDDATA_MODEL_COL_SONG_ALBUM,			      /* album name */
    MPDDATA_MODEL_COL_SONG_TITLE,			      /* song title */
    MPDDATA_MODEL_COL_SONG_TITLEFILE,		    /* song title */
    MPDDATA_MODEL_COL_SONG_GENRE,			      /* song genre */
    MPDDATA_MODEL_COL_SONG_TRACK,			      /* song track */
    MPDDATA_MODEL_COL_SONG_NAME,			      /* stream name */
    MPDDATA_MODEL_COL_SONG_COMPOSER,		    /* composer name */
    MPDDATA_MODEL_COL_SONG_PERFORMER,		    /* performer */
    MPDDATA_MODEL_COL_SONG_DATE,			      /* date */
    MPDDATA_MODEL_COL_SONG_LENGTH_FORMAT,	  /* length formatted */
    MPDDATA_MODEL_COL_SONG_DISC,			      /* disc */
    MPDDATA_MODEL_COL_SONG_COMMENT,			    /* comment */
    MPDDATA_MODEL_COL_ICON_ID,				      /* icon id */
    MPDDATA_MODEL_COL_SONG_POS,
    MPDDATA_MODEL_COL_SONG_ALBUMARTIST,
		MPDDATA_MODEL_COL_PATH_EXTENSION,				/* Extension */
		MPDDATA_MODEL_COL_PATH_DIRECTORY				/* Directory */
};
static const gchar *col_names[NUM_COLS] = {
    N_("Markup"),
    N_("Artist"),
    N_("Album"),
    N_("Title"),
    N_("File"),
    N_("Genre"),
    N_("Track"),
    N_("Name"),
    N_("Composer"),
    N_("Performer"),
    N_("Date"),
    N_("Duration"),
    N_("Disc"),
    N_("Comment"),
    N_("Icon Id"),
    N_("Position"),
    N_("AlbumArtist"),
    N_("Extension"),
    N_("Directory")
}; 

static gint  col_enabled[NUM_COLS] = {
    FALSE,//"Markup",
    TRUE, //"Artist",
    TRUE,//"Album",
    TRUE,//"Title",
    FALSE,//"File",
    FALSE,//"Genre",
    FALSE,//"Track",
    FALSE,//"Name",
    FALSE,//"Composer",
    FALSE,//"Performer",
    FALSE,//"Date",
    FALSE,//"Duration",
    FALSE,//"Disc",
    FALSE,//"Comment",
    TRUE,//"Icon Id"
    FALSE,//"Position"
    FALSE,//"AlbumArtist"
    FALSE,//Extension
    FALSE//Directory

};
static gint  col_position[NUM_COLS] = {
    14,//"Markup",
    3, //"Artist",
    2,//"Album",
    1,//"Title",
    4,//"File",
    5,//"Genre",
    6,//"Track",
    7,//"Name",
    8,//"Composer",
    9,//"Performer",
    10,//"Date",
    11,//"Duration",
    12,//"Disc",
    13,//"Comment",
    0,//"Icon Id"
    15, // "Position"
    18, // "AlbumArtist"
    16,// Extension
    17 // Directory
};

static GList *paste_queue = NULL;
#define LOG_DOMAIN "MpdData.TreeView"

#line 122 "gmpc-mpddata-treeview.c"
/* self casting macros */
#define SELF(x) GMPC_MPDDATA_TREEVIEW(x)
#define SELF_CONST(x) GMPC_MPDDATA_TREEVIEW_CONST(x)
#define IS_SELF(x) GMPC_IS_MPDDATA_TREEVIEW(x)
#define TYPE_SELF GMPC_TYPE_MPDDATA_TREEVIEW
#define SELF_CLASS(x) GMPC_MPDDATA_TREEVIEW_CLASS(x)

#define SELF_GET_CLASS(x) GMPC_MPDDATA_TREEVIEW_GET_CLASS(x)

/* self typedefs */
typedef GmpcMpdDataTreeview Self;
typedef GmpcMpdDataTreeviewClass SelfClass;

/* here are local prototypes */
static void gmpc_mpddata_treeview_init (GmpcMpdDataTreeview * o) G_GNUC_UNUSED;
static void gmpc_mpddata_treeview_class_init (GmpcMpdDataTreeviewClass * c) G_GNUC_UNUSED;
#line 190 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_do_init (GmpcMpdDataTreeview * self) G_GNUC_UNUSED;
#line 141 "gmpc-mpddata-treeview.c"
#line 243 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_save_column_setup (GmpcMpdDataTreeview * self) G_GNUC_UNUSED;
#line 144 "gmpc-mpddata-treeview.c"
#line 289 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void ___4_gmpc_mpddata_treeview_dispose (GObject * obj) G_GNUC_UNUSED;
#line 147 "gmpc-mpddata-treeview.c"
#line 297 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_highlight_row (GtkTreeViewColumn * tree_column, GtkCellRenderer * cell, GtkTreeModel * tree_model, GtkTreeIter * iter, gpointer data) G_GNUC_UNUSED;
#line 150 "gmpc-mpddata-treeview.c"
#line 312 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_column_width (GmpcMpdDataTreeview * self, GParamSpec * argc, GtkTreeViewColumn * column) G_GNUC_UNUSED;
#line 153 "gmpc-mpddata-treeview.c"
#line 330 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static GtkTreeViewColumn * gmpc_mpddata_treeview_add_column (GmpcMpdDataTreeview * self, const char * columnname, int valuerow, int position) G_GNUC_UNUSED;
#line 156 "gmpc-mpddata-treeview.c"
#line 393 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void ___9_gmpc_mpddata_treeview_finalize (GObject * obj) G_GNUC_UNUSED;
#line 159 "gmpc-mpddata-treeview.c"
#line 420 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean gmpc_mpddata_treeview_query_tooltip (GmpcMpdDataTreeview * self, gint x, gint y, gboolean keyboard_tip, GtkTooltip * tooltip, gpointer data) G_GNUC_UNUSED;
#line 162 "gmpc-mpddata-treeview.c"
#line 495 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean gmpc_mpddata_treeview_tooltip_expose_event (GtkWidget * widget, GdkEventExpose * event, gpointer data) G_GNUC_UNUSED;
#line 165 "gmpc-mpddata-treeview.c"
#line 594 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_enable_tooltip (GmpcMpdDataTreeview * self) G_GNUC_UNUSED;
#line 168 "gmpc-mpddata-treeview.c"
#line 734 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean gmpc_mpddata_treeview_click_fix (GmpcMpdDataTreeview * self, GdkEventButton * event) G_GNUC_UNUSED;
#line 171 "gmpc-mpddata-treeview.c"
#line 755 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean gmpc_mpddata_treeview_click_released (GmpcMpdDataTreeview * self, GdkEventButton * event) G_GNUC_UNUSED;
#line 174 "gmpc-mpddata-treeview.c"
#line 789 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static int gmpc_mpddata_treeview_paste_key_release_event (GmpcMpdDataTreeview * self, GdkEventKey * event, gpointer data) G_GNUC_UNUSED;
#line 177 "gmpc-mpddata-treeview.c"
#line 846 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_paste_cut_songs (GmpcMpdDataTreeview * self, GtkMenuItem * item) G_GNUC_UNUSED;
#line 180 "gmpc-mpddata-treeview.c"
#line 853 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_paste_paste_after_songs (GmpcMpdDataTreeview * self, GtkMenuItem * menuitem) G_GNUC_UNUSED;
#line 183 "gmpc-mpddata-treeview.c"
#line 865 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_paste_paste_before_songs (GmpcMpdDataTreeview * self, GtkMenuItem * menuitem) G_GNUC_UNUSED;
#line 186 "gmpc-mpddata-treeview.c"
#line 877 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void gmpc_mpddata_treeview_paste_copy_songs (GmpcMpdDataTreeview * self, GtkMenuItem * menitem) G_GNUC_UNUSED;
#line 189 "gmpc-mpddata-treeview.c"

/*
 * Signal connection wrapper macro shortcuts
 */
#define self_connect__paste_before(object,func,data)	gmpc_mpddata_treeview_connect__paste_before((object),(func),(data))
#define self_connect_after__paste_before(object,func,data)	gmpc_mpddata_treeview_connect_after__paste_before((object),(func),(data))
#define self_connect_data__paste_before(object,func,data,destroy_data,flags)	gmpc_mpddata_treeview_connect_data__paste_before((object),(func),(data),(destroy_data),(flags))
#define self_connect__paste_after(object,func,data)	gmpc_mpddata_treeview_connect__paste_after((object),(func),(data))
#define self_connect_after__paste_after(object,func,data)	gmpc_mpddata_treeview_connect_after__paste_after((object),(func),(data))
#define self_connect_data__paste_after(object,func,data,destroy_data,flags)	gmpc_mpddata_treeview_connect_data__paste_after((object),(func),(data),(destroy_data),(flags))
#define self_connect__cut(object,func,data)	gmpc_mpddata_treeview_connect__cut((object),(func),(data))
#define self_connect_after__cut(object,func,data)	gmpc_mpddata_treeview_connect_after__cut((object),(func),(data))
#define self_connect_data__cut(object,func,data,destroy_data,flags)	gmpc_mpddata_treeview_connect_data__cut((object),(func),(data),(destroy_data),(flags))

typedef void  (*___Sig1) (GmpcMpdDataTreeview *, gpointer , gpointer);

static void
___marshal_Sig1 (GClosure *closure,
	GValue *return_value G_GNUC_UNUSED,
	guint n_param_values,
	const GValue *param_values,
	gpointer invocation_hint G_GNUC_UNUSED,
	gpointer marshal_data)
{
	register ___Sig1 callback;
	register GCClosure *cc = (GCClosure*) closure;
	register gpointer data1, data2;

	g_return_if_fail (n_param_values == 2);

	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = g_value_peek_pointer (param_values + 0);
	} else {
		data1 = g_value_peek_pointer (param_values + 0);
		data2 = closure->data;
	}

	callback = (___Sig1) (marshal_data != NULL ? marshal_data : cc->callback);

	callback ((GmpcMpdDataTreeview *)data1,
		(gpointer ) g_value_get_pointer (param_values + 1),
		data2);
}


enum {
	PASTE_BEFORE_SIGNAL,
	PASTE_AFTER_SIGNAL,
	CUT_SIGNAL,
	LAST_SIGNAL
};

static guint object_signals[LAST_SIGNAL] = {0};

/* pointer to the class of our parent */
static GtkTreeViewClass *parent_class = NULL;

/* Short form macros */
#define self_new gmpc_mpddata_treeview_new
#define self_do_init gmpc_mpddata_treeview_do_init
#define self_save_column_setup gmpc_mpddata_treeview_save_column_setup
#define self_highlight_row gmpc_mpddata_treeview_highlight_row
#define self_column_width gmpc_mpddata_treeview_column_width
#define self_add_column gmpc_mpddata_treeview_add_column
#define self_edit_columns gmpc_mpddata_treeview_edit_columns
#define self_query_tooltip gmpc_mpddata_treeview_query_tooltip
#define self_tooltip_expose_event gmpc_mpddata_treeview_tooltip_expose_event
#define self_enable_tooltip gmpc_mpddata_treeview_enable_tooltip
#define self_click_fix gmpc_mpddata_treeview_click_fix
#define self_click_released gmpc_mpddata_treeview_click_released
#define self_enable_click_fix gmpc_mpddata_treeview_enable_click_fix
#define self_paste_before gmpc_mpddata_treeview_paste_before
#define self_paste_after gmpc_mpddata_treeview_paste_after
#define self_cut gmpc_mpddata_treeview_cut
#define self_paste_key_release_event gmpc_mpddata_treeview_paste_key_release_event
#define self_paste_cut_songs gmpc_mpddata_treeview_paste_cut_songs
#define self_paste_paste_after_songs gmpc_mpddata_treeview_paste_paste_after_songs
#define self_paste_paste_before_songs gmpc_mpddata_treeview_paste_paste_before_songs
#define self_paste_copy_songs gmpc_mpddata_treeview_paste_copy_songs
#define self_right_mouse_intergration gmpc_mpddata_treeview_right_mouse_intergration
#define self_cleanup gmpc_mpddata_treeview_cleanup
GType
gmpc_mpddata_treeview_get_type (void)
{
	static GType type = 0;

	if ___GOB_UNLIKELY(type == 0) {
		static const GTypeInfo info = {
			sizeof (GmpcMpdDataTreeviewClass),
			(GBaseInitFunc) NULL,
			(GBaseFinalizeFunc) NULL,
			(GClassInitFunc) gmpc_mpddata_treeview_class_init,
			(GClassFinalizeFunc) NULL,
			NULL /* class_data */,
			sizeof (GmpcMpdDataTreeview),
			0 /* n_preallocs */,
			(GInstanceInitFunc) gmpc_mpddata_treeview_init,
			NULL
		};

		type = g_type_register_static (GTK_TYPE_TREE_VIEW, "GmpcMpdDataTreeview", &info, (GTypeFlags)0);
	}

	return type;
}

/* a macro for creating a new object of our type */
#define GET_NEW ((GmpcMpdDataTreeview *)g_object_new(gmpc_mpddata_treeview_get_type(), NULL))

/* a function for creating a new object of our type */
#include <stdarg.h>
static GmpcMpdDataTreeview * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
static GmpcMpdDataTreeview *
GET_NEW_VARG (const char *first, ...)
{
	GmpcMpdDataTreeview *ret;
	va_list ap;
	va_start (ap, first);
	ret = (GmpcMpdDataTreeview *)g_object_new_valist (gmpc_mpddata_treeview_get_type (), first, ap);
	va_end (ap);
	return ret;
}


static void
___dispose (GObject *obj_self)
{
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::dispose"
#line 289 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	___4_gmpc_mpddata_treeview_dispose(obj_self);
#line 321 "gmpc-mpddata-treeview.c"
}
#undef __GOB_FUNCTION__


static void
___finalize(GObject *obj_self)
{
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::finalize"
	GmpcMpdDataTreeview *self G_GNUC_UNUSED = GMPC_MPDDATA_TREEVIEW (obj_self);
	gpointer priv G_GNUC_UNUSED = self->_priv;
#line 149 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	if(self->_priv->name) { g_free ((gpointer) self->_priv->name); self->_priv->name = NULL; }
#line 334 "gmpc-mpddata-treeview.c"
#line 393 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	___9_gmpc_mpddata_treeview_finalize(obj_self);
#line 337 "gmpc-mpddata-treeview.c"
}
#undef __GOB_FUNCTION__

static void 
gmpc_mpddata_treeview_init (GmpcMpdDataTreeview * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::init"
	o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,GMPC_TYPE_MPDDATA_TREEVIEW,GmpcMpdDataTreeviewPrivate);
#line 149 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->name = NULL;
#line 348 "gmpc-mpddata-treeview.c"
#line 150 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->do_sort = TRUE;
#line 351 "gmpc-mpddata-treeview.c"
#line 153 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tooltip_window = NULL;
#line 354 "gmpc-mpddata-treeview.c"
#line 154 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tw_image = NULL;
#line 357 "gmpc-mpddata-treeview.c"
#line 155 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tw_title = NULL;
#line 360 "gmpc-mpddata-treeview.c"
#line 156 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tw_artist = NULL;
#line 363 "gmpc-mpddata-treeview.c"
#line 157 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tw_album = NULL;
#line 366 "gmpc-mpddata-treeview.c"
#line 158 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tw_genre = NULL;
#line 369 "gmpc-mpddata-treeview.c"
#line 159 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tw_date = NULL;
#line 372 "gmpc-mpddata-treeview.c"
#line 160 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->tw_length = NULL;
#line 375 "gmpc-mpddata-treeview.c"
#line 160 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->file = NULL;
#line 378 "gmpc-mpddata-treeview.c"
#line 160 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	o->_priv->pressed = FALSE;
#line 381 "gmpc-mpddata-treeview.c"
}
#undef __GOB_FUNCTION__
static void 
gmpc_mpddata_treeview_class_init (GmpcMpdDataTreeviewClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::class_init"
	GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;

	g_type_class_add_private(c,sizeof(GmpcMpdDataTreeviewPrivate));

	parent_class = g_type_class_ref (GTK_TYPE_TREE_VIEW);

	object_signals[PASTE_BEFORE_SIGNAL] =
		g_signal_new ("paste_before",
			G_TYPE_FROM_CLASS (g_object_class),
			(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
			G_STRUCT_OFFSET (GmpcMpdDataTreeviewClass, paste_before),
			NULL, NULL,
			___marshal_Sig1,
			G_TYPE_NONE, 1,
			G_TYPE_POINTER);
	if ___GOB_UNLIKELY(sizeof(GList * ) != sizeof(gpointer ) || parent_class == NULL /* avoid warning */) {
		g_error("/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob line 772: Type mismatch of \"paste_before\" signal signature");
	}
	object_signals[PASTE_AFTER_SIGNAL] =
		g_signal_new ("paste_after",
			G_TYPE_FROM_CLASS (g_object_class),
			(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
			G_STRUCT_OFFSET (GmpcMpdDataTreeviewClass, paste_after),
			NULL, NULL,
			___marshal_Sig1,
			G_TYPE_NONE, 1,
			G_TYPE_POINTER);
	if ___GOB_UNLIKELY(sizeof(const GList * ) != sizeof(gpointer ) || parent_class == NULL /* avoid warning */) {
		g_error("/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob line 778: Type mismatch of \"paste_after\" signal signature");
	}
	object_signals[CUT_SIGNAL] =
		g_signal_new ("cut",
			G_TYPE_FROM_CLASS (g_object_class),
			(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
			G_STRUCT_OFFSET (GmpcMpdDataTreeviewClass, cut),
			NULL, NULL,
			g_cclosure_marshal_VOID__VOID,
			G_TYPE_NONE, 0);

#line 289 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_object_class->dispose = ___dispose;
#line 393 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_object_class->finalize = ___finalize;
#line 431 "gmpc-mpddata-treeview.c"
	c->paste_before = NULL;
	c->paste_after = NULL;
	c->cut = NULL;
}
#undef __GOB_FUNCTION__



#line 170 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
GtkWidget * 
gmpc_mpddata_treeview_new (const char * name, gboolean sort, GtkTreeModel * model)
{
#line 444 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::new"
#line 170 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (name != NULL, (GtkWidget * )0);
#line 170 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (!(model) || GTK_IS_TREE_MODEL (model), (GtkWidget * )0);
#line 170 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (model != NULL, (GtkWidget * )0);
#line 452 "gmpc-mpddata-treeview.c"
{
#line 172 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			Self *self = GET_NEW;
			self->_priv->name = g_strdup(name);
			self->_priv->do_sort = sort;

			gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(self), TRUE);
			gtk_tree_view_set_model(GTK_TREE_VIEW(self), model);
			/* init the tree */
			self_do_init(self);
			/* set tooltip */
			self_enable_tooltip(self);
			g_signal_connect(G_OBJECT(self), "key-release-event", G_CALLBACK(self_paste_key_release_event), NULL);



			gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(self), GDK_BUTTON1_MASK, gmt_targetentries, 1, GDK_ACTION_COPY);
			return (GtkWidget *)self;
		}}
#line 473 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 190 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_do_init (GmpcMpdDataTreeview * self)
{
#line 480 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::do_init"
#line 190 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 190 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 486 "gmpc-mpddata-treeview.c"
{
#line 192 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			int i=0;
			gchar *conf_size,*conf_opt = g_strdup_printf("%s-colpos", self->_priv->name);
			GtkTreeViewColumn *col = NULL;
			for(i = 0;i< NUM_COLS;i++)
			{ 
				int conf_pos = cfg_get_single_value_as_int_with_default(config, conf_opt,col_names[i], col_position[i]); 
				col = self_add_column(self,col_names[i],col_ids[i],conf_pos);
				g_object_set_data(G_OBJECT(col), "id",GINT_TO_POINTER(i));	
			}
			q_free(conf_opt);
			conf_opt = g_strdup_printf("%s-colshow", self->_priv->name);
			conf_size = g_strdup_printf("%s-colsize", self->_priv->name);
			for(i = 0;i< NUM_COLS;i++)
			{ 
				int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(self->_priv->columns[i]), "id"));
				int col_size= cfg_get_single_value_as_int_with_default(config, conf_size,col_names[id], 200); 
				int col_show= cfg_get_single_value_as_int_with_default(config, conf_opt,col_names[id], col_enabled[id]); 
				gtk_tree_view_column_set_visible(self->_priv->columns[i],col_show);
				gtk_tree_view_append_column(GTK_TREE_VIEW(self), self->_priv->columns[i]);
				/* don't set the icon column */
				if(col_ids[id]!= MPDDATA_MODEL_COL_ICON_ID)
					gtk_tree_view_column_set_fixed_width(self->_priv->columns[i], col_size);

				g_signal_connect_swapped(G_OBJECT(self->_priv->columns[i]), "notify::width", G_CALLBACK(self_column_width), self);
			}
			/* set the last column small, to stop weird grows */
			//for(i=NUM_COLS-1; i>=0 && !gtk_tree_view_column_get_visible(self->_priv->columns[i]);i--);
			//gtk_tree_view_column_set_fixed_width(self->_priv->columns[i], 150);

			q_free(conf_opt);
			q_free(conf_size);

			/* */
			gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(self)), GTK_SELECTION_MULTIPLE);
			gtk_tree_view_set_fixed_height_mode(GTK_TREE_VIEW(self), TRUE);
			gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(self), TRUE);

			if(self->_priv->do_sort)
			{
				int sort_col = cfg_get_single_value_as_int_with_default(config, self->_priv->name, "sort-column",MPDDATA_MODEL_COL_SONG_TITLE);
				int sort_order = cfg_get_single_value_as_int_with_default(config, self->_priv->name, "sort-order", GTK_SORT_ASCENDING);
				if(((sort_col < MPDDATA_MODEL_N_COLUMNS && sort_col >= 0) || sort_col == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID )&& (sort_order == GTK_SORT_ASCENDING || sort_order == GTK_SORT_DESCENDING)) {
					gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(gtk_tree_view_get_model(GTK_TREE_VIEW(self))),sort_col, sort_order); 
				}
			}
		}}
#line 536 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 243 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_save_column_setup (GmpcMpdDataTreeview * self)
{
#line 543 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::save_column_setup"
#line 243 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 243 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 549 "gmpc-mpddata-treeview.c"
{
#line 246 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			int i=0;
			GList *iter,*cols = gtk_tree_view_get_columns(GTK_TREE_VIEW(self));
			gchar *conf_pos = NULL;
			gchar *conf_show = NULL;

			i = g_list_length(cols);

			if(i != NUM_COLS)
			{
				g_list_free(cols);
				return;
			}
			conf_pos = g_strdup_printf("%s-colpos", self->_priv->name);
			conf_show = g_strdup_printf("%s-colshow", self->_priv->name);
			//            conf_size = g_strdup_printf("%s-colsize", self->_priv->name);
			i=0;
			for(iter = cols; iter; iter = g_list_next(iter))
			{
				GtkTreeViewColumn *column = iter->data;
				int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(column), "id"));
				cfg_set_single_value_as_int(config, conf_pos, col_names[id], i);
				cfg_set_single_value_as_int(config, conf_show, col_names[id], gtk_tree_view_column_get_visible(column));
				/* only save width on > 0 columns */
				//if(gtk_tree_view_column_get_width(column) > 0)
				//    cfg_set_single_value_as_int(config, conf_size, col_names[id], gtk_tree_view_column_get_width(column));
				i++;
			}
			q_free(conf_pos);
			q_free(conf_show);
			//          q_free(conf_size);
			g_list_free(cols);

			if(self->_priv->do_sort)
			{
				int sort_col;
				GtkSortType sort_order;
				gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE(gtk_tree_view_get_model(GTK_TREE_VIEW(self))), &sort_col, &sort_order); 
				cfg_set_single_value_as_int(config, self->_priv->name, "sort-column",sort_col);
				cfg_set_single_value_as_int(config, self->_priv->name, "sort-order", sort_order);
			}
		}}
#line 594 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 289 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
___4_gmpc_mpddata_treeview_dispose (GObject * obj G_GNUC_UNUSED)
#line 600 "gmpc-mpddata-treeview.c"
#define PARENT_HANDLER(___obj) \
	{ if(G_OBJECT_CLASS(parent_class)->dispose) \
		(* G_OBJECT_CLASS(parent_class)->dispose)(___obj); }
{
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::dispose"
{
#line 292 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			Self *self = GMPC_MPDDATA_TREEVIEW(obj);
			self_save_column_setup(self);
			PARENT_HANDLER(obj);
		}}
#line 613 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER

#line 297 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_highlight_row (GtkTreeViewColumn * tree_column, GtkCellRenderer * cell, GtkTreeModel * tree_model, GtkTreeIter * iter, gpointer data)
{
#line 621 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::highlight_row"
{
#line 304 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	

			if(GMPC_IS_MPDDATA_MODEL_PLAYLIST(tree_model) && gmpc_mpddata_model_playlist_is_current_song(tree_model, iter))
				g_object_set(G_OBJECT(cell), "weight", 800,NULL);
			else
				g_object_set(G_OBJECT(cell), "weight", 400,NULL);

		}}
#line 633 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 312 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_column_width (GmpcMpdDataTreeview * self, GParamSpec * argc, GtkTreeViewColumn * column)
{
#line 640 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::column_width"
#line 312 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 312 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 646 "gmpc-mpddata-treeview.c"
{
#line 315 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			if(self->_priv->pressed)
			{
				int width = gtk_tree_view_column_get_width(column);
				int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(column), "id"));
				gchar *conf_size = g_strdup_printf("%s-colsize", self->_priv->name);
				int w = cfg_get_single_value_as_int(config, conf_size, col_names[id]);
				if(w != width)
				{
					cfg_set_single_value_as_int(config, conf_size, col_names[id],width); 
				}
				q_free(conf_size);
			}
		}}
#line 663 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 330 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static GtkTreeViewColumn * 
gmpc_mpddata_treeview_add_column (GmpcMpdDataTreeview * self, const char * columnname, int valuerow, int position)
{
#line 670 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::add_column"
#line 330 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (self != NULL, (GtkTreeViewColumn * )0);
#line 330 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self), (GtkTreeViewColumn * )0);
#line 676 "gmpc-mpddata-treeview.c"
{
#line 333 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			GtkCellRenderer *renderer;
			GtkTreeViewColumn *column = NULL;
			GValue value = {0,};

			if(valuerow == MPDDATA_MODEL_COL_ICON_ID)
			{
				renderer = gtk_cell_renderer_pixbuf_new();
				g_value_init(&value, G_TYPE_FLOAT);
				g_value_set_float(&value, 0.0);
				g_object_set_property(G_OBJECT(renderer), "xalign", &value); 

				column = gtk_tree_view_column_new ();
				gtk_tree_view_column_pack_start (column, renderer, TRUE);
				gtk_tree_view_column_set_attributes (column,renderer,"icon-name", MPDDATA_MODEL_COL_ICON_ID,NULL);

				gtk_tree_view_column_set_resizable(column, FALSE);
				gtk_tree_view_column_set_fixed_width(column, 20);
			}
			else{
				renderer = gtk_cell_renderer_text_new();
				column = gtk_tree_view_column_new_with_attributes (_(columnname), renderer,
						"text", valuerow,NULL);
				g_value_init(&value, G_TYPE_INT);
				g_value_set_int(&value, PANGO_ELLIPSIZE_END);
				g_object_set_property(G_OBJECT(renderer), "ellipsize", &value);	
				gtk_tree_view_column_set_resizable(column, TRUE);
				if(GMPC_IS_MPDDATA_MODEL_PLAYLIST(gtk_tree_view_get_model(GTK_TREE_VIEW(self))))
				{
					g_object_set(G_OBJECT(renderer), "weight-set", TRUE, NULL);
					gtk_tree_view_column_set_cell_data_func (column,renderer,self_highlight_row, NULL, NULL);
				}

			}
			gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_FIXED);
			gtk_tree_view_column_set_reorderable(column, TRUE);

			self->_priv->columns[position] = column;

			if(self->_priv->do_sort)
			{
				gtk_tree_view_column_set_sort_column_id(column,valuerow); 
				gtk_tree_view_column_set_sort_indicator(column, TRUE);
			}

			return column;
		}}
#line 726 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 383 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
void 
gmpc_mpddata_treeview_edit_columns (GmpcMpdDataTreeview * self)
{
#line 733 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::edit_columns"
#line 383 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 383 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 739 "gmpc-mpddata-treeview.c"
{
#line 386 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			GtkWidget *dialog = egg_column_chooser_dialog_new(GTK_TREE_VIEW(self));
			gtk_widget_show_all(dialog);
			gtk_dialog_run(GTK_DIALOG(dialog));
			self_save_column_setup(self);
		}}
#line 748 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 393 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
___9_gmpc_mpddata_treeview_finalize (GObject * obj G_GNUC_UNUSED)
#line 754 "gmpc-mpddata-treeview.c"
#define PARENT_HANDLER(___obj) \
	{ if(G_OBJECT_CLASS(parent_class)->finalize) \
		(* G_OBJECT_CLASS(parent_class)->finalize)(___obj); }
{
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::finalize"
{
#line 396 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			Self *self = SELF(obj);
			GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(obj));
			if(model)
			{
				gtk_tree_view_set_model(GTK_TREE_VIEW(obj),NULL);
				g_object_unref(model);
			}
			if(self->_priv->tooltip_window)
			{
				gtk_widget_destroy(self->_priv->tooltip_window);
				self->_priv->tooltip_window = NULL;
			}
			if(self->_priv->file)
			{
				g_free(self->_priv->file);
				self->_priv->file = NULL;
			}
			PARENT_HANDLER(obj);
		}}
#line 782 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER

#line 420 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean 
gmpc_mpddata_treeview_query_tooltip (GmpcMpdDataTreeview * self, gint x, gint y, gboolean keyboard_tip, GtkTooltip * tooltip, gpointer data)
{
#line 790 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::query_tooltip"
#line 420 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (self != NULL, (gboolean )0);
#line 420 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self), (gboolean )0);
#line 796 "gmpc-mpddata-treeview.c"
{
#line 425 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
		GtkTreeView *treeview = GTK_TREE_VIEW(self);
		GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview));
		GtkTreeIter iter;
		GtkTreePath *path = NULL;
		mpd_Song *song = NULL;
		int show = FALSE;

		if(!cfg_get_single_value_as_int_with_default(config, "GmpcTreeView", "show-tooltip", TRUE))
			return FALSE;
		if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW(treeview), &x, &y,
					keyboard_tip,
					&model, &path, &iter))
			return FALSE;


		gtk_tree_model_get(model, &iter,MPDDATA_MODEL_COL_MPDSONG, &song, -1);
		if(song)
		{
			show = TRUE;
			/* makes it look a bit nicer */
			if(self->_priv->file && song->file && strcmp(self->_priv->file, song->file))
			{
				show = FALSE;
				g_free(self->_priv->file);self->_priv->file = NULL; 
			}
			else if(!(self->_priv->file && song->file && strcmp(self->_priv->file, song->file) == 0))
			{
				gchar *temp;

				gmpc_metaimage_update_cover_from_song(GMPC_METAIMAGE(self->_priv->tw_image), song);
				if(self->_priv->file)
					g_free(self->_priv->file);
				self->_priv->file = NULL;
				if(song->file)
					self->_priv->file = g_strdup(song->file);

				gtk_tree_model_get(model, &iter, MPDDATA_MODEL_COL_SONG_TITLE, &temp, -1);
				gtk_label_set_text(GTK_LABEL(self->_priv->tw_title), temp);
				g_free(temp);

				gtk_tree_model_get(model, &iter, MPDDATA_MODEL_COL_SONG_ARTIST,&temp, -1);
				gtk_label_set_text(GTK_LABEL(self->_priv->tw_artist), temp);
				g_free(temp);

				gtk_tree_model_get(model, &iter, MPDDATA_MODEL_COL_SONG_ALBUM, &temp, -1);
				gtk_label_set_text(GTK_LABEL(self->_priv->tw_album), temp);
				g_free(temp);

				gtk_tree_model_get(model, &iter, MPDDATA_MODEL_COL_SONG_GENRE, &temp, -1);
				gtk_label_set_text(GTK_LABEL(self->_priv->tw_genre), temp);
				g_free(temp);

				gtk_tree_model_get(model, &iter, MPDDATA_MODEL_COL_SONG_DATE, &temp, -1);
				gtk_label_set_text(GTK_LABEL(self->_priv->tw_date), temp);
				g_free(temp);

				gtk_tree_model_get(model, &iter, MPDDATA_MODEL_COL_SONG_LENGTH_FORMAT, &temp, -1);
				gtk_label_set_text(GTK_LABEL(self->_priv->tw_length), temp);
				g_free(temp);



			}
		}
		gtk_tree_path_free(path);
		return show;
	}}
#line 867 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 495 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean 
gmpc_mpddata_treeview_tooltip_expose_event (GtkWidget * widget, GdkEventExpose * event, gpointer data)
{
#line 874 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::tooltip_expose_event"
{
#line 498 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			int stripe_x = 1;
			int stripe_y = 1;
			int stripe_height = widget->allocation.height;// 128+8; 
			GdkColor color;
			GtkStyle *style = gtk_widget_get_style(widget);
			GdkColor *background_color = &style->base[GTK_STATE_NORMAL];
			cairo_t *context;
			cairo_surface_t *surface;
			cairo_t *cr;
			GdkScreen *screen = gtk_window_get_screen(GTK_WINDOW(widget));
#ifdef ENABLE_GRADIENT_LOOK
			cairo_pattern_t *gradient;
			double r, g, b;
			int gradient_y = widget->allocation.height - BOTTOM_GRADIENT_HEIGHT;
#endif


			context = gdk_cairo_create(widget->window);

			cairo_set_operator(context, CAIRO_OPERATOR_SOURCE);
			surface = cairo_surface_create_similar(cairo_get_target(context),
					CAIRO_CONTENT_COLOR_ALPHA,
					widget->allocation.width,
					widget->allocation.height);
			cr = cairo_create(surface);




			if (gdk_screen_is_composited(screen))
			{
				cairo_set_source_rgba(cr,
						background_color->red   / 65535.0,
						background_color->green / 65535.0,
						background_color->blue  / 65535.0,
						BACKGROUND_OPACITY);
			}
			else
			{
				gdk_cairo_set_source_color(cr, background_color);
			}

			cairo_rectangle(cr, 0, 0,
					widget->allocation.width,
					widget->allocation.height);
			cairo_fill(cr);

#ifdef ENABLE_GRADIENT_LOOK
			/* Add a very subtle gradient to the bottom of the notification */
			gradient = cairo_pattern_create_linear(0, gradient_y, 0,
					widget->allocation.height);
			cairo_pattern_add_color_stop_rgba(gradient, 0, 0, 0, 0, 0);
			cairo_pattern_add_color_stop_rgba(gradient, 1, 0, 0, 0, 0.15);
			cairo_rectangle(cr, 0, gradient_y, widget->allocation.width,
					BOTTOM_GRADIENT_HEIGHT);
			cairo_set_source(cr, gradient);
			cairo_fill(cr);
			cairo_pattern_destroy(gradient);
#endif

			cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0);
			cairo_set_line_width(cr, 1.0);
			cairo_rectangle(cr, 0.5, 0.5,widget->allocation.width - 0.5, widget->allocation.height - 0.5);
			cairo_stroke(cr);


			color = style->bg[GTK_STATE_SELECTED];

			cairo_rectangle(cr, stripe_x, stripe_y, 160, stripe_height);

#ifdef ENABLE_GRADIENT_LOOK
			r = color.red   / 65535.0;
			g = color.green / 65535.0;
			b = color.blue  / 65535.0;

			gradient = cairo_pattern_create_linear(stripe_x, 0, 160, 0);
			cairo_pattern_add_color_stop_rgba(gradient, 0, r, g, b, 1);
			cairo_pattern_add_color_stop_rgba(gradient, 1, r, g, b, 0);
			cairo_set_source(cr, gradient);
			cairo_fill(cr);
			cairo_pattern_destroy(gradient);
#else
			gdk_cairo_set_source_color(cr, &color);
			cairo_fill(cr);
#endif

			cairo_destroy(cr);
			cairo_set_source_surface(context, surface, 0, 0);
			cairo_paint(context);
			cairo_surface_destroy(surface);
			cairo_destroy(context);

			return FALSE;//GTK_WIDGET_CLASS(parent_class)->expose_event(widget, event);
		}}
#line 973 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 594 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_enable_tooltip (GmpcMpdDataTreeview * self)
{
#line 980 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::enable_tooltip"
#line 594 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 594 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 986 "gmpc-mpddata-treeview.c"
{
#line 595 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
		gchar *markup = NULL;
		GdkScreen *screen;
		GdkColormap *colormap;
		GtkWidget *treeview = GTK_WIDGET(self);
		GtkWidget *table = gtk_table_new(6,2, FALSE);
		GtkWidget *vbox = gtk_hbox_new(FALSE, 0);
		GtkWidget *label,*ali;
		GtkSizeGroup *group  = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
		self->_priv->tooltip_window = gtk_window_new(GTK_WINDOW_POPUP);
		screen = gtk_window_get_screen(GTK_WINDOW(self->_priv->tooltip_window));
		colormap = gdk_screen_get_rgba_colormap(screen);

		if (colormap != NULL && gdk_screen_is_composited(screen))
		{
			gtk_widget_set_colormap(self->_priv->tooltip_window, colormap);
		}


		gtk_widget_set_size_request(GTK_WIDGET(self->_priv->tooltip_window), 3*128,-1);

		gtk_widget_set_app_paintable(self->_priv->tooltip_window, TRUE);
		g_signal_connect(G_OBJECT(self->_priv->tooltip_window), "expose-event", G_CALLBACK(self_tooltip_expose_event), self);

		gtk_container_add(GTK_CONTAINER(self->_priv->tooltip_window), vbox);
		self->_priv->tw_image = gmpc_metaimage_new(META_ALBUM_ART);

		ali = gtk_alignment_new(0.0f, 0.0f, 0.0f, 0.0f);
		gtk_alignment_set_padding(GTK_ALIGNMENT(ali), 4,4,4,4);
		gtk_container_add(GTK_CONTAINER(ali), self->_priv->tw_image);
		gmpc_metaimage_set_size(GMPC_METAIMAGE(self->_priv->tw_image), 128);

		gtk_box_pack_start(GTK_BOX(vbox), ali, FALSE, FALSE, 0);

		gtk_table_set_row_spacings(GTK_TABLE(table), 6);
		gtk_table_set_col_spacings(GTK_TABLE(table), 6);
		/* set layout up */
		gtk_container_set_border_width(GTK_CONTAINER(vbox),1);
		gtk_container_set_border_width(GTK_CONTAINER(table), 6);

		label = gtk_label_new("");
		gtk_size_group_add_widget(group, label);
		markup = g_markup_printf_escaped("<b>%s:</b>", _("Title"));
		gtk_label_set_markup(GTK_LABEL(label), markup);
		g_free(markup);
		gtk_misc_set_alignment(GTK_MISC(label), 1.0,0.5);
		gtk_table_attach(GTK_TABLE(table), label, 0,1,0,1,GTK_FILL, GTK_FILL,0,0);
		self->_priv->tw_title = gtk_label_new("n/a");
		gtk_misc_set_alignment(GTK_MISC(self->_priv->tw_title), 0.0,0.5);
		gtk_label_set_ellipsize(GTK_LABEL(self->_priv->tw_title), PANGO_ELLIPSIZE_END);
		gtk_table_attach(GTK_TABLE(table), self->_priv->tw_title, 1,2,0,1,GTK_EXPAND|GTK_FILL, GTK_FILL,0,0);


		label = gtk_label_new("");
		gtk_size_group_add_widget(group, label);
		markup = g_markup_printf_escaped("<b>%s:</b>", _("Artist"));
		gtk_label_set_markup(GTK_LABEL(label),markup);
		g_free(markup);
		gtk_misc_set_alignment(GTK_MISC(label), 1.0,0.5);
		gtk_table_attach(GTK_TABLE(table), label, 0,1,1,2,GTK_FILL, GTK_FILL,0,0);
		self->_priv->tw_artist = gtk_label_new("n/a");
		gtk_misc_set_alignment(GTK_MISC(self->_priv->tw_artist), 0.0,0.5);
		gtk_label_set_ellipsize(GTK_LABEL(self->_priv->tw_artist),PANGO_ELLIPSIZE_END);
		gtk_table_attach(GTK_TABLE(table), self->_priv->tw_artist, 1,2,1,2,GTK_EXPAND|GTK_FILL, GTK_FILL,0,0);



		label = gtk_label_new("");
		gtk_size_group_add_widget(group, label);
		markup = g_markup_printf_escaped("<b>%s:</b>", _("Album"));
		gtk_label_set_markup(GTK_LABEL(label),markup);
		g_free(markup);
		gtk_misc_set_alignment(GTK_MISC(label), 1.0,0.5);
		gtk_table_attach(GTK_TABLE(table), label, 0,1,2,3,GTK_FILL, GTK_FILL,0,0);
		self->_priv->tw_album = gtk_label_new("n/a");
		gtk_misc_set_alignment(GTK_MISC(self->_priv->tw_album), 0.0,0.5);
		gtk_label_set_ellipsize(GTK_LABEL(self->_priv->tw_album),PANGO_ELLIPSIZE_END);
		gtk_table_attach(GTK_TABLE(table), self->_priv->tw_album, 1,2,2,3,GTK_EXPAND|GTK_FILL, GTK_FILL,0,0);

		label = gtk_label_new("");
		gtk_size_group_add_widget(group, label);
		markup = g_markup_printf_escaped("<b>%s:</b>", _("Genre"));
		gtk_label_set_markup(GTK_LABEL(label), markup);
		g_free(markup);
		gtk_misc_set_alignment(GTK_MISC(label), 1.0,0.5);
		gtk_table_attach(GTK_TABLE(table), label, 0,1,3,4,GTK_FILL, GTK_FILL,0,0);
		self->_priv->tw_genre = gtk_label_new("n/a"); 
		gtk_misc_set_alignment(GTK_MISC(self->_priv->tw_genre), 0.0,0.5);
		gtk_label_set_ellipsize(GTK_LABEL(self->_priv->tw_genre),PANGO_ELLIPSIZE_END);
		gtk_table_attach(GTK_TABLE(table), self->_priv->tw_genre, 1,2,3,4,GTK_EXPAND|GTK_FILL, GTK_FILL,0,0);

		label = gtk_label_new("");
		gtk_size_group_add_widget(group, label);
		markup = g_markup_printf_escaped("<b>%s:</b>", _("Date"));
		gtk_label_set_markup(GTK_LABEL(label), markup);
		g_free(markup);
		gtk_misc_set_alignment(GTK_MISC(label), 1.0,0.5);
		gtk_table_attach(GTK_TABLE(table), label, 0,1,4,5,GTK_FILL, GTK_FILL,0,0);
		self->_priv->tw_date = gtk_label_new("n/a"); 
		gtk_misc_set_alignment(GTK_MISC(self->_priv->tw_date), 0.0,0.5);
		gtk_label_set_ellipsize(GTK_LABEL(self->_priv->tw_date),PANGO_ELLIPSIZE_END);
		gtk_table_attach(GTK_TABLE(table), self->_priv->tw_date, 1,2,4,5,GTK_EXPAND|GTK_FILL, GTK_FILL,0,0);

		label = gtk_label_new("");
		gtk_size_group_add_widget(group, label);
		markup = g_markup_printf_escaped("<b>%s:</b>", _("Duration"));
		gtk_label_set_markup(GTK_LABEL(label), markup);
		g_free(markup);
		gtk_misc_set_alignment(GTK_MISC(label), 1.0,0.5);
		gtk_table_attach(GTK_TABLE(table), label, 0,1,5,6,GTK_FILL, GTK_FILL,0,0);
		self->_priv->tw_length = gtk_label_new("n/a"); 
		gtk_misc_set_alignment(GTK_MISC(self->_priv->tw_length), 0.0,0.5);
		gtk_label_set_ellipsize(GTK_LABEL(self->_priv->tw_length),PANGO_ELLIPSIZE_END);
		gtk_table_attach(GTK_TABLE(table), self->_priv->tw_length, 1,2,5,6,GTK_EXPAND|GTK_FILL, GTK_FILL,0,0);




		g_object_unref(group);

		gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0);



		g_signal_connect(G_OBJECT(treeview), 
				"query-tooltip",
				G_CALLBACK(self_query_tooltip),
				NULL); 
		gtk_widget_set_tooltip_window(treeview, GTK_WINDOW(self->_priv->tooltip_window));
		gtk_widget_show_all(vbox);
	}}
#line 1120 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 734 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean 
gmpc_mpddata_treeview_click_fix (GmpcMpdDataTreeview * self, GdkEventButton * event)
{
#line 1127 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::click_fix"
#line 734 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (self != NULL, (gboolean )0);
#line 734 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self), (gboolean )0);
#line 1133 "gmpc-mpddata-treeview.c"
{
#line 736 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			GtkTreePath *path = NULL;
			self->_priv->pressed = TRUE;
			if(event->button == 3 && event->window != NULL && gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(self), event->x, event->y,&path,NULL,NULL,NULL))
			{	
				GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
				if(gtk_tree_selection_path_is_selected(sel, path))
				{
					gtk_tree_path_free(path);
					return TRUE;

				}
			}
			if(path) {
				gtk_tree_path_free(path);
			}
			return FALSE;
		}}
#line 1154 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 755 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static gboolean 
gmpc_mpddata_treeview_click_released (GmpcMpdDataTreeview * self, GdkEventButton * event)
{
#line 1161 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::click_released"
#line 755 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (self != NULL, (gboolean )0);
#line 755 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self), (gboolean )0);
#line 1167 "gmpc-mpddata-treeview.c"
{
#line 757 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			self->_priv->pressed = FALSE;
			return FALSE;
		}}
#line 1174 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 761 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
void 
gmpc_mpddata_treeview_enable_click_fix (GmpcMpdDataTreeview * self)
{
#line 1181 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::enable_click_fix"
#line 761 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 761 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1187 "gmpc-mpddata-treeview.c"
{
#line 764 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			g_signal_connect(G_OBJECT(self), "button-press-event", G_CALLBACK(self_click_fix), NULL);

			g_signal_connect(G_OBJECT(self), "button-release-event", G_CALLBACK(self_click_released), NULL);
		}}
#line 1195 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 772 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
void 
gmpc_mpddata_treeview_paste_before (GmpcMpdDataTreeview * self, GList * items)
{
#line 1202 "gmpc-mpddata-treeview.c"
	GValue ___param_values[2];
	GValue ___return_val;

memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));

#line 772 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 772 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1213 "gmpc-mpddata-treeview.c"

	___param_values[0].g_type = 0;
	g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
	g_value_set_instance (&___param_values[0], (gpointer) self);

	___param_values[1].g_type = 0;
	g_value_init (&___param_values[1], G_TYPE_POINTER);
	g_value_set_pointer (&___param_values[1], (gpointer ) items);

	g_signal_emitv (___param_values,
		object_signals[PASTE_BEFORE_SIGNAL],
		0 /* detail */,
		&___return_val);

	g_value_unset (&___param_values[0]);
	g_value_unset (&___param_values[1]);
}

#line 778 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
void 
gmpc_mpddata_treeview_paste_after (GmpcMpdDataTreeview * self, const GList * items)
{
#line 1236 "gmpc-mpddata-treeview.c"
	GValue ___param_values[2];
	GValue ___return_val;

memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));

#line 778 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 778 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1247 "gmpc-mpddata-treeview.c"

	___param_values[0].g_type = 0;
	g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
	g_value_set_instance (&___param_values[0], (gpointer) self);

	___param_values[1].g_type = 0;
	g_value_init (&___param_values[1], G_TYPE_POINTER);
	g_value_set_pointer (&___param_values[1], (gpointer ) items);

	g_signal_emitv (___param_values,
		object_signals[PASTE_AFTER_SIGNAL],
		0 /* detail */,
		&___return_val);

	g_value_unset (&___param_values[0]);
	g_value_unset (&___param_values[1]);
}

#line 783 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
void 
gmpc_mpddata_treeview_cut (GmpcMpdDataTreeview * self)
{
#line 1270 "gmpc-mpddata-treeview.c"
	GValue ___param_values[1];
	GValue ___return_val;

memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));

#line 783 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 783 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1281 "gmpc-mpddata-treeview.c"

	___param_values[0].g_type = 0;
	g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
	g_value_set_instance (&___param_values[0], (gpointer) self);

	g_signal_emitv (___param_values,
		object_signals[CUT_SIGNAL],
		0 /* detail */,
		&___return_val);

	g_value_unset (&___param_values[0]);
}

#line 789 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static int 
gmpc_mpddata_treeview_paste_key_release_event (GmpcMpdDataTreeview * self, GdkEventKey * event, gpointer data)
{
#line 1299 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::paste_key_release_event"
#line 789 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (self != NULL, (int )0);
#line 789 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self), (int )0);
#line 1305 "gmpc-mpddata-treeview.c"
{
#line 792 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			if(event->keyval == GDK_Menu) {
				GdkEventButton bevent;
				gboolean value = FALSE;
				bevent.window = NULL;
				bevent.button = 3;
				bevent.time = event->time;
				g_signal_emit_by_name(self, "button-press-event", &bevent, &value,NULL);
				if(!value){ 
					g_signal_emit_by_name(self, "button-release-event", &bevent, &value,NULL);
					}

				return TRUE;
			}
			if (event->keyval == GDK_c && event->state&GDK_CONTROL_MASK)
			{
				self_paste_copy_songs(self, NULL);
				return TRUE;
			}
			if(paste_queue )
			{
				if(g_signal_has_handler_pending(G_OBJECT(self), object_signals[PASTE_BEFORE_SIGNAL], 0, TRUE))
				{
					if (event->keyval == GDK_b && event->state&GDK_CONTROL_MASK)
					{
						self_paste_paste_before_songs(self, NULL);
						return TRUE;

					}
				}

				if(g_signal_has_handler_pending(G_OBJECT(self), object_signals[PASTE_AFTER_SIGNAL], 0, TRUE))
				{
					if (event->keyval == GDK_v && event->state&GDK_CONTROL_MASK)
					{
						self_paste_paste_after_songs(self, NULL);
						return TRUE;
					}
				}
			}

			if (gtk_tree_selection_count_selected_rows (gtk_tree_view_get_selection(GTK_TREE_VIEW(self))) > 0)
			{
				if(g_signal_has_handler_pending(G_OBJECT(self), object_signals[CUT_SIGNAL], 0, TRUE))
				{
					if (event->keyval == GDK_x && event->state&GDK_CONTROL_MASK)
					{
						self_paste_cut_songs(self, NULL);
						return TRUE;
					}
				}
			}
			return FALSE;
		}}
#line 1362 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 846 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_paste_cut_songs (GmpcMpdDataTreeview * self, GtkMenuItem * item)
{
#line 1369 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::paste_cut_songs"
#line 846 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 846 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1375 "gmpc-mpddata-treeview.c"
{
#line 849 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			self_paste_copy_songs(self, item);
			self_cut(self);
		}}
#line 1382 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 853 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_paste_paste_after_songs (GmpcMpdDataTreeview * self, GtkMenuItem * menuitem)
{
#line 1389 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::paste_paste_after_songs"
#line 853 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 853 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1395 "gmpc-mpddata-treeview.c"
{
#line 856 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			self_paste_after(self, g_list_first(paste_queue));
			/* free old entries 
			   g_list_foreach(paste_queue, (GFunc)g_free, NULL);
			   g_list_free(paste_queue);
			   paste_queue = NULL;
			 */
		}}
#line 1406 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 865 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_paste_paste_before_songs (GmpcMpdDataTreeview * self, GtkMenuItem * menuitem)
{
#line 1413 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::paste_paste_before_songs"
#line 865 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 865 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1419 "gmpc-mpddata-treeview.c"
{
#line 868 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			self_paste_before(self, g_list_first(paste_queue));
			/* free old entries  
			   g_list_foreach(paste_queue, (GFunc)g_free, NULL);
			   g_list_free(paste_queue);
			   paste_queue = NULL;
			 */
		}}
#line 1430 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 877 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
static void 
gmpc_mpddata_treeview_paste_copy_songs (GmpcMpdDataTreeview * self, GtkMenuItem * menitem)
{
#line 1437 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::paste_copy_songs"
#line 877 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (self != NULL);
#line 877 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self));
#line 1443 "gmpc-mpddata-treeview.c"
{
#line 880 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(self));
			/* free old entries */
			g_list_foreach(paste_queue, (GFunc)g_free, NULL);
			g_list_free(paste_queue);
			paste_queue = NULL;
			/* check if where connected */
			/* see if there is a row selected */
			if (gtk_tree_selection_count_selected_rows (selection) > 0)
			{
				GList *list = NULL, *llist = NULL;
				GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
				/* start a command list */
				/* grab the selected songs */
				list = gtk_tree_selection_get_selected_rows (selection, &model);
				/* grab the last song that is selected */
				llist = g_list_last (list);
				/* remove every selected song one by one */
				do{
					GtkTreeIter iter;
					gtk_tree_model_get_iter (model, &iter,(GtkTreePath *) llist->data);
					/* Trick that avoids roundtrip to mpd */
					{
						char *path = NULL;
						int type = 0;
						/* this one allready has the pos. */
						gtk_tree_model_get (model, &iter, 
								MPDDATA_MODEL_ROW_TYPE,&type, 
								MPDDATA_MODEL_COL_PATH, &path, 
								-1);			
						g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Copying song, into queue: %s\n", path);
						if(type == MPD_DATA_TYPE_SONG) {
							paste_queue = g_list_prepend(paste_queue, path);
						} else if (type == MPD_DATA_TYPE_DIRECTORY) {
							MpdData *data = mpd_database_get_directory_recursive(connection, path);
							for(;data; data= mpd_data_get_next(data)){
								if(data->type == MPD_DATA_TYPE_SONG) {
									paste_queue = g_list_prepend(paste_queue, g_strdup(data->song->file));
								}
							}
							g_free(path);
						} else if (type == MPD_DATA_TYPE_PLAYLIST) {
							MpdData *data = mpd_database_get_playlist_content(connection, path);
							for(;data; data= mpd_data_get_next(data)){
								if(data->type == MPD_DATA_TYPE_SONG) {
									paste_queue = g_list_prepend(paste_queue, g_strdup(data->song->file));
								}
							}
							g_free(path);
						}
					} 
				} while ((llist = g_list_previous (llist)));
				/* free list */
				g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
				g_list_free (list);
			}
			paste_queue = g_list_reverse(paste_queue);
		}}
#line 1504 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 939 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
int 
gmpc_mpddata_treeview_right_mouse_intergration (GmpcMpdDataTreeview * self, GtkMenu * menu)
{
#line 1511 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::right_mouse_intergration"
#line 939 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (self != NULL, (int )0);
#line 939 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	g_return_val_if_fail (GMPC_IS_MPDDATA_TREEVIEW (self), (int )0);
#line 1517 "gmpc-mpddata-treeview.c"
{
#line 942 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			int retv = 0;
			int i;
			GtkWidget *menu_item;
			GtkTreeSelection *selection = NULL;
			GtkWidget *submenu = gtk_menu_new();
			for(i=0; i< num_plugins;i++)
			{
				if(gmpc_plugin_get_enabled(plugins[i]))
				{
					retv += gmpc_plugin_browser_song_list_option_menu(plugins[i],self, GTK_MENU(submenu));
				}
			}
			/* If no submenu item was added, destroy the submenu */
			if(!retv) gtk_widget_destroy(submenu);
			else{
				GList *temp = gtk_container_get_children(GTK_CONTAINER(menu));
				if(temp){
					menu_item = gtk_separator_menu_item_new();
					g_list_free(temp);
					gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
				}
				/* Add a tools menu item with the previously generated menu as submenu */
				menu_item = gtk_menu_item_new_with_label(_("Tools"));
				gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), submenu);
				gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
			}


			/**
			 * Paste integration
			 */
			
			selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
			if(selection && gtk_tree_selection_count_selected_rows(selection))
			{
				GList *temp = gtk_container_get_children(GTK_CONTAINER(menu));
				if(temp){
					menu_item = gtk_separator_menu_item_new();
					g_list_free(temp);
					gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
				}

				menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_COPY, NULL);
				gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
				g_signal_connect_swapped(G_OBJECT(menu_item), "activate", G_CALLBACK(self_paste_copy_songs), self);
				retv++; 
			}
			if(paste_queue )
			{
				if(g_signal_has_handler_pending(G_OBJECT(self), object_signals[PASTE_BEFORE_SIGNAL], 0, TRUE))
				{
					menu_item = gtk_image_menu_item_new_with_label(_("Paste before"));
					gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
							gtk_image_new_from_stock(GTK_STOCK_PASTE, GTK_ICON_SIZE_MENU));
					gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
					g_signal_connect_swapped(G_OBJECT(menu_item), "activate", G_CALLBACK(self_paste_paste_before_songs), self);
					retv++;
				}
				if(g_signal_has_handler_pending(G_OBJECT(self), object_signals[PASTE_AFTER_SIGNAL], 0, TRUE))
				{
					menu_item = gtk_image_menu_item_new_with_label(_("Paste after"));
					gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
							gtk_image_new_from_stock(GTK_STOCK_PASTE, GTK_ICON_SIZE_MENU));
					gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
					g_signal_connect_swapped(G_OBJECT(menu_item), "activate", G_CALLBACK(self_paste_paste_after_songs), self);
					retv++;
				}
			}

			if (gtk_tree_selection_count_selected_rows (gtk_tree_view_get_selection(GTK_TREE_VIEW(self))) > 0)
			{
				if(g_signal_has_handler_pending(G_OBJECT(self), object_signals[CUT_SIGNAL], 0, TRUE))
				{
					menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_CUT,NULL);
					gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
							gtk_image_new_from_stock(GTK_STOCK_PASTE, GTK_ICON_SIZE_MENU));
					gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
					g_signal_connect_swapped(G_OBJECT(menu_item), "activate", G_CALLBACK(self_paste_cut_songs), self);
					retv++;
				}
			}

			{
				GList *temp = gtk_container_get_children(GTK_CONTAINER(menu));
				if(temp){
					menu_item = gtk_separator_menu_item_new();
					gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
					g_list_free(temp);
					retv++;
				}
			}
			/** Edit column */
			menu_item = gtk_image_menu_item_new_with_label(_("Edit Columns"));
			gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), gtk_image_new_from_stock(GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU));
			g_signal_connect_swapped(G_OBJECT(menu_item), "activate", G_CALLBACK(self_edit_columns), self);
			gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
			retv++;

			return retv;
		}}
#line 1621 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__

#line 1044 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
void 
gmpc_mpddata_treeview_cleanup (void)
{
#line 1628 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::cleanup"
{
#line 1047 "/usr/src/extras/gmpc/gmpc-11.8.16-2.x86_64/src/gmpc-11.8.16/src/gmpc-mpddata-treeview.gob"
	
			if(paste_queue)
			{
				g_list_foreach(paste_queue, (GFunc)g_free, NULL);
				g_list_free(paste_queue);
			}
			paste_queue = NULL;
		}}
#line 1640 "gmpc-mpddata-treeview.c"
#undef __GOB_FUNCTION__
