mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
testaccel: Handle accel-cleared
This commit is contained in:
parent
fe11f8f875
commit
7b950941ce
@ -42,6 +42,20 @@ accel_edited_callback (GtkCellRendererText *cell,
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
static void
|
||||
accel_cleared_callback (GtkCellRendererText *cell,
|
||||
const char *path_string,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
|
||||
path = gtk_tree_path_new_from_string (path_string);
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, 0, 1, 0, 2, 0, -1);
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
static GtkWidget *
|
||||
key_test (void)
|
||||
{
|
||||
@ -71,6 +85,10 @@ key_test (void)
|
||||
"accel-edited",
|
||||
G_CALLBACK (accel_edited_callback),
|
||||
store);
|
||||
g_signal_connect (G_OBJECT (rend),
|
||||
"accel-cleared",
|
||||
G_CALLBACK (accel_cleared_callback),
|
||||
store);
|
||||
|
||||
gtk_tree_view_column_pack_start (column, rend,
|
||||
TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user