Mercurial > hg > forks > geeqie
comparison src/preferences.c @ 2911:89bdd971db1a
Fix #661, #662: String comparison to translated string causes crash
https://github.com/BestImageViewer/geeqie/issues/661
author | Andreas Rönnquist <> |
---|---|
date | Tue, 26 Feb 2019 10:07:24 +0000 |
parents | 2e7fd08bfbe4 |
children |
comparison
equal
deleted
inserted
replaced
2910:7d15201edf30 | 2911:89bdd971db1a |
---|---|
1047 { | 1047 { |
1048 GtkTreePath *path; | 1048 GtkTreePath *path; |
1049 GList *list_cells; | 1049 GList *list_cells; |
1050 GtkCellRenderer *cell; | 1050 GtkCellRenderer *cell; |
1051 GtkTreeViewColumn *column; | 1051 GtkTreeViewColumn *column; |
1052 GList *list_columns; | |
1053 const gchar *title; | 1052 const gchar *title; |
1054 guint i = 0; | 1053 guint i = 0; |
1055 gint rows; | 1054 gint rows; |
1056 | 1055 |
1057 rows = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(filter_store), NULL); | 1056 rows = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(filter_store), NULL); |
1058 path = gtk_tree_path_new_from_indices(rows-1, -1); | 1057 path = gtk_tree_path_new_from_indices(rows-1, -1); |
1059 | 1058 |
1060 list_columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(data)); | 1059 column = gtk_tree_view_get_column(GTK_TREE_VIEW(data), 0); |
1061 do { | |
1062 column = g_list_nth(list_columns,i)->data; | |
1063 title = gtk_tree_view_column_get_title(GTK_TREE_VIEW_COLUMN(column)); | |
1064 i++; | |
1065 } while (strcmp(title, "Filter") !=0 ); | |
1066 | 1060 |
1067 list_cells = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column)); | 1061 list_cells = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column)); |
1068 cell = g_list_last(list_cells)->data; | 1062 cell = g_list_last(list_cells)->data; |
1069 | 1063 |
1070 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), | 1064 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), |
1072 gtk_tree_view_set_cursor_on_cell(GTK_TREE_VIEW(data), | 1066 gtk_tree_view_set_cursor_on_cell(GTK_TREE_VIEW(data), |
1073 path, column, cell, TRUE); | 1067 path, column, cell, TRUE); |
1074 | 1068 |
1075 gtk_tree_path_free(path); | 1069 gtk_tree_path_free(path); |
1076 g_list_free(list_cells); | 1070 g_list_free(list_cells); |
1077 g_list_free(list_columns); | |
1078 | 1071 |
1079 return(FALSE); | 1072 return(FALSE); |
1080 } | 1073 } |
1081 | 1074 |
1082 static void filter_add_cb(GtkWidget *widget, gpointer data) | 1075 static void filter_add_cb(GtkWidget *widget, gpointer data) |