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 691445 - Add new quick-open plugin.
Add new quick-open plugin.
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: unknown
unspecified
Other All
: Normal normal
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-09 20:58 UTC by Carl-Anton Ingmarsson
Modified: 2013-01-18 22:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add new quick-open plugin. (54.15 KB, patch)
2013-01-09 20:58 UTC, Carl-Anton Ingmarsson
reviewed Details | Review
Add new quick-open plugin. (54.64 KB, patch)
2013-01-18 16:47 UTC, Carl-Anton Ingmarsson
none Details | Review
Add new quick-open plugin. (54.80 KB, patch)
2013-01-18 17:49 UTC, Carl-Anton Ingmarsson
committed Details | Review

Description Carl-Anton Ingmarsson 2013-01-09 20:58:28 UTC
The quick-open plugin lets you quickly open project files and switch to
already open files.
Comment 1 Carl-Anton Ingmarsson 2013-01-09 20:58:31 UTC
Created attachment 233104 [details] [review]
Add new quick-open plugin.
Comment 2 Sébastien Granjoux 2013-01-11 22:04:43 UTC
Review of attachment 233104 [details] [review]:

Thank for your new plugin.

First, I would prefer to wait a bit before committing it because it needs Gtk+ 3.6 while I still have Gtk+ 3.4. It's only for the GtkSearchEntry, I have replaced it by a GtkEntry to see how it looks like. I prefer to depend on older libraries to be able to compile the program on more systems. On the other hand, I understand that we need to use recent version to check them. I don't know what is you opinion about it. Perhaps one option could be to use GTK_CHECK_VERSION and replace the GtkSearchEntry by a GtkEntry if the version of Gtk is too old. In this case it's easy. What do you think?

Then, a more general comment, I think the function is quite useful but is not very integrated in Anjuta. I think that it would be better to replace the current default search function of the project tree view by your dialog. It will need quite some work though. I think the tree view of your current dialog is not needed as you can use the project one. You will have to expand the tree node in the project view as needed. You need to handle the shortcuts too. And this will probably be possible only by adding your code to the project manager plugin. I don't know if you want to do all this work, so it can just stay as a nice idea for improvement or perhaps there are good reasons to keep it as it is now.
Comment 3 Carl-Anton Ingmarsson 2013-01-18 16:47:46 UTC
Created attachment 233771 [details] [review]
Add new quick-open plugin.

The quick-open plugin lets you quickly open project files and switch to
already open files.

https://bugzilla.gnome.org/show_bug.cgi?id=691445

quick-open: disconnect watch on IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT.

quick-open: focus search entry on show.

Also make the tree view non focusable.

quick-open: don't use anjuta_shell_get_interface() during deactivation.

It may cause plugins to get activated again.
Comment 4 Carl-Anton Ingmarsson 2013-01-18 16:59:18 UTC
(In reply to comment #2)
> Review of attachment 233104 [details] [review]:
> 
> Thank for your new plugin.
> 
> First, I would prefer to wait a bit before committing it because it needs Gtk+
> 3.6 while I still have Gtk+ 3.4. It's only for the GtkSearchEntry, I have
> replaced it by a GtkEntry to see how it looks like. I prefer to depend on older
> libraries to be able to compile the program on more systems. On the other hand,
> I understand that we need to use recent version to check them. I don't know
> what is you opinion about it. Perhaps one option could be to use
> GTK_CHECK_VERSION and replace the GtkSearchEntry by a GtkEntry if the version
> of Gtk is too old. In this case it's easy. What do you think?

That should be easily doable, I'll attach a new patch that does that.

> Then, a more general comment, I think the function is quite useful but is not
> very integrated in Anjuta. I think that it would be better to replace the
> current default search function of the project tree view by your dialog. It
> will need quite some work though. I think the tree view of your current dialog
> is not needed as you can use the project one. You will have to expand the tree
> node in the project view as needed. You need to handle the shortcuts too. And
> this will probably be possible only by adding your code to the project manager
> plugin. I don't know if you want to do all this work, so it can just stay as a
> nice idea for improvement or perhaps there are good reasons to keep it as it is
> now.

Hmm, that would perhaps be better, although I think the scope of the quick-open plugin is somewhat different. For one it includes not only project files but also the currently open files. It also sorts the open files first so that it can be used to quickly switch between files. I think I would prefer to keep it as it is for now and leave improvements for later.
Comment 5 Carl-Anton Ingmarsson 2013-01-18 17:49:30 UTC
Created attachment 233775 [details] [review]
Add new quick-open plugin.

The quick-open plugin lets you quickly open project files and switch to
already open files.

https://bugzilla.gnome.org/show_bug.cgi?id=691445

quick-open: disconnect watch on IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT.

quick-open: focus search entry on show.

Also make the tree view non focusable.

quick-open: don't use anjuta_shell_get_interface() during deactivation.

It may cause plugins to get activated again.

quick-open: Only use GtkSearchEntry if gtk+ version is atleast 3.6
Comment 6 Sébastien Granjoux 2013-01-18 22:04:18 UTC
Review of attachment 233775 [details] [review]:

Thanks for this plugin, I have committed it. Then, I think it would be nice to add something in the documentation about it. I know that most plugins are not well documented but I think it's useful for the user to understand how the plugin will help him.