Added cs to the list of languages
[midnight-commander.git] / gnome / gblist.c
blob4a9e36c2921c0dd84dac3af1d60905855d4e5f07
1 /*
2 * gblist: Implements a GtkCList derived widget that does not take any action
3 * on select and unselect calls.
5 * Author: Miguel de Icaza (miguel@kernel.org)
6 * (C) 1998 the Free Software Foundation.
7 */
8 #include <stdlib.h>
9 #include "config.h"
10 #include "gblist.h"
12 static void
13 blist_select_row (GtkCList *clist, gint row, gint column, GdkEvent *event)
15 /* nothing */
18 static void
19 blist_unselect_row (GtkCList *clist, gint row, gint column, GdkEvent *event)
21 /* nothing */
24 static void
25 gtk_blist_class_init (GtkBListClass *klass)
27 GtkCListClass *clist_class = (GtkCListClass *) klass;
29 clist_class->select_row = blist_select_row;
30 clist_class->unselect_row = blist_unselect_row;
33 GtkType
34 gtk_blist_get_type (void)
36 static GtkType blist_type = 0;
38 if (!blist_type){
39 GtkTypeInfo blist_info =
41 "GtkBList",
42 sizeof (GtkBList),
43 sizeof (GtkBListClass),
44 (GtkClassInitFunc) gtk_blist_class_init,
45 (GtkObjectInitFunc) NULL,
46 (GtkArgSetFunc) NULL,
47 (GtkArgGetFunc) NULL,
50 blist_type = gtk_type_unique (gtk_clist_get_type (), &blist_info);
53 return blist_type;
56 GtkWidget *
57 gtk_blist_new_with_titles (gint columns, gchar * titles[])
59 GtkWidget *widget;
61 g_return_val_if_fail (titles != NULL, NULL);
63 widget = gtk_type_new (gtk_blist_get_type ());
65 gtk_clist_construct (GTK_CLIST (widget), columns, titles);
67 return widget;