CFLAGS="$CFLAGS -D_NO_UPDATE_CHECK"
fi
-PKG_CHECK_MODULES(libappindicator3, appindicator3-0.1, have_appind=yes, have_appind=no)
-if test "x$have_appind" = "xyes" ; then
- GHB_PACKAGES="$GHB_PACKAGES appindicator3-0.1"
- CXXFLAGS="$CXXFLAGS -D_USE_APP_IND"
- CFLAGS="$CFLAGS -D_USE_APP_IND"
-fi
-
AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"])
PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES])
#include <dbt.h>
#endif
-#if defined(_USE_APP_IND)
-#include <libappindicator/app-indicator.h>
-#endif
-
#include "hb.h"
#include "callbacks.h"
#include "queuehandler.h"
{
gchar *status_str;
- if (ghb_settings_get_boolean(ud->prefs, "show_status"))
- {
-#if defined(_USE_APP_IND)
- char * ai_status_str= g_strdup_printf(
- "%.2f%%",
- 100.0 * status.queue.progress);
- app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
- g_free(ai_status_str);
-#endif
- }
status_str = searching_status_string(ud, &status.queue);
gtk_label_set_text (work_status, status_str);
gtk_progress_bar_set_fraction (progress, status.queue.progress);
{
gchar *status_str;
- if (ghb_settings_get_boolean(ud->prefs, "show_status"))
- {
-#if defined(_USE_APP_IND)
- char * ai_status_str= g_strdup_printf(
- "%.2f%%",
- 100.0 * status.queue.progress);
- app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
- g_free(ai_status_str);
-#endif
- }
status_str = working_status_string(ud, &status.queue);
gtk_label_set_text (work_status, status_str);
gtk_progress_bar_set_fraction (progress, status.queue.progress);
}
ghb_save_queue(ud->queue);
ud->cancel_encode = GHB_CANCEL_NONE;
-#if defined(_USE_APP_IND)
- app_indicator_set_label( ud->ai, "", "99.99%");
-#endif
}
else if (status.queue.state & GHB_STATE_MUXING)
{
ghb_update_destination_extension(ud);
}
-G_MODULE_EXPORT void
-show_status_cb(GtkWidget *widget, signal_user_data_t *ud)
-{
- g_debug("show_status_cb");
- ghb_widget_to_setting (ud->prefs, widget);
- ghb_check_dependency(ud, widget, NULL);
- const gchar *name = ghb_get_setting_key(widget);
- ghb_pref_set(ud->prefs, name);
-
-#if defined(_USE_APP_IND)
- if (ud->ai)
- {
- if (ghb_settings_get_boolean(ud->prefs, "show_status"))
- {
- app_indicator_set_status(ud->ai, APP_INDICATOR_STATUS_ACTIVE);
- }
- else
- {
- app_indicator_set_status(ud->ai, APP_INDICATOR_STATUS_PASSIVE);
- }
- }
-#endif
-}
-
G_MODULE_EXPORT void
vqual_granularity_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
<property name="position">4</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="show_status">
- <property name="label" translatable="yes">Show system tray icon</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">start</property>
- <property name="draw_indicator">True</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="margin-left">12</property>
- <signal name="toggled" handler="show_status_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
</object>
</child>
<child type="tab">
<false />
<key>EncodeLogLocation</key>
<false />
- <key>show_status</key>
- <true />
<key>allow_tweaks</key>
<false />
<key>last_update_check</key>
#define pipe(phandles) _pipe (phandles, 4096, _O_BINARY)
#endif
-#if defined(_USE_APP_IND)
-#include <libappindicator/app-indicator.h>
-#endif
-
#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
ghb_volname_cache_init();
GHB_THREAD_NEW("Cache Volume Names", (GThreadFunc)ghb_cache_volnames, ud);
-#if defined(_USE_APP_IND)
- GtkMenu *ai_menu = GTK_MENU(GHB_OBJECT(ud->builder, "tray_menu"));
- ud->ai = app_indicator_new("HandBrake", "hb-icon", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
- app_indicator_set_menu( ud->ai, ai_menu );
- app_indicator_set_label( ud->ai, "", "99.99%");
- if (ghb_settings_get_boolean(ud->prefs, "show_status"))
- {
- app_indicator_set_status( ud->ai, APP_INDICATOR_STATUS_ACTIVE );
- }
- else
- {
- app_indicator_set_status( ud->ai, APP_INDICATOR_STATUS_PASSIVE );
- }
-#else
- // 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");
gint window_width, window_height;
#define _SETTINGS_H_
#include <gtk/gtk.h>
-#if defined(_USE_APP_IND)
-#include <libappindicator/app-indicator.h>
-#endif
#define GHB_WIDGET(b,n) GTK_WIDGET(gtk_builder_get_object ((b), (n)))
//#define GHB_WIDGET(b,n) GTK_WIDGET(debug_get_object((b), (n)))
gchar *appcast;
gint appcast_len;
GdkVisibilityState hb_visibility;
-#if defined(_USE_APP_IND)
- AppIndicator *ai;
-#endif
} signal_user_data_t;
enum