summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/actions.c2
-rw-r--r--plugins/gtkui/actions.h2
-rw-r--r--plugins/gtkui/callbacks.c29
-rw-r--r--plugins/gtkui/callbacks.h10
-rw-r--r--plugins/gtkui/coverart.c2
-rw-r--r--plugins/gtkui/coverart.h2
-rw-r--r--plugins/gtkui/ddbequalizer.c2
-rw-r--r--plugins/gtkui/ddblistview.c12
-rw-r--r--plugins/gtkui/ddblistview.h2
-rw-r--r--plugins/gtkui/ddbseekbar.c2
-rw-r--r--plugins/gtkui/ddbtabstrip.c138
-rw-r--r--plugins/gtkui/ddbtabstrip.h2
-rw-r--r--plugins/gtkui/ddbvolumebar.c3
-rw-r--r--plugins/gtkui/ddbvolumebar.h2
-rw-r--r--plugins/gtkui/deadbeef.glade29
-rw-r--r--plugins/gtkui/drawing.h2
-rw-r--r--plugins/gtkui/dspconfig.c2
-rw-r--r--plugins/gtkui/dspconfig.h2
-rw-r--r--plugins/gtkui/eq.c11
-rw-r--r--plugins/gtkui/eq.h2
-rw-r--r--plugins/gtkui/fileman.c3
-rw-r--r--plugins/gtkui/gdkdrawing.c2
-rw-r--r--plugins/gtkui/gtkui.c22
-rw-r--r--plugins/gtkui/gtkui.h28
-rw-r--r--plugins/gtkui/gtkui_api.h2
-rw-r--r--plugins/gtkui/interface.c18
-rw-r--r--plugins/gtkui/mainplaylist.c2
-rw-r--r--plugins/gtkui/mainplaylist.h2
-rw-r--r--plugins/gtkui/parser.c2
-rw-r--r--plugins/gtkui/parser.h2
-rw-r--r--plugins/gtkui/plcommon.c4
-rw-r--r--plugins/gtkui/plcommon.h2
-rw-r--r--plugins/gtkui/pluginconf.c2
-rw-r--r--plugins/gtkui/pluginconf.h2
-rw-r--r--plugins/gtkui/prefwin.c13
-rw-r--r--plugins/gtkui/progress.c2
-rw-r--r--plugins/gtkui/progress.h2
-rw-r--r--plugins/gtkui/search.c2
-rw-r--r--plugins/gtkui/search.h2
-rw-r--r--plugins/gtkui/support.c23
-rw-r--r--plugins/gtkui/support.h44
-rw-r--r--plugins/gtkui/tagwritersettings.c2
-rw-r--r--plugins/gtkui/tagwritersettings.h2
-rw-r--r--plugins/gtkui/timeline.c2
-rw-r--r--plugins/gtkui/timeline.h2
-rw-r--r--plugins/gtkui/trkproperties.c5
-rw-r--r--plugins/gtkui/trkproperties.h2
-rw-r--r--plugins/gtkui/wingeom.c3
-rw-r--r--plugins/gtkui/wingeom.h2
49 files changed, 377 insertions, 82 deletions
diff --git a/plugins/gtkui/actions.c b/plugins/gtkui/actions.c
index 0ddbdceb..3b7bc5c8 100644
--- a/plugins/gtkui/actions.c
+++ b/plugins/gtkui/actions.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>,
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>,
Viktor Semykin <thesame.ml@gmail.com>
This program is free software; you can redistribute it and/or
diff --git a/plugins/gtkui/actions.h b/plugins/gtkui/actions.h
index aacff34b..56dc3425 100644
--- a/plugins/gtkui/actions.h
+++ b/plugins/gtkui/actions.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>,
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>,
Viktor Semykin <thesame.ml@gmail.com>
This program is free software; you can redistribute it and/or
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 8d86f1ec..fae22fe1 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1153,7 +1153,7 @@ on_sort_by_title_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
ddb_playlist_t *plt = deadbeef->plt_get_curr ();
- deadbeef->plt_sort (plt, PL_MAIN, -1, "%t", 1);
+ deadbeef->plt_sort (plt, PL_MAIN, -1, "%t", DDB_SORT_ASCENDING);
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
@@ -1165,7 +1165,7 @@ on_sort_by_track_nr_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
ddb_playlist_t *plt = deadbeef->plt_get_curr ();
- deadbeef->plt_sort (plt, PL_MAIN, -1, "%n", 1);
+ deadbeef->plt_sort (plt, PL_MAIN, -1, "%n", DDB_SORT_ASCENDING);
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
@@ -1177,7 +1177,7 @@ on_sort_by_album_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
ddb_playlist_t *plt = deadbeef->plt_get_curr ();
- deadbeef->plt_sort (plt, PL_MAIN, -1, "%b", 1);
+ deadbeef->plt_sort (plt, PL_MAIN, -1, "%b", DDB_SORT_ASCENDING);
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
@@ -1189,7 +1189,7 @@ on_sort_by_artist_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
ddb_playlist_t *plt = deadbeef->plt_get_curr ();
- deadbeef->plt_sort (plt, PL_MAIN, -1, "%a", 1);
+ deadbeef->plt_sort (plt, PL_MAIN, -1, "%a", DDB_SORT_ASCENDING);
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
@@ -1201,7 +1201,22 @@ on_sort_by_date_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
ddb_playlist_t *plt = deadbeef->plt_get_curr ();
- deadbeef->plt_sort (plt, PL_MAIN, -1, "%y", 1);
+ deadbeef->plt_sort (plt, PL_MAIN, -1, "%y", DDB_SORT_ASCENDING);
+ deadbeef->plt_unref (plt);
+
+ DdbListview *pl = DDB_LISTVIEW (lookup_widget (mainwin, "playlist"));
+ ddb_listview_clear_sort (pl);
+ ddb_listview_refresh (pl, DDB_REFRESH_LIST | DDB_LIST_CHANGED);
+}
+
+
+void
+on_sort_by_random_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ ddb_playlist_t *plt = deadbeef->plt_get_curr ();
+ deadbeef->plt_sort (plt, PL_MAIN, -1, NULL, DDB_SORT_RANDOM);
+
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
@@ -1235,7 +1250,7 @@ on_sort_by_custom_activate (GtkMenuItem *menuitem,
deadbeef->conf_set_str ("gtkui.sortby_fmt", fmt);
ddb_playlist_t *plt = deadbeef->plt_get_curr ();
- deadbeef->plt_sort (plt, PL_MAIN, -1, fmt, order == 0 ? 1 : 0);
+ deadbeef->plt_sort (plt, PL_MAIN, -1, fmt, order == 0 ? DDB_SORT_ASCENDING : DDB_SORT_DESCENDING);
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
diff --git a/plugins/gtkui/callbacks.h b/plugins/gtkui/callbacks.h
index 9af9a4bf..1e4e66e3 100644
--- a/plugins/gtkui/callbacks.h
+++ b/plugins/gtkui/callbacks.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1149,6 +1149,10 @@ on_sort_by_date_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
+on_sort_by_random_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
on_sort_by_custom_activate (GtkMenuItem *menuitem,
gpointer user_data);
@@ -1159,3 +1163,7 @@ on_convert8to16_toggled (GtkToggleButton *togglebutton,
void
on_design_mode1_activate (GtkMenuItem *menuitem,
gpointer user_data);
+
+void
+on_reset_autostop_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data);
diff --git a/plugins/gtkui/coverart.c b/plugins/gtkui/coverart.c
index e1dec261..a2f1119a 100644
--- a/plugins/gtkui/coverart.c
+++ b/plugins/gtkui/coverart.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/coverart.h b/plugins/gtkui/coverart.h
index aafec0d6..a4914b6f 100644
--- a/plugins/gtkui/coverart.h
+++ b/plugins/gtkui/coverart.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/ddbequalizer.c b/plugins/gtkui/ddbequalizer.c
index 8f69f073..02946aea 100644
--- a/plugins/gtkui/ddbequalizer.c
+++ b/plugins/gtkui/ddbequalizer.c
@@ -30,7 +30,7 @@
#include <cairo.h>
#include <pango/pangocairo.h>
#include <pango/pango.h>
-
+#include "support.h"
#define DDB_TYPE_EQUALIZER (ddb_equalizer_get_type ())
#define DDB_EQUALIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DDB_TYPE_EQUALIZER, DdbEqualizer))
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c
index ba2b0080..2aef74df 100644
--- a/plugins/gtkui/ddblistview.c
+++ b/plugins/gtkui/ddblistview.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1383,7 +1383,7 @@ ddb_listview_select_single (DdbListview *ps, int sel) {
}
void
-ddb_listview_click_selection (DdbListview *ps, int ex, int ey, DdbListviewGroup *grp, int grp_index, int sel, int dnd) {
+ddb_listview_click_selection (DdbListview *ps, int ex, int ey, DdbListviewGroup *grp, int grp_index, int sel, int dnd, int button) {
deadbeef->pl_lock ();
ps->areaselect = 0;
ddb_listview_groupcheck (ps);
@@ -1434,7 +1434,9 @@ ddb_listview_click_selection (DdbListview *ps, int ex, int ey, DdbListviewGroup
else {
// clicked specific item - select, or start drag-n-drop
DdbListviewIter it = ps->binding->get_for_idx (sel);
- if (!it || !ps->binding->is_selected (it) || !ps->binding->drag_n_drop) {
+ if (!it || !ps->binding->is_selected (it)
+ || (!ps->binding->drag_n_drop && button == 1)) // HACK: don't reset selection by right click in search window
+ {
// reset selection, and set it to single item
ddb_listview_select_single (ps, sel);
if (dnd) {
@@ -1524,7 +1526,7 @@ ddb_listview_list_mouse1_pressed (DdbListview *ps, int state, int ex, int ey, Gd
// handle multiple selection
if (!(state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)))
{
- ddb_listview_click_selection (ps, ex, ey, grp, grp_index, sel, 1);
+ ddb_listview_click_selection (ps, ex, ey, grp, grp_index, sel, 1, 1);
}
else if (state & GDK_CONTROL_MASK) {
// toggle selection
@@ -2698,7 +2700,7 @@ ddb_listview_list_button_press_event (GtkWidget *widget,
if (sel != -1) {
ps->binding->set_cursor (sel);
}
- ddb_listview_click_selection (ps, event->x, event->y, grp, grp_index, sel, 0);
+ ddb_listview_click_selection (ps, event->x, event->y, grp, grp_index, sel, 0, event->button);
if (sel == -1 && grp_index < grp->num_items) {
sel = ps->binding->get_idx (grp->head);
}
diff --git a/plugins/gtkui/ddblistview.h b/plugins/gtkui/ddblistview.h
index a43dbcc3..d03cd240 100644
--- a/plugins/gtkui/ddblistview.h
+++ b/plugins/gtkui/ddblistview.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/gtkui/ddbseekbar.c b/plugins/gtkui/ddbseekbar.c
index f1b3a836..544083b9 100644
--- a/plugins/gtkui/ddbseekbar.c
+++ b/plugins/gtkui/ddbseekbar.c
@@ -23,7 +23,7 @@
#include <gdk/gdk.h>
#include <drawing.h>
#include <gtkui.h>
-
+#include "support.h"
#define DDB_TYPE_SEEKBAR (ddb_seekbar_get_type ())
#define DDB_SEEKBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DDB_TYPE_SEEKBAR, DdbSeekbar))
diff --git a/plugins/gtkui/ddbtabstrip.c b/plugins/gtkui/ddbtabstrip.c
index 8b260cf8..18151ff4 100644
--- a/plugins/gtkui/ddbtabstrip.c
+++ b/plugins/gtkui/ddbtabstrip.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -20,6 +20,7 @@
#include <string.h>
#include <assert.h>
#include <glib.h>
+#include <stdlib.h>
#include "ddbtabstrip.h"
#include "drawing.h"
#include "gtkui.h"
@@ -795,6 +796,139 @@ on_add_new_playlist1_activate (GtkMenuItem *menuitem,
}
}
+static void
+on_actionitem_activate (GtkMenuItem *menuitem,
+ DB_plugin_action_t *action)
+{
+ ddb_playlist_t *plt = NULL;
+ if (tab_clicked != -1) {
+ plt = deadbeef->plt_get_for_idx (tab_clicked);
+ }
+ action->callback (action, plt);
+ deadbeef->plt_unref (plt);
+}
+
+static GtkWidget*
+find_popup (GtkWidget *widget,
+ const gchar *widget_name)
+{
+ GtkWidget *parent, *found_widget;
+
+ for (;;)
+ {
+ if (GTK_IS_MENU (widget))
+ parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+ else
+ parent = gtk_widget_get_parent (widget);
+ if (!parent)
+ parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+ if (parent == NULL)
+ break;
+ widget = parent;
+ }
+
+ found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
+ widget_name);
+ return found_widget;
+}
+
+void
+add_tab_actions (GtkWidget *menu) {
+ DB_plugin_t **plugins = deadbeef->plug_get_list();
+ int i;
+
+ int added_entries = 0;
+ for (i = 0; plugins[i]; i++)
+ {
+ if (!plugins[i]->get_actions)
+ continue;
+
+ DB_plugin_action_t *actions = plugins[i]->get_actions (NULL);
+ DB_plugin_action_t *action;
+
+ int count = 0;
+ for (action = actions; action; action = action->next)
+ {
+ char *tmp = NULL;
+ if (!(action->flags & DB_ACTION_PLAYLIST))
+ continue;
+
+ // create submenus (separated with '/')
+ const char *prev = action->title;
+ while (*prev && *prev == '/') {
+ prev++;
+ }
+
+ GtkWidget *popup = NULL;
+
+ for (;;) {
+ const char *slash = strchr (prev, '/');
+ if (slash && *(slash-1) != '\\') {
+ char name[slash-prev+1];
+ // replace \/ with /
+ const char *p = prev;
+ char *t = name;
+ while (*p && p < slash) {
+ if (*p == '\\' && *(p+1) == '/') {
+ *t++ = '/';
+ p += 2;
+ }
+ else {
+ *t++ = *p++;
+ }
+ }
+ *t = 0;
+
+ // add popup
+ GtkWidget *prev_menu = popup ? popup : menu;
+
+ popup = find_popup (prev_menu, name);
+ if (!popup) {
+ GtkWidget *item = gtk_image_menu_item_new_with_mnemonic (_(name));
+ gtk_widget_show (item);
+ gtk_container_add (GTK_CONTAINER (prev_menu), item);
+ popup = gtk_menu_new ();
+ //HOOKUP_OBJECT (prev_menu, popup, name);
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), popup);
+ }
+ }
+ else {
+ break;
+ }
+ prev = slash+1;
+ }
+
+
+ count++;
+ added_entries++;
+ GtkWidget *actionitem;
+
+ // replace \/ with /
+ const char *p = popup ? prev : action->title;
+ char title[strlen (p)+1];
+ char *t = title;
+ while (*p) {
+ if (*p == '\\' && *(p+1) == '/') {
+ *t++ = '/';
+ p += 2;
+ }
+ else {
+ *t++ = *p++;
+ }
+ }
+ *t = 0;
+
+ actionitem = gtk_menu_item_new_with_mnemonic (_(title));
+ gtk_widget_show (actionitem);
+ gtk_container_add (popup ? GTK_CONTAINER (popup) : GTK_CONTAINER (menu), actionitem);
+
+ g_signal_connect ((gpointer) actionitem, "activate",
+ G_CALLBACK (on_actionitem_activate),
+ action);
+ }
+ }
+}
+
GtkWidget*
create_plmenu (void)
{
@@ -843,6 +977,8 @@ create_plmenu (void)
GLADE_HOOKUP_OBJECT (plmenu, remove_playlist1, "remove_playlist1");
GLADE_HOOKUP_OBJECT (plmenu, add_new_playlist1, "add_new_playlist1");
+ add_tab_actions (plmenu);
+
return plmenu;
}
diff --git a/plugins/gtkui/ddbtabstrip.h b/plugins/gtkui/ddbtabstrip.h
index c68b95f1..a34eb5eb 100644
--- a/plugins/gtkui/ddbtabstrip.h
+++ b/plugins/gtkui/ddbtabstrip.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/ddbvolumebar.c b/plugins/gtkui/ddbvolumebar.c
index 732210f3..7c74cbec 100644
--- a/plugins/gtkui/ddbvolumebar.c
+++ b/plugins/gtkui/ddbvolumebar.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -185,6 +185,7 @@ volumebar_draw (GtkWidget *widget, cairo_t *cr) {
gboolean
on_volumebar_draw (GtkWidget *widget, cairo_t *cr) {
volumebar_draw (widget, cr);
+ return FALSE;
}
#if !GTK_CHECK_VERSION(3,0,0)
diff --git a/plugins/gtkui/ddbvolumebar.h b/plugins/gtkui/ddbvolumebar.h
index d2cfbe61..7db07479 100644
--- a/plugins/gtkui/ddbvolumebar.h
+++ b/plugins/gtkui/ddbvolumebar.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index b0659ff5..820c30a1 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -365,6 +365,15 @@
</child>
<child>
+ <widget class="GtkMenuItem" id="random1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Random</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_sort_by_random_activate" last_modification_time="Sun, 26 Feb 2012 19:22:44 GMT"/>
+ </widget>
+ </child>
+
+ <child>
<widget class="GtkMenuItem" id="custom2">
<property name="visible">True</property>
<property name="label" translatable="yes">Custom</property>
@@ -2974,6 +2983,26 @@ Album</property>
<property name="fill">False</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkCheckButton" id="reset_autostop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Auto-reset &quot;Stop after current&quot;</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_reset_autostop_toggled" last_modification_time="Mon, 02 Apr 2012 17:59:08 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="tab_expand">False</property>
diff --git a/plugins/gtkui/drawing.h b/plugins/gtkui/drawing.h
index 3556ec62..6d573346 100644
--- a/plugins/gtkui/drawing.h
+++ b/plugins/gtkui/drawing.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/dspconfig.c b/plugins/gtkui/dspconfig.c
index 9cc012f0..95767284 100644
--- a/plugins/gtkui/dspconfig.c
+++ b/plugins/gtkui/dspconfig.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/dspconfig.h b/plugins/gtkui/dspconfig.h
index 6b7f5310..4d945f2c 100644
--- a/plugins/gtkui/dspconfig.h
+++ b/plugins/gtkui/dspconfig.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/eq.c b/plugins/gtkui/eq.c
index c534dfb6..101c3c35 100644
--- a/plugins/gtkui/eq.c
+++ b/plugins/gtkui/eq.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -68,6 +68,7 @@ eq_value_changed (DdbEqualizer *widget)
set_param (eq, i+1, ddb_equalizer_get_band (widget, i));
}
set_param (eq, 0, ddb_equalizer_get_preamp (widget));
+ deadbeef->streamer_dsp_chain_save ();
}
}
@@ -79,6 +80,7 @@ on_enable_toggled (GtkToggleButton *togglebutton,
int enabled = gtk_toggle_button_get_active (togglebutton) ? 1 : 0;
eq->enabled = enabled;
deadbeef->streamer_dsp_refresh ();
+ deadbeef->streamer_dsp_chain_save ();
}
}
@@ -98,6 +100,7 @@ on_zero_all_clicked (GtkButton *button,
set_param (eq, i+1, 0);
}
gtk_widget_queue_draw (eqwin);
+ deadbeef->streamer_dsp_chain_save ();
}
}
}
@@ -111,6 +114,7 @@ on_zero_preamp_clicked (GtkButton *button,
set_param (eq, 0, 0);
ddb_equalizer_set_preamp (DDB_EQUALIZER (eqwin), 0);
gtk_widget_queue_draw (eqwin);
+ deadbeef->streamer_dsp_chain_save ();
}
}
}
@@ -126,6 +130,7 @@ on_zero_bands_clicked (GtkButton *button,
set_param (eq, i+1, 0);
}
gtk_widget_queue_draw (eqwin);
+ deadbeef->streamer_dsp_chain_save ();
}
}
}
@@ -228,7 +233,7 @@ on_load_preset_clicked (GtkMenuItem *menuitem,
set_param (eq, i+1, vals[i]);
}
gtk_widget_queue_draw (eqwin);
- deadbeef->conf_save ();
+ deadbeef->streamer_dsp_chain_save ();
}
}
else {
@@ -294,7 +299,7 @@ on_import_fb2k_preset_clicked (GtkButton *button,
set_param (eq, i+1, vals[i]);
}
gtk_widget_queue_draw (eqwin);
- deadbeef->conf_save ();
+ deadbeef->streamer_dsp_chain_save ();
}
}
else {
diff --git a/plugins/gtkui/eq.h b/plugins/gtkui/eq.h
index 570cd935..f9227278 100644
--- a/plugins/gtkui/eq.h
+++ b/plugins/gtkui/eq.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/fileman.c b/plugins/gtkui/fileman.c
index 0a366990..69f016af 100644
--- a/plugins/gtkui/fileman.c
+++ b/plugins/gtkui/fileman.c
@@ -211,6 +211,9 @@ gtkpl_add_fm_dropped_files (DB_playItem_t *drop_before, char *ptr, int length) {
DdbListviewIter inserted = deadbeef->plt_insert_dir (plt, after, fname, &abort, gtkui_add_file_info_cb, NULL);
if (!inserted && !abort) {
inserted = deadbeef->plt_insert_file (plt, after, fname, &abort, gtkui_add_file_info_cb, NULL);
+ if (!inserted && !abort) {
+ inserted = gtkui_original_plt_load (plt, after, fname, &abort, gtkui_add_file_info_cb, NULL);
+ }
}
if (inserted) {
if (!first) {
diff --git a/plugins/gtkui/gdkdrawing.c b/plugins/gtkui/gdkdrawing.c
index 41967bb8..9580af40 100644
--- a/plugins/gtkui/gdkdrawing.c
+++ b/plugins/gtkui/gdkdrawing.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index e3081188..5bb3df1a 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -71,7 +71,7 @@ GtkWidget *theme_button;
int gtkui_embolden_current_track;
-#define TRAY_ICON "deadbeef-tray-icon"
+#define TRAY_ICON "deadbeef_tray_icon"
// that must be called before gtk_init
void
@@ -1041,6 +1041,7 @@ gtkui_thread (void *ctx) {
gtk_window_set_icon_name (GTK_WINDOW (mainwin), "deadbeef");
}
else {
+ // try loading icon from $prefix/deadbeef.png (for static build)
char iconpath[1024];
snprintf (iconpath, sizeof (iconpath), "%s/deadbeef.png", deadbeef->get_prefix ());
gtk_window_set_icon_from_file (GTK_WINDOW (mainwin), iconpath, NULL);
@@ -1291,6 +1292,14 @@ gtkui_connect (void) {
return 0;
}
+static int
+gtkui_disconnect (void) {
+ supereq_plugin = NULL;
+ coverart_plugin = NULL;
+
+ return 0;
+}
+
static gboolean
quit_gtk_cb (gpointer nothing) {
@@ -1353,13 +1362,15 @@ static ddb_gtkui_t plugin = {
.gui.plugin.type = DB_PLUGIN_MISC,
#if GTK_CHECK_VERSION(3,0,0)
.gui.plugin.id = "gtkui3",
+ .gui.plugin.name = "GTK3 user interface",
+ .gui.plugin.descr = "User interface using GTK+ 3.x",
#else
.gui.plugin.id = "gtkui",
+ .gui.plugin.name = "GTK2 user interface",
+ .gui.plugin.descr = "User interface using GTK+ 2.x",
#endif
- .gui.plugin.name = "Standard GTK2 user interface",
- .gui.plugin.descr = "Default DeaDBeeF GUI",
.gui.plugin.copyright =
- "Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>\n"
+ "Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
@@ -1379,6 +1390,7 @@ static ddb_gtkui_t plugin = {
.gui.plugin.start = gtkui_start,
.gui.plugin.stop = gtkui_stop,
.gui.plugin.connect = gtkui_connect,
+ .gui.plugin.disconnect = gtkui_disconnect,
.gui.plugin.configdialog = settings_dlg,
.gui.plugin.message = gtkui_message,
.gui.run_dialog = gtkui_run_dialog_root,
diff --git a/plugins/gtkui/gtkui.h b/plugins/gtkui/gtkui.h
index 6aa81529..afef4788 100644
--- a/plugins/gtkui/gtkui.h
+++ b/plugins/gtkui/gtkui.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -29,27 +29,9 @@
#include "../../config.h"
#endif
-#if defined(ULTRA_COMPATIBLE)
-#warning compiling for compatibility with gtk <2.14
-#endif
-
-// workaround to make older gtk compatible with vala codegen
-#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE)
-#define gtk_widget_get_window(widget) ((widget)->window)
-#endif
-
-#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
-#define gtk_widget_set_has_window(widget, has_window) \
- if (has_window) GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW); \
- else GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW);
-
-#define gtk_widget_get_visible(widget) (GTK_WIDGET_VISIBLE(widget))
-#define gtk_widget_get_has_window(widget) (!GTK_WIDGET_NO_WINDOW(widget))
-#endif
-
-#if !GTK_CHECK_VERSION(2,20,0) || defined(ULTRA_COMPATIBLE)
-#define gtk_widget_get_realized(widget) (GTK_WIDGET_REALIZED(widget))
-#endif
+//#if defined(ULTRA_COMPATIBLE)
+//#warning compiling for compatibility with gtk <2.14
+//#endif
#include "../../deadbeef.h"
@@ -175,4 +157,6 @@ gtkui_trackinfochanged (DB_playItem_t *it);
gboolean
redraw_queued_tracks_cb (gpointer plt);
+extern DB_playItem_t * (*gtkui_original_plt_load) (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data);
+
#endif
diff --git a/plugins/gtkui/gtkui_api.h b/plugins/gtkui/gtkui_api.h
index 8d9808b1..34b4d9d1 100644
--- a/plugins/gtkui/gtkui_api.h
+++ b/plugins/gtkui/gtkui_api.h
@@ -2,7 +2,7 @@
gtkui_api.h -- API of the DeaDBeeF GTK UI plugin
http://deadbeef.sourceforge.net
- Copyright (C) 2009-2011 Alexey Yakovenko
+ Copyright (C) 2009-2012 Alexey Yakovenko
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 4ae9d5a7..7ccc50de 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -69,6 +69,7 @@ create_mainwin (void)
GtkWidget *album1;
GtkWidget *artist1;
GtkWidget *date1;
+ GtkWidget *random1;
GtkWidget *custom2;
GtkWidget *separator5;
GtkWidget *preferences;
@@ -310,6 +311,10 @@ create_mainwin (void)
gtk_widget_show (date1);
gtk_container_add (GTK_CONTAINER (sort_by1_menu), date1);
+ random1 = gtk_menu_item_new_with_mnemonic (_("Random"));
+ gtk_widget_show (random1);
+ gtk_container_add (GTK_CONTAINER (sort_by1_menu), random1);
+
custom2 = gtk_menu_item_new_with_mnemonic (_("Custom"));
gtk_widget_show (custom2);
gtk_container_add (GTK_CONTAINER (sort_by1_menu), custom2);
@@ -682,6 +687,9 @@ create_mainwin (void)
g_signal_connect ((gpointer) date1, "activate",
G_CALLBACK (on_sort_by_date_activate),
NULL);
+ g_signal_connect ((gpointer) random1, "activate",
+ G_CALLBACK (on_sort_by_random_activate),
+ NULL);
g_signal_connect ((gpointer) custom2, "activate",
G_CALLBACK (on_sort_by_custom_activate),
NULL);
@@ -811,6 +819,7 @@ create_mainwin (void)
GLADE_HOOKUP_OBJECT (mainwin, album1, "album1");
GLADE_HOOKUP_OBJECT (mainwin, artist1, "artist1");
GLADE_HOOKUP_OBJECT (mainwin, date1, "date1");
+ GLADE_HOOKUP_OBJECT (mainwin, random1, "random1");
GLADE_HOOKUP_OBJECT (mainwin, custom2, "custom2");
GLADE_HOOKUP_OBJECT (mainwin, separator5, "separator5");
GLADE_HOOKUP_OBJECT (mainwin, preferences, "preferences");
@@ -1668,6 +1677,7 @@ create_prefwin (void)
GtkWidget *cli_playlist_name;
GtkWidget *resume_last_session;
GtkWidget *ignore_archives;
+ GtkWidget *reset_autostop;
GtkWidget *label39;
GtkWidget *vbox29;
GtkWidget *hbox80;
@@ -1948,6 +1958,10 @@ create_prefwin (void)
gtk_widget_show (ignore_archives);
gtk_box_pack_start (GTK_BOX (vbox8), ignore_archives, FALSE, FALSE, 0);
+ reset_autostop = gtk_check_button_new_with_mnemonic (_("Auto-reset \"Stop after current\""));
+ gtk_widget_show (reset_autostop);
+ gtk_box_pack_start (GTK_BOX (vbox8), reset_autostop, FALSE, FALSE, 0);
+
label39 = gtk_label_new (_("Playback"));
gtk_widget_show (label39);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 1), label39);
@@ -2582,6 +2596,9 @@ create_prefwin (void)
g_signal_connect ((gpointer) ignore_archives, "toggled",
G_CALLBACK (on_ignore_archives_toggled),
NULL);
+ g_signal_connect ((gpointer) reset_autostop, "toggled",
+ G_CALLBACK (on_reset_autostop_toggled),
+ NULL);
g_signal_connect ((gpointer) dsp_add, "clicked",
G_CALLBACK (on_dsp_add_clicked),
NULL);
@@ -2746,6 +2763,7 @@ create_prefwin (void)
GLADE_HOOKUP_OBJECT (prefwin, cli_playlist_name, "cli_playlist_name");
GLADE_HOOKUP_OBJECT (prefwin, resume_last_session, "resume_last_session");
GLADE_HOOKUP_OBJECT (prefwin, ignore_archives, "ignore_archives");
+ GLADE_HOOKUP_OBJECT (prefwin, reset_autostop, "reset_autostop");
GLADE_HOOKUP_OBJECT (prefwin, label39, "label39");
GLADE_HOOKUP_OBJECT (prefwin, vbox29, "vbox29");
GLADE_HOOKUP_OBJECT (prefwin, hbox80, "hbox80");
diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c
index ceb61573..b781feaa 100644
--- a/plugins/gtkui/mainplaylist.c
+++ b/plugins/gtkui/mainplaylist.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/mainplaylist.h b/plugins/gtkui/mainplaylist.h
index 56a076c1..1b25ca6b 100644
--- a/plugins/gtkui/mainplaylist.h
+++ b/plugins/gtkui/mainplaylist.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/parser.c b/plugins/gtkui/parser.c
index 6ee81f9a..c49eeb72 100644
--- a/plugins/gtkui/parser.c
+++ b/plugins/gtkui/parser.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/gtkui/parser.h b/plugins/gtkui/parser.h
index ac411577..b0f95169 100644
--- a/plugins/gtkui/parser.h
+++ b/plugins/gtkui/parser.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c
index 64f45d6d..748bd90b 100644
--- a/plugins/gtkui/plcommon.c
+++ b/plugins/gtkui/plcommon.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -506,7 +506,7 @@ list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) {
int count = 0;
for (action = actions; action; action = action->next)
{
- if (action->flags & DB_ACTION_COMMON)
+ if (action->flags & (DB_ACTION_COMMON | DB_ACTION_PLAYLIST))
continue;
// create submenus (separated with '/')
diff --git a/plugins/gtkui/plcommon.h b/plugins/gtkui/plcommon.h
index d0ebedad..f5c04e35 100644
--- a/plugins/gtkui/plcommon.h
+++ b/plugins/gtkui/plcommon.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/pluginconf.c b/plugins/gtkui/pluginconf.c
index 42070d4d..1f265372 100644
--- a/plugins/gtkui/pluginconf.c
+++ b/plugins/gtkui/pluginconf.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/pluginconf.h b/plugins/gtkui/pluginconf.h
index 102691aa..5a1c5895 100644
--- a/plugins/gtkui/pluginconf.h
+++ b/plugins/gtkui/pluginconf.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/prefwin.c b/plugins/gtkui/prefwin.c
index bfcc80c9..81bb49e1 100644
--- a/plugins/gtkui/prefwin.c
+++ b/plugins/gtkui/prefwin.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -533,6 +533,10 @@ on_preferences_activate (GtkMenuItem *menuitem,
// add from archives
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "ignore_archives")), deadbeef->conf_get_int ("ignore_archives", 1));
+
+ // reset autostop
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "reset_autostop")), deadbeef->conf_get_int ("playlist.stop_after_current_reset", 0));
+
// titlebar text
gtk_entry_set_text (GTK_ENTRY (lookup_widget (w, "titlebar_format_playing")), deadbeef->conf_get_str_fast ("gtkui.titlebar_playing", "%a - %t - DeaDBeeF-%V"));
gtk_entry_set_text (GTK_ENTRY (lookup_widget (w, "titlebar_format_stopped")), deadbeef->conf_get_str_fast ("gtkui.titlebar_stopped", "DeaDBeeF-%V"));
@@ -1361,6 +1365,13 @@ on_ignore_archives_toggled (GtkToggleButton *togglebutton,
deadbeef->conf_set_int ("ignore_archives", gtk_toggle_button_get_active (togglebutton));
}
+void
+on_reset_autostop_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data)
+{
+ deadbeef->conf_set_int ("playlist.stop_after_current_reset", gtk_toggle_button_get_active (togglebutton));
+}
+
void
diff --git a/plugins/gtkui/progress.c b/plugins/gtkui/progress.c
index 359b0eae..98a6b461 100644
--- a/plugins/gtkui/progress.c
+++ b/plugins/gtkui/progress.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/gtkui/progress.h b/plugins/gtkui/progress.h
index 86558106..97366565 100644
--- a/plugins/gtkui/progress.h
+++ b/plugins/gtkui/progress.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/gtkui/search.c b/plugins/gtkui/search.c
index d3665bf3..87344e39 100644
--- a/plugins/gtkui/search.c
+++ b/plugins/gtkui/search.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/gtkui/search.h b/plugins/gtkui/search.h
index 98216d5c..104bc24f 100644
--- a/plugins/gtkui/search.h
+++ b/plugins/gtkui/search.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/gtkui/support.c b/plugins/gtkui/support.c
index 82e22c73..1eef6efc 100644
--- a/plugins/gtkui/support.c
+++ b/plugins/gtkui/support.c
@@ -196,3 +196,26 @@ gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box) {
}
#endif
+
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
+void
+gtk_widget_set_allocation (GtkWidget *widget, const GtkAllocation *allocation) {
+ widget->allocation.x = (allocation)->x;
+ widget->allocation.y = (allocation)->y;
+ widget->allocation.width = (allocation)->width;
+ widget->allocation.height = (allocation)->height;
+}
+
+void
+gtk_widget_get_allocation (GtkWidget *widget, GtkAllocation *allocation) {
+ (allocation)->x = widget->allocation.x;
+ (allocation)->y = widget->allocation.y;
+ (allocation)->width = widget->allocation.width;
+ (allocation)->height = widget->allocation.height;
+}
+
+void
+gtk_widget_set_window(GtkWidget *widget, GdkWindow *window) {
+ widget->window = window;
+}
+#endif
diff --git a/plugins/gtkui/support.h b/plugins/gtkui/support.h
index 351878b3..00e31c0f 100644
--- a/plugins/gtkui/support.h
+++ b/plugins/gtkui/support.h
@@ -81,6 +81,11 @@ void
gtk_dialog_set_has_separator (GtkDialog *dlg, gboolean has);
#endif
+#if !GTK_CHECK_VERSION(2,20,0)
+#define gtk_widget_set_realized(widget, realized) {if (realized) GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); else GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);}
+#define gtk_widget_get_realized(widget) (GTK_WIDGET_REALIZED (widget))
+#endif
+
#if !GTK_CHECK_VERSION(2,22,0)
GdkDragAction
gdk_drag_context_get_selected_action (GdkDragContext *context);
@@ -99,4 +104,43 @@ void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, const gchar *t
gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box);
#endif
+#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE)
+#define gtk_widget_get_window(widget) ((widget)->window)
+#define gtk_selection_data_get_target(data) (data->target)
+#define gtk_dialog_get_content_area(dialog) (dialog->vbox)
+#define gtk_dialog_get_action_area(dialog) (dialog->action_area)
+#define gtk_selection_data_get_data(data) (data->data)
+#define gtk_selection_data_get_length(data) (data->length)
+#define gtk_selection_data_get_format(data) (data->format)
+#define gtk_adjustment_get_lower(adj) (adj->lower)
+#define gtk_adjustment_get_upper(adj) (adj->upper)
+#endif
+
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
+#define gtk_widget_set_has_window(widget, has_window) \
+ if (has_window) GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW); \
+ else GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW);
+
+#define gtk_widget_get_visible(widget) (GTK_WIDGET_VISIBLE(widget))
+#define gtk_widget_get_has_window(widget) (!GTK_WIDGET_NO_WINDOW(widget))
+void gtk_widget_set_window(GtkWidget *widget, GdkWindow *window);
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
+void gtk_widget_set_allocation (GtkWidget *widget,
+ const GtkAllocation *allocation);
+
+void gtk_widget_get_allocation (GtkWidget *widget,
+ GtkAllocation *allocation);
+
+#define gtk_widget_set_can_focus(widget, canfocus) {if (canfocus) GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS); else GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);}
+
+#define gtk_widget_get_can_focus(widget) (GTK_WIDGET_CAN_FOCUS (widget));
+
+#define gtk_widget_set_can_default(widget, candefault) {if (candefault) GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); else GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_DEFAULT);}
+
+#define gtk_widget_get_can_default(widget) (GTK_WIDGET_CAN_DEFAULT (widget));
+#endif
+
#endif
diff --git a/plugins/gtkui/tagwritersettings.c b/plugins/gtkui/tagwritersettings.c
index ede3d447..d7554bac 100644
--- a/plugins/gtkui/tagwritersettings.c
+++ b/plugins/gtkui/tagwritersettings.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/tagwritersettings.h b/plugins/gtkui/tagwritersettings.h
index a48aaacb..fedaa2ba 100644
--- a/plugins/gtkui/tagwritersettings.h
+++ b/plugins/gtkui/tagwritersettings.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/timeline.c b/plugins/gtkui/timeline.c
index 83fc7f0f..224d3671 100644
--- a/plugins/gtkui/timeline.c
+++ b/plugins/gtkui/timeline.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/timeline.h b/plugins/gtkui/timeline.h
index 4223a84b..dc4cc7f9 100644
--- a/plugins/gtkui/timeline.h
+++ b/plugins/gtkui/timeline.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c
index 3601f48b..ff061cd9 100644
--- a/plugins/gtkui/trkproperties.c
+++ b/plugins/gtkui/trkproperties.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -491,6 +491,8 @@ write_finished_cb (void *ctx) {
main_refresh ();
search_refresh ();
trkproperties_modified = 0;
+ show_track_properties_dlg ();
+
return FALSE;
}
@@ -501,6 +503,7 @@ set_progress_cb (void *ctx) {
const char *fname = deadbeef->pl_find_meta_raw (track, ":URI");
gtk_entry_set_text (GTK_ENTRY (progressitem), fname);
deadbeef->pl_item_unref (track);
+ return FALSE;
}
static void
diff --git a/plugins/gtkui/trkproperties.h b/plugins/gtkui/trkproperties.h
index 3604cccc..ef1e530c 100644
--- a/plugins/gtkui/trkproperties.h
+++ b/plugins/gtkui/trkproperties.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/gtkui/wingeom.c b/plugins/gtkui/wingeom.c
index 47b6f960..cefd885c 100644
--- a/plugins/gtkui/wingeom.c
+++ b/plugins/gtkui/wingeom.c
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -23,6 +23,7 @@
#include "wingeom.h"
#include "../../deadbeef.h"
#include "gtkui.h"
+#include "support.h"
void
wingeom_save (GtkWidget *widget, const char *name) {
diff --git a/plugins/gtkui/wingeom.h b/plugins/gtkui/wingeom.h
index 9b468846..dcbb2c79 100644
--- a/plugins/gtkui/wingeom.h
+++ b/plugins/gtkui/wingeom.h
@@ -1,6 +1,6 @@
/*
DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>
+ Copyright (C) 2009-2012 Alexey Yakovenko <waker@users.sourceforge.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License