331 |
} |
} |
332 |
#endif |
#endif |
333 |
|
|
334 |
|
#ifndef NO_COPY_N_PASTE |
335 |
static void on_copy_clicked(GtkButton *button, gpointer data) { |
static void on_copy_clicked(GtkButton *button, gpointer data) { |
336 |
pp_context_t *context = (pp_context_t*)data; |
pp_context_t *context = (pp_context_t*)data; |
337 |
char str[64]; |
char str[64]; |
344 |
printf("set clipboard to \"%s\"\n", str); |
printf("set clipboard to \"%s\"\n", str); |
345 |
gtk_clipboard_set_text(context->appdata->clipboard, str, -1); |
gtk_clipboard_set_text(context->appdata->clipboard, str, -1); |
346 |
} |
} |
347 |
|
#endif |
348 |
|
|
349 |
void precise_position(appdata_t *appdata) { |
void precise_position(appdata_t *appdata) { |
350 |
pp_context_t *context = g_new0(pp_context_t, 1); |
pp_context_t *context = g_new0(pp_context_t, 1); |
401 |
gtk_box_pack_start_defaults(GTK_BOX(vbox), gtk_label_new(_("Longitude:"))); |
gtk_box_pack_start_defaults(GTK_BOX(vbox), gtk_label_new(_("Longitude:"))); |
402 |
gtk_box_pack_start_defaults(GTK_BOX(vbox), |
gtk_box_pack_start_defaults(GTK_BOX(vbox), |
403 |
context->lon_label = gtk_label_new("")); |
context->lon_label = gtk_label_new("")); |
404 |
|
#ifndef NO_COPY_N_PASTE |
405 |
GtkWidget *copy_but = gtk_button_new_with_label(_("Copy")); |
GtkWidget *copy_but = gtk_button_new_with_label(_("Copy")); |
406 |
gtk_signal_connect(GTK_OBJECT(copy_but), "clicked", |
gtk_signal_connect(GTK_OBJECT(copy_but), "clicked", |
407 |
(GtkSignalFunc)on_copy_clicked, context); |
(GtkSignalFunc)on_copy_clicked, context); |
408 |
gtk_box_pack_start_defaults(GTK_BOX(vbox), copy_but); |
gtk_box_pack_start_defaults(GTK_BOX(vbox), copy_but); |
409 |
|
#endif |
410 |
|
|
411 |
gtk_box_pack_start_defaults(GTK_BOX(hbox), vbox); |
gtk_box_pack_start_defaults(GTK_BOX(hbox), vbox); |
412 |
|
|