[easytag] Add padding to the legend in the scanner dialog



commit bde0d6309ef753225fb968ebe1401d142d05f70d
Author: Ekaterina Gerasimova <kittykat3756 gmail com>
Date:   Sun Apr 28 15:10:06 2013 +0100

    Add padding to the legend in the scanner dialog

 src/gtk2_compat.c |    8 ++++++++
 src/gtk2_compat.h |    4 ++++
 src/scan.c        |   32 ++++++++++++++++----------------
 3 files changed, 28 insertions(+), 16 deletions(-)
---
diff --git a/src/gtk2_compat.c b/src/gtk2_compat.c
index 1afe16e..f4cc8aa 100644
--- a/src/gtk2_compat.c
+++ b/src/gtk2_compat.c
@@ -93,3 +93,11 @@ void et_grid_attach_full (GtkGrid *grid, GtkWidget *child, gint left, gint top,
 }
 
 #endif /* GTK_CHECK_VERSION(3,0,0) */
+
+void et_grid_attach_margins (GtkGrid *grid, GtkWidget *child, gint left,
+                              gint top, gint width, gint height, gint hmargin,
+                              gint vmargin)
+{
+    et_grid_attach_full (grid, child, left, top, width, height, FALSE, FALSE,
+                         hmargin, vmargin);
+}
diff --git a/src/gtk2_compat.h b/src/gtk2_compat.h
index 058af62..e089d7b 100644
--- a/src/gtk2_compat.h
+++ b/src/gtk2_compat.h
@@ -53,6 +53,10 @@ void et_grid_attach_full (GtkGrid *grid, GtkWidget *child, gint left, gint top,
                           gint width, gint height, gboolean hexpand,
                           gboolean vexpand, gint hmargin, gint vmargin);
 
+void et_grid_attach_margins (GtkGrid *grid, GtkWidget *child, gint left,
+                             gint top, gint width, gint height, gint hmargin,
+                             gint vmargin);
+
 G_END_DECLS
 
 #endif /* GTK2_COMPAT_H_ */
diff --git a/src/scan.c b/src/scan.c
index ef16306..1bf35c0 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -2820,52 +2820,52 @@ void Open_ScannerWindow (gint scanner_type)
     gtk_container_add(GTK_CONTAINER(LegendFrame),Table);
     gtk_container_set_border_width(GTK_CONTAINER(Table),4);
     Label = gtk_label_new(_("%a: artist"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 0, 0, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 0, 0, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%z: album artist"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 0, 1, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 0, 1, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%b: album"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 0, 2, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 0, 2, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%c: comment"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 0, 3, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 0, 3, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%p: composer"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 0, 4, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 0, 4, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%r: copyright"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 0, 5, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 0, 5, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%d: disc number"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 1, 0, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 1, 0, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%e: encoded by"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 1, 1, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 1, 1, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%g: genre"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 1, 2, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 1, 2, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%i: ignored"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 1, 3, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 1, 3, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%l: number of tracks"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 1, 4, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 1, 4, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%o: orig. artist"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 1, 5, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 1, 5, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%n: track"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 2, 0, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 2, 0, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%t: title"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 2, 1, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 2, 1, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%u: URL"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 2, 2, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 2, 2, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
     Label = gtk_label_new(_("%y: year"));
-    gtk_grid_attach (GTK_GRID (Table), Label, 2, 3, 1, 1);
+    et_grid_attach_margins (GTK_GRID (Table), Label, 2, 3, 1, 1, 6, 0);
     gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
 
     /*


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