}
}
-G_MODULE_EXPORT gboolean
-status_icon_query_tooltip_cb(
- GtkStatusIcon *si,
- gint x,
- gint y,
- gboolean kbd_mode,
- GtkTooltip *tt,
- signal_user_data_t *ud)
-{
- ghb_status_t status;
- gchar *status_str;
-
- ghb_get_status(&status);
- if (status.queue.state & GHB_STATE_WORKING)
- status_str = working_status_string(ud, &status.queue);
- else if (status.queue.state & GHB_STATE_SEARCHING)
- status_str = searching_status_string(ud, &status.queue);
- else if (status.queue.state & GHB_STATE_WORKDONE)
- status_str = g_strdup(_("Encode Complete"));
- else
- status_str = g_strdup("HandBrake");
-
- gtk_tooltip_set_text(tt, status_str);
- gtk_tooltip_set_icon_from_icon_name(tt, "hb-icon", GTK_ICON_SIZE_BUTTON);
- g_free(status_str);
- return TRUE;
-}
-
G_MODULE_EXPORT gboolean
ghb_timer_cb(gpointer data)
{
app_indicator_set_status(ud->ai, APP_INDICATOR_STATUS_PASSIVE);
}
}
-#else
- GtkStatusIcon *si;
-
- si = GTK_STATUS_ICON(GHB_OBJECT (ud->builder, "hb_status"));
- gtk_status_icon_set_visible(si,
- ghb_settings_get_boolean(ud->prefs, "show_status"));
#endif
}
return FALSE;
}
-G_MODULE_EXPORT void
-status_activate_cb(GtkStatusIcon *si, signal_user_data_t *ud)
-{
- GtkWindow *window;
- GdkWindowState state;
-
- window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
- state = gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(window)));
- if ((state & GDK_WINDOW_STATE_ICONIFIED) ||
- (ud->hb_visibility != GDK_VISIBILITY_UNOBSCURED))
- {
- gtk_window_present(window);
- gtk_window_set_skip_taskbar_hint(window, FALSE);
- }
- else
- {
- gtk_window_set_skip_taskbar_hint(window, TRUE);
- gtk_window_iconify(window);
- }
-}
-
G_MODULE_EXPORT void
show_hide_toggle_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
);
#else
,NULL);
-
- GtkStatusIcon *si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
- notify_notification_attach_to_status_icon(notification, si);
#endif
GtkIconTheme *theme = gtk_icon_theme_get_default();
GdkPixbuf *pb = gtk_icon_theme_load_icon(theme, "hb-icon", 32,
</child>
</object>
- <object class="GtkStatusIcon" id="hb_status">
- <property name="icon_name">hb-icon</property>
- <property name="visible">False</property>
- <signal name="activate" handler="status_activate_cb" swapped="no"/>
- </object>
<object class="GtkWindow" id="hb_window">
<property name="can_focus">False</property>
<property name="events">GDK_VISIBILITY_NOTIFY_MASK</property>
{
app_indicator_set_status( ud->ai, APP_INDICATOR_STATUS_PASSIVE );
}
- GtkStatusIcon *si;
- si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
-
- gtk_status_icon_set_visible(si, FALSE );
#else
- GtkStatusIcon *si;
- si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
-
- gtk_status_icon_set_visible(si,
- ghb_settings_get_boolean(ud->prefs, "show_status"));
-
- gtk_status_icon_set_has_tooltip(si, TRUE);
- g_signal_connect(si, "query-tooltip",
- status_icon_query_tooltip_cb, ud);
+ // gtk-3 has eliminated status icons. Remove the option from preferences
+ GtkWidget *status_icon_pref = GHB_WIDGET(ud->builder, "show_status");
+ gtk_widget_set_visible(status_icon_pref, FALSE);
#endif
GtkWidget *ghb_window = GHB_WIDGET(ud->builder, "hb_window");
// Everything should be go-to-go. Lets rock!
gtk_main();
- gtk_status_icon_set_visible(si, FALSE);
ghb_backend_close();
ghb_value_free(ud->queue);