Merge lp:~dobey/libubuntuone/alertbar-align-3-0 into lp:libubuntuone/stable-3-0

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 159
Merged at revision: 159
Proposed branch: lp:~dobey/libubuntuone/alertbar-align-3-0
Merge into: lp:libubuntuone/stable-3-0
Diff against target: 84 lines (+22/-6)
2 files modified
libubuntuoneui/u1-music-store.c (+21/-5)
tests/test-music-store.c (+1/-1)
To merge this branch: bzr merge lp:~dobey/libubuntuone/alertbar-align-3-0
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Review via email: mp+103116@code.launchpad.net

Commit message

Enable line wrap on the alert label widget
Fix alignment and padding of icon, button, and alert bar
Fix test program to set default size on window properly, and to 640x480

To post a comment you must log in.
Revision history for this message
Manuel de la Peña (mandel) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntuoneui/u1-music-store.c'
2--- libubuntuoneui/u1-music-store.c 2012-04-10 15:21:48 +0000
3+++ libubuntuoneui/u1-music-store.c 2012-04-23 14:48:40 +0000
4@@ -1171,6 +1171,7 @@
5 const gchar *url_to_use;
6 SoupSession *session;
7 GtkWidget *alert_icon;
8+ GtkWidget *alignment;
9
10 g_type_init();
11
12@@ -1243,39 +1244,54 @@
13 gtk_container_add (GTK_CONTAINER (music_store->priv->scroll), music_store->priv->web_viewer);
14
15 /* Create the alert bar */
16- music_store->priv->alertbar = gtk_hbox_new (FALSE, 12);
17+ music_store->priv->alertbar = gtk_hbox_new (FALSE, 0);
18+ alignment = gtk_vbox_new (FALSE, 0);
19 alert_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
20 GTK_ICON_SIZE_MENU);
21- gtk_box_pack_start (GTK_BOX (music_store->priv->alertbar), alert_icon,
22- FALSE, FALSE, 0);
23+ gtk_box_pack_start (GTK_BOX (alignment), alert_icon, FALSE, FALSE, 0);
24+ gtk_box_pack_start (GTK_BOX (music_store->priv->alertbar), alignment,
25+ FALSE, FALSE, 6);
26 gtk_widget_show (alert_icon);
27+ gtk_widget_show (alignment);
28
29 music_store->priv->alert_label = gtk_label_new ("");
30 gtk_misc_set_alignment (GTK_MISC (music_store->priv->alert_label),
31 0.0, 0.5);
32+ gtk_label_set_line_wrap (GTK_LABEL (music_store->priv->alert_label),
33+ TRUE);
34 gtk_box_pack_start (GTK_BOX (music_store->priv->alertbar),
35 music_store->priv->alert_label,
36 TRUE, TRUE, 0);
37 gtk_widget_show (music_store->priv->alert_label);
38
39 /* Button to install MP3 codec if missing */
40+ alignment = gtk_vbox_new (FALSE, 0);
41 music_store->priv->install_btn = gtk_button_new_with_label (_("Install"));
42+ gtk_box_pack_start (GTK_BOX (alignment),
43+ music_store->priv->install_btn,
44+ FALSE, FALSE, 0);
45 gtk_box_pack_end (GTK_BOX (music_store->priv->alertbar),
46- music_store->priv->install_btn,
47+ alignment,
48 FALSE, FALSE, 6);
49 g_signal_connect (G_OBJECT (music_store->priv->install_btn), "clicked",
50 G_CALLBACK (_install_missing_codec), music_store);
51+ gtk_widget_show (alignment);
52
53 /* Check that MP3 codec is available */
54 g_timeout_add_seconds (3, (GSourceFunc) check_mp3_support, music_store);
55
56 /* Button to subscribe the Purchased Music folder */
57+ alignment = gtk_vbox_new (FALSE, 0);
58 music_store->priv->subscribe_btn = gtk_button_new_with_label (_("Subscribe"));
59+ gtk_box_pack_start (GTK_BOX (alignment),
60+ music_store->priv->subscribe_btn,
61+ FALSE, FALSE, 0);
62 gtk_box_pack_end (GTK_BOX (music_store->priv->alertbar),
63- music_store->priv->subscribe_btn,
64+ alignment,
65 FALSE, FALSE, 6);
66 g_signal_connect (G_OBJECT (music_store->priv->subscribe_btn), "clicked",
67 G_CALLBACK (subscribe_purchased_folder), music_store);
68+ gtk_widget_show (alignment);
69
70 gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->alertbar, FALSE, FALSE, 6);
71 gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->scroll, TRUE, TRUE, 0);
72
73=== modified file 'tests/test-music-store.c'
74--- tests/test-music-store.c 2012-04-10 15:21:48 +0000
75+++ tests/test-music-store.c 2012-04-23 14:48:40 +0000
76@@ -59,7 +59,7 @@
77
78 /* Create the main window */
79 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
80- gtk_widget_set_size_request (window, 839, 600);
81+ gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
82 g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
83
84 music_store = u1_music_store_new ();

Subscribers

People subscribed via source and target branches

to all changes: