From 2aeb72bfcee45672651a9bcf2950785e67b578a6 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sun, 11 Sep 2011 14:54:00 +0200 Subject: [PATCH] Re-ordered all references in the style selector dialog to have one consistent ordering. Everything that refers to the settings in the style selector dialog now does so in order of Line thickness Hole size Hole thickness (hole + annular ring) keepaway region size This wasn't 100% consistent previously, which resulted in a bug (fixed in a previous patch). This patch doesn't touch the functionality, but improves the style to avoid future bugs. Modified to apply on recent route style selector changes by Bert Timmerman. Signed-off-by: Andrew Poelstra (local) Affects-bug: lp-844635 --- src/hid/gtk/ghid-route-style-selector.c | 12 ++++++------ src/hid/gtk/ghid-route-style-selector.h | 4 ++-- src/hid/gtk/gtkhid-main.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/hid/gtk/ghid-route-style-selector.c b/src/hid/gtk/ghid-route-style-selector.c index f67d45c3..6c5e26f4 100644 --- a/src/hid/gtk/ghid-route-style-selector.c +++ b/src/hid/gtk/ghid-route-style-selector.c @@ -127,10 +127,10 @@ dialog_style_changed_cb (GtkComboBox *combo, struct _dialog *dialog) gtk_entry_set_text (GTK_ENTRY (dialog->name_entry), style->rst->Name); ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->line_entry), style->rst->Thick); - ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->via_size_entry), - style->rst->Diameter); ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->via_hole_entry), style->rst->Hole); + ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->via_size_entry), + style->rst->Diameter); ghid_coord_entry_set_value (GHID_COORD_ENTRY (dialog->clearance_entry), style->rst->Keepaway); @@ -575,14 +575,14 @@ ghid_route_style_selector_get_accel_group (GHidRouteStyleSelector *rss) * * \param [in] rss The selector to be acted on * \param [in] Thick Coord to match selection to - * \param [in] Diameter Coord to match selection to * \param [in] Hole Coord to match selection to + * \param [in] Diameter Coord to match selection to * \param [in] Keepaway Coord to match selection to */ void ghid_route_style_selector_sync (GHidRouteStyleSelector *rss, - Coord Thick, Coord Diameter, - Coord Hole, Coord Keepaway) + Coord Thick, Coord Hole, + Coord Diameter, Coord Keepaway) { GtkTreeIter iter; gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rss->model), &iter); @@ -592,8 +592,8 @@ ghid_route_style_selector_sync (GHidRouteStyleSelector *rss, gtk_tree_model_get (GTK_TREE_MODEL (rss->model), &iter, DATA_COL, &style, -1); if (style->rst->Thick == Thick && - style->rst->Diameter == Diameter && style->rst->Hole == Hole && + style->rst->Diameter == Diameter && style->rst->Keepaway == Keepaway) { g_signal_handler_block (G_OBJECT (style->action), style->sig_id); diff --git a/src/hid/gtk/ghid-route-style-selector.h b/src/hid/gtk/ghid-route-style-selector.h index 6e934b95..b357fe0a 100644 --- a/src/hid/gtk/ghid-route-style-selector.h +++ b/src/hid/gtk/ghid-route-style-selector.h @@ -34,8 +34,8 @@ GtkAccelGroup *ghid_route_style_selector_get_accel_group (GHidRouteStyleSelector *rss); void ghid_route_style_selector_sync (GHidRouteStyleSelector *rss, - Coord Thick, Coord Diameter, - Coord Hole, Coord Keepaway); + Coord Thick, Coord Hole, + Coord Diameter, Coord Keepaway); void ghid_route_style_selector_empty (GHidRouteStyleSelector *rss); G_END_DECLS /* keep c++ happy */ diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c index 2cb94be2..1957be6f 100644 --- a/src/hid/gtk/gtkhid-main.c +++ b/src/hid/gtk/gtkhid-main.c @@ -1154,8 +1154,8 @@ RouteStylesChanged (int argc, char **argv, Coord x, Coord y) ghid_route_style_selector_sync (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector), - Settings.LineThickness, Settings.ViaThickness, - Settings.ViaDrillingHole, Settings.Keepaway); + Settings.LineThickness, Settings.ViaDrillingHole, + Settings.ViaThickness, Settings.Keepaway); return 0; } -- 2.11.4.GIT