Feature #1016 ยป 0062-gtk4x-Implement-bind-create-for-wldlg-worklist-item-.patch
| client/gui-gtk-5.0/wldlg.c | ||
|---|---|---|
|
Wlmeta table cell bind function
|
||
|
**************************************************************************/
|
||
|
static void wlmeta_factory_bind(GtkSignalListItemFactory *self,
|
||
|
GtkListItem *list_item,
|
||
|
gpointer user_data)
|
||
|
GtkListItem *list_item,
|
||
|
gpointer user_data)
|
||
|
{
|
||
|
FcWlmetaRow *row;
|
||
|
GtkWidget *child = gtk_list_item_get_child(list_item);
|
||
| ... | ... | |
|
return TRUE;
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
|
Worklist table cell bind function
|
||
|
**************************************************************************/
|
||
|
static void worklist_factory_bind(GtkSignalListItemFactory *self,
|
||
|
GtkListItem *list_item,
|
||
|
gpointer user_data)
|
||
|
{
|
||
|
FcWorklistRow *row;
|
||
|
GtkWidget *child = gtk_list_item_get_child(list_item);
|
||
|
row = gtk_list_item_get_item(list_item);
|
||
|
gtk_label_set_text(GTK_LABEL(child), row->name);
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
|
Worklist table cell setup function
|
||
|
**************************************************************************/
|
||
|
static void worklist_factory_setup(GtkSignalListItemFactory *self,
|
||
|
GtkListItem *list_item,
|
||
|
gpointer user_data)
|
||
|
{
|
||
|
gtk_list_item_set_child(list_item, gtk_label_new(""));
|
||
|
}
|
||
|
/************************************************************************//**
|
||
|
Worklist editor shell.
|
||
|
****************************************************************************/
|
||
| ... | ... | |
|
GtkWidget *table2, *arrow, *check;
|
||
|
GtkSizeGroup *sgroup;
|
||
|
GtkListStore *src_store, *dst_store;
|
||
|
GtkListItemFactory *factory;
|
||
|
struct worklist_data *ptr;
|
||
|
int editor_row = 0;
|
||
|
GtkEventController *controller;
|
||
| ... | ... | |
|
ptr->dst = dst_store;
|
||
|
ptr->future = FALSE;
|
||
|
factory = gtk_signal_list_item_factory_new();
|
||
|
g_signal_connect(factory, "bind", G_CALLBACK(worklist_factory_bind),
|
||
|
nullptr);
|
||
|
g_signal_connect(factory, "setup", G_CALLBACK(worklist_factory_setup),
|
||
|
nullptr);
|
||
|
/* Create shell. */
|
||
|
editor = gtk_grid_new();
|
||
|
gtk_grid_set_row_spacing(GTK_GRID(editor), 6);
|
||