/[xlog]/xlog/src/callbacks_qsoframe.c
ViewVC logotype

Diff of /xlog/src/callbacks_qsoframe.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pa4tu, Wed Nov 6 21:18:51 2002 UTC revision 1.3 by pa4tu, Thu Nov 7 19:02:22 2002 UTC
# Line 180  void on_mhzbutton_clicked (GtkButton *bu Line 180  void on_mhzbutton_clicked (GtkButton *bu
180          GString *digits = g_string_new("");;          GString *digits = g_string_new("");;
181                                    
182          entry = lookup_widget(mainwindow, "bandentry");          entry = lookup_widget(mainwindow, "bandentry");
183          if (state.rigfrequency != 0)          if (g_strcasecmp(preferences.defaultmhz, "?"))
184                    gtk_entry_set_text(GTK_ENTRY(entry), preferences.defaultmhz);
185            else if (state.rigfrequency != 0)
186          {          {
187                  if (preferences.round == 0)                  if (preferences.round == 0)
188                          g_string_sprintf(digits, "%Ld", state.rigfrequency);                          g_string_sprintf(digits, "%Ld", state.rigfrequency);
# Line 190  void on_mhzbutton_clicked (GtkButton *bu Line 192  void on_mhzbutton_clicked (GtkButton *bu
192                  g_string_insert_c(digits, (digits->len) - 6 + preferences.round, '.');                  g_string_insert_c(digits, (digits->len) - 6 + preferences.round, '.');
193                  g_strstrip(digits->str);                  g_strstrip(digits->str);
194                  g_strdelimit(digits->str, " ", '0');                  g_strdelimit(digits->str, " ", '0');
195                    g_string_free(digits, TRUE);
196            }
197            else
198            {
199                    g_string_sprintf(digits, "UNKNOWN");
200                    gtk_entry_set_text(GTK_ENTRY(entry), digits->str);
201                    g_string_free(digits, TRUE);
202          }          }
         else g_string_sprintf(digits, "UNKNOWN");  
         gtk_entry_set_text(GTK_ENTRY(entry), digits->str);  
         g_string_free(digits, TRUE);  
203  }  }
204    
205  void on_modebutton_clicked (GtkButton *button, gpointer user_data)  void on_modebutton_clicked (GtkButton *button, gpointer user_data)
# Line 202  void on_modebutton_clicked (GtkButton *b Line 208  void on_modebutton_clicked (GtkButton *b
208          gchar *mode;          gchar *mode;
209    
210          entry = lookup_widget(mainwindow, "modeentry");          entry = lookup_widget(mainwindow, "modeentry");
211          mode = getrigmode(state.rigmode);          if (g_strcasecmp(preferences.defaultmode, "?"))
212          gtk_entry_set_text(GTK_ENTRY(entry), mode);                  gtk_entry_set_text(GTK_ENTRY(entry), preferences.defaultmode);
213          g_free(mode);          else
214            {
215                    mode = getrigmode(state.rigmode);
216                    gtk_entry_set_text(GTK_ENTRY(entry), mode);
217                    g_free(mode);
218            }
219  }  }
220    
221  void on_rstbutton_clicked (GtkButton *button, gpointer user_data)  void on_rstbutton_clicked (GtkButton *button, gpointer user_data)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26