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

Diff of /xlog/src/gui_preferencesdialog.c

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

revision 1.6 by pa4tu, Thu Jan 27 16:33:15 2005 UTC revision 1.7 by pa4tu, Sun Feb 6 11:34:34 2005 UTC
# Line 72  on_menu_preferences_activate (GtkMenuIte Line 72  on_menu_preferences_activate (GtkMenuIte
72                  *locatorlabel, *unitsframe, *unitshbox, *labeldist, *latentry,                  *locatorlabel, *unitsframe, *unitshbox, *labeldist, *latentry,
73                  *longentry, *NScombo, *EWcombo, *unitscombo, *callsignentry,                  *longentry, *NScombo, *EWcombo, *unitscombo, *callsignentry,
74                  *qthlocatorentry;                  *qthlocatorentry;
75          GtkWidget *vboxpage4, *hamlibvbox, *radiohbox, *radiolabel, *devicehbox,          GtkWidget *vboxpage4;
76                  *devicelabel, *hamlibseparator1, *configurelabel, *hamlibseparator2,  #if WANT_HAMLIB
77                  *pollingframe, *pollinghbox, *pollinglabel, *secondslabel,          GtkWidget *hamlibvbox, *radiohbox, *radiolabel, *devicehbox, *devicelabel,
78                  *frequencyframe, *digitshbox, *digitslabel, *characterslabel;          *hamlibseparator, *configurelabel, *pollingframe, *pollinghbox, *pollinglabel,
79            *secondslabel, *digitshbox,  *digitslabel, *characterslabel;
80    #endif
81          GtkWidget *vboxpage5, *logsframe, *logsvbox, *pathlabel, *pathhbox,          GtkWidget *vboxpage5, *logsframe, *logsvbox, *pathlabel, *pathhbox,
82                  *pathbutton, *logshseparator, *loadlabel, *savingframe, *savingvbox,                  *pathbutton, *logshseparator, *loadlabel, *savingframe, *savingvbox,
83                  *autosavehbox, *autosavelabel, *minuteslabel, *pathentry, *logsentry,                  *autosavehbox, *autosavelabel, *minuteslabel, *pathentry, *logsentry,
# Line 104  on_menu_preferences_activate (GtkMenuIte Line 106  on_menu_preferences_activate (GtkMenuIte
106  #endif  #endif
107    
108          /**************************/          /**************************/
109          /* creation of the dialog */          /* creation of the dialog       */
110          /**************************/          /**************************/
111    
112          tooltips = gtk_tooltips_new ();          tooltips = gtk_tooltips_new ();
# Line 335  on_menu_preferences_activate (GtkMenuIte Line 337  on_menu_preferences_activate (GtkMenuIte
337          gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "localhost");          gtk_combo_box_append_text (GTK_COMBO_BOX (devicecombo), "localhost");
338          gtk_entry_set_max_length (GTK_ENTRY (GTK_BIN(devicecombo)->child), 30);          gtk_entry_set_max_length (GTK_ENTRY (GTK_BIN(devicecombo)->child), 30);
339    
340          hamlibseparator1 = gtk_hseparator_new ();          hamlibseparator = gtk_hseparator_new ();
341          gtk_box_pack_start          gtk_box_pack_start
342                  (GTK_BOX (hamlibvbox), hamlibseparator1, FALSE, FALSE, 10);                  (GTK_BOX (hamlibvbox), hamlibseparator, FALSE, FALSE, 10);
343          configurelabel = gtk_label_new          configurelabel = gtk_label_new
344                  (_("Comma separated list of commands for configuring your hamlib port"));                  (_("Comma separated list of commands for configuring your hamlib port"));
345          gtk_box_pack_start (GTK_BOX (hamlibvbox), configurelabel, FALSE, FALSE, 0);          gtk_box_pack_start (GTK_BOX (hamlibvbox), configurelabel, FALSE, FALSE, 0);
# Line 349  on_menu_preferences_activate (GtkMenuIte Line 351  on_menu_preferences_activate (GtkMenuIte
351          gtk_tooltips_set_tip (tooltips, rigsetconfentry,          gtk_tooltips_set_tip (tooltips, rigsetconfentry,
352                  _("example: rts_state=ON,timeout=600,serial_speed=19200"), NULL);                  _("example: rts_state=ON,timeout=600,serial_speed=19200"), NULL);
353    
354          hamlibseparator2 = gtk_hseparator_new ();          hamlibseparator = gtk_hseparator_new ();
355          gtk_box_pack_start          gtk_box_pack_start
356                  (GTK_BOX (hamlibvbox), hamlibseparator2, FALSE, FALSE, 10);                  (GTK_BOX (hamlibvbox), hamlibseparator, FALSE, FALSE, 10);
357          pollingcheckbutton = gtk_check_button_new_with_label          pollingcheckbutton = gtk_check_button_new_with_label
358                  (_("Enable polling"));                  (_("Enable polling"));
359          gtk_box_pack_start          gtk_box_pack_start
# Line 387  on_menu_preferences_activate (GtkMenuIte Line 389  on_menu_preferences_activate (GtkMenuIte
389          gtk_box_pack_start          gtk_box_pack_start
390                  (GTK_BOX (hamlibvbox), frequencycheckbutton, FALSE, FALSE, 0);                  (GTK_BOX (hamlibvbox), frequencycheckbutton, FALSE, FALSE, 0);
391    
392          frequencyframe = gtk_frame_new (NULL);          hamlibseparator = gtk_hseparator_new ();
393          gtk_box_pack_start (GTK_BOX (hamlibvbox), frequencyframe, FALSE, FALSE, 0);          gtk_box_pack_start
394                    (GTK_BOX (hamlibvbox), hamlibseparator, FALSE, FALSE, 10);
395          digitshbox = gtk_hbox_new (TRUE, 0);          digitshbox = gtk_hbox_new (TRUE, 0);
396          gtk_container_add (GTK_CONTAINER (frequencyframe), digitshbox);          gtk_box_pack_start (GTK_BOX (hamlibvbox), digitshbox, FALSE, FALSE, 0);
397          digitslabel = gtk_label_new (_("Round digits to"));          digitslabel = gtk_label_new (_("Round frequency to"));
398          gtk_box_pack_start (GTK_BOX (digitshbox), digitslabel, FALSE, FALSE, 0);          gtk_box_pack_start (GTK_BOX (digitshbox), digitslabel, FALSE, FALSE, 0);
399          digitscombo = gtk_combo_box_entry_new_text ();          digitscombo = gtk_combo_box_entry_new_text ();
400          gtk_box_pack_start (GTK_BOX (digitshbox), digitscombo, FALSE, FALSE, 0);          gtk_box_pack_start (GTK_BOX (digitshbox), digitscombo, FALSE, FALSE, 0);
# Line 614  on_menu_preferences_activate (GtkMenuIte Line 617  on_menu_preferences_activate (GtkMenuIte
617                  gtk_toggle_button_set_active                  gtk_toggle_button_set_active
618                          (GTK_TOGGLE_BUTTON (hamlibcheckbutton), TRUE);                          (GTK_TOGGLE_BUTTON (hamlibcheckbutton), TRUE);
619                  gtk_widget_set_sensitive (hamlibframe, 1);                  gtk_widget_set_sensitive (hamlibframe, 1);
620                  if (preferences.hamlib == 1)                  if (preferences.hamlib == 2)
                 {  
                         gtk_widget_set_sensitive (frequencyframe, FALSE);  
                 }  
                 else if (preferences.hamlib == 2)  
621                  {                  {
622                          gtk_toggle_button_set_active                          gtk_toggle_button_set_active
623                                  (GTK_TOGGLE_BUTTON (frequencycheckbutton), TRUE);                                  (GTK_TOGGLE_BUTTON (frequencycheckbutton), TRUE);
# Line 631  on_menu_preferences_activate (GtkMenuIte Line 630  on_menu_preferences_activate (GtkMenuIte
630                                  (GTK_TOGGLE_BUTTON (frequencycheckbutton), FALSE);                                  (GTK_TOGGLE_BUTTON (frequencycheckbutton), FALSE);
631                          gtk_toggle_button_set_active                          gtk_toggle_button_set_active
632                                  (GTK_TOGGLE_BUTTON (smetercheckbutton), TRUE);                                  (GTK_TOGGLE_BUTTON (smetercheckbutton), TRUE);
                         gtk_widget_set_sensitive (frequencyframe, FALSE);  
633                  }                  }
634                  else if (preferences.hamlib == 4)                  else if (preferences.hamlib == 4)
635                  {                  {
# Line 777  on_menu_preferences_activate (GtkMenuIte Line 775  on_menu_preferences_activate (GtkMenuIte
775          /* page 4, hamlib */          /* page 4, hamlib */
776  #if WANT_HAMLIB  #if WANT_HAMLIB
777          GLADE_HOOKUP_OBJECT (preferencesdialog, hamlibframe, "hamlibframe");          GLADE_HOOKUP_OBJECT (preferencesdialog, hamlibframe, "hamlibframe");
         GLADE_HOOKUP_OBJECT (preferencesdialog, frequencyframe, "frequencyframe");  
778          GLADE_HOOKUP_OBJECT (preferencesdialog, pollingframe, "pollingframe");          GLADE_HOOKUP_OBJECT (preferencesdialog, pollingframe, "pollingframe");
779          GLADE_HOOKUP_OBJECT (preferencesdialog, pollingcheckbutton,          GLADE_HOOKUP_OBJECT (preferencesdialog, pollingcheckbutton,
780                  "pollingcheckbutton");                  "pollingcheckbutton");
# Line 787  on_menu_preferences_activate (GtkMenuIte Line 784  on_menu_preferences_activate (GtkMenuIte
784                  G_CALLBACK (on_hamlibcheckbutton_toggled), NULL);                  G_CALLBACK (on_hamlibcheckbutton_toggled), NULL);
785          g_signal_connect ((gpointer) pollingcheckbutton, "toggled",          g_signal_connect ((gpointer) pollingcheckbutton, "toggled",
786                  G_CALLBACK (on_pollingcheckbutton_toggled), NULL);                  G_CALLBACK (on_pollingcheckbutton_toggled), NULL);
         g_signal_connect ((gpointer) frequencycheckbutton, "toggled",  
                 G_CALLBACK (on_frequencycheckbutton_toggled), NULL);  
787  #endif  #endif
788    
789          /* page 5 */          /* page 5 */
# Line 968  on_menu_preferences_activate (GtkMenuIte Line 963  on_menu_preferences_activate (GtkMenuIte
963                  else                  else
964                          sethamlibwidgets (hamlibwidgets, FALSE);                          sethamlibwidgets (hamlibwidgets, FALSE);
965    
966                    preferences.round = atoi (digits);
967    
968                  /* hamlib should be started or restarted because settings have changed */                  /* hamlib should be started or restarted because settings have changed */
969                  if (hamlib_changed                  if (hamlib_changed
970                          (hamlibwidgets, radio, device, atoi(pollstr), rigconf))                          (hamlibwidgets, radio, device, atoi(pollstr), rigconf))
# Line 979  on_menu_preferences_activate (GtkMenuIte Line 976  on_menu_preferences_activate (GtkMenuIte
976                          preferences.radio = g_strdup (radio);                          preferences.radio = g_strdup (radio);
977                          preferences.device = g_strdup (device);                          preferences.device = g_strdup (device);
978                          preferences.polltime = atoi (pollstr);                          preferences.polltime = atoi (pollstr);
                         preferences.round = atoi (digits);  
979                  }                  }
980                  else                  else
981                  {                  {
# Line 990  on_menu_preferences_activate (GtkMenuIte Line 986  on_menu_preferences_activate (GtkMenuIte
986                                  preferences.radio = g_strdup ("Dummy");                                  preferences.radio = g_strdup ("Dummy");
987                                  preferences.device = g_strdup ("/dev/ttyS1");                                  preferences.device = g_strdup ("/dev/ttyS1");
988                                  preferences.rigconf = g_strdup ("?");                                  preferences.rigconf = g_strdup ("?");
                                 preferences.round = 0;  
989                                  preferences.polltime = 0;                                  preferences.polltime = 0;
990                          }                          }
991                  }                  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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