[easytag/wip/musicbrainz-support-merge: 11/75] Coding Style Improvements



commit 0e7eb84348f38222527bd0bea243dbc9a9b7403c
Author: Abhinav <abhijangda hotmail com>
Date:   Sun Jun 1 08:43:53 2014 +0530

    Coding Style Improvements

 src/mb_search.c          |    6 +++++-
 src/mbentityview.c       |    9 +++++++++
 src/musicbrainz_dialog.c |    1 +
 3 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/mb_search.c b/src/mb_search.c
index ebb7f86..db70347 100644
--- a/src/mb_search.c
+++ b/src/mb_search.c
@@ -136,12 +136,16 @@ et_musicbrainz_search_in_entity (enum MB_ENTITY_TYPE child_type,
                             g_assert (error == NULL || *error != NULL);
                             return FALSE;
                         }
+                        else
+                        {
+                            printf ("not cancelled\n");
+                        }
 
                         size = mb5_release_get_title ((Mb5Release)release, buf,
                                                       sizeof (buf));
                         buf [size] = '\0';
                         message = g_strdup_printf ("Retrieving %s (%d/%d)",
-                                                   buf, i,
+                                                   buf, i+1,
                                                    mb5_release_list_size (list));
                         et_show_status_msg_in_idle (message);
                         g_free (message);
diff --git a/src/mbentityview.c b/src/mbentityview.c
index 67c2fa6..a5cb3da 100644
--- a/src/mbentityview.c
+++ b/src/mbentityview.c
@@ -819,6 +819,12 @@ et_mb_entity_view_init (EtMbEntityView *entity_view)
                       G_CALLBACK (tree_view_row_activated), entity_view);
 }
 
+static void
+delete_bread_crumb_button (GtkWidget *button, gpointer data)
+{
+    gtk_container_remove (GTK_CONTAINER (data), button);
+}
+
 /*
  * et_mb_entity_view_set_tree_root:
  * @entity_view: EtMbEntityView for which tree root to set.
@@ -835,6 +841,9 @@ et_mb_entity_view_set_tree_root (EtMbEntityView *entity_view, GNode *treeRoot)
     priv = ET_MB_ENTITY_VIEW_GET_PRIVATE (entity_view);
     priv->mb_tree_root = treeRoot;
     priv->mb_tree_current_node = treeRoot;
+    gtk_container_foreach (GTK_CONTAINER (priv->bread_crumb_box),
+                           delete_bread_crumb_button,
+                           priv->bread_crumb_box);
     btn = insert_togglebtn_in_breadcrumb (GTK_BOX (priv->bread_crumb_box));
     child = g_node_first_child (treeRoot);
     if (child)
diff --git a/src/musicbrainz_dialog.c b/src/musicbrainz_dialog.c
index 1747a0e..df0e0af 100644
--- a/src/musicbrainz_dialog.c
+++ b/src/musicbrainz_dialog.c
@@ -403,6 +403,7 @@ et_open_musicbrainz_dialog ()
     mb_tree_root = g_node_new (NULL);
     entityView = et_mb_entity_view_new ();
     mbDialog = GTK_WIDGET (gtk_builder_get_object (builder, "mbDialog"));
+    gtk_widget_set_size_request (mbDialog, 600, 500);
     gtk_box_pack_start (GTK_BOX (gtk_builder_get_object (builder, "centralBox")),
                         entityView, TRUE, TRUE, 2);
     /* FIXME: This should not be needed. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]