Thread: [Mplayerplug-in-cvs] mplayerplug-in/Source plugin-support.cpp,1.70,1.71 plugin-ui.cpp,1.116,1.117 pl
Brought to you by:
kdekorte
From: Kevin D. <kde...@us...> - 2005-06-28 13:46:48
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24942/Source Modified Files: plugin-support.cpp plugin-ui.cpp plugin.cpp Log Message: Fix issue with nomediacache=1 and autostart=1 and the buttons not displaying Removed unnessary unlock from ::Play in the SetupPlayer section Index: plugin-ui.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-ui.cpp,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** plugin-ui.cpp 6 May 2005 22:38:18 -0000 1.116 --- plugin-ui.cpp 28 Jun 2005 13:46:26 -0000 1.117 *************** *** 859,863 **** return FALSE; if (DEBUG > 1) ! printf("panel_height = %i\nDrawn = %i", instance->panel_height, instance->panel_drawn); --- 859,863 ---- return FALSE; if (DEBUG > 1) ! printf("panel_height = %i\nDrawn = %i\n", instance->panel_height, instance->panel_drawn); *************** *** 880,886 **** if (instance->panel_height < 0) instance->panel_height = 0; ! if (DEBUG > 1) printf("drawing panel\n height = %i panel= %i\n", win_height, instance->panel_height); if (instance->panel_height > 0 && instance->showcontrols == 1) { #ifdef GTK2_ENABLED --- 880,889 ---- if (instance->panel_height < 0) instance->panel_height = 0; ! if (DEBUG > 1) { printf("drawing panel\n height = %i panel= %i\n", win_height, instance->panel_height); + printf("showbuttons = %i\nshowcontrols = %i\n", + instance->showbuttons, instance->showcontrols); + } if (instance->panel_height > 0 && instance->showcontrols == 1) { #ifdef GTK2_ENABLED Index: plugin-support.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-support.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** plugin-support.cpp 27 Jun 2005 17:50:04 -0000 1.70 --- plugin-support.cpp 28 Jun 2005 13:46:26 -0000 1.71 *************** *** 394,398 **** if (DEBUG > 1) ! printf("in sendcommand - command %s\n",command); buffer[1023] = '\0'; --- 394,398 ---- if (DEBUG > 1) ! printf("in sendcommand - command %s\n", command); buffer[1023] = '\0'; Index: plugin.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.cpp,v retrieving revision 1.197 retrieving revision 1.198 diff -C2 -d -r1.197 -r1.198 *** plugin.cpp 27 Jun 2005 18:34:51 -0000 1.197 --- plugin.cpp 28 Jun 2005 13:46:26 -0000 1.198 *************** *** 327,330 **** --- 327,331 ---- ("Thread is setup but waiting for signal so we need to shut it down\n"); signalPlayerThread(this); + threadsignaled = 1; pthread_cancel(player_thread); } *************** *** 354,359 **** if (controlwindow == 0) { if (panel_drawn == 1) { ! if (GTK_IS_WIDGET(play_event_box))if (GTK_IS_WIDGET(play_event_box)) ! gtk_widget_destroy(play_event_box); if (GTK_IS_WIDGET(pause_event_box)) gtk_widget_destroy(pause_event_box); --- 355,361 ---- if (controlwindow == 0) { if (panel_drawn == 1) { ! if (GTK_IS_WIDGET(play_event_box)) ! if (GTK_IS_WIDGET(play_event_box)) ! gtk_widget_destroy(play_event_box); if (GTK_IS_WIDGET(pause_event_box)) gtk_widget_destroy(pause_event_box); *************** *** 388,392 **** gtk_widget_destroy(fs_event_box); ! if (popup_menu != NULL) { gtk_widget_destroy(GTK_WIDGET(menuitem_play)); gtk_widget_destroy(GTK_WIDGET(menuitem_pause)); --- 390,394 ---- gtk_widget_destroy(fs_event_box); ! if (GTK_IS_WIDGET(popup_menu)) { gtk_widget_destroy(GTK_WIDGET(menuitem_play)); gtk_widget_destroy(GTK_WIDGET(menuitem_pause)); *************** *** 927,930 **** --- 929,942 ---- gtk_widget_map(gtkwidget); #endif + + if (panel_drawn == 0 && autostart == 0 && nomediacache == 1) { + if (showcontrols) { + panel_height = aWindow->height; + #ifdef GTK_ENABLED + g_idle_add(gtkgui_draw, this); + #endif + } + } + if (DEBUG > 1) printf("reparent and map done\n"); *************** *** 1015,1018 **** --- 1027,1039 ---- printf("resize is complete\n"); + if (panel_drawn == 0 && autostart == 0 && nomediacache == 1) { + if (showcontrols) { + panel_height = aWindow->height; + #ifdef GTK_ENABLED + g_idle_add(gtkgui_draw, this); + #endif + } + } + if (panel_drawn == 1 && mode == NP_FULL) { if (panel_height >= 32) { *************** *** 1193,1197 **** threadsignaled = 1; } else { ! if (showcontrols) { panel_height = 16; #ifdef GTK_ENABLED --- 1214,1218 ---- threadsignaled = 1; } else { ! if (showcontrols && panel_drawn == 0) { panel_height = 16; #ifdef GTK_ENABLED *************** *** 1230,1234 **** threadsignaled = 1; } else { ! if (showcontrols) { panel_height = 16; #ifdef GTK_ENABLED --- 1251,1255 ---- threadsignaled = 1; } else { ! if (showcontrols && panel_drawn == 0) { panel_height = 16; #ifdef GTK_ENABLED *************** *** 1286,1290 **** threadsignaled = 1; } else { ! if (showcontrols) { panel_height = 16; #ifdef GTK_ENABLED --- 1307,1311 ---- threadsignaled = 1; } else { ! if (showcontrols && panel_drawn == 0) { panel_height = 16; #ifdef GTK_ENABLED *************** *** 1340,1344 **** threadsignaled = 1; } else { ! if (showcontrols) { panel_height = 16; #ifdef GTK_ENABLED --- 1361,1365 ---- threadsignaled = 1; } else { ! if (showcontrols && panel_drawn == 0) { panel_height = 16; #ifdef GTK_ENABLED *************** *** 1411,1419 **** pthread_mutex_unlock(&playlist_mutex); if (threadsignaled == 0) { - if (DEBUG) - printf("signalling player from write ready\n"); if (autostart) { signalPlayerThread(this); threadsignaled = 1; } } --- 1432,1447 ---- pthread_mutex_unlock(&playlist_mutex); if (threadsignaled == 0) { if (autostart) { + if (DEBUG) + printf("signalling player from write ready\n"); signalPlayerThread(this); threadsignaled = 1; + } else { + if (showcontrols && panel_drawn == 0) { + panel_height = 16; + #ifdef GTK_ENABLED + g_idle_add(gtkgui_draw, this); + #endif + } } } *************** *** 1455,1458 **** --- 1483,1492 ---- addToEnd(td->list, n); pthread_mutex_unlock(&playlist_mutex); + if (showcontrols && panel_drawn == 0) { + panel_height = 16; + #ifdef GTK_ENABLED + g_idle_add(gtkgui_draw, this); + #endif + } return -1; } else { *************** *** 1577,1584 **** } else { if (currdownload < maxdownload) { ! snprintf(message, 1024, "Buffering %i%% - %li KB ", ! (int) (100.0 * ((double)currdownload / (double) maxdownload)), (n->bytes / 1024)); } else { ! snprintf(message, 1024, "Buffering Complete - %li KB ", (n->bytes / 1024)); } } --- 1611,1623 ---- } else { if (currdownload < maxdownload) { ! snprintf(message, 1024, "Buffering %i%% - %li KB ", ! (int) (100.0 * ! ((double) currdownload / ! (double) maxdownload)), ! (n->bytes / 1024)); } else { ! snprintf(message, 1024, ! "Buffering Complete - %li KB ", ! (n->bytes / 1024)); } } *************** *** 1720,1728 **** if (autostart) { if (DEBUG) ! printf("signalling player from write\n"); signalPlayerThread(this); threadsignaled = 1; } else { ! if (showcontrols) { panel_height = 16; #ifdef GTK_ENABLED --- 1759,1768 ---- if (autostart) { if (DEBUG) ! printf ! ("signalling player from write\n"); signalPlayerThread(this); threadsignaled = 1; } else { ! if (showcontrols && panel_drawn == 0) { panel_height = 16; #ifdef GTK_ENABLED *************** *** 1778,1782 **** pthread_mutex_unlock(&playlist_mutex); // unlock the playlist } - // the thread is not inited // controlwindow is set to 1 when the controls are in one instance and the --- 1818,1821 ---- *************** *** 1787,1791 **** printf("Play: setupplayer\n"); state = STATE_GETTING_PLAYLIST; - pthread_mutex_unlock(&control_mutex); // can't hold the control lock while setting up the player SetupPlayer(this, NULL); } --- 1826,1829 ---- |