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
case $host in
*-*-mingw*)
if test "x$w32_gst" = "xyes" ; then
- GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage webkit-1.0"
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage webkit-1.0"
else
- GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gio-2.0"
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0"
fi
mingw_flag=yes
;;
*)
- GHB_PACKAGES="gtk+-2.0 >= 2.8 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage webkit-1.0 libnotify"
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 hal hal-storage webkit-1.0 libnotify"
mingw_flag=no
;;
esac
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)
{
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)
}
}
+#if GTK_CHECK_VERSION(2, 16, 0)
G_MODULE_EXPORT gboolean
status_icon_query_tooltip_cb(
GtkStatusIcon *si,
g_free(status_str);
return TRUE;
}
+#endif
G_MODULE_EXPORT gboolean
ghb_timer_cb(gpointer data)
</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">
"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[])
{
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"));