2000-06-25 21:38:00 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2001-05-21 01:19:06 +00:00
|
|
|
#include <config.h>
|
2000-06-25 21:38:00 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gnome.h>
|
2000-08-14 10:16:23 +00:00
|
|
|
#include <glade/glade.h>
|
2000-06-25 21:38:00 +00:00
|
|
|
#include <gst/gst.h>
|
2001-04-01 14:09:39 +00:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
2001-05-21 01:19:06 +00:00
|
|
|
#include "gstmediaplay.h"
|
2000-07-05 10:21:08 +00:00
|
|
|
#include "gstplay.h"
|
2000-06-25 21:38:00 +00:00
|
|
|
#include "callbacks.h"
|
|
|
|
|
2000-10-30 21:02:08 +00:00
|
|
|
GtkFileSelection *open_file_selection;
|
2000-06-25 21:38:00 +00:00
|
|
|
|
|
|
|
void
|
2001-05-21 01:19:06 +00:00
|
|
|
on_save1_activate (GtkMenuItem *menuitem, gpointer user_data)
|
2000-06-25 21:38:00 +00:00
|
|
|
{
|
2001-05-21 01:19:06 +00:00
|
|
|
printf ("file1 activate\n");
|
|
|
|
}
|
2000-06-25 21:38:00 +00:00
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
void
|
|
|
|
on_save_as1_activate (GtkMenuItem *menuitem, gpointer user_data)
|
|
|
|
{
|
|
|
|
printf ("file1 activate\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
on_media2_activate (GtkMenuItem *menuitem, gpointer user_data)
|
|
|
|
{
|
|
|
|
printf ("file1 activate\n");
|
2000-06-25 21:38:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-05-21 01:19:06 +00:00
|
|
|
on_original_size_activate (GtkMenuItem *menuitem, gpointer user_data)
|
2000-06-25 21:38:00 +00:00
|
|
|
{
|
2001-05-21 01:19:06 +00:00
|
|
|
GstMediaPlay *mplay;
|
|
|
|
GstPlay *play;
|
2000-06-25 21:38:00 +00:00
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
mplay = GST_MEDIA_PLAY (user_data);
|
|
|
|
play = mplay->play;
|
|
|
|
|
|
|
|
gst_play_set_display_size (play, 0);
|
2000-06-25 21:38:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-05-21 01:19:06 +00:00
|
|
|
on_double_size_activate (GtkMenuItem *menuitem, gpointer user_data)
|
2000-06-25 21:38:00 +00:00
|
|
|
{
|
2001-05-21 01:19:06 +00:00
|
|
|
GstMediaPlay *mplay;
|
|
|
|
GstPlay *play;
|
|
|
|
|
|
|
|
mplay = GST_MEDIA_PLAY (user_data);
|
|
|
|
play = mplay->play;
|
2000-06-25 21:38:00 +00:00
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
gst_play_set_display_size (play, 1);
|
2000-06-25 21:38:00 +00:00
|
|
|
}
|
2001-05-21 01:19:06 +00:00
|
|
|
|
2000-06-25 21:38:00 +00:00
|
|
|
void
|
2001-05-21 01:19:06 +00:00
|
|
|
on_full_screen_activate (GtkMenuItem *menuitem, gpointer user_data)
|
2000-06-25 21:38:00 +00:00
|
|
|
{
|
2001-05-21 01:19:06 +00:00
|
|
|
GstMediaPlay *mplay;
|
|
|
|
GstPlay *play;
|
|
|
|
|
|
|
|
mplay = GST_MEDIA_PLAY (user_data);
|
|
|
|
play = mplay->play;
|
|
|
|
|
|
|
|
gst_play_set_display_size (play, 2);
|
|
|
|
}
|
2000-06-25 21:38:00 +00:00
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
void
|
|
|
|
on_preferences1_activate (GtkMenuItem *menuitem, gpointer user_data)
|
|
|
|
{
|
|
|
|
printf ("file1 activate\n");
|
2000-06-25 21:38:00 +00:00
|
|
|
}
|
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
void on_about_activate (GtkWidget *widget, gpointer data)
|
2000-08-14 10:16:23 +00:00
|
|
|
{
|
2001-05-21 01:19:06 +00:00
|
|
|
GladeXML *xml;
|
|
|
|
struct stat statbuf;
|
|
|
|
|
|
|
|
if (stat (DATADIR"gstmediaplay.glade", &statbuf) == 0) {
|
|
|
|
xml = glade_xml_new (DATADIR"gstmediaplay.glade", "about");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
xml = glade_xml_new ("gstmediaplay.glade", "about");
|
|
|
|
|
|
|
|
/* connect the signals in the interface */
|
|
|
|
glade_xml_signal_autoconnect (xml);
|
2000-08-14 10:16:23 +00:00
|
|
|
}
|
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
void on_gstplay_destroy (GtkWidget *widget, gpointer data)
|
2000-08-14 10:16:23 +00:00
|
|
|
{
|
2001-05-21 01:19:06 +00:00
|
|
|
gst_main_quit();
|
2000-08-14 10:16:23 +00:00
|
|
|
}
|
|
|
|
|