summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3911da5)
raw | patch | inline | side by side (parent: 3911da5)
author | Max Kellermann <max@duempel.org> | |
Mon, 15 Sep 2008 07:23:49 +0000 (09:23 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 15 Sep 2008 07:23:49 +0000 (09:23 +0200) |
The code looks strange and spews lots of warnings. Since it does
nothing useful, and wastes the user's precious time, simply remove it.
nothing useful, and wastes the user's precious time, simply remove it.
src/Makefile.am | patch | blob | history | |
src/conf.c | patch | blob | history | |
src/main.c | patch | blob | history | |
src/options.c | patch | blob | history | |
src/options.h | patch | blob | history | |
src/splash.c | [deleted file] | patch | blob | history |
src/splash.h | [deleted file] | patch | blob | history |
diff --git a/src/Makefile.am b/src/Makefile.am
index 3ceef6a8c055c0a17084c597d48ca47958fd4517..e3ddc313d4eac91b5dc10ad64abdde28a074c2b8 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
utils.h\
ncmpc.h\
screen_browse.h\
- splash.h\
src_lyrics.h
# $Id$
wreadln.c\
strfsong.c\
utils.c\
- splash.c\
src_lyrics.c
if LEOSLYRICS_FIXED
diff --git a/src/conf.c b/src/conf.c
index df0ac546564e055f8b5ef5ca231f8111f0717415..049671c24e060e9dcd5dd49acbec4312f7fb3523 100644 (file)
--- a/src/conf.c
+++ b/src/conf.c
}
else if( !strcasecmp(CONF_SHOW_SPLASH, name) )
{
- options->show_splash = str2bool(value);
-
-#ifdef DEBUG
- D("screen-list:");
- j=0;
- while(options->screen_list[j])
- D(" %s", options->screen_list[j++]);
- D("\n");
-#endif
+ /* the splash screen was removed */
}
else if( !strcasecmp(CONF_HOST, name))
{
diff --git a/src/main.c b/src/main.c
index 5e978409ff9c73cc3ba59afadf9f13ed69596884..2f01cab04a65415be483494e9f1a01adfd82cb67 100644 (file)
--- a/src/main.c
+++ b/src/main.c
#include "screen.h"
#include "screen_utils.h"
#include "strfsong.h"
-#include "splash.h"
#define BUFSIZE 1024
atexit(exit_and_cleanup);
ncurses_init();
- if(options->show_splash == TRUE) draw_splash();
src_lyr_init ();
diff --git a/src/options.c b/src/options.c
index fbf079af7198748ee1db8ff5dd25755ad31068fd..0d3c2a6d06b52e169c6c97e00e827679dd1c10d6 100644 (file)
--- a/src/options.c
+++ b/src/options.c
options.key_file = g_strdup(arg);
break;
case 'S': /* --key-file */
- options.show_splash = FALSE;
+ /* the splash screen was removed */
break;
#ifdef DEBUG
case 'K': /* --dump-keys */
options.screen_list = g_strsplit_set(DEFAULT_SCREEN_LIST, " ", 0);
options.timedisplay_type = DEFAULT_TIMEDISPLAY_TYPE;
options.lyrics_timeout = DEFAULT_LYRICS_TIMEOUT;
- options.show_splash = FALSE;
options.scroll = DEFAULT_SCROLL;
options.scroll_sep = g_strdup(DEFAULT_SCROLL_SEP);
diff --git a/src/options.h b/src/options.h
index 5547ff8dd184087139b4f64f6fede52ef5286d2a..661d874404f649e80baff987f27f296ab021b181 100644 (file)
--- a/src/options.h
+++ b/src/options.h
gboolean visible_bell;
gboolean enable_xterm_title;
gboolean enable_mouse;
- gboolean show_splash;
gboolean scroll;
} options_t;
diff --git a/src/splash.c b/src/splash.c
--- a/src/splash.c
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-#include <glib.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ncurses.h>
-#include <string.h>
-
-#include "ncmpc.h"
-#include "colors.h"
-
-
-gpointer get_input(void *null)
-{
- int key;
- while(key = getch())
- {
- if(key == 'q')
- {
- exit(0);
- }
- }
- return;
-}
-
-void draw_message(char *msg)
-{
- int rows, cols;
- getmaxyx(stdscr, rows, cols);
- mvaddstr(rows-1, (cols/2)-(strlen(msg)/2), msg);
- refresh();
-}
-
-
-/*void draw_title()
-{
- colors_use(stdscr, COLOR_TITLE_BOLD);
- mvaddstr(rows/2+1, COLS/2, VERSION);
- colors_use(stdscr, COLOR_TITLE_BOLD);
- mvaddstr(rows/2-1, x, PACKAGE);
- refresh();
-}
-*/
-gboolean advance_version()
-{
- int rows, cols;
- getmaxyx(stdscr, rows, cols);
- static int x = 0;
- if(x == 0)
- {
- x = cols - strlen(VERSION);
- }
- colors_use(stdscr, COLOR_TITLE_BOLD);
- mvaddstr(rows/2+1, x--, VERSION);
- mvhline(rows/2+1, x+strlen(VERSION)+1, ' ', cols);
- refresh();
- if(x == cols/2) return FALSE;
- return TRUE;
-}
-
-
-gboolean advance_name()
-{
- int rows, cols;
- getmaxyx(stdscr, rows, cols);
- static int x = 0;
- colors_use(stdscr, COLOR_TITLE_BOLD);
- mvaddstr(rows/2-1, x, PACKAGE);
- mvhline(rows/2-1, 0, ' ', x);
- refresh();
- if(x + strlen(PACKAGE) == cols/2) return FALSE;
- x++;
- return TRUE;
-}
-
-gboolean draw_animation(gpointer *data)
-{ //need this to execute both functions, even if one of them return TRUE
- if(advance_name() == FALSE && advance_version() == FALSE || advance_name() == TRUE && advance_version() == FALSE)
- {
- // system("sleep 8");
- g_main_loop_quit((GMainLoop*) data);
- // g_source_attach(((int*)data)[1], data);
- return FALSE;
- }
-
- return TRUE;
-}
-
-void drawx()
-{
- // g_thread_create(get_input, NULL, FALSE, NULL);
- int rows, cols;
- getmaxyx(stdscr, rows, cols);
-
- fprintf(stderr, "%d", rows/2);
-
- mvhline(rows/2, 0, ACS_HLINE , cols);
- draw_message("Connecting...");
- //advance_version();
- refresh();
-
- GMainContext *cont = g_main_context_new();
- GMainLoop *loop = g_main_loop_new(cont, FALSE);
-
- GSource *frame = g_timeout_source_new(3);
- GSource *state = g_timeout_source_new(100);
- GSource *stopper = g_timeout_source_new(200);
-
- void *blubb = malloc(sizeof(GMainLoop*)+sizeof(GSource*));
- blubb = loop;
- ((int*)blubb)[1] = stopper;
-
- g_source_set_callback(frame, draw_animation ,blubb, NULL);
- g_source_attach(frame, g_main_loop_get_context(loop));
-
- g_main_loop_run(loop);
-}
-
-
-void draw_splash()
-{
- drawx();
-}
-
-//int draw_frame
diff --git a/src/splash.h b/src/splash.h
--- a/src/splash.h
+++ /dev/null
@@ -1 +0,0 @@
-void draw_splash();