summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-06-21 18:30:21 +0000
committerjstebbins <[email protected]>2012-06-21 18:30:21 +0000
commitf6235b6d9d8f854ff4df6494f4f996c7876d1316 (patch)
treeed312a84226424cac10a114493a0de5971a7b637 /gtk
parent31abfae6433980b30df5a7f11530e4a2bb2eac9c (diff)
LinGui: disable status icon progress when status icon is disabled
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4763 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index dfed0dda7..8e710e53a 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2845,19 +2845,22 @@ ghb_backend_events(signal_user_data_t *ud)
status_str = searching_status_string(ud, &status.queue);
label = GTK_LABEL(GHB_WIDGET(ud->builder, "queue_status"));
gtk_label_set_text (label, status_str);
+ if (ghb_settings_get_boolean(ud->settings, "show_status"))
+ {
#if !GTK_CHECK_VERSION(2, 16, 0)
- GtkStatusIcon *si;
+ GtkStatusIcon *si;
- si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
- gtk_status_icon_set_tooltip(si, status_str);
+ si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
+ gtk_status_icon_set_tooltip(si, status_str);
#endif
#if defined(_USE_APP_IND)
- char * ai_status_str= g_strdup_printf(
- "%.2f%%",
- 100.0 * status.queue.progress);
- app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
- g_free(ai_status_str);
+ char * ai_status_str= g_strdup_printf(
+ "%.2f%%",
+ 100.0 * status.queue.progress);
+ app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
+ g_free(ai_status_str);
#endif
+ }
gtk_label_set_text (work_status, status_str);
gtk_progress_bar_set_fraction (progress, status.queue.progress);
g_free(status_str);
@@ -2890,20 +2893,23 @@ ghb_backend_events(signal_user_data_t *ud)
status_str = working_status_string(ud, &status.queue);
label = GTK_LABEL(GHB_WIDGET(ud->builder, "queue_status"));
gtk_label_set_text (label, status_str);
+ if (ghb_settings_get_boolean(ud->settings, "show_status"))
+ {
#if defined(_USE_APP_IND)
- char * ai_status_str= g_strdup_printf(
- "%.2f%%",
- 100.0 * status.queue.progress);
- app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
- g_free(ai_status_str);
+ char * ai_status_str= g_strdup_printf(
+ "%.2f%%",
+ 100.0 * status.queue.progress);
+ app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
+ g_free(ai_status_str);
#else
#if !GTK_CHECK_VERSION(2, 16, 0)
- GtkStatusIcon *si;
+ GtkStatusIcon *si;
- si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
- gtk_status_icon_set_tooltip(si, status_str);
+ si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
+ gtk_status_icon_set_tooltip(si, status_str);
#endif
#endif
+ }
gtk_label_set_text (work_status, status_str);
gtk_progress_bar_set_fraction (progress, status.queue.progress);
g_free(status_str);