summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/callbacks.c14
-rw-r--r--gtk/src/ghb.ui1
-rw-r--r--gtk/src/main.c11
3 files changed, 25 insertions, 1 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index da6039ce6..b768fabb0 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2230,6 +2230,12 @@ ghb_backend_events(signal_user_data_t *ud)
ghb_settings_set_int(js, "job_status", qstatus);
ghb_save_queue(ud->queue);
ud->cancel_encode = FALSE;
+#if !GTK_CHECK_VERSION(2, 16, 0)
+ GtkStatusIcon *si;
+
+ si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
+ gtk_status_icon_set_tooltip(si, "HandBrake");
+#endif
}
else if (status.queue.state & GHB_STATE_MUXING)
{
@@ -2276,6 +2282,12 @@ 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 !GTK_CHECK_VERSION(2, 16, 0)
+ GtkStatusIcon *si;
+
+ si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
+ gtk_status_icon_set_tooltip(si, status_str);
+#endif
g_free(status_str);
}
if (status.scan.state & GHB_STATE_WORKING)
@@ -2305,6 +2317,7 @@ ghb_backend_events(signal_user_data_t *ud)
}
}
+#if GTK_CHECK_VERSION(2, 16, 0)
G_MODULE_EXPORT gboolean
status_icon_query_tooltip_cb(
GtkStatusIcon *si,
@@ -2330,6 +2343,7 @@ status_icon_query_tooltip_cb(
g_free(status_str);
return TRUE;
}
+#endif
G_MODULE_EXPORT gboolean
ghb_timer_cb(gpointer data)
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 4f0736015..428e388f2 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -5757,7 +5757,6 @@ libx264 authors:
</object>
<object class="GtkStatusIcon" id="hb_status">
<property name="icon_name">hb-icon</property>
- <signal handler="status_icon_query_tooltip_cb" name="query-tooltip"/>
<signal handler="status_activate_cb" name="activate"/>
</object>
<object class="GtkDialog" id="update_dialog">
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 2294666e3..edd5fecf1 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -630,6 +630,10 @@ const gchar *hud_rcstyle =
"widget \"preview_window.*.preview_hud.*\" style \"ghb-hud\"\n"
"widget \"preview_window\" style \"ghb-preview\"\n";
+#if GTK_CHECK_VERSION(2, 16, 0)
+extern G_MODULE_EXPORT void status_icon_query_tooltip_cb(void);
+#endif
+
int
main (int argc, char *argv[])
{
@@ -793,7 +797,14 @@ main (int argc, char *argv[])
GtkStatusIcon *si;
si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
+
+#if GTK_CHECK_VERSION(2, 16, 0)
gtk_status_icon_set_has_tooltip(si, TRUE);
+ g_signal_connect(si, "query-tooltip",
+ status_icon_query_tooltip_cb, ud);
+#else
+ gtk_status_icon_set_tooltip(si, "HandBrake");
+#endif
GtkWindow *window;
window = GTK_WINDOW(GHB_WIDGET (ud->builder, "hb_window"));