2000-06-25 21:38:00 +00:00
|
|
|
/*
|
|
|
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <gnome.h>
|
|
|
|
|
|
|
|
#include "callbacks.h"
|
|
|
|
#include "interface.h"
|
|
|
|
|
2000-08-14 10:16:23 +00:00
|
|
|
extern GtkWidget *play_button;
|
|
|
|
extern GtkWidget *pause_button;
|
|
|
|
extern GtkWidget *stop_button;
|
2000-07-05 10:21:08 +00:00
|
|
|
extern guchar statusline[];
|
|
|
|
extern guchar *statustext;
|
|
|
|
|
|
|
|
void update_buttons(int active)
|
|
|
|
{
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_signal_handler_block_by_func(GTK_OBJECT(play_button),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_toggle_play_toggled),
|
|
|
|
NULL);
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_signal_handler_block_by_func(GTK_OBJECT(pause_button),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_toggle_pause_toggled),
|
|
|
|
NULL);
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_signal_handler_block_by_func(GTK_OBJECT(stop_button),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_toggle_stop_toggled),
|
|
|
|
NULL);
|
|
|
|
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(play_button), FALSE);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pause_button), FALSE);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stop_button), FALSE);
|
2000-07-05 10:21:08 +00:00
|
|
|
|
|
|
|
if (active == 0) {
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(play_button), TRUE);
|
2000-07-05 10:21:08 +00:00
|
|
|
}
|
|
|
|
else if (active == 1) {
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pause_button), TRUE);
|
2000-07-05 10:21:08 +00:00
|
|
|
}
|
|
|
|
else if (active == 2) {
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stop_button), TRUE);
|
2000-07-05 10:21:08 +00:00
|
|
|
}
|
|
|
|
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_signal_handler_unblock_by_func(GTK_OBJECT(play_button),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_toggle_play_toggled),
|
|
|
|
NULL);
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_signal_handler_unblock_by_func(GTK_OBJECT(pause_button),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_toggle_pause_toggled),
|
|
|
|
NULL);
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_signal_handler_unblock_by_func(GTK_OBJECT(stop_button),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_toggle_stop_toggled),
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
|
2000-08-14 10:16:23 +00:00
|
|
|
void update_slider(GtkAdjustment *adjustment, gfloat value)
|
2000-07-05 10:21:08 +00:00
|
|
|
{
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_signal_handler_block_by_func(GTK_OBJECT(adjustment),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_hscale1_value_changed),
|
|
|
|
NULL);
|
2000-08-14 10:16:23 +00:00
|
|
|
gtk_adjustment_set_value(adjustment, value);
|
|
|
|
gtk_signal_handler_unblock_by_func(GTK_OBJECT(adjustment),
|
2000-07-05 10:21:08 +00:00
|
|
|
GTK_SIGNAL_FUNC (on_hscale1_value_changed),
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
|
2000-08-14 10:16:23 +00:00
|
|
|
void update_status_area(GtkWidget *widget)
|
2000-07-05 10:21:08 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
gdk_draw_rectangle(widget->window,
|
|
|
|
widget->style->black_gc,
|
|
|
|
TRUE, 0,
|
|
|
|
0,
|
|
|
|
widget->allocation.width,
|
|
|
|
widget->allocation.height);
|
|
|
|
|
|
|
|
gdk_draw_string(widget->window,widget->style->font,widget->style->white_gc, 8, 15, statustext);
|
|
|
|
gdk_draw_string(widget->window,widget->style->font,widget->style->white_gc, widget->allocation.width-100, 15, statusline);
|
|
|
|
|
|
|
|
}
|