65 GtkWidget *form, *explanation;
77 explanation = gtk_label_new(NULL);
78 gtk_widget_set_margin_bottom(explanation, 4);
79 gtk_widget_set_margin_end(explanation, 4);
80 gtk_widget_set_margin_start(explanation, 4);
81 gtk_widget_set_margin_top(explanation, 4);
82 gtk_label_set_markup(GTK_LABEL(explanation),
83 _(
"Where to display messages?\n"
84 "<b>Out</b>put window ; "
85 "<b>Mes</b>sages window ; "
86 "<b>Pop</b>up individual window"));
87 gtk_widget_set_name(explanation,
"comment_label");
89 gtk_widget_show(explanation);
91 form = gtk_grid_new();
95 models[
n] = gtk_list_store_new(5, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
96 G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_INT);
101 GValue value = { 0, };
105 gtk_list_store_append(
models[
n], &it);
107 g_value_init(&value, G_TYPE_STRING);
109 gtk_list_store_set_value(
models[
n], &it, 3, &value);
110 g_value_unset(&value);
112 gtk_list_store_set(
models[
n], &it, 4, ev, -1);
114 for (j = 0; j <
NUM_MW; j++) {
120 GtkWidget *
view, *sw;
121 GtkCellRenderer *renderer;
122 GtkTreeViewColumn *column;
124 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(
models[
n]));
129 renderer = gtk_cell_renderer_text_new();
130 column = gtk_tree_view_column_new_with_attributes(
_(
"Event"),
131 renderer,
"text", 3, NULL);
132 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), column);
133 gtk_tree_view_column_set_expand(column,
TRUE);
135 renderer = gtk_cell_renderer_toggle_new();
136 g_object_set_data(G_OBJECT(renderer),
"column", GINT_TO_POINTER(0));
139 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(
view),
140 -1,
_(
"Out"), renderer,
143 renderer = gtk_cell_renderer_toggle_new();
144 g_object_set_data(G_OBJECT(renderer),
"column", GINT_TO_POINTER(1));
147 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(
view),
148 -1,
_(
"Mes"), renderer,
151 renderer = gtk_cell_renderer_toggle_new();
152 g_object_set_data(G_OBJECT(renderer),
"column", GINT_TO_POINTER(2));
155 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(
view),
156 -1,
_(
"Pop"), renderer,
159 sw = gtk_scrolled_window_new();
160 gtk_scrolled_window_set_has_frame(GTK_SCROLLED_WINDOW(sw),
TRUE);
161 gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(sw),
view);
163 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
164 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
165 gtk_grid_attach(GTK_GRID(form), sw, form_col++, 0, 1, 1);
210 gchar *spath, gpointer data)
212 GtkTreeModel *model = GTK_TREE_MODEL(data);
218 path = gtk_tree_path_new_from_string(spath);
220 column = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cell),
"column"));
222 gtk_tree_model_get_iter(model, &it, path);
223 gtk_tree_model_get(model, &it, column, &toggle, -1);
225 gtk_list_store_set(GTK_LIST_STORE(model), &it, column, toggle, -1);
227 gtk_tree_path_free(path);