Start work on playlist creation dialog
Started work on the playlist creation dialog. To facilitate my desired UX for dialogs, I changed the immediate child of KotoWindow to being a GtkOverlay, with the "child" being the primary layout GtkBox and the "overlay" being any active dialog. There is no background on the dialogs yet, or really anything meaningful in it besides the GtkImage to show the playlist image as well as a GtkEntry for the label. Upon clicking the image, you will be presented with a GtkFileChooserNative, which will allow us to support various platforms aside from Linux (if we desire) but more importantly support desktop portals and the appropriate picker for each desktop environment. This dialog is currently hooked into the + button in the Playlist nav section. The intent is to also support drag-and-drop when possible, so you can drag an image file onto the GtkImage for it to set it to the playlist image. Fixed various compiler warnings, such as: - Unused variables (cast these as void so compiler knows to ignore them). - Use g_hash_table_add instead of g_hash_table_insert since value does not matter and will complain about not casting TRUE as a pointer. - Fixed some casting. Fixed up Desktop file and fleshed out Appstream data. Use validate-relax in the appstream test or it gets cranky about screenshots missing. I know...the app is not ready yet. Get over it AppStream. Added Visual Studio Code tasks and some C/C++ Extension setting files.
This commit is contained in:
parent
e18b8ca100
commit
f2164b2ade
18 changed files with 316 additions and 15 deletions
41
src/playlist/create-dialog.h
Normal file
41
src/playlist/create-dialog.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* create-dialog.h
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <glib-2.0/glib-object.h>
|
||||
#include <gtk-4.0/gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* Type Definition
|
||||
**/
|
||||
|
||||
#define KOTO_TYPE_CREATE_PLAYLIST_DIALOG koto_create_playlist_dialog_get_type()
|
||||
G_DECLARE_FINAL_TYPE(KotoCreatePlaylistDialog, koto_create_playlist_dialog, KOTO, CREATE_PLAYLIST_DIALOG, GObject);
|
||||
|
||||
/**
|
||||
* Create Dialog Functions
|
||||
**/
|
||||
|
||||
KotoCreatePlaylistDialog* koto_create_playlist_dialog_new();
|
||||
GtkWidget* koto_create_playlist_dialog_get_content(KotoCreatePlaylistDialog *self);
|
||||
void koto_create_playlist_dialog_handle_close(KotoCreatePlaylistDialog *self);
|
||||
void koto_create_playlist_dialog_handle_create(KotoCreatePlaylistDialog *self);
|
||||
void koto_create_playlist_dialog_handle_image_click(GtkGestureClick *gesture, int n_press, double x, double y, gpointer user_data);
|
||||
|
||||
G_END_DECLS
|
Loading…
Add table
Add a link
Reference in a new issue