Rename gui/collection.c -> gui/playlists/library.c

This is to match how files are named and organized in core/

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-08-31 09:01:33 -04:00
parent b4e2770223
commit 3e17b7bc1f
5 changed files with 20 additions and 20 deletions

View File

@ -5,11 +5,11 @@
#include <core/audio.h>
#include <gui/audio.h>
#include <gui/builder.h>
#include <gui/collection.h>
#include <gui/filter.h>
#include <gui/idle.h>
#include <gui/model.h>
#include <gui/playlist.h>
#include <gui/playlists/library.h>
#include <gui/sidebar.h>
#include <gui/treeview.h>
#include <gui/view.h>
@ -108,7 +108,7 @@ static void __ocarina_startup(GApplication *application, gpointer data)
gui_treeview_init();
gui_sidebar_init();
gui_view_init();
gui_collection_init();
gui_pl_library_init();
gui_playlist_init();
gui_audio_init();

View File

@ -8,7 +8,7 @@
#include <gui/window.h>
#include <glib/gi18n.h>
static void __collection_add(GtkFileChooser *chooser)
static void __gui_pl_library_add(GtkFileChooser *chooser)
{
gchar *filename = gtk_file_chooser_get_filename(chooser);
struct playlist *playlist;
@ -24,7 +24,7 @@ static void __collection_add(GtkFileChooser *chooser)
g_free(filename);
}
void __collection_choose(GtkButton *button, gpointer data)
void __gui_pl_library_choose(GtkButton *button, gpointer data)
{
GtkFileFilter *filter;
GtkWidget *dialog;
@ -49,12 +49,12 @@ void __collection_choose(GtkButton *button, gpointer data)
res = gtk_dialog_run(GTK_DIALOG(dialog));
if (res == GTK_RESPONSE_ACCEPT)
__collection_add(GTK_FILE_CHOOSER(dialog));
__gui_pl_library_add(GTK_FILE_CHOOSER(dialog));
gtk_widget_destroy(dialog);
}
bool __gui_collection_init_idle()
static bool __gui_pl_library_init_idle()
{
struct db_entry *library, *next;
struct playlist *playlist;
@ -65,12 +65,12 @@ bool __gui_collection_init_idle()
}
if (library_db_get()->db_size == 0)
__collection_choose(NULL, NULL);
__gui_pl_library_choose(NULL, NULL);
return true;
}
void gui_collection_init()
void gui_pl_library_init()
{
idle_schedule(IDLE_SYNC, __gui_collection_init_idle, NULL);
idle_schedule(IDLE_SYNC, __gui_pl_library_init_idle, NULL);
}

View File

@ -1,10 +0,0 @@
/*
* Copyright 2015 (c) Anna Schumaker.
*/
#ifndef OCARINA_GUI_COLLECTION_H
#define OCARINA_GUI_COLLECTION_H
/* Called to initialize the GUI collection code. */
void gui_collection_init();
#endif /* OCARINA_GUI_COLLECTION_H */

View File

@ -0,0 +1,10 @@
/*
* Copyright 2015 (c) Anna Schumaker.
*/
#ifndef OCARINA_GUI_PLAYLISTS_LIBRARY_H
#define OCARINA_GUI_PLAYLISTS_LIBRARY_H
/* Called to initialize GUI library playlists. */
void gui_pl_library_init();
#endif /* OCARINA_GUI_PLAYLISTS_LIBRARY_H */

View File

@ -794,7 +794,7 @@ audio-volume-medium</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">image3</property>
<signal name="clicked" handler="__collection_choose" swapped="no"/>
<signal name="clicked" handler="__gui_pl_library_choose" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>