[Mplayerplug-in-cvs] mplayerplug-in/Source plugin-threads.cpp,1.207,1.208 plugin-ui.cpp,1.190,1.191
Brought to you by:
kdekorte
From: Kevin D. <kde...@us...> - 2006-02-08 21:39:30
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28954/Source Modified Files: plugin-threads.cpp plugin-ui.cpp plugin.cpp Log Message: Fix some GTK2 widget errors (sizes not specified) Undo XEmbed fix and try another Index: plugin-ui.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-ui.cpp,v retrieving revision 1.190 retrieving revision 1.191 diff -C2 -d -r1.190 -r1.191 *** plugin-ui.cpp 7 Feb 2006 14:13:10 -0000 1.190 --- plugin-ui.cpp 8 Feb 2006 21:39:20 -0000 1.191 *************** *** 1136,1139 **** --- 1136,1140 ---- "button_press_event", G_CALLBACK(rew_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->rew_event_box),width,height); #endif #ifdef GTK1_ENABLED *************** *** 1142,1145 **** --- 1143,1147 ---- GTK_SIGNAL_FUNC(rew_callback), instance); + gtk_widget_set_usize(GTK_WIDGET(instance->rew_event_box),width,height); #endif gtk_container_add(GTK_CONTAINER(instance->rew_event_box), *************** *** 1148,1151 **** --- 1150,1154 ---- instance->rew_event_box, width * multiplier++, win_height - height); + if (instance->showbuttons) { gtk_widget_show(instance->image_rew); *************** *** 1164,1167 **** --- 1167,1171 ---- "button_press_event", G_CALLBACK(play_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->play_event_box),width,height); #endif #ifdef GTK1_ENABLED *************** *** 1169,1172 **** --- 1173,1177 ---- "button_press_event", GTK_SIGNAL_FUNC(play_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->play_event_box),width,height); #endif gtk_container_add(GTK_CONTAINER(instance->play_event_box), *************** *** 1190,1193 **** --- 1195,1199 ---- "button_press_event", G_CALLBACK(pause_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->pause_event_box),width,height); #endif #ifdef GTK1_ENABLED *************** *** 1195,1198 **** --- 1201,1205 ---- "button_press_event", GTK_SIGNAL_FUNC(pause_callback), instance); + gtk_widget_set_usize(GTK_WIDGET(instance->pause_event_box),width,height); #endif gtk_container_add(GTK_CONTAINER(instance->pause_event_box), *************** *** 1219,1222 **** --- 1226,1230 ---- "button_press_event", G_CALLBACK(stop_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->stop_event_box),width,height); #endif #ifdef GTK1_ENABLED *************** *** 1224,1227 **** --- 1232,1236 ---- "button_press_event", GTK_SIGNAL_FUNC(stop_callback), instance); + gtk_widget_set_usize(GTK_WIDGET(instance->stop_event_box),width,height); #endif gtk_container_add(GTK_CONTAINER(instance->stop_event_box), *************** *** 1246,1249 **** --- 1255,1259 ---- "button_press_event", G_CALLBACK(ff_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->ff_event_box),width,height); #endif #ifdef GTK1_ENABLED *************** *** 1251,1254 **** --- 1261,1265 ---- "button_press_event", GTK_SIGNAL_FUNC(ff_callback), instance); + gtk_widget_set_usize(GTK_WIDGET(instance->ff_event_box),width,height); #endif gtk_container_add(GTK_CONTAINER(instance->ff_event_box), *************** *** 1307,1310 **** --- 1318,1322 ---- "button_press_event", G_CALLBACK(fs_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->fs_event_box),width,height); #endif #ifdef GTK1_ENABLED *************** *** 1312,1315 **** --- 1324,1328 ---- "button_press_event", GTK_SIGNAL_FUNC(fs_callback), instance); + gtk_widget_set_usize(GTK_WIDGET(instance->fs_event_box),width,height); #endif gtk_container_add(GTK_CONTAINER(instance->fs_event_box), *************** *** 1568,1574 **** if (((int) instance->mediaLength > 0) && (instance->mediaPercent <= 100)) { ! if (instance->controlsvisible && instance->showtracker) gtk_widget_show(GTK_WIDGET (instance->mediaprogress_bar)); gtk_progress_bar_update(instance->mediaprogress_bar, instance->mediaPercent / 100.0); --- 1581,1588 ---- if (((int) instance->mediaLength > 0) && (instance->mediaPercent <= 100)) { ! if (instance->controlsvisible && instance->showtracker) { gtk_widget_show(GTK_WIDGET (instance->mediaprogress_bar)); + } gtk_progress_bar_update(instance->mediaprogress_bar, instance->mediaPercent / 100.0); *************** *** 2747,2754 **** gtk_fixed_put(GTK_FIXED(instance->fixed_container), instance->src_event_box, 0, 0); gtk_widget_show(GTK_WIDGET(instance->image_src)); gtk_widget_show(instance->src_event_box); } else { - instance->button_window = gtk_window_new(GTK_WINDOW_POPUP); gtk_widget_set_size_request(instance->button_window, instance->window_width, --- 2761,2768 ---- gtk_fixed_put(GTK_FIXED(instance->fixed_container), instance->src_event_box, 0, 0); + gtk_widget_set_size_request(GTK_WIDGET(instance->src_event_box),instance->window_width,instance->window_height); gtk_widget_show(GTK_WIDGET(instance->image_src)); gtk_widget_show(instance->src_event_box); } else { gtk_widget_set_size_request(instance->button_window, instance->window_width, *************** *** 2765,2771 **** --- 2779,2787 ---- "button_press_event", G_CALLBACK(load_href_callback), instance); + gtk_widget_set_size_request(GTK_WIDGET(instance->src_event_box),instance->window_width,instance->window_height); fixed_button_container = gtk_fixed_new(); gtk_container_add(GTK_CONTAINER(instance->button_window), fixed_button_container); + gtk_widget_set_size_request(GTK_WIDGET(fixed_button_container),instance->window_width,instance->window_height); gtk_fixed_put(GTK_FIXED(fixed_button_container), instance->src_event_box, 0, 0); *************** *** 2774,2783 **** gtk_widget_show(fixed_button_container); gtk_widget_show(instance->button_window); ! XReparentWindow(GDK_WINDOW_XDISPLAY ! (instance->button_window->window), ! GDK_WINDOW_XWINDOW(instance->button_window-> ! window), instance->window, ! 0, 0); ! gtk_widget_map(instance->button_window); g_idle_add(gtkgui_draw, instance); --- 2790,2799 ---- gtk_widget_show(fixed_button_container); gtk_widget_show(instance->button_window); ! // XReparentWindow(GDK_WINDOW_XDISPLAY ! // (instance->button_window->window), ! // GDK_WINDOW_XWINDOW(instance->button_window-> ! // window), instance->window, ! // 0, 0); ! // gtk_widget_map(instance->button_window); g_idle_add(gtkgui_draw, instance); Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.207 retrieving revision 1.208 diff -C2 -d -r1.207 -r1.208 *** plugin-threads.cpp 7 Feb 2006 14:13:10 -0000 1.207 --- plugin-threads.cpp 8 Feb 2006 21:39:20 -0000 1.208 *************** *** 439,443 **** instance->window_width - 20, 19); gtk_widget_show(instance->drawing_area); - gtk_widget_show_all(instance->gtkwidget); instance->player_window = GDK_WINDOW_XWINDOW(instance->drawing_area->window); --- 439,442 ---- Index: plugin.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.cpp,v retrieving revision 1.281 retrieving revision 1.282 diff -C2 -d -r1.281 -r1.282 *** plugin.cpp 7 Feb 2006 14:17:22 -0000 1.281 --- plugin.cpp 8 Feb 2006 21:39:20 -0000 1.282 *************** *** 735,749 **** #ifdef GTK_ENABLED if (targetplayer == 0 ) { ! #ifdef GTK2_ENABLED ! gtkwidget = gtk_window_new(GTK_WINDOW_POPUP); ! #endif ! #ifdef GTK1_ENABLED ! gdk_flush(); ! XSync(display, FALSE); gtkwidget = gtk_plug_new(window); ! gtk_widget_realize(gtkwidget); ! #endif } else { gtkwidget = gtk_window_new(GTK_WINDOW_TOPLEVEL); #ifdef GTK2_ENABLED --- 735,750 ---- #ifdef GTK_ENABLED if (targetplayer == 0 ) { ! //#ifdef GTK2_ENABLED ! // gtkwidget = gtk_window_new(GTK_WINDOW_POPUP); ! //#endif ! //#ifdef GTK1_ENABLED ! // gdk_flush(); ! // XSync(display, FALSE); gtkwidget = gtk_plug_new(window); ! // gtk_widget_realize(gtkwidget); ! //#endif } else { + button_window = gtk_plug_new(window); gtkwidget = gtk_window_new(GTK_WINDOW_TOPLEVEL); #ifdef GTK2_ENABLED *************** *** 920,923 **** --- 921,927 ---- G_CALLBACK(popup_handler), GTK_OBJECT(popup_menu)); + gtk_widget_set_size_request(GTK_WIDGET(fixed_container),window_width,window_height); + gtk_widget_set_size_request(GTK_WIDGET(fixed_event_box),window_width,window_height); + #endif #ifdef GTK1_ENABLED *************** *** 926,929 **** --- 930,936 ---- GTK_SIGNAL_FUNC(popup_handler), GTK_OBJECT(popup_menu)); + gtk_widget_set_usize(GTK_WIDGET(fixed_container),window_width,window_height); + gtk_widget_set_usize(GTK_WIDGET(fixed_event_box),window_width,window_height); + #endif gtk_container_add(GTK_CONTAINER(fixed_event_box), fixed_container); *************** *** 1040,1049 **** #ifdef GTK2_ENABLED ! if (targetplayer == 0) { ! XReparentWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window), ! GDK_WINDOW_XWINDOW(gtkwidget->window), window, ! 0, 0); ! gtk_widget_map(gtkwidget); ! } #endif --- 1047,1056 ---- #ifdef GTK2_ENABLED ! // if (targetplayer == 0) { ! // XReparentWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window), ! // GDK_WINDOW_XWINDOW(gtkwidget->window), window, ! // 0, 0); ! // gtk_widget_map(gtkwidget); ! // } #endif *************** *** 1372,1378 **** remove(n->fname); } ! printf ! ("checking to see if we need to make a button\nn->url=%s\nurl=%s\nhref=%s\n", ! n->url, url, href); if (n->url != NULL && url != NULL) { if ((strncmp(n->url, url, 1024) == 0) && href != NULL) { --- 1379,1388 ---- remove(n->fname); } ! ! if (DEBUG) ! printf ! ("checking to see if we need to make a button\nn->url=%s\nurl=%s\nhref=%s\n", ! n->url, url, (href == NULL)? "(NULL)" : href); ! if (n->url != NULL && url != NULL) { if ((strncmp(n->url, url, 1024) == 0) && href != NULL) { *************** *** 3051,3055 **** #ifdef GTK_ENABLED case NPPVpluginNeedsXEmbed:{ ! *(PRBool *) aValue = PR_FALSE; rv = NPERR_NO_ERROR; } --- 3061,3065 ---- #ifdef GTK_ENABLED case NPPVpluginNeedsXEmbed:{ ! *(PRBool *) aValue = PR_TRUE; rv = NPERR_NO_ERROR; } |