The other day I decided to delete my Ubuntu 11.04 Pidgin and Empathy settle due to its integration.
As soon I started to test the application I found 2 major problems.
- I can not switch between windows with Ctrl + Tab
- I can not close the existing window with Esc or Escape
According to the creators of these are not bugs Empathy, but says Gnome Escape = Cancel and Ctrl + Tab = switch focus between text elements. That is why to be consistent with Gnome not want to put these options in your code.
Then figure out for a long time I found the fix to this problem.
There is a file in the file system are set up where all actions can be performed on our GTK window. These actions have what is called "Accelerators" are keyboard shortcuts.
First we go to the file: / usr / share / empathy / empathy-chat-window.ui
We will edit as sudo (sudo gedit / usr / share / empathy / empathy-chat-window.ui).
Once opened you will see that XML is a common and current with various actions.
First of all you look for the following line:
<object class="GtkAction" id="menu_conv_close">
You will see that below this line there will be some similar to:
key="q" <accelerator modifiers="GDK_CONTROL_MASK"/>
What this says is that to close the conversation not touch Ctrl + K. We want to change it to Escape, then change the line above with:
<accelerator key="Escape"/>
and ready
.
Going to the second problem of changing the windows with Ctrl + Tab is a bit more complicated. By default, GNOME does not let us change the windows with Ctrl + Tab and in turn, does not leave any GTK application bindear a shortcut to the Tab key. If we wanted to do this, we should touch the code and change a FLAG Empathy to let us step on what Gnome says. As this was going to be hard work, decided to change Ctrl + Tab and Ctrl + Shift + Tab to Ctrl + A in this case, which is quite similar.
Then look for now in the same file the following 2 lines
<object class="GtkAction" id="menu_tabs_prev">
<object class="GtkAction" id="menu_tabs_next">
And change the two accelerators. The current shortcuts say to change tab you have to use Ctrl + PageDown, which means that the shortcut I have to use about 3 coats
. Then change the following respectively:
key="a" <accelerator modifiers="GDK_CONTROL_MASK|GDK_SHIFT_MASK"/>
key="a" <accelerator modifiers="GDK_CONTROL_MASK"/>
After that, reboot Empathy and voila!
I leave you my configuration file to decide stepped directly:
<? Xml version = "1.0"?> <! - * - Mode: xml - * -> <object class="GtkUIManager" <interface> id="ui_manager"> <child> <object class = "GtkActionGroup" id = "actiongroup1"> <object class="GtkAction" <child> id="menu_conv"> <property name="name"> menu_conv </ property> <property name="label" translatable="yes"> _Conversation < / property> </ object> </ child> <object class="GtkAction" <child> id="menu_conv_clear"> <property name="stock_id"> gtk-clear </ property> <property name="name"> menu_conv_clear </ property> <property name="label" translatable="yes"> C_lear </ property> </ object> <accelerator key="L" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class = "GtkAction" id = "menu_conv_insert_smiley"> <property name="icon-name"> face-smile </ property> <property name="name"> menu_conv_insert_smiley </ property> <property name = "label" translatable = "yes"> Insert _smiley </ property> </ object> </ child> <object class="GtkToggleAction" <child> id="menu_conv_favorite"> <property name="name"> menu_conv_favorite </ property> <property name = "label" translatable = "yes"> _Favorite Chat Room </ property> </ object> </ child> <object class="GtkToggleAction" <child> id="menu_conv_always_urgent"> <property name="name"> menu_conv_always_urgent </ property> <property name="label" Notify translatable="yes"> for All Messages </ property> </ object> </ child> <object class="GtkToggleAction" <child> id="menu_conv_toggle_contacts"> < property name = "name"> menu_conv_toggle_contacts </ property> <property name="active"> True </ property> <property name="label" translatable="yes"> _Show Contact List </ property> </ object> < / child> <object class="GtkAction" <child> id="menu_conv_invite_participant"> <property name="name"> menu_conv_invite_participant </ property> <property name="label" translatable="yes"> _Participant Invite ... </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_conv_close"> <property name="stock_id"> gtk-close </ property> <property name="name"> menu_conv_close </ property> </ object> <accelerator key="Escape"/> </ child> <object class="GtkAction" <child> id="menu_contact"> <property name="name"> menu_contact </ property> <property name="label" translatable="yes"> C_ontact </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_edit"> <property name="name"> menu_edit </ property> <property name="label" translatable="yes"> _edit </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_edit_cut"> <property name = "stock_id"> gtk-cut </ property> <property name="name"> menu_edit_cut </ property> </ object> <accelerator key="X" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class="GtkAction" id="menu_edit_copy"> <property name="stock_id"> gtk-copy </ property> <property name="name"> menu_edit_copy </ property> </ object> <accelerator key = " C "modifiers =" GDK_CONTROL_MASK "/> </ child> <object class="GtkAction" <child> id="menu_edit_paste"> <property name="stock_id"> gtk-paste </ property> <property name =" name "> menu_edit_paste </ property> </ object> <accelerator key="V" modifiers="GDK_CONTROL_MASK"/> </ child> <object class="GtkAction" <child> id="menu_edit_find"> <property name =" stock_id "> gtk-find </ property> <property name="name"> menu_edit_find </ property> </ object> <accelerator key="F" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class = "GtkAction" id = "menu_tabs"> <property name="name"> menu_tabs </ property> <property name="label" translatable="yes"> _Tabs </ property> </ object> </ child> <object <child> class="GtkAction" id="menu_tabs_prev"> <property name="name"> menu_tabs_prev </ property> <property name="label" translatable="yes"> _Previous Tab </ property> </ object> <accelerator key="a" modifiers="GDK_CONTROL_MASK|GDK_SHIFT_MASK"/> </ child> <object class="GtkAction" <child> id="menu_tabs_next"> <property name="name"> menu_tabs_next </ property > <property name="label" translatable="yes"> _NEXT Tab </ property> </ object> <accelerator key="a" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class = " GtkAction "id =" menu_tabs_undo_close_tab "> <property name="name"> menu_tabs_undo_close_tab </ property> <property name="label" translatable="yes"> _Undo Close Tab </ property> </ object> <accelerator key =" t "modifiers =" GDK_SHIFT_MASK | GDK_CONTROL_MASK "/> </ child> <object class="GtkAction" <child> id="menu_tabs_left"> <property name="name"> menu_tabs_left </ property> <property name =" label "translatable =" yes "> Move Tab _Left </ property> </ object> <accelerator key="Page_Up" modifiers="GDK_CONTROL_MASK|GDK_SHIFT_MASK"/> </ child> <child> <object class =" GtkAction "id = "menu_tabs_right"> <property name="name"> menu_tabs_right </ property> Move Tab <property translatable="yes"> name="label" _Right </ property> </ object> <accelerator key = "PAGE_DOWN" modifiers = "GDK_CONTROL_MASK | GDK_SHIFT_MASK" /> </ child> <object class="GtkAction" <child> id="menu_tabs_detach"> <property name="name"> menu_tabs_detach </ property> <property name = "label" translatable = " yes "> _Detach Tab </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_help"> <property name="name"> menu_help </ property> <property name = "label" translatable = "yes"> _Help </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_help_contents"> <property name="stock_id"> gtk-help < / property> <property name="name"> menu_help_contents </ property> <property name="label" translatable="yes"> _Contents </ property> </ object> <accelerator key = "F1" modifiers = "" / > </ child> <object class="GtkAction" <child> id="menu_help_about"> gtk-about <property name="stock_id"> </ property> <property name="name"> menu_help_about </ property> < / object> </ child> </ object> </ child> <UI> <menubar name="chats_menubar"> <menu action="menu_conv"> <menuitem action="menu_conv_clear"/> <menuitem action = "menu_conv_insert_smiley" /> <menuitem action="menu_conv_favorite"/> <menuitem action="menu_conv_always_urgent"/> <menuitem action="menu_conv_toggle_contacts"/> <menuitem action="menu_conv_invite_participant"/> <separator/> <menuitem action = "menu_conv_close" / > </ menu> <menu action="menu_contact" /> <menu action="menu_edit"> <menuitem action="menu_edit_cut"/> <menuitem action="menu_edit_copy"/> <menuitem action="menu_edit_paste"/> < separator /> <menuitem action="menu_edit_find"/> </ menu> <menu action="menu_tabs"> <menuitem action="menu_tabs_prev"/> <menuitem action="menu_tabs_next"/> <menuitem action = "menu_tabs_undo_close_tab" / > <separator/> <menuitem action="menu_tabs_left"/> <menuitem action="menu_tabs_right"/> <menuitem action="menu_tabs_detach"/> </ menu> <menu action="menu_help"> <menuitem action = "menu_help_contents "/> <placeholder name="LaunchpadItems"/> <menuitem action="menu_help_about"/> </ menu> </ menubar> </ u> </ object> <object class="GtkWindow" id="chat_window"> <property name="title" translatable="yes"> Chat </ property> <property name="role"> chat </ property> <property name="default_width"> 580 </ property> <property name = "default_height "> 480 </ property> <object class="GtkVBox" <child> id="chat_vbox"> <property name="visible"> True </ property> <child> <object class =" GtkMenuBar "builder =" ui_manager "id =" chats_menubar "> <property name="visible"> True </ property> </ object> <property name="expand"> <packing> False </ property> <property name="fill"> False < / property> </ packing> </ child> <child> <placeholder/> </ child> </ object> </ child> </ object> </ interface>
Read More