Commit f9d832175114eab3abf8b99b06cb759bfa649387
1 parent
cd579e99
Exists in
master
and in
4 other branches
Adding function bar.
Showing
2 changed files
with
188 additions
and
2 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,158 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!-- | |
| 3 | + | |
| 4 | + Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
| 5 | + (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
| 6 | + aplicativos mainframe. Registro no INPI sob o nome G3270. | |
| 7 | + | |
| 8 | + Copyright (C) <2008> <Banco do Brasil S.A.> | |
| 9 | + | |
| 10 | + Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
| 11 | + os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
| 12 | + Free Software Foundation. | |
| 13 | + | |
| 14 | + Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
| 15 | + GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
| 16 | + A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
| 17 | + obter mais detalhes. | |
| 18 | + | |
| 19 | + Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
| 20 | + programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | |
| 21 | + St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 22 | + | |
| 23 | + | |
| 24 | + Contatos: | |
| 25 | + | |
| 26 | + perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
| 27 | + erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
| 28 | + | |
| 29 | +--> | |
| 30 | +<interface> | |
| 31 | + | |
| 32 | + <keypad name="bottom_keypad" position="bottom" width='12'> | |
| 33 | + | |
| 34 | + <attribute name='label' translatable='yes'>Function bar</attribute> | |
| 35 | + | |
| 36 | + <button> | |
| 37 | + <attribute name="label" translatable="no">PF1</attribute> | |
| 38 | + <attribute name="action">win.pfkey(1)</attribute> | |
| 39 | + </button> | |
| 40 | + | |
| 41 | + <button> | |
| 42 | + <attribute name="label" translatable="no">PF2</attribute> | |
| 43 | + <attribute name="action">win.pfkey(2)</attribute> | |
| 44 | + </button> | |
| 45 | + | |
| 46 | + <button> | |
| 47 | + <attribute name="label" translatable="no">PF3</attribute> | |
| 48 | + <attribute name="action">win.pfkey(3)</attribute> | |
| 49 | + </button> | |
| 50 | + | |
| 51 | + <button> | |
| 52 | + <attribute name="label" translatable="no">PF4</attribute> | |
| 53 | + <attribute name="action">win.pfkey(4)</attribute> | |
| 54 | + </button> | |
| 55 | + | |
| 56 | + <button> | |
| 57 | + <attribute name="label" translatable="no">PF5</attribute> | |
| 58 | + <attribute name="action">win.pfkey(5)</attribute> | |
| 59 | + </button> | |
| 60 | + | |
| 61 | + <button> | |
| 62 | + <attribute name="label" translatable="no">PF6</attribute> | |
| 63 | + <attribute name="action">win.pfkey(6)</attribute> | |
| 64 | + </button> | |
| 65 | + | |
| 66 | + <button> | |
| 67 | + <attribute name="label" translatable="no">PF7</attribute> | |
| 68 | + <attribute name="action">win.pfkey(7)</attribute> | |
| 69 | + </button> | |
| 70 | + | |
| 71 | + <button> | |
| 72 | + <attribute name="label" translatable="no">PF8</attribute> | |
| 73 | + <attribute name="action">win.pfkey(8)</attribute> | |
| 74 | + </button> | |
| 75 | + | |
| 76 | + <button> | |
| 77 | + <attribute name="label" translatable="no">PF9</attribute> | |
| 78 | + <attribute name="action">win.pfkey(9)</attribute> | |
| 79 | + </button> | |
| 80 | + | |
| 81 | + <button> | |
| 82 | + <attribute name="label" translatable="no">PF10</attribute> | |
| 83 | + <attribute name="action">win.pfkey(10)</attribute> | |
| 84 | + </button> | |
| 85 | + | |
| 86 | + <button> | |
| 87 | + <attribute name="label" translatable="no">PF11</attribute> | |
| 88 | + <attribute name="action">win.pfkey(11)</attribute> | |
| 89 | + </button> | |
| 90 | + | |
| 91 | + <button> | |
| 92 | + <attribute name="label" translatable="no">PF12</attribute> | |
| 93 | + <attribute name="action">win.pfkey(12)</attribute> | |
| 94 | + </button> | |
| 95 | + | |
| 96 | + <button> | |
| 97 | + <attribute name="label" translatable="no">PF13</attribute> | |
| 98 | + <attribute name="action">win.pfkey(13)</attribute> | |
| 99 | + </button> | |
| 100 | + | |
| 101 | + <button> | |
| 102 | + <attribute name="label" translatable="no">PF14</attribute> | |
| 103 | + <attribute name="action">win.pfkey(14)</attribute> | |
| 104 | + </button> | |
| 105 | + | |
| 106 | + <button> | |
| 107 | + <attribute name="label" translatable="no">PF15</attribute> | |
| 108 | + <attribute name="action">win.pfkey(15)</attribute> | |
| 109 | + </button> | |
| 110 | + | |
| 111 | + <button> | |
| 112 | + <attribute name="label" translatable="no">PF16</attribute> | |
| 113 | + <attribute name="action">win.pfkey(16)</attribute> | |
| 114 | + </button> | |
| 115 | + | |
| 116 | + <button> | |
| 117 | + <attribute name="label" translatable="no">PF17</attribute> | |
| 118 | + <attribute name="action">win.pfkey(17)</attribute> | |
| 119 | + </button> | |
| 120 | + | |
| 121 | + <button> | |
| 122 | + <attribute name="label" translatable="no">PF18</attribute> | |
| 123 | + <attribute name="action">win.pfkey(18)</attribute> | |
| 124 | + </button> | |
| 125 | + | |
| 126 | + <button> | |
| 127 | + <attribute name="label" translatable="no">PF19</attribute> | |
| 128 | + <attribute name="action">win.pfkey(19)</attribute> | |
| 129 | + </button> | |
| 130 | + | |
| 131 | + <button> | |
| 132 | + <attribute name="label" translatable="no">PF20</attribute> | |
| 133 | + <attribute name="action">win.pfkey(20)</attribute> | |
| 134 | + </button> | |
| 135 | + | |
| 136 | + <button> | |
| 137 | + <attribute name="label" translatable="no">PF21</attribute> | |
| 138 | + <attribute name="action">win.pfkey(21)</attribute> | |
| 139 | + </button> | |
| 140 | + | |
| 141 | + <button> | |
| 142 | + <attribute name="label" translatable="no">PF22</attribute> | |
| 143 | + <attribute name="action">win.pfkey(22)</attribute> | |
| 144 | + </button> | |
| 145 | + | |
| 146 | + <button> | |
| 147 | + <attribute name="label" translatable="no">PF23</attribute> | |
| 148 | + <attribute name="action">win.pfkey(23)</attribute> | |
| 149 | + </button> | |
| 150 | + | |
| 151 | + <button> | |
| 152 | + <attribute name="label" translatable="no">PF24</attribute> | |
| 153 | + <attribute name="action">win.pfkey(24)</attribute> | |
| 154 | + </button> | |
| 155 | + | |
| 156 | + </keypad> | |
| 157 | + | |
| 158 | +</interface> | ... | ... |
src/objects/window/window.c
| ... | ... | @@ -222,8 +222,22 @@ |
| 222 | 222 | if(keypads) { |
| 223 | 223 | |
| 224 | 224 | GtkBox * hBox = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0)); |
| 225 | + GtkBox * vBox = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL,0)); | |
| 225 | 226 | GList * keypad; |
| 226 | 227 | |
| 228 | + // Add top Keypads | |
| 229 | + for(keypad = keypads;keypad;keypad = g_list_next(keypad)) { | |
| 230 | + | |
| 231 | + if(pw3270_keypad_get_position(G_OBJECT(keypad->data)) == KEYPAD_POSITION_TOP) { | |
| 232 | + gtk_box_pack_start( | |
| 233 | + vBox, | |
| 234 | + pw3270_keypad_get_from_model(G_OBJECT(keypad->data)), | |
| 235 | + FALSE,FALSE,0 | |
| 236 | + ); | |
| 237 | + } | |
| 238 | + } | |
| 239 | + | |
| 240 | + | |
| 227 | 241 | // Add left keypads |
| 228 | 242 | for(keypad = keypads;keypad;keypad = g_list_next(keypad)) { |
| 229 | 243 | |
| ... | ... | @@ -237,7 +251,21 @@ |
| 237 | 251 | } |
| 238 | 252 | |
| 239 | 253 | // Add center notebook |
| 240 | - gtk_box_pack_start(hBox,GTK_WIDGET(widget->notebook),TRUE,TRUE,0); | |
| 254 | + gtk_box_pack_start(vBox,GTK_WIDGET(widget->notebook),TRUE,TRUE,0); | |
| 255 | + gtk_box_pack_start(hBox,GTK_WIDGET(vBox),TRUE,TRUE,0); | |
| 256 | + | |
| 257 | + // Add bottom keypads | |
| 258 | + for(keypad = keypads;keypad;keypad = g_list_next(keypad)) { | |
| 259 | + | |
| 260 | + if(pw3270_keypad_get_position(G_OBJECT(keypad->data)) == KEYPAD_POSITION_BOTTOM) { | |
| 261 | + gtk_box_pack_end( | |
| 262 | + vBox, | |
| 263 | + pw3270_keypad_get_from_model(G_OBJECT(keypad->data)), | |
| 264 | + FALSE,FALSE,0 | |
| 265 | + ); | |
| 266 | + } | |
| 267 | + } | |
| 268 | + | |
| 241 | 269 | |
| 242 | 270 | // Add right keypads |
| 243 | 271 | for(keypad = keypads;keypad;keypad = g_list_next(keypad)) { |
| ... | ... | @@ -251,9 +279,9 @@ |
| 251 | 279 | } |
| 252 | 280 | } |
| 253 | 281 | |
| 254 | - | |
| 255 | 282 | // Add it to the container |
| 256 | 283 | gtk_widget_show(GTK_WIDGET(hBox)); |
| 284 | + gtk_widget_show(GTK_WIDGET(vBox)); | |
| 257 | 285 | gtk_box_pack_start(container,GTK_WIDGET(hBox),TRUE,TRUE,0); |
| 258 | 286 | |
| 259 | 287 | } else { | ... | ... |