From: Matthew Fernandez Date: Sat, 24 Sep 2022 01:47:13 +0000 (-0700) Subject: fix: Revert "smyrna: remove unused 'on_attrSearchBtn_clicked'" X-Git-Tag: 6.0.2~28^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39d4f869138d93b2e2632bfb66adf639390fd7e3;p=graphviz fix: Revert "smyrna: remove unused 'on_attrSearchBtn_clicked'" This reverts commit 7e1f01ad52915498a252dd213f85daf5a058aa5d. This function _is_ used (in share/gui/smyrna.glade). It is unclear why 7e1f01ad52915498a252dd213f85daf5a058aa5d claimed it was not. Gitlab: #2279 Reported-by: Gagan Sidhu --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 294d7aaf3..0ff141fe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Smyrna bounding box computation has been corrected. There was a regression in 4.0.0 that resulted in a degenerate bounding box being computed for any input graph. See #2279 for details. -- Smyrna warnings about the `on_attrRB0_clicked` handler being not found have - been fixed and the button to which it is wired should be functional again. - This was a regression in 2.50.0. See #2279 for details. +- Smyrna warnings about the `on_attrRB0_clicked` and `on_attrSearchBtn_clicked` + handlers being not found have been fixed and the buttons to which they are + wired should be functional again. This was a regression in 2.50.0 See #2279 + for details. ## [6.0.1] – 2022-09-11 diff --git a/cmd/smyrna/gui/frmobjectui.c b/cmd/smyrna/gui/frmobjectui.c index a7acf4fdc..f46eb87d0 100644 --- a/cmd/smyrna/gui/frmobjectui.c +++ b/cmd/smyrna/gui/frmobjectui.c @@ -732,3 +732,16 @@ static void gvpr_select(char *attrname, char *regex_str, int objType) { free(argv); set_header_text(); } + +_BB void on_attrSearchBtn_clicked(GtkWidget * widget, gpointer user_data) +{ + + char *attr = + (char *) gtk_entry_get_text((GtkEntry *) + glade_xml_get_widget(xml, "txtAttr")); + char *regex_str = + (char *) gtk_entry_get_text((GtkEntry *) + glade_xml_get_widget(xml, "txtValue")); + gvpr_select(attr, regex_str, get_object_type()); + +} diff --git a/cmd/smyrna/gui/frmobjectui.h b/cmd/smyrna/gui/frmobjectui.h index 68c4e8e32..71b99524e 100644 --- a/cmd/smyrna/gui/frmobjectui.h +++ b/cmd/smyrna/gui/frmobjectui.h @@ -18,6 +18,7 @@ _BB void on_txtAttr_changed(GtkWidget * widget, gpointer user_data); _BB void on_attrApplyBtn_clicked (GtkWidget * widget, gpointer user_data); _BB void on_attrAddBtn_clicked (GtkWidget * widget, gpointer user_data); +_BB void on_attrSearchBtn_clicked (GtkWidget * widget, gpointer user_data); extern attr_list* load_attr_list(Agraph_t* g); extern void showAttrsWidget(topview* t);