File src/scangui.c changed (mode: 100644) (index de06f4b..cfcc498) |
... |
... |
static void scan_action(GtkButton *button, gpointer data) |
208 |
208 |
return; |
return; |
209 |
209 |
} |
} |
210 |
210 |
|
|
211 |
|
//input_data->number = ((struct scandata *)data)->number; |
|
212 |
|
//input_data->input = ((struct scandata *)data)->input; |
|
213 |
|
//input_data->container = ((struct scandata *)data)->container; |
|
214 |
|
//input_data->inner_container = ((struct scandata *)data)->inner_container; |
|
215 |
|
|
|
216 |
211 |
g_print("clickdata->number : %d\n",((struct scandata*)data)->number); |
g_print("clickdata->number : %d\n",((struct scandata*)data)->number); |
217 |
212 |
g_print("input_data->number : %d\n",input_data->number); |
g_print("input_data->number : %d\n",input_data->number); |
218 |
|
//GtkStateFlags entry_flags = gtk_widget_get_state_flags((GtkWidget *)((struct scandata *) input_data )->input); |
|
219 |
|
|
|
220 |
|
//g_print("State of test_entry: %d\n", entry_flags); |
|
221 |
213 |
|
|
222 |
214 |
// initialize the struct object for test purposes |
// initialize the struct object for test purposes |
223 |
215 |
//test_data = malloc(sizeof(char[14]) + sizeof(char[30]) + 2*sizeof(int)); |
//test_data = malloc(sizeof(char[14]) + sizeof(char[30]) + 2*sizeof(int)); |
|
... |
... |
static void scan_action(GtkButton *button, gpointer data) |
234 |
226 |
printf("barcode: %s , quantity: %d\n" |
printf("barcode: %s , quantity: %d\n" |
235 |
227 |
, ((struct dataset*)testitem)->barcode, ((struct dataset*)testitem)->qty); |
, ((struct dataset*)testitem)->barcode, ((struct dataset*)testitem)->qty); |
236 |
228 |
|
|
237 |
|
// Causes segmentation fault! initialize the parameter first and then cast it! |
|
|
229 |
|
// Causes segmentation fault! |
238 |
230 |
entry_text = gtk_entry_get_text(GTK_ENTRY(input_data->input)); |
entry_text = gtk_entry_get_text(GTK_ENTRY(input_data->input)); |
239 |
231 |
g_print("Input-data: %s\n", entry_text); |
g_print("Input-data: %s\n", entry_text); |
240 |
232 |
|
|