From: arik d. <ca...@us...> - 2002-05-03 08:07:17
|
CVS Root: /cvsroot/gstreamer Module: gst-player Changes by: cael Date: Fri May 03 2002 01:07:13 PDT Log message: you can play on the command line again, plus some expose stuff that doesn't do what i want it do but prob does something useful :-) Modified files: libs/gst/player : gstcontrol.c gstmediaplay.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/libs/gst/player/gstcontrol.c.diff?r1=1.2&r2=1.3 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/libs/gst/player/gstmediaplay.c.diff?r1=1.25&r2=1.26 ====Begin Diffs==== Index: gstcontrol.c =================================================================== RCS file: /cvsroot/gstreamer/gst-player/libs/gst/player/gstcontrol.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gstcontrol.c 3 May 2002 07:35:43 -0000 1.2 +++ gstcontrol.c 3 May 2002 08:07:01 -0000 1.3 @@ -32,6 +32,7 @@ static void gst_control_destroy (GtkObject *object); static void gst_control_finalize (GObject *object); +static gint gst_control_expose (GtkWidget *widget, GdkEventExpose *event); GNOME_CLASS_BOILERPLATE (GstControl, gst_control, GtkHBox, GTK_TYPE_HBOX) @@ -128,6 +129,8 @@ gobject_class->finalize = gst_control_finalize; + widget_class->expose_event = gst_control_expose; + gst_control_signals [BUTTON_PLAY] = g_signal_new ("button_play", G_TYPE_FROM_CLASS (gobject_class), @@ -330,6 +333,21 @@ control = GST_CONTROL (object); GNOME_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); +} + +static gint +gst_control_expose (GtkWidget *widget, GdkEventExpose *event) +{ + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (GST_IS_CONTROL (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + if (GTK_WIDGET_DRAWABLE (widget)) { + return GNOME_CALL_PARENT_WITH_DEFAULT + (GTK_WIDGET_CLASS, expose_event, (widget, event), FALSE); + } + + return FALSE; } GtkWidget * Index: gstmediaplay.c =================================================================== RCS file: /cvsroot/gstreamer/gst-player/libs/gst/player/gstmediaplay.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- gstmediaplay.c 3 May 2002 07:35:43 -0000 1.25 +++ gstmediaplay.c 3 May 2002 08:07:01 -0000 1.26 @@ -264,6 +264,8 @@ void gst_media_play_start_uri (GstMediaPlay *mplay, const guchar *uri) { + mplay->filename = uri +; gtk_window_set_title (GTK_WINDOW (mplay->window), g_strdup_printf ("%s", uri)); /* FIXME: ugly hack starts here */ @@ -292,8 +294,7 @@ file_selection = data->selection; mplay = data->mplay; - mplay->filename = (gchar *) gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selection)); - gst_media_play_start_uri (mplay, mplay->filename); + gst_media_play_start_uri (mplay, (gchar *) gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selection))); } void |