int PalFile::check_volume( ldh_tSession ldhses, char *name) { pwr_tClassId classid; pwr_tVolumeId volume; int sts; int size; char volume_name[80]; // Find a class volume with this name sts = ldh_GetVolumeList( ldh_SessionToWB(ldhses), &volume); while ( ODD(sts)) { sts = ldh_GetVolumeClass( ldh_SessionToWB(ldhses), volume, &classid); if ( EVEN(sts)) return 0; if ( cdh_isClassVolumeClass( classid)) { sts = ldh_VolumeIdToName( ldh_SessionToWB(ldhses), volume, volume_name, sizeof(volume_name), &size); if ( EVEN(sts)) return 0; if ( !cdh_NoCaseStrcmp( volume_name, name)) return 1; } sts = ldh_GetNextVolume( ldh_SessionToWB(ldhses), volume, &volume); } return 0; }
void Cmd::save_cb( void *ctx, int quiet) { Cmd *cmd = (Cmd *) ctx; int sts; if ( !cmd->ldhses) { cmd->wnav->message( 'E', "Cmd is not attached to a volume"); return; } sts = ldh_SaveSession( cmd->ldhses); if ( EVEN(sts)) { cmd->wnav->message( 'E', wnav_get_message( sts)); return; } ldh_sVolumeInfo info; pwr_tCid volcid; ldh_GetVolumeInfo( ldh_SessionToVol( cmd->ldhses), &info); ldh_GetVolumeClass( cmd->wbctx, info.Volume, &volcid); if ( volcid == pwr_eClass_DirectoryVolume) { sts = lfu_SaveDirectoryVolume( cmd->ldhses, 0, quiet); if ( EVEN(sts)) { cmd->wnav->message( 'E', "Syntax error"); return; } } cmd->wnav->message( 'E', "Session saved"); }
int Ge::get_ldhses_cb( void *ctx, ldh_tSesContext *ldhses, int load) { #if LDH Ge *gectx = (Ge *) ctx; ldh_tWBContext wbctx; int sts; pwr_tVolumeId volid = 0; pwr_tClassId classid; ldh_tVolContext volctx; if ( gectx->ldhses) { *ldhses = gectx->ldhses; return 1; } else if ( !load) return 0; else { // Open workbench and attatch some volume sts = ldh_OpenWB( &wbctx, 0, 0); if ( EVEN(sts)) return sts; // Attach first rootvolume, or if no rootvolume exist some other volume sts = ldh_GetVolumeList( wbctx, &volid); while ( ODD(sts)) { sts = ldh_GetVolumeClass( wbctx, volid, &classid); if ( EVEN(sts)) return sts; if ( classid == pwr_eClass_RootVolume) break; sts = ldh_GetNextVolume( wbctx, volid, &volid); } if ( volid == 0) return sts; // Open ldh session sts = ldh_AttachVolume( wbctx, volid, &volctx); if ( EVEN(sts)) return sts; sts = ldh_OpenSession( ldhses, volctx, ldh_eAccess_ReadWrite, ldh_eUtility_Pwr); if ( EVEN(sts)) return sts; } return 1; #else return 0; #endif }
WVselMotif::WVselMotif ( pwr_tStatus *status, void *wv_parent_ctx, Widget wv_parent_wid, const char *wv_name, ldh_tWBContext wv_wbctx, char *volumename, int (*bc_success)( void *, pwr_tVolumeId *, int), void (*bc_cancel)(), int (*bc_time_to_exit)( void *), int show_volumes, wb_eType wv_wb_type) : WVsel(status,wv_parent_ctx,wv_name,wv_wbctx,volumename,bc_success,bc_cancel, bc_time_to_exit,show_volumes,wv_wb_type), parent_wid(wv_parent_wid) { Arg args[20]; int sts; int i; pwr_tVolumeId volid, *volume_ptr; pwr_tVolumeId volume; pwr_tClassId classid; char volname[80]; int size; int volume_count; int display_window; /* DRM database hierarchy related variables */ MrmHierarchy s_DRMh; MrmType dclass; char uid_filename[200] = {"pwr_exe:wb_vsel.uid"}; char *uid_filename_p = uid_filename; static MrmRegisterArg reglist[] = { /* First the context variable */ {(char*) "vsel_ctx", 0 }, {(char*) "vsel_write_priv", 0 }, /* Callbacks for the controlled login widget */ {(char*) "vsel_create_adb",(caddr_t)create_adb}, {(char*) "vsel_destroy_adb",(caddr_t)destroy_adb}, {(char*) "vsel_create_label",(caddr_t)create_label}, {(char*) "vsel_activate_ok",(caddr_t)activate_ok}, {(char*) "vsel_activate_cancel",(caddr_t)activate_cancel}, {(char*) "vsel_activate_close",(caddr_t)activate_close}, {(char*) "vsel_activate_showall",(caddr_t)activate_showall}, {(char*) "vsel_create_volumelist",(caddr_t)create_volumelist}, {(char*) "vsel_action_volumelist",(caddr_t)action_volumelist} }; static int reglist_num = (sizeof reglist / sizeof reglist[0]); sts = dcli_translate_filename( uid_filename, uid_filename); if ( EVEN(sts)) { printf( "** pwr_exe is not defined\n"); exit(0); } strcpy( volname, ""); if ( volumename != NULL && *volumename != 0 && !show_volumes) /* Start the navigater for this volume */ strcpy( volname, volumename); else if ( !show_volumes && wb_type != wb_eType_Buffer) { /* If there is only one volume in the db, select this volume */ volume_count = 0; sts = ldh_GetVolumeList( wbctx, &volume); while ( ODD(sts) ) { sts = ldh_GetVolumeClass( wbctx, volume, &classid); if (EVEN(sts)) { *status = sts; return; } if ( cdh_isClassVolumeClass( classid) || classid == pwr_eClass_WorkBenchVolume || volume == ldh_cRtVolume) { sts = ldh_GetNextVolume( wbctx, volume, &volume); continue; } sts = ldh_VolumeIdToName( wbctx, volume, volname, sizeof(volname), &size); if (EVEN(sts)) { *status = sts; return; } volume_count++; sts = ldh_GetNextVolume( wbctx, volume, &volume); } if ( volume_count != 1) strcpy( volname, ""); } // If volume name is supplied, find this volume and open the navigator. if ( strcmp( volname, "") && wb_type != wb_eType_Buffer) /* Check syntax, if new volumes is found, show the window */ sts = check_volumelist( 1, &display_window); if ( strcmp( volname, "") && !display_window) { sts = ldh_VolumeNameToId( wbctx, volname, &volid); WFoe::error_msg(sts); if ( ODD(sts)) { volume_ptr = (pwr_tVolumeId *) calloc( 1, sizeof( pwr_tVolumeId)); *volume_ptr = volid; (vsel_bc_success) ( (void *)this, volume_ptr, 1); if (vsel_bc_cancel != NULL) (vsel_bc_cancel) (); *status = LOGIN__SUCCESS; return; } else printf( "-- Unable to open volume '%s', volume doesn't exist\n", volname); } // Now start the module creation // set initialization values in context */ // Save the context structure in the widget */ XtSetArg (args[0], XmNuserData, (XtPointer) this); /* * Create a new widget * Open the UID files (the output of the UIL compiler) in the hierarchy * Register the items DRM needs to bind for us. * Create a new widget * Close the hierarchy * Compile the additional button translations and augment and add actions */ sts = MrmOpenHierarchy( 1, &uid_filename_p, NULL, &s_DRMh); if (sts != MrmSUCCESS) printf("can't open hierarchy\n"); reglist[0].value = (caddr_t) this; reglist[1].value = (caddr_t) write_priv; MrmRegisterNames(reglist, reglist_num); i=0; XtSetArg(args[i],XmNiconName,name); i++; /* Save the id of the top in the context */ widgets.toplevel = XtCreatePopupShell ( "selectvolume", topLevelShellWidgetClass, parent_wid, args, i); /* the positioning of a top level can only be define after the creation * of the widget . So i do it now: * use the parameters received x and y */ i=0; XtSetArg(args[i],XmNx,100);i++; XtSetArg(args[i],XmNy,100);i++; XtSetArg(args[i],XtNallowShellResize,TRUE), i++; XtSetValues( widgets.toplevel ,args,i); /* now that we have a top level we can get the main window */ sts = MrmFetchWidgetOverride(s_DRMh, (char*) "vsel_window", widgets.toplevel, name, args, 1, &widgets.vsel_window, &dclass); if (sts != MrmSUCCESS) printf("can't fetch utedit widget\n"); XtManageChild( widgets.vsel_window); /* SG 09.02.91 a top level should always be realized ! */ XtPopup( widgets.toplevel, XtGrabNone ); MrmCloseHierarchy(s_DRMh); wow = new CoWowMotif( widgets.vsel_window); if ( wb_type != wb_eType_Buffer) sts = check_volumelist( 0, &display_window); // Set input focus to the scrolled list widget XmProcessTraversal( widgets.volumelist, XmTRAVERSE_CURRENT); *status = LOGIN__SUCCESS; }
pwr_tStatus WVsel::check_volumelist( int quiet, int *display_window ) { pwr_tVolumeId volume; pwr_tClassId classid; char name[80]; int size; pwr_tStatus sts; int i; lfu_t_volumelist *volumelist; lfu_t_volumelist *volumelist_ptr; int volumecount; int class_error; char volname_conf[80]; char volname_db[80]; int volume_found; int error_count; int errlen=0; int errlen_old = 0; char errstr[800]; error_count = 0; *display_window = 0; if ( !(CoLogin::privilege() & pwr_mPrv_DevConfig )) // No privileges for edit, don't check the volumes return 1; // Load the configured volume list sts = lfu_volumelist_load( pwr_cNameVolumeList, &volumelist, &volumecount); if (sts == FOE__NOFILE) { if ( !quiet) { printf( "** Error, project is not configured\n"); BEEP; *display_window = 1; } return 1; } else if (EVEN(sts)) return 1; sts = ldh_GetVolumeList( wbctx, &volume); while ( ODD(sts) ) { sts = ldh_GetVolumeClass( wbctx, volume, &classid); if (EVEN(sts)) return sts; sts = ldh_VolumeIdToName( wbctx, volume, name, sizeof(name), &size); if (EVEN(sts)) return sts; if ( classid == pwr_eClass_RootVolume || classid == pwr_eClass_SubVolume || (classid == pwr_eClass_SharedVolume && volume != ldh_cRtVolume) || (cdh_isClassVolumeClass(classid) && (cdh_cUserClassVolMin <= volume && volume <= cdh_cUserClassVolMax))) { // This volume should be configured volume_found = 0; volumelist_ptr = volumelist; for ( i = 0; i < volumecount; i++) { if ( volumelist_ptr->volume_id == volume) { // Mark that volume is found volume_found = 1; strcpy( volumelist_ptr->p3, "Found"); // Check volume name utl_toupper( volname_conf, volumelist_ptr->volume_name); utl_toupper( volname_db, name); if ( strcmp( volname_db, volname_conf)) { // Volume name differs if ( !quiet && errlen < (int)(sizeof(errstr)-100)) { errlen += sprintf( &errstr[errlen], "** Error, Volume %s is configured with another name '%s'\n", name, volumelist_ptr->volume_name); MsgWindow::message( 'E', &errstr[errlen_old], msgw_ePop_No); errlen_old = errlen; BEEP; } error_count++; } class_error = 0; switch( classid) { case pwr_eClass_RootVolume : if ( strcmp( volumelist_ptr->p1, "RootVolume")) class_error = 1; break; case pwr_eClass_SubVolume : if ( strcmp( volumelist_ptr->p1, "SubVolume")) class_error = 1; break; case pwr_eClass_ClassVolume : if ( strcmp( volumelist_ptr->p1, "ClassVolume")) class_error = 1; break; case pwr_eClass_DetachedClassVolume : if ( strcmp( volumelist_ptr->p1, "DetachedClassVolume")) class_error = 1; break; case pwr_eClass_SharedVolume : if ( strcmp( volumelist_ptr->p1, "SharedVolume")) class_error = 1; break; } if ( class_error) { if ( !quiet && errlen < (int)(sizeof(errstr)-100)) { errlen += sprintf( &errstr[errlen], "** Error, Volume %s is configured with another class '%s'\n", name, volumelist_ptr->p1); MsgWindow::message( 'E', &errstr[errlen_old], msgw_ePop_No); errlen_old = errlen; BEEP; } error_count++; } break; } volumelist_ptr++; } if ( !volume_found) { if ( !quiet && errlen < (int)(sizeof(errstr)-100)) { errlen += sprintf( &errstr[errlen], "** Error, Volume %s (%s) is not configured in the ProjectVolume\nCheck volume name and identity\n", name, cdh_VolumeIdToString( 0, volume, 1, 0)); MsgWindow::message( 'E', &errstr[errlen_old], msgw_ePop_No); errlen_old = errlen; BEEP; } error_count++; } } sts = ldh_GetNextVolume( wbctx, volume, &volume); } if ( error_count) { *display_window = 1; if ( !quiet) { errlen += sprintf( &errstr[errlen], "\n %d syntax error%s found\n", error_count, (error_count == 1) ? "" : "s"); MsgWindow::message( 'E', &errstr[errlen_old], msgw_ePop_No); errlen_old = errlen; wow->DisplayError( "Syntax control", errstr); } } return 1; }
pwr_tStatus WVsel::load_volumelist() { pwr_tVolumeId volume; pwr_tClassId classid; char name[80]; int size; pwr_tStatus sts; int i; bool local_wbvolume = false; ldh_sVolumeInfo info; char str[120]; list_clear(); volume_count = 0; if ( wb_type != wb_eType_Buffer) sts = ldh_GetVolumeList( wbctx, &volume); else sts = ldh_GetBufferList( wbctx, &volume); while ( ODD(sts) ) { sts = ldh_GetVolumeClass( wbctx, volume, &classid); if (EVEN(sts)) return sts; if ( !all) { if ( cdh_isClassVolumeClass( classid) || classid == pwr_eClass_WorkBenchVolume || volume == ldh_cRtVolume) { sts = ldh_GetNextVolume( wbctx, volume, &volume); continue; } } sts = ldh_VolumeIdToName( wbctx, volume, name, sizeof(name), &size); if (EVEN(sts)) return sts; strcpy( str, name); strcat( str, " "); for ( i = strlen(str); i < 20; i++) strcat( str, " "); sts = ldh_GetVidInfo( wbctx, volume, &info); if (EVEN(sts)) return sts; switch ( info.VolRep) { case ldh_eVolRep_Db: strcat( str, "Db "); break; case ldh_eVolRep_Dbs: strcat( str, "Dbs "); break; case ldh_eVolRep_Dbms: strcat( str, "Dbms "); break; case ldh_eVolRep_Wbl: strcat( str, "Wbl "); break; case ldh_eVolRep_Mem: strcat( str, "Mem "); break; case ldh_eVolRep_Ref: strcat( str, "Ref "); break; case ldh_eVolRep_Ext: strcat( str, "Ext "); break; case ldh_eVolRep_Ced: strcat( str, "Ced "); break; } switch (classid) { case pwr_eClass_RootVolume: strcat( str, "RootVolume"); break; case pwr_eClass_SubVolume: strcat( str, "SubVolume"); break; case pwr_eClass_SharedVolume: strcat( str, "SharedVolume"); break; case pwr_eClass_ClassVolume: strcat( str, "ClassVolume"); break; case pwr_eClass_DetachedClassVolume: strcat( str, "DetachedClassVolume"); break; case pwr_eClass_WorkBenchVolume: strcat( str, "WorkBenchVolume"); break; case pwr_eClass_DirectoryVolume: strcat( str, "DirectoryVolume"); break; case pwr_eClass_ExternVolume: strcat( str, "ExternVolume"); break; } list_add_item( str); // Store the volume volumes[ volume_count] = volume; volume_count++; if ( volume_count >= VSEL_MAX_VOLUMES) break; if ( local_wbvolume) break; sts = ldh_GetNextVolume( wbctx, volume, &volume); if ( EVEN(sts) && all) { // Look for local workbench volume volume = ldh_cWBVolLocal; sts = ldh_VolumeIdToName( wbctx, volume, name, sizeof(name), &size); local_wbvolume = true; } } return 1; }
int Cmd::attach_volume_cb( void *ctx, pwr_tVolumeId volid, int pop) { Cmd *cmd = (Cmd *) ctx; int sts; pwr_tVolumeId vid; pwr_tClassId classid; if ( cmd->ldhses) { // cmd->wnav->message( 'E', "Other volume is already attached"); return WNAV__VOLATTACHED; } if ( !cmd->wbctx) { sts = get_wbctx( (void *)cmd, &cmd->wbctx); if ( EVEN(sts)) return sts; } if ( volid == 0) { if ( cmd_volume_p != 0) { // Attach argument volume sts = ldh_VolumeNameToId( cmd->wbctx, cmd_volume_p, &volid); } if ( cmd_volume_p == 0 || EVEN(sts)) { // Attach first rootvolume, or if no rootvolume exist some other volume sts = ldh_GetVolumeList( cmd->wbctx, &vid); while ( ODD(sts)) { volid = vid; sts = ldh_GetVolumeClass( cmd->wbctx, vid, &classid); if ( EVEN(sts)) return sts; if ( classid == pwr_eClass_RootVolume) break; sts = ldh_GetNextVolume( cmd->wbctx, vid, &vid); } if ( volid == 0) return sts; } } cmd->volid = volid; // Open ldh session sts = ldh_AttachVolume( cmd->wbctx, cmd->volid, &cmd->volctx); if ( EVEN(sts)) return sts; sts = ldh_OpenSession( &cmd->ldhses, cmd->volctx, ldh_eAccess_ReadWrite, ldh_eUtility_Pwr); if ( EVEN(sts)) { // Try read access sts = ldh_OpenSession( &cmd->ldhses, cmd->volctx, ldh_eAccess_ReadOnly, ldh_eUtility_Pwr); if ( EVEN(sts)) return sts; } cmd->wnav->volume_attached( cmd->wbctx, cmd->ldhses, pop); return 1; }
WVselGtk::WVselGtk ( pwr_tStatus *status, void *wv_parent_ctx, GtkWidget *wv_parent_wid, const char *wv_name, ldh_tWBContext wv_wbctx, char *volumename, int (*bc_success)( void *, pwr_tVolumeId *, int), void (*bc_cancel)(), int (*bc_time_to_exit)( void *), int show_volumes, wb_eType wv_wb_type) : WVsel(status,wv_parent_ctx,wv_name,wv_wbctx,volumename,bc_success,bc_cancel, bc_time_to_exit,show_volumes,wv_wb_type), parent_wid(wv_parent_wid) { int sts; pwr_tVolumeId volid, *volume_ptr; pwr_tVolumeId volume; pwr_tClassId classid; char volname[80]; int size; int volume_count; int display_window; GtkCellRenderer *text_renderer; GtkTreeViewColumn *name_column; strcpy( volname, ""); if ( volumename != NULL && *volumename != 0 && !show_volumes) /* Start the navigater for this volume */ strcpy( volname, volumename); else if ( !show_volumes && wb_type != wb_eType_Buffer) { /* If there is only one volume in the db, select this volume */ volume_count = 0; sts = ldh_GetVolumeList( wbctx, &volume); while ( ODD(sts) ) { sts = ldh_GetVolumeClass( wbctx, volume, &classid); if (EVEN(sts)) { *status = sts; return; } if ( cdh_isClassVolumeClass( classid) || classid == pwr_eClass_WorkBenchVolume || volume == ldh_cRtVolume) { sts = ldh_GetNextVolume( wbctx, volume, &volume); continue; } sts = ldh_VolumeIdToName( wbctx, volume, volname, sizeof(volname), &size); if (EVEN(sts)) { *status = sts; return; } volume_count++; sts = ldh_GetNextVolume( wbctx, volume, &volume); } if ( volume_count != 1) strcpy( volname, ""); } // If volume name is supplied, find this volume and open the navigator. if ( strcmp( volname, "") && wb_type != wb_eType_Buffer) /* Check syntax, if new volumes is found, show the window */ sts = check_volumelist( 1, &display_window); if ( strcmp( volname, "") && !display_window) { sts = ldh_VolumeNameToId( wbctx, volname, &volid); WFoe::error_msg(sts); if ( ODD(sts)) { volume_ptr = (pwr_tVolumeId *) calloc( 1, sizeof( pwr_tVolumeId)); *volume_ptr = volid; (vsel_bc_success) ( (void *)this, volume_ptr, 1); if (vsel_bc_cancel != NULL) (vsel_bc_cancel) (); *status = LOGIN__SUCCESS; return; } else printf( "-- Unable to open volume '%s', volume doesn't exist\n", volname); } // Create the window widgets.toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW, "default-height", 400, "default-width", 500, "title", name, NULL); CoWowGtk::SetWindowIcon( widgets.toplevel); // Menu GtkAccelGroup *accel_g = (GtkAccelGroup *) g_object_new(GTK_TYPE_ACCEL_GROUP, NULL); gtk_window_add_accel_group(GTK_WINDOW(widgets.toplevel), accel_g); GtkMenuBar *menu_bar = (GtkMenuBar *) g_object_new(GTK_TYPE_MENU_BAR, NULL); // File Entry GtkWidget *file_close = gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g); g_signal_connect(file_close, "activate", G_CALLBACK(WVselGtk::activate_close), this); GtkMenu *file_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_close); GtkWidget *file = gtk_menu_item_new_with_mnemonic("_File"); gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), file); gtk_menu_item_set_submenu(GTK_MENU_ITEM(file), GTK_WIDGET(file_menu)); // Functions Entry GtkWidget *functions_showall = gtk_check_menu_item_new_with_mnemonic( "_Show All Volumes"); g_signal_connect( functions_showall, "activate", G_CALLBACK(WVselGtk::activate_showall), this); gtk_widget_add_accelerator( functions_showall, "activate", accel_g, 'a', GdkModifierType(GDK_CONTROL_MASK), GTK_ACCEL_VISIBLE); GtkMenu *functions_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL); gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), functions_showall); GtkWidget *functions = gtk_menu_item_new_with_mnemonic("F_unctions"); gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), functions); gtk_menu_item_set_submenu(GTK_MENU_ITEM(functions), GTK_WIDGET(functions_menu)); // List widget store = gtk_list_store_new( 1, G_TYPE_STRING); widgets.volumelist = (GtkWidget *) g_object_new(GTK_TYPE_TREE_VIEW, "model", store, "rules-hint", TRUE, "headers-visible", FALSE, "reorderable", TRUE, "enable-search", TRUE, "search-column", 0, NULL); text_renderer = gtk_cell_renderer_text_new(); name_column = gtk_tree_view_column_new_with_attributes( NULL, text_renderer, "text", 0, NULL); g_object_set( name_column, "resizable", TRUE, "clickable", TRUE, NULL); gtk_tree_view_append_column( GTK_TREE_VIEW(widgets.volumelist), name_column); GtkWidget *ok_button = gtk_button_new_with_label( "Ok"); gtk_widget_set_size_request( ok_button, 70, 25); g_signal_connect( ok_button, "clicked", G_CALLBACK(activate_ok), this); GtkWidget *cancel_button = gtk_button_new_with_label( "Cancel"); gtk_widget_set_size_request( cancel_button, 70, 25); g_signal_connect( cancel_button, "clicked", G_CALLBACK(activate_cancel), this); GtkWidget *hboxbuttons = gtk_hbox_new( TRUE, 40); gtk_box_pack_start( GTK_BOX(hboxbuttons), ok_button, FALSE, FALSE, 20); gtk_box_pack_end( GTK_BOX(hboxbuttons), cancel_button, FALSE, FALSE, 20); GtkWidget *scrolled_window = gtk_scrolled_window_new( NULL, NULL); gtk_container_add( GTK_CONTAINER( scrolled_window), widgets.volumelist); GtkWidget *vbox = gtk_vbox_new( FALSE, 0); gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(menu_bar), FALSE, FALSE, 0); gtk_box_pack_start( GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0); gtk_box_pack_end( GTK_BOX(vbox), hboxbuttons, FALSE, FALSE, 10); gtk_container_add( GTK_CONTAINER(widgets.toplevel), vbox); gtk_widget_show_all( widgets.toplevel); // GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(widgets.volumelist)); // gtk_tree_selection_set_mode( selection, GTK_SELECTION_SINGLE); sts = load_volumelist(); WFoe::error_msg(sts); // Set input focus to the scrolled list widget gtk_widget_grab_focus( widgets.volumelist); wow = new CoWowGtk( widgets.toplevel); if ( wb_type != wb_eType_Buffer) sts = check_volumelist( 0, &display_window); *status = LOGIN__SUCCESS; }