From: Alexandru C. <cs...@us...> - 2007-05-30 20:50:52
|
Update of /cvsroot/groundstation/gpredict2/src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv32364 Modified Files: sat-cfg.c sat-pref-list-view.c Log Message: Fixed bug that prevented the rules-hint setting to be disabled (#1728575). Index: sat-cfg.c =================================================================== RCS file: /cvsroot/groundstation/gpredict2/src/sat-cfg.c,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** sat-cfg.c 26 Feb 2007 10:44:30 -0000 1.71 --- sat-cfg.c 30 May 2007 20:50:51 -0000 1.72 *************** *** 298,301 **** --- 298,302 ---- else { + /* create and open a file for writing */ keyfile = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, Index: sat-pref-list-view.c =================================================================== RCS file: /cvsroot/groundstation/gpredict2/src/sat-pref-list-view.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sat-pref-list-view.c 2 Sep 2006 23:22:07 -0000 1.10 --- sat-pref-list-view.c 30 May 2007 20:50:51 -0000 1.11 *************** *** 53,61 **** static guint startflags; static guint flags; static void create_reset_button (GKeyFile *cfg, GtkBox *vbox); static void reset_cb (GtkWidget *button, gpointer cfg); ! static void toggle_cb (GtkToggleButton *toggle, gpointer data); --- 53,63 ---- static guint startflags; static guint flags; + static gboolean rh_flag; static void create_reset_button (GKeyFile *cfg, GtkBox *vbox); static void reset_cb (GtkWidget *button, gpointer cfg); ! static void toggle_cb (GtkToggleButton *toggle, gpointer data); ! static void toggle_rh_cb (GtkToggleButton *toggle, gpointer data); *************** *** 149,152 **** --- 151,162 ---- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ruleshint), sat_cfg_get_bool (SAT_CFG_BOOL_RULES_HINT)); + + /* store original value */ + rh_flag = sat_cfg_get_bool (SAT_CFG_BOOL_RULES_HINT); + + /* connect toggle signal */ + g_signal_connect (G_OBJECT (ruleshint), "toggled", + G_CALLBACK (toggle_rh_cb), NULL); + tips = gtk_tooltips_new (); gtk_tooltips_set_tip (tips, ruleshint, *************** *** 202,205 **** --- 212,216 ---- sat_cfg_set_bool (SAT_CFG_BOOL_RULES_HINT, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ruleshint))); + } } *************** *** 324,325 **** --- 335,346 ---- dirty = (flags != startflags); } + + + static void + toggle_rh_cb (GtkToggleButton *toggle, gpointer data) + { + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ruleshint)) != rh_flag) + dirty = TRUE; + + } |