diff --git a/projectparser.anjuta b/projectparser.anjuta index 3c82fa5..4746504 100644 --- a/projectparser.anjuta +++ b/projectparser.anjuta @@ -18,7 +18,7 @@ value="IAnjutaProjectBackend"/> + value="automake"/> top_level = properties; + g_object_ref (properties); + g_signal_connect (properties, "destroy", G_CALLBACK (on_project_widget_destroy), dlg); + + name = g_file_get_parse_name (amp_group_get_directory (group)); + add_label (_("Name:"), name, main_table, 0); + g_free (name); + + gtk_widget_show_all (properties); + g_object_unref (bxml); + + return properties; } GtkWidget * amp_configure_target_dialog (AmpProject *project, AmpTarget *target, GError **error) { - return NULL; + GtkBuilder *bxml = gtk_builder_new (); + GtkWidget *properties; + GtkWidget *main_table; + GtkWidget *extra_table; + AmpConfigureProjectDialog *dlg; + AnjutaProjectTargetType type; + const gchar *name; + + bxml = anjuta_util_builder_new (GLADE_FILE, NULL); + if (!bxml) return NULL; + + dlg = g_new0 (AmpConfigureProjectDialog, 1); + anjuta_util_builder_get_objects (bxml, + "properties", &properties, + "main_table", &main_table, + "extra_table", &extra_table, + NULL); + dlg->top_level = properties; + g_object_ref (properties); + g_signal_connect (properties, "destroy", G_CALLBACK (on_project_widget_destroy), dlg); + + name = amp_target_get_name (target); + add_label (_("Name:"), name, main_table, 0); + type = anjuta_project_target_get_type (target); + add_label (_("Type:"), anjuta_project_target_type_name (type), main_table, 1); + + gtk_widget_show_all (properties); + g_object_unref (bxml); + + return properties; } GtkWidget * diff --git a/src/am-project.c b/src/am-project.c index 17fbc8f..2583099 100644 --- a/src/am-project.c +++ b/src/am-project.c @@ -2728,6 +2728,22 @@ iproject_remove_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err return TRUE; } +static GtkWidget* +iproject_configure_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err) +{ + switch (AMP_NODE_DATA (node)->type) + { + case ANJUTA_PROJECT_GROUP: + return amp_configure_group_dialog (AMP_PROJECT (obj), AMP_GROUP (node), err); + case ANJUTA_PROJECT_TARGET: + return amp_configure_target_dialog (AMP_PROJECT (obj), AMP_TARGET (node), err); + case ANJUTA_PROJECT_SOURCE: + return amp_configure_source_dialog (AMP_PROJECT (obj), AMP_SOURCE (node), err); + default: + return NULL; + } +} + static void iproject_iface_init(IAnjutaProjectIface* iface) { @@ -2742,6 +2758,7 @@ iproject_iface_init(IAnjutaProjectIface* iface) iface->load = iproject_load; iface->refresh = iproject_refresh; iface->remove_node = iproject_remove_node; + iface->configure_node = iproject_configure_node; } /* Group access functions diff --git a/src/am-project.ui b/src/am-project.ui index 931f50b..288626b 100644 --- a/src/am-project.ui +++ b/src/am-project.ui @@ -1,7 +1,7 @@ - + Select package 600 @@ -416,4 +416,248 @@ + + Properties + True + 400 + True + dialog + + + True + vertical + 6 + + + True + 6 + 5 + 3 + 6 + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 2 + + + + + True + True + 6 + + + True + 3 + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + More options: + + + + + 3 + + + + + True + end + + + gtk-cancel + True + True + True + True + True + + + False + False + 0 + + + + + gtk-apply + True + True + True + True + True + + + False + False + 1 + + + + + False + end + 0 + + + + + + cancel_button + ok_button + + + + True + vertical + + + True + 3 + 2 + 12 + 6 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + True + True + + + True + 3 + 2 + 12 + 6 + + + + + + + + + + + + + + + + + + + + + + + True + More options: + + + + + 1 + + +