64 GtkWidget *form, *explanation;
75 explanation = gtk_label_new(NULL);
76 g_object_set(explanation,
"margin", 4, NULL);
77 gtk_label_set_markup(GTK_LABEL(explanation),
78 _(
"Where to display messages?\n"
79 "<b>Out</b>put window ; "
80 "<b>Mes</b>sages window ; "
81 "<b>Pop</b>up individual window"));
82 gtk_widget_set_name(explanation,
"comment_label");
83 gtk_container_add(GTK_CONTAINER(
shell->
vbox), explanation);
84 gtk_widget_show(explanation);
86 form = gtk_grid_new();
87 gtk_container_add(GTK_CONTAINER(
shell->
vbox), form);
90 models[
n] = gtk_list_store_new(5, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
91 G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_INT);
96 GValue value = { 0, };
100 gtk_list_store_append(
models[
n], &it);
102 g_value_init(&value, G_TYPE_STRING);
104 gtk_list_store_set_value(
models[
n], &it, 3, &value);
105 g_value_unset(&value);
107 gtk_list_store_set(
models[
n], &it, 4, ev, -1);
109 for (j = 0; j <
NUM_MW; j++) {
115 GtkWidget *
view, *sw;
116 GtkCellRenderer *renderer;
117 GtkTreeViewColumn *column;
119 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(
models[
n]));
124 renderer = gtk_cell_renderer_text_new();
125 column = gtk_tree_view_column_new_with_attributes(
_(
"Event"),
126 renderer,
"text", 3, NULL);
127 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), column);
128 gtk_tree_view_column_set_expand(column,
TRUE);
130 renderer = gtk_cell_renderer_toggle_new();
131 g_object_set_data(G_OBJECT(renderer),
"column", GINT_TO_POINTER(0));
134 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(
view),
135 -1,
_(
"Out"), renderer,
138 renderer = gtk_cell_renderer_toggle_new();
139 g_object_set_data(G_OBJECT(renderer),
"column", GINT_TO_POINTER(1));
142 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(
view),
143 -1,
_(
"Mes"), renderer,
146 renderer = gtk_cell_renderer_toggle_new();
147 g_object_set_data(G_OBJECT(renderer),
"column", GINT_TO_POINTER(2));
150 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(
view),
151 -1,
_(
"Pop"), renderer,
154 sw = gtk_scrolled_window_new(NULL, NULL);
155 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
156 GTK_SHADOW_ETCHED_IN);
157 gtk_container_add(GTK_CONTAINER(sw),
view);
159 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
160 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
161 gtk_container_add(GTK_CONTAINER(form), sw);
206 gchar *spath, gpointer data)
208 GtkTreeModel *model = GTK_TREE_MODEL(data);
214 path = gtk_tree_path_new_from_string(spath);
216 column = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cell),
"column"));
218 gtk_tree_model_get_iter(model, &it, path);
219 gtk_tree_model_get(model, &it, column, &toggle, -1);
221 gtk_list_store_set(GTK_LIST_STORE(model), &it, column, toggle, -1);
223 gtk_tree_path_free(path);