45 #define COLUMN_DESCRIPTION 0
46 #define COLUMN_VALUE 1
47 #define GET_OBJECT(object_name) gtk_builder_get_object(string_list->builder, object_name)
52 gint items_count = gtk_tree_model_iter_n_children(
66 GtkTreePath *path = gtk_tree_path_new_from_string(path_string);
87 gtk_tree_path_free(path);
100 gtk_tree_path_free(path);
106 TRACE_CALL(__func__);
108 GtkTreeIter target_iter;
121 TRACE_CALL(__func__);
123 GtkTreeIter target_iter;
130 if (gtk_tree_path_prev(path)) {
132 gtk_tree_path_free(path);
141 TRACE_CALL(__func__);
153 gtk_tree_path_free(path);
160 TRACE_CALL(__func__);
173 TRACE_CALL(__func__);
182 items = g_strsplit(text, STRING_DELIMITOR, -1);
183 for (i = 0; i < g_strv_length(items); i++) {
186 if (g_strv_length(values) > 1) {
189 COLUMN_DESCRIPTION, values[0],
190 COLUMN_VALUE, values[1],
195 COLUMN_VALUE, values[0],
207 TRACE_CALL(__func__);
212 const gchar *item_description;
213 const gchar *item_value;
215 str = g_string_new(NULL);
221 COLUMN_DESCRIPTION, &item_description,
222 COLUMN_VALUE, &item_value,
224 if (!item_description)
225 item_description =
"";
226 if (item_value && strlen(item_value) > 0) {
229 g_string_append(str, STRING_DELIMITOR);
235 g_string_append(str, item_description);
239 g_string_append(str, item_value);
243 return g_string_free(str, FALSE);
249 TRACE_CALL(__func__);
258 (title1 && strlen(title1) > 0) ? title1 :
"");
260 if (title2 && strlen(title2) > 0) {
271 TRACE_CALL(__func__);
282 TRACE_CALL(__func__);
305 if (!fields_separator)
306 fields_separator = STRING_DELIMITOR2;
GtkBuilder * remmina_public_gtk_builder_new_from_resource(gchar *resource)
gchar * remmina_public_str_replace(const gchar *string, const gchar *search, const gchar *replacement)
GtkDialog * remmina_string_list_new(gboolean two_columns, const gchar *fields_separator)
void remmina_string_list_on_action_up(GtkWidget *widget, gpointer user_data)
static void remmina_string_list_init(void)
void remmina_string_list_on_action_remove(GtkWidget *widget, gpointer user_data)
void remmina_string_list_on_action_add(GtkWidget *widget, gpointer user_data)
void remmina_string_list_set_validation_func(RemminaStringListValidationFunc func)
static void remmina_string_list_move_iter(GtkTreeIter *from, GtkTreeIter *to)
static RemminaStringList * string_list
gchar * remmina_string_list_get_text(void)
void remmina_string_list_update_buttons_state(void)
void remmina_string_list_set_titles(gchar *title1, gchar *title2)
void remmina_string_list_set_text(const gchar *text, const gboolean clear_data)
void remmina_string_list_on_action_down(GtkWidget *widget, gpointer user_data)
void remmina_string_list_on_cell_edited(GtkCellRendererText *cell, const gchar *path_string, const gchar *new_text)
gboolean(* RemminaStringListValidationFunc)(const gchar *new_str, gchar **error)
GtkTreeView * treeview_items
GtkTreeViewColumn * treeviewcolumn_item
GtkCellRendererText * cellrenderertext_item1
RemminaStringListPriv * priv
GtkCellRendererText * cellrenderertext_item2
GtkTreeSelection * treeview_selection
GtkListStore * liststore_items
GtkButton * button_remove
RemminaStringListValidationFunc validation_func
const gchar * fields_separator