gladish: Move help text from code to separate text file

This commit is contained in:
Nikita Zlobin 2010-11-28 15:14:43 +05:00
parent 9e0b654848
commit a5d878cdc4
3 changed files with 16 additions and 9 deletions

View File

@ -31,6 +31,7 @@
#include "menu.h"
#include "../proxies/room_proxy.h"
#include "../common/catdup.h"
#include "../common/file.h"
struct graph_view
{
@ -51,17 +52,12 @@ GtkScrolledWindow * g_main_scrolledwin;
static struct graph_view * g_current_view;
GtkWidget * g_view_label;
const char * g_view_label_text =
"If you've started ladish for the first time, you should:\n\n"
" 1. Create a new studio (in the menu, Studio -> New Studio)\n"
" 2. Configure JACK (in the menu, Tools -> Configure JACK)\n"
" 3. Start the studio (in the menu, Studio -> Start Studio)\n"
" 4. Start apps (in the menu, Application -> Run)\n"
" 5. Connect their ports by click & drag on canvas\n"
" 6. Save the studio (in the menu, Studio -> Save Studio)\n";
const char * g_view_label_text = NULL;
void view_init(void)
{
g_view_label_text = read_file_contents(DATA_DIR "/help/default.txt");
g_main_scrolledwin = GTK_SCROLLED_WINDOW(get_gtk_builder_widget("main_scrolledwin"));
INIT_LIST_HEAD(&g_views);

8
gui/help/default.txt Normal file
View File

@ -0,0 +1,8 @@
If you've started ladish for the first time, you should:
1. Create a new studio (in the menu, Studio -> New Studio)
2. Configure JACK (in the menu, Tools -> Configure JACK)
3. Start the studio (in the menu, Studio -> Start Studio)
4. Start apps (in the menu, Application -> Run)
5. Connect their ports by click & drag on canvas
6. Save the studio (in the menu, Studio -> Save Studio)

View File

@ -546,7 +546,10 @@ def build(bld):
# GtkBuilder UI definitions (XML)
bld.install_files('${DATA_DIR}', 'gui/gladish.ui')
# Help text
bld.install_files('${DATA_DIR}/help', 'gui/help/default.txt')
bld.install_files('${PREFIX}/bin', 'ladish_control', chmod=0755)
# 'Desktop' file (menu entry, icon, etc)