From dd488c31055150041429eaadcca3871272773456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 25 Oct 2019 20:42:54 +0200 Subject: [PATCH] Further style mprovements --- command-line.c | 3 +-- gds-render-gui.c | 16 +++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/command-line.c b/command-line.c index 4e75ec6..d807ce7 100644 --- a/command-line.c +++ b/command-line.c @@ -224,9 +224,8 @@ int command_line_convert_gds(const char *gds_name, ret_destroy_library_list: clear_lib_list(&libs); ret_clear_renderers: - for (list_iter = renderer_list; list_iter; list_iter = list_iter->next) { + for (list_iter = renderer_list; list_iter; list_iter = list_iter->next) g_object_unref(list_iter->data); - } ret_destroy_layer_mapping: g_object_unref(layer_sett); return ret; diff --git a/gds-render-gui.c b/gds-render-gui.c index 62bcfc5..df1ce38 100644 --- a/gds-render-gui.c +++ b/gds-render-gui.c @@ -215,7 +215,7 @@ static gboolean cell_store_filter_visible_func(GtkTreeModel *model, GtkTreeIter if (!cell) goto exit_filter; - search_string = gtk_entry_get_text(GTK_ENTRY(self->cell_search_entry )); + search_string = gtk_entry_get_text(GTK_ENTRY(self->cell_search_entry)); /* Show all, if field is empty */ if (!strlen(search_string)) @@ -246,7 +246,9 @@ int gds_render_gui_setup_cell_selector(GdsRenderGui *self) G_TYPE_STRING, G_TYPE_STRING); /* Searching */ - self->cell_filter = GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(GTK_TREE_MODEL(self->cell_tree_store), NULL)); + self->cell_filter = GTK_TREE_MODEL_FILTER( + gtk_tree_model_filter_new(GTK_TREE_MODEL(self->cell_tree_store), NULL)); + gtk_tree_model_filter_set_visible_func(self->cell_filter, (GtkTreeModelFilterVisibleFunc)cell_store_filter_visible_func, self, NULL); @@ -273,8 +275,10 @@ int gds_render_gui_setup_cell_selector(GdsRenderGui *self) gtk_tree_view_append_column(self->cell_tree_view, column); /* Callback for selection - * This prevents selecting a library */ - gtk_tree_selection_set_select_function(gtk_tree_view_get_selection(self->cell_tree_view), tree_sel_func, NULL, NULL); + * This prevents selecting a library + */ + gtk_tree_selection_set_select_function(gtk_tree_view_get_selection(self->cell_tree_view), + tree_sel_func, NULL, NULL); return 0; } @@ -450,7 +454,9 @@ static void async_rendering_finished_callback(GdsOutputRenderer *renderer, gpoin g_object_unref(renderer); } -static void async_rendering_status_update_callback(GdsOutputRenderer *renderer, const char *status_message, gpointer data) +static void async_rendering_status_update_callback(GdsOutputRenderer *renderer, + const char *status_message, + gpointer data) { GdsRenderGui *gui; (void)renderer;