summaryrefslogtreecommitdiff
path: root/plugins/gtkui/gtkui.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-02-12 21:59:40 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-02-12 21:59:40 +0100
commitb7e6b93e538f666e9bc036db11ebd5293a563051 (patch)
tree715a999d0d1feccf78d300feb55839c710ef633b /plugins/gtkui/gtkui.c
parent2135fdf53fcaca8a9fd079960db85ea987d8bfbf (diff)
gtkui: ported volumebar to widget system
Diffstat (limited to 'plugins/gtkui/gtkui.c')
-rw-r--r--plugins/gtkui/gtkui.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index 0aaab36c..061b0184 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -272,17 +272,6 @@ on_trayicon_scroll_event (GtkWidget *widget,
vol = deadbeef->volume_get_min_db ();
}
deadbeef->volume_set_db (vol);
- volumebar_redraw ();
-
- //Update volume bar tooltip
- if (mainwin) {
- GtkWidget *volumebar = lookup_widget (mainwin, "volumebar");
- char s[100];
- int db = vol;
- snprintf (s, sizeof (s), "%s%ddB", db < 0 ? "" : "+", db);
- gtk_widget_set_tooltip_text (volumebar, s);
- gtk_widget_trigger_tooltip_query (volumebar);
- }
#if 0
char str[100];
@@ -490,13 +479,6 @@ gtkui_on_frameupdate (gpointer data) {
}
static gboolean
-gtkui_volumechanged_cb (gpointer ctx) {
- GtkWidget *volumebar = lookup_widget (mainwin, "volumebar");
- gdk_window_invalidate_rect (gtk_widget_get_window (volumebar), NULL, FALSE);
- return FALSE;
-}
-
-static gboolean
gtkui_update_status_icon (gpointer unused) {
int hide_tray_icon = deadbeef->conf_get_int ("gtkui.hide_tray_icon", 0);
if (hide_tray_icon && !trayicon) {
@@ -704,18 +686,6 @@ gtkui_add_new_playlist (void) {
return -1;
}
-void
-volumebar_redraw (void) {
- GtkWidget *volumebar = lookup_widget (mainwin, "volumebar");
- gdk_window_invalidate_rect (gtk_widget_get_window (volumebar), NULL, FALSE);
-}
-
-//void
-//tabstrip_redraw (void) {
-// GtkWidget *ts = lookup_widget (mainwin, "tabstrip");
-// ddb_tabstrip_refresh (DDB_TABSTRIP (ts));
-//}
-
static gint refresh_timeout = 0;
int
@@ -810,9 +780,6 @@ gtkui_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) {
case DB_EV_PLAYLISTCHANGED:
g_idle_add (playlistchanged_cb, NULL);
break;
- case DB_EV_VOLUMECHANGED:
- g_idle_add (gtkui_volumechanged_cb, NULL);
- break;
case DB_EV_CONFIGCHANGED:
g_idle_add (gtkui_on_configchanged, NULL);
break;
@@ -965,6 +932,7 @@ gtkui_thread (void *ctx) {
w_reg_widget (_("Button"), 0, w_button_create, "button", NULL);
w_reg_widget (_("Seekbar"), 0, w_seekbar_create, "seekbar", NULL);
w_reg_widget (_("Playback controls"), 0, w_playtb_create, "playtb", NULL);
+ w_reg_widget (_("Volume bar"), 0, w_volumebar_create, "volumebar", NULL);
mainwin = create_mainwin ();