172 |
|
return entry; |
173 |
|
} |
174 |
|
|
175 |
< |
static char *get_file_entry_path(GtkWidget *entry) |
175 |
> |
static const gchar *get_file_entry_path(GtkWidget *entry) |
176 |
|
{ |
177 |
|
return gtk_entry_get_text(GTK_ENTRY(entry)); |
178 |
|
} |
307 |
|
GtkAccelGroup *accel_group = gtk_accel_group_new(); |
308 |
|
GtkItemFactory *item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel_group); |
309 |
|
gtk_item_factory_create_items(item_factory, sizeof(menu_items) / sizeof(menu_items[0]), menu_items, NULL); |
310 |
+ |
#if GTK_CHECK_VERSION(1,3,15) |
311 |
+ |
gtk_window_add_accel_group(GTK_WINDOW(win), accel_group); |
312 |
+ |
#else |
313 |
|
gtk_accel_group_attach(accel_group, GTK_OBJECT(win)); |
314 |
+ |
#endif |
315 |
|
GtkWidget *menu_bar = gtk_item_factory_get_widget(item_factory, "<main>"); |
316 |
|
gtk_widget_show(menu_bar); |
317 |
|
gtk_box_pack_start(GTK_BOX(box), menu_bar, FALSE, TRUE, 0); |
365 |
|
// Volume selected for addition |
366 |
|
static void add_volume_ok(GtkWidget *button, file_req_assoc *assoc) |
367 |
|
{ |
368 |
< |
char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req)); |
368 |
> |
gchar *file = (gchar *)gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req)); |
369 |
|
gtk_clist_append(GTK_CLIST(volume_list), &file); |
370 |
|
gtk_widget_destroy(assoc->req); |
371 |
|
delete assoc; |
374 |
|
// Volume selected for creation |
375 |
|
static void create_volume_ok(GtkWidget *button, file_req_assoc *assoc) |
376 |
|
{ |
377 |
< |
char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req)); |
377 |
> |
gchar *file = (gchar *)gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req)); |
378 |
|
|
379 |
< |
char *str = gtk_entry_get_text(GTK_ENTRY(assoc->entry)); |
379 |
> |
const gchar *str = gtk_entry_get_text(GTK_ENTRY(assoc->entry)); |
380 |
|
int size = atoi(str); |
381 |
|
|
382 |
|
char cmd[1024]; |