22 |
*/ |
*/ |
23 |
|
|
24 |
#include <gtk/gtk.h> |
#include <gtk/gtk.h> |
25 |
|
#include <string.h> |
26 |
#include "callbacks_mainwindow_toolbar.h" |
#include "callbacks_mainwindow_toolbar.h" |
27 |
#include "callbacks_mainwindow_menu.h" |
#include "callbacks_mainwindow_menu.h" |
28 |
#include "support.h" |
#include "support.h" |
57 |
*powerentry, *namehbox, *nameentry, *qthhbox, *qthentry, |
*powerentry, *namehbox, *nameentry, *qthhbox, *qthentry, |
58 |
*locatorhbox, *locatorentry, *unknown1hbox, *unknownentry1, |
*locatorhbox, *locatorentry, *unknown1hbox, *unknownentry1, |
59 |
*unknown2hbox, *unknownentry2, *qslhbox, *remarksvbox, *framelabel; |
*unknown2hbox, *unknownentry2, *qslhbox, *remarksvbox, *framelabel; |
60 |
gchar *temp; |
gchar *temp, *countstr, *str; |
61 |
gint bandindex, modeindex, i = 0, page, c; |
gint bandindex, modeindex, i = 0, page, c; |
62 |
logtype *logw = NULL; |
logtype *logw = NULL; |
63 |
GtkTreeIter iter, selected; |
GtkTreeIter iter, selected; |
233 |
|
|
234 |
gtk_widget_grab_focus (callentry); |
gtk_widget_grab_focus (callentry); |
235 |
if (keyerwindow) |
if (keyerwindow) |
236 |
{ /* increment counter and fill in data for next QSO */ |
{ /* increment counter and fill in rst/myrst for next QSO */ |
237 |
count = lookup_widget (keyerwindow, "count"); |
count = lookup_widget (keyerwindow, "count"); |
238 |
c = gtk_spin_button_get_value (GTK_SPIN_BUTTON (count)); |
c = gtk_spin_button_get_value (GTK_SPIN_BUTTON (count)); |
239 |
gtk_spin_button_set_value (GTK_SPIN_BUTTON (count), c + 1); |
gtk_spin_button_set_value (GTK_SPIN_BUTTON (count), c + 1); |
240 |
on_clickall_activate (NULL, NULL); |
|
241 |
|
if (g_ascii_strcasecmp (preferences.defaulttxrst, "?")) |
242 |
|
{ |
243 |
|
if (g_strrstr (preferences.defaulttxrst, "#")) |
244 |
|
{ |
245 |
|
if (c < 10) |
246 |
|
countstr = g_strdup_printf ("00%d", c); |
247 |
|
else if (c < 100) |
248 |
|
countstr = g_strdup_printf ("0%d", c); |
249 |
|
else |
250 |
|
countstr = g_strdup_printf ("%d", c); |
251 |
|
str = my_strreplace (preferences.defaulttxrst, "#", countstr); |
252 |
|
g_free (countstr); |
253 |
|
gtk_entry_set_text (GTK_ENTRY (rstentry), str); |
254 |
|
g_free (str); |
255 |
|
} |
256 |
|
else |
257 |
|
gtk_entry_set_text (GTK_ENTRY (rstentry), preferences.defaulttxrst); |
258 |
|
} |
259 |
|
if (g_ascii_strcasecmp (preferences.defaultrxrst, "?")) |
260 |
|
gtk_entry_set_text (GTK_ENTRY (myrstentry), preferences.defaultrxrst); |
261 |
} |
} |
262 |
} |
} |
263 |
} |
} |