changeset 2807:26755684c0dc trunk

[svn] - Fixed naming inconsistencies in search dialog - Made URL opener follow button ordering conventions
author mf0102
date Sat, 26 May 2007 04:39:16 -0700
parents 0646111a7217
children dbc3f9e18c71
files ChangeLog src/audacious/build_stamp.c src/audacious/ui_playlist.c src/audacious/ui_urlopener.c
diffstat 4 files changed, 52 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 25 11:38:54 2007 -0700
+++ b/ChangeLog	Sat May 26 04:39:16 2007 -0700
@@ -1,3 +1,11 @@
+2007-05-25 18:38:54 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [4638]
+  - add default value for close_jtf_dialog.
+  
+  trunk/src/audacious/main.c |    1 +
+  1 file changed, 1 insertion(+)
+
+
 2007-05-25 18:18:58 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [4636]
   - add toggle button to keep jtf dialog opened on jump.
--- a/src/audacious/build_stamp.c	Fri May 25 11:38:54 2007 -0700
+++ b/src/audacious/build_stamp.c	Sat May 26 04:39:16 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070525-4636";
+const gchar *svn_stamp = "20070525-4638";
--- a/src/audacious/ui_playlist.c	Fri May 25 11:38:54 2007 -0700
+++ b/src/audacious/ui_playlist.c	Sat May 26 04:39:16 2007 -0700
@@ -469,8 +469,8 @@
     Playlist *playlist = playlist_get_active();
     GtkWidget *searchdlg_win, *searchdlg_table;
     GtkWidget *searchdlg_hbox, *searchdlg_logo, *searchdlg_helptext;
-    GtkWidget *searchdlg_entry_track_name, *searchdlg_label_track_name;
-    GtkWidget *searchdlg_entry_album_name, *searchdlg_label_album_name;
+    GtkWidget *searchdlg_entry_title, *searchdlg_label_title;
+    GtkWidget *searchdlg_entry_album, *searchdlg_label_album;
     GtkWidget *searchdlg_entry_file_name, *searchdlg_label_file_name;
     GtkWidget *searchdlg_entry_performer, *searchdlg_label_performer;
     GtkWidget *searchdlg_checkbt_clearprevsel;
@@ -492,17 +492,17 @@
     gtk_label_set_line_wrap( GTK_LABEL(searchdlg_helptext) , TRUE );
     gtk_box_pack_start( GTK_BOX(searchdlg_hbox) , searchdlg_logo , FALSE , FALSE , 0 );
     gtk_box_pack_start( GTK_BOX(searchdlg_hbox) , searchdlg_helptext , FALSE , FALSE , 0 );
-    /* track name */
-    searchdlg_label_track_name = gtk_label_new( _("Track name: ") );
-    searchdlg_entry_track_name = gtk_entry_new();
-    gtk_misc_set_alignment( GTK_MISC(searchdlg_label_track_name) , 0 , 0.5 );
-    g_signal_connect( G_OBJECT(searchdlg_entry_track_name) , "key-press-event" ,
+    /* title */
+    searchdlg_label_title = gtk_label_new( _("Title: ") );
+    searchdlg_entry_title = gtk_entry_new();
+    gtk_misc_set_alignment( GTK_MISC(searchdlg_label_title) , 0 , 0.5 );
+    g_signal_connect( G_OBJECT(searchdlg_entry_title) , "key-press-event" ,
       G_CALLBACK(playlistwin_select_search_kp_cb) , searchdlg_win );
-    /* album name */
-    searchdlg_label_album_name = gtk_label_new( _("Album name: ") );
-    searchdlg_entry_album_name = gtk_entry_new();
-    gtk_misc_set_alignment( GTK_MISC(searchdlg_label_album_name) , 0 , 0.5 );
-    g_signal_connect( G_OBJECT(searchdlg_entry_album_name) , "key-press-event" ,
+    /* album */
+    searchdlg_label_album= gtk_label_new( _("Album: ") );
+    searchdlg_entry_album= gtk_entry_new();
+    gtk_misc_set_alignment( GTK_MISC(searchdlg_label_album) , 0 , 0.5 );
+    g_signal_connect( G_OBJECT(searchdlg_entry_album) , "key-press-event" ,
       G_CALLBACK(playlistwin_select_search_kp_cb) , searchdlg_win );
     /* artist */
     searchdlg_label_performer = gtk_label_new( _("Artist: ") );
@@ -536,13 +536,13 @@
     gtk_table_set_row_spacing( GTK_TABLE(searchdlg_table) , 4 , 8 );
     gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_hbox ,
       0 , 2 , 0 , 1 , GTK_FILL | GTK_EXPAND , GTK_FILL | GTK_EXPAND , 0 , 2 );
-    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_label_track_name ,
+    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_label_title ,
       0 , 1 , 1 , 2 , GTK_FILL , GTK_FILL | GTK_EXPAND , 0 , 2 );
-    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_entry_track_name ,
+    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_entry_title ,
       1 , 2 , 1 , 2 , GTK_FILL | GTK_EXPAND , GTK_FILL | GTK_EXPAND , 0 , 2 );
-    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_label_album_name ,
+    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_label_album,
       0 , 1 , 2 , 3 , GTK_FILL , GTK_FILL | GTK_EXPAND , 0 , 2 );
-    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_entry_album_name ,
+    gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_entry_album,
       1 , 2 , 2 , 3 , GTK_FILL | GTK_EXPAND , GTK_FILL | GTK_EXPAND , 0 , 2 );
     gtk_table_attach( GTK_TABLE(searchdlg_table) , searchdlg_label_performer ,
       0 , 1 , 3 , 4 , GTK_FILL , GTK_FILL | GTK_EXPAND , 0 , 2 );
@@ -571,9 +571,9 @@
          /* create a TitleInput tuple with user search data */
          TitleInput *tuple = g_malloc(sizeof(TitleInput));
          gchar *searchdata = NULL;
-         searchdata = (gchar*)gtk_entry_get_text( GTK_ENTRY(searchdlg_entry_track_name) );
+         searchdata = (gchar*)gtk_entry_get_text( GTK_ENTRY(searchdlg_entry_title) );
          tuple->track_name = ( strcmp(searchdata,"") ) ? g_strdup(searchdata) : NULL;
-         searchdata = (gchar*)gtk_entry_get_text( GTK_ENTRY(searchdlg_entry_album_name) );
+         searchdata = (gchar*)gtk_entry_get_text( GTK_ENTRY(searchdlg_entry_album) );
          tuple->album_name = ( strcmp(searchdata,"") ) ? g_strdup(searchdata) : NULL;
          searchdata = (gchar*)gtk_entry_get_text( GTK_ENTRY(searchdlg_entry_performer) );
          tuple->performer = ( strcmp(searchdata,"") ) ? g_strdup(searchdata) : NULL;
@@ -1112,7 +1112,8 @@
     }
     else if (event->button == 1 && event->type == GDK_BUTTON_PRESS &&
              !ui_skinned_window_widgetlist_contained(playlistwin, event->x,
-		event->y) && (cfg.easy_move || event->y < 14))
+                                                     event->y) &&
+             (cfg.easy_move || event->y < 14))
     {
         dock_move_press(dock_window_list, GTK_WINDOW(playlistwin), event,
                         FALSE);
@@ -2021,8 +2022,6 @@
     run_filebrowser(NO_PLAY_BUTTON);
 }
 
-void add_medium(void); /* XXX */
-
 void
 action_playlist_add_cd(void)
 {
@@ -2046,19 +2045,19 @@
 void
 action_playlist_prev( void )
 {
-  playlist_select_prev();
+    playlist_select_prev();
 }
 
 void
 action_playlist_next( void )
 {
-  playlist_select_next();
+    playlist_select_next();
 }
 
 void
 action_playlist_delete( void )
 {
-  playlist_remove_playlist( playlist_get_active() );
+    playlist_remove_playlist( playlist_get_active() );
 }
 
 void
@@ -2138,7 +2137,7 @@
 
 static gboolean
 playlistwin_select_search_kp_cb(GtkWidget *entry, GdkEventKey *event,
-                                 gpointer searchdlg_win)
+                                gpointer searchdlg_win)
 {
     switch (event->keyval)
     {
@@ -2197,7 +2196,7 @@
             skip = TRUE;
     }
 
-        if (ctr >= cfg.filepopup_delay && (skip == TRUE || GTK_WIDGET_VISIBLE(GTK_WIDGET(filepopup_win)) != TRUE)) {
+    if (ctr >= cfg.filepopup_delay && (skip == TRUE || GTK_WIDGET_VISIBLE(GTK_WIDGET(filepopup_win)) != TRUE)) {
         if (pos == -1 && !playlistwin_is_shaded())
         {
             audacious_fileinfopopup_hide(GTK_WIDGET(filepopup_win), NULL);
--- a/src/audacious/ui_urlopener.c	Fri May 25 11:38:54 2007 -0700
+++ b/src/audacious/ui_urlopener.c	Sat May 26 04:39:16 2007 -0700
@@ -51,9 +51,9 @@
 #include "ui_playlist.h"
 
 #ifdef USE_CHARDET
-    #include "../librcd/librcd.h"
+#include "../librcd/librcd.h"
 #ifdef HAVE_UDET
-    #include <libudet_c.h>
+#include <libudet_c.h>
 #endif
 #endif
 
@@ -80,10 +80,10 @@
 
 GtkWidget *
 util_add_url_dialog_new(const gchar * caption, GCallback ok_func,
-    GCallback enqueue_func)
+                        GCallback enqueue_func)
 {
-    GtkWidget *win, *vbox, *bbox, *enqueue, *ok, *cancel, *combo, *entry, 
-          *label;
+    GtkWidget *win, *vbox, *bbox, *cancel, *enqueue, *ok, *combo, *entry, 
+              *label;
     GList *url;
 
     win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -108,7 +108,8 @@
     gtk_entry_set_text(GTK_ENTRY(entry), "");
 
     for (url = cfg.url_history; url; url = g_list_next(url))
-        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), (const gchar *) url->data);
+        gtk_combo_box_append_text(GTK_COMBO_BOX(combo),
+                                  (const gchar *) url->data);
 
     g_signal_connect(entry, "activate",
                      G_CALLBACK(util_add_url_callback),
@@ -125,15 +126,12 @@
     gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
     gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 
-    ok = gtk_button_new_from_stock(GTK_STOCK_OPEN);
-    g_signal_connect(ok, "clicked",
-             G_CALLBACK(util_add_url_callback), entry);
-    g_signal_connect(ok, "clicked",
-             G_CALLBACK(ok_func), entry);
-    g_signal_connect_swapped(ok, "clicked",
+    cancel = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+    gtk_box_pack_start(GTK_BOX(bbox), cancel, FALSE, FALSE, 0);
+
+    g_signal_connect_swapped(cancel, "clicked",
                              G_CALLBACK(gtk_widget_destroy),
                              win);
-    gtk_box_pack_start(GTK_BOX(bbox), ok, FALSE, FALSE, 0);
 
     enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD);
     gtk_box_pack_start(GTK_BOX(bbox), enqueue, FALSE, FALSE, 0);
@@ -148,12 +146,15 @@
                              G_CALLBACK(gtk_widget_destroy),
                              win);
 
-    cancel = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
-    gtk_box_pack_start(GTK_BOX(bbox), cancel, FALSE, FALSE, 0);
-
-    g_signal_connect_swapped(cancel, "clicked",
+    ok = gtk_button_new_from_stock(GTK_STOCK_OPEN);
+    g_signal_connect(ok, "clicked",
+                     G_CALLBACK(util_add_url_callback), entry);
+    g_signal_connect(ok, "clicked",
+                     G_CALLBACK(ok_func), entry);
+    g_signal_connect_swapped(ok, "clicked",
                              G_CALLBACK(gtk_widget_destroy),
                              win);
+    gtk_box_pack_start(GTK_BOX(bbox), ok, FALSE, FALSE, 0);
 
     gtk_widget_show_all(vbox);