summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-19 21:52:01 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-19 21:52:01 +0200
commitab64fa187f7df94a3242982722d1cd05242446c7 (patch)
tree4d6e48487fdbb05489d8810775b6111dd1e26973 /plugins
parent65e25ef70dc16653c74f704f7937cb49772a2fff (diff)
gtkui, playlist: disable custom title in both "add location" and playlist context menu, until new title formatting is finished
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/actionhandlers.c13
-rw-r--r--plugins/gtkui/deadbeef.glade1
-rw-r--r--plugins/gtkui/interface.c1
-rw-r--r--plugins/gtkui/plcommon.c11
4 files changed, 22 insertions, 4 deletions
diff --git a/plugins/gtkui/actionhandlers.c b/plugins/gtkui/actionhandlers.c
index ad4bf04c..99a658bb 100644
--- a/plugins/gtkui/actionhandlers.c
+++ b/plugins/gtkui/actionhandlers.c
@@ -40,6 +40,9 @@
#include "callbacks.h"
#include <sys/stat.h>
+// disable custom title function, until we have new title formatting (0.7)
+#define DISABLE_CUSTOM_TITLE
+
extern GtkWidget *mainwin;
extern DB_functions_t *deadbeef;
@@ -401,7 +404,6 @@ on_toggle_set_custom_title (GtkToggleButton *togglebutton, gpointer user_data) {
deadbeef->conf_save ();
}
-
gboolean
action_add_location_handler_cb (void *user_data) {
GtkWidget *dlg = create_addlocationdlg ();
@@ -409,18 +411,23 @@ action_add_location_handler_cb (void *user_data) {
GtkWidget *sct = lookup_widget (dlg, "set_custom_title");
GtkWidget *ct = lookup_widget (dlg, "custom_title");
+#ifndef DISABLE_CUSTOM_TITLE
if (deadbeef->conf_get_int ("gtkui.location_set_custom_title", 0)) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sct), TRUE);
gtk_widget_set_sensitive (ct, TRUE);
}
- else {
+ else
+#endif
+ {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sct), FALSE);
gtk_widget_set_sensitive (ct, FALSE);
}
+#ifndef DISABLE_CUSTOM_TITLE
g_signal_connect ((gpointer) sct, "toggled",
G_CALLBACK (on_toggle_set_custom_title),
dlg);
+#endif
gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_OK);
int res = gtk_dialog_run (GTK_DIALOG (dlg));
@@ -433,9 +440,11 @@ action_add_location_handler_cb (void *user_data) {
if (!deadbeef->plt_add_files_begin (plt, 0)) {
DB_playItem_t *tail = deadbeef->plt_get_last (plt, PL_MAIN);
DB_playItem_t *it = deadbeef->plt_insert_file2 (0, plt, tail, text, NULL, NULL, NULL);
+#ifndef DISABLE_CUSTOM_TITLE
if (it && deadbeef->conf_get_int ("gtkui.location_set_custom_title", 0)) {
deadbeef->pl_replace_meta (it, ":CUSTOM_TITLE", gtk_entry_get_text (GTK_ENTRY (ct)));
}
+#endif
if (tail) {
deadbeef->pl_item_unref (tail);
}
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index 7828a9bf..57dd0cbe 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -6342,7 +6342,6 @@ if you don't press Apply.</property>
<child>
<widget class="GtkHBox" id="hbox122">
- <property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">8</property>
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 5cd3ce7e..c4c02b73 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -3223,7 +3223,6 @@ create_addlocationdlg (void)
gtk_entry_set_activates_default (GTK_ENTRY (addlocation_entry), TRUE);
hbox122 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox122);
gtk_box_pack_start (GTK_BOX (vbox45), hbox122, TRUE, TRUE, 0);
set_custom_title = gtk_check_button_new_with_mnemonic (_("Set custom title"));
diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c
index a6077929..d7df4f62 100644
--- a/plugins/gtkui/plcommon.c
+++ b/plugins/gtkui/plcommon.c
@@ -38,6 +38,9 @@
//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
#define trace(fmt,...)
+// disable custom title function, until we have new title formatting (0.7)
+#define DISABLE_CUSTOM_TITLE
+
char group_by_str[MAX_GROUP_BY_STR];
extern GtkWidget *theme_treeview;
@@ -478,6 +481,7 @@ on_toggle_set_custom_title (GtkToggleButton *togglebutton, gpointer user_data) {
deadbeef->conf_save ();
}
+#ifndef DISABLE_CUSTOM_TITLE
void
on_set_custom_title_activate (GtkMenuItem *menuitem, gpointer user_data)
{
@@ -530,6 +534,7 @@ on_set_custom_title_activate (GtkMenuItem *menuitem, gpointer user_data)
gtk_widget_destroy (dlg);
lv->binding->unref (it);
}
+#endif
void
on_remove_from_disk_activate (GtkMenuItem *menuitem,
@@ -624,7 +629,9 @@ list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) {
GtkWidget *separator8;
GtkWidget *properties1;
GtkWidget *reload_metadata;
+#ifndef DISABLE_CUSTOM_TITLE
GtkWidget *set_custom_title;
+#endif
playlist_menu = gtk_menu_new ();
add_to_playback_queue1 = gtk_menu_item_new_with_mnemonic (_("Add To Playback Queue"));
@@ -795,6 +802,7 @@ list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) {
gtk_widget_set_sensitive (separator8, FALSE);
}
+#ifndef DISABLE_CUSTOM_TITLE
set_custom_title = gtk_menu_item_new_with_mnemonic (_("Set Custom Title"));
gtk_widget_show (set_custom_title);
gtk_container_add (GTK_CONTAINER (playlist_menu), set_custom_title);
@@ -806,6 +814,7 @@ list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) {
gtk_widget_show (separator);
gtk_container_add (GTK_CONTAINER (playlist_menu), separator);
gtk_widget_set_sensitive (separator, FALSE);
+#endif
properties1 = gtk_menu_item_new_with_mnemonic (_("Track Properties"));
gtk_widget_show (properties1);
@@ -829,9 +838,11 @@ list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) {
G_CALLBACK (on_remove_from_disk_activate),
NULL);
}
+#ifndef DISABLE_CUSTOM_TITLE
g_signal_connect ((gpointer) set_custom_title, "activate",
G_CALLBACK (on_set_custom_title_activate),
listview);
+#endif
g_signal_connect ((gpointer) properties1, "activate",
G_CALLBACK (main_properties_activate),
NULL);