Various fixes for the build/install problems update to the docs/manual. Added a simpl...
[platform/upstream/gstreamer.git] / gstplay / callbacks.c
index ad4f302..c1bd000 100644 (file)
@@ -3,80 +3,60 @@
 #endif
 
 #include <gnome.h>
+#include <glade/glade.h>
 #include <gst/gst.h>
 
 #include "gstplay.h"
 #include "callbacks.h"
 #include "interface.h"
-#include "support.h"
 
 extern GstElement *src;
 extern gboolean picture_shown;
 extern GstPlayState state;
 extern guchar statusline[];
 extern guchar *statustext;
+extern GtkFileSelection *open_file_selection;
 
 void
-on_file1_activate                      (GtkMenuItem     *menuitem,
+on_save1_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+  printf("file1 activate\n");
 
 }
 
-
 void
-on_open1_activate                      (GtkMenuItem     *menuitem,
+on_save_as1_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+  printf("file1 activate\n");
 
 }
 
-
 void
-on_close1_activate                     (GtkMenuItem     *menuitem,
+on_media2_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+  printf("file1 activate\n");
 
 }
-
-
 void
-on_media1_activate                     (GtkMenuItem     *menuitem,
+on_preferences1_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+  printf("file1 activate\n");
 
 }
 
-
 void
-on_play2_activate                      (GtkMenuItem     *menuitem,
+on_open2_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-
-}
-
-
-void
-on_pause1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_stop1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_about1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
+  GladeXML *xml;
+  xml = glade_xml_new(DATADIR "gstplay.glade", "fileselection1");
+  /* connect the signals in the interface */
+  glade_xml_signal_autoconnect(xml);
+  open_file_selection = glade_xml_get_widget(xml, "fileselection1");
 }
 
 void
@@ -132,3 +112,16 @@ on_drawingarea1_configure_event        (GtkWidget *widget, GdkEventConfigure *ev
   gdk_draw_string(widget->window,widget->style->font,widget->style->white_gc, widget->allocation.width-100, 15, statusline);
 }
 
+void on_about_activate(GtkWidget *widget, gpointer data)
+{
+  GladeXML *xml;
+  xml = glade_xml_new(DATADIR "gstplay.glade", "about");
+  /* connect the signals in the interface */
+  glade_xml_signal_autoconnect(xml);
+}
+
+void on_gstplay_destroy(GtkWidget *widget, gpointer data)
+{
+  gtk_main_quit();
+}
+