Re: [anjuta-devel] Improvements in project manager



Hi Johannes,


Le 30/12/2011 18:26, Johannes Schmid a écrit :
* I plan to write a special combo box for selecting targets.
That would be great!

I don't know what will be the best way to implement this.

1. Implement everything in the project manager plugin
GtkWidget *ianjuta_project_manager_chooser_new (IAnjutaProjectManager *obj, GError **error);

The returned GtkWidget implement a new IAnjutaProjectChooser interface which has one function
GFile *ianjuta_project_chooser_get_active (IAnjutaProjectChooser *chooser)

+ Everything is implemented in the project manager plugin and can be changed easily
- We need one additional interface IAnjutaProjectChosser
- We cannot add the target selection widget in the gtk builder file, it has to be created in the program.


2. Add only functions in the project manager plugin
void ianjuta_project_manager_setup_target_chooser (IAnjutaProjectManager *obj, GtkWidget *combo, GError **error); GFile ianjuta_project_manager_get_active (IAnjutaProjectManager *obj, GtkWidget *combo, GError **error);

+ Don't need an additional interface
+ We can add GtkComboBox or AnjutaTreeCombo in the gtk builder file and pass this widget to setup_target_chooser that will set the model and the appropriate view. - The target selection combo box is not really an independent object as it needs the project manager.


3. Standardize project model.
GtkTreeModel ianjuta_project_manager_get_model (IAnjutaProjectManager *obj, GError **error);

GFile * anjuta_project_chooser_get_active (GtkWidget *combo);

+ We can add GtkComboBox or an AnjutaTreeCombo in the gtk builder file then get the model from the project manager and associate it with the combo box. As the model has some standard column, the view can be implemented in libanjuta. - We need to standardize some column in the GtkTreeModel used by the project manager. Perhaps only one column containing the AnjutaProjectNode pointer could be enough.


Regards,

Sébastien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]