summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-06-20 18:08:06 +0000
committerjstebbins <[email protected]>2009-06-20 18:08:06 +0000
commit0865bab7662ff6e7e831705c5b0f2aa6916f855b (patch)
tree7f6d9422e04dffc7ed5cd8b1ca7e6e016b679ad0 /gtk/src/main.c
parent2c92194ddde3710dba84abea10aa123b835a8d4f (diff)
LinGui: make status icon code backwards compatible to gtk 2.10
There's a new status icon api in 2.16 that is not backwards compatible. The depricated interface is broken in 2.16, so ifdef the code to use older api only when older gtk versions are used. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2589 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c11
1 files changed, 11 insertions, 0 deletions
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"));