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;
|
2000-06-25 21:38:00 +00:00
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
mplay = GST_MEDIA_PLAY (user_data);
|
|
|
|
|
2001-06-13 01:18:12 +00:00
|
|
|
gst_media_play_set_original_size (mplay);
|
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;
|
|
|
|
|
|
|
|
mplay = GST_MEDIA_PLAY (user_data);
|
2000-06-25 21:38:00 +00:00
|
|
|
|
2001-06-13 01:18:12 +00:00
|
|
|
gst_media_play_set_double_size (mplay);
|
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;
|
|
|
|
|
|
|
|
mplay = GST_MEDIA_PLAY (user_data);
|
2001-06-13 01:18:12 +00:00
|
|
|
|
|
|
|
gst_media_play_set_fullscreen (mplay);
|
2001-05-21 01:19:06 +00:00
|
|
|
}
|
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)
|
|
|
|
{
|
2001-06-13 01:18:12 +00:00
|
|
|
GladeXML *xml;
|
|
|
|
struct stat statbuf;
|
|
|
|
|
2001-12-14 18:11:52 +00:00
|
|
|
if (stat (DATADIR"gstmediaplay.glade", &statbuf) == 0)
|
2001-12-13 23:14:39 +00:00
|
|
|
xml = gst_glade_xml_new (DATADIR"gstmediaplay.glade", "preferences");
|
2001-06-13 01:18:12 +00:00
|
|
|
else
|
2001-12-13 23:14:39 +00:00
|
|
|
xml = gst_glade_xml_new ("gstmediaplay.glade", "preferences");
|
2001-12-14 18:11:52 +00:00
|
|
|
|
|
|
|
glade_xml_signal_autoconnect (xml);
|
|
|
|
|
|
|
|
gtk_widget_show (glade_xml_get_widget (xml, "preferences"));
|
2000-06-25 21:38:00 +00:00
|
|
|
}
|
|
|
|
|
2001-12-14 18:11:52 +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) {
|
2001-12-13 23:14:39 +00:00
|
|
|
xml = gst_glade_xml_new (DATADIR"gstmediaplay.glade", "about");
|
2001-05-21 01:19:06 +00:00
|
|
|
}
|
|
|
|
else
|
2001-12-13 23:14:39 +00:00
|
|
|
xml = gst_glade_xml_new ("gstmediaplay.glade", "about");
|
2001-05-21 01:19:06 +00:00
|
|
|
|
|
|
|
glade_xml_signal_autoconnect (xml);
|
2001-12-14 18:11:52 +00:00
|
|
|
|
|
|
|
gtk_widget_show (glade_xml_get_widget (xml, "about"));
|
2000-08-14 10:16:23 +00:00
|
|
|
}
|
|
|
|
|
2001-12-14 18:11:52 +00:00
|
|
|
void
|
|
|
|
on_gstplay_destroy (GtkWidget *widget, gpointer data)
|
2000-08-14 10:16:23 +00:00
|
|
|
{
|
2001-12-14 18:11:52 +00:00
|
|
|
gtk_main_quit();
|
2000-08-14 10:16:23 +00:00
|
|
|
}
|
|
|
|
|