[easytag/wip/musicbrainz-support-merge: 16/75] FIXME (split) Coding Style Improvements and Converted Strings to Translatable Strings
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/musicbrainz-support-merge: 16/75] FIXME (split) Coding Style Improvements and Converted Strings to Translatable Strings
- Date: Sat, 30 Aug 2014 07:47:20 +0000 (UTC)
commit f68c6a7257b72712dc907e99c59fb6caaed84ee5
Author: Abhinav <abhijangda hotmail com>
Date: Sun Jun 15 16:58:19 2014 +0530
FIXME (split) Coding Style Improvements and Converted Strings to Translatable Strings
Makefile.am | 4 +-
src/mb_search.c | 56 +++++++++++++++++++--------------
src/mbentityview.c | 75 ++++++++++++++++++++++++++++------------------
src/mbentityview.h | 1 -
src/musicbrainz_dialog.c | 36 +++++++++++-----------
5 files changed, 98 insertions(+), 74 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a807319..15e4995 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -446,8 +446,8 @@ tests_test_musicbrainz_CFLAGS = \
tests_test_musicbrainz_SOURCES = \
tests/test-musibrainz.c \
- src/mb_search.c
-# src/musicbrainz_dialog.c
+ src/mb_search.c \
+ src/musicbrainz_dialog.c
tests_test_musicbrainz_LDADD = \
$(EASYTAG_LIBS)
diff --git a/src/mb_search.c b/src/mb_search.c
index 958bce7..1cb0a93 100644
--- a/src/mb_search.c
+++ b/src/mb_search.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include <glib/gi18n.h>
+
#include "mb_search.h"
#include "musicbrainz_dialog.h"
@@ -78,7 +80,7 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_assert (error == NULL || *error != NULL);
return FALSE;
}
@@ -107,7 +109,7 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
mb5_metadata_delete (metadata);
g_assert (error == NULL || *error != NULL);
@@ -117,7 +119,8 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
artist = mb5_metadata_get_artist (metadata);
list = mb5_artist_get_releaselist (artist);
param_values[0] = "artists release-groups";
- message = g_strdup_printf ("Found %d Album(s)", mb5_release_list_size (list));
+ message = g_strdup_printf (_("Found %d Album(s)"),
+ mb5_release_list_size (list));
et_show_status_msg_in_idle (message);
g_free (message);
@@ -125,6 +128,7 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
{
Mb5Release release;
release = mb5_release_list_item (list, i);
+
if (release)
{
Mb5Metadata metadata_release;
@@ -137,7 +141,7 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
mb5_metadata_delete (metadata);
g_assert (error == NULL || *error != NULL);
@@ -147,7 +151,7 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
size = mb5_release_get_title ((Mb5Release)release, buf,
sizeof (buf));
buf [size] = '\0';
- message = g_strdup_printf ("Retrieving %s (%d/%d)",
+ message = g_strdup_printf (_("Retrieving %s (%d/%d)"),
buf, i+1,
mb5_release_list_size (list));
et_show_status_msg_in_idle (message);
@@ -171,6 +175,7 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
}
}
}
+
mb5_metadata_delete (metadata);
}
else
@@ -214,7 +219,8 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
gchar *message;
track_list = mb5_medium_get_tracklist (medium);
- message = g_strdup_printf ("Found %d Track(s)", mb5_track_list_size (list));
+ message = g_strdup_printf (_("Found %d Track(s)"),
+ mb5_track_list_size (list));
et_show_status_msg_in_idle (message);
g_free (message);
@@ -222,11 +228,12 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
{
Mb5Recording recording;
+
if (g_cancellable_is_cancelled (cancellable))
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
mb5_metadata_delete (metadata);
g_assert (error == NULL || *error != NULL);
@@ -237,7 +244,7 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
size = mb5_recording_get_title (recording, buf,
sizeof (buf));
buf [size] = '\0';
- message = g_strdup_printf ("Retrieving %s (%d/%d)",
+ message = g_strdup_printf (_("Retrieving %s (%d/%d)"),
buf, j,
mb5_track_list_size (track_list));
et_show_status_msg_in_idle (message);
@@ -247,9 +254,10 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
buf,
sizeof (buf));
- metadata_recording = mb5_query_query (query, "recording",
- buf, "",
- 1, param_names,
+ metadata_recording = mb5_query_query (query,
+ "recording",
+ buf, "", 1,
+ param_names,
param_values);
entity = g_malloc (sizeof (EtMbEntity));
entity->entity = mb5_recording_clone (mb5_metadata_get_recording
(metadata_recording));
@@ -353,7 +361,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
g_assert (error == NULL || *error != NULL);
return FALSE;
@@ -383,7 +391,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
mb5_metadata_delete (metadata);
g_assert (error == NULL || *error != NULL);
@@ -433,7 +441,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
list = mb5_metadata_get_releaselist (metadata);
param_names [0] = "inc";
param_values [0] = "artists release-groups";
- message = g_strdup_printf ("Found %d Album(s)",
+ message = g_strdup_printf (_("Found %d Album(s)"),
mb5_release_list_size (list));
et_show_status_msg_in_idle (message);
g_free (message);
@@ -446,7 +454,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
mb5_metadata_delete (metadata);
g_assert (error == NULL || *error != NULL);
@@ -463,10 +471,10 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
EtMbEntity *entity;
int size;
- size = mb5_release_get_title ((Mb5Release)release, buf,
- sizeof (buf));
+ size = mb5_release_get_title ((Mb5Release)release,
+ buf, sizeof (buf));
buf [size] = '\0';
- message = g_strdup_printf ("Retrieving %s (%d/%d)",
+ message = g_strdup_printf (_("Retrieving %s (%d/%d)"),
buf, i,
mb5_release_list_size (list));
et_show_status_msg_in_idle (message);
@@ -517,7 +525,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
list = mb5_metadata_get_recordinglist (metadata);
param_names [0] = "inc";
param_values[0] = "releases artists";
- message = g_strdup_printf ("Found %d Track(s)",
+ message = g_strdup_printf (_("Found %d Track(s)"),
mb5_recording_list_size (list));
et_show_status_msg_in_idle (message);
g_free (message);
@@ -535,7 +543,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
mb5_metadata_delete (metadata);
g_assert (error == NULL || *error != NULL);
@@ -545,7 +553,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
recording = mb5_recording_list_item (list, i);
size = mb5_recording_get_title (recording, buf, sizeof (buf));
buf [size] = '\0';
- message = g_strdup_printf ("Retrieving %s (%d/%d)",
+ message = g_strdup_printf (_("Retrieving %s (%d/%d)"),
buf, i,
mb5_track_list_size (list));
et_show_status_msg_in_idle (message);
@@ -597,7 +605,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
list = mb5_disc_get_releaselist (disc);
param_names [0] = "inc";
param_values [0] = "artists release-groups";
- message = g_strdup_printf ("Found %d Album(s)",
+ message = g_strdup_printf (_("Found %d Album(s)"),
mb5_release_list_size (list));
et_show_status_msg_in_idle (message);
g_free (message);
@@ -610,7 +618,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
{
g_set_error (error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
mb5_query_delete (query);
mb5_metadata_delete (metadata);
g_assert (error == NULL || *error != NULL);
@@ -630,7 +638,7 @@ et_musicbrainz_search (gchar *string, enum MB_ENTITY_TYPE type, GNode *root,
size = mb5_release_get_title ((Mb5Release)release, buf,
sizeof (buf));
buf [size] = '\0';
- message = g_strdup_printf ("Retrieving %s (%d/%d)",
+ message = g_strdup_printf (_("Retrieving %s (%d/%d)"),
buf, i,
mb5_release_list_size (list));
et_show_status_msg_in_idle (message);
diff --git a/src/mbentityview.c b/src/mbentityview.c
index 2fe65f8..1a23e28 100644
--- a/src/mbentityview.c
+++ b/src/mbentityview.c
@@ -39,8 +39,8 @@ G_DEFINE_TYPE (EtMbEntityView, et_mb_entity_view, GTK_TYPE_BOX)
char *columns [MB_ENTITY_TYPE_COUNT][8] = {
{"Name", "Gender", "Type"},
- {"Name", "Artist", "Tracks", "Type"},
- {"Name", "Album", "Artist", "Time", "Number"},
+ {"Name", "Artist", "Type"},
+ {"Name", "Album", "Artist", "Time"},
};
/*
@@ -182,11 +182,13 @@ tree_filter_visible_func (GtkTreeModel *model, GtkTreeIter *iter,
{
gtk_tree_model_get (model, iter, MB_ARTIST_COLUMNS_N, &value, -1);
}
- else if (gtk_tree_model_get_n_columns (model) == MB_ALBUM_COLUMNS_N + 1)
+ else if (gtk_tree_model_get_n_columns (model) ==
+ MB_ALBUM_COLUMNS_N + 1)
{
gtk_tree_model_get (model, iter, MB_ALBUM_COLUMNS_N, &value, -1);
}
- else if (gtk_tree_model_get_n_columns (model) == MB_TRACK_COLUMNS_N + 1)
+ else if (gtk_tree_model_get_n_columns (model) ==
+ MB_TRACK_COLUMNS_N + 1)
{
gtk_tree_model_get (model, iter, MB_TRACK_COLUMNS_N, &value, -1);
}
@@ -268,7 +270,9 @@ add_iter_to_list_store (GtkListStore *list_store, GNode *node)
while (node)
{
Mb5Entity entity;
+
entity = ((EtMbEntity *)node->data)->entity;
+
switch (type)
{
case MB_ENTITY_TYPE_ARTIST:
@@ -278,7 +282,8 @@ add_iter_to_list_store (GtkListStore *list_store, GNode *node)
gtk_list_store_set (list_store, &iter,
MB_ARTIST_COLUMNS_NAME, name, -1);
- mb5_artist_get_gender ((Mb5Artist)entity, name, sizeof (name));
+ mb5_artist_get_gender ((Mb5Artist)entity, name,
+ sizeof (name));
gtk_list_store_set (list_store, &iter,
MB_ARTIST_COLUMNS_GENDER, name, -1);
@@ -321,7 +326,8 @@ add_iter_to_list_store (GtkListStore *list_store, GNode *node)
int size;
name_credit = mb5_namecredit_list_item (name_list, i);
name_credit_artist = mb5_namecredit_get_artist (name_credit);
- size = mb5_artist_get_name (name_credit_artist, name, sizeof (name));
+ size = mb5_artist_get_name (name_credit_artist, name,
+ sizeof (name));
g_string_append_len (gstring, name, size);
g_string_append_c (gstring, ' ');
}
@@ -342,7 +348,6 @@ add_iter_to_list_store (GtkListStore *list_store, GNode *node)
MB_ALBUM_COLUMNS_N, "black", -1);
}
- //TODO: Add number of tracks
release_group = mb5_release_get_releasegroup ((Mb5Release)entity);
mb5_releasegroup_get_primarytype (release_group, name,
sizeof (name));
@@ -351,14 +356,12 @@ add_iter_to_list_store (GtkListStore *list_store, GNode *node)
break;
case MB_ENTITY_TYPE_TRACK:
- mb5_recording_get_title ((Mb5Recording)entity, name, sizeof (name));
+ mb5_recording_get_title ((Mb5Recording)entity, name,
+ sizeof (name));
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
MB_TRACK_COLUMNS_NAME, name, -1);
- /* TODO: Get country and number */
- /*gtk_list_store_set (list_store, &iter,
- MB_TRACK_COLUMNS_COUNTRY, name, -1);*/
artist_credit = mb5_recording_get_artistcredit ((Mb5Release)entity);
if (artist_credit)
{
@@ -373,7 +376,8 @@ add_iter_to_list_store (GtkListStore *list_store, GNode *node)
name_credit = mb5_namecredit_list_item (name_list, i);
name_credit_artist = mb5_namecredit_get_artist (name_credit);
- size = mb5_artist_get_name (name_credit_artist, name, sizeof (name));
+ size = mb5_artist_get_name (name_credit_artist, name,
+ sizeof (name));
g_string_append_len (gstring, name, size);
g_string_append_c (gstring, ' ');
}
@@ -385,16 +389,19 @@ add_iter_to_list_store (GtkListStore *list_store, GNode *node)
}
release_list = mb5_recording_get_releaselist ((Mb5Recording)entity);
+
if (release_list)
{
gstring = g_string_new ("");
+
for (i = 0; i < mb5_release_list_size (release_list); i++)
{
Mb5Release release;
int size;
release = mb5_release_list_item (release_list, i);
- size = mb5_release_get_title (release, name, sizeof (name));
+ size = mb5_release_get_title (release, name,
+ sizeof (name));
g_string_append_len (gstring, name, size);
g_string_append_c (gstring, ' ');
}
@@ -458,7 +465,8 @@ show_data_in_entity_view (EtMbEntityView *entity_view)
/* Remove all colums */
list_cols = gtk_tree_view_get_columns (GTK_TREE_VIEW (priv->tree_view));
- for (list = g_list_first (list_cols); list != NULL; list = g_list_next (list))
+ for (list = g_list_first (list_cols); list != NULL;
+ list = g_list_next (list))
{
gtk_tree_view_remove_column (GTK_TREE_VIEW (priv->tree_view),
GTK_TREE_VIEW_COLUMN (list->data));
@@ -493,15 +501,16 @@ show_data_in_entity_view (EtMbEntityView *entity_view)
types [i] = G_TYPE_STRING;
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes (columns[type][i],
- renderer, "text", i,
- "foreground",
+ renderer, "text",
+ i, "foreground",
total_cols, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree_view), column);
}
/* Setting the colour column */
types [total_cols] = G_TYPE_STRING;
- priv->list_store = GTK_TREE_MODEL (gtk_list_store_newv (total_cols + 1, types));
+ priv->list_store = GTK_TREE_MODEL (gtk_list_store_newv (total_cols + 1,
+ types));
priv->filter = GTK_TREE_MODEL (gtk_tree_model_filter_new (priv->list_store,
NULL));
gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (priv->filter),
@@ -548,7 +557,8 @@ toggle_button_clicked (GtkWidget *btn, gpointer user_data)
}
children = gtk_container_get_children (GTK_CONTAINER (priv->bread_crumb_box));
- priv->mb_tree_current_node = priv->bread_crumb_nodes[g_list_index (children, btn)];
+ priv->mb_tree_current_node = priv->bread_crumb_nodes[g_list_index (children,
+ btn)];
priv->active_toggle_button = btn;
show_data_in_entity_view (entity_view);
}
@@ -585,7 +595,8 @@ search_in_levels_callback (GObject *source, GAsyncResult *res,
entity_view = thread_data->entity_view;
priv = ET_MB_ENTITY_VIEW_GET_PRIVATE (entity_view);
- gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
+ gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder,
+ "statusbar")),
0, "Retrieving Completed");
/* Check if child node has children or not */
if (!g_node_first_child (thread_data->child))
@@ -658,7 +669,7 @@ search_in_levels_thread_func (GSimpleAsyncResult *res, GObject *obj,
{
g_set_error (&error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_simple_async_report_gerror_in_idle (NULL,
mb5_search_error_callback,
NULL, error);
@@ -690,7 +701,7 @@ search_in_levels_thread_func (GSimpleAsyncResult *res, GObject *obj,
}
error = NULL;
- status_msg = g_strconcat ("Retrieving ", child_entity_type_str, "for ",
+ status_msg = g_strconcat (_("Retrieving "), child_entity_type_str, "for ",
parent_entity_str, NULL);
et_show_status_msg_in_idle (status_msg);
g_free (status_msg);
@@ -700,7 +711,7 @@ search_in_levels_thread_func (GSimpleAsyncResult *res, GObject *obj,
{
g_set_error (&error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_simple_async_report_gerror_in_idle (NULL,
mb5_search_error_callback,
NULL, error);
@@ -745,8 +756,8 @@ tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path,
entity_view = ET_MB_ENTITY_VIEW (user_data);
priv = ET_MB_ENTITY_VIEW_GET_PRIVATE (entity_view);
gtk_tree_model_get_iter (priv->filter, &filter_iter, path);
- gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (priv->filter), &iter,
- &filter_iter);
+ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (priv->filter),
+ &iter, &filter_iter);
depth = 0;
while (gtk_tree_model_iter_previous (priv->list_store, &iter))
@@ -766,7 +777,8 @@ tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path,
thread_data = g_malloc (sizeof (SearchInLevelThreadData));
thread_data->entity_view = ET_MB_ENTITY_VIEW (user_data);
thread_data->child = child;
- gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (priv->filter),
&thread_data->iter,
+ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (priv->filter),
+ &thread_data->iter,
&filter_iter);
if (((EtMbEntity *)child->data)->is_red_line)
{
@@ -775,7 +787,7 @@ tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path,
}
gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, "Starting MusicBrainz Search");
+ 0, _("Starting MusicBrainz Search"));
async_result = g_simple_async_result_new (NULL,
search_in_levels_callback,
thread_data,
@@ -848,6 +860,7 @@ et_mb_entity_view_set_tree_root (EtMbEntityView *entity_view, GNode *treeRoot)
EtMbEntityViewPrivate *priv;
GtkWidget *btn;
GNode *child;
+
priv = ET_MB_ENTITY_VIEW_GET_PRIVATE (entity_view);
priv->mb_tree_root = treeRoot;
priv->mb_tree_current_node = treeRoot;
@@ -856,20 +869,21 @@ et_mb_entity_view_set_tree_root (EtMbEntityView *entity_view, GNode *treeRoot)
priv->bread_crumb_box);
btn = insert_togglebtn_in_breadcrumb (GTK_BOX (priv->bread_crumb_box));
child = g_node_first_child (treeRoot);
+
if (child)
{
switch (((EtMbEntity *)child->data)->type)
{
case MB_ENTITY_TYPE_ARTIST:
- gtk_button_set_label (GTK_BUTTON (btn), "Artists");
+ gtk_button_set_label (GTK_BUTTON (btn), _("Artists"));
break;
case MB_ENTITY_TYPE_ALBUM:
- gtk_button_set_label (GTK_BUTTON (btn), "Albums");
+ gtk_button_set_label (GTK_BUTTON (btn), _("Albums"));
break;
case MB_ENTITY_TYPE_TRACK:
- gtk_button_set_label (GTK_BUTTON (btn), "Tracks");
+ gtk_button_set_label (GTK_BUTTON (btn), _("Tracks"));
break;
default:
@@ -1076,11 +1090,14 @@ et_mb_entity_view_select_down (EtMbEntityView *entity_view)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree_view));
selected_rows = gtk_tree_selection_get_selected_rows (selection,
&priv->filter);
+<<<<<<< HEAD
if (!selected_rows)
{
return;
}
+=======
+>>>>>>> d1b3578... Coding Style Improvements and Converted Strings to Translatable Strings
gtk_tree_model_get_iter (priv->filter, &iter,
g_list_last (selected_rows)->data);
if (!gtk_tree_model_iter_next (priv->filter, &iter))
diff --git a/src/mbentityview.h b/src/mbentityview.h
index d4958ec..7e6d39e 100644
--- a/src/mbentityview.h
+++ b/src/mbentityview.h
@@ -79,7 +79,6 @@ enum MB_ALBUM_COLUMNS
{
MB_ALBUM_COLUMNS_NAME,
MB_ALBUM_COLUMNS_ARTIST,
- MB_ALBUM_COLUMNS_TRACKS,
MB_ALBUM_COLUMNS_TYPE,
MB_ALBUM_COLUMNS_N
};
diff --git a/src/musicbrainz_dialog.c b/src/musicbrainz_dialog.c
index 253cea2..c24e49d 100644
--- a/src/musicbrainz_dialog.c
+++ b/src/musicbrainz_dialog.c
@@ -86,8 +86,8 @@ manual_search_callback (GObject *source, GAsyncResult *res,
et_mb_entity_view_set_tree_root (ET_MB_ENTITY_VIEW (entityView),
mb_tree_root);
- gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, "Searching Completed");
+ gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder,
+ "statusbar")), 0, _("Searching Completed"));
g_object_unref (res);
g_free (user_data);
@@ -109,8 +109,8 @@ static void
et_show_status_msg_in_idle_cb (GObject *obj, GAsyncResult *res,
gpointer user_data)
{
- gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, user_data);
+ gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder,
+ "statusbar")), 0, user_data);
g_free (user_data);
g_object_unref (res);
}
@@ -153,8 +153,8 @@ mb5_search_error_callback (GObject *source, GAsyncResult *res,
&dest);
Log_Print (LOG_ERROR,
_("Error searching MusicBrainz Database '%s'"), dest->message);
- gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, dest->message);
+ gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder,
+ "statusbar")), 0, dest->message);
g_error_free (dest);
}
@@ -181,7 +181,7 @@ manual_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
{
g_set_error (&error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_simple_async_report_gerror_in_idle (NULL,
mb5_search_error_callback,
NULL, error);
@@ -189,7 +189,7 @@ manual_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
}
thread_data = (ManualSearchThreadData *)g_async_result_get_user_data (G_ASYNC_RESULT (res));
- status_msg = g_strconcat ("Searching ", thread_data->text_to_search,
+ status_msg = g_strconcat (_("Searching "), thread_data->text_to_search,
NULL);
et_show_status_msg_in_idle (status_msg);
g_free (status_msg);
@@ -198,7 +198,7 @@ manual_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
{
g_set_error (&error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_simple_async_report_gerror_in_idle (NULL,
mb5_search_error_callback,
thread_data, error);
@@ -219,7 +219,7 @@ manual_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
{
g_set_error (&error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_simple_async_report_gerror_in_idle (NULL,
mb5_search_error_callback,
thread_data, error);
@@ -259,8 +259,8 @@ btn_manual_find_clicked (GtkWidget *btn, gpointer user_data)
thread_data->type = type;
thread_data->text_to_search = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (cb_manual_search));
mb5_search_cancellable = g_cancellable_new ();
- gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, "Starting MusicBrainz Search");
+ gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder,
+ "statusbar")), 0, _("Starting MusicBrainz Search"));
async_result = g_simple_async_result_new (NULL, manual_search_callback,
thread_data,
btn_manual_find_clicked);
@@ -411,7 +411,7 @@ selected_find_callback (GObject *source, GAsyncResult *res,
et_mb_entity_view_set_tree_root (ET_MB_ENTITY_VIEW (entityView),
mb_tree_root);
gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, "Searching Completed");
+ 0, _("Searching Completed"));
g_object_unref (res);
g_object_unref (((SelectedFindThreadData *)user_data)->hash_table);
g_free (user_data);
@@ -448,7 +448,7 @@ selected_find_thread_func (GSimpleAsyncResult *res, GObject *obj,
{
g_set_error (&error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_simple_async_report_gerror_in_idle (NULL,
mb5_search_error_callback,
thread_data, error);
@@ -551,7 +551,7 @@ bt_selected_find_clicked (GtkWidget *widget, gpointer user_data)
selected_find_thread_func, 0,
mb5_search_cancellable);
gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, "Starting Selected Files Search");
+ 0, _("Starting Selected Files Search"));
}
static void
@@ -569,7 +569,7 @@ discid_search_callback (GObject *source, GAsyncResult *res,
et_mb_entity_view_set_tree_root (ET_MB_ENTITY_VIEW (entityView),
mb_tree_root);
gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, "Searching Completed");
+ 0, _("Searching Completed"));
g_object_unref (res);
g_free (user_data);
}
@@ -605,7 +605,7 @@ discid_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
{
g_set_error (&error, ET_MB5_SEARCH_ERROR,
ET_MB5_SEARCH_ERROR_CANCELLED,
- "Operation cancelled by user");
+ _("Operation cancelled by user"));
g_simple_async_report_gerror_in_idle (NULL,
mb5_search_error_callback,
NULL, error);
@@ -635,7 +635,7 @@ btn_discid_search (GtkWidget *button, gpointer data)
{
mb5_search_cancellable = g_cancellable_new ();
gtk_statusbar_push (GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")),
- 0, "Starting MusicBrainz Search");
+ 0, _("Starting MusicBrainz Search"));
async_result = g_simple_async_result_new (NULL, discid_search_callback,
NULL,
btn_manual_find_clicked);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]