Deprecate KotoFlipperButton, integrate flip functionality with an alt image into KotoButton.

We are now leveraging KotoButton in the KotoPlayerBar and KotoExpander. Dropped Glade UI templating from KotoWindow, set its default size using gtk_widget_set_size_request to force a minimum window size, set window title, WMClass, and icon name.

Start implementing KotoIndexedFile class to handle our provided audio files, setting its file name and attempting to parse the file name when we are not using ID3 data. The parsing is as follows:

- All `_` are replaced with whitespace
- We will attempt to remove nested references to the artist and album name (we need to implemented the relevant classes to leverage that).
- Remove any references to ` - ` followed by any stragglers `-` (without the whitespace around it).
- Split based on `.` and remove the trailing file extension, preserving the rest (so something like `Ch. 01.ogg` would be considered just `Ch. 01`).
This commit is contained in:
Joshua Strobl 2021-02-12 12:56:41 +02:00
parent 625c1be645
commit 9b6fa4593a
19 changed files with 472 additions and 333 deletions

View file

@ -1,28 +0,0 @@
/* koto-utils.c
*
* Copyright 2021 Joshua Strobl
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "koto-utils.h"
GtkWidget* koto_create_flat_icon_button(gchar *icon_name, GtkIconSize size) {
GtkWidget* button;
button = gtk_button_new_from_icon_name(icon_name, size);
GtkStyleContext *button_style = gtk_widget_get_style_context(button);
gtk_style_context_add_class(button_style, "flat");
return button;
}