Browse Source

gui: Remove stack widget

It isn't needed now that we pop up a file choose dialog for selecting
library paths.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
keep-around/f3360f6da58c03c66c051fbc9d6a40042158d442
Anna Schumaker 6 years ago
committed by Anna Schumaker
parent
commit
bddbd04ef5
  1. 2
      gui/playlist.c
  2. 2
      gui/sidebar.c
  3. 1
      include/gui/sidebar.h
  4. 518
      share/ocarina/ocarina6.glade

2
gui/playlist.c

@ -80,7 +80,6 @@ static gchar *__playlist_name(GtkTreeIter *iter)
void __playlist_selection_changed(GtkTreeSelection *selection, gpointer data)
{
GtkStack *stack = GTK_STACK(gui_builder_widget("o_stack"));
GtkTreeModel *model = GTK_TREE_MODEL(p_store);
struct queue *queue;
GtkTreeIter iter;
@ -90,7 +89,6 @@ void __playlist_selection_changed(GtkTreeSelection *selection, gpointer data)
g_free(p_name);
p_name = __playlist_name(&iter);
gtk_stack_set_visible_child_name(stack, "queues");
queue = playlist_get_queue(__playlist_type(&iter), p_name);
gui_sidebar_selected(SB_PLAYLIST, gui_queue(queue));
}

2
gui/sidebar.c

@ -87,14 +87,12 @@ out:
void __sidebar_selection_changed(GtkTreeSelection *selection, gpointer data)
{
GtkStack *stack = GTK_STACK(gui_builder_widget("o_stack"));
GtkTreeModel *model = GTK_TREE_MODEL(sb_store);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
gtk_stack_set_visible_child_name(stack, "queues");
gui_sidebar_selected(SB_SIDEBAR, __sidebar_get_queue(&iter));
gtk_tree_path_free(path);
}

1
include/gui/sidebar.h

@ -8,7 +8,6 @@
#include <gtk/gtk.h>
enum sidebar_selection_t {
SB_COLLECTION,
SB_PLAYLIST,
SB_SIDEBAR,
};

518
share/ocarina/ocarina6.glade

@ -2,23 +2,6 @@
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.16"/>
<object class="GtkListStore" id="colmgr_list">
<columns>
<!-- column-name id -->
<column type="guint"/>
<!-- column-name enabled -->
<column type="gboolean"/>
<!-- column-name size -->
<column type="guint"/>
<!-- column-name path -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkFileFilter" id="filefilter1">
<mime-types>
<mime-type>inode/directory</mime-type>
</mime-types>
</object>
<object class="GtkImage" id="image10">
<property name="visible">True</property>
<property name="can_focus">False</property>
@ -26,11 +9,6 @@
<property name="margin_right">10</property>
<property name="icon_name">media-playlist-repeat</property>
</object>
<object class="GtkImage" id="image11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">dialog-ok</property>
</object>
<object class="GtkImage" id="image12">
<property name="visible">True</property>
<property name="can_focus">False</property>
@ -871,9 +849,9 @@
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_right">1</property>
<property name="margin_top">5</property>
<property name="margin_bottom">5</property>
<property name="margin_right">1</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport" id="viewport1">
@ -1014,327 +992,241 @@
<property name="margin_left">3</property>
<property name="margin_right">2</property>
<child>
<object class="GtkStack" id="o_stack">
<object class="GtkBox" id="box10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="spacing">5</property>
<child>
<object class="GtkSearchEntry" id="o_search">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
<property name="placeholder_text" translatable="yes">Type here to filter</property>
<signal name="search-changed" handler="__queue_filter" swapped="no"/>
<accelerator key="slash" signal="grab-focus"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="o_enable">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="margin_right">8</property>
<property name="active">True</property>
<signal name="notify::active" handler="__queue_disabled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<property name="transition_type">over-up-down</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkBox" id="box11">
<object class="GtkTreeView" id="o_treeview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="can_focus">True</property>
<property name="enable_search">False</property>
<property name="fixed_height_mode">True</property>
<property name="rubber_banding">True</property>
<property name="tooltip_column">9</property>
<signal name="button-press-event" handler="__view_button_press" swapped="no"/>
<signal name="key-press-event" handler="__view_keypress" swapped="no"/>
<signal name="row-activated" handler="__view_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection5">
<property name="mode">multiple</property>
</object>
</child>
<child>
<object class="GtkBox" id="box10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>
<object class="GtkTreeViewColumn" id="treeviewcolumn8">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">20</property>
<property name="title" translatable="yes">#</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkSearchEntry" id="o_search">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
<property name="placeholder_text" translatable="yes">Type here to filter</property>
<signal name="search-changed" handler="__queue_filter" swapped="no"/>
<accelerator key="slash" signal="grab-focus"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
<object class="GtkCellRendererText" id="cellrenderertext4"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn9">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">300</property>
<property name="title" translatable="yes">Title</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkSwitch" id="o_enable">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="margin_right">8</property>
<property name="active">True</property>
<signal name="notify::active" handler="__queue_disabled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<object class="GtkTreeViewColumn" id="treeviewcolumn10">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">60</property>
<property name="title" translatable="yes">Length</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkTreeView" id="o_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="enable_search">False</property>
<property name="fixed_height_mode">True</property>
<property name="rubber_banding">True</property>
<property name="tooltip_column">9</property>
<signal name="button-press-event" handler="__view_button_press" swapped="no"/>
<signal name="key-press-event" handler="__view_keypress" swapped="no"/>
<signal name="row-activated" handler="__view_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection5">
<property name="mode">multiple</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn8">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">20</property>
<property name="title" translatable="yes">#</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext4"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn9">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">300</property>
<property name="title" translatable="yes">Title</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn10">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">60</property>
<property name="title" translatable="yes">Length</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext6"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn11">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">100</property>
<property name="title" translatable="yes">Artist</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext7"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn12">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">100</property>
<property name="title" translatable="yes">Album</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext8"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn13">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">45</property>
<property name="title" translatable="yes">Year</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext9"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn14">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">100</property>
<property name="title" translatable="yes">Genre</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext10"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">6</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn15">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">60</property>
<property name="title" translatable="yes">Count</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext11"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">7</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn16">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">1</property>
<property name="title" translatable="yes">Played</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext12"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">8</attribute>
</attributes>
</child>
</object>
</child>
</object>
<object class="GtkCellRendererText" id="cellrenderertext6"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">queues</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFileChooserWidget" id="o_collection_chooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action">select-folder</property>
<property name="create_folders">False</property>
<property name="filter">filefilter1</property>
<property name="preview_widget_active">False</property>
<property name="use_preview_label">False</property>
<object class="GtkTreeViewColumn" id="treeviewcolumn11">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">100</property>
<property name="title" translatable="yes">Artist</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext7"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="buttonbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="opacity">0.96862745098039216</property>
<property name="halign">center</property>
<property name="layout_style">start</property>
<object class="GtkTreeViewColumn" id="treeviewcolumn12">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">100</property>
<property name="title" translatable="yes">Album</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkButton" id="o_collection_add">
<property name="label" translatable="yes">Add Selected Path</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="image">image11</property>
<signal name="clicked" handler="__collection_add" object="o_collection_chooser" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
<object class="GtkCellRendererText" id="cellrenderertext8"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn13">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">45</property>
<property name="title" translatable="yes">Year</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext9"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn14">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">100</property>
<property name="title" translatable="yes">Genre</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext10"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">6</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn15">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">60</property>
<property name="title" translatable="yes">Count</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext11"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">7</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn16">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed_width">1</property>
<property name="title" translatable="yes">Played</property>
<property name="clickable">True</property>
<signal name="clicked" handler="__view_column_clicked" swapped="no"/>
<signal name="notify::width" handler="__view_column_resized" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext12"/>
<attributes>
<attribute name="font">10</attribute>
<attribute name="text">8</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">chooser</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="top_attach">1</property>
<property name="width">3</property>
<property name="height">2</property>
</packing>
</child>
<child>

Loading…
Cancel
Save