Commit fd5d62de authored by Pablo Sanxiao Roca's avatar Pablo Sanxiao Roca

Now the statusbar is cleared when the last file is closed. (Fixes bug

	* src/statusbar.{ch}:
	* src/window.c:
	Now the statusbar is cleared when the last
	file is closed. (Fixes bug #562129)

svn path=/trunk/; revision=3912
parent f08b8aa3
2009-01-08 Pablo Sanxiao <psanxiao@gmail.com>
* src/statusbar.{ch}:
* src/window.c:
Now the statusbar is cleared when the last
file is closed. (Fixes bug #562129)
2009-01-03 Pablo Sanxiao <psanxiao@gmail.com>
* data/gtranslator.schemas.in:
......
......@@ -347,3 +347,16 @@ gtranslator_statusbar_update_progress_bar (GtranslatorStatusbar *statusbar,
percentage);
}
}
/**
* gtranslator_statusbar_clear_progress_bar:
* @statusbar: a #GtranslatorStatusbar
*
* Clear the progress bar
*/
void
gtranslator_statusbar_clear_progress_bar (GtranslatorStatusbar *statusbar)
{
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (statusbar->priv->progress_bar),
0.0);
}
......@@ -82,6 +82,8 @@ void gtranslator_statusbar_update_progress_bar (GtranslatorStat
gdouble translated_count,
gdouble messages_count);
void gtranslator_statusbar_clear_progress_bar (GtranslatorStatusbar *statusbar);
G_END_DECLS
#endif
......@@ -2002,7 +2002,17 @@ _gtranslator_window_close_tab (GtranslatorWindow *window,
GTK_WIDGET (tab));
if (i != -1)
gtranslator_notebook_remove_page (GTR_NOTEBOOK (window->priv->notebook), i);
/*
* If there is only one file opened, we have to clear the statusbar
*/
if (i == 0)
{
gtranslator_statusbar_push (GTR_STATUSBAR (window->priv->statusbar),
0,
" ");
gtranslator_statusbar_clear_progress_bar (GTR_STATUSBAR (window->priv->statusbar));
}
set_sensitive_according_to_window (window);
}
......
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