GNOME Bugzilla – Bug 697030
Should use AnjutaCloseButton in message-view tabs
Last modified: 2013-04-14 20:54:29 UTC
gEdit, Glade, DevHelp, Nautilus, GNOME Terminal and other GNOME applications uses the symbolic icon "window-close-symbolic" for the close button in the tabs of their GtkNotebook. Because Anjuta doesn't use it, the buttons in Anjuta for tabs are a bit larger than in other applications, since it uses the stock image for close instead of the symbolic icon. Seems like other GNOME applications contain a source file (gedit-close-button.c in gEdit) to create a close button. It contains code to set the size of the button and loading It probably came from gEdit. Plugins like project-manager and message-view also need it. Should we add this source file to Anjuta too, to make close buttons smaller and to make it consistent with other applications? Or should we change each plugin manually to use those symbolic icons? I think adding this module to libanjuta is a good thing, so that we could just create instances of an AnjutaCloseButton in each plugin. Though I don't see any other applications that include their *CloseButton widget to their API. I also used an add button for the tabs of devhelp and terminal plugins. I used the stock image for add, which made the tab labels larger and to have two lines instead of one.
Probably best to add anjuta-close-button.[ch] to libanjuta and reuse the button in the plugins. We actually do some magic of the close button to shrink it already but it might not be the best way (even if the code was initially copied from gedit).
Maybe we could change it into something like AnjutaSymbolicButton or AnjutaIconButton? Because some plugins also uses icons for add and remove in their grips, the bookmarks pane for example. Then it needs an additional property, like "icon-name", that could be set to the name of the icon, like "window-close-symbolic".
Created attachment 240919 [details] [review] Add close button from gEdit I removed "gEdit" in the license and replaced with "This library".
Created attachment 240920 [details] [review] Replace close button in tabs and search box
Created attachment 240921 [details] [review] Replace close button in tabs of message-view
For comment #2, I just changed the close buttons because I think the go back and forward buttons of Devhelp won't look good in symbolic icons. But if you still want all buttons in grips to use symbolic icons to make them smaller, I will update the patches.
Created attachment 241079 [details] [review] Replace close button in tabs of message-view Forgot to include header.
*** Bug 697760 has been marked as a duplicate of this bug. ***
I have commited https://bugzilla.gnome.org/attachment.cgi?id=240919 and https://bugzilla.gnome.org/attachment.cgi?id=240920 with some small changes. I did not commit the patch for the message view since AnjutaTabber doesn't really play well with the new AnjutaCloseButton. I'm retitling the bug to using AnjutaCloseButton in the message-view once AnjutaTabber is fixed.
The following fix has been pushed: 7ce0955 message-view: Use AnjutaCloseButton in tabs
Created attachment 241529 [details] [review] message-view: Use AnjutaCloseButton in tabs