6 #include <glade/glade.h>
10 #include "callbacks.h"
11 #include "interface.h"
13 extern GstElement *src;
14 extern gboolean picture_shown;
15 extern GstPlayState state;
16 extern guchar statusline[];
17 extern guchar *statustext;
18 extern GtkFileSelection *open_file_selection;
21 on_save1_activate (GtkMenuItem *menuitem,
24 printf("file1 activate\n");
29 on_save_as1_activate (GtkMenuItem *menuitem,
32 printf("file1 activate\n");
37 on_media2_activate (GtkMenuItem *menuitem,
40 printf("file1 activate\n");
44 on_preferences1_activate (GtkMenuItem *menuitem,
47 printf("file1 activate\n");
52 on_open2_activate (GtkMenuItem *menuitem,
56 xml = glade_xml_new(DATADIR "gstplay.glade", "fileselection1");
57 /* connect the signals in the interface */
58 glade_xml_signal_autoconnect(xml);
59 open_file_selection = glade_xml_get_widget(xml, "fileselection1");
63 on_toggle_play_toggled (GtkToggleButton *togglebutton,
67 change_state(GSTPLAY_PLAYING);
72 on_toggle_pause_toggled (GtkToggleButton *togglebutton,
76 change_state(GSTPLAY_PAUSE);
81 on_toggle_stop_toggled (GtkToggleButton *togglebutton,
85 change_state(GSTPLAY_STOPPED);
89 on_hscale1_value_changed (GtkAdjustment *adj,
92 int size = gst_util_get_int_arg(GTK_OBJECT(src),"size");
94 gtk_object_set(GTK_OBJECT(src),"offset",(int)(adj->value*size/100.0),NULL);
96 if (state != GSTPLAY_PLAYING) {
102 on_drawingarea1_configure_event (GtkWidget *widget, GdkEventConfigure *event,
105 gdk_draw_rectangle(widget->window,
106 widget->style->black_gc,
108 widget->allocation.width,
109 widget->allocation.height);
111 gdk_draw_string(widget->window,widget->style->font,widget->style->white_gc, 8, 15, statustext);
112 gdk_draw_string(widget->window,widget->style->font,widget->style->white_gc, widget->allocation.width-100, 15, statusline);
115 void on_about_activate(GtkWidget *widget, gpointer data)
118 xml = glade_xml_new(DATADIR "gstplay.glade", "about");
119 /* connect the signals in the interface */
120 glade_xml_signal_autoconnect(xml);
123 void on_gstplay_destroy(GtkWidget *widget, gpointer data)