[easytag/wip/musicbrainz-support-merge: 9/69] Coding Style Improvements



commit 1ae3a324062cb3ef2c9613748a6fa47922512ac7
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       |   16 ++++++++++++++++
 src/musicbrainz_dialog.c |    1 +
 3 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/src/mb_search.c b/src/mb_search.c
index f621494..9634024 100644
--- a/src/mb_search.c
+++ b/src/mb_search.c
@@ -128,12 +128,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 1bd5efd..95d2bba 100644
--- a/src/mbentityview.c
+++ b/src/mbentityview.c
@@ -824,6 +824,19 @@ et_mb_entity_view_init (EtMbEntityView *entity_view)
 }
 
 /*
+ * delete_bread_crumb_button:
+ * @button: Button to delete.
+ * @data: User data
+ *
+ * Callback function to delete a button from bread crumb.
+ */
+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.
  * @treeRoot: GNode to set as tree root.
@@ -839,6 +852,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 3c881a7..dfdda5f 100644
--- a/src/musicbrainz_dialog.c
+++ b/src/musicbrainz_dialog.c
@@ -416,6 +416,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]