Merge lp:~cavalier/midori/show-combobox_folder into lp:midori

Proposed by Peter de Ridder
Status: Merged
Approved by: André Stösel
Approved revision: 6346
Merged at revision: 6352
Proposed branch: lp:~cavalier/midori/show-combobox_folder
Merge into: lp:midori
Diff against target: 16 lines (+2/-2)
1 file modified
midori/midori-browser.c (+2/-2)
To merge this branch: bzr merge lp:~cavalier/midori/show-combobox_folder
Reviewer Review Type Date Requested Status
André Stösel Approve
André Auzi Abstain
Review via email: mp+179793@code.launchpad.net

Commit message

Show the bookmarks import location combobox.

To post a comment you must log in.
Revision history for this message
André Auzi (aauzi) wrote :

The change works.

It may had been achieved by just moving the "gtk_widget_show_all" and changing its parameter.

It would had become:

    gtk_container_add (GTK_CONTAINER (content_area), hbox);
    /* REMOVE THIS : gtk_widget_show_all (hbox); */

    combobox_folder = midori_bookmark_folder_button_new (browser->bookmarks, 0);
    gtk_container_add (GTK_CONTAINER (content_area), combobox_folder);

    /* INSERT THIS */
    gtk_widget_show_all (content_area);

This way the content_area is used consistently over the dialog creation and one preserves the defaut pack settings of dialog boxes which may become different from the one forced by the replacement of "gtk_container_add" by:

    gtk_box_pack_start (GTK_BOX (content_area), combobox_folder, FALSE, TRUE, 0);

review: Abstain
Revision history for this message
Peter de Ridder (cavalier) wrote :

Indeed the gtk_widget_show_all could be moved. And the packing change doesn't add anything to this function. I did it this way so I wouldn't get conflicts with another brach which is merged by now.

As you state, the default packing could be changed. This is the exact reason why you should use gtk_box_pack_start here. This did change between gtk2 and gtk3 and that broke a few dialogs.

If you want, I can update this branch with gtk_widget_show_all since the other branch is merged.

Revision history for this message
André Stösel (ivaldi) wrote :

Yes, please update this branch.

6345. By Peter de Ridder

Merge lp:midori

6346. By Peter de Ridder

Use a single show_all.

Revision history for this message
André Stösel (ivaldi) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-browser.c'
2--- midori/midori-browser.c 2013-08-12 19:21:06 +0000
3+++ midori/midori-browser.c 2013-08-15 21:35:54 +0000
4@@ -4515,10 +4515,10 @@
5 gtk_combo_box_set_active (combobox, 0);
6 gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
7 gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, TRUE, 0);
8- gtk_widget_show_all (hbox);
9
10 combobox_folder = midori_bookmark_folder_button_new (browser->bookmarks, 0);
11- gtk_container_add (GTK_CONTAINER (content_area), combobox_folder);
12+ gtk_box_pack_start (GTK_BOX (content_area), combobox_folder, FALSE, TRUE, 0);
13+ gtk_widget_show_all (content_area);
14
15 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
16 if (midori_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)

Subscribers

People subscribed via source and target branches

to all changes: