/[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.23 by pa4tu, Sat May 24 18:54:06 2003 UTC revision 1.24 by pa4tu, Wed Aug 6 18:18:54 2003 UTC
# Line 61  extern statetype state; Line 61  extern statetype state;
61  extern GList *logwindowlist;  extern GList *logwindowlist;
62  extern preferencestype preferences;  extern preferencestype preferences;
63  extern GList *logwindowlist;  extern GList *logwindowlist;
64    extern gchar **bandsplit;
65    extern gchar **modesplit;
66    
67  /* QSO FRAME */  /* QSO FRAME */
68  /* get current date and fill in the dateentry */  /* get current date and fill in the dateentry */
# Line 305  on_modeoptionmenu_key_press_event (GtkWi Line 307  on_modeoptionmenu_key_press_event (GtkWi
307  void  void
308  on_mhzbutton_clicked (GtkButton * button, gpointer user_data)  on_mhzbutton_clicked (GtkButton * button, gpointer user_data)
309  {  {
310    GtkWidget *entry;    GtkWidget *entry, *bandoptionmenu;
311    GString *digits = g_string_new ("");    GString *digits = g_string_new ("");
312      gchar *bandcopy;
313      guint bandindex = 0;
314    
315    entry = lookup_widget (mainwindow, "bandentry");    entry = lookup_widget (mainwindow, "bandentry");
316      bandoptionmenu = lookup_widget (mainwindow, "bandoptionmenu");
317      
318      /* set optionmenu and entry to the default */
319    if (g_ascii_strcasecmp (preferences.defaultmhz, "?"))    if (g_ascii_strcasecmp (preferences.defaultmhz, "?"))
320      {
321      gtk_entry_set_text (GTK_ENTRY (entry), preferences.defaultmhz);      gtk_entry_set_text (GTK_ENTRY (entry), preferences.defaultmhz);
322        if (strlen (preferences.defaultmhz) <= 2)
323          bandcopy = g_strdup (preferences.defaultmhz);
324        else
325          bandcopy = finddot (preferences.defaultmhz);
326        for (;;)
327        {
328          if (!bandsplit[bandindex])
329            break;
330          if (g_ascii_strcasecmp (bandcopy, bandsplit[bandindex]) == 0)
331          {
332            gtk_option_menu_set_history (GTK_OPTION_MENU(bandoptionmenu),
333              bandindex);
334            break;
335          }
336          bandindex++;
337        }
338        g_free (bandcopy);
339      }
340    else    else
341      {      {
342        if (state.rigfrequency != 0)        if (state.rigfrequency != 0)
# Line 337  on_mhzbutton_clicked (GtkButton * button Line 363  on_mhzbutton_clicked (GtkButton * button
363  void  void
364  on_modebutton_clicked (GtkButton * button, gpointer user_data)  on_modebutton_clicked (GtkButton * button, gpointer user_data)
365  {  {
366    GtkWidget *entry;    GtkWidget *entry, *modeoptionmenu;
367    gchar *mode;    gchar *mode;
368      guint modeindex = 0;
369    
370    entry = lookup_widget (mainwindow, "modeentry");    entry = lookup_widget (mainwindow, "modeentry");
371      modeoptionmenu = lookup_widget (mainwindow, "modeoptionmenu");
372    
373    if (g_ascii_strcasecmp (preferences.defaultmode, "?"))    if (g_ascii_strcasecmp (preferences.defaultmode, "?"))
374      {
375      gtk_entry_set_text (GTK_ENTRY (entry), preferences.defaultmode);      gtk_entry_set_text (GTK_ENTRY (entry), preferences.defaultmode);
376        for (;;)
377        {
378          if (!modesplit[modeindex])
379            break;
380          if (g_ascii_strcasecmp (preferences.defaultmode, modesplit[modeindex]) == 0)
381          {
382            gtk_option_menu_set_history (GTK_OPTION_MENU (modeoptionmenu),
383              modeindex);
384            break;
385          }
386          modeindex++;
387        }
388      }
389    else    else
390      {      {
391        mode = rigmode (state.rigmode);        mode = rigmode (state.rigmode);

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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