| 1 |
|
| 2 |
<?xml version="1.0" encoding="UTF-8"?> |
| 3 |
<interface> |
| 4 |
<object class="GtkWindow" id="window"> |
| 5 |
<property name="resizable">1</property> |
| 6 |
<property name="title">Clipboard</property> |
| 7 |
<accessibility> |
| 8 |
<relation name="described-by">label</relation> |
| 9 |
</accessibility> |
| 10 |
<property name="child"> |
| 11 |
<object class="GtkBox"> |
| 12 |
<property name="orientation">vertical</property> |
| 13 |
<property name="margin-start">12</property> |
| 14 |
<property name="margin-end">12</property> |
| 15 |
<property name="margin-top">12</property> |
| 16 |
<property name="margin-bottom">12</property> |
| 17 |
<property name="spacing">12</property> |
| 18 |
<child> |
| 19 |
<object class="GtkLabel" id="label"> |
| 20 |
<property name="label">“Copy” will copy the selected data the clipboard, “Paste” will show the current clipboard contents. You can also drag the data to the bottom.</property> |
| 21 |
<property name="wrap">1</property> |
| 22 |
<property name="max-width-chars">40</property> |
| 23 |
</object> |
| 24 |
</child> |
| 25 |
<child> |
| 26 |
<object class="GtkBox"> |
| 27 |
<property name="spacing">12</property> |
| 28 |
<child> |
| 29 |
<object class="GtkDropDown" id="source_chooser"> |
| 30 |
<accessibility> |
| 31 |
<property name="label">Source Type</property> |
| 32 |
</accessibility> |
| 33 |
<property name="valign">center</property> |
| 34 |
<property name="model"> |
| 35 |
<object class="GtkStringList"> |
| 36 |
<property name="strings">Text |
| 37 |
Color |
| 38 |
Image |
| 39 |
File |
| 40 |
Folder</property> |
| 41 |
</object> |
| 42 |
</property> |
| 43 |
</object> |
| 44 |
</child> |
| 45 |
<child> |
| 46 |
<object class="GtkStack" id="source_stack"> |
| 47 |
<signal name="notify::visible-child" handler="source_changed_cb" object="copy_button"/> |
| 48 |
<property name="vexpand">1</property> |
| 49 |
<binding name="visible-child-name"> |
| 50 |
<lookup name="string" type="GtkStringObject"> |
| 51 |
<lookup name="selected-item"> |
| 52 |
source_chooser |
| 53 |
</lookup> |
| 54 |
</lookup> |
| 55 |
</binding> |
| 56 |
<child> |
| 57 |
<object class="GtkStackPage"> |
| 58 |
<property name="name">Text</property> |
| 59 |
<property name="child"> |
| 60 |
<object class="GtkEntry" id="source_text"> |
| 61 |
<accessibility> |
| 62 |
<property name="label">Text Drag Source</property> |
| 63 |
</accessibility> |
| 64 |
<property name="valign">center</property> |
| 65 |
<signal name="notify::text" handler="text_changed_cb" object="copy_button"/> |
| 66 |
<property name="text">Copy this!</property> |
| 67 |
</object> |
| 68 |
</property> |
| 69 |
</object> |
| 70 |
</child> |
| 71 |
<child> |
| 72 |
<object class="GtkStackPage"> |
| 73 |
<property name="name">Color</property> |
| 74 |
<property name="child"> |
| 75 |
<object class="GtkColorDialogButton" id="source_color"> |
| 76 |
<accessibility> |
| 77 |
<property name="label">Color Drag Source</property> |
| 78 |
</accessibility> |
| 79 |
<property name="dialog"> |
| 80 |
<object class="GtkColorDialog"> |
| 81 |
</object> |
| 82 |
</property> |
| 83 |
<property name="valign">center</property> |
| 84 |
<property name="rgba">purple</property> |
| 85 |
</object> |
| 86 |
</property> |
| 87 |
</object> |
| 88 |
</child> |
| 89 |
<child> |
| 90 |
<object class="GtkStackPage"> |
| 91 |
<property name="name">Image</property> |
| 92 |
<property name="child"> |
| 93 |
<object class="GtkBox"> |
| 94 |
<property name="valign">center</property> |
| 95 |
<style> |
| 96 |
<class name="linked"/> |
| 97 |
</style> |
| 98 |
<child> |
| 99 |
<object class="GtkToggleButton" id="image_rose"> |
| 100 |
<accessibility> |
| 101 |
<property name="label">Photo Drag Source</property> |
| 102 |
</accessibility> |
| 103 |
<property name="active">1</property> |
| 104 |
<property name="child"> |
| 105 |
<object class="GtkImage"> |
| 106 |
<accessibility> |
| 107 |
<property name="label">Portland Rose Photo</property> |
| 108 |
</accessibility> |
| 109 |
<style> |
| 110 |
<class name="large-icons"/> |
| 111 |
</style> |
| 112 |
<property name="paintable">resource:///transparent/portland-rose.jpg</property> |
| 113 |
</object> |
| 114 |
</property> |
| 115 |
</object> |
| 116 |
</child> |
| 117 |
<child> |
| 118 |
<object class="GtkToggleButton" id="image_floppy"> |
| 119 |
<accessibility> |
| 120 |
<property name="label">Icon Drag Source</property> |
| 121 |
</accessibility> |
| 122 |
<property name="group">image_rose</property> |
| 123 |
<child> |
| 124 |
<object class="GtkDragSource"> |
| 125 |
<signal name="prepare" handler="drag_prepare"/> |
| 126 |
</object> |
| 127 |
</child> |
| 128 |
<property name="child"> |
| 129 |
<object class="GtkImage"> |
| 130 |
<accessibility> |
| 131 |
<property name="label">Floppy Buddy Icon</property> |
| 132 |
</accessibility> |
| 133 |
<style> |
| 134 |
<class name="large-icons"/> |
| 135 |
</style> |
| 136 |
<property name="paintable">resource:///images/floppybuddy.gif</property> |
| 137 |
</object> |
| 138 |
</property> |
| 139 |
</object> |
| 140 |
</child> |
| 141 |
<child> |
| 142 |
<object class="GtkToggleButton" id="image_logo"> |
| 143 |
<accessibility> |
| 144 |
<property name="label">SVG Drag Source</property> |
| 145 |
</accessibility> |
| 146 |
<property name="group">image_floppy</property> |
| 147 |
<child> |
| 148 |
<object class="GtkDragSource"> |
| 149 |
<signal name="prepare" handler="drag_prepare"/> |
| 150 |
</object> |
| 151 |
</child> |
| 152 |
<property name="child"> |
| 153 |
<object class="GtkImage"> |
| 154 |
<accessibility> |
| 155 |
<property name="label">gtk-demo logo</property> |
| 156 |
</accessibility> |
| 157 |
<style> |
| 158 |
<class name="large-icons"/> |
| 159 |
</style> |
| 160 |
<property name="paintable"> |
| 161 |
<object class="GtkIconPaintable"> |
| 162 |
<property name="file">resource:///images/org.gtk.Demo4-symbolic.svg</property> |
| 163 |
</object> |
| 164 |
</property> |
| 165 |
</object> |
| 166 |
</property> |
| 167 |
</object> |
| 168 |
</child> |
| 169 |
</object> |
| 170 |
</property> |
| 171 |
</object> |
| 172 |
</child> |
| 173 |
<child> |
| 174 |
<object class="GtkStackPage"> |
| 175 |
<property name="name">File</property> |
| 176 |
<property name="child"> |
| 177 |
<object class="GtkButton" id="source_file"> |
| 178 |
<accessibility> |
| 179 |
<property name="label">File Drag Source</property> |
| 180 |
</accessibility> |
| 181 |
<child> |
| 182 |
<object class="GtkDragSource"> |
| 183 |
<property name="propagation-phase">capture</property> |
| 184 |
<signal name="prepare" handler="drag_prepare"/> |
| 185 |
</object> |
| 186 |
</child> |
| 187 |
<property name="valign">center</property> |
| 188 |
<property name="child"> |
| 189 |
<object class="GtkLabel"> |
| 190 |
<property name="label">—</property> |
| 191 |
<property name="xalign">0</property> |
| 192 |
<property name="ellipsize">start</property> |
| 193 |
</object> |
| 194 |
</property> |
| 195 |
<signal name="clicked" handler="open_file_cb"/> |
| 196 |
</object> |
| 197 |
</property> |
| 198 |
</object> |
| 199 |
</child> |
| 200 |
<child> |
| 201 |
<object class="GtkStackPage"> |
| 202 |
<property name="name">Folder</property> |
| 203 |
<property name="child"> |
| 204 |
<object class="GtkButton" id="source_folder"> |
| 205 |
<accessibility> |
| 206 |
<property name="label">Folder Drag Source</property> |
| 207 |
</accessibility> |
| 208 |
<child> |
| 209 |
<object class="GtkDragSource"> |
| 210 |
<property name="propagation-phase">capture</property> |
| 211 |
<signal name="prepare" handler="drag_prepare"/> |
| 212 |
</object> |
| 213 |
</child> |
| 214 |
<property name="valign">center</property> |
| 215 |
<property name="child"> |
| 216 |
<object class="GtkLabel"> |
| 217 |
<property name="label">—</property> |
| 218 |
<property name="xalign">0</property> |
| 219 |
<property name="ellipsize">start</property> |
| 220 |
</object> |
| 221 |
</property> |
| 222 |
<signal name="clicked" handler="open_folder_cb"/> |
| 223 |
</object> |
| 224 |
</property> |
| 225 |
</object> |
| 226 |
</child> |
| 227 |
</object> |
| 228 |
</child> |
| 229 |
<child> |
| 230 |
<object class="GtkButton" id="copy_button"> |
| 231 |
<property name="valign">center</property> |
| 232 |
<property name="label" translatable="yes">_Copy</property> |
| 233 |
<signal name="clicked" handler="copy_button_clicked" object="source_stack"/> |
| 234 |
<property name="use-underline">1</property> |
| 235 |
</object> |
| 236 |
</child> |
| 237 |
</object> |
| 238 |
</child> |
| 239 |
<child> |
| 240 |
<object class="GtkSeparator"> |
| 241 |
</object> |
| 242 |
</child> |
| 243 |
<child> |
| 244 |
<object class="GtkBox"> |
| 245 |
<property name="spacing">12</property> |
| 246 |
<child> |
| 247 |
<object class="GtkDropTarget"> |
| 248 |
<property name="actions">copy</property> |
| 249 |
<property name="formats">GdkTexture GdkPaintable GFile GdkRGBA gchararray</property> |
| 250 |
<signal name="drop" handler="on_drop" object="dest_stack"/> |
| 251 |
</object> |
| 252 |
</child> |
| 253 |
<child> |
| 254 |
<object class="GtkButton" id="paste_button"> |
| 255 |
<property name="label" translatable="yes">_Paste</property> |
| 256 |
<signal name="clicked" handler="paste_button_clicked" object="dest_stack"/> |
| 257 |
<property name="use-underline">1</property> |
| 258 |
</object> |
| 259 |
</child> |
| 260 |
<child> |
| 261 |
<object class="GtkLabel" id="paste_label"> |
| 262 |
<property name="xalign">0</property> |
| 263 |
<binding name="label"> |
| 264 |
<lookup name="visible-child-name" type="GtkStack"> |
| 265 |
dest_stack |
| 266 |
</lookup> |
| 267 |
</binding> |
| 268 |
</object> |
| 269 |
</child> |
| 270 |
<child> |
| 271 |
<object class="GtkStack" id="dest_stack"> |
| 272 |
<property name="halign">end</property> |
| 273 |
<property name="valign">center</property> |
| 274 |
<child> |
| 275 |
<object class="GtkStackPage"> |
| 276 |
<property name="name"></property> |
| 277 |
<property name="child"> |
| 278 |
<object class="GtkLabel"> |
| 279 |
</object> |
| 280 |
</property> |
| 281 |
</object> |
| 282 |
</child> |
| 283 |
<child> |
| 284 |
<object class="GtkStackPage"> |
| 285 |
<property name="name">Text</property> |
| 286 |
<property name="child"> |
| 287 |
<object class="GtkLabel"> |
| 288 |
<accessibility> |
| 289 |
<relation name="labelled-by">paste_label</relation> |
| 290 |
</accessibility> |
| 291 |
<property name="halign">end</property> |
| 292 |
<property name="valign">center</property> |
| 293 |
<property name="xalign">0</property> |
| 294 |
<property name="ellipsize">end</property> |
| 295 |
</object> |
| 296 |
</property> |
| 297 |
</object> |
| 298 |
</child> |
| 299 |
<child> |
| 300 |
<object class="GtkStackPage"> |
| 301 |
<property name="name">Image</property> |
| 302 |
<property name="child"> |
| 303 |
<object class="GtkImage"> |
| 304 |
<accessibility> |
| 305 |
<relation name="labelled-by">paste_label</relation> |
| 306 |
</accessibility> |
| 307 |
<property name="halign">end</property> |
| 308 |
<property name="valign">center</property> |
| 309 |
<style> |
| 310 |
<class name="large-icons"/> |
| 311 |
</style> |
| 312 |
</object> |
| 313 |
</property> |
| 314 |
</object> |
| 315 |
</child> |
| 316 |
<child> |
| 317 |
<object class="GtkStackPage"> |
| 318 |
<property name="name">Color</property> |
| 319 |
<property name="child"> |
| 320 |
<object class="GtkBox"> |
| 321 |
<property name="halign">end</property> |
| 322 |
<property name="valign">center</property> |
| 323 |
<child> |
| 324 |
<object class="GtkColorSwatch"> |
| 325 |
<accessibility> |
| 326 |
<relation name="labelled-by">paste_label</relation> |
| 327 |
</accessibility> |
| 328 |
<property name="accessible-role">img</property> |
| 329 |
<property name="can-focus">0</property> |
| 330 |
<property name="selectable">0</property> |
| 331 |
<property name="has-menu">0</property> |
| 332 |
</object> |
| 333 |
</child> |
| 334 |
</object> |
| 335 |
</property> |
| 336 |
</object> |
| 337 |
</child> |
| 338 |
<child> |
| 339 |
<object class="GtkStackPage"> |
| 340 |
<property name="name">File</property> |
| 341 |
<property name="child"> |
| 342 |
<object class="GtkLabel"> |
| 343 |
<accessibility> |
| 344 |
<relation name="labelled-by">paste_label</relation> |
| 345 |
</accessibility> |
| 346 |
<property name="halign">end</property> |
| 347 |
<property name="valign">center</property> |
| 348 |
<property name="xalign">0</property> |
| 349 |
<property name="hexpand">1</property> |
| 350 |
<property name="ellipsize">start</property> |
| 351 |
</object> |
| 352 |
</property> |
| 353 |
</object> |
| 354 |
</child> |
| 355 |
</object> |
| 356 |
</child> |
| 357 |
</object> |
| 358 |
</child> |
| 359 |
</object> |
| 360 |
</property> |
| 361 |
</object> |
| 362 |
</interface> |