Commit 943d2968 authored by Claes Sjofors's avatar Claes Sjofors

Ge graph list save confirm options added

parent 68d8758d
......@@ -3023,7 +3023,6 @@ GeGtk::GeGtk( void *x_parent_ctx,
gtk_paned_pack2( GTK_PANED(vpaned2), ((GraphGtk *)graph)->nav_widget, FALSE, TRUE);
gtk_widget_show( ((GraphGtk *)graph)->nav_widget);
// Horizontal pane
GtkWidget *hpaned = gtk_hpaned_new();
gtk_paned_pack1( GTK_PANED(hpaned), grow_widget, TRUE, TRUE);
......@@ -3049,7 +3048,10 @@ GeGtk::GeGtk( void *x_parent_ctx,
gtk_widget_show_all( toplevel);
gtk_paned_set_position( GTK_PANED(hpaned), window_width - palette_width);
g_object_set( graph_list, "visible", FALSE, NULL);
gtk_paned_set_position( GTK_PANED(hpaned2), 150);
gtk_paned_set_position( GTK_PANED(hpaned), window_width - palette_width - 45);
gtk_paned_set_position( GTK_PANED(vpaned1), window_height - 380);
gtk_paned_set_position( GTK_PANED(vpaned2), window_height - 290);
......@@ -3059,7 +3061,6 @@ GeGtk::GeGtk( void *x_parent_ctx,
#endif
g_object_set( cmd_prompt, "visible", FALSE, NULL);
g_object_set( cmd_input, "visible", FALSE, NULL);
g_object_set( graph_list, "visible", FALSE, NULL);
subpalette->get_path( &path_cnt, &path);
graph->set_subgraph_path( path_cnt, path);
......
......@@ -213,12 +213,20 @@ void GeItemViewGtk::activate_menu_open( GtkWidget *w, gpointer data)
char message[64];
sprintf( message, "Your changes will be lost. Do you want to save?");
rv = ge->create_modal_dialog( title, message, "Yes", "No", NULL, NULL);
if ( rv == wow_eModalDialogReturn_Button1) {
rv = ge->create_modal_dialog( title, message, "Yes", "Discard", "Cancel", NULL);
switch ( rv) {
case wow_eModalDialogReturn_Button1:
// Yes
GeGtk::activate_save( NULL, item_view->ge_ctx);
break;
case wow_eModalDialogReturn_Button2:
// Discard
break;
default:
// Cancel
return;
}
}
activate_tree_widget( GTK_TREE_VIEW(item_view->tree_widget), NULL, NULL, ge);
}
......@@ -385,9 +393,17 @@ void GeItemViewGtk::activate_tree_widget( GtkTreeView *tree_widget, GtkTreePath
char message[64];
sprintf( message, "Your changes will be lost.\nDo you want to save?");
rv = ge->create_modal_dialog( title, message, "Yes", "No", NULL, NULL);
if ( rv == wow_eModalDialogReturn_Button1) {
rv = ge->create_modal_dialog( title, message, "Yes", "Discard", "Cancel", NULL);
switch ( rv) {
case wow_eModalDialogReturn_Button1:
// Yes
GeGtk::activate_save( NULL, item_view->ge_ctx);
break;
case wow_eModalDialogReturn_Button2:
// Discard
break;
default:
return;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment