gtkappchooserwidget.ui 5.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk30">
  <!-- interface-requires gtk+ 3.10 -->
  <object class="GtkListStore" id="program_list_store">
    <columns>
      <!-- column-name app-info -->
      <column type="GAppInfo"/>
      <!-- column-name app-icon -->
      <column type="GIcon"/>
      <!-- column-name name -->
      <column type="gchararray"/>
      <!-- column-name description -->
      <column type="gchararray"/>
      <!-- column-name exec -->
      <column type="gchararray"/>
      <!-- column-name default -->
      <column type="gboolean"/>
      <!-- column-name heading -->
      <column type="gboolean"/>
      <!-- column-name heading-text -->
      <column type="gchararray"/>
      <!-- column-name recommended -->
      <column type="gboolean"/>
      <!-- column-name fallback -->
      <column type="gboolean"/>
    </columns>
  </object>
  <object class="GtkTreeModelSort" id="program_list_sort">
    <property name="model">program_list_store</property>
  </object>
  <template class="GtkAppChooserWidget" parent="GtkBox">
    <property name="orientation">vertical</property>
    <child>
34
      <object class="GtkOverlay" id="overlay">
35
        <property name="visible">1</property>
36
        <child>
37
          <object class="GtkScrolledWindow" id="scrolled_window">
Matthias Clasen's avatar
Matthias Clasen committed
38 39
            <property name="width-request">400</property>
            <property name="height-request">300</property>
40
            <property name="visible">1</property>
Matthias Clasen's avatar
Matthias Clasen committed
41 42 43
            <property name="can-focus">1</property>
            <property name="hscrollbar-policy">never</property>
            <property name="shadow-type">in</property>
44
            <child>
45
              <object class="GtkTreeView" id="program_list">
46
                <property name="visible">1</property>
Matthias Clasen's avatar
Matthias Clasen committed
47
                <property name="can-focus">1</property>
48
                <property name="model">program_list_sort</property>
Matthias Clasen's avatar
Matthias Clasen committed
49
                <property name="headers-visible">0</property>
50 51 52 53 54 55
                <signal name="button-press-event" handler="widget_button_press_event_cb" swapped="no"/>
                <signal name="row-activated" handler="program_list_selection_activated" swapped="no"/>
                <child internal-child="selection">
                  <object class="GtkTreeSelection" id="treeview-selection2">
                    <property name="mode">browse</property>
                    <signal name="changed" handler="refresh_and_emit_app_selected" object="GtkAppChooserWidget" swapped="yes"/>
56 57 58
                  </object>
                </child>
                <child>
59 60 61 62 63 64 65
                  <object class="GtkTreeViewColumn" id="column">
                    <child>
                      <object class="GtkCellRendererText" id="padding_renderer"/>
                    </child>
                    <child>
                      <object class="GtkCellRendererText" id="heading">
                        <property name="ypad">6</property>
Matthias Clasen's avatar
Matthias Clasen committed
66 67
                        <property name="wrap-mode">word</property>
                        <property name="wrap-width">350</property>
68 69 70 71 72 73 74 75 76 77
                      </object>
                      <attributes>
                        <attribute name="visible">6</attribute>
                        <attribute name="markup">7</attribute>
                      </attributes>
                    </child>
                    <child>
                      <object class="GtkCellRendererText" id="secondary_padding"/>
                    </child>
                    <child>
78
                      <object class="GtkCellRendererPixbuf" id="app_icon"/>
79 80 81 82 83 84 85 86 87 88 89 90
                      <attributes>
                        <attribute name="gicon">1</attribute>
                      </attributes>
                    </child>
                    <child>
                      <object class="GtkCellRendererText" id="app_name">
                        <property name="ellipsize">end</property>
                      </object>
                      <attributes>
                        <attribute name="markup">3</attribute>
                      </attributes>
                    </child>
91 92 93 94 95 96
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
97 98 99
        <child type="overlay">
          <object class="GtkBox" id="no_apps">
            <property name="orientation">vertical</property>
Matthias Clasen's avatar
Matthias Clasen committed
100
            <property name="no-show-all">1</property>
101 102 103 104
            <property name="halign">center</property>
            <property name="valign">center</property>
            <child>
              <object class="GtkImage">
105
                <property name="visible">1</property>
106
                <property name="icon-name">application-x-executable-symbolic</property>
107 108 109 110 111 112 113 114 115
                <property name="pixel-size">48</property>
                <property name="margin">12</property>
                <style>
                  <class name="dim-label"/>
                </style>
              </object>
            </child>
            <child>
              <object class="GtkLabel" id="no_apps_label">
116
                <property name="visible">1</property>
117
                <property name="label" translatable="yes">No applications found.</property>
118 119
                <property name="halign">center</property>
                <property name="valign">center</property>
120
                <property name="wrap">1</property>
121 122 123 124 125 126 127 128 129 130
                <attributes>
                  <attribute name="scale" value="1.2"/>
                </attributes>
                <style>
                  <class name="dim-label"/>
                </style>
              </object>
            </child>
          </object>
        </child>
131 132
      </object>
      <packing>
133
        <property name="expand">1</property>
134 135 136 137
      </packing>
    </child>
  </template>
</interface>