summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/callbacks.c42
-rw-r--r--gtk/src/ghb.ui22
-rw-r--r--gtk/src/internal_defaults.xml2
-rw-r--r--gtk/src/main.c9
-rw-r--r--gtk/src/queuehandler.c5
5 files changed, 70 insertions, 10 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index aa44aef28..a727e5975 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2231,6 +2231,32 @@ ghb_backend_events(signal_user_data_t *ud)
}
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_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)
{
signal_user_data_t *ud = (signal_user_data_t*)data;
@@ -2792,6 +2818,21 @@ pref_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
G_MODULE_EXPORT void
+skip_taskbar_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("pref_changed_cb");
+ ghb_widget_to_setting (ud->settings, widget);
+ ghb_check_dependency(ud, widget);
+ const gchar *name = gtk_widget_get_name(widget);
+ ghb_pref_save(ud->settings, name);
+
+ GtkWindow *window;
+ window = GTK_WINDOW(GHB_WIDGET (ud->builder, "hb_window"));
+ gtk_window_set_skip_taskbar_hint(window,
+ ghb_settings_get_boolean(ud->settings, "skip_taskbar"));
+}
+
+G_MODULE_EXPORT void
vqual_granularity_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
g_debug("vqual_granularity_changed_cb");
@@ -3686,7 +3727,6 @@ ghb_notify_done(signal_user_data_t *ud)
GtkStatusIcon *si;
si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
- gtk_status_icon_set_from_icon_name(si, "hb-status-empty");
#if !defined(_WIN32)
NotifyNotification *notification;
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 5e64ed54b..4f0736015 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -3772,7 +3772,20 @@ location as the movie.</property>
<property name="position">8</property>
</packing>
</child>
-
+ <child>
+ <object class="GtkCheckButton" id="skip_taskbar">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text">Do not put HandBrake in the system TaskBar when minimized.</property>
+ <property name="label" translatable="yes">Minimize to System Tray</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="skip_taskbar_cb"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">9</property>
+ </packing>
+ </child>
<child>
<object class="GtkCheckButton" id="allow_tweaks">
<property name="can_focus">True</property>
@@ -3782,7 +3795,7 @@ location as the movie.</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">9</property>
+ <property name="position">10</property>
</packing>
</child>
<child>
@@ -3794,7 +3807,7 @@ location as the movie.</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">10</property>
+ <property name="position">11</property>
</packing>
</child>
</object>
@@ -5743,7 +5756,8 @@ libx264 authors:
</child>
</object>
<object class="GtkStatusIcon" id="hb_status">
- <property name="icon_name">hb-status</property>
+ <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">
diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml
index 9bb7651a6..c68874dc2 100644
--- a/gtk/src/internal_defaults.xml
+++ b/gtk/src/internal_defaults.xml
@@ -103,6 +103,8 @@
<dict>
<key>EncodeLogLocation</key>
<false />
+ <key>skip_taskbar</key>
+ <false />
<key>allow_tweaks</key>
<false />
<key>title_no_in_destination</key>
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 0b3eb09a5..4a684848c 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -790,6 +790,15 @@ main (int argc, char *argv[])
// Add dvd devices to File menu
g_idle_add((GSourceFunc)ghb_file_menu_add_dvd, ud);
+ GtkStatusIcon *si;
+ si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
+ gtk_status_icon_set_has_tooltip(si, TRUE);
+
+ GtkWindow *window;
+ window = GTK_WINDOW(GHB_WIDGET (ud->builder, "hb_window"));
+ gtk_window_set_skip_taskbar_hint(window,
+ ghb_settings_get_boolean(ud->settings, "skip_taskbar"));
+
// Everything should be go-to-go. Lets rock!
gtk_main ();
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index d4bb5cece..4dc683df3 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -658,11 +658,6 @@ queue_add(signal_user_data_t *ud)
return FALSE;
}
- GtkStatusIcon *si;
-
- si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
- gtk_status_icon_set_from_icon_name(si, "hb-status");
-
if (ud->queue == NULL)
ud->queue = ghb_array_value_new(32);
// Make a copy of current settings to be used for the new job