changeset 2805:6295535fbf49 trunk

[svn] - add toggle button to keep jtf dialog opened on jump.
author yaz
date Fri, 25 May 2007 11:18:58 -0700
parents d5c77e670be0
children 0646111a7217
files ChangeLog src/audacious/build_stamp.c src/audacious/main.c src/audacious/main.h src/audacious/ui_jumptotrack.c
diffstat 5 files changed, 33 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 25 01:35:44 2007 -0700
+++ b/ChangeLog	Fri May 25 11:18:58 2007 -0700
@@ -1,3 +1,11 @@
+2007-05-25 08:35:44 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [4634]
+  - temporal fix for crash in compare_func().
+  
+  trunk/src/audacious/pluginenum.c |   25 ++++++++++++++++++++-----
+  1 file changed, 20 insertions(+), 5 deletions(-)
+
+
 2007-05-25 07:28:41 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [4632]
   - adjust naming scheme of audacious_drct_* to audacious_remote_* by defining macros.
--- a/src/audacious/build_stamp.c	Fri May 25 01:35:44 2007 -0700
+++ b/src/audacious/build_stamp.c	Fri May 25 11:18:58 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070525-4632";
+const gchar *svn_stamp = "20070525-4634";
--- a/src/audacious/main.c	Fri May 25 01:35:44 2007 -0700
+++ b/src/audacious/main.c	Fri May 25 11:18:58 2007 -0700
@@ -320,6 +320,7 @@
     {"use_xmms_style_fileselector", &cfg.use_xmms_style_fileselector, TRUE},
     {"use_extension_probing", &cfg.use_extension_probing, TRUE},
     {"filepopup_showprogressbar", &cfg.filepopup_showprogressbar, TRUE},
+    {"close_jtf_dialog", &cfg.close_jtf_dialog, TRUE},
 };
 
 static gint ncfgbent = G_N_ELEMENTS(bmp_boolents);
--- a/src/audacious/main.h	Fri May 25 01:35:44 2007 -0700
+++ b/src/audacious/main.h	Fri May 25 11:18:58 2007 -0700
@@ -124,6 +124,7 @@
     gint colorize_r; gint colorize_g; gint colorize_b;
     gboolean terminate;
     gboolean filepopup_showprogressbar;
+    gboolean close_jtf_dialog;
 };
 
 typedef struct _BmpConfig BmpConfig;
--- a/src/audacious/ui_jumptotrack.c	Fri May 25 01:35:44 2007 -0700
+++ b/src/audacious/ui_jumptotrack.c	Fri May 25 11:18:58 2007 -0700
@@ -113,8 +113,17 @@
     change_song(pos - 1);
 
     /* FIXME: should only hide window */
-    gtk_widget_destroy(jump_to_track_win);
-    jump_to_track_win = NULL;
+    if(cfg.close_jtf_dialog){
+        gtk_widget_destroy(jump_to_track_win);
+        jump_to_track_win = NULL;
+    }
+}
+
+static void
+ui_jump_to_track_toggle_cb(GtkWidget * toggle)
+{
+    cfg.close_jtf_dialog =
+        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle));
 }
 
 static void
@@ -468,6 +477,7 @@
 {
     GtkWidget *scrollwin;
     GtkWidget *vbox, *bbox, *sep;
+    GtkWidget *toggle;
     GtkWidget *jump, *queue, *cancel;
     GtkWidget *rescan, *edit;
     GtkWidget *search_label, *hbox;
@@ -568,6 +578,16 @@
     gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
     gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 
+    /* close dialog toggle */
+    toggle = gtk_check_button_new_with_label(_("Close on Jump"));
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle),
+                                 cfg.close_jtf_dialog ? TRUE : FALSE);
+    gtk_box_pack_start(GTK_BOX(bbox), toggle, FALSE, FALSE, 0);
+    g_signal_connect(toggle, "clicked", 
+                     G_CALLBACK(ui_jump_to_track_toggle_cb),
+                     toggle);
+
+
     queue = gtk_button_new_with_mnemonic(_("_Queue"));
     gtk_box_pack_start(GTK_BOX(bbox), queue, FALSE, FALSE, 0);
     GTK_WIDGET_SET_FLAGS(queue, GTK_CAN_DEFAULT);