summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.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/callbacks.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/callbacks.c')
-rw-r--r--gtk/src/callbacks.c14
1 files changed, 14 insertions, 0 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)