Ignore:
Timestamp:
05/04/10 15:14:08 (3 years ago)
Author:
Matias De la Puente <mfpuente.ar@…>
Children:
222b8db664140ef6c8b5015a5ca71167687ffe92
Parents:
7de01d30f19e0a3d6ec5aeb01b43dbe0c3dcc010
git-committer:
Matias De la Puente <mfpuente.ar@…> (05/04/10 15:14:08)
Message:

Projects: Add 'new' action

Recycle and improve NewProjectDialog? from old i4uc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libi4uc/i4ucprojectsview.vala

    rc5050d6 re7bab96  
    6363        } 
    6464 
     65        public int show_new_dialog (out string project_uri, out string project_name, out Gee.List<string> authors) 
     66        { 
     67                var dialog = new NewProjectDialog (); 
     68                var response = dialog.run (); 
     69 
     70                project_uri = dialog.uri; 
     71                project_name = dialog.name; 
     72                authors = dialog.authors; 
     73 
     74                dialog.destroy (); 
     75                return response; 
     76        } 
     77 
    6578        public void show_open_dialog (ref string folder_uri, out Gee.List<string> projects) 
    6679        { 
     
    8699                dialog.destroy (); 
    87100        } 
     101 
     102        private void on_new () 
     103        { 
     104                this.new_clicked (); 
     105        } 
    88106         
    89107        private void on_open () 
     
    100118        { 
    101119                { "ProjectsMenuAction", null, N_("_Projects") }, 
     120                { "NewProjectAction", STOCK_NEW, null, null, N_("Create a new project"), on_new }, 
    102121                { "OpenProjectAction", STOCK_OPEN, null, null, N_("Open a project"), on_open }, 
    103122                { "CloseProjectAction", STOCK_CLOSE, null, null, N_("Close current project"), on_close } 
     
    109128                <placeholder name="MenuBarOps"> 
    110129                        <menu name="ProjectsMenu" action="ProjectsMenuAction"> 
     130                                <menuitem action="NewProjectAction"/> 
    111131                                <menuitem action="OpenProjectAction"/> 
    112132                                <separator/> 
Note: See TracChangeset for help on using the changeset viewer.