Example #1
0
/*  Called by the plugin system the first time the plugin is probed.
 *  Does any one-time initialization for the plugin.
 */
static void
init_plugin_hook(PurplePlugin *plugin) {
    purple_debug_info(PLUGIN_ID, "AKA Plugin Initialized.\n") ;
    /*  Initialize the plugin's preferences  */
    init_prefs(plugin) ;
    /*  Done, nothing to return  */
    return ;
}
Example #2
0
static void init_plugin(PurplePlugin *plugin)
{
  thisplugin = plugin;

#ifdef ENABLE_NLS
  bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
  bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */

  /* translate name, summary and description */
  info.name        = _(PLUGIN_NAME);
  info.summary     = _(PLUGIN_SUMMARY);
  info.description = _(PLUGIN_DESCRIPTION);

  /* load or create preferences */
  init_prefs();
}
Example #3
0
void init_subsystems(){
 init_cal();
 init_cli_macro();
 init_clipboard();
 init_commandline();
 init_evilloop();
 init_exec_cmd();
 init_expanded();
 init_file();
 init_file_ascii();
 init_file_help();
 init_file_hnb();
 init_file_html();
 init_file_opml();
 init_file_ps();
 init_file_xml();
 init_go();
 init_insertbelow();
 init_keepstate();
 init_mem();
 init_movenode();
 init_nodetest();
 init_outdent_indent();
 init_prefs();
 init_query();
 init_quit();
 init_remove();
 init_search();
 init_sort();
 init_spell();
 init_stats();
 init_tree_todo();
 init_ui_binding();
 init_ui_cli();
 init_ui_draw();
 init_ui_edit();
 init_ui_menu();
 init_ui_overlay();
 init_ui_style();
}
Example #4
0
int main(int argc, char* argv[]) 
{

  char *orpg_build_str; 

  Atom WM_DELETE_WINDOW;

/*   char *charval=NULL; */


int standalone_flag = FALSE;


/*    if((charval = getenv("STANDALONE_CVG")) != NULL)  */
/*        standalone_flag = TRUE; */
/*    else  */
/*        standalone_flag = FALSE; */



#ifdef LITTLE_ENDIAN_MACHINE
    fprintf(stderr, "\nThis CVG binary was compiled for the PC Linux Platform.\n");
#else
    fprintf(stderr, "\nThis CVG binary was compiled for the Solaris Sparc Platform.\n");
#endif



#ifdef LIB_LINK_STATIC
standalone_flag = TRUE;
#endif

#ifdef LIB_LINK_DYNAMIC
standalone_flag = FALSE;
#endif


  /* check presence of required libraries    */
  /* function has some dependency on cvg.mak */
  check_libraries(standalone_flag);

  init_prefs();
                                                  
  fprintf(stderr,"CVG START - FINISHED INITIALIZING PREFERENCES\n");


  if(standalone_flag == TRUE) {
      use_cvg_list_flag = prev_cvg_list_flag = TRUE;                
  } else {
      use_cvg_list_flag = prev_cvg_list_flag = FALSE;
  } 
  write_descript_source(use_cvg_list_flag);




  /*  should be moved to preferences!! */
  if((orpg_build_str = getenv("CV_ORPG_BUILD")) == NULL) {
        orpg_build_i = CVG_DEFAULT_BUILD;
        printf("Variable CV_ORPG_BUILD is not set.  CVG assumes default build %d\n", orpg_build_i);
  } else {
        orpg_build_i = atoi(orpg_build_str);  
        printf("CVG using variable CV_ORPG_BUILD to set ORPG Build to %d\n", orpg_build_i); 
  }
  write_orpg_build(orpg_build_i);



  shell = XtAppInitialize(&app,"CVG.RESOURCE",NULL,0,&argc,argv,fallbacks,
                             NULL,0);

  /* intercept the normal window menu 'Close' function */
  XtVaSetValues(shell, XmNdeleteResponse, XmDO_NOTHING, NULL);
  WM_DELETE_WINDOW = XInternAtom ( XtDisplay(shell), "WM_DELETE_WINDOW", FALSE );
  XmAddWMProtocolCallback ( shell, WM_DELETE_WINDOW, exit_callback, NULL );


/* set attrribute so radio buttons are always round */
/*  REQUIRED ON LINUX */
XtVaSetValues(XmGetXmDisplay(XtDisplay(shell)),
     XmNenableToggleVisual,     TRUE,
     NULL);


  
  XtVaSetValues(shell, 
		XmNtitle,  CVG_VERSION_STRING, 


#ifdef SUNOS
                XmNwidth,  615,
                XmNheight, 560,
#endif
#ifdef LINUX
                XmNwidth,  610,
                XmNheight, 570,
#endif


        XmNmwmDecorations,    MWM_DECOR_BORDER^MWM_DECOR_MINIMIZE^MWM_DECOR_TITLE^MWM_DECOR_MENU,
/*  limit available window functions */
        XmNmwmFunctions,      MWM_FUNC_CLOSE^MWM_FUNC_MINIMIZE^MWM_FUNC_MOVE,

        XmNx,         10,
        XmNy,         5, 

/* LINUX KDE ISSUE -  it wouold be convenient to allow the
   applicaion shell to be sized by the widgets by
       a. not specifying an initial size for the shell
       b. setting XmNallowShellResize to TRUE BEFORE widgets are managed
   however when using a SelectionBox with the application shell
   on Linux, KDE crashes when no ititial size is specified for the shell
*/
/*Also, when specifying an initial size for the application shell
    a warning that DialogStype should be XmDIALOG_MODELESS is provided
*/
/* Note: a combination of
       a. Initial size specified for shell
       b. setting XmNallowShellResize to TRUE AFTER managing all widgets
   results in the initial movement of the window, three row selection
   list, and a problem displaying all wigets
*/

/* XmNallowShellResize, TRUE, */
		NULL);
 

  XtRealizeWidget(shell);


  init_globals();
                                                
  fprintf(stderr,"CVG START - FINISHED INITIALIZING GLOBAL DATA\n");  
  
  load_prefs();


  /* CVG 9.1 - erase existing cvg product list to avoid potential problems */
  sprintf(list_fname, "%s/cvg_db_list.lb", config_dir); 
  if(stat(list_fname, &db_list_stat) == 0) {
    res = remove(list_fname);
    fprintf(stderr,"Removed existing cvg product list\n");
  }


  fprintf(stderr,"CVG START - FINISHED LOADING PREFERENCES\n");


/* /// CODE FOR BACKGROUND TASK /////// */

  new_pid = fork();

  switch(new_pid) {
    
      case  -1:  /* Error */
           perror("fork failed");
           exit(1);    
      case  0:  /* child */
         { /*  begin child block */
        
/*  future exec'd executable */
           execlp("cvg_read_db", "cvg_read_db", (char *)0);
/*             read_db(); */
            
         } /*  end child block */
           break;
      default:  /* parent */ 

      fprintf(stderr,"CVG START - READ_DATABASE PROCESS STARTED, PID=%d\n",
                        (int) new_pid);


                        
      init_db_prod_list();
/* DEBUG */
/* fprintf(stderr,"DEBUG CVG START - finished init_db_prod_list\n"); */
          
      setup_gui_display(); 
/* DEBUG */
/* fprintf(stderr,"DEBUG CVG START - finished setup_gui_display\n"); */

      XtAppAddTimeOut(app, 5000, build_list, NULL);          
          
      XtAppMainLoop(app);
    
  } /*  end switch */



/* ///////////////////////////////////////// */

/*   XtAppMainLoop(app); */

  return 0;
}