Browse Source

update welcome dialog

audio_region_bpm_change_fix
parent
commit
c6adf0f7fd
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      COPYING
  2. 48
      inc/gui/widgets/dialogs/welcome_message_dialog.h
  3. 9
      meson.build
  4. 1
      src/gui/widgets/dialogs/meson.build
  5. 134
      src/gui/widgets/dialogs/welcome_message_dialog.c
  6. 37
      src/zrythm_app.c

2
COPYING

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
Copyright (C) 2018-2021 Alexandros Theodotou
Copyright (C) 2018-2022 Alexandros Theodotou
Zrythm is free software: you can redistribute it
and/or modify it under the terms of the GNU Affero

48
inc/gui/widgets/dialogs/welcome_message_dialog.h

@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
/*
* Copyright (C) 2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file
*
* Welcome message dialog.
*/
#ifndef __GUI_WIDGETS_DIALOGS_WELCOME_MESSAGE_DIALOG_H__
#define __GUI_WIDGETS_DIALOGS_WELCOME_MESSAGE_DIALOG_H__
#include <gtk/gtk.h>
/**
* @addtogroup widgets
*
* @{
*/
/**
* Creates and returns the welcome dialog.
*/
GtkDialog *
welcome_message_dialog_new (
GtkWindow * parent);
/**
* @}
*/
#endif /* __GUI_WIDGETS_DIALOGS_WELCOME_MESSAGE_DIALOG_H__ */

9
meson.build

@ -461,6 +461,15 @@ cdata.set_quoted ( @@ -461,6 +461,15 @@ cdata.set_quoted (
cdata.set_quoted (
'PRIVACY_POLICY_URL',
'https://www.zrythm.org/en/privacy.html')
cdata.set_quoted (
'DONATION_URL',
'https://www.zrythm.org/en/community.html#donate')
cdata.set_quoted (
'PURCHASE_URL',
'https://www.zrythm.org/en/download.html')
cdata.set_quoted (
'LICENSE_URL',
'https://git.sr.ht/~alextee/zrythm/tree/master/item/COPYING')
cdata.set_quoted (
'BUG_REPORT_API_ENDPOINT',
'https://accounts.zrythm.org/api/v1/error-reports/new')

1
src/gui/widgets/dialogs/meson.build

@ -35,4 +35,5 @@ widget_srcs += files([ @@ -35,4 +35,5 @@ widget_srcs += files([
'save_chord_preset_dialog.c',
'string_entry_dialog.c',
'track_icon_chooser_dialog.c',
'welcome_message_dialog.c',
])

134
src/gui/widgets/dialogs/welcome_message_dialog.c

@ -0,0 +1,134 @@ @@ -0,0 +1,134 @@
/*
* Copyright (C) 2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
#include "zrythm-config.h"
#include "gui/widgets/dialogs/welcome_message_dialog.h"
#include "utils/gtk.h"
#include "utils/resources.h"
#include "zrythm.h"
#include <glib/gi18n.h>
/**
* Creates and returns the welcome dialog.
*/
GtkDialog *
welcome_message_dialog_new (
GtkWindow * parent)
{
GString * gstr = g_string_new (NULL);
g_string_append_printf (
gstr, "<big><b>%s</b></big>\n\n",
_("Welcome to the Zrythm DAW"));
/* license info */
g_string_append_printf (
gstr,
_("%sZrythm is free software%s: you can "
"redistribute it and/or modify it under the "
"terms of the GNU Affero General Public License "
"as published by the Free Software Foundation, "
"either version 3 of the License, or (at your "
"option) any later version."),
"<b>", "</b>");
g_string_append (gstr, "\n");
char * see_license_txt =
g_strdup_printf (
_("Zrythm is distributed in the hope that it "
"will be useful, but WITHOUT ANY WARRANTY; "
"without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR "
"PURPOSE. See the %slicense%s for more "
"details."),
"<a href=\"" LICENSE_URL "\">", "</a>");
g_string_append_printf (
gstr, "%s\n\n", see_license_txt);
g_free (see_license_txt);
#ifdef FLATPAK_BUILD
g_string_append_printf (
gstr, "<b>%s</b>: %s\n\n",
_("Flatpak users"),
_("PipeWire support is currently disabled due to "
"a known bug and will be re-enabled after the "
"GNOME runtime is updated. For the time being, "
"please use the PulseAudio backend. Please note "
"that no MIDI backend is currently usable."));
#endif
#if !defined (INSTALLER_VER)
char * donations =
g_strdup_printf (
_("%sZrythm relies on donations and purchases "
"to sustain development%s. If you enjoy the "
"software, please consider %sdonating%s or "
"%sbuying an installer%s."),
"<b>", "</b>",
"<a href=\"" DONATION_URL "\">", "</a>",
"<a href=\"" PURCHASE_URL "\">", "</a>");
g_string_append_printf (
gstr, "%s\n\n", donations);
g_free (donations);
#endif
/* copyright line */
g_string_append_printf (
gstr, "%s",
"Copyright © " COPYRIGHT_YEARS " "
COPYRIGHT_NAME);
/* trademark info */
#if !defined(HAVE_CUSTOM_NAME) || !defined(HAVE_CUSTOM_LOGO_AND_SPLASH)
g_string_append_printf (
gstr, "\n\n%s",
_("Zrythm and the Zrythm logo are registered "
"trademarks of Alexandros Theodotou in the "
"United Kingdom."));
#endif
char * str = g_string_free (gstr, false);
GtkDialog * dialog =
GTK_DIALOG (
gtk_message_dialog_new_with_markup (
parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
NULL));
gtk_message_dialog_set_markup (
GTK_MESSAGE_DIALOG (dialog), str);
gtk_window_set_icon_name (
GTK_WINDOW (dialog), "zrythm");
gtk_window_set_title (
GTK_WINDOW (dialog), _("Welcome"));
GtkWidget * message_area =
gtk_message_dialog_get_message_area (
GTK_MESSAGE_DIALOG (dialog));
GtkWidget * first_lbl =
gtk_widget_get_first_child (message_area);
gtk_label_set_justify (
GTK_LABEL (first_lbl), GTK_JUSTIFY_CENTER);
g_free (str);
return dialog;
}

37
src/zrythm_app.c

@ -69,6 +69,7 @@ @@ -69,6 +69,7 @@
#include "gui/backend/piano_roll.h"
#include "gui/widgets/dialogs/bug_report_dialog.h"
#include "gui/widgets/dialogs/changelog_dialog.h"
#include "gui/widgets/dialogs/welcome_message_dialog.h"
#include "gui/widgets/first_run_assistant.h"
#include "gui/widgets/main_window.h"
#include "gui/widgets/project_assistant.h"
@ -577,41 +578,13 @@ static void on_prompt_for_project ( @@ -577,41 +578,13 @@ static void on_prompt_for_project (
if (g_settings_get_boolean (
S_GENERAL, "first-run"))
{
/* warranty disclaimer */
GtkDialogFlags flags =
GTK_DIALOG_DESTROY_WITH_PARENT;
GtkWidget * dialog =
gtk_message_dialog_new (
NULL, flags,
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
"Copyright © " COPYRIGHT_YEARS " " COPYRIGHT_NAME "\n"
"\n"
PROGRAM_NAME " is free software: you can redistribute it and/or modify\n"
"it under the terms of the GNU Affero General Public License as published by\n"
"the Free Software Foundation, either version 3 of the License, or\n"
"(at your option) any later version.\n"
"\n"
PROGRAM_NAME " is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU Affero General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU Affero General Public License\n"
"along with " PROGRAM_NAME ". If not, see <https://www.gnu.org/licenses/>."
#if !defined(HAVE_CUSTOM_NAME) || !defined(HAVE_CUSTOM_LOGO_AND_SPLASH)
"\n\nZrythm and the Zrythm logo are trademarks of Alexandros Theodotou"
#endif
);
gtk_window_set_title (
GTK_WINDOW (dialog),
_("License Information"));
gtk_window_set_icon_name (
GTK_WINDOW (dialog), "zrythm");
GtkDialog * dialog =
welcome_message_dialog_new (NULL);
gtk_widget_show (GTK_WIDGET (dialog));
g_signal_connect (
G_OBJECT (dialog), "response",
G_CALLBACK (license_info_dialog_response_cb),
G_CALLBACK (
license_info_dialog_response_cb),
self);
g_message ("showing license info dialog");

Loading…
Cancel
Save