summaryrefslogtreecommitdiffstats
path: root/gtk/src/ghb3.ui
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-07-30 12:51:13 -0700
committerJohn Stebbins <[email protected]>2019-07-30 12:57:17 -0700
commit69d60676dd59891de96513c9803562bde4c75ac0 (patch)
tree87de1bf8c047661cfda02e27b2c6f18d2f7695e9 /gtk/src/ghb3.ui
parent29f9a54e005ef8e44791a7f39733deccfe686b35 (diff)
LinGui: change chapter list to GtkListBox
GtkListBox is more flexible than GtkTreeView. It is possible now to process key press events without creating a custom text cell renderer. Also due to the way event handling changes in GTK4, it was no longer even possible to create a custom cell renderer that can process key events. So this GtkListBox implementation is compatible with GTK4.
Diffstat (limited to 'gtk/src/ghb3.ui')
-rw-r--r--gtk/src/ghb3.ui77
1 files changed, 71 insertions, 6 deletions
diff --git a/gtk/src/ghb3.ui b/gtk/src/ghb3.ui
index e7d1b8d95..23436e4a2 100644
--- a/gtk/src/ghb3.ui
+++ b/gtk/src/ghb3.ui
@@ -6358,25 +6358,90 @@ Only one subtitle track can be burned! Since conflicts can occur, the first chos
</packing>
</child>
<child>
+ <object class="GtkSeparator" id="chapter_sep1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="chapter_list_header">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="chapter_list_index_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width-chars">5</property>
+ <property name="label" translatable="yes">Index</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="chapter_list_start_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width-chars">10</property>
+ <property name="label" translatable="yes">Start</property>
+ <property name="xalign">1</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="chapter_list_duration_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width-chars">10</property>
+ <property name="label" translatable="yes">Duration</property>
+ <property name="xalign">1</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="chapter_list_title_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Title</property>
+ <property name="margin-start">12</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="vexpand">True</property>
<child>
- <object class="GtkTreeView" id="chapters_list">
+ <object class="GtkListBox" id="chapters_list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="enable_search">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection3"/>
- </child>
</object>
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
</object>