r1126 - trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep
jiang_li at sita.openmoko.org
jiang_li at sita.openmoko.org
Mon Feb 26 02:33:36 CET 2007
Author: jiang_li
Date: 2007-02-26 02:33:14 +0100 (Mon, 26 Feb 2007)
New Revision: 1126
Modified:
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/about.c
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/equalizer.c
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.h
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/playlistwin.c
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/prefswin.c
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/skin.c
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/util.c
Log:
This commit just aims to eliminate warning message
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/about.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/about.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/about.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -245,10 +245,10 @@
{
static GtkWidget *about_window = NULL;
- GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL;
+ //GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL;
GtkWidget *about_vbox;
GtkWidget *about_credits_logo_box, *about_credits_logo_frame;
- GtkWidget *about_credits_logo;
+ //GtkWidget *about_credits_logo;
GtkWidget *about_notebook;
GtkWidget *list;
GtkWidget *bbox, *close_btn;
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/equalizer.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/equalizer.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/equalizer.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -734,7 +734,7 @@
static void
equalizerwin_create_window(void)
{
- GdkPixbuf *icon;
+ //GdkPixbuf *icon;
gint width, height;
equalizerwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -307,7 +307,7 @@
gboolean pposition_broken = FALSE;
-
+/*
static GSList *
get_feature_list(void)
{
@@ -348,7 +348,7 @@
g_printf("\n");
}
-
+*/
const gchar *
xmms_get_gentitle_format(void)
{
@@ -609,7 +609,7 @@
playlist_save(bmp_paths[BMP_PATH_PLAYLIST_FILE], FALSE);
}
-
+/*
static void
bmp_set_default_icon(void)
{
@@ -627,43 +627,43 @@
"Options:\n"
"--------\n"));
g_print("\n-h, --help ");
- /* -h, --help switch */
+ // * -h, --help switch *
g_print(_("Display this text and exit"));
g_print("\n-n, --session ");
- /* -n, --session switch */
+ // * -n, --session switch *
g_print(_("Select BMP/XMMS session (Default: 0)"));
g_print("\n-r, --rew ");
- /* -r, --rew switch */
+ // * -r, --rew switch *
g_print(_("Skip backwards in playlist"));
g_print("\n-p, --play ");
- /* -p, --play switch */
+ // * -p, --play switch *
g_print(_("Start playing current playlist"));
g_print("\n-u, --pause ");
- /* -u, --pause switch */
+ // * -u, --pause switch *
g_print(_("Pause current song"));
g_print("\n-s, --stop ");
- /* -s, --stop switch */
+ // * -s, --stop switch *
g_print(_("Stop current song"));
g_print("\n-t, --play-pause ");
- /* -t, --play-pause switch */
+ // * -t, --play-pause switch *
g_print(_("Pause if playing, play otherwise"));
g_print("\n-f, --fwd ");
- /* -f, --fwd switch */
+ // * -f, --fwd switch *
g_print(_("Skip forward in playlist"));
g_print("\n-e, --enqueue ");
- /* -e, --enqueue switch */
+ // * -e, --enqueue switch *
g_print(_("Don't clear the playlist"));
g_print("\n-m, --show-main-window ");
- /* -m, --show-main-window switch */
+ // * -m, --show-main-window switch *
g_print(_("Show the main window"));
g_print("\n-a, --activate ");
- /* -a, --activate switch */
+ // * -a, --activate switch *
g_print(_("Activate BMP"));
g_print("\n-i, --sm-client-id ");
- /* -i, --sm-client-id switch */
+ // * -i, --sm-client-id switch *
g_print(_("Previous session ID"));
g_print("\n-v, --version ");
- /* -v, --version switch */
+ // * -v, --version switch *
g_print(_("Print version number and exit\n"));
exit(EXIT_SUCCESS);
@@ -835,7 +835,7 @@
if (options->playcd)
play_medium();
}
-
+*/
static void
segfault_handler(gint sig)
{
@@ -857,7 +857,7 @@
g_atexit(bmp_logger_stop);
}
-
+/*
static void
run_load_skin_error_dialog(const gchar * skin_path)
{
@@ -879,7 +879,7 @@
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
-
+*/
static pid_t
testlock(char* fname)
{
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -78,6 +78,7 @@
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
//openmoko header
#include <libmokoui/moko-application.h>
@@ -3281,7 +3282,7 @@
idle_func_update_song_info(gint time)
{
gint length, t;
- gchar stime_prefix;
+// gchar stime_prefix;
length = playlist_get_current_length();
// playlistwin_set_time(time, length, cfg.timer_mode);
@@ -3362,7 +3363,7 @@
time = bmp_playback_get_time();
- g_print("\n time = %s\n", time);
+// g_print("\n time = %s\n", time);
switch (time) {
case -1:
@@ -3428,7 +3429,7 @@
static gchar* image_path = NULL;
static gboolean playorpause = FALSE;
-GtkButton *play_pause_button = NULL;
+GtkWidget *play_pause_button = NULL;
GtkWidget* shuffle_button = NULL;
GtkWidget* repeat_button = NULL;
GtkWidget *image = NULL;
@@ -3445,19 +3446,6 @@
gint timeout_id;
static gint timeout_time = 0;
-GtkWidget* alignment_eq_pos1 = NULL;
-GtkWidget* alignment_eq_pos2 = NULL;
-GtkWidget* alignment_eq_pos3 = NULL;
-GtkWidget* alignment_eq_pos4 = NULL;
-GtkWidget* alignment_eq_pos5 = NULL;
-GtkWidget* alignment_eq_pos6 = NULL;
-GtkWidget* alignment_eq_pos7 = NULL;
-GtkWidget* alignment_eq_pos8 = NULL;
-GtkWidget* alignment_eq_pos9 = NULL;
-GtkWidget* alignment_eq_pos10 = NULL;
-GtkWidget* alignment_eq_pos11 = NULL;
-GtkWidget* alignment_eq_pos12 = NULL;
-
GtkWidget* image_eq_pos1 = NULL;
GtkWidget* image_eq_pos2 = NULL;
GtkWidget* image_eq_pos3 = NULL;
@@ -3560,87 +3548,51 @@
switch(pos)
{
case 1:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos1), image_eq_pos1);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos1), img_path);
- //image_eq_pos1 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos1), image_eq_pos1);
gtk_widget_show(image_eq_pos1);
break;
case 2:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos2), image_eq_pos2);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos2), img_path);
- //image_eq_pos2 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos2), image_eq_pos2);
gtk_widget_show(image_eq_pos2);
break;
case 3:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos3), image_eq_pos3);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos3), img_path);
- //image_eq_pos3 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos3), image_eq_pos3);
gtk_widget_show(image_eq_pos3);
break;
case 4:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos4), image_eq_pos4);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos4), img_path);
- //image_eq_pos4 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos4), image_eq_pos4);
gtk_widget_show(image_eq_pos4);
break;
case 5:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos5), image_eq_pos5);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos5), img_path);
- //image_eq_pos5 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos5), image_eq_pos5);
gtk_widget_show(image_eq_pos5);
break;
case 6:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos6), image_eq_pos6);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos6), img_path);
- //image_eq_pos6 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos6), image_eq_pos6);
gtk_widget_show(image_eq_pos6);
break;
case 7:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos7), image_eq_pos7);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos7), img_path);
- //image_eq_pos7 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos7), image_eq_pos7);
gtk_widget_show(image_eq_pos7);
break;
case 8:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos8), image_eq_pos8);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos8), img_path);
- //image_eq_pos8 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos8), image_eq_pos8);
gtk_widget_show(image_eq_pos8);
break;
case 9:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos9), image_eq_pos9);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos9), img_path);
- //image_eq_pos9 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos9), image_eq_pos9);
gtk_widget_show(image_eq_pos9);
break;
case 10:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos10), image_eq_pos10);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos10), img_path);
- //image_eq_pos10 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos10), image_eq_pos10);
gtk_widget_show(image_eq_pos10);
break;
case 11:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos11), image_eq_pos11);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos11), img_path);
- //image_eq_pos11 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos11), image_eq_pos11);
gtk_widget_show(image_eq_pos11);
break;
case 12:
- //gtk_container_remove(GTK_CONTAINER(alignment_eq_pos12), image_eq_pos12);
gtk_image_set_from_file(GTK_IMAGE(image_eq_pos12), img_path);
- //image_eq_pos12 = gtk_image_new_from_file(img_path);
- //gtk_container_add(GTK_CONTAINER(alignment_eq_pos12), image_eq_pos12);
gtk_widget_show(image_eq_pos12);
break;
default:
@@ -3768,7 +3720,7 @@
}
void
-openmoko_set_title(gchar *title)
+openmoko_set_title( const gchar *title)
{
if(!title)
{
@@ -3779,7 +3731,7 @@
}
void
-openmoko_set_artist(gchar* artist)
+openmoko_set_artist(const gchar* artist)
{
if(!artist)
{
@@ -3795,6 +3747,14 @@
gchar* track_number;
if(playlist_get_length() == 0)
{
+ track_number = g_strdup_printf("%d", 0);
+ }
+ else
+ {
+ track_number = g_strdup_printf("%d", playlist_get_position() + 1);
+ }
+ if(playlist_get_length() == 0)
+ {
track_number = g_strdup_printf("%d", 0);
}
else
@@ -3900,7 +3860,7 @@
image_path = g_build_path("/", images_dir, "ico-pause.png", NULL);
image = gtk_image_new_from_file(image_path);
g_free(image_path);
- moko_pixmap_button_set_finger_toolbox_btn_center_image(play_pause_button, image);
+ moko_pixmap_button_set_finger_toolbox_btn_center_image(MOKO_PIXMAP_BUTTON(play_pause_button), image);
playorpause = TRUE;
timeout_id = g_timeout_add(100, openmoko_update_elapse_time, NULL);
openmoko_set_info();
@@ -3911,7 +3871,7 @@
image_path = g_build_path("/", images_dir, "ico-play.png", NULL);
image = gtk_image_new_from_file(image_path);
g_free(image_path);
- moko_pixmap_button_set_finger_toolbox_btn_center_image(play_pause_button, image);
+ moko_pixmap_button_set_finger_toolbox_btn_center_image(MOKO_PIXMAP_BUTTON(play_pause_button), image);
playorpause = FALSE;
g_source_remove(timeout_id);
}
@@ -4204,7 +4164,7 @@
init_image_dir();
- MokoApplication *app = MOKO_APPLICATION(moko_application_get_instance());
+// MokoApplication *app = MOKO_APPLICATION(moko_application_get_instance());
MokoFingerWindow *window = MOKO_FINGER_WINDOW(moko_finger_window_new());
g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(openmoko_main_quit), NULL);
@@ -4402,79 +4362,79 @@
gtk_container_add(GTK_CONTAINER(alignment), middle_hbox);
//set vis
- alignment_eq_pos1 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos1), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos1, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_path = g_build_path("/", images_dir, "ind-music-eq-01.png", NULL);
image_eq_pos1 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos1), image_eq_pos1);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos1);
- alignment_eq_pos2 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos2), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos2, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos2 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos2), image_eq_pos2);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos2);
- alignment_eq_pos3 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos3), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos3, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos3 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos3), image_eq_pos3);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos3);
- alignment_eq_pos4 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos4), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos4, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos4 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos4), image_eq_pos4);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos4);
- alignment_eq_pos5 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos5), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos5, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos5 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos5), image_eq_pos5);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos5);
- alignment_eq_pos6 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos6), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos6, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos6 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos6), image_eq_pos6);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos6);
- alignment_eq_pos7 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos7), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos7, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos7 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos7), image_eq_pos7);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos7);
- alignment_eq_pos8 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos8), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos8, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos8 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos8), image_eq_pos8);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos8);
- alignment_eq_pos9 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos9), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos9, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos9 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos9), image_eq_pos9);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos9);
- alignment_eq_pos10 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos10), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos10, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos10 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos10), image_eq_pos10);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos10);
- alignment_eq_pos11 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos11), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos11, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos11 = gtk_image_new_from_file(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos11), image_eq_pos11);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos11);
- alignment_eq_pos12 = gtk_alignment_new(0, 0, 0, 0);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_eq_pos12), 0, 0, 0, 0);
- gtk_box_pack_start(GTK_BOX(middle_hbox), alignment_eq_pos12, TRUE, TRUE, 0);
+ alignment = gtk_alignment_new(0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(middle_hbox), alignment, TRUE, TRUE, 0);
image_eq_pos12 = gtk_image_new_from_file(image_path);
+ gtk_container_add(GTK_CONTAINER(alignment), image_eq_pos12);
g_free(image_path);
- gtk_container_add(GTK_CONTAINER(alignment_eq_pos12), image_eq_pos12);
//set middle right vbox
GtkWidget* middle_right_vbox = gtk_vbox_new(FALSE, 0);
@@ -4602,13 +4562,13 @@
if(!tools)
{
- tools = moko_finger_window_get_toolbox(window);
+ tools = MOKO_FINGER_TOOL_BOX(moko_finger_window_get_toolbox(MOKO_FINGER_WINDOW(window)));
- prev_button = moko_finger_tool_box_add_button_without_label(tools);
+ prev_button = GTK_BUTTON(moko_finger_tool_box_add_button_without_label(MOKO_FINGER_TOOL_BOX(tools)));
image_path = g_build_path("/", images_dir, "ico-previoustrack.png", NULL);
image = gtk_image_new_from_file(image_path);
g_free(image_path);
- moko_pixmap_button_set_finger_toolbox_btn_center_image(prev_button, image);
+ moko_pixmap_button_set_finger_toolbox_btn_center_image(MOKO_PIXMAP_BUTTON(prev_button), image);
g_signal_connect(G_OBJECT(prev_button), "clicked",
G_CALLBACK(openmoko_playlist_prev), NULL);
@@ -4616,15 +4576,15 @@
image_path = g_build_path("/", images_dir, "ico-play.png", NULL);
image = gtk_image_new_from_file(image_path);
g_free(image_path);
- moko_pixmap_button_set_finger_toolbox_btn_center_image(play_pause_button, image);
+ moko_pixmap_button_set_finger_toolbox_btn_center_image(MOKO_PIXMAP_BUTTON(play_pause_button), image);
g_signal_connect(G_OBJECT(play_pause_button), "clicked",
G_CALLBACK(openmoko_play_pause_button_pushed), NULL);
- next_button = moko_finger_tool_box_add_button_without_label(tools);
+ next_button = GTK_BUTTON(moko_finger_tool_box_add_button_without_label(MOKO_FINGER_TOOL_BOX(tools)));
image_path = g_build_path("/", images_dir, "ico-nexttrack.png", NULL);
image = gtk_image_new_from_file(image_path);
g_free(image_path);
- moko_pixmap_button_set_finger_toolbox_btn_center_image(next_button, image);
+ moko_pixmap_button_set_finger_toolbox_btn_center_image(MOKO_PIXMAP_BUTTON(next_button), image);
g_signal_connect(G_OBJECT(next_button), "clicked",
G_CALLBACK(openmoko_playlist_next), NULL);
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.h 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.h 2007-02-26 01:33:14 UTC (rev 1126)
@@ -187,8 +187,9 @@
gint * numchannels);
//added by lijiang
-void openmoko_set_title();
-void openmoko_set_artist(gchar* artist);
+void openmoko_mainwin_create();
+void openmoko_set_title(const gchar* title);
+void openmoko_set_artist(const gchar* artist);
void openmoko_set_track_number();
void openmoko_set_total_number();
void openmoko_set_elapse_time(gint elapse_time);
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/playlistwin.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/playlistwin.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/playlistwin.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -1669,7 +1669,7 @@
static void
playlistwin_create_window(void)
{
- GdkPixbuf *icon;
+ //GdkPixbuf *icon;
playlistwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(playlistwin), _("BMP Playlist Editor"));
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/prefswin.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/prefswin.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/prefswin.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -110,7 +110,7 @@
{
return GLADE_XML(g_object_get_data(G_OBJECT(prefswin), "glade-xml"));
}
-*/
+
static void
change_category(GtkNotebook * notebook,
GtkTreeSelection * selection)
@@ -125,7 +125,7 @@
gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1);
gtk_notebook_set_current_page(notebook, index);
}
-
+*/
void
prefswin_set_category(gint index)
{
@@ -139,7 +139,7 @@
// gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), index);
}
-
+/*
static void
input_plugin_open_prefs(GtkTreeView * treeview,
gpointer data)
@@ -233,9 +233,9 @@
gboolean fixed;
gint pluginnr;
gchar *filename, *basename;
- /*GList *diplist, *tmplist; */
+ // *GList *diplist, *tmplist; *
- /* get toggled iter */
+ // * get toggled iter *
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get(model, &iter,
PLUGIN_VIEW_COL_ACTIVE, &fixed,
@@ -246,17 +246,17 @@
basename = g_path_get_basename(filename);
g_free(filename);
- /* do something with the value */
+ // * do something with the value *
fixed ^= 1;
g_hash_table_replace(plugin_matrix, basename, GINT_TO_POINTER(fixed));
- /* g_hash_table_foreach(pluginmatrix, (GHFunc) disp_matrix, NULL); */
+ // * g_hash_table_foreach(pluginmatrix, (GHFunc) disp_matrix, NULL); *
- /* set new value */
+ // * set new value *
gtk_list_store_set(GTK_LIST_STORE(model), &iter,
PLUGIN_VIEW_COL_ACTIVE, fixed, -1);
- /* clean up */
+ // * clean up *
gtk_tree_path_free(path);
}
@@ -272,22 +272,22 @@
gboolean fixed;
gint pluginnr;
- /* get toggled iter */
+ // * get toggled iter *
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get(model, &iter,
PLUGIN_VIEW_COL_ACTIVE, &fixed,
PLUGIN_VIEW_COL_ID, &pluginnr, -1);
- /* do something with the value */
+ // * do something with the value *
fixed ^= 1;
enable_vis_plugin(pluginnr, fixed);
- /* set new value */
+ // * set new value *
gtk_list_store_set(GTK_LIST_STORE(model), &iter,
PLUGIN_VIEW_COL_ACTIVE, fixed, -1);
- /* clean up */
+ // * clean up *
gtk_tree_path_free(path);
}
@@ -302,22 +302,22 @@
gboolean fixed;
gint pluginnr;
- /* get toggled iter */
+ // * get toggled iter *
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get(model, &iter,
PLUGIN_VIEW_COL_ACTIVE, &fixed,
PLUGIN_VIEW_COL_ID, &pluginnr, -1);
- /* do something with the value */
+ // * do something with the value *
fixed ^= 1;
enable_effect_plugin(pluginnr, fixed);
- /* set new value */
+ // * set new value *
gtk_list_store_set(GTK_LIST_STORE(model), &iter,
PLUGIN_VIEW_COL_ACTIVE, fixed, -1);
- /* clean up */
+ // * clean up *
gtk_tree_path_free(path);
}
static void
@@ -331,22 +331,22 @@
gboolean fixed;
gint pluginnr;
- /* get toggled iter */
+ // * get toggled iter *
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get(model, &iter,
PLUGIN_VIEW_COL_ACTIVE, &fixed,
PLUGIN_VIEW_COL_ID, &pluginnr, -1);
- /* do something with the value */
+ // * do something with the value *
fixed ^= 1;
enable_general_plugin(pluginnr, fixed);
- /* set new value */
+ // * set new value *
gtk_list_store_set(GTK_LIST_STORE(model), &iter,
PLUGIN_VIEW_COL_ACTIVE, fixed, -1);
- /* clean up */
+ // * clean up *
gtk_tree_path_free(path);
}
@@ -357,9 +357,9 @@
gint selected;
selected = gtk_combo_box_get_active(combobox);
- /* Force playback to stop. There is NO way to change the output
- plugin in the middle of a playback, and NO way to know when the
- user closes the output plugin settings dialog. */
+ // * Force playback to stop. There is NO way to change the output
+ // plugin in the middle of a playback, and NO way to know when the
+ // user closes the output plugin settings dialog. *
mainwin_stop_pushed();
set_current_output_plugin(selected);
}
@@ -477,8 +477,8 @@
gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store));
}
-
-
+*/
+/*
static void
on_general_plugin_view_realize(GtkTreeView * treeview,
gpointer data)
@@ -489,7 +489,7 @@
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
- GList *ilist /*, *diplist */ ;
+ GList *ilist;
gchar *description[2];
GeneralPlugin *gp;
gint id = 0;
@@ -565,8 +565,8 @@
gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store));
}
-
-
+*/
+/*
static void
on_vis_plugin_view_realize(GtkTreeView * treeview,
gpointer data)
@@ -654,7 +654,8 @@
gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store));
}
-
+*/
+/*
static void
editable_insert_text(GtkEditable * editable,
const gchar * text,
@@ -750,7 +751,8 @@
gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store));
}
-
+*/
+/*
static void
titlestring_tag_menu_callback(GtkMenuItem * menuitem,
gpointer data)
@@ -766,7 +768,7 @@
pos = gtk_editable_get_position(GTK_EDITABLE(entry));
- /* insert separator as needed */
+ // * insert separator as needed *
if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(entry)), -1) > 0)
editable_insert_text(GTK_EDITABLE(entry), separator, &pos);
@@ -1185,11 +1187,11 @@
gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1);
effect_about(id);
}
+*/
-
-
+/*
static void
on_mouse_wheel_volume_realize(GtkSpinButton * button,
gpointer data)
@@ -1269,7 +1271,7 @@
{
cfg.convert_twenty = gtk_toggle_button_get_active(button);
}
-
+*/
#if 0
static void
on_playlist_update_clicked(GtkButton * button,
@@ -1279,7 +1281,7 @@
draw_playlist_window(TRUE);
}
#endif
-
+/*
static void
on_use_pl_metadata_realize(GtkToggleButton * button,
gpointer data)
@@ -1398,7 +1400,7 @@
}
-/* FIXME: implement these */
+// * FIXME: implement these *
static void
on_eq_preset_view_realize(GtkTreeView * treeview,
@@ -1414,15 +1416,15 @@
on_eq_preset_remove_clicked(GtkButton * button,
gpointer data)
{}
+*/
-
static void
prefswin_set_skin_update(gboolean state)
{
g_object_set_data(G_OBJECT(prefswin), "update-skins",
GINT_TO_POINTER(state));
}
-
+/*
static gboolean
prefswin_get_skin_update(void)
{
@@ -1509,19 +1511,19 @@
path = (gchar *) selection_data->data;
- /* FIXME: use a real URL validator/parser */
+ // * FIXME: use a real URL validator/parser *
if (!str_has_prefix_nocase(path, "fonts:///"))
return;
- path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */
+ path[strlen(path) - 2] = 0; // * Why the hell a CR&LF? *
path += 8;
- /* plain, since we already stripped the first URI part */
+ // * plain, since we already stripped the first URI part *
decoded = xmms_urldecode_plain(path);
- /* Get the old font's size, and add it to the dropped
- * font's name */
+ // * Get the old font's size, and add it to the dropped
+ // * font's name *
cfg.playlist_font = g_strconcat(decoded+1,
strrchr(cfg.playlist_font, ' '),
NULL);
@@ -1550,10 +1552,10 @@
path = (gchar *) selection_data->data;
- /* FIXME: use a real URL validator/parser */
+ // * FIXME: use a real URL validator/parser *
if (str_has_prefix_nocase(path, "file:///")) {
- path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */
+ path[strlen(path) - 2] = 0; // * Why the hell a CR&LF? *
path += 7;
}
else if (str_has_prefix_nocase(path, "file:")) {
@@ -1564,7 +1566,7 @@
bmp_active_skin_load(path);
skin_install_skin(path);
skin_view_update(GTK_TREE_VIEW(widget));
- /* Change skin name in the config file */
+ // * Change skin name in the config file *
db = bmp_cfg_db_open();
bmp_cfg_db_set_string(db, NULL, "skin", path);
bmp_cfg_db_close(db);
@@ -1572,7 +1574,7 @@
}
-/* FIXME: complete the map */
+// * FIXME: complete the map *
FUNC_MAP_BEGIN(prefswin_func_map)
FUNC_MAP_ENTRY(on_input_plugin_view_realize)
FUNC_MAP_ENTRY(on_output_plugin_cbox_realize)
@@ -1614,17 +1616,17 @@
FUNC_MAP_ENTRY(on_eq_preset_add_clicked)
FUNC_MAP_ENTRY(on_eq_preset_remove_clicked)
FUNC_MAP_END
-
+*/
void
create_prefs_window(void)
{
//const gchar *glade_file = DATA_DIR "/glade/prefswin.glade";
//GladeXML *xml;
- GtkWidget *widget, *widget2;
+ //GtkWidget *widget, *widget2;
- GtkWidget *titlestring_tag_menu, *menu_item;
- gint i;
+ //GtkWidget *titlestring_tag_menu, *menu_item;
+ //gint i;
/* load the interface */
//xml = glade_xml_new_or_die(_("Preferences Window"), glade_file, NULL,
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/skin.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/skin.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/skin.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -389,7 +389,7 @@
return ret;
}
-
+/*
static void
skin_query_color(GdkColormap * cm, GdkColor * c)
{
@@ -408,13 +408,13 @@
return (0.212671 * c->red + 0.715160 * c->green + 0.072169 * c->blue);
}
+
static void
skin_get_textcolors(GdkPixmap * text, GdkColor * bgc, GdkColor * fgc)
{
- /*
- * Try to extract reasonable background and foreground colors
- * from the font pixmap
- */
+ // * Try to extract reasonable background and foreground colors
+ // * from the font pixmap
+ // *
GdkImage *gi;
GdkColormap *cm;
@@ -422,7 +422,7 @@
g_return_if_fail(text != NULL);
- /* Get the first line of text */
+ // * Get the first line of text *
gi = gdk_drawable_get_image(text, 0, 0, 152, 6);
cm = gdk_window_get_colormap(playlistwin->window);
g_return_if_fail(GDK_IS_WINDOW(playlistwin->window));
@@ -432,7 +432,7 @@
gint x;
glong d, max_d;
- /* Get a pixel from the middle of the space character */
+ // * Get a pixel from the middle of the space character *
bgc[i].pixel = gdk_image_get_pixel(gi, 151, i);
skin_query_color(cm, &bgc[i]);
@@ -451,6 +451,7 @@
gdk_image_destroy(gi);
}
+*/
gboolean
init_skins(const gchar * path)
Modified: trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/util.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/util.c 2007-02-25 23:46:40 UTC (rev 1125)
+++ trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/util.c 2007-02-26 01:33:14 UTC (rev 1126)
@@ -688,7 +688,7 @@
return win;
}
-
+/*
static void
filebrowser_add_files(GtkFileChooser * browser,
GSList * files)
@@ -787,7 +787,7 @@
filebrowser_play(data);
gtk_file_chooser_unselect_all(data);
}
-
+*/
#if 0
static void
filebrowser_on_response(GtkFileChooser * browser,
@@ -808,7 +808,7 @@
}
#endif
-
+/*
static void
_filebrowser_check_hide_add(GtkWidget * widget,
gpointer data)
@@ -822,17 +822,17 @@
{
cfg.close_dialog_open = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
}
+*/
-
-
+/*
static gboolean
filebrowser_on_keypress(GtkWidget * browser,
GdkEventKey * event,
gpointer data)
{
if (event->keyval == GDK_Escape) {
- /* FIXME: this crashes BMP for some reason */
- /* g_signal_emit_by_name(browser, "delete-event"); */
+ // * FIXME: this crashes BMP for some reason *
+ // * g_signal_emit_by_name(browser, "delete-event"); *
gtk_widget_hide(browser);
return TRUE;
}
@@ -855,7 +855,7 @@
if (cfg.close_dialog_open)
gtk_widget_hide(data);
}
-
+*/
void
util_run_filebrowser(gboolean play_button)
{
More information about the commitlog
mailing list