From: Guenter B. <gu...@us...> - 2003-03-20 22:00:01
|
Update of /cvsroot/xine/gnome-xine/browser-plugin In directory sc8-pr-cvs1:/tmp/cvs-serv15712/browser-plugin Modified Files: plugin.c Log Message: add a play button for better real plugin emulation Index: plugin.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/browser-plugin/plugin.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- plugin.c 20 Mar 2003 19:03:02 -0000 1.12 +++ plugin.c 20 Mar 2003 21:59:57 -0000 1.13 @@ -86,7 +86,7 @@ gboolean autostart; GtkWidget *gtk_wind, *da; - GdkPixbuf *logo; + GdkPixbuf *pix_logo, *pix_play; PangoLayout *pl; PangoFontDescription *pfd; @@ -201,7 +201,7 @@ || !this->real_controls || (!strcasecmp (this->real_controls, "imagewindow"))) { - gdk_pixbuf_render_to_drawable (this->logo, this->da->window, NULL, 0, 0, + gdk_pixbuf_render_to_drawable (this->pix_logo, this->da->window, NULL, 0, 0, 0, 0, this->width-1, this->height-1, GDK_RGB_DITHER_MAX, 0, 0); @@ -210,6 +210,13 @@ -1); gdk_draw_layout (this->da->window, this->blue_gc, 3, this->height-18, this->pl); + } else if (this->real_controls && !strcasecmp (this->real_controls, "PlayonlyButton")) { + + gdk_pixbuf_render_to_drawable (this->pix_play, this->da->window, NULL, 0, 0, + 0, 0, this->width-1, this->height-1, + GDK_RGB_DITHER_MAX, 0, 0); + + } else { gdk_draw_rectangle (this->da->window, this->black_gc, TRUE, 0, 0, @@ -441,10 +448,13 @@ plugin_instance_t *this = (plugin_instance_t *) data; - this->is_visible = TRUE; - gtk_widget_show_all (this->dlg); - gtk_widget_map (this->dlg); - + if (this->real_controls && !strcasecmp (this->real_controls, "PlayonlyButton") && this->url) { + launch_gxine (this); + } else { /* show info dialog */ + this->is_visible = TRUE; + gtk_widget_show_all (this->dlg); + gtk_widget_map (this->dlg); + } } static gboolean close_cb (GtkWidget* widget, gpointer data) { @@ -473,8 +483,14 @@ GdkPixbuf *pixbuf; pathname = g_strconcat (GXINE_PIXMAPDIR, "/plugin_logo.png", NULL); pixbuf = gdk_pixbuf_new_from_file (pathname, NULL); - this->logo = gdk_pixbuf_scale_simple (pixbuf, this->width, this->height, - GDK_INTERP_BILINEAR); + this->pix_logo = gdk_pixbuf_scale_simple (pixbuf, this->width, this->height, + GDK_INTERP_BILINEAR); + gdk_pixbuf_unref (pixbuf); + g_free (pathname); + pathname = g_strconcat (GXINE_PIXMAPDIR, "/plugin_play.png", NULL); + pixbuf = gdk_pixbuf_new_from_file (pathname, NULL); + this->pix_play = gdk_pixbuf_scale_simple (pixbuf, this->width, this->height, + GDK_INTERP_BILINEAR); gdk_pixbuf_unref (pixbuf); g_free (pathname); } |