Set focus on ok button when switch profile window page.

This commit is contained in:
Denis Fomin 2012-06-28 12:49:54 +04:00
parent 7e432b387b
commit 62b0f065dd
2 changed files with 68 additions and 63 deletions

View File

@ -15,6 +15,7 @@
<object class="GtkNotebook" id="information_notebook"> <object class="GtkNotebook" id="information_notebook">
<property name="visible">True</property> <property name="visible">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<signal name="switch_page" handler="on_information_notebook_switch_page"/>
<child> <child>
<object class="GtkTable" id="table2"> <object class="GtkTable" id="table2">
<property name="visible">True</property> <property name="visible">True</property>
@ -31,7 +32,7 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -44,7 +45,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">4</property> <property name="top_attach">4</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">5</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -67,7 +68,7 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -78,7 +79,7 @@
<packing> <packing>
<property name="left_attach">3</property> <property name="left_attach">3</property>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -91,7 +92,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -104,7 +105,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -117,7 +118,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -131,7 +132,7 @@
</object> </object>
<packing> <packing>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -146,7 +147,7 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -161,7 +162,7 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -176,7 +177,7 @@
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -193,7 +194,7 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -218,7 +219,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -229,7 +230,7 @@
<packing> <packing>
<property name="left_attach">3</property> <property name="left_attach">3</property>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -252,7 +253,7 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -263,7 +264,7 @@
<packing> <packing>
<property name="left_attach">3</property> <property name="left_attach">3</property>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -276,7 +277,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -289,7 +290,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -302,7 +303,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -315,7 +316,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -328,7 +329,7 @@
</object> </object>
<packing> <packing>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -343,7 +344,7 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -358,7 +359,7 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -373,7 +374,7 @@
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -390,7 +391,7 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -407,7 +408,7 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
</object> </object>
@ -426,7 +427,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -440,7 +441,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">5</property> <property name="top_attach">5</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">6</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -454,8 +455,8 @@
<packing> <packing>
<property name="top_attach">3</property> <property name="top_attach">3</property>
<property name="bottom_attach">4</property> <property name="bottom_attach">4</property>
<property name="x_options"></property> <property name="x_options"/>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -468,7 +469,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">3</property> <property name="top_attach">3</property>
<property name="bottom_attach">4</property> <property name="bottom_attach">4</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -481,7 +482,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">5</property> <property name="top_attach">5</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">6</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -494,7 +495,7 @@
</object> </object>
<packing> <packing>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -509,7 +510,7 @@
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -524,7 +525,7 @@
<property name="top_attach">5</property> <property name="top_attach">5</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -547,7 +548,7 @@
<property name="top_attach">5</property> <property name="top_attach">5</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -561,7 +562,7 @@
<property name="top_attach">4</property> <property name="top_attach">4</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -576,7 +577,7 @@
<property name="top_attach">6</property> <property name="top_attach">6</property>
<property name="bottom_attach">7</property> <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -672,7 +673,7 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -683,7 +684,7 @@
<packing> <packing>
<property name="left_attach">3</property> <property name="left_attach">3</property>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -696,7 +697,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -709,7 +710,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -722,7 +723,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">3</property> <property name="top_attach">3</property>
<property name="bottom_attach">4</property> <property name="bottom_attach">4</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -745,7 +746,7 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -756,7 +757,7 @@
<packing> <packing>
<property name="left_attach">3</property> <property name="left_attach">3</property>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -769,7 +770,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -782,7 +783,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -795,7 +796,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -808,7 +809,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -821,7 +822,7 @@
</object> </object>
<packing> <packing>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -836,7 +837,7 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -851,7 +852,7 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -866,7 +867,7 @@
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -883,7 +884,7 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -900,7 +901,7 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
</object> </object>
@ -919,7 +920,7 @@
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -932,7 +933,7 @@
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">4</property> <property name="top_attach">4</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">5</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -945,7 +946,7 @@
</object> </object>
<packing> <packing>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -960,7 +961,7 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -975,7 +976,7 @@
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -992,7 +993,7 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -1007,7 +1008,7 @@
<property name="top_attach">3</property> <property name="top_attach">3</property>
<property name="bottom_attach">4</property> <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>
@ -1022,7 +1023,7 @@
<property name="top_attach">4</property> <property name="top_attach">4</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child> <child>

View File

@ -73,6 +73,10 @@ class ProfileWindow:
gajim.ged.register_event_handler('vcard-received', ged.GUI1, gajim.ged.register_event_handler('vcard-received', ged.GUI1,
self._nec_vcard_received) self._nec_vcard_received)
self.window.show_all() self.window.show_all()
self.xml.get_object('ok_button').grab_focus()
def on_information_notebook_switch_page(self, widget, page, page_num):
gobject.idle_add(self.xml.get_object('ok_button').grab_focus)
def update_progressbar(self): def update_progressbar(self):
self.progressbar.pulse() self.progressbar.pulse()