oupis-window.ui 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <interface>
  3. <requires lib="gtk" version="4.0"/>
  4. <requires lib="Adw" version="1.0"/>
  5. <template class="OupisWindow" parent="AdwApplicationWindow">
  6. <property name="title" translatable="yes">Oupis</property>
  7. <property name="default-width">800</property>
  8. <property name="default-height">600</property>
  9. <property name="content">
  10. <object class="AdwToolbarView">
  11. <child type="top">
  12. <object class="AdwHeaderBar">
  13. <child type="start">
  14. <object class="GtkSearchEntry" id="searchentry">
  15. <property name="placeholder-text" translatable="yes">Search…</property>
  16. <property name="margin-start">10</property>
  17. <signal name="activate" handler="oupis_window__search_request"/>
  18. </object>
  19. </child>
  20. <child type="end">
  21. <object class="GtkMenuButton">
  22. <property name="primary">True</property>
  23. <property name="icon-name">open-menu-symbolic</property>
  24. <property name="tooltip-text" translatable="yes">Main Menu</property>
  25. <property name="menu-model">primary_menu</property>
  26. </object>
  27. </child>
  28. </object>
  29. </child>
  30. <property name="content">
  31. <object class="GtkScrolledWindow" id="scrolledwindow">
  32. <property name="hexpand" >TRUE</property>
  33. <property name="vexpand" >TRUE</property>
  34. <child>
  35. <object class="GtkListView" id="listview">
  36. <property name="model">
  37. <object class="GtkSingleSelection" id="singleselection">
  38. <property name="model">
  39. <object class="GListStore" id="liststore">
  40. <property name="item-type">GFile</property>
  41. </object>
  42. </property>
  43. </object>
  44. </property>
  45. <signal name="activate" handler="listview_activate"/>
  46. <property name="factory">
  47. <object class="GtkBuilderListItemFactory">
  48. <property name="bytes">
  49. <![CDATA[
  50. <?xml version="1.0" encoding="UTF-8"?>
  51. <interface>
  52. <template class="GtkListItem">
  53. <property name="child">
  54. <object class="GtkBox">
  55. <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
  56. <property name="spacing">20</property>
  57. <child>
  58. <object class="GtkImage">
  59. <binding name="gicon">
  60. <closure type="GIcon" function="get_icon">
  61. <lookup name="item">GtkListItem</lookup>
  62. </closure>
  63. </binding>
  64. </object>
  65. </child>
  66. <child>
  67. <object class="GtkLabel">
  68. <property name="hexpand">TRUE</property>
  69. <property name="xalign">0</property>
  70. <binding name="label">
  71. <closure type="gchararray" function="get_file_name">
  72. <lookup name="item">GtkListItem</lookup>
  73. </closure>
  74. </binding>
  75. </object>
  76. </child>
  77. </object>
  78. </property>
  79. </template>
  80. </interface>
  81. ]]>
  82. </property>
  83. </object>
  84. </property>
  85. </object>
  86. </child>
  87. </object>
  88. </property>
  89. </object>
  90. </property>
  91. </template>
  92. <menu id="primary_menu">
  93. <section>
  94. <item>
  95. <attribute name="label" translatable="yes">_Preferences</attribute>
  96. <attribute name="action">app.preferences</attribute>
  97. </item>
  98. <item>
  99. <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
  100. <attribute name="action">app.shortcuts</attribute>
  101. </item>
  102. <item>
  103. <attribute name="label" translatable="yes">_About Oupis</attribute>
  104. <attribute name="action">app.about</attribute>
  105. </item>
  106. </section>
  107. </menu>
  108. </interface>