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

Diff of /xlog/src/gui_searchdialog.c

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

revision 1.10 by pa4tu, Wed Jun 1 19:11:45 2005 UTC revision 1.11 by pa4tu, Thu Jun 2 07:10:35 2005 UTC
# Line 21  Line 21 
21   *   *
22   * we create a dialog where a string can be entered. If OK is clicked this   * we create a dialog where a string can be entered. If OK is clicked this
23   * string is checked against the callsigns in all logs. If there is a partial   * string is checked against the callsigns in all logs. If there is a partial
24   * match, the QSO is selected. If there is no match, a warinig is displayed.   * match, the QSO is selected. If there is no match, a warning is displayed.
25   */   */
26    
27  #include <gtk/gtk.h>  #include <gtk/gtk.h>
# Line 61  searchok (GtkButton *button, gpointer us Line 61  searchok (GtkButton *button, gpointer us
61    
62          searchopen = gtk_toggle_button_get_active          searchopen = gtk_toggle_button_get_active
63                  (GTK_TOGGLE_BUTTON(searchcheckbutton));                  (GTK_TOGGLE_BUTTON(searchcheckbutton));
64          searchstr =     gtk_editable_get_chars          searchstr = gtk_editable_get_chars
65                  (GTK_EDITABLE (GTK_BIN(searchcombo)->child), 0, -1);                  (GTK_EDITABLE (GTK_BIN(searchcombo)->child), 0, -1);
66          len = strlen (searchstr);          len = strlen (searchstr);
67    
# Line 74  searchok (GtkButton *button, gpointer us Line 74  searchok (GtkButton *button, gpointer us
74                  gtk_combo_box_append_text (GTK_COMBO_BOX (searchcombo), searchstr);                  gtk_combo_box_append_text (GTK_COMBO_BOX (searchcombo), searchstr);
75          }          }
76          if (g_list_length (searchhistory) > SEARCHHISTORY)          if (g_list_length (searchhistory) > SEARCHHISTORY)
77            {
78                  searchhistory = g_list_remove                  searchhistory = g_list_remove
79                          (searchhistory, g_list_last (searchhistory)->data);                          (searchhistory, g_list_last (searchhistory)->data);
80                    gtk_combo_box_remove_text (GTK_COMBO_BOX (searchcombo), 0);
81            }
82    
83          upsearchstr = g_ascii_strup (searchstr, -1);          upsearchstr = g_ascii_strup (searchstr, -1);
84    
# Line 201  on_menu_search_activate (GtkMenuItem * m Line 204  on_menu_search_activate (GtkMenuItem * m
204                  for (i = 0; i < num; i++)                  for (i = 0; i < num; i++)
205                  {                  {
206                          s = g_list_nth_data (searchhistory, i);                          s = g_list_nth_data (searchhistory, i);
207                          gtk_combo_box_append_text (GTK_COMBO_BOX (searchcombo), s);                          gtk_combo_box_prepend_text (GTK_COMBO_BOX (searchcombo), s);
208                  }                  }
209          }          }
210    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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