You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(132) |
Dec
(135) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(87) |
Feb
(82) |
Mar
(117) |
Apr
(108) |
May
(231) |
Jun
(265) |
Jul
(31) |
Aug
(32) |
Sep
(89) |
Oct
(50) |
Nov
(112) |
Dec
(92) |
2007 |
Jan
(136) |
Feb
(82) |
Mar
(66) |
Apr
(104) |
May
(74) |
Jun
(103) |
Jul
(50) |
Aug
(23) |
Sep
(22) |
Oct
(39) |
Nov
(56) |
Dec
(88) |
2008 |
Jan
(51) |
Feb
(6) |
Mar
(6) |
Apr
(9) |
May
(39) |
Jun
(24) |
Jul
(48) |
Aug
(40) |
Sep
(9) |
Oct
(21) |
Nov
(12) |
Dec
(31) |
2009 |
Jan
(68) |
Feb
(14) |
Mar
(29) |
Apr
(40) |
May
(27) |
Jun
(9) |
Jul
(1) |
Aug
(10) |
Sep
(3) |
Oct
(7) |
Nov
(11) |
Dec
(165) |
2010 |
Jan
(72) |
Feb
(49) |
Mar
(30) |
Apr
(41) |
May
(17) |
Jun
(13) |
Jul
(99) |
Aug
(88) |
Sep
(59) |
Oct
(23) |
Nov
(11) |
Dec
(44) |
2011 |
Jan
(50) |
Feb
(28) |
Mar
(27) |
Apr
(18) |
May
(38) |
Jun
(5) |
Jul
(59) |
Aug
(7) |
Sep
(44) |
Oct
(12) |
Nov
(7) |
Dec
(10) |
2012 |
Jan
(8) |
Feb
(11) |
Mar
(17) |
Apr
(11) |
May
(3) |
Jun
(11) |
Jul
(26) |
Aug
(3) |
Sep
|
Oct
(17) |
Nov
(9) |
Dec
(1) |
2013 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: phantomjinx <pha...@us...> - 2011-12-20 21:19:29
|
commit a7d8db431e4fd8f0ff8882b5be130a2c79c08393 Author: phantomjinx <p.g...@ph...> Date: Tue Dec 20 20:44:39 2011 +0000 Updates to Changelog and NEWS * Updates before release of release candidate ChangeLog | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NEWS | 11 ++++++++++ 2 files changed, 74 insertions(+), 0 deletions(-) --- diff --git a/ChangeLog b/ChangeLog index cfbcd29..682d61e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,66 @@ +phantomjinx <p.g...@ph...> 2011-12-20 + + Updates to Changelog and NEWS + + * Updates before release of release candidate + +phantomjinx <p.g...@ph...> 2011-12-20 + + Ignore transifex client configuration directory + + * Local transifex client used for push and pull changes to the gtkpod.pot + file and related translations. + +phantomjinx <p.g...@ph...> 2011-12-20 + + Updates to translations + + * it.po + * Contributions made by Daniele Napolitano <dn...@gm...>. Thanks + + * Translation files updated due to changes in source files. + +phantomjinx <p.g...@ph...> 2011-12-19 + + Playlists names not displaying correctly in smart playlist wizard + + * Seems that the playlist combo box lacks a renderer for the text. + +phantomjinx <p.g...@ph...> 2011-12-17 + + Track volume control broken + + * Missing a scale adjustment for the scale to slide correctly. + +phantomjinx <p.g...@ph...> 2011-12-12 + + Remove superfluous debug statements + +phantomjinx <p.g...@ph...> 2011-12-12 + + Fix for display of progress while converting tracks + + * When converting tracks on writing itdb, the progress bar must be reset + to the number of tracks to be transferred. Otherwise, no progress and lots + of warning messages on the cmd line. + +phantomjinx <p.g...@ph...> 2011-12-09 + + Fix for restoring functionality of track normalization + + * Ensure that internal soundcheck functions populate a GError rather than + displaying a warning dialog. The latter does not work well inside threads! + + * Save up all error messages until the end of the normalization run + + * Use the platform progress bar rather than bringing up a custom dialog + + * Provide the action for normalizing a playlist to the playlist plugins menus. + +phantomjinx <p.g...@ph...> 2011-12-04 + + Translations po files updated to reflect codebase changes + phantomjinx <p.g...@ph...> 2011-11-28 Update NEWS and Changelog diff --git a/NEWS b/NEWS index 30a93c7..1adb67d 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ gtkpod V2.1.1 IMPROVEMENT: Update core app code to align with current anjuta + BUGFIX: Reintroduce track normalization + libgtkpod @@ -19,6 +21,13 @@ gtkpod V2.1.1 BUGFIX: Avoid possibility of symlinks, when adding files, hanging gtkpod + BUGFIX: Display track conversion progress correctly + + + Edit Track Details + + BUGFIX: Fix for track volume control + Coverart Display plugin @@ -45,6 +54,8 @@ gtkpod V2.1.1 IMPROVEMENT: Allow multiple selection of playlists + BUGFIX: Smart playlist wizard not correctly displaying playlist rules + Sort Tab Display plugin |
From: phantomjinx <pha...@us...> - 2011-12-20 21:19:22
|
commit c7d4cc801bfb015f9101f449fd6390c4db5bed43 Author: phantomjinx <p.g...@ph...> Date: Tue Dec 20 14:40:23 2011 +0000 Ignore transifex client configuration directory * Local transifex client used for push and pull changes to the gtkpod.pot file and related translations. .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index 07bd5c1..99016a6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ Makefile Makefile.in cscope.out version +.tx # / /.anjuta* |
From: phantomjinx <pha...@us...> - 2011-12-19 00:39:50
|
commit 382e9c364eeb1c8b1540bb9f187f655035010589 Author: phantomjinx <p.g...@ph...> Date: Mon Dec 19 00:16:02 2011 +0000 Playlists names not displaying correctly in smart playlist wizard * Seems that the playlist combo box lacks a renderer for the text. plugins/playlist_display/playlist_display_spl.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) --- diff --git a/plugins/playlist_display/playlist_display_spl.c b/plugins/playlist_display/playlist_display_spl.c index 88f86e8..42cb6dc 100644 --- a/plugins/playlist_display/playlist_display_spl.c +++ b/plugins/playlist_display/playlist_display_spl.c @@ -967,6 +967,7 @@ static GtkWidget *spl_create_hbox(GtkWidget *spl_window, Itdb_SPLRule *splr) { GList *gl; GtkListStore *store; GtkTreeIter iter; + GtkCellRenderer *cell; g_return_val_if_fail (spl_window, NULL); g_return_val_if_fail (splr, NULL); @@ -1066,6 +1067,11 @@ static GtkWidget *spl_create_hbox(GtkWidget *spl_window, Itdb_SPLRule *splr) { gl = gl->next; } g_object_unref(store); + + cell = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (combobox), cell, TRUE); + gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT (combobox), cell, "text", 0, NULL); + g_object_set_data(G_OBJECT (combobox), "spl_rule", splr); g_object_set_data_full(G_OBJECT (combobox), "spl_pl_ids", pl_ids, (GDestroyNotify) spl_pl_ids_destroy); if (splr->fromvalue == ITDB_SPL_DATE_IDENTIFIER) |
From: phantomjinx <pha...@us...> - 2011-12-17 22:39:31
|
commit 308d340a8dbfd5a898ab0da3ed50f00399a5e592 Author: phantomjinx <p.g...@ph...> Date: Sat Dec 17 22:00:28 2011 +0000 Track volume control broken * Missing a scale adjustment for the scale to slide correctly. plugins/details_editor/details_editor.xml | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) --- diff --git a/plugins/details_editor/details_editor.xml b/plugins/details_editor/details_editor.xml index d33f13c..9f9badd 100644 --- a/plugins/details_editor/details_editor.xml +++ b/plugins/details_editor/details_editor.xml @@ -1,6 +1,12 @@ <?xml version="1.0"?> <interface> <!-- interface-requires gtk+ 2.6 --> + <object class="GtkAdjustment" id="details_scale_23_adjustment"> + <property name="lower">-255</property> + <property name="upper">255</property> + <property name="step_increment">1</property> + <property name="page_increment">16</property> + </object> <!-- interface-naming-policy toplevel-contextual --> <object class="GtkWindow" id="details_window"> <property name="title" translatable="yes">Details</property> @@ -2494,6 +2500,7 @@ simultaneously</property> <object class="GtkHScale" id="details_scale_23"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="adjustment">details_scale_23_adjustment</property> <property name="digits">0</property> <property name="value_pos">right</property> </object> |
From: phantomjinx <pha...@us...> - 2011-12-17 22:39:25
|
commit db1837dc5f4dc9df3a8453e5edeb19188ec155a9 Author: phantomjinx <p.g...@ph...> Date: Mon Dec 12 17:40:27 2011 +0000 Remove superfluous debug statements plugins/sorttab_display/normal_sorttab_page.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) --- diff --git a/plugins/sorttab_display/normal_sorttab_page.c b/plugins/sorttab_display/normal_sorttab_page.c index 86e1cc8..d4368d2 100644 --- a/plugins/sorttab_display/normal_sorttab_page.c +++ b/plugins/sorttab_display/normal_sorttab_page.c @@ -464,7 +464,6 @@ static gboolean _st_selection_changed_cb(gpointer data) { inst, time.tv_sec % 3600, time.tv_usec); #endif - printf("st_s_c_cb instance %d: entered\n", sort_tab_widget_get_instance(priv->st_widget_parent)); if (gtk_tree_selection_count_selected_rows(selection) == 0) { /* * no selection -- unselect current selection (unless @@ -628,7 +627,6 @@ static gboolean _st_is_all_entry_selected(NormalSortTabPage *self) { while(se) { TabEntry *entry = se->data; if (entry->master) { - g_message("Entry is master so all entry selected"); return TRUE; } @@ -979,7 +977,6 @@ void normal_sort_tab_page_add_track(NormalSortTabPage *self, Track *track, gbool /* add track to next tab if "entry" is selected */ if (_st_is_all_entry_selected(self) || _st_is_entry_selected(self, entry)) { - g_warning("Called from add track normal (1)"); sort_tab_widget_add_track(st_next, track, final, display); } |
From: phantomjinx <pha...@us...> - 2011-12-12 14:04:18
|
commit 31df41432eddeb5b3649d7200a0a96a1eeaa3663 Author: phantomjinx <p.g...@ph...> Date: Mon Dec 12 13:27:29 2011 +0000 Fix for display of progress while converting tracks * When converting tracks on writing itdb, the progress bar must be reset to the number of tracks to be transferred. Otherwise, no progress and lots of warning messages on the cmd line. libgtkpod/file_itunesdb.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) --- diff --git a/libgtkpod/file_itunesdb.c b/libgtkpod/file_itunesdb.c index 28cc997..96dc179 100644 --- a/libgtkpod/file_itunesdb.c +++ b/libgtkpod/file_itunesdb.c @@ -1504,7 +1504,11 @@ static gboolean transfer_tracks(iTunesDB *itdb, TransferData *td) { file_transfer_reschedule(itdb); /* find out how many tracks have already been processed */ - file_transfer_get_status(itdb, NULL, NULL, NULL, &transferred_num, &failed_num); + file_transfer_get_status(itdb, &to_convert_num, &converting_num, &to_transfer_num, &transferred_num, &failed_num); + + /* Reset the progress bar to the total number of tracks to be transferred */ + gtkpod_statusbar_reset_progress(to_convert_num + converting_num + to_transfer_num + failed_num + transferred_num); + transferred_init = transferred_num + failed_num; start = time(NULL); @@ -1663,6 +1667,12 @@ static gboolean gp_write_itdb(iTunesDB *itdb) { } if (success) { /* write tracks to iPod */ + /* + * Note: + * this resets and increments the progress bar + * so the reset_progress_status must be called after + * this has finished. + */ success = transfer_tracks(itdb, transferdata); } } |
From: phantomjinx <pha...@us...> - 2011-12-10 16:32:29
|
commit 400e3393ae7c565ecaca350ef3e96d73e6e0bd18 Author: phantomjinx <p.g...@ph...> Date: Fri Dec 9 22:01:25 2011 +0000 Fix for restoring functionality of track normalization * Ensure that internal soundcheck functions populate a GError rather than displaying a warning dialog. The latter does not work well inside threads! * Save up all error messages until the end of the normalization run * Use the platform progress bar rather than bringing up a custom dialog * Provide the action for normalizing a playlist to the playlist plugins menus. libgtkpod/file.c | 26 ++-- libgtkpod/file.h | 2 +- libgtkpod/tools.c | 221 ++++++++++---------- plugins/playlist_display/playlist_display.ui | 1 + .../playlist_display/playlist_display_actions.c | 12 + .../playlist_display/playlist_display_actions.h | 1 + plugins/playlist_display/plugin.c | 8 + plugins/track_display/plugin.c | 12 +- 8 files changed, 153 insertions(+), 130 deletions(-) --- diff --git a/libgtkpod/file.c b/libgtkpod/file.c index 6551145..7f3b3cc 100644 --- a/libgtkpod/file.c +++ b/libgtkpod/file.c @@ -2056,35 +2056,35 @@ void parse_offline_playcount(void) { * * Return value: TRUE, if gain could be read */ -gboolean read_soundcheck(Track *track) { - gchar *path; +gboolean read_soundcheck(Track *track, GError **error) { + gchar *path, *buf; FileType *filetype; gboolean result = FALSE; - GError *error = NULL; - gchar *msg = g_strdup_printf(_("Failed to read sound check from track because")); g_return_val_if_fail (track, FALSE); path = get_file_name_from_source(track, SOURCE_PREFER_LOCAL); + if (!path) { + buf = g_strdup_printf(_("Failed to read sound check from track with no path setting.")); + gtkpod_log_error(error, buf); + g_free(buf); + return FALSE; + } + filetype = determine_filetype(path); if (! filetype) { - gtkpod_warning(_("%s\n\nfiletype of %s is not recognised."), msg, path); + buf = g_strdup_printf(_("Failed to read sound check from track because filetype is not recognised.")); + gtkpod_log_error(error, buf); + g_free(buf); } else { - if (!filetype_read_soundcheck(filetype, path, track, &error)) { - if (error) { - gtkpod_warning(_("%s\n\n%s"), msg, error->message); - } else { - gtkpod_warning(_("%s\n\n%s"), msg, UNKNOWN_ERROR); - } - } else { + if (filetype_read_soundcheck(filetype, path, track, error)) { // track read successfully result = TRUE; } } g_free(path); - g_free(msg); return result; } diff --git a/libgtkpod/file.h b/libgtkpod/file.h index 01ba239..e62e71b 100644 --- a/libgtkpod/file.h +++ b/libgtkpod/file.h @@ -89,7 +89,7 @@ void gp_info_deleted_tracks (iTunesDB *itdb, void update_charset_info (Track *track); void parse_offline_playcount (void); -gboolean read_soundcheck (Track *track); +gboolean read_soundcheck (Track *track, GError **error); gboolean read_lyrics_from_file (Track *track, gchar **lyrics); gboolean write_lyrics_to_file (Track *track); diff --git a/libgtkpod/tools.c b/libgtkpod/tools.c index 0fa6e19..ae90ad8 100644 --- a/libgtkpod/tools.c +++ b/libgtkpod/tools.c @@ -33,6 +33,7 @@ #include "misc.h" #include "misc_track.h" #include "prefs.h" +#include "gp_private.h" #include "tools.h" #include <errno.h> #include <fcntl.h> @@ -44,6 +45,12 @@ #include <unistd.h> #include <glib/gi18n-lib.h> +/* Structure to keep all necessary information */ +struct nm { + Track *track; /* track to be normalised */ + GError *error; /* Errors generated during the normalisation */ +}; + /*pipe's definition*/ enum { READ = 0, WRITE = 1 @@ -75,10 +82,11 @@ static gboolean mutex_data = FALSE; * Return value: TRUE if the command ran successfully, FALSE if any * error occurred. */ -static gboolean run_exec_on_track(const gchar *commandline, const gchar *track_path) { +static gboolean run_exec_on_track(const gchar *commandline, const gchar *track_path, GError **error) { gchar *command_full_path = NULL; gchar *command = NULL; gchar *command_base = NULL; + gchar *buf; const gchar *nextarg; gboolean success = FALSE; gboolean percs = FALSE; @@ -105,7 +113,9 @@ static gboolean run_exec_on_track(const gchar *commandline, const gchar *track_p command_full_path = g_find_program_in_path(command); if (!command_full_path) { - gtkpod_warning(_("Could not find '%s'.\nPlease specifiy the exact path in the Tools section of the preference dialog or install the program if it is not installed on your system.\n\n"), command); + buf = g_strdup_printf(_("Could not find '%s'.\nPlease specifiy the exact path in the Tools section of the preference dialog or install the program if it is not installed on your system.\n\n"), command); + gtkpod_log_error(error, buf); + g_free(buf); goto cleanup; } @@ -187,7 +197,9 @@ static gboolean run_exec_on_track(const gchar *commandline, const gchar *track_p else ret = 2; if (ret > 1) { - gtkpod_warning(_("Execution of '%s' failed.\n\n"), command_full_path); + buf = g_strdup_printf(_("Execution of '%s' failed.\n\n"), command_full_path); + gtkpod_log_error(error, buf); + g_free(buf); } else { success = TRUE; @@ -203,38 +215,44 @@ static gboolean run_exec_on_track(const gchar *commandline, const gchar *track_p } /* reread the soundcheck value from the file */ -static gboolean nm_get_soundcheck(Track *track) { - gchar *path; +static gboolean nm_get_soundcheck(Track *track, GError **error) { + gchar *path, *buf; gchar *commandline = NULL; FileType *filetype; g_return_val_if_fail (track, FALSE); - if (read_soundcheck(track)) + if (read_soundcheck(track, error)) return TRUE; + if (error && *error) + return FALSE; + path = get_file_name_from_source(track, SOURCE_PREFER_LOCAL); filetype = determine_filetype(path); if (!path || !filetype) { - gchar *buf = get_track_info(track, FALSE); - gtkpod_warning(_("Normalization failed: file not available (%s).\n\n"), buf); + buf = get_track_info(track, FALSE); + buf = g_strdup_printf(_("Normalization failed: file not available (%s)."), buf); + gtkpod_log_error(error, buf); g_free(buf); return FALSE; } commandline = filetype_get_gain_cmd(filetype); if (commandline) { - if (run_exec_on_track(commandline, path)) { + if (run_exec_on_track(commandline, path, error)) { g_free(path); - return read_soundcheck(track); + return read_soundcheck(track, error); } } else { - gtkpod_warning(_("Normalization failed for file %s: file type not supported.\n" - "To normalize mp3 and aac files ensure the following commands paths have been set in the Tools section\n" - "\tmp3 files: mp3gain\n" + buf = g_strdup_printf(_("Normalization failed for file %s: file type not supported." + "To normalize mp3 and aac files ensure the following commands paths have been set in the Tools section" + "\tmp3 files: mp3gain" "\taac files: aacgain"), path); + gtkpod_log_error(error, buf); + g_free(buf); } return FALSE; @@ -242,8 +260,9 @@ static gboolean nm_get_soundcheck(Track *track) { #ifdef G_THREADS_ENABLED /* Threaded getTrackGain*/ -static gpointer th_nm_get_soundcheck(gpointer track) { - gboolean success = nm_get_soundcheck((Track *) track); +static gpointer th_nm_get_soundcheck(gpointer data) { + struct nm *nm = data; + gboolean success = nm_get_soundcheck(nm->track, &(nm->error)); g_mutex_lock (mutex); mutex_data = TRUE; /* signal that thread will end */ g_cond_signal (cond); @@ -270,20 +289,36 @@ void nm_new_tracks(iTunesDB *itdb) { g_list_free(tracks); } -static void normalization_abort(gboolean *abort) { - *abort = TRUE; +static void nm_report_errors_and_free(GString *errors) { + if (errors && errors->len > 0) { + gtkpod_confirmation(-1, /* gint id, */ + TRUE, /* gboolean modal, */ + _("Normalization Errors"), /* title */ + _("Errors created by track normalisation"), /* label */ + errors->str, /* scrolled text */ + NULL, 0, NULL, /* option 1 */ + NULL, 0, NULL, /* option 2 */ + TRUE, /* gboolean confirm_again, */ + "show_normalization_errors",/* confirm_again_key,*/ + CONF_NULL_HANDLER, /* ConfHandler ok_handler,*/ + NULL, /* don't show "Apply" button */ + NULL, /* cancel_handler,*/ + NULL, /* gpointer user_data1,*/ + NULL); /* gpointer user_data2,*/ + + g_string_free(errors, TRUE); + } } void nm_tracks_list(GList *list) { gint count, succ_count, n; + gdouble fraction = 0; + gdouble old_fraction = 0; guint32 old_soundcheck; gboolean success; - static gboolean abort; - GtkWidget *dialog, *progress_bar, *label, *track_label; - GtkWidget *image, *hbox; - GtkWidget *content_area; - time_t diff, start, fullsecs, hrs, mins, secs; gchar *progtext = NULL; + struct nm *nm; + GString *errors = g_string_new(""); /* Errors generated during the normalisation */ #ifdef G_THREADS_ENABLED GThread *thread = NULL; @@ -296,46 +331,6 @@ void nm_tracks_list(GList *list) { block_widgets(); - /* create the dialog window */ - dialog - = gtk_dialog_new_with_buttons(_("Information"), GTK_WINDOW (gtkpod_app), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_NONE, NULL); - - /* emulate gtk_message_dialog_new */ - image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); - label = gtk_label_new(_("Press button to abort.")); - - gtk_misc_set_alignment(GTK_MISC (image), 0.5, 0.0); - gtk_label_set_line_wrap(GTK_LABEL (label), TRUE); - gtk_label_set_selectable(GTK_LABEL (label), TRUE); - - /* hbox to put the image+label in */ - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); - gtk_box_pack_start(GTK_BOX (hbox), image, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX (hbox), label, FALSE, FALSE, 0); - - /* Create the progress bar */ - progress_bar = gtk_progress_bar_new(); - progtext = g_strdup(_("Normalizing...")); - gtk_progress_bar_set_text(GTK_PROGRESS_BAR (progress_bar), progtext); - g_free(progtext); - - /* Create label for track name */ - track_label = gtk_label_new(NULL); - gtk_label_set_line_wrap(GTK_LABEL (label), TRUE); - gtk_label_set_selectable(GTK_LABEL (label), TRUE); - - /* Indicate that user wants to abort */ - g_signal_connect_swapped (G_OBJECT (dialog), "response", - G_CALLBACK (normalization_abort), - &abort); - - /* Add the image/label + progress bar to dialog */ - content_area = gtk_dialog_get_content_area(GTK_DIALOG (dialog)); - gtk_box_pack_start(GTK_BOX (content_area), hbox, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX (content_area), track_label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX (content_area), progress_bar, FALSE, FALSE, 0); - gtk_widget_show_all(dialog); - while (widgets_blocked && gtk_events_pending()) gtk_main_iteration(); @@ -343,55 +338,36 @@ void nm_tracks_list(GList *list) { n = g_list_length(list); count = 0; /* tracks processed */ succ_count = 0; /* tracks normalized */ - abort = FALSE; - start = time(NULL); if (n == 0) { - /* FIXME we should tell something*/ - - } - else { - /* we need ***much*** longer timeout */ - g_message("TODO tools:nm_tracks_list - statusbar\n"); - // gtkpod_statusbar_timeout (30*STATUSBAR_TIMEOUT); + // nothing to do + return; } - while (!abort && (list != NULL)) { - Track *track = list->data; - gchar *label_buf = g_strdup_printf("%d/%d", count, n); - gtk_label_set_text(GTK_LABEL (track_label), label_buf); + gtkpod_statusbar_reset_progress(100); - g_message("TODO tools:nm_tracks_list - statusbar\n"); - // gtkpod_statusbar_message (_("%s - %s"), - // track->artist, track->title); - C_FREE (label_buf); + nm = g_malloc0(sizeof(struct nm)); + while (list) { + nm->track = list->data; + nm->error = NULL; while (widgets_blocked && gtk_events_pending()) gtk_main_iteration(); /* need to know so we can update the display when necessary */ - old_soundcheck = track->soundcheck; + old_soundcheck = nm->track->soundcheck; #ifdef G_THREADS_ENABLED mutex_data = FALSE; - thread = g_thread_create (th_nm_get_soundcheck, track, TRUE, NULL); + + thread = g_thread_create (th_nm_get_soundcheck, nm, TRUE, NULL); if (thread) { - gboolean first_abort = TRUE; g_mutex_lock (mutex); do { while (widgets_blocked && gtk_events_pending()) gtk_main_iteration(); /* wait a maximum of 10 ms */ - if (abort && first_abort) { - first_abort = FALSE; - progtext = g_strdup(_("Aborting...")); - gtk_progress_bar_set_text(GTK_PROGRESS_BAR (progress_bar), progtext); - g_free(progtext); - gtkpod_statusbar_message(_("Will abort after current mp3gain process ends.")); - while (widgets_blocked && gtk_events_pending()) - gtk_main_iteration(); - } g_get_current_time(>ime); g_time_val_add(>ime, 20000); g_cond_timed_wait (cond, mutex, >ime); @@ -402,54 +378,69 @@ void nm_tracks_list(GList *list) { } else { g_warning ("Thread creation failed, falling back to default.\n"); - success = nm_get_soundcheck(track); + success = nm_get_soundcheck(nm->track, &(nm->error)); + } #else - success = nm_get_soundcheck (track); + success = nm_get_soundcheck (nm->track, nm->error); #endif /*normalization part*/ if (!success) { - gchar *path = get_file_name_from_source(track, SOURCE_PREFER_LOCAL); - gtkpod_warning(_("'%s-%s' (%s) could not be normalized.\n\n"), track->artist, track->title, path ? path : ""); + gchar *path = get_file_name_from_source(nm->track, SOURCE_PREFER_LOCAL); + + if (nm->error) { + errors = g_string_append(errors, g_strdup_printf(_("'%s-%s' (%s) could not be normalized. %s\n"), nm->track->artist, nm->track->title, path ? path : "", nm->error->message)); + } + else { + errors = g_string_append(errors, g_strdup_printf(_("'%s-%s' (%s) could not be normalized. Unknown error.\n"), nm->track->artist, nm->track->title, path ? path : "")); + } + g_free(path); } else { ++succ_count; - if (old_soundcheck != track->soundcheck) { - gtkpod_track_updated(track); - data_changed(track->itdb); + if (old_soundcheck != nm->track->soundcheck) { + gtkpod_track_updated(nm->track); + data_changed(nm->track->itdb); } } /*end normalization*/ ++count; - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR (progress_bar), (gdouble) count / n); - - diff = time(NULL) - start; - fullsecs = (diff * n / count) - diff; - hrs = fullsecs / 3600; - mins = (fullsecs % 3600) / 60; - secs = ((fullsecs % 60) / 5) * 5; - /* don't bounce up too quickly (>10% change only) */ - /* left = ((mins < left) || (100*mins >= 110*left)) ? mins : left;*/ - progtext = g_strdup_printf(_("%d%% (%d:%02d:%02d left)"), count * 100 / n, (int) hrs, (int) mins, (int) secs); - gtk_progress_bar_set_text(GTK_PROGRESS_BAR (progress_bar), progtext); + fraction = (gdouble) count / (gdouble) n; + progtext = g_strdup_printf(_("%d%% (%d tracks left)"), count * 100 / n, n - count); + + gdouble ticks = fraction - old_fraction; + gtkpod_statusbar_increment_progress_ticks(ticks * 100, progtext); + + old_fraction = fraction; g_free(progtext); + if (fraction == 1) { + /* All finished */ + gtkpod_statusbar_reset_progress(100); + gtkpod_statusbar_message(ngettext ("Normalized %d of %d track.", "Normalized %d of %d tracks.", n), count, n); + } + while (widgets_blocked && gtk_events_pending()) gtk_main_iteration(); + list = g_list_next(list); + + if (nm->error) + g_error_free(nm->error); + } /*end while*/ - g_message("TODO tools:nm_tracks_list - statusbar\n"); - // gtkpod_statusbar_timeout (0); + g_free(nm); + + nm_report_errors_and_free(errors); - // gtkpod_statusbar_message (ngettext ("Normalized %d of %d tracks.", - // "Normalized %d of %d tracks.", n), - // count, n); + gtkpod_statusbar_message (ngettext ("Normalized %d of %d tracks.", + "Normalized %d of %d tracks.", n), + count, n); - gtk_widget_destroy(dialog); release_widgets(); } diff --git a/plugins/playlist_display/playlist_display.ui b/plugins/playlist_display/playlist_display.ui index 1b22e0d..178901c 100644 --- a/plugins/playlist_display/playlist_display.ui +++ b/plugins/playlist_display/playlist_display.ui @@ -36,6 +36,7 @@ <menuitem name="Selected Playlist" action="ActionUpdatePlaylist" /> </menu> <menuitem name="Sync Playlist with Dir(s)" action="ActionSyncPlaylistWithDir"/> + <menuitem name="Normalize Playlist(s)" action="ActionNormalizePlaylist"/> </placeholder> </menu> <menu name="MenuEdit" action="ActionMenuEdit"> diff --git a/plugins/playlist_display/playlist_display_actions.c b/plugins/playlist_display/playlist_display_actions.c index 8f34f17..71e42de 100644 --- a/plugins/playlist_display/playlist_display_actions.c +++ b/plugins/playlist_display/playlist_display_actions.c @@ -43,6 +43,7 @@ #include "libgtkpod/misc_playlist.h" #include "libgtkpod/file.h" #include "libgtkpod/syncdir.h" +#include "libgtkpod/tools.h" #include <gdk/gdk.h> /* Callback after directories to add have been selected */ @@ -703,3 +704,14 @@ void on_sync_playlists_with_dirs(GtkAction *action, PlaylistDisplayPlugin* plugi playlists = playlists->next; } } + +void on_normalize_selected_playlist (GtkMenuItem *menuitem, gpointer user_data) { + GList *playlists = pm_get_selected_playlists(); + while (playlists) { + Playlist *pl = playlists->data; + if (pl) { + nm_tracks_list (pl->members); + } + playlists = playlists->next; + } +} diff --git a/plugins/playlist_display/playlist_display_actions.h b/plugins/playlist_display/playlist_display_actions.h index 5d7b6d2..c1f6fc2 100644 --- a/plugins/playlist_display/playlist_display_actions.h +++ b/plugins/playlist_display/playlist_display_actions.h @@ -69,5 +69,6 @@ void on_delete_selected_playlists_including_tracks_from_device(GtkAction *action void on_update_selected_playlists (GtkAction *action, PlaylistDisplayPlugin* plugin); void on_sync_playlists_with_dirs(GtkAction *action, PlaylistDisplayPlugin* plugin); +void on_normalize_selected_playlist (GtkMenuItem *menuitem, gpointer user_data); #endif diff --git a/plugins/playlist_display/plugin.c b/plugins/playlist_display/plugin.c index 407c55c..9ef7016 100644 --- a/plugins/playlist_display/plugin.c +++ b/plugins/playlist_display/plugin.c @@ -119,6 +119,14 @@ static GtkActionEntry playlist_actions[] = G_CALLBACK (on_sync_playlists_with_dirs) }, { + "ActionNormalizePlaylist", + GTK_STOCK_EXECUTE, + N_("Normalize"), + NULL, + NULL, + G_CALLBACK (on_normalize_selected_playlist) + }, + { ACTION_NEW_PLAYLIST_MENU, NULL, N_("_New Playlist"), diff --git a/plugins/track_display/plugin.c b/plugins/track_display/plugin.c index 69b0634..a0e1e65 100644 --- a/plugins/track_display/plugin.c +++ b/plugins/track_display/plugin.c @@ -36,6 +36,7 @@ #include "libgtkpod/gtkpod_app_iface.h" #include "libgtkpod/gp_private.h" #include "libgtkpod/prefs.h" +#include "libgtkpod/tools.h" #include "plugin.h" #include "display_tracks.h" #include "track_display_actions.h" @@ -135,6 +136,8 @@ static gboolean activate_track_display_plugin(AnjutaPlugin *plugin) { gtk_widget_show_all(track_display_plugin->track_window); anjuta_shell_add_widget(plugin->shell, track_display_plugin->track_window, "TrackDisplayPlugin", _(" Playlist Tracks"), NULL, ANJUTA_SHELL_PLACEMENT_TOP, NULL); + gtkpod_register_track_command(TRACK_COMMAND(track_display_plugin)); + return TRUE; /* FALSE if activation failed */ } @@ -211,8 +214,15 @@ static void ipreferences_iface_init(IAnjutaPreferencesIface* iface) { iface->unmerge = ipreferences_unmerge; } +static void track_command_iface_init(TrackCommandInterface *iface) { + iface->id = "track_display_normalise_track_command"; + iface->text = _("Normalise"); + iface->execute = nm_tracks_list; +} + ANJUTA_PLUGIN_BEGIN (TrackDisplayPlugin, track_display_plugin); - ANJUTA_PLUGIN_ADD_INTERFACE(ipreferences, IANJUTA_TYPE_PREFERENCES);ANJUTA_PLUGIN_END +ANJUTA_PLUGIN_ADD_INTERFACE(track_command, TRACK_COMMAND_TYPE); +ANJUTA_PLUGIN_ADD_INTERFACE(ipreferences, IANJUTA_TYPE_PREFERENCES);ANJUTA_PLUGIN_END ; ANJUTA_SIMPLE_PLUGIN (TrackDisplayPlugin, track_display_plugin) |
From: phantomjinx <pha...@us...> - 2011-11-29 00:03:38
|
commit c2098486f9eb11b7309320c704c18ff40cc1ddea Author: phantomjinx <p.g...@ph...> Date: Mon Nov 28 23:58:51 2011 +0000 Update NEWS and Changelog * Final update prior to release of 2.1.1 ChangeLog | 507 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NEWS | 53 +++++++ 2 files changed, 560 insertions(+), 0 deletions(-) --- diff --git a/ChangeLog b/ChangeLog index 8f32e26..cfbcd29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,510 @@ +phantomjinx <p.g...@ph...> 2011-11-28 + + Update NEWS and Changelog + + * Final update prior to release of 2.1.1 + +phantomjinx <p.g...@ph...> 2011-11-28 + + Make the track display filter case-insensitive + + * Text entered into the track display filter tab will find tracks not + confined to same case. + + Fixes FS#75 - Search is case-sensitive + +phantomjinx <p.g...@ph...> 2011-11-25 + + Updates for translations + + * Thanks to davitymola <dav...@gm...> for work on the spanish + translation. + + * Thanks to Pierre Buard <pie...@gm...> and + <rap...@gm...> for work on the french translation. + +phantomjinx <p.g...@ph...> 2011-11-25 + + Select multiple entries in filter tabs + + * Overhaul of the filter tab plugin to separate out code and improve its + clarity. + + * Makes it easier to make the treeviews multi selectable. + + * All functionality of original sort tabs maintained - possibly a few bugs... + + FS#34 - Select more then one entity in track selection + +phantomjinx <p.g...@ph...> 2011-11-08 + + Remove obsolete workaround for gtk 2.54 + + * BROKEN_GTK_TREE_SORT is no longer necessary since required gtk version is + for gtk 3.0+ + +phantomjinx <p.g...@ph...> 2011-11-05 + + Fix for cogl errors generated by clarity plugin + + * Bug evident in clarity when plugin window is loaded but initially + obscured by other plugin windows. Making the window visible generates + cogl texture errors as the window is not completely realised by the time + the load texture functions are called. + + * All signal callbacks now check whether the window has been realized before + trying to go any further. + + * Realized signal callback added to ensure that when the window is made + visible, the current playlist is loaded. + + * g_idle_add functions used to slow down the initialisation of cogl textures + until the window has been fully realized. + +phantomjinx <p.g...@ph...> 2011-11-05 + + Updates to anjuta app and implement preference for splash screen + + * Updates anjuta-app.c to equivalent of the version in the HEAD of anjuta + repository. + + * Implements a preference for disabling the splash screen. + +phantomjinx <p.g...@ph...> 2011-11-03 + + Remove minor warnings + + * Sorts out the GtkPodSortType enum comparison warnings with GtkSortType + + * Removes unused variables + +phantomjinx <p.g...@ph...> 2011-11-01 + + Stop erroneous replay gain warning + + * Preference values try to be set before the widget sources are properly + setup. + +phantomjinx <p.g...@ph...> 2011-10-30 + + Avoid possibility of symlinks causing infinite loops + + * Possibility that when recursing directories, adding tracks, symlinks can + cause an inifinite loop leaving application unusable. + + * Remedies this possibility by logging the directories processed and + handling the targets of symlinks appropriately. + + * Fixes 2561965 - Infinite loop while adding folders with symlinks + +phantomjinx <p.g...@ph...> 2011-10-29 + + Update the progress bar when saving a database + + * file_itunesdb.c + * increments the progress bar while saving the itdb. + + Fixes 3411435 - Progress bar on copying files + +phantomjinx <p.g...@ph...> 2011-10-27 + + Mistake in updating TODOandBUGS.txt entry listed in Makefile.am + + * Should have replaced TODO.txt with TODO + +phantomjinx <p.g...@ph...> 2011-10-27 + + Not updated TODOandBUGS.txt entry listed in makefile.am + + * Should have replaced TODOandBUGS.txt with TODO.txt + +phantomjinx <p.g...@ph...> 2011-10-26 + + Update the INSTALL and TODO files. + + Brings some of the information up to date. + +phantomjinx <p.g...@ph...> 2011-10-26 + + Provide sensible sorting for adding files and directories + + * Tracks have been historically added in an arbitrary way. This attempts + to address this by sorting the filenames before adding the tracks. + + * Would be better to sort the tracks after they have been added but + catching all the added tracks is not easy so this makes a satisfactory + middle option. + + * Addresses Debian bug #547295 + +phantomjinx <p.g...@ph...> 2011-10-16 + + Add clarity plugin to po translations configuration + +phantomjinx <p.g...@ph...> 2011-10-16 + + Couple more deprecations causing compile errors + + * Functions deprecated in gtk 3.2 causing compile errors in plugins + * clarity + * cover_display + +phantomjinx <p.g...@ph...> 2011-10-16 + + Remove deprecated gtk_hpaned_new function + + * Function now deprecated in gtk 3.2 + +phantomjinx <p.g...@ph...> 2011-10-15 + + Fix the track display sorting functionality + + * plugin.c + * The tm_autostore preference has to be set in order to modify the + playlists on the ipod. Ensure this is set to TRUE by default if + not set. + + * display_tracks.c + * tm_rows_reordered was being called when the sort order signal + callback was tripped. However, this signal is fired BEFORE the + new sort order has been set so instead calling tm_rows_ordered + as an idle process ensures the signal has completed first and the + model updated. + * The sort order is correctly updated and reflected in the ipod + playlist. + + * track_display_preferences.c + * Adds a checkbox to the track display preferences so that the + tm_autostore preference can be switched on and off. + + Fixes task #83 - Carry sort order through to tracks on ipod + +phantomjinx <p.g...@ph...> 2011-10-15 + + Add multi-playlist support to context menu delete actions + + * playlist_display_context_menu.c + * When multiple playlists are selected, allow the delete actions + to delete all of them. + +phantomjinx <p.g...@ph...> 2011-10-03 + + Allow the multiple selection of playlists in the playlist view + + * Only the first selection is passed to libgtkpod and notified to + other plugins. + + * On selection of extra playlists, a reduced context menu can be + displayed, allowing for actions to be performed on the set of + playlists, notably deletion. + + Fixes:3413192 - Not obvious how to delete a playlist without selecting from + +phantomjinx <p.g...@ph...> 2011-09-25 + + Fix for fail message when initialising an ipod + + * See bug #3411223 for details + + * Rather than simply setting the entry of the set_model combo boxes, + find the actual model row containing the model string and set that + as the active iter. Ensures that if the user goes with what has + already been pre-loaded then this is in fact the active iter. + + * Seems that initing an ipod in libgpod does not set the model in the + sysinfo file so just set it here - maybe a patch to libgpod + + * Initing an ipod should also attempt to create an extended info file. + Ensures that the "No-extended" file error does not appear anymore. + +phantomjinx <p.g...@ph...> 2011-09-18 + + Conditional inclusion of DISABLE_DEPRECATED flags + + * Including DISABLE_DEPRECATED flags consistently can cause problems when + including library includes from other projects that are still using + deprecated functions. + + * To avoid this, use DISABLE_DEPRECATED flags in development and unstable + releases but avoid using them in actual releases. + + * See FS#84 at http://gtkpod.org/bugs/index.php + +phantomjinx <p.g...@ph...> 2011-09-17 + + Update git ignore to ignore generated files + +phantomjinx <p.g...@ph...> 2011-09-17 + + Should not be version controlling these generated files + +Merge: 94ece12 26bf8ba +phantomjinx <p.g...@ph...> 2011-09-12 + + Merge branch 'gtk-3.0' into clarity + + Conflicts: +version.sh + +phantomjinx <p.g...@ph...> 2011-09-11 + + Better still always check for clutter + + * Since more plugins will probably use clutter, check for it regardless but + only allow clarity if it is installed. + +phantomjinx <p.g...@ph...> 2011-09-11 + + Sort out clarity's options for building or not building + + * Seems that currently even without clutter, configure claims it will build + clarity when in fact it doesn't + +phantomjinx <p.g...@ph...> 2011-09-11 + + Update documentation with paragraph on clarity + + * Updates the coverart section of the documentation with a mention of the + clarity plugin + +phantomjinx <p.g...@ph...> 2011-09-11 + + Modify descriptions of clarity plugin + + * Make them distinguishable from the original coverart display + +phantomjinx <p.g...@ph...> 2011-09-11 + + clarity plugin file should not have been committed + +phantomjinx <p.g...@ph...> 2011-09-11 + + Implement drag n drop cover support for clarity + + * In the same way as the coverart display, using fetchcover, a jpg can be + dragged from the browser and replace the main cover in the index. + + * The dnd sends a track update signal and the tracks are all updated + accordingly. + +phantomjinx <p.g...@ph...> 2011-09-11 + + Tidy up some function and variables + + * clarity_utils.* + * Since these functions are being called externally then rename them to + the full namespace. + * Refactor the process of signalling a track update to a single function + so it can be reused. + + * clarity_canvas.c + * Change the _set_loading_complete function to the clearer + clarity_canvas_block_change + * Rename all references of ccanvas / cc to self since this is the file we + are in. + +phantomjinx <p.g...@ph...> 2011-09-10 + + Implement the updating of a track in clarity + + * If a track has been changed, clarity should react and if necessary update + the artwork cover accordingly. This may mean changing the artwork, text + or moving the track completely to a new album item. + + * AlbumItem + * data reference no longer necessary + + * clarity_canvas + * Formally defines the FLOOR constant better to understand the location + set or each cover + + * Support for shift + mouse-button-1 to select the tracks referenced by the + cover art. + +Matteo F. Vescovi <m.v...@re...> 2011-09-07 + + version.sh: update unstable builds separator + + Signed-off-by: Matteo F. Vescovi <m.v...@re...> + +phantomjinx <p.g...@ph...> 2011-09-04 + + Support for updating clarity when a track is modified + + * When a track has its meta-data changed then this should update the display + according to the correct affect of the change, eg. no effect is unrelated + to the album key, move the track to a new album etc.. + + * album_model.* + * remove_track function should not need to refind the relevant album item + when in fact it has already been found and could be passed in as a parameter + * it is not an error for the _get_index function to fail to find a key so + return -1 in an if condition rather than using g_return... + * search_for_track function simply iterates through all album items in an + attempt to find the given track. Long winded and slow but necessary if a + track has sufficiently changed to make looking it up in the index impossible + + * claritiy_canvas.c + * Need to ensure that like the remove function, the covers are refreshed. + The animate function provides this perfectly. + + * clarity_widget.c + * Separate out _add and _remove functions as both used by respective callbacks + and by the track_updated callback. + * Given we already know the album item in _remove function it is unnecessary + to find it again so pass it in as a parameter. + * Completion of track_updated callback. + +phantomjinx <p.g...@ph...> 2011-09-04 + + Update version to reflect for unstable builds + +phantomjinx <p.g...@ph...> 2011-09-04 + + Update version to reflect for unstable builds + +phantomjinx <p.g...@ph...> 2011-09-03 + + Clarity text not being cleared + + * The title and artist text actors are not being cleared by the canvas + clear functions. + +phantomjinx <p.g...@ph...> 2011-09-03 + + Mistake in track plugin default preferences + + * Wrong logic on the conditions for setting the default values of the sort + preferences. + +phantomjinx <p.g...@ph...> 2011-09-02 + + Support for track removal in Clarity + + * Handle the updating of clarity display when a track is removed from the + current playlist. Essentially removes the cover if the last track and + removes it from the album model. + + * gp_itdb.c + * Seems we are signalling track removal twice unnecessarily + + * clarity_canvas.c + * Most of the initialisation of covers is only done for the visible ones. + Not setting the position causes other covers to lie below the original + visible covers and looks odd. Set the position of all covers. + +phantomjinx <p.g...@ph...> 2011-09-01 + + Remove extraneous logging + +phantomjinx <p.g...@ph...> 2011-09-01 + + Ensure tracks are sorted before selecting + + * Highlighting the displayed tracks in clarity plugin selects the first + track in the list rather than the first track according to the sort + preference. + + * Sort the tracks first before selecting the first track. + +phantomjinx <p.g...@ph...> 2011-08-31 + + Support for clarity detecting track additions + + * album_model.* + * Changes to API adding functions for getting the index of an album item + given an album item or track. + * Include the album item index in the album_model_foreach function, + avoiding the need to the canvas to refind the index which is a potential + bottle neck. + + * clarity_canvas + * Remove the threading as serves little purpose. + * Modifications supporting canvas add album item function + + * clarity_widget + * callback for track added completed + +phantomjinx <p.g...@ph...> 2011-08-31 + + Add a reference to current playlist to clarity widget + + * Makes the widget less dependent on making calls to gtkpod_* + + * Once we have the playlist, it is important to keep it updated by + disposing it properly and removing the reference if it is removed. + +phantomjinx <p.g...@ph...> 2011-08-27 + + clarity labelling of covers + + * clarity_canvas + * Adds text labels for the track title and artist onto stage + + * Modify and implement text colour API for changing text colour. + +phantomjinx <p.g...@ph...> 2011-08-27 + + Implement clarity preferences + + * Preferences for changing background colour and artwork sorting + + * album_model.* + * Narrowing of API and tidy up + * Implementation of sort functions + + * clarity_canvas.* + * loading_complete field introduced for stopping other signal handlers + firing before the animation has completed. + +phantomjinx <p.g...@ph...> 2011-08-27 + + Cover display not disconnecting on deactivate + + * Seems that deactivating the coverart display is not disconnecting the + signal handlers. This is due to incorrect data paramter passed to + disconnect function. + +phantomjinx <p.g...@ph...> 2011-08-27 + + Allow broadcasting of all types of preference + + * gtkpod_app_iface.* + * broadcast preference changed function assumed the data type of the value + is gint. Some preferences are strings etc. so need to modify. + +phantomjinx <p.g...@ph...> 2011-08-25 + + New coverart display plugin 'clarity' + + * Display is created using clutter and clutter-gtk + + * Code ported and inspired by the gloobus flow project + see http://bazaar.launchpad.net/~gloobus-dev/gloobus-flow + + * Original coverart display code migrated but tidied up into + gobject classes rather than spaghetti of C function calls + + * TODO: + * popup menu + * drag n drop + * track added + * track removed + * track updated + * change background + * text + * set cover from file + * sort + * preferences + +phantomjinx <p.g...@ph...> 2011-08-24 + + Stop unrefing NULL album art + + * When loading covers in coverart display, we are unrefing the albumart + regardless of whether it has been loaded or whether there is any. Check + whether we actually have a reference before unrefing it. + phantomjinx <p.g...@ph...> 2011-08-06 Update NEWS and Changelog diff --git a/NEWS b/NEWS index b8a80ea..30a93c7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,56 @@ +gtkpod V2.1.1 + + Incremental release + + FEATURE: Clarity plugin for alternative display of coverart using clutter/opengl + + IMPROVEMENT: Make splash screen preference to allow it to be disabled + + IMPROVEMENT: Update core app code to align with current anjuta + + + libgtkpod + + BUGFIX: Allow broadcast of string preferences + + BUGFIX: Provide some sensible sorting of tracks when added from files / directories + + BUGFIX: Ensure progress bar is updated when saving ipod database + + BUGFIX: Avoid possibility of symlinks, when adding files, hanging gtkpod + + + Coverart Display plugin + + BUGFIX: Avoid trying to unreference NULL album art in cover art display plugin + + BUGFIX: Ensure signal handlers are disconnected on plugin deactivation + + + Track Display plugin + + BUGFIX: Fix incorrect default preferences + + BUGFIX: Ensure order of tracks in playlist is preserved on ipod + + BUGFIX: Make the track display filter case-insensitive + + + Repository Editor plugin + + BUGFIX: Fix runtime errors on getting active model iter + + + Playlist Display plugin + + IMPROVEMENT: Allow multiple selection of playlists + + + Sort Tab Display plugin + + IMPROVEMENT: Allow multiple selection of entries in filter windows + + gtkpod V2.1.0 Release for the migration to gtk 3.0 |
From: phantomjinx <pha...@us...> - 2011-11-29 00:03:31
|
commit e5621472106c0f663f350f46ca11c57280d93312 Author: phantomjinx <p.g...@ph...> Date: Mon Nov 28 23:32:15 2011 +0000 Make the track display filter case-insensitive * Text entered into the track display filter tab will find tracks not confined to same case. Fixes FS#75 - Search is case-sensitive plugins/track_display/display_tracks.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) --- diff --git a/plugins/track_display/display_tracks.c b/plugins/track_display/display_tracks.c index 095a050..ecb4e84 100644 --- a/plugins/track_display/display_tracks.c +++ b/plugins/track_display/display_tracks.c @@ -108,6 +108,7 @@ static gboolean filter_tracks(GtkTreeModel *model, GtkTreeIter *iter, gpointer e Track *tr; gboolean result = FALSE; const gchar *text = gtk_entry_get_text(GTK_ENTRY (entry)); + gchar *utext = g_utf8_casefold(text, -1); int i; gtk_tree_model_get(model, iter, READOUT_COL, &tr, -1); @@ -117,19 +118,24 @@ static gboolean filter_tracks(GtkTreeModel *model, GtkTreeIter *iter, gpointer e return TRUE; for (i = 0; i < TM_NUM_COLUMNS; i++) { gint visible = prefs_get_int_index("col_visible", i); - gchar *data; + gchar *data = NULL; + gchar *udata = NULL; if (!visible) continue; data = track_get_text(tr, TM_to_T(i)); - if (data && utf8_strcasestr(data, text)) { - g_free(data); + if (data) + udata = g_utf8_casefold(data, -1); + + if (udata && utf8_strcasestr(udata, utext)) { + g_free(udata); result = TRUE; break; } - g_free(data); + if (data) + g_free(data); } } |
From: phantomjinx <pha...@us...> - 2011-11-29 00:03:11
|
commit 5cfeb293164dfc8e85bb1f65f089b55e7f13f00b Author: phantomjinx <p.g...@ph...> Date: Tue Nov 8 21:15:20 2011 +0000 Remove obsolete workaround for gtk 2.54 * BROKEN_GTK_TREE_SORT is no longer necessary since required gtk version is for gtk 3.0+ libgtkpod/gp_private.h | 4 --- plugins/sorttab_display/display_sorttabs.c | 14 +--------- plugins/track_display/display_tracks.c | 35 ++++++--------------------- 3 files changed, 10 insertions(+), 43 deletions(-) --- diff --git a/libgtkpod/gp_private.h b/libgtkpod/gp_private.h index 3301707..e0cad55 100644 --- a/libgtkpod/gp_private.h +++ b/libgtkpod/gp_private.h @@ -36,10 +36,6 @@ #include <gtk/gtk.h> -/* tree sort cannot be unsorted by choosing the default sort - * column. Set to 1 if it's broken, 0 if it's not broken */ -#define BROKEN_GTK_TREE_SORT (!RUNTIME_GTK_CHECK_VERSION(2,5,4)) - /* Drag and drop definitions */ #define TGNR(a) (guint)(sizeof(a)/sizeof(GtkTargetEntry)) #define DND_GTKPOD_TRACKLIST_TYPE "application/gtkpod-tracklist" diff --git a/plugins/sorttab_display/display_sorttabs.c b/plugins/sorttab_display/display_sorttabs.c index 5db6f52..8497a2e 100644 --- a/plugins/sorttab_display/display_sorttabs.c +++ b/plugins/sorttab_display/display_sorttabs.c @@ -2199,12 +2199,7 @@ void st_enable_disable_view_sort(gint inst, gboolean enable) { if (prefs_get_int("st_sort") != SORT_NONE) { SortTab *st = sorttab[inst]; if (st && (st->current_category != ST_CAT_SPECIAL) && st->model) { - if (BROKEN_GTK_TREE_SORT) { - gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE (st->model), ST_COLUMN_ENTRY, st_data_compare_func, GINT_TO_POINTER(inst), NULL); - } - else { - gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (st->model), ST_COLUMN_ENTRY, prefs_get_int("st_sort")); - } + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (st->model), ST_COLUMN_ENTRY, prefs_get_int("st_sort")); } } st_enable_disable_view_sort(inst + 1, enable); @@ -2216,12 +2211,7 @@ void st_enable_disable_view_sort(gint inst, gboolean enable) { if (prefs_get_int("st_sort") != SORT_NONE) { SortTab *st = sorttab[inst]; if (st && (st->current_category != ST_CAT_SPECIAL) && st->model) { - if (BROKEN_GTK_TREE_SORT) { - gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE (st->model), ST_COLUMN_ENTRY, st_nosort_comp, NULL, NULL); - } - else { - gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (st->model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, prefs_get_int("st_sort")); - } + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (st->model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, prefs_get_int("st_sort")); } } st_enable_disable_view_sort(inst + 1, enable); diff --git a/plugins/track_display/display_tracks.c b/plugins/track_display/display_tracks.c index 57ca1f6..095a050 100644 --- a/plugins/track_display/display_tracks.c +++ b/plugins/track_display/display_tracks.c @@ -1588,17 +1588,13 @@ static void tm_unsort(void) { } prefs_set_int("tm_sort", SORT_NONE); - if (!BROKEN_GTK_TREE_SORT) { - /* no need to comment this out -- searching still works, but for lack + + /* no need to comment this out -- searching still works, but for lack of a ctrl-g only the first occurence will be found */ - /* gtk_tree_view_set_enable_search (GTK_TREE_VIEW - * (track_treeview), FALSE);*/ - gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING); - tm_adopt_order(); - } - else { - gtkpod_warning(_("Cannot unsort track view because of a bug in the GTK lib you are using (%d.%d.%d < 2.5.4). Once you sort the track view, you cannot go back to the unsorted state.\n\n"), gtk_major_version, gtk_minor_version, gtk_micro_version); - } + /* gtk_tree_view_set_enable_search (GTK_TREE_VIEW + * (track_treeview), FALSE);*/ + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING); + tm_adopt_order(); tm_sort_counter(-1); } } @@ -2236,11 +2232,6 @@ static TM_item tm_lookup_col_id(GtkTreeViewColumn *column) { return -1; } -/* Compare function to avoid sorting */ -static gint tm_nosort_comp(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) { - return 0; -} - /* Disable sorting of the view during lengthy updates. */ /* @enable: TRUE: enable, FALSE: disable */ void tm_enable_disable_view_sort(gboolean enable) { @@ -2259,12 +2250,7 @@ void tm_enable_disable_view_sort(gboolean enable) { model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(model)); } - if (BROKEN_GTK_TREE_SORT) { - gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE (model), prefs_get_int("tm_sortcol"), tm_data_compare_func, NULL, NULL); - } - else { - gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (model), prefs_get_int("tm_sortcol"), prefs_get_int("tm_sort")); - } + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (model), prefs_get_int("tm_sortcol"), prefs_get_int("tm_sort")); } } } @@ -2278,12 +2264,7 @@ void tm_enable_disable_view_sort(gboolean enable) { model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(model)); } - if (BROKEN_GTK_TREE_SORT) { - gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE (model), prefs_get_int("tm_sortcol"), tm_nosort_comp, NULL, NULL); - } - else { - gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, prefs_get_int("tm_sort")); - } + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, prefs_get_int("tm_sort")); } } disable_count++; |
From: phantomjinx <pha...@us...> - 2011-11-05 23:40:15
|
commit dd206abe4e48f098e1026e525a38b04305b6007b Author: phantomjinx <p.g...@ph...> Date: Sat Nov 5 23:11:54 2011 +0000 Fix for cogl errors generated by clarity plugin * Bug evident in clarity when plugin window is loaded but initially obscured by other plugin windows. Making the window visible generates cogl texture errors as the window is not completely realised by the time the load texture functions are called. * All signal callbacks now check whether the window has been realized before trying to go any further. * Realized signal callback added to ensure that when the window is made visible, the current playlist is loaded. * g_idle_add functions used to slow down the initialisation of cogl textures until the window has been fully realized. plugins/clarity/clarity_canvas.c | 25 ++++- plugins/clarity/clarity_widget.c | 214 ++++++++++++++++++++++++++------------ 2 files changed, 172 insertions(+), 67 deletions(-) --- diff --git a/plugins/clarity/clarity_canvas.c b/plugins/clarity/clarity_canvas.c index ba71c9c..db770c4 100644 --- a/plugins/clarity/clarity_canvas.c +++ b/plugins/clarity/clarity_canvas.c @@ -548,6 +548,16 @@ static gpointer _init_album_model(gpointer data) { return NULL; } +static gboolean _init_album_model_idle(gpointer data) { + g_return_val_if_fail(CLARITY_IS_CANVAS(data), FALSE); + + ClarityCanvas *self = CLARITY_CANVAS(data); + + _init_album_model(self); + + return FALSE; +} + void clarity_canvas_init_album_model(ClarityCanvas *self, AlbumModel *model) { g_return_if_fail(self); g_return_if_fail(model); @@ -558,8 +568,19 @@ void clarity_canvas_init_album_model(ClarityCanvas *self, AlbumModel *model) { ClarityCanvasPrivate *priv = CLARITY_CANVAS_GET_PRIVATE(self); priv->model = model; - _init_album_model(self); - + /* + * Necessary to avoid generating cogl errors in the following use case: + * 1) Load gtkpod with clarity plugin window docked in the gui but + * obscured by another plugin window. + * 2) Select a playlist. + * 3) Select the relevant toggle button to bring the clarity window to + * the front and visible. + * + * This function gets called during the realized signal callback so using + * g_idle_add lets the realized callback finish and the window display + * before loading the cogl textures. + */ + g_idle_add(_init_album_model_idle, self); } static void _clear_rotation_behaviours(GList *covers) { diff --git a/plugins/clarity/clarity_widget.c b/plugins/clarity/clarity_widget.c index 1c51f71..ad709e8 100644 --- a/plugins/clarity/clarity_widget.c +++ b/plugins/clarity/clarity_widget.c @@ -235,6 +235,132 @@ static void _set_text_color(ClarityWidget *self) { clarity_canvas_set_text_color(CLARITY_CANVAS(priv->draw_area), hex_string); } +/** + * Sort the given list of tracks based on the clarity_sort preference + */ +GList *_sort_track_list(GList *tracks) { + enum GtkPodSortTypes value = prefs_get_int("clarity_sort"); + + switch(value) { + case SORT_ASCENDING: + tracks = g_list_sort(tracks, (GCompareFunc) compare_tracks); + break; + case SORT_DESCENDING: + tracks = g_list_sort(tracks, (GCompareFunc) compare_tracks); + tracks = g_list_reverse(tracks); + break; + default: + // Do Nothing + break; + } + + return tracks; +} + +/** + * Clear the clarity canvas of all tracks and album covers + */ +static void _clarity_widget_clear(ClarityWidget *self) { + ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(self); + clarity_canvas_clear(CLARITY_CANVAS(priv->draw_area)); + album_model_clear(priv->album_model); +} + +/** + * Reload the clarity canvas with the given playlist. + */ +static void _init_clarity_with_playlist(ClarityWidget *cw, Playlist *playlist) { + if (! gtk_widget_get_realized(GTK_WIDGET(cw))) + return; + + if (cw->current_playlist == playlist) + // Should already have all these tracks displayed + return; + + _clarity_widget_clear(cw); + + cw->current_playlist = playlist; + GList *tracks = playlist->members; + if (!tracks) + return; + + ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(cw); + + album_model_add_tracks(priv->album_model, tracks); + + clarity_canvas_init_album_model(CLARITY_CANVAS(priv->draw_area), priv->album_model); + + _init_slider_range(priv); +} + +/** + * Select the given tracks in the clarity widget + */ +static void _clarity_widget_select_tracks(ClarityWidget *self, GList *tracks) { + if (! gtk_widget_get_realized(GTK_WIDGET(self))) + return; + + ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(self); + + tracks = _sort_track_list(tracks); + ClarityCanvas *ccanvas = CLARITY_CANVAS(priv->draw_area); + + if (clarity_canvas_is_blocked(ccanvas)) + return; + + gint album_index = album_model_get_index_with_track(priv->album_model, tracks->data); + gtk_range_set_value(GTK_RANGE (priv->cdslider), album_index); +} + +/** + * Select gtkpod's currently selected tracks in the clarity window. + * + * Shoudl be called from a g_idle thread. + */ +static gboolean _clarity_widget_select_tracks_idle(gpointer data) { + if (! CLARITY_IS_WIDGET(data)) + return FALSE; + + ClarityWidget *cw = CLARITY_WIDGET(data); + GList *tracks = gtkpod_get_selected_tracks(); + if (!tracks) + return FALSE; + + _clarity_widget_select_tracks(cw, tracks); + + return FALSE; +} + +/** + * Necessary callback for following use case: + * + * 1) Load gtkpod with clarity plugin window docked in the gui but + * obscured by another plugin window. + * 2) Select a playlist. + * 3) Select the relevant toggle button to bring the clarity window to + * the front and visible. + * + * Without this callback the window remains blank. + */ +static void _clarity_widget_realized_cb(GtkWidget *widget, gpointer data) { + if (! CLARITY_IS_WIDGET(widget)) + return; + + ClarityWidget *cw = CLARITY_WIDGET(widget); + Playlist *playlist = gtkpod_get_current_playlist(); + if (!playlist) + return; + + _init_clarity_with_playlist(cw, playlist); + + /* + * Needs to be an idle function that will be called + * after the idle cover addition functions called by + * _init_clarity_with_playlist. + */ + g_idle_add(_clarity_widget_select_tracks_idle, cw); +} + static void clarity_widget_class_init (ClarityWidgetClass *klass) { GObjectClass *gobject_class; @@ -298,6 +424,14 @@ static void clarity_widget_init (ClarityWidget *self) { G_CALLBACK (dnd_clarity_drag_motion), NULL); + /* + * Ensure everything is inited correctly if gtkpod is loaded with + * the clarity window is not initially visible. + */ + g_signal_connect_after(GTK_WIDGET(self), "realize", + G_CALLBACK(_clarity_widget_realized_cb), + NULL); + _init_slider_range(priv); priv->controlbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); @@ -319,27 +453,6 @@ GtkWidget *clarity_widget_new() { return GTK_WIDGET(cw); } -static void clarity_widget_clear(ClarityWidget *self) { - ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(self); - clarity_canvas_clear(CLARITY_CANVAS(priv->draw_area)); - album_model_clear(priv->album_model); -} - -static void _init_tracks(ClarityWidget *cw, GList *tracks) { - g_return_if_fail(CLARITY_IS_WIDGET(cw)); - - if (!tracks) - return; - - ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(cw); - - album_model_add_tracks(priv->album_model, tracks); - - clarity_canvas_init_album_model(CLARITY_CANVAS(priv->draw_area), priv->album_model); - - _init_slider_range(priv); -} - GdkRGBA *clarity_widget_get_background_display_color(ClarityWidget *self) { g_return_val_if_fail(CLARITY_IS_WIDGET(self), NULL); @@ -392,25 +505,13 @@ void clarity_widget_preference_changed_cb(GtkPodApp *app, gpointer pfname, gpoin void clarity_widget_playlist_selected_cb(GtkPodApp *app, gpointer pl, gpointer data) { g_return_if_fail(CLARITY_IS_WIDGET(data)); - ClarityWidget *cw = CLARITY_WIDGET(data); Playlist *playlist = (Playlist *) pl; if (!playlist) return; - if (cw->current_playlist == playlist) - // Should already have all these tracks displayed - return; - - clarity_widget_clear(cw); - - cw->current_playlist = playlist; - GList *tracks = playlist->members; - if (!tracks) - return; - - _init_tracks(cw, tracks); + _init_clarity_with_playlist(cw, playlist); } void clarity_widget_playlist_removed_cb(GtkPodApp *app, gpointer pl, gpointer data) { @@ -421,47 +522,23 @@ void clarity_widget_playlist_removed_cb(GtkPodApp *app, gpointer pl, gpointer da if (!playlist) return; - if (cw->current_playlist == playlist) - clarity_widget_clear(cw); -} - -GList *_sort_track_list(GList *tracks) { - enum GtkPodSortTypes value = prefs_get_int("clarity_sort"); - - switch(value) { - case SORT_ASCENDING: - tracks = g_list_sort(tracks, (GCompareFunc) compare_tracks); - break; - case SORT_DESCENDING: - tracks = g_list_sort(tracks, (GCompareFunc) compare_tracks); - tracks = g_list_reverse(tracks); - break; - default: - // Do Nothing - break; - } + if (! gtk_widget_get_realized(GTK_WIDGET(cw))) + return; - return tracks; + if (cw->current_playlist == playlist) + _clarity_widget_clear(cw); } void clarity_widget_tracks_selected_cb(GtkPodApp *app, gpointer tks, gpointer data) { g_return_if_fail(CLARITY_IS_WIDGET(data)); ClarityWidget *cw = CLARITY_WIDGET(data); - ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(cw); GList *tracks = g_list_copy((GList *) tks); if (!tracks) return; - tracks = _sort_track_list(tracks); - ClarityCanvas *ccanvas = CLARITY_CANVAS(priv->draw_area); - - if (clarity_canvas_is_blocked(ccanvas)) - return; - - gint album_index = album_model_get_index_with_track(priv->album_model, tracks->data); - gtk_range_set_value(GTK_RANGE (priv->cdslider), album_index); + _clarity_widget_select_tracks(cw, tracks); } static void _add_track(ClarityWidgetPrivate *priv, Track *track) { @@ -484,10 +561,12 @@ void clarity_widget_track_added_cb(GtkPodApp *app, gpointer tk, gpointer data) { ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(cw); Track *track = tk; - if (!track) return; + if (! gtk_widget_get_realized(GTK_WIDGET(cw))) + return; + GList *current_tracks = cw->current_playlist->members; if (!g_list_find(current_tracks, track)) { // Track not added to this playlist @@ -526,10 +605,12 @@ void clarity_widget_track_removed_cb(GtkPodApp *app, gpointer tk, gpointer data) ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE(cw); Track *track = tk; - if (!track) return; + if (! gtk_widget_get_realized(GTK_WIDGET(cw))) + return; + AlbumItem *item = album_model_get_item_with_track(priv->album_model, track); _remove_track(priv, item, track); @@ -545,6 +626,9 @@ void clarity_widget_track_updated_cb(GtkPodApp *app, gpointer tk, gpointer data) if (!track) return; + if (! gtk_widget_get_realized(GTK_WIDGET(cw))) + return; + ClarityCanvas *ccanvas = CLARITY_CANVAS(priv->draw_area); if (clarity_canvas_is_blocked(ccanvas)) |
From: phantomjinx <pha...@us...> - 2011-11-05 15:00:42
|
commit f671cc889de10b198d98d5f4d54cbebe237de4bb Author: phantomjinx <p.g...@ph...> Date: Sat Nov 5 14:32:55 2011 +0000 Updates to anjuta app and implement preference for splash screen * Updates anjuta-app.c to equivalent of the version in the HEAD of anjuta repository. * Implements a preference for disabling the splash screen. data/glade/core-gtkpod.xml | 245 ++++++++++++++++++++++++++++++++------------ libgtkpod/gp_itdb.c | 1 - libgtkpod/prefs.h | 2 + src/anjuta-app.c | 42 ++++++-- src/gtkpod.c | 21 +++-- 5 files changed, 227 insertions(+), 84 deletions(-) --- diff --git a/data/glade/core-gtkpod.xml b/data/glade/core-gtkpod.xml index 5c1fa24..8ed1a0c 100644 --- a/data/glade/core-gtkpod.xml +++ b/data/glade/core-gtkpod.xml @@ -1,24 +1,109 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> <requires lib="gtk+" version="2.16"/> - <!-- interface-naming-policy toplevel-contextual --> + <object class="GtkWindow" id="anjuta_preferences_window"> + <property name="can_focus">False</property> + <child> + <object class="GtkNotebook" id="General"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkVBox" id="general_page"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkFrame" id="Session"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">10</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">18</property> + <child> + <object class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">10</property> + <property name="spacing">5</property> + <child> + <object class="GtkCheckButton" id="preferences_disable_splash_screen"> + <property name="label" translatable="yes">Turn off the splash screen</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_disable_splash_screen_toggled" swapped="no"/> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Session</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + <child type="tab"> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">General</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + </object> + </child> + </object> <object class="GtkDialog" id="confirm_dialog"> + <property name="can_focus">False</property> <property name="border_width">6</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox1"> + <object class="GtkBox" id="dialog-vbox1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="spacing">1</property> <child> <object class="GtkHBox" id="hbox169"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="border_width">6</property> <property name="spacing">12</property> <child> <object class="GtkImage" id="image18"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="yalign">0</property> <property name="stock">gtk-dialog-warning</property> @@ -33,7 +118,7 @@ <child> <object class="GtkVBox" id="vbox6"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label"> @@ -56,7 +141,6 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> <property name="shadow_type">in</property> <child> <object class="GtkTreeView" id="tree"> @@ -65,22 +149,28 @@ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="headers_visible">False</property> <property name="rules_hint">True</property> - <signal name="size_allocate" handler="on_confirm_tree_size_allocate"/> + <signal name="size-allocate" handler="on_confirm_tree_size_allocate" swapped="no"/> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"/> + </child> </object> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> <child> <object class="GtkHBox" id="option_hbox"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="homogeneous">True</property> <child> <object class="GtkVBox" id="option_vbox"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <child> <placeholder/> </child> @@ -93,6 +183,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> @@ -106,6 +197,7 @@ </object> <packing> <property name="expand">False</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> @@ -121,17 +213,22 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> <packing> + <property name="expand">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area1"> + <object class="GtkButtonBox" id="dialog-action_area1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="layout_style">end</property> <child> <object class="GtkButton" id="cancel"> @@ -140,6 +237,7 @@ <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -155,6 +253,7 @@ <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -170,6 +269,7 @@ <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -181,6 +281,7 @@ </object> <packing> <property name="expand">False</property> + <property name="fill">True</property> <property name="pack_type">end</property> <property name="position">1</property> </packing> @@ -193,7 +294,52 @@ <action-widget response="-5">ok</action-widget> </action-widgets> </object> + <object class="GtkWindow" id="conversion_log"> + <property name="can_focus">False</property> + <property name="border_width">4</property> + <property name="title" translatable="yes">Conversion Progress Display</property> + <child> + <object class="GtkVBox" id="conversion_vbox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">4</property> + <child> + <object class="GtkLabel" id="label463"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">The output of the background conversion scripts is copied below. Each page of the notebook corresponds to one background thread.</property> + <property name="use_markup">True</property> + <property name="justify">center</property> + <property name="wrap">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">8</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <object class="GtkStatusbar" id="conversion_statusbar"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> <object class="GtkDialog" id="input_box"> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="border_width">5</property> <property name="resizable">False</property> @@ -202,20 +348,37 @@ <property name="destroy_with_parent">True</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox16"> + <object class="GtkBox" id="dialog-vbox16"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="orientation">vertical</property> <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area16"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="layout_style">end</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkHBox" id="hbox184"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="border_width">6</property> <property name="spacing">12</property> <child> <object class="GtkImage" id="image16"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="yalign">0</property> <property name="stock">gtk-dialog-question</property> @@ -230,12 +393,13 @@ <child> <object class="GtkVBox" id="vbox42"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="input_box_label"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="xalign">0</property> <property name="label"><span weight='bold' size='larger'>Message</span> @@ -253,13 +417,14 @@ The quick brown fox jumps over the lazy dog.</property> <child> <object class="GtkAlignment" id="alignment12"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="left_padding">12</property> <child> <object class="GtkVBox" id="vbox45"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkEntry" id="input_box_entry"> @@ -279,6 +444,7 @@ The quick brown fox jumps over the lazy dog.</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> @@ -299,65 +465,16 @@ The quick brown fox jumps over the lazy dog.</property> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> <packing> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area16"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="layout_style">end</property> - </object> - <packing> <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> - </packing> - </child> - </object> - </child> - </object> - <object class="GtkWindow" id="conversion_log"> - <property name="border_width">4</property> - <property name="title" translatable="yes">Conversion Progress Display</property> - <child> - <object class="GtkVBox" id="conversion_vbox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">4</property> - <child> - <object class="GtkLabel" id="label463"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">The output of the background conversion scripts is copied below. Each page of the notebook corresponds to one background thread.</property> - <property name="use_markup">True</property> - <property name="justify">center</property> - <property name="wrap">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="padding">8</property> - <property name="position">0</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <object class="GtkStatusbar" id="conversion_statusbar"> - <property name="visible">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="pack_type">end</property> - <property name="position">2</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> diff --git a/libgtkpod/gp_itdb.c b/libgtkpod/gp_itdb.c index 6e5d54e..da9504c 100644 --- a/libgtkpod/gp_itdb.c +++ b/libgtkpod/gp_itdb.c @@ -788,7 +788,6 @@ void gp_track_cleanup_empty_strings (Track *track) void gp_init(int argc, char *argv[]) { gchar *cfgdir; - prefs_init(argc, argv); cfgdir = prefs_get_cfgdir(); itdbs_head = g_new0 (struct itdbs_head, 1); diff --git a/libgtkpod/prefs.h b/libgtkpod/prefs.h index 585f721..ed842e3 100644 --- a/libgtkpod/prefs.h +++ b/libgtkpod/prefs.h @@ -39,6 +39,8 @@ /* End-of-list marker for variable-length lists */ #define LIST_END_MARKER "----++++----" +#define DISABLE_SPLASH_SCREEN "disable-splash-screen" + #define CONVERT_TO_MP3_SCRIPT "convert-2mp3.sh" #define CONVERT_TO_M4A_SCRIPT "convert-2m4a.sh" #define CONVERT_TO_MP4_SCRIPT "convert-2mp4.sh" diff --git a/src/anjuta-app.c b/src/anjuta-app.c index ec9d76b..ea023f2 100644 --- a/src/anjuta-app.c +++ b/src/anjuta-app.c @@ -79,7 +79,7 @@ typedef struct { gpointer user_data2; } ConfData; -void anjuta_set_ui_file_path(gchar * path) { +void anjuta_set_ui_file_path(gchar *path) { uifile = path; } @@ -697,14 +697,30 @@ void anjuta_app_layout_reset(AnjutaApp *app) { } void anjuta_app_install_preferences(AnjutaApp *app) { - gchar *img_path; - GdkPixbuf *pixbuf; - GtkWidget *notebook, *shortcuts, *plugins, *remember_plugins; - - notebook = gtk_notebook_new(); - img_path = anjuta_res_get_pixmap_file(ICON_FILE); - pixbuf = gdk_pixbuf_new_from_file(img_path, NULL); - anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG(anjuta_preferences_get_dialog(app->preferences)), "plugins", _(" Plugins"), pixbuf, notebook); + GtkBuilder* builder = gtk_builder_new(); + GError* error = NULL; + GtkWidget *notebook, *splash_toggle, *shortcuts, *plugins, *remember_plugins; + + /* Create preferences page */ + gchar *glade_path = g_build_filename(get_glade_dir(), CORE_GTKPOD_XML, NULL); + gtk_builder_add_from_file(builder, glade_path, &error); + g_free(glade_path); + if (error) { + g_warning("Could not load general preferences: %s", error->message); + g_error_free(error); + return; + } + + splash_toggle = GTK_WIDGET(gtk_builder_get_object(builder, "preferences_disable_splash_screen")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(splash_toggle), prefs_get_int(DISABLE_SPLASH_SCREEN)); + + gtk_builder_connect_signals(builder, NULL); + + gchar *icon_path = g_build_filename(get_icon_dir(), ICON_FILE, NULL); + anjuta_preferences_add_from_builder(app->preferences, builder, app->settings, "General", _("General"), ICON_FILE); + g_free(icon_path); + + notebook = GTK_WIDGET(gtk_builder_get_object(builder, "General")); shortcuts = anjuta_ui_get_accel_editor(ANJUTA_UI(app->ui)); plugins = anjuta_plugin_manager_get_plugins_page(app->plugin_manager); remember_plugins = anjuta_plugin_manager_get_remembered_plugins_page(app->plugin_manager); @@ -717,9 +733,7 @@ void anjuta_app_install_preferences(AnjutaApp *app) { gtk_notebook_append_page(GTK_NOTEBOOK (notebook), remember_plugins, gtk_label_new(_("Preferred plugins"))); gtk_notebook_append_page(GTK_NOTEBOOK (notebook), shortcuts, gtk_label_new(_("Shortcuts"))); - g_object_unref(notebook); - g_free(img_path); - g_object_unref(pixbuf); + g_object_unref(builder); } /* AnjutaShell Implementation */ @@ -1594,6 +1608,10 @@ G_MODULE_EXPORT void on_confirm_tree_size_allocate(GtkWidget *sender, GtkAllocat g_object_set(renderer, "wrap-width", allocation->width, NULL); } +G_MODULE_EXPORT void on_disable_splash_screen_toggled(GtkToggleButton *togglebutton, gpointer user_data) { + prefs_set_int(DISABLE_SPLASH_SCREEN, gtk_toggle_button_get_active(togglebutton)); +} + ANJUTA_TYPE_BEGIN(AnjutaApp, anjuta_app, GTK_TYPE_WINDOW); ANJUTA_TYPE_ADD_INTERFACE( anjuta_shell, ANJUTA_TYPE_SHELL); ANJUTA_TYPE_ADD_INTERFACE( gtkpod_app, GTKPOD_APP_TYPE); diff --git a/src/gtkpod.c b/src/gtkpod.c index ab4d381..bdc9149 100644 --- a/src/gtkpod.c +++ b/src/gtkpod.c @@ -35,6 +35,7 @@ #include "libgtkpod/gtkpod_app_iface.h" #include "libgtkpod/misc.h" #include "libgtkpod/stock_icons.h" +#include "libgtkpod/prefs.h" #include "anjuta-app.h" #define GTKPOD_REMEMBERED_PLUGINS "remembered-plugins" @@ -91,18 +92,24 @@ void gtkpod_init(int argc, char *argv[]) { app = ANJUTA_APP(anjuta_app_new()); gtkpod_app = GTKPOD_APP(app); + /* Initialise the preferences as required for the display of the splash screen */ + prefs_init(argc, argv); + /* Show some progress as the app is initialised */ status = anjuta_shell_get_status(ANJUTA_SHELL(app), NULL); anjuta_status_progress_add_ticks(status, 1); - splash = g_build_filename(get_icon_dir(), "gtkpod-splash.png", NULL); - if (g_file_test(splash, G_FILE_TEST_IS_REGULAR)) - anjuta_status_set_splash(status, splash, 100); - else { - anjuta_status_disable_splash(status, TRUE); - } + /* Show the splash screen if user requires */ + if (! prefs_get_int(DISABLE_SPLASH_SCREEN)) { + splash = g_build_filename(get_icon_dir(), "gtkpod-splash.png", NULL); + if (g_file_test(splash, G_FILE_TEST_IS_REGULAR)) + anjuta_status_set_splash(status, splash, 100); + else { + anjuta_status_disable_splash(status, TRUE); + } - g_free(splash); + g_free(splash); + } /* * initialise gtkpod library items. Needs to be safety threaded due |
From: phantomjinx <pha...@us...> - 2011-11-05 15:00:36
|
commit b8416d49ed6cf0487ef22d96014b83321905dc4d Author: phantomjinx <p.g...@ph...> Date: Thu Nov 3 20:52:57 2011 +0000 Remove minor warnings * Sorts out the GtkPodSortType enum comparison warnings with GtkSortType * Removes unused variables plugins/clarity/clarity_preview.c | 4 ---- plugins/cover_display/display_coverart.c | 6 +++--- plugins/coverweb/coverweb_preferences.c | 2 -- plugins/filetype_flac/flacfile.c | 6 ------ plugins/filetype_mp3/mp3file.c | 2 -- plugins/filetype_mp4/mp4file.c | 4 ---- plugins/playlist_display/display_playlists.c | 11 +++++++---- plugins/repository_editor/repository_editor.c | 6 +----- plugins/sorttab_display/display_sorttabs.c | 10 +++------- plugins/track_display/display_tracks.c | 12 ++++-------- plugins/track_display/rb_cell_renderer_rating.c | 4 ---- 11 files changed, 18 insertions(+), 49 deletions(-) --- diff --git a/plugins/clarity/clarity_preview.c b/plugins/clarity/clarity_preview.c index f61b3b1..1a798ec 100644 --- a/plugins/clarity/clarity_preview.c +++ b/plugins/clarity/clarity_preview.c @@ -47,10 +47,6 @@ struct _ClarityPreviewPrivate { }; static void clarity_preview_class_init(ClarityPreviewClass *klass) { - GObjectClass *gobject_class; - - gobject_class = G_OBJECT_CLASS (klass); - g_type_class_add_private(klass, sizeof(ClarityPreviewPrivate)); } diff --git a/plugins/cover_display/display_coverart.c b/plugins/cover_display/display_coverart.c index 6e08fb9..f981817 100644 --- a/plugins/cover_display/display_coverart.c +++ b/plugins/cover_display/display_coverart.c @@ -71,7 +71,7 @@ static gboolean dnd_coverart_drag_motion(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint time, gpointer user_data); static void set_cover_dimensions(Cover_Item *cover, int cover_index, gdouble img_width, gdouble img_height); -static void coverart_sort_images(GtkSortType order); +static void coverart_sort_images(enum GtkPodSortTypes order); static void set_slider_range(gint index); static GdkRGBA *convert_hexstring_to_rgba(const gchar *hexstring); static gboolean on_drawing_area_drawn(GtkWidget *draw_area, cairo_t *cairo_draw_context, gpointer data); @@ -1565,7 +1565,7 @@ static gint compare_album_keys(gchar *a, gchar *b) { * @order: order type * */ -static void coverart_sort_images(GtkSortType order) { +static void coverart_sort_images(enum GtkPodSortTypes order) { if (order == SORT_NONE) { /* No sorting means original order so this should have been called after a coverart_display_update (TRUE) * when the TRUE means the tracks were freshly established from the playlist and the hash and key_list @@ -1577,7 +1577,7 @@ static void coverart_sort_images(GtkSortType order) { album_key_list = g_list_sort(album_key_list, (GCompareFunc) compare_album_keys); } - if (order == GTK_SORT_DESCENDING) { + if (order == SORT_DESCENDING) { album_key_list = g_list_reverse(album_key_list); } } diff --git a/plugins/coverweb/coverweb_preferences.c b/plugins/coverweb/coverweb_preferences.c index 5552427..3f85502 100644 --- a/plugins/coverweb/coverweb_preferences.c +++ b/plugins/coverweb/coverweb_preferences.c @@ -90,13 +90,11 @@ static gboolean tree_get_current_iter (GtkTreeView *view, GtkTreeIter *iter) static void save_bookmarks_preferences() { g_return_if_fail(bookmarks_view); GtkTreeModel *model; - GtkListStore *store; GtkTreeIter iter; gint row = 0; gboolean valid; model = gtk_tree_view_get_model (GTK_TREE_VIEW(bookmarks_view)); - store = GTK_LIST_STORE(model); valid = gtk_tree_model_get_iter_first (model, &iter); while (valid) { diff --git a/plugins/filetype_flac/flacfile.c b/plugins/filetype_flac/flacfile.c index fc72411..87be12b 100644 --- a/plugins/filetype_flac/flacfile.c +++ b/plugins/filetype_flac/flacfile.c @@ -59,8 +59,6 @@ Track *flac_get_file_info(const gchar *flacFileName, GError **error) { g_free(filename); } else { - gboolean flac_metadata_ok = FALSE; - track = gp_track_new(); track->mediatype = ITDB_MEDIATYPE_AUDIO; @@ -74,10 +72,6 @@ Track *flac_get_file_info(const gchar *flacFileName, GError **error) { else { gint i; - if (tags->data.vorbis_comment.num_comments > 0) { - flac_metadata_ok = TRUE; - } - for (i = 0; i < tags->data.vorbis_comment.num_comments; i++) { gchar *tag = (gchar*) tags->data.vorbis_comment.comments[i].entry; diff --git a/plugins/filetype_mp3/mp3file.c b/plugins/filetype_mp3/mp3file.c index 955474c..2e2bffe 100644 --- a/plugins/filetype_mp3/mp3file.c +++ b/plugins/filetype_mp3/mp3file.c @@ -423,13 +423,11 @@ void get_mp3_info(MP3Info *mp3) { gint counter = 0; MP3Header header; struct stat filestat; - off_t data_start = 0; stat(mp3->filename, &filestat); mp3->datasize = filestat.st_size; if (get_first_header(mp3, 0L)) { - data_start = ftell(mp3->file); while ((bitrate = get_next_header(mp3))) { if (bitrate < 15) /* sanity added by JCS */ frame_type[15 - bitrate]++; diff --git a/plugins/filetype_mp4/mp4file.c b/plugins/filetype_mp4/mp4file.c index 731007d..b18a513 100644 --- a/plugins/filetype_mp4/mp4file.c +++ b/plugins/filetype_mp4/mp4file.c @@ -451,7 +451,6 @@ static gboolean mp4_get_apple_uint8_property(MP4FileHandle hFile, const char* pr u_int8_t *value; guint32 valuelen; guint32 class_flag; - guint8 atom_version; gboolean success = FALSE; success = MP4GetBytesProperty(hFile, propName, &value, &valuelen); @@ -461,7 +460,6 @@ static gboolean mp4_get_apple_uint8_property(MP4FileHandle hFile, const char* pr pos += 8; /* Skip over the length and the atom name */ /* pos now points to a 1-byte atom version followed by a 3-byte class/flag field */ - atom_version = *pos; class_flag = GUINT32_FROM_BE(*(guint32*)pos) & 0x00ffffff; if (class_flag == 21 || class_flag == 0) { pos += 4; /* Skip over the atom version and class/flag */ @@ -481,7 +479,6 @@ static gboolean mp4_get_apple_text_property(MP4FileHandle hFile, const char* pro u_int8_t *value; guint32 valuelen; guint32 class_flag; - guint8 atom_version; gboolean success = FALSE; success = MP4GetBytesProperty(hFile, propName, &value, &valuelen); @@ -490,7 +487,6 @@ static gboolean mp4_get_apple_text_property(MP4FileHandle hFile, const char* pro pos = value; pos += 8; /* Skip over the length and the atom name */ /* pos now points to a 1-byte atom version followed by a 3-byte class/flag field */ - atom_version = *pos; class_flag = GUINT32_FROM_BE(*(guint32*)pos) & 0x00ffffff; if (class_flag == 1) { pos += 4; /* Skip over the atom version and class/flag */ diff --git a/plugins/playlist_display/display_playlists.c b/plugins/playlist_display/display_playlists.c index 208ad91..e13c579 100644 --- a/plugins/playlist_display/display_playlists.c +++ b/plugins/playlist_display/display_playlists.c @@ -1376,7 +1376,7 @@ static void pm_unsort() { } /* Set the sorting accordingly */ -void pm_sort(GtkSortType order) { +void pm_sort(enum GtkPodSortTypes order) { GtkTreeModel *model = gtk_tree_view_get_model(playlist_treeview); g_return_if_fail (model); if (order != SORT_NONE) { @@ -1468,16 +1468,19 @@ void pm_rows_reordered(void) { gint pm_data_compare_func(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) { Playlist *playlist1 = NULL; Playlist *playlist2 = NULL; - GtkSortType order; + enum GtkPodSortTypes order; gint corr, colid; g_return_val_if_fail (model, 0); g_return_val_if_fail (a, 0); g_return_val_if_fail (b, 0); - if (gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE (model), &colid, &order) == FALSE) + GtkSortType sortorder; + if (gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE (model), &colid, &sortorder) == FALSE) return 0; + order = (enum GtkPodSortTypes) sortorder; + if (order == SORT_NONE) return 0; @@ -1487,7 +1490,7 @@ gint pm_data_compare_func(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, g g_return_val_if_fail (playlist1 && playlist2, 0); /* We make sure that the master playlist always stays on top */ - if (order == GTK_SORT_ASCENDING) + if (order == SORT_ASCENDING) corr = +1; else corr = -1; diff --git a/plugins/repository_editor/repository_editor.c b/plugins/repository_editor/repository_editor.c index 51fca5e..097a3fb 100644 --- a/plugins/repository_editor/repository_editor.c +++ b/plugins/repository_editor/repository_editor.c @@ -351,7 +351,7 @@ gchar *fileselection_select_script(const gchar *opath, const gchar *fallback, co /* Render apply insensitive when no changes were made. When an itdb is marked for deletion, make entries insensitive */ static void update_buttons() { - gboolean apply, ok, deleted; + gboolean apply, deleted; gchar *key; g_return_if_fail (repository_view); @@ -360,11 +360,9 @@ static void update_buttons() { if ((temp_prefs_size(repository_view->temp_prefs) > 0) || (temp_prefs_size(repository_view->extra_prefs) > 0)) { apply = TRUE; - ok = TRUE; } else { apply = FALSE; - ok = TRUE; } gtk_widget_set_sensitive(GET_WIDGET (repository_view->builder, APPLY_BUTTON), apply); @@ -1208,7 +1206,6 @@ static void display_repository_info() { static void display_playlist_info() { gchar *buf, *key; Playlist *playlist; - iTunesDB *itdb; gint i, index; const gchar *widget_names[] = { @@ -1230,7 +1227,6 @@ static void display_playlist_info() { g_return_if_fail (repository_view->playlist); /* for convenience */ - itdb = repository_view->itdb; index = repository_view->itdb_index; playlist = repository_view->playlist; diff --git a/plugins/sorttab_display/display_sorttabs.c b/plugins/sorttab_display/display_sorttabs.c index 72b4524..5db6f52 100644 --- a/plugins/sorttab_display/display_sorttabs.c +++ b/plugins/sorttab_display/display_sorttabs.c @@ -374,13 +374,11 @@ static TimeInfo *sp_get_timeinfo_ptr(guint32 inst, T_item item) { /* Return value: pointer to the corresponding TimeInfo struct (for convenience) or NULL if error occurred */ static TimeInfo *sp_update_date_interval_from_string(guint32 inst, T_item item, gboolean force_update) { - SortTab *st; TimeInfo *ti; if (inst >= SORT_TAB_MAX) return NULL; - st = sorttab[inst]; ti = sp_get_timeinfo_ptr(inst, item); if (ti) { @@ -1059,7 +1057,7 @@ static void st_free_entry_cb(gpointer data, gpointer user_data) { void st_remove_all_entries_from_model(guint32 inst) { SortTab *st = sorttab[inst]; gint column; - enum GtkPodSortTypes order; + GtkSortType sortorder; if (st) { if (st->current_entry) { @@ -1079,7 +1077,7 @@ void st_remove_all_entries_from_model(guint32 inst) { st->entry_hash = NULL; if ((prefs_get_int("st_sort") == SORT_NONE) - && gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE (st->model), &column, &order)) { /* recreate track treeview to unset sorted column */ + && gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE (st->model), &column, &sortorder)) { /* recreate track treeview to unset sorted column */ if (column >= 0) { st_create_notebook(inst); } @@ -1751,7 +1749,7 @@ void st_redisplay(guint32 inst) { } /* Start sorting */ -static void st_sort_inst(guint32 inst, GtkSortType order) { +static void st_sort_inst(guint32 inst, enum GtkPodSortTypes order) { if (inst < prefs_get_int("sort_tab_num")) { SortTab *st = sorttab[inst]; if (st) { @@ -3223,7 +3221,6 @@ void cal_open_calendar(gint inst, T_item item) { /* return value: -1: user selected cancel 0...prefs_get_sort_tab_number()-1: selected tab */ gint st_get_sort_tab_number(gchar *text) { - static gint last_nr = 1; GtkWidget *mdialog; GtkDialog *dialog; GtkWidget *combo; @@ -3276,7 +3273,6 @@ gint st_get_sort_tab_number(gchar *text) { gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &bufp, -1); if (bufp) { nr = atoi(bufp) - 1; - last_nr = nr + 1; g_free(bufp); } else { nr = -1; /* selection failed */ diff --git a/plugins/track_display/display_tracks.c b/plugins/track_display/display_tracks.c index ad69b22..57ca1f6 100644 --- a/plugins/track_display/display_tracks.c +++ b/plugins/track_display/display_tracks.c @@ -369,7 +369,6 @@ static void tm_drag_leave(GtkWidget *widget, GdkDragContext *dc, guint time, gpo } static gboolean tm_drag_motion(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint time, gpointer user_data) { - GtkTreeView *treeview; GdkAtom target; GtkTreePath *path = NULL; GtkTreeViewDropPosition pos; @@ -383,8 +382,6 @@ static gboolean tm_drag_motion(GtkWidget *widget, GdkDragContext *dc, gint x, gi g_return_val_if_fail (GTK_IS_TREE_VIEW (widget), FALSE); - treeview = GTK_TREE_VIEW (widget); - gp_install_autoscroll_row_timeout(widget); itdb = gp_get_selected_itdb(); @@ -486,7 +483,6 @@ static void tm_drag_data_received(GtkWidget *widget, GdkDragContext *dc, gint x, GtkTreePath *path = NULL; GtkTreeModel *model = NULL; GtkTreeViewDropPosition pos = 0; - gboolean result = FALSE; /* printf ("sm drop received info: %d\n", info); */ @@ -543,12 +539,12 @@ static void tm_drag_data_received(GtkWidget *widget, GdkDragContext *dc, gint x, switch (info) { case DND_GTKPOD_TM_PATHLIST: g_return_if_fail (path); - result = tm_move_pathlist(data_copy, path, pos); + tm_move_pathlist(data_copy, path, pos); gdk_drag_status(dc, GDK_ACTION_MOVE, time); gtk_drag_finish(dc, TRUE, FALSE, time); break; case DND_TEXT_PLAIN: - result = tm_add_filelist(data_copy, path, pos); + tm_add_filelist(data_copy, path, pos); gdk_drag_status(dc, gdk_drag_context_get_suggested_action(dc), time); if (gdk_drag_context_get_selected_action(dc) == GDK_ACTION_MOVE) gtk_drag_finish(dc, TRUE, TRUE, time); @@ -556,7 +552,7 @@ static void tm_drag_data_received(GtkWidget *widget, GdkDragContext *dc, gint x, gtk_drag_finish(dc, TRUE, FALSE, time); break; case DND_TEXT_URI_LIST: - result = tm_add_filelist(data_copy, path, pos); + tm_add_filelist(data_copy, path, pos); gdk_drag_status(dc, gdk_drag_context_get_suggested_action(dc), time); if (gdk_drag_context_get_selected_action(dc) == GDK_ACTION_MOVE) gtk_drag_finish(dc, TRUE, TRUE, time); @@ -1746,7 +1742,7 @@ static void tm_sort_column_changed(GtkTreeSortable *ts, gpointer user_data) { g_list_free(tracks); } -void tm_sort(TM_item col, GtkSortType order) { +void tm_sort(TM_item col, enum GtkPodSortTypes order) { if (track_treeview) { GtkTreeModel *model = gtk_tree_view_get_model(track_treeview); diff --git a/plugins/track_display/rb_cell_renderer_rating.c b/plugins/track_display/rb_cell_renderer_rating.c index 183e3d7..7d9bd2a 100644 --- a/plugins/track_display/rb_cell_renderer_rating.c +++ b/plugins/track_display/rb_cell_renderer_rating.c @@ -183,10 +183,6 @@ rb_cell_renderer_rating_class_init (RBCellRendererRatingClass *class) static void rb_cell_renderer_rating_finalize (GObject *object) { - RBCellRendererRating *cellrating; - - cellrating = RB_CELL_RENDERER_RATING (object); - G_OBJECT_CLASS (rb_cell_renderer_rating_parent_class)->finalize (object); } |
From: phantomjinx <pha...@us...> - 2011-11-05 15:00:29
|
commit 6698a9db34e11fdedc78445e309c61d0dc33f38a Author: phantomjinx <p.g...@ph...> Date: Tue Nov 1 21:45:46 2011 +0000 Stop erroneous replay gain warning * Preference values try to be set before the widget sources are properly setup. plugins/core_preferences/core_prefs.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- diff --git a/plugins/core_preferences/core_prefs.c b/plugins/core_preferences/core_prefs.c index e1a0303..ced4e3c 100644 --- a/plugins/core_preferences/core_prefs.c +++ b/plugins/core_preferences/core_prefs.c @@ -489,11 +489,12 @@ static void cmd_setup_widget(const gchar *entry_name, const gchar *envname, cons if (!temp) { temp = g_strdup(""); } - gtk_entry_set_text(GTK_ENTRY (entry), temp); - g_free(temp); g_object_set_data(G_OBJECT (entry), "envname", (gpointer) envname); g_object_set_data(G_OBJECT (gtk_builder_get_object(builder, browse_name)), "entry", entry); + + gtk_entry_set_text(GTK_ENTRY (entry), temp); + g_free(temp); } /* @@ -517,7 +518,6 @@ G_MODULE_EXPORT void on_normalization_clicked(GtkButton *sender, gpointer e) { */ G_MODULE_EXPORT void on_cmd_entry_changed(GtkEditable *sender, gpointer e) { const gchar *envname = g_object_get_data(G_OBJECT (sender), "envname"); - prefs_set_string(envname, gtk_entry_get_text(GTK_ENTRY (sender))); } |
From: phantomjinx <pha...@us...> - 2011-10-30 20:55:32
|
commit 22fa09fcf9ba0974db3e6ea041237be73eed3308 Author: phantomjinx <p.g...@ph...> Date: Sun Oct 30 20:16:34 2011 +0000 Avoid possibility of symlinks causing infinite loops * Possibility that when recursing directories, adding tracks, symlinks can cause an inifinite loop leaving application unusable. * Remedies this possibility by logging the directories processed and handling the targets of symlinks appropriately. * Fixes 2561965 - Infinite loop while adding folders with symlinks libgtkpod/file.c | 45 +++++++++++++++++++++++++++++++++-- libgtkpod/misc.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ libgtkpod/misc.h | 3 ++ 3 files changed, 113 insertions(+), 3 deletions(-) --- diff --git a/libgtkpod/file.c b/libgtkpod/file.c index caa431b..6551145 100644 --- a/libgtkpod/file.c +++ b/libgtkpod/file.c @@ -393,7 +393,10 @@ GSList* sort_tracknames_list(GSList *names) { * * \*------------------------------------------------------------------*/ -static void recurse_directories(gchar *name, GSList **trknames, gboolean descend) { +/* + * Internal function called by recurse_directories_with_history + */ +static void recurse_directories_internal(gchar *name, GSList **trknames, gboolean descend, GHashTable **directories_seen) { if (g_file_test(name, G_FILE_TEST_IS_DIR)) { GDir *dir = g_dir_open(name, 0, NULL); if (dir != NULL) { @@ -402,8 +405,28 @@ static void recurse_directories(gchar *name, GSList **trknames, gboolean descend next = g_dir_read_name(dir); if (next != NULL) { gchar *nextfull = g_build_filename(name, next, NULL); + + if (g_file_test(nextfull, G_FILE_TEST_IS_SYMLINK)) { + /* + * Need to check symlinks don't point to another directory that + * we have already dealt with, avoiding infinite loops. + */ + gchar* basepath = convert_symlink_to_absolute_path(name, nextfull); + if (!basepath) { + g_free(nextfull); + return; + } + + nextfull = basepath; + } + + if (g_hash_table_lookup(*directories_seen, nextfull)) + continue; + else + g_hash_table_insert(*directories_seen, nextfull, nextfull); + if (descend || !g_file_test(nextfull, G_FILE_TEST_IS_DIR)) { - recurse_directories(nextfull, trknames, descend); + recurse_directories_internal(nextfull, trknames, descend, directories_seen); } g_free(nextfull); } @@ -418,6 +441,22 @@ static void recurse_directories(gchar *name, GSList **trknames, gboolean descend } } +/* + * Recurse directories from @dir, adding filenames to @trknames. + * + * To avoid infinite loops due to symlinks, a directories hash is + * used to record visited sub-directories. + * + * @dir: root directory from which to retrieve filenames + * @trknames: list populated with filenames + * @descend: TRUE: add recursively + * FALSE: don't enter subdirectories + */ +static void recurse_directories_with_history(gchar *dir, GSList **trknames, gboolean descend) { + GHashTable *directories = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); + recurse_directories_internal(dir, trknames, descend, &directories); + g_hash_table_destroy(directories); +} /* * Add all files in directory and subdirectories. @@ -446,7 +485,7 @@ gint add_directory_by_name(iTunesDB *itdb, gchar *name, Playlist *plitem, gboole block_widgets(); - recurse_directories(name, &trknames, descend); + recurse_directories_with_history(name, &trknames, descend); trknames = sort_tracknames_list(trknames); diff --git a/libgtkpod/misc.c b/libgtkpod/misc.c index bd5b757..8cb260b 100644 --- a/libgtkpod/misc.c +++ b/libgtkpod/misc.c @@ -1804,3 +1804,71 @@ void gtkpod_shutdown() { call_script("gtkpod.out", NULL); } +/** + * Convert the relative path @relpath to an absolute path using + * @basepath as the basis for deriving the new path. + * + * Essentially, removes any '.' and '..' from the relative path then + * concatenates the remaining path to the base path. + * + */ +gchar *convert_relative_to_absolute_path(gchar *basepath, gchar *relpath) { + if (g_path_is_absolute(relpath)) + return relpath; + + gchar *currdir = g_strconcat(".", G_DIR_SEPARATOR_S, NULL); + gchar *parentdir = g_strconcat("..", G_DIR_SEPARATOR_S, NULL); + gchar *abspath = NULL; + gchar *relsubpath = NULL; + + if (g_str_has_prefix(relpath, currdir)) { + if (strlen(relpath) > strlen(currdir)) { + relsubpath = relpath + strlen (currdir); + abspath = convert_relative_to_absolute_path(basepath, relsubpath); + } + else + abspath = basepath; + } + else if(g_str_has_prefix(relpath, parentdir)) { + gchar *baseparent = g_path_get_dirname(basepath); + + if (strlen(relpath) > strlen(parentdir)) { + relsubpath = relpath + strlen (parentdir); + abspath = convert_relative_to_absolute_path(baseparent, relsubpath); + } + else { + abspath = baseparent; + } + + g_free(baseparent); + } + else { + abspath = g_build_filename(basepath, relpath, NULL); + } + + g_free(parentdir); + g_free(currdir); + + return abspath; +} + +/** + * Reads the target of a symlink and returns the appropriate path. + * + * If the target is absolute then this is returned. + * + * If the target is relative then an absolute path derived from @basepath + * is returned. + * + */ +gchar *convert_symlink_to_absolute_path(gchar *basepath, gchar *symlink) { + gchar *sympath = g_file_read_link(symlink, NULL); + if (!sympath) + return NULL; + + if (g_path_is_absolute(sympath)) + return sympath; + else + return convert_relative_to_absolute_path(basepath, sympath); +} + diff --git a/libgtkpod/misc.h b/libgtkpod/misc.h index 8455ef1..ab3ba61 100644 --- a/libgtkpod/misc.h +++ b/libgtkpod/misc.h @@ -229,4 +229,7 @@ void message_sb_no_ipod_itdb_selected (); void gtkpod_shutdown (); +gchar *convert_relative_to_absolute_path(gchar *basepath, gchar *relpath); +gchar *convert_symlink_to_absolute_path(gchar *basepath, gchar *symlink); + #endif |
From: phantomjinx <pha...@us...> - 2011-10-30 20:55:26
|
commit 9b0e21fb9601cb93454bf43ce8572a7ede99f6f1 Author: phantomjinx <p.g...@ph...> Date: Sat Oct 29 00:02:54 2011 +0100 Update the progress bar when saving a database * file_itunesdb.c * increments the progress bar while saving the itdb. Fixes 3411435 - Progress bar on copying files libgtkpod/file_itunesdb.c | 32 +++++++++++++++++++++++++++----- libgtkpod/gtkpod_app_iface.c | 4 ++++ 2 files changed, 31 insertions(+), 5 deletions(-) --- diff --git a/libgtkpod/file_itunesdb.c b/libgtkpod/file_itunesdb.c index 767cf4c..28cc997 100644 --- a/libgtkpod/file_itunesdb.c +++ b/libgtkpod/file_itunesdb.c @@ -1583,6 +1583,7 @@ static gboolean transfer_tracks(iTunesDB *itdb, TransferData *td) { static gboolean gp_write_itdb(iTunesDB *itdb) { gchar *cfgdir; gboolean success = TRUE; + gchar *statusmsg = NULL; ExtraiTunesDBData *eitdb; Playlist *mpl; TransferData *transferdata; @@ -1641,7 +1642,6 @@ static gboolean gp_write_itdb(iTunesDB *itdb) { block_widgets(); transferdata = transfer_data_new(); - gtkpod_statusbar_reset_progress(100); if ((itdb->usertype & GP_ITDB_TYPE_IPOD) && !get_offline(itdb)) { const gchar *mountpoint = itdb_get_mountpoint(itdb); @@ -1671,11 +1671,15 @@ static gboolean gp_write_itdb(iTunesDB *itdb) { success = delete_files(itdb, transferdata); } - if (success) { - gtkpod_statusbar_message(_("Now writing database '%s'. Please wait..."), mpl->name); + while (widgets_blocked && gtk_events_pending()) + gtk_main_iteration(); - while (widgets_blocked && gtk_events_pending()) - gtk_main_iteration(); + statusmsg = g_strdup_printf(_("Now writing database '%s'. Please wait..."), mpl->name); + gtkpod_statusbar_reset_progress(100); + + if (success) { + /* Removed deleted files and transferred tracks */ + gtkpod_statusbar_increment_progress_ticks(50, statusmsg); } for (it = itdb->tracks; it != NULL; it = it->next) { @@ -1767,6 +1771,11 @@ static gboolean gp_write_itdb(iTunesDB *itdb) { } } + if (success) { + /* Written database now write extended info */ + gtkpod_statusbar_increment_progress_ticks(30, statusmsg); + } + if (success && get_offline(itdb) && (itdb->usertype & GP_ITDB_TYPE_IPOD)) { /* write to cfgdir */ GError *error = NULL; if (!itdb_write_file(itdb, eitdb->offline_filename, &error)) { /* an error occurred */ @@ -1803,6 +1812,11 @@ static gboolean gp_write_itdb(iTunesDB *itdb) { gp_track_validate_entries((Itdb_Track *) it->data); } + if (success) { + /* Written extended info now write photo db */ + gtkpod_statusbar_increment_progress_ticks(10, statusmsg); + } + /* If the ipod supports photos and the photo_data_changed * flag has been set to true then wrtie the photo database */ @@ -1821,6 +1835,14 @@ static gboolean gp_write_itdb(iTunesDB *itdb) { } } + if (success) { + /* Everything done saving */ + gtkpod_statusbar_increment_progress_ticks(10, statusmsg); + } + + if (statusmsg) + g_free(statusmsg); + /* indicate that files and/or database is saved */ if (success) { data_unchanged(itdb); diff --git a/libgtkpod/gtkpod_app_iface.c b/libgtkpod/gtkpod_app_iface.c index 6c579e1..d0af9fc 100644 --- a/libgtkpod/gtkpod_app_iface.c +++ b/libgtkpod/gtkpod_app_iface.c @@ -179,6 +179,10 @@ void gtkpod_statusbar_reset_progress(gint total) { GTKPOD_APP_GET_INTERFACE (gtkpod_app)->statusbar_reset_progress(gtkpod_app, total); } +/** + * Increments the current progress bar value by the + * given number of ticks. + */ void gtkpod_statusbar_increment_progress_ticks(gint ticks, gchar* text) { g_return_if_fail (GTKPOD_IS_APP(gtkpod_app)); GTKPOD_APP_GET_INTERFACE (gtkpod_app)->statusbar_increment_progress_ticks(gtkpod_app, ticks, text); |
From: phantomjinx <pha...@us...> - 2011-10-30 20:55:19
|
commit fa2367ee4f5ddfdcbf5c86610b7f593a1546ab15 Author: phantomjinx <p.g...@ph...> Date: Thu Oct 27 21:46:01 2011 +0100 Mistake in updating TODOandBUGS.txt entry listed in Makefile.am * Should have replaced TODO.txt with TODO Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff --git a/Makefile.am b/Makefile.am index 2cbddd5..a27457d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ EXTRA_DIST = \ intltool-merge.in \ intltool-update.in \ TROUBLESHOOTING \ - TODO.txt \ + TODO \ libgtkpod-1.1.0.pc.in \ version.sh \ version |
From: phantomjinx <pha...@us...> - 2011-10-27 20:28:39
|
commit 066934e2ec7eed3a60b95c0c25f4fbf8dcd91912 Author: phantomjinx <p.g...@ph...> Date: Thu Oct 27 21:27:47 2011 +0100 Not updated TODOandBUGS.txt entry listed in makefile.am * Should have replaced TODOandBUGS.txt with TODO.txt Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff --git a/Makefile.am b/Makefile.am index d0c88d2..2cbddd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ EXTRA_DIST = \ intltool-merge.in \ intltool-update.in \ TROUBLESHOOTING \ - TODOandBUGS.txt \ + TODO.txt \ libgtkpod-1.1.0.pc.in \ version.sh \ version |
From: phantomjinx <pha...@us...> - 2011-10-26 21:25:59
|
commit 2ee430e28a55f8458c49b6e9905112bda5f251d4 Author: phantomjinx <p.g...@ph...> Date: Wed Oct 26 22:25:00 2011 +0100 Update the INSTALL and TODO files. Brings some of the information up to date. INSTALL | 122 +++++++++---- TODO | 541 ++++++++++++++++++++++++++++++++++++++++++++----------- TODOandBUGS.txt | 446 --------------------------------------------- 3 files changed, 517 insertions(+), 592 deletions(-) --- diff --git a/INSTALL b/INSTALL index 268bf09..70fee14 100644 --- a/INSTALL +++ b/INSTALL @@ -12,51 +12,96 @@ How to compile/install gtkpod: project (http://sourceforge.net/projects/mad/). Starting with version 0.96 gtkpod is using the gpod library. - libgpod should soon be available as a standard package for major + libgpod is available as a standard package for major Linux distributions. You can also install the library from source. Download instructions for the tarball or development snapshot can be found at http://www.gtkpod.org/libgpod.html - The libmp4v2 package is ONLY NEEDED if you need AAC support. You - don't need libmp4v2 if you don't use AAC files. Download's - available at - - http://downloads.sourceforge.net/mpeg4ip/ - (http://downloads.sourceforge.net/mpeg4ip/mpeg4ip-1.6.tar.gz) - - libid3tag was successfully compiled and installed with - - ./configure ; make ; make install - - libmp4v2 was successfully compiled and installed with - - ./bootstrap --disable-server ; make ; make install - - The following packages are required for building gtkpod: autoconf (at least 2.55) flex (or lex) gettext - glib (at least 2.8.0) - gtk+ (at least 2.8.0) - libglade (at least 2.4.0) + glib + gtk+ (gtk2 for the 2.0.x stream / gtk3 for the 2.1.0+ stream) libgpod (at least 0.6.1) + libgdl + anjuta libid3tag (at least 0.15) - perl XML::Parser module - anjuta (at least 2.30) - pkgconfig - - Optional packages: - - libcurl (for coverart download support) - libflac (for FLAC support) - libgnome-vfs-2.0 >2.6 (for iPod autodetection under GNOME) - libhal >0.5 <0.6 (in combination with libgnome-vfs: better detection of iPods) - libmp4v2 (for AAC/M4A support) - libvorbis (for ogg libvorbis support) - libwebkit >=1.1 (for coverart web browse support) - + libgnome-vfs-2.0 > 2.6 (for iPod autodetection under GNOME) + libhal > 0.5 < 0.6 (in combination with libgnome-vfs: better detection of iPods) + + Optional Packages + + For web browser plugin: + webkitgtk (version 1 or 3 depending on version of gtk) + + For audio player plugin: + gstreamer + gstreamer-plugins (plugins to support mp3 / mp4 playback) + + For filetype conversion: + flac + libogg + libvorbis + lame + libmp4v2 + faad2 + + For opengl coverart display (clarity) plugin: + clutter-gtk + + For download of coverart: + libcurl + + The following can be used for installing the dependencies on ubuntu 11.10: + + apt-get groupinstall Development\ Tools + + apt-get install \ + libwebkitgtk-3.0-dev \ + gstreamer0.10-plugins-base \ + gstreamer0.10-plugins-good \ + libgstreamer-plugins-base0.10-dev \ + libgstreamer0.10-dev \ + gstreamer0.10-plugins-bad-multiverse \ + gstreamer0.10-ffmpeg \ + gstreamer0.10-plugins-bad \ + gstreamer0.10-plugins-ugly \ + libflac-dev \ + libogg-dev \ + libvorbis-dev \ + libmp3lame-dev \ + libmp4v2-dev \ + libclutter-gtk-1.0-dev \ + libgpod-dev \ + libanjuta-dev \ + libgdl-3-dev \ + libid3tag0-dev + faad \ + libcurl3 + + The following can be used for installing the dependencies on fedora 15: + + yum groupinstall Development\ Tools + yum install \ + webkitgtk3-devel \ + gstreamer-devel.i686 \ + gstreamer-plugins-bad-free-devel.i686 \ + gstreamer-plugins-base-devel.i686 \ + gstreamer-plugins-good.i686 \ + flac-devel.i686 \ + libogg-devel.i686 \ + libvorbis-devel.i686 \ + lame-devel.i686 \ + libmp4v2-devel.i686 \ + clutter-gtk-devel.i686 \ + libpod-devel \ + anjuta-devel \ + libgdl-devel \ + libid3tag-devel \ + faad2 \ + curl 2. If you install libraries to /usr/local/lib please don't forget to add the path to LD_LIBRARY_PATH and PKG_CONFIG_PATH @@ -107,22 +152,21 @@ How to compile/install gtkpod: ** Note that you do not need to accept the default (usually /usr/local) install path when you compile and install the software. You may choose to install the software in a different location. - For example, with libid3tag and libmp4v2 in a non-standard + For example, with libid3tag in a non-standard location, outside the $PATH and the usual build environment, you need to configure the build of gtkpod appropriately. You need to set a CFLAGS variable during the 'configure' that sets the -I and -L flags correctly. - As a practical example, let's say the libmp4v2 software was - installed in $HOME/Applications/mpeg4ip and the libid3tag software + As a practical example, let's say the libid3tag software was installed in $HOME/Applications/libid3tag, and you want to install gtkpod into $HOME/Applications/gtkpod. Do this instead: - CFLAGS="-I$HOME/Applications/mpeg4ip/include -L$HOME/Applications/mpeg4ip/lib -I$HOME/Applications/libid3tag/include -L$HOME/Applications/libid3tag/lib" ./configure --prefix=$HOME/Applications/gtkpod ; make ; make install + CFLAGS="-I$HOME/Applications/libid3tag/include -L$HOME/Applications/libid3tag/lib" ./configure --prefix=$HOME/Applications/gtkpod ; make ; make install ------------------------------------------------------------------------ -Quick guide for Ubuntu/Debian +Quick guide for older Ubuntu/Debian distros The following steps were necessary to install libgpod and gtkpod on a fairly virgin Ubuntu Hardy (LTS 8.04) installation. diff --git a/TODO b/TODO index f858a82..14d16ab 100644 --- a/TODO +++ b/TODO @@ -1,127 +1,454 @@ -Prospective Plugins: -# core -# coverart display -# track editor -# play tracks now -# info window - synchronizer -# download coverart plugin -# photo panel -# export plugin -# - provides window and export functions -# - other plugins simply emit a signal that tells the plugin to export the -# given tracks -# - means that the other plugins lack items on context menus of other views - -Music Menu -#- Load iPod -# Save Changes -# Add Files -# Add Folder -# Add Playlists -# Update Tracks from file -# Update mserv date from file -# Sync Playlists with Dir -# Export Tracks -# Create Playlist -# Init ipod Directories -# Check ipod files - -Edit Menu -# Edit Track Details -# Edit Smart Playlist (? Not Including) -# Delete -# Create Playlists -# Sorting -# Randomize current playlist -- Save Displayed track order -# Repo iPod Options -# Preferences - -View Menu -# Info Window -# More / Fewer filter tabs -# Arrange Filter Tabs (Not creating) - -Tools Menu -# Play Now -- Enqueue -- Normalize Volume -- Synchronize All, Contacts, Calendar, Notes +BUGS, TODO: + +In addition and duplicates of + http://gtkpod.org/bugs/index.php + http://sourceforge.net/tracker/?group_id=67873&atid=519273 + +- when auto-loading iPods: set backup path if not set. + +- move part of free-space-update to file_convert.c + +- when creating new repository: make sure backup repository filename isn't + already used. + +- don't keep iTunesDB on iPod when syncing (takes up valuable space) + +- fileselection_select_script(): display @additional_text. + +- modify "warning" when matching checksums: Send a patch that changes + the behavior from printing into the info window to opening a dialog + with the "never show this dialog again" button. Then add an option + to the preferences to get the dialog back. + +- save extended database when rehash was done, even if main database + is not changed. + +- handle missing .ext file more decently + +- Add tooltips back to the track attributes section of the prefs or find a + way to not need them. Perhaps using shorter versions of the previous + tooltips in the lists would work. That way, users wouldn't even need to + wait for the tooltip popup to know what the attribute was for. + +- unload iPods when exiting gtkpod (ask/option). + +- cddb lookup (http://freedb.freedb.org). See also + http://musicbrainz.org/doc/libmusicbrainzDownload + +- wildcards for filename templates (automatic setting of tags from + filename/cover art). + +- Actually, there is an option to see all the dirs that +are going to be synced but it's impossible to change +them.It would be nice to have a tree whit all the dirs +and sub-dirs, like in the amarok colection maker, so we +can have a full control of the sync dirs. + +- set flag3/4 automatically for podcasts. + +- support for www.last.fm + + http://www.last.fm is a web site that you report your listening + habits to. The site can then give you recommendations on other + music that you may also like. The site also has music charts for + users and also for the entire site. You can tag music and they also + have a Radio that you can download and it plays songs for you. - + Joshua + +- retag tracks with database information + +- photo support + +- lyrics support (http://www.jcbsoft.net/podlyrics/) + +- itdb/misc_confirm.c: number of F?? directories should be determined + before starting copying files to the iPod. At the moment only 20 + dirs are used no matter how many are present. + Creation of directories should be moved to itdb_* + +- more features for mserv + +- icons should be themable + +- Update calendar in special sort tab when changing category. + +- Give status when adjusting offline_playcount after import of + database (can take quite a while even for only 90 tracks). + +- Dangling/orphaned tracks + - Open a progress window to display information instead of the + statusbar messages. + + +- "adjust volume by ...%" functionality + +- Pattern matching for tag extraction from filename should also work + from the beginning of the name towards the end, not only from the + end to the beginning (clear?) + + +- multiple playlist delete, ctrl-d, wipe iPod. + + Unless I'm missing something, I think it would be handy to have a + mulitple playlist delete capability, since it's quite tedious to + have to delete playlists one at a time. + + Also I noticed ctrl-d didn't delete the playlists, which could be + my setup, I'm using Debian Unstable. + + Finally in addition to mulitple playlist delete, how about a total + wipe of the ipod (with lots of 'are you sure?'s) thus making it + ready for a new setup. + + HTH. + +- be able to select multiple genres, albums, etc. at the same + time. (should be possible -- difficulty is selecting several + playlists) + + +Anton de Wet +Feature Suggestion: + Also usefull would be able to set the "default" rating for all newly + added tracks. + + +Satadru +> It would be nice to have the ability to have some sort of shadow aac +> directory, that would have converted versions of all the songs in your +> library, if the song is a higher bitrate than 128kbps aac, so that you +> can get the most music onto your ipod. +(+ recode to 128 kB when exporting) + + +Torsten Curdt +> * I love the type-and-filter-right-away search of iTunes! +> * I miss the easy click-on-burn-audio-cd button +> (any way passing this over to the nautilus cdwriter?) + - doesn't DND work? +> * the rating should be stars not a numbers. ...at least +> a control that is easier than entering a number +> + +kulenfuster@... +> Not sure from the documentation but it looks like there's no way to +> sync tunes in the iPod into the desktop database. + > +> For instance situation: +> +> Bob has two desktop machines - one at work, one at home. He has +> tunes on both machines, ripped from his CD collection. The tunes at +> home are upbeat, the tunes at work are chilled. He keeps these two +> CD collections separate so that he can play them on regular CD +> players in each location. He loads his new iPod with the tunes on +> his home computer and then take it to work and loads further tunes +> from the work machine. When he gets home he is able to update his +> home tune database with the tunes from work to give him a backup in +> a single place in case his iPod fails. I know there are workarounds +> but it'd be great if this was something you could do automatically +> with gtkpod. If it is already, please let me know (and Woo Ha!). + + +I have the 20G model and I have more "f" directories +than gtkpod recognises. So gtkpod only fills up through f19, when +really I have through f29. Everything works fine on the iPod, it's +just that gtkpod refuses to put music into any of the other +directories. + + +On Tue, Mar 08, 2005 at 05:37:29PM +0000, Andy wrote: +> Can gtkpod do any mangling of the files as it loads them on to an iPod? +> In particular, I was wondering if there was a way to inject an album +> cover into a file's id3 as it goes in so my drive files can remain +> pristine. +> +> That is, let's say I have cover.jpg in each folder, but not in the files +> themselves. Could gtkpod be made to pick that up and put it in the id3 +> field for cover (so the iPod Photo can show it). + + + +> 1) Ich erstelle beim Import von MP3 die ID3 Tags aus den Dateinamen. +> Dabei wuerde ich noch eine Vorschau ganz gut finden, in der man +> ggf. noch manuell eingreifen kann. (Stefan Onken) -Help Menu -# Help Contents -# About box +- Darren Zimerman +> As for improvements to gtkpod, the only one I can think of off the top +> of my head would be to have a list of available playlists in the +> right-click menu. So instead of just "Add selection to new playlist", +> there would actually be list of current playlists (perhaps in a sub-menu). -#Playlists Plugin -# popup menu -#Tracks Plugin -# popup menu +- immediate copying of added tracks to the iPod (when reading tracks + over a slow network they will still be in the buffer memory and + won't have to read over the network twice if they are copied right + away) (request by Seth Arnold) -#Sorttab Menu -# popup menu +- album support (normalize all tracks of an album with the same gain) + for volume normalization -# Save on exit +- gtkpod-like browse of file system contents -- Tools plugin +- upload text notes to iPod -# Preference windows for each plugin - Should they add items to standard windows or contribute their own - # prefsdlg.c - Refactor preferences dialog to appear as pages anjuta preferences dialog +- add more progress dialogues (in general!) -# plugin remaining -# display_photo.* -# info.* / infodlg.* -# help.* +- add an option to let the user decide if all the gtkpod's + playlist must be updated on export. -Notes on trial build using ubuntu 910 -1) Install git (git-core, gitk) -2) Install libglade2-dev -3) Install/build libgpod -> libgpod-dev -4) Install flex -5) Install id3tag -7) Install anjuta-dev - not good enough as only 2.28. Need 2.30.0 -8) Build anjuta - - Install gnome-common - - Install gtk-doc-tools - - Install libunique-dev - - Install libdbus-glib-1-dev - - Install libvte-dev - - Install libgdl-1-dev - - Install libxslt-dev - - Install libgda-4.0-dev +- on-the-fly resampling to a particular bit rate. I have 32 GB of + songs be cause some of them at at 192, but I only need them at 128 + or so on the Ipod. Mus icmatch does this exact + thing. (zum...@ve...) JCS: this could be done along with an + arbitrary "conversion" on export: user provides a command line in + the prefs dialogue that is executed instead of the simple copy + command (should also support faac). +> I think this could be implemented like this: (Juho Routakorpi) +> 1. User adds a track (or a directory containing a track) in format X +> 2. gtkpod notices this and adds this to conversion queue, starts conversion +> immediatelly in the background +> 3. If all format X files aren't converted when user commits sync, then format +> X songs are put to end of transfer queue +> 4. Temporary files are deleted on exit (if user has chose so) -# Investigate the lack of ltmain.sh -# Change configure.in to signal at the bottom status of webkit -#- pkconfig.pc for libgtkpod -#Gstreamer -#* display.c -# * media player gui referenced in glade xml -#* display_playlists / display_sorttabs -# * context menu trips tools_play_tracks (selected_tracks); +-- John Pedersen +> I have an Ipod mini, which stores roughly 4GB. My music collection +> is roughly 18GB. +> +> ITunes has a nice feature: each song has a checkbox in front of the +> song name. And in the ipod preferences, there's a setting called +> "Only Update Checked Songs". +> +> So the checkmarks are a nice simple way to create a subset of my +> collection. +> +> Usage: by default, the songs are all checked, so my first task was +> to uncheck all these thousands of songs. Solution: get a listing +> view of ALL songs, and hold down the CTRL key while I uncheck a +> song. ALL songs in the list now become unchecked (takes a little +> while of course). +> +> Next, I want to re-check the individual albums and/or songs that I +> want to put back in the mini ipod selection. For the most part, I +> select an artist, show ALL their songs, and CTRL-click a single +> checkbox. Alternatively, I can select a single album, or even a +> single song. -#* player.c / player.h -# * thing that does all the work +> I have a question: (Will Richey) +> - Could Offline mode be modified such that it handles the unmounting / +> remounting of the iPod? I'd like to be able to leave gtkpod running, +> detach the iPod and see the changes, then reattach and reconnect. +This would also include that gtkpod.in and gtkpod.out are called only +if not in offline mode. When switching from offline to online, mount +and gtkpod.in should be called. When switching from online to offline +gtkpod.out should be called. Further, the README file should be edited +to reflect the change. -#Fix anjuta about icon +(Michael) +> Second issue - when I delete a playlist and add a playlist with many of +> the same identical songs, it looks like gtkpod does in fact delete the +> files from the iPod and recopy them to the iPod. +Yes -- once they are removed, they are removed. +> +> It would be nice if it did not do that. +Could be done by checking against the "pending_deletion" list by md5 hash +before adding a new track. -Threading export of tracks - performance of tracks +On Sun, Apr 24, 2005 at 11:59:00AM +0100, David Smith wrote: +> Is there any way to reverse sync with directories on gtkpod, i.e press +> sync and it updates my directories FROM my ipod? At the moment all i can +> do is manually add the files i know I have updated on my iPod to my +> computer. -Lucidfox: -GtkBuilder files, replace libmp4, move to GIO - < LucidFox> ffmpeg libraries are not that well documented, though :/ - < LucidFox> In fact, I wonder if in 2.0 it would be possible to switch to - libavcodec/libavformat for all format conversions, and get rid of the - shell scripts +Len Trigg: +> > Another thing that confused me was the "sort tabs". Since they are +> > used for filtering rather than sorting, they should really be named +> > "filter tabs" or "filter panes". -< teuf> in the plugin-framework branch, did you rework how gtkpod handles ipods? - ie the offline db stuff and things like that and the fact that the modelnumber iS - used everywhere? - basically, it would be really helpful if gtkpod stopped using the model number - everywhere, and if it stopped using itdb_parse_file (and used itdb_parse + - mountpoint instead) + +Please feel free to submit further features. + + +BUGLIST: + +- segfault when sorting the playlists (0.99.2) + +drag playlist to track view: (JCS) +(gtkpod:19911): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed + +(gtkpod:19911): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed + +(gtkpod:19911): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed + + + +- Eelco van Veldhuizen +> First all apoligise for my bad english, i'm from the neatherlands. I +> have the following problem with my iPod when I select a playlist for +> my wake up alarm. The iPod switches it back to "beep". This only +> happens with the playlists from gtkPod. When I sync with iTunes I +> can select the playlist for my alarm. Maybe you already know this +> problem.. I have searched on the internet and found a couple of +> people that have the same problem. But no solutions found... Mabey +> you know a solution for this problem :) + + +- during a long operation (menues are blocked) the user can still edit + the track data. This could potentially crash gtkpod -> need a way to + block editing as well without blocking navigation. + +- when deleting an entry in the last sort tab (of 2) sometimes gtkpod + crashes + + +stefano.brozzi +> 1. on creating a smart playlist with a rule on title name, +> only exact case matching is considered +> +> 2. adding options during creation of a smart playlist thru the button + +> there is no autoresize of the modal window to keep " Ok " and " cancel " +> buttons inside of the windows. +> 3. another problem is that the field "date added" is overwritten by +> gtkpod. At this moment I've something like 30gb of mp3 with a "date +> added" field at the same date and second. + + + +Please add/report bugs as you find them (jcsjcs at users dot +sourceforge dot net). + + +----------------------------------------- +Coverart (JCS): +Dragging tracks with coverart from Local to iPod may not work. It will +definitely not work for coverart embedded in the MP3 file. + + +Equalizer: (Julien Oster) +As you certainly have noticed, the internal iPod equalizer is causing +ugly clipping (and thus horrible bass distortion) when using bass +booster settings with a lot of MP3s. Googling around quickly revealed a +forum posts (http://www5.head-fi.org/forums/showthread.php?t=84088) +which suggests using mp3gain to lower the level of MP3s. That way, +clipping no longer occurs. The forum thread also reports that doing so +unfortunately also lowers the volume the MP3 is played, but that isn't +necessarily the case. + +I just spent some hours doing a lot of tests on MP3s with mp3gain and +gtkpod and I finally came to a solution to avoid every clipping problems +AND keeping the original volume in every case. + +Before you say "but gtkpod already has support for mp3gain!", please +read on. The mp3gain feature as it is implemented in gtkpod right now +does not solve any equalizer bass distortion problems, it just +normalizes the volume of all tracks. However, what I am suggesting here +actually doesn't change the volume of the tracks at all, it just removes +possible clipping and thus possible bass distortion. + +While experimenting, dealing with all those different volumes, gains, +soundcheck values, mp3gain settings and whatever else got me quite +confused. I don't want you to get a headache, it's already enough that I +got one ;-) So I'll show you step by step what you have to do to remove +clipping from an MP3. + +First of all, we need an MP3 to test the whole thing. Just choose an MP3 +which shows horrible and clearly hearable clipping distortion when using +the "Bass Booster" equalizer setting on your iPod. + +Let's assume that you have that track available as /tmp/foo.mp3 on your +workstation. Uploading it without any change to your iPod and listening +to it may be fine when the equalizer is disabled, but when choosing +"Bass Booster" or another bass intensive setting, the levels of some of +the lower frequencies are boosted beyond a limit so that that ugly +distortion occurs. Not good. + +We can easily solve this issue by using mp3gain on the track, giving the +following output: + +/tmp% mp3gain -r -o /tmp/foo.mp3 +File MP3 gain dB gain Max Amplitude Max global_gain Min +foo.mp3 -7 -10.690000 39675.560208 190 126 + +Note that the "-r" switch has to be there! Otherwise it doesn't work. +I'm not entirely sure, but it looks like without the -r switch, only the +volume information in the ID3 tag is changed while with -r, the relative +volume of every single frame is changed (fortunately, also without +reducing quality). To avoid clipping you have to volume the frames down. + +As you know, the "-o" switch is just for a nicer output and doesn't +affect how the file is handled. + +Now, after doing this, you can already upload the file to your iPod +using gtkpod. Looking at the soundcheck value after importing it shows +that it isn't 0 anymore but something slightly off, like 0,3 or 0,75, +however it's always close to 0. + +Playing it reveals no clipping at all! You can try out every equalizer +setting you want, mp3gain lowered the volume of the individual frames +enough to not get any frequency boosted beyond any limit by the equalizer. + +Happy now? No, there's still a problem: the distortion is gone, but the +volume is way too low now. Of course, you can just increase the volume +on your iPod, but sometimes even the highest volume actually seems a bit +low (even on uncapped iPods). However, even that problem can be solved. + +Let's look at the mp3gain output again: + +File MP3 gain dB gain Max Amplitude Max global_gain Min +foo.mp3 -7 -10.690000 39675.560208 190 126 + +So, it tells us the volume of every frame has been decreased by 10.69dB. +If you would use mp3gain without the -r switch, -10.69 would be exactly +the same value that would have got written in the "soundcheck" field. + +But since we want to *increase* the playing volume to get the track back +to its original volume, we do the opposite: we write "10.69dB" in the +soundcheck field. Not as a negative value, but as a positive value! + +Doing so, enabling "Sound Check" on the iPod and listening to the track +again shows that the track volume is obviously back to original. But +checking with the equalizer also proves... still no clipping! + +Yay! So we have got rid of the clipping while still keeping the original +volume and we're completely happy now. + +Now, what do you think about implementing this functionality in gtkpod, +similar to the already existing normalize functionality? That would +really be great. + +Of course, there's still one possible drawback, which depends on what +you would like to have: using that method, nothing is actually +normalized. The volume of the tracks is the same as before. But if my +aching head isn't mistaken, skipping the "set the soundcheck field to +the opposite value of the applied gain"-step will also result in +normalization (also I still think the volume may be too low then, but I +also think you could fix this by setting the Soundcheck field to a fixed +value for all tracks). +------------------------- + + + + + +Doc sites: + +http://www.kgarner.com/blog/archives/2005/01/11/fc3-hal-ipod/ +http://mpeters.us/linux/linux_pod.php +http://users.ameritech.net/djfake/linux3.htm + +Karlan Mitchell: +The program searches for an ipod, and mounts it +Check out a little C program I created to make iPod use with linux +easier, A GUI would be great, but I don't do that. The tool can be +found at http://karlan.us.to/devel/ipod +If you would like to merge the code, please feel free to, I'd do it if +you'd accept a patch. + +On the Tools Menu add the following options: +- Normalize Volume +- Synchronize All, Contacts, Calendar, Notes |
From: phantomjinx <pha...@us...> - 2011-10-26 21:01:31
|
commit 519f8772cc9dd5ccb7d302931f1cad149c61a4e1 Author: phantomjinx <p.g...@ph...> Date: Wed Oct 26 21:59:17 2011 +0100 Provide sensible sorting for adding files and directories * Tracks have been historically added in an arbitrary way. This attempts to address this by sorting the filenames before adding the tracks. * Would be better to sort the tracks after they have been added but catching all the added tracks is not easy so this makes a satisfactory middle option. * Addresses Debian bug #547295 libgtkpod/file.c | 107 ++++++++++++++------ libgtkpod/file.h | 3 + .../playlist_display/playlist_display_actions.c | 4 + 3 files changed, 84 insertions(+), 30 deletions(-) --- diff --git a/libgtkpod/file.c b/libgtkpod/file.c index 7eed815..caa431b 100644 --- a/libgtkpod/file.c +++ b/libgtkpod/file.c @@ -361,12 +361,64 @@ add_playlist_by_filename(iTunesDB *itdb, gchar *plfile, Playlist *plitem, gint p return NULL; } +static gint compare_names (gchar* name1, gchar* name2, gpointer case_sensitive) { + gint value = compare_string(name1, name2, GPOINTER_TO_INT(case_sensitive)); + return value; +} + +/** + * Sort a list of filenames, using the tm_sort and + * tm_case_sensitive preferences to determine the + * filenames' sort order. + */ +GSList* sort_tracknames_list(GSList *names) { + /* Get the track sort order preference */ + GtkSortType sortorder = prefs_get_int("tm_sort"); + gboolean case_sensitive = prefs_get_int("tm_case_sensitive"); + + switch (sortorder) { + case SORT_ASCENDING: + return g_slist_sort_with_data (names, (GCompareDataFunc) compare_names, GINT_TO_POINTER(case_sensitive)); + case SORT_DESCENDING: + names = g_slist_sort_with_data (names, (GCompareDataFunc) compare_names, GINT_TO_POINTER(case_sensitive)); + return g_slist_reverse(names); + default: + return names; + } +} + /*------------------------------------------------------------------*\ * * * Add Dir * * * \*------------------------------------------------------------------*/ +static void recurse_directories(gchar *name, GSList **trknames, gboolean descend) { + if (g_file_test(name, G_FILE_TEST_IS_DIR)) { + GDir *dir = g_dir_open(name, 0, NULL); + if (dir != NULL) { + const gchar *next; + do { + next = g_dir_read_name(dir); + if (next != NULL) { + gchar *nextfull = g_build_filename(name, next, NULL); + if (descend || !g_file_test(nextfull, G_FILE_TEST_IS_DIR)) { + recurse_directories(nextfull, trknames, descend); + } + g_free(nextfull); + } + } + while (next != NULL); + + g_dir_close(dir); + } + } + else { + *trknames = g_slist_append(*trknames, g_strdup(name)); + } +} + + /* * Add all files in directory and subdirectories. * @@ -386,48 +438,43 @@ add_playlist_by_filename(iTunesDB *itdb, gchar *plfile, Playlist *plitem, gint p gint add_directory_by_name(iTunesDB *itdb, gchar *name, Playlist *plitem, gboolean descend, AddTrackFunc addtrackfunc, gpointer data, GError **error) { gint result = 0; GString *errors = g_string_new(""); + GSList *trknames = NULL; + GSList *tkn = NULL; g_return_val_if_fail (itdb, 0); g_return_val_if_fail (name, 0); - if (g_file_test(name, G_FILE_TEST_IS_DIR)) { - GDir *dir = g_dir_open(name, 0, NULL); - block_widgets(); - if (dir != NULL) { - const gchar *next; - do { - next = g_dir_read_name(dir); - if (next != NULL) { - gchar *nextfull = g_build_filename(name, next, NULL); - if (descend || !g_file_test(nextfull, G_FILE_TEST_IS_DIR)) { - GError *direrror = NULL; - result += add_directory_by_name(itdb, nextfull, plitem, descend, addtrackfunc, data, &direrror); - if (direrror) { - gchar *msg = g_strdup_printf("%s\n", direrror->message); - g_string_append(errors, msg); - g_free(msg); - g_error_free(direrror); - direrror = NULL; - } - } - g_free(nextfull); - } - } - while (next != NULL); + block_widgets(); - g_dir_close(dir); - } - release_widgets(); - } - else { - if (add_track_by_filename(itdb, name, plitem, descend, addtrackfunc, data, error)) + recurse_directories(name, &trknames, descend); + + trknames = sort_tracknames_list(trknames); + + tkn = trknames; + while (tkn) { + GError *trkerror = NULL; + if (add_track_by_filename(itdb, tkn->data, plitem, descend, addtrackfunc, data, &trkerror)) { result++; + } + + if (trkerror) { + gchar *msg = g_strdup_printf("%s\n", trkerror->message); + g_string_append(errors, msg); + g_free(msg); + g_error_free(trkerror); + trkerror = NULL; + } + + tkn = tkn->next; } + release_widgets(); + if (errors->len > 0) { gtkpod_log_error_printf(error, errors->str); } g_string_free(errors, TRUE); + g_slist_free_full(trknames, g_free); return result; } diff --git a/libgtkpod/file.h b/libgtkpod/file.h index cd58bc8..01ba239 100644 --- a/libgtkpod/file.h +++ b/libgtkpod/file.h @@ -95,4 +95,7 @@ gboolean read_lyrics_from_file (Track *track, gchar **lyrics); gboolean write_lyrics_to_file (Track *track); gchar *fileselection_get_file_or_dir(const gchar *title, const gchar *cur_file, GtkFileChooserAction action); + +GSList* sort_tracknames_list(GSList *names); + #endif diff --git a/plugins/playlist_display/playlist_display_actions.c b/plugins/playlist_display/playlist_display_actions.c index f153011..8f34f17 100644 --- a/plugins/playlist_display/playlist_display_actions.c +++ b/plugins/playlist_display/playlist_display_actions.c @@ -56,6 +56,7 @@ static void add_selected_dirs(GSList *names, Playlist *db_active_pl) { if (names) { gtkpod_statusbar_busy_push(); + GSList* currentnode; for (currentnode = names; currentnode; currentnode = currentnode->next) { result @@ -304,6 +305,9 @@ static void fileselection_add_files(GSList* names, Playlist *playlist) { block_widgets(); gtkpod_statusbar_busy_push(); + + names = sort_tracknames_list(names); + /* Get the filenames and add them */ for (gsl = names; gsl; gsl = gsl->next) { GError *error = NULL; |
From: phantomjinx <pha...@us...> - 2011-10-16 19:56:24
|
commit a262465a5466aa843ebd09bf4f960d7a7b7cb79f Author: phantomjinx <p.g...@ph...> Date: Sun Oct 16 19:50:13 2011 +0100 Add clarity plugin to po translations configuration po/POTFILES.in | 5 +++++ po/POTFILES.skip | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) --- diff --git a/po/POTFILES.in b/po/POTFILES.in index e147386..b077c3e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -111,6 +111,11 @@ plugins/track_display/plugin.c plugins/track_display/track_display_context_menu.c [type: gettext/ini]plugins/track_display/track_display.plugin.in plugins/track_display/track_display_preferences.c +[type: gettext/ini]plugins/clarity/clarity.xml +plugins/clarity/clarity_context_menu.c +plugins/clarity/clarity_dnd_support.c +plugins/clarity/fetchcover.c +plugins/clarity/plugin.c src/anjuta-about.c src/anjuta-action-callbacks.c src/anjuta-actions.h diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 87a1f3a..8444491 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -10,3 +10,4 @@ data/glade/playlist_display.xml data/glade/repository_editor.xml data/glade/sorttab_display.xml data/glade/track_display.xml +data/glade/clarity.xml |
From: phantomjinx <pha...@us...> - 2011-10-16 18:13:15
|
commit 730a1f4fd896ff1b216f0c52696a8dc984ce192d Author: phantomjinx <p.g...@ph...> Date: Sun Oct 16 19:06:35 2011 +0100 Couple more deprecations causing compile errors * Functions deprecated in gtk 3.2 causing compile errors in plugins * clarity * cover_display plugins/clarity/clarity_widget.c | 6 +++--- plugins/cover_display/cover_display.xml | 2 +- plugins/cover_display/display_coverart.c | 2 +- plugins/cover_display/display_coverart.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) --- diff --git a/plugins/clarity/clarity_widget.c b/plugins/clarity/clarity_widget.c index df3fa29..1c51f71 100644 --- a/plugins/clarity/clarity_widget.c +++ b/plugins/clarity/clarity_widget.c @@ -267,7 +267,7 @@ static void clarity_widget_init (ClarityWidget *self) { g_signal_connect (G_OBJECT(priv->leftbutton), "clicked", G_CALLBACK(_on_clarity_button_clicked), priv); - priv->cdslider = gtk_hscale_new_with_range(0, 1, 1); + priv->cdslider = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 0, 1, 1); gtk_scale_set_digits(GTK_SCALE(priv->cdslider), 0); gtk_scale_set_draw_value(GTK_SCALE(priv->cdslider), FALSE); gtk_widget_set_can_focus(priv->cdslider, TRUE); @@ -300,12 +300,12 @@ static void clarity_widget_init (ClarityWidget *self) { _init_slider_range(priv); - priv->controlbox = gtk_hbox_new(FALSE, 2); + priv->controlbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); gtk_box_pack_start(GTK_BOX(priv->controlbox), priv->leftbutton, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(priv->controlbox), priv->cdslider, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(priv->controlbox), priv->rightbutton, FALSE, FALSE, 0); - priv->contentpanel = gtk_vbox_new(FALSE, 0); + priv->contentpanel = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start(GTK_BOX(priv->contentpanel), priv->draw_area, TRUE, TRUE, 0); gtk_box_pack_end(GTK_BOX(priv->contentpanel), priv->controlbox, FALSE, TRUE, 0); diff --git a/plugins/cover_display/cover_display.xml b/plugins/cover_display/cover_display.xml index 85af7b5..8b13230 100644 --- a/plugins/cover_display/cover_display.xml +++ b/plugins/cover_display/cover_display.xml @@ -43,7 +43,7 @@ </packing> </child> <child> - <object class="GtkHScale" id="cover_display_scaler"> + <object class="GtkScale" id="cover_display_scaler"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="digits">0</property> diff --git a/plugins/cover_display/display_coverart.c b/plugins/cover_display/display_coverart.c index ad62e06..6e08fb9 100644 --- a/plugins/cover_display/display_coverart.c +++ b/plugins/cover_display/display_coverart.c @@ -174,7 +174,7 @@ void coverart_init_display(GtkWidget *parent, gchar *gladepath) { cdwidget->controlbox = gtkpod_builder_xml_get_widget(xml, "cover_display_controlbox"); cdwidget->leftbutton = GTK_BUTTON (gtkpod_builder_xml_get_widget (xml, "cover_display_leftbutton")); cdwidget->rightbutton = GTK_BUTTON (gtkpod_builder_xml_get_widget (xml, "cover_display_rightbutton")); - cdwidget->cdslider = GTK_HSCALE (gtkpod_builder_xml_get_widget (xml, "cover_display_scaler")); + cdwidget->cdslider = GTK_SCALE (gtkpod_builder_xml_get_widget (xml, "cover_display_scaler")); /* create a new drawing area */ cdwidget->draw_area = gtk_drawing_area_new(); cdwidget->cdcovers = g_ptr_array_sized_new(IMG_TOTAL); diff --git a/plugins/cover_display/display_coverart.h b/plugins/cover_display/display_coverart.h index 8a3afe8..a7b0732 100644 --- a/plugins/cover_display/display_coverart.h +++ b/plugins/cover_display/display_coverart.h @@ -68,7 +68,7 @@ typedef struct { GtkWidget *canvasbox; GtkWidget *controlbox; GtkButton *leftbutton; - GtkHScale *cdslider; + GtkScale *cdslider; GtkButton *rightbutton; /* Utility data */ |
From: phantomjinx <pha...@us...> - 2011-10-16 15:51:19
|
commit e27f82c53d2acbc4eb9dc54913af6bf36e705d18 Author: phantomjinx <p.g...@ph...> Date: Sun Oct 16 16:47:59 2011 +0100 Remove deprecated gtk_hpaned_new function * Function now deprecated in gtk 3.2 plugins/sorttab_display/display_sorttabs.c | 2 +- plugins/sorttab_display/plugin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- diff --git a/plugins/sorttab_display/display_sorttabs.c b/plugins/sorttab_display/display_sorttabs.c index 87ec764..72b4524 100644 --- a/plugins/sorttab_display/display_sorttabs.c +++ b/plugins/sorttab_display/display_sorttabs.c @@ -2300,7 +2300,7 @@ static void st_create_paned() { for (i = 0; i < PANED_NUM_ST; ++i) { GtkWidget *paned; - paned = gtk_hpaned_new(); + paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL); gtk_widget_show(paned); if (!i) { diff --git a/plugins/sorttab_display/plugin.c b/plugins/sorttab_display/plugin.c index c74a80b..032a580 100644 --- a/plugins/sorttab_display/plugin.c +++ b/plugins/sorttab_display/plugin.c @@ -176,7 +176,7 @@ static gboolean activate_sorttab_display_plugin(AnjutaPlugin *plugin) { set_default_preferences(); /* Add widget in Shell. Any number of widgets can be added */ - sorttab_display_plugin->st_paned = gtk_hpaned_new(); + sorttab_display_plugin->st_paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL); gchar *glade_path = g_build_filename(get_glade_dir(), "sorttab_display.xml", NULL); st_create_tabs(GTK_PANED(sorttab_display_plugin->st_paned), glade_path); gtk_widget_show(sorttab_display_plugin->st_paned); |
From: phantomjinx <pha...@us...> - 2011-10-15 22:13:36
|
commit 4a8e05a983f0177f1904bde4ea560d5aa43d89b5 Author: phantomjinx <p.g...@ph...> Date: Sat Oct 15 23:11:51 2011 +0100 Fix the track display sorting functionality * plugin.c * The tm_autostore preference has to be set in order to modify the playlists on the ipod. Ensure this is set to TRUE by default if not set. * display_tracks.c * tm_rows_reordered was being called when the sort order signal callback was tripped. However, this signal is fired BEFORE the new sort order has been set so instead calling tm_rows_ordered as an idle process ensures the signal has completed first and the model updated. * The sort order is correctly updated and reflected in the ipod playlist. * track_display_preferences.c * Adds a checkbox to the track display preferences so that the tm_autostore preference can be switched on and off. Fixes task #83 - Carry sort order through to tracks on ipod plugins/track_display/display_tracks.c | 161 ++++++---- plugins/track_display/plugin.c | 2 +- plugins/track_display/track_display.xml | 359 ++++++++++++++------- plugins/track_display/track_display_preferences.c | 10 + 4 files changed, 342 insertions(+), 190 deletions(-) --- diff --git a/plugins/track_display/display_tracks.c b/plugins/track_display/display_tracks.c index 5c733be..ad69b22 100644 --- a/plugins/track_display/display_tracks.c +++ b/plugins/track_display/display_tracks.c @@ -1113,78 +1113,93 @@ void tm_rows_reordered(void) { g_return_if_fail (track_treeview); current_pl = gtkpod_get_current_playlist(); - if (current_pl) { - GtkTreeModel *tm = NULL; - GtkTreeIter i; - GList *new_list = NULL, *old_pos_l = NULL; - gboolean valid = FALSE; - GList *nlp, *olp; - gboolean changed = FALSE; - iTunesDB *itdb = NULL; - - tm = gtk_tree_view_get_model(track_treeview); - g_return_if_fail (tm); - - valid = gtk_tree_model_get_iter_first(tm, &i); - while (valid) { - Track *new_track; - gint old_position; - - gtk_tree_model_get(tm, &i, READOUT_COL, &new_track, -1); - g_return_if_fail (new_track); - - if (!itdb) - itdb = new_track->itdb; - new_list = g_list_append(new_list, new_track); - /* what position was this track in before? */ - old_position = g_list_index(current_pl->members, new_track); - /* check if we already used this position before (can - happen if track has been added to playlist more than - once */ - while ((old_position != -1) && g_list_find(old_pos_l, GINT_TO_POINTER(old_position))) { /* find next occurence */ - GList *link; - gint next; - link = g_list_nth(current_pl->members, old_position + 1); - next = g_list_index(link, new_track); - if (next == -1) - old_position = -1; - else - old_position += (1 + next); - } - /* we make a sorted list of the old positions */ - old_pos_l = g_list_insert_sorted(old_pos_l, GINT_TO_POINTER(old_position), comp_int); - valid = gtk_tree_model_iter_next(tm, &i); + if (! current_pl) + return; + + GtkTreeModel *tm = NULL; + GtkTreeIter i; + GList *new_list = NULL, *old_pos_l = NULL; + gboolean valid = FALSE; + GList *nlp, *olp; + gboolean changed = FALSE; + iTunesDB *itdb = NULL; + + tm = gtk_tree_view_get_model(track_treeview); + g_return_if_fail (tm); + + valid = gtk_tree_model_get_iter_first(tm, &i); + while (valid) { + Track *new_track; + gint old_position; + + gtk_tree_model_get(tm, &i, READOUT_COL, &new_track, -1); + g_return_if_fail (new_track); + + if (!itdb) + itdb = new_track->itdb; + + new_list = g_list_append(new_list, new_track); + /* what position was this track in before? */ + old_position = g_list_index(current_pl->members, new_track); + /* + * check if we already used this position before (can + * happen if track has been added to playlist more than + * once + */ + while ((old_position != -1) && g_list_find(old_pos_l, GINT_TO_POINTER(old_position))) { + /* find next occurence */ + GList *link; + gint next; + link = g_list_nth(current_pl->members, old_position + 1); + next = g_list_index(link, new_track); + if (next == -1) + old_position = -1; + else + old_position += (1 + next); } - nlp = new_list; - olp = old_pos_l; - while (nlp && olp) { - GList *old_link; - guint position = GPOINTER_TO_INT(olp->data); - - /* if position == -1 one of the tracks in the track view - could not be found in the selected playlist -> stop! */ - if (position == -1) { - g_warning ("Programming error: tm_rows_reordered_callback: track in track view was not in selected playlist\n"); - g_return_if_reached (); - } - old_link = g_list_nth(current_pl->members, position); - /* replace old track with new track */ - if (old_link->data != nlp->data) { - old_link->data = nlp->data; - changed = TRUE; - } - /* next */ - nlp = nlp->next; - olp = olp->next; + /* we make a sorted list of the old positions */ + old_pos_l = g_list_insert_sorted(old_pos_l, GINT_TO_POINTER(old_position), comp_int); + valid = gtk_tree_model_iter_next(tm, &i); + } + + nlp = new_list; + olp = old_pos_l; + while (nlp && olp) { + GList *old_link; + guint position = GPOINTER_TO_INT(olp->data); + + /* + * if position == -1 one of the tracks in the track view + * could not be found in the selected playlist -> stop! + */ + if (position == -1) { + g_warning ("Programming error: tm_rows_reordered_callback: track in track view was not in selected playlist\n"); + g_return_if_reached (); } - g_list_free(new_list); - g_list_free(old_pos_l); - /* if we changed data, mark data as changed and adopt order in - sort tabs */ - if (changed) { - data_changed(itdb); + old_link = g_list_nth(current_pl->members, position); + /* replace old track with new track */ + if (old_link->data != nlp->data) { + old_link->data = nlp->data; + changed = TRUE; } + /* next */ + nlp = nlp->next; + olp = olp->next; } + g_list_free(new_list); + g_list_free(old_pos_l); + + /* + * if we changed data, mark data as changed and adopt order + * in sort tabs + */ + if (changed) + data_changed(itdb); +} + +static gboolean tm_rows_reordered_idle_callback (gpointer user_data) { + tm_rows_reordered(); + return FALSE; } static void on_trackids_list_foreach(GtkTreeModel *tm, GtkTreePath *tp, GtkTreeIter *i, gpointer data) { @@ -1697,8 +1712,14 @@ static void tm_sort_column_changed(GtkTreeSortable *ts, gpointer user_data) { tm_set_search_column(newcol); - if (prefs_get_int("tm_autostore")) - tm_rows_reordered(); + if (prefs_get_int("tm_autostore")) { + /* + * Once this signal callback has finished will the model + * be resorted. At that point will we updated the + * selected playlist with the new track order. + */ + g_idle_add(tm_rows_reordered_idle_callback, NULL); + } /* stable sorting: index original order */ tracks = tm_get_all_tracks(); diff --git a/plugins/track_display/plugin.c b/plugins/track_display/plugin.c index 8d24f87..69b0634 100644 --- a/plugins/track_display/plugin.c +++ b/plugins/track_display/plugin.c @@ -86,7 +86,7 @@ static void set_default_preferences() { } if (!prefs_get_int_value("tm_autostore", NULL)) - prefs_set_int("tm_autostore", FALSE); + prefs_set_int("tm_autostore", TRUE); if (!prefs_get_int_value("tm_sortcol", NULL)) prefs_set_int("tm_sortcol", TM_COLUMN_TITLE); diff --git a/plugins/track_display/track_display.xml b/plugins/track_display/track_display.xml index bf7efc4..e73eb30 100644 --- a/plugins/track_display/track_display.xml +++ b/plugins/track_display/track_display.xml @@ -1,26 +1,36 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> <requires lib="gtk+" version="2.16"/> - <!-- interface-naming-policy toplevel-contextual --> - <object class="GtkWindow" id="track_display_window"> - <child> - <object class="GtkVBox" id="track_display_vbox"> + <object class="GtkDialog" id="prefs_columns_dialog"> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Add Column</property> + <property name="modal">True</property> + <property name="window_position">center-on-parent</property> + <property name="default_width">300</property> + <property name="default_height">400</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox6"> <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="can_focus">False</property> <property name="orientation">vertical</property> - <child> - <object class="GtkHBox" id="searchbar_hpanel"> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area6"> <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="border_width">6</property> - <property name="spacing">6</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> <child> - <object class="GtkLabel" id="current_playlist_label"> + <object class="GtkButton" id="cancel_button2"> + <property name="label">gtk-cancel</property> <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="label" translatable="yes"><span weight='bold' size='larger'>No playlist selected</span></property> - <property name="use_markup">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property> @@ -29,70 +39,39 @@ </packing> </child> <child> - <object class="GtkEntry" id="search_entry"> + <object class="GtkButton" id="add_button"> + <property name="label">gtk-add</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="invisible_char">●</property> - <property name="width_chars">20</property> - <property name="primary_icon_stock">gtk-find</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="pack_type">end</property> <property name="position">1</property> </packing> </child> </object> <packing> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkScrolledWindow" id="track_window"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - <object class="GtkDialog" id="prefs_columns_dialog"> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="border_width">5</property> - <property name="title" translatable="yes">Add Column</property> - <property name="modal">True</property> - <property name="window_position">center-on-parent</property> - <property name="default_width">300</property> - <property name="default_height">400</property> - <property name="type_hint">dialog</property> - <property name="skip_taskbar_hint">True</property> - <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox6"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">2</property> - <child> <object class="GtkFrame" id="frame14"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="border_width">7</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> <object class="GtkAlignment" id="alignment28"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="top_padding">6</property> <property name="left_padding">12</property> <child> @@ -100,7 +79,6 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> <property name="shadow_type">in</property> <child> <object class="GtkTreeView" id="available_columns"> @@ -109,6 +87,9 @@ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="headers_visible">False</property> <property name="rules_hint">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"/> + </child> </object> </child> </object> @@ -118,52 +99,16 @@ <child type="label"> <object class="GtkLabel" id="label27"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes"><b>Available Columns</b></property> <property name="use_markup">True</property> </object> </child> </object> <packing> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area6"> - <property name="visible">True</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="cancel_button2"> - <property name="label">gtk-cancel</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkButton" id="add_button"> - <property name="label">gtk-add</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -174,6 +119,7 @@ </action-widgets> </object> <object class="GtkWindow" id="prefs_window"> + <property name="can_focus">False</property> <child> <object class="GtkNotebook" id="track_settings_notebook"> <property name="visible">True</property> @@ -181,35 +127,37 @@ <child> <object class="GtkVBox" id="vbox5"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="border_width">12</property> - <property name="orientation">vertical</property> - <property name="spacing">40</property> + <property name="spacing">20</property> <child> <object class="GtkFrame" id="frame5"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> <object class="GtkAlignment" id="alignment14"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="top_padding">6</property> <property name="left_padding">12</property> <child> <object class="GtkVBox" id="vbox46"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkHBox" id="hbox3"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> <property name="shadow_type">in</property> <child> <object class="GtkTreeView" id="displayed_columns"> @@ -219,17 +167,22 @@ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="headers_visible">False</property> <property name="rules_hint">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection2"/> + </child> </object> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkVButtonBox" id="vbuttonbox2"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <property name="layout_style">spread</property> <child> @@ -238,8 +191,9 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> <property name="use_stock">True</property> - <signal name="clicked" handler="on_column_add_clicked"/> + <signal name="clicked" handler="on_column_add_clicked" swapped="no"/> </object> <packing> <property name="expand">False</property> @@ -253,8 +207,9 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> <property name="use_stock">True</property> - <signal name="clicked" handler="on_column_remove_clicked"/> + <signal name="clicked" handler="on_column_remove_clicked" swapped="no"/> </object> <packing> <property name="expand">False</property> @@ -271,6 +226,8 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> @@ -282,13 +239,73 @@ <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="halign">start</property> + <property name="use_action_appearance">False</property> <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_horizontal_scrollbar_toggled"/> + <signal name="toggled" handler="on_horizontal_scrollbar_toggled" swapped="no"/> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes"><b>Displayed Columns</b></property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="tm_cfg_autostore"> + <property name="label" translatable="yes">Modify selected tracks sort order in selected playlist</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="has_tooltip">True</property> + <property name="tooltip_markup" translatable="yes">if checked, the sort order of the displayed tracks will be applied to the selected playlist.</property> + <property name="tooltip_text" translatable="yes">if checked, the sort order of the displayed tracks will be applied to the selected playlist.</property> + <property name="halign">start</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_tm_sort_autostore_toggled" swapped="no"/> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkCheckButton" id="tm_cfg_case_sensitive"> <property name="label" translatable="yes">Case sensitive sorting</property> @@ -296,16 +313,19 @@ <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="has_tooltip">True</property> + <property name="tooltip_markup" translatable="yes">If checked, sorting will be case sensitive. Please note that case sensitive sorting will not work well with most charsets.</property> <property name="tooltip_text" translatable="yes">If checked, sorting will be case sensitive. Please note that case sensitive sorting will not work well with most charsets.</property> <property name="halign">start</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> + <property name="xalign">0</property> <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_tm_sort_case_sensitive_toggled"/> + <signal name="toggled" handler="on_tm_sort_case_sensitive_toggled" swapped="no"/> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">2</property> + <property name="position">1</property> </packing> </child> </object> @@ -313,43 +333,47 @@ </object> </child> <child type="label"> - <object class="GtkLabel" id="label7"> + <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Displayed Columns</b></property> + <property name="can_focus">False</property> + <property name="label" translatable="yes"><b>Sorting Options</b></property> <property name="use_markup">True</property> </object> </child> </object> <packing> <property name="expand">False</property> - <property name="position">0</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkFrame" id="frame2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> <object class="GtkAlignment" id="alignment2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="top_padding">6</property> <property name="left_padding">12</property> <child> <object class="GtkVBox" id="vbox137"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkHBox" id="hbox1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow15"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> <property name="shadow_type">in</property> <child> <object class="GtkTreeView" id="ign_words_view"> @@ -358,17 +382,22 @@ <property name="can_focus">True</property> <property name="headers_visible">False</property> <property name="headers_clickable">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection3"/> + </child> </object> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkVButtonBox" id="vbuttonbox1"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <property name="layout_style">spread</property> <child> @@ -377,8 +406,9 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> <property name="use_stock">True</property> - <signal name="clicked" handler="on_ign_word_add_clicked"/> + <signal name="clicked" handler="on_ign_word_add_clicked" swapped="no"/> </object> <packing> <property name="expand">False</property> @@ -392,8 +422,9 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> <property name="use_stock">True</property> - <signal name="clicked" handler="on_ign_word_remove_clicked"/> + <signal name="clicked" handler="on_ign_word_remove_clicked" swapped="no"/> </object> <packing> <property name="expand">False</property> @@ -410,6 +441,8 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> @@ -429,17 +462,19 @@ <child> <object class="GtkHBox" id="hbox158"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">12</property> <child> <object class="GtkVBox" id="vbox138"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkCheckButton" id="sort_ign_field_3"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="draw_indicator">True</property> </object> <packing> @@ -453,6 +488,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="draw_indicator">True</property> </object> <packing> @@ -469,19 +505,22 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox139"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkCheckButton" id="sort_ign_field_2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="draw_indicator">True</property> </object> <packing> @@ -495,6 +534,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="draw_indicator">True</property> </object> <packing> @@ -511,13 +551,15 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> <child> <object class="GtkVBox" id="vbox140"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <placeholder/> @@ -533,6 +575,8 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">2</property> </packing> </child> @@ -550,6 +594,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes"><b>Ignore Frequent Words</b></property> <property name="use_markup">True</property> </object> @@ -557,21 +602,25 @@ </object> <packing> <property name="expand">False</property> - <property name="position">1</property> + <property name="fill">True</property> + <property name="position">2</property> </packing> </child> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="left_padding">12</property> <child> <object class="GtkComboBox" id="track_exec_cmd_combo"> <property name="visible">True</property> + <property name="can_focus">False</property> </object> </child> </object> @@ -579,6 +628,7 @@ <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes"><b>Preferred Track Execution Command</b></property> <property name="use_markup">True</property> </object> @@ -587,7 +637,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">2</property> + <property name="position">3</property> </packing> </child> </object> @@ -595,6 +645,7 @@ <child type="tab"> <object class="GtkLabel" id="display_page_label"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes">Track Display</property> </object> <packing> @@ -604,4 +655,74 @@ </object> </child> </object> + <object class="GtkWindow" id="track_display_window"> + <property name="can_focus">False</property> + <child> + <object class="GtkVBox" id="track_display_vbox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <object class="GtkHBox" id="searchbar_hpanel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="border_width">6</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="current_playlist_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes"><span weight='bold' size='larger'>No playlist selected</span></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="search_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="invisible_char">●</property> + <property name="width_chars">20</property> + <property name="primary_icon_stock">gtk-find</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="track_window"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> </interface> diff --git a/plugins/track_display/track_display_preferences.c b/plugins/track_display/track_display_preferences.c index db2f263..8bec59b 100644 --- a/plugins/track_display/track_display_preferences.c +++ b/plugins/track_display/track_display_preferences.c @@ -419,6 +419,12 @@ G_MODULE_EXPORT void on_tm_sort_case_sensitive_toggled(GtkToggleButton *togglebu gtkpod_broadcast_preference_change("tm_case_sensitive", &val); } +G_MODULE_EXPORT void on_tm_sort_autostore_toggled(GtkToggleButton *togglebutton, gpointer user_data) { + gboolean val = gtk_toggle_button_get_active(togglebutton); + prefs_set_int("tm_autostore", val); + gtkpod_broadcast_preference_change("tm_autostore", &val); +} + GtkWidget *init_track_display_preferences() { GtkComboBox *cmd_combo; gint i = 0; @@ -461,6 +467,10 @@ GtkWidget *init_track_display_preferences() { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), prefs_get_int("tm_case_sensitive")); } + if ((w = gtkpod_builder_xml_get_widget(prefbuilder, "tm_cfg_autostore"))) { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), prefs_get_int("tm_autostore")); + } + gtk_builder_connect_signals(prefbuilder, NULL); return notebook; |
From: phantomjinx <pha...@us...> - 2011-10-15 22:13:29
|
commit 11966fb32846c2c557cca86c1bc7e938d2a1c927 Author: phantomjinx <p.g...@ph...> Date: Sat Oct 15 22:42:29 2011 +0100 Add multi-playlist support to context menu delete actions * playlist_display_context_menu.c * When multiple playlists are selected, allow the delete actions to delete all of them. .../playlist_display/playlist_display_actions.c | 9 +++-- .../playlist_display_context_menu.c | 30 ++++++++++++++++++- 2 files changed, 33 insertions(+), 6 deletions(-) --- diff --git a/plugins/playlist_display/playlist_display_actions.c b/plugins/playlist_display/playlist_display_actions.c index f8954b9..f153011 100644 --- a/plugins/playlist_display/playlist_display_actions.c +++ b/plugins/playlist_display/playlist_display_actions.c @@ -627,16 +627,17 @@ void on_pl_for_each_rating_activate(GtkAction *action, PlaylistDisplayPlugin* pl static void delete_selected_playlists(DeleteAction deleteaction) { GList *playlists = pm_get_selected_playlists(); + if (! playlists) { + message_sb_no_playlist_selected(); + return; + } + while (playlists) { Playlist *pl = playlists->data; if (pl) { gtkpod_set_current_playlist(pl); delete_playlist_head(deleteaction); } - else { - message_sb_no_playlist_selected(); - } - playlists = playlists->next; } } diff --git a/plugins/playlist_display/playlist_display_context_menu.c b/plugins/playlist_display/playlist_display_context_menu.c index 2e8adda..72b1bf5 100644 --- a/plugins/playlist_display/playlist_display_context_menu.c +++ b/plugins/playlist_display/playlist_display_context_menu.c @@ -47,12 +47,38 @@ static void context_menu_delete_playlist_head(GtkMenuItem *mi, gpointer data) { DeleteAction deleteaction = GPOINTER_TO_INT (data); - delete_playlist_head(deleteaction); + GList *playlists = pm_get_selected_playlists(); + if (! playlists) { + message_sb_no_playlist_selected(); + return; + } + + while (playlists) { + Playlist *pl = playlists->data; + if (pl) { + gtkpod_set_current_playlist(pl); + delete_playlist_head(deleteaction); + } + playlists = playlists->next; + } } void context_menu_delete_track_head(GtkMenuItem *mi, gpointer data) { DeleteAction deleteaction = GPOINTER_TO_INT (data); - delete_track_head(deleteaction); + GList *playlists = pm_get_selected_playlists(); + if (! playlists) { + message_sb_no_playlist_selected(); + return; + } + + while (playlists) { + Playlist *pl = playlists->data; + if (pl) { + gtkpod_set_current_playlist(pl); + delete_track_head(deleteaction); + } + playlists = playlists->next; + } } static GtkWidget *add_delete_all_tracks_from_ipod(GtkWidget *menu) { |