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

Diff of /xlog/src/callbacks_mainwindow_list.c

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

revision 1.2 by pa4tu, Mon Sep 20 19:38:41 2004 UTC revision 1.3 by pa4tu, Thu Dec 9 13:41:55 2004 UTC
# Line 38  extern GtkWidget *mainnotebook; Line 38  extern GtkWidget *mainnotebook;
38  extern statetype state;  extern statetype state;
39  extern preferencestype preferences;  extern preferencestype preferences;
40  extern GList *logwindowlist;  extern GList *logwindowlist;
 extern gchar **modesplit, **bandsplit;  
41    
42  /* a row is selected, update the qso frame */  /* a row is selected, update the qso frame */
43  void  void
# Line 49  on_log_select_row (GtkTreeSelection *sel Line 48  on_log_select_row (GtkTreeSelection *sel
48                  *incheckbutton, *powerentry, *nameentry, *qthentry, *locatorentry,                  *incheckbutton, *powerentry, *nameentry, *qthentry, *locatorentry,
49                  *unknownentry1, *unknownentry2, *modeoptionmenu, *bandoptionmenu,                  *unknownentry1, *unknownentry2, *modeoptionmenu, *bandoptionmenu,
50                  *qsoframe, *framelabel;                  *qsoframe, *framelabel;
51          gchar *frametext, *bandcopy, *entry;          gchar *frametext, *bandcopy, *entry, **bandspl, **modespl;
52          guint i, page, bandindex = 0, modeindex = 0;          guint i, page, bandindex = 0, modeindex = 0;
53          GtkTreeModel *model;          GtkTreeModel *model;
54          GtkTreeIter iter;          GtkTreeIter iter;
# Line 110  on_log_select_row (GtkTreeSelection *sel Line 109  on_log_select_row (GtkTreeSelection *sel
109                  gtk_tree_model_get (model, &iter, BAND, &entry, -1);                  gtk_tree_model_get (model, &iter, BAND, &entry, -1);
110                  gtk_entry_set_text (GTK_ENTRY (bandentry), entry);                  gtk_entry_set_text (GTK_ENTRY (bandentry), entry);
111    
112                  bandsplit = g_strsplit (preferences.bands, ",", 0);                  bandspl = g_strsplit (preferences.bands, ",", 0);
113                  if (strlen (entry) <= 2)                  if (strlen (entry) <= 2)
114                          bandcopy = g_strdup (entry);                          bandcopy = g_strdup (entry);
115                  else                  else
116                          bandcopy = g_strdup(finddot (entry));                          bandcopy = g_strdup(finddot (entry));
117    
118                  for (;;)                  for (;;)
119                  {                  {
120                          if (!bandsplit[bandindex])                          if (!bandspl[bandindex])
121                                  break;                                  break;
122                          if (g_ascii_strcasecmp (bandcopy, bandsplit[bandindex]) == 0)                          if (g_ascii_strcasecmp (bandcopy, bandspl[bandindex]) == 0)
123                          {                          {
124                                  gtk_combo_box_set_active (GTK_COMBO_BOX (bandoptionmenu),                                  gtk_combo_box_set_active (GTK_COMBO_BOX (bandoptionmenu),
125                                          bandindex);                                          bandindex);
# Line 128  on_log_select_row (GtkTreeSelection *sel Line 128  on_log_select_row (GtkTreeSelection *sel
128                          bandindex++;                          bandindex++;
129                  }                  }
130                  g_free (bandcopy);                  g_free (bandcopy);
131                    g_strfreev (bandspl);
132    
133                  /* update modeoptionmenu and entry */                  /* update modeoptionmenu and entry */
134                  gtk_tree_model_get (model, &iter, MODE, &entry, -1);                  gtk_tree_model_get (model, &iter, MODE, &entry, -1);
135                  gtk_entry_set_text (GTK_ENTRY (modeentry), entry);                  gtk_entry_set_text (GTK_ENTRY (modeentry), entry);
136    
137                  modesplit = g_strsplit (preferences.modes, ",", 0);                  modespl = g_strsplit (preferences.modes, ",", 0);
138                  for (;;)                  for (;;)
139                  {                  {
140                          if (!modesplit[modeindex])                          if (!modespl[modeindex])
141                                  break;                                  break;
142                          if (g_ascii_strcasecmp (entry, modesplit[modeindex]) == 0)                          if (g_ascii_strcasecmp (entry, modespl[modeindex]) == 0)
143                                  {                                  {
144                                          gtk_combo_box_set_active (GTK_COMBO_BOX (modeoptionmenu),                                          gtk_combo_box_set_active (GTK_COMBO_BOX (modeoptionmenu),
145                                                  modeindex);                                                  modeindex);
# Line 146  on_log_select_row (GtkTreeSelection *sel Line 147  on_log_select_row (GtkTreeSelection *sel
147                                  }                                  }
148                          modeindex++;                          modeindex++;
149                  }                  }
150                    g_strfreev (modespl);
151    
152                  gtk_tree_model_get (model, &iter, POWER, &entry, -1);                  gtk_tree_model_get (model, &iter, POWER, &entry, -1);
153                  gtk_entry_set_text (GTK_ENTRY (powerentry), entry);                  gtk_entry_set_text (GTK_ENTRY (powerentry), entry);

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