After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688603 - document-manager: Update combo filenames when the project changes.
document-manager: Update combo filenames when the project changes.
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: document-manager
unspecified
Other All
: Normal normal
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-18 20:07 UTC by Carl-Anton Ingmarsson
Modified: 2012-11-19 20:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
document-manager: Update combo filenames when the project changes. (3.99 KB, patch)
2012-11-18 20:07 UTC, Carl-Anton Ingmarsson
needs-work Details | Review
document-manager: Update combo filenames when the project changes. (3.98 KB, patch)
2012-11-19 19:49 UTC, Carl-Anton Ingmarsson
committed Details | Review

Description Carl-Anton Ingmarsson 2012-11-18 20:07:05 UTC
So that the filenames always are shown relative to the project root.
Comment 1 Carl-Anton Ingmarsson 2012-11-18 20:07:07 UTC
Created attachment 229305 [details] [review]
document-manager: Update combo filenames when the project changes.
Comment 2 Sébastien Granjoux 2012-11-19 18:11:12 UTC
Review of attachment 229305 [details] [review]:

Thanks for your patch, I have two comments on it.

Why have you removed the lines in value_added_project_root_uri? 
  g_free (doc_plugin->project_name);
  g_free (doc_plugin->project_path);
  doc_plugin->project_name = NULL;
I suppose it's because you have found that value_removed_project_root_uri is always called first. But even in this case, I think it's better to keep it or at least put a comment here saying that value_removed_project_root_uri has to be called first.

I think it's better to not use g_clear_pointer for the moment. It is a new function available in GLib 2.34 while currently Anjuta needs only version 2.32 and I think it's not a major improvement.
Comment 3 Carl-Anton Ingmarsson 2012-11-19 19:49:43 UTC
Created attachment 229401 [details] [review]
document-manager: Update combo filenames when the project changes.
Comment 4 Carl-Anton Ingmarsson 2012-11-19 19:51:38 UTC
Right, I thought value_removed_project_root_uri always would be called before a new value_added_project_root_uri but I now realize that's not true. I've attached a new patch that fixes this and also changes the g_clear_pointer to g_free().
Comment 5 Sébastien Granjoux 2012-11-19 20:01:38 UTC
Comment on attachment 229401 [details] [review]
document-manager: Update combo filenames when the project changes.

Thank again for this patch. I have committed it.