Commit 9b31397c authored by Bruno Coudoin's avatar Bruno Coudoin

cleanup, removed the moving bar (up down) code.

svn path=/branches/gcomprixogoo/; revision=3519
parent 3971ee5e
......@@ -32,7 +32,6 @@
#define BAR_GAP 10 /* Value used to fill space above and under icons in the bar */
#define NUMBER_OF_ITEMS 5 /* Max Number of buttons in the bar */
#define HIDE_BAR_TIMOUT 3000 /* The time before we hide the bar in ms */
static void update_exit_button();
static gboolean on_enter_notify (GooCanvasItem *item,
......@@ -49,10 +48,6 @@ static gboolean item_event_bar (GooCanvasItem *item,
gchar *data);
static void bar_reset_sound_id (void);
static void setup_item_signals (GooCanvasItem *item, gchar* name);
//static gboolean _bar_down(void *ignore);
//static void _bar_up(void);
//static void _force_bar_down(void);
//static void _force_bar_up(char *data);
static gint bar_play_sound (gchar *sound);
static void play_level_voice(int level);
......@@ -71,11 +66,7 @@ static GooCanvasItem *about_item = NULL;
static GooCanvasItem *rootitem = NULL;
static gint sound_play_id = 0;
//static gint bar_down_id = 0;
static gboolean _hidden; /* Dialog boxes request a bar hide */
static gboolean _barup; /* The state of the bar */
static gboolean _click_mode; /* Need to click on the bar to
bring it up or just enter it */
/* Default position for the bar */
static int _default_x;
......@@ -267,9 +258,6 @@ void gc_bar_start (GooCanvas *theCanvas)
NULL);
_hidden = FALSE;
_click_mode = TRUE;
_barup = TRUE;
// _force_bar_down();
}
......@@ -441,87 +429,6 @@ gc_bar_set (const GComprisBarFlags flags)
"visibility", GOO_CANVAS_ITEM_INVISIBLE, NULL);
}
#if 0
static gboolean
_bar_down(void *ignore)
{
if(_barup == FALSE)
return TRUE;
_barup = FALSE;
bar_down_id = 0;
goo_canvas_item_animate(rootitem,
0,
BOARDHEIGHT - BARHEIGHT/2,
1,
0,
TRUE,
1000,
80,
GOO_CANVAS_ANIMATE_FREEZE);
return(FALSE);
}
static void
_force_bar_down(void)
{
if(_barup == FALSE)
return;
_barup = FALSE;
if(bar_down_id)
g_source_remove (bar_down_id);
bar_down_id=0;
/* Hide it faster than normal */
goo_canvas_item_animate(rootitem,
0,
BOARDHEIGHT - BARHEIGHT/2,
1,
0,
TRUE,
100,
10,
GOO_CANVAS_ANIMATE_FREEZE);
}
static void _force_bar_up(char *data)
{
bar_reset_sound_id();
sound_play_id = g_timeout_add (1000, (GtkFunction) bar_play_sound, data);
_bar_up();
if(bar_down_id)
g_source_remove (bar_down_id);
bar_down_id=0;
}
static void
_bar_up(void)
{
if(_barup == TRUE)
return;
_barup = TRUE;
goo_canvas_item_raise(rootitem, NULL);
goo_canvas_item_animate(rootitem,
0,
BOARDHEIGHT - BARHEIGHT,
1,
0,
TRUE,
700,
80,
GOO_CANVAS_ANIMATE_FREEZE);
}
#endif
/* Hide all icons in the control bar
* or restore the icons to the previous value
*/
......@@ -537,7 +444,6 @@ gc_bar_hide (gboolean hide)
{
g_object_set(rootitem,
"visibility", GOO_CANVAS_ITEM_INVISIBLE, NULL);
// _force_bar_down();
}
else
{
......@@ -612,13 +518,11 @@ on_enter_notify (GooCanvasItem *item,
GdkEventCrossing *event,
char *data)
{
if(_hidden) // || _click_mode)
if(_hidden)
return FALSE;
sound_play_id = g_timeout_add (1000, (GtkFunction) bar_play_sound, data);
// _force_bar_up(data);
return FALSE;
}
......@@ -630,9 +534,6 @@ on_leave_notify (GooCanvasItem *item,
{
bar_reset_sound_id();
// if(!bar_down_id)
// bar_down_id = g_timeout_add (HIDE_BAR_TIMOUT, (GtkFunction) _bar_down, NULL);
return FALSE;
}
......@@ -672,9 +573,6 @@ item_event_bar (GooCanvasItem *item,
if(_hidden)
return(FALSE);
// if(!_barup)
// _force_bar_up(data);
bar_reset_sound_id();
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
......@@ -751,7 +649,6 @@ item_event_bar (GooCanvasItem *item,
}
else if(!strcmp((char *)data, "bar"))
{
// _force_bar_up(data);
}
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment