Merge lp:~evfool/midori/lp1263281 into lp:midori

Proposed by Robert Roth
Status: Merged
Approved by: Cris Dywan
Approved revision: no longer in the source branch.
Merged at revision: 6576
Proposed branch: lp:~evfool/midori/lp1263281
Merge into: lp:midori
Diff against target: 51 lines (+22/-2)
1 file modified
katze/katze-preferences.c (+22/-2)
To merge this branch: bzr merge lp:~evfool/midori/lp1263281
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+207759@code.launchpad.net

Commit message

Use GtkStackSwitcher with GTK+ >= 3.10

Description of the change

This branch does the following:
* defines a USE_STACK_SWITCHER cmake option (requiring USE_GTK3)
* if it is defined, katze-preferences.h undefines it, and redefines it based on the gtk version (>=3.10 required) and osx (osx uses a toolbar instead of the notebook tabs for navigation, and to keep that behaviour, I have decided to make it depend on that value)
* if after all this, USE_STACK_SWITCHER evaluates to true, instead of notebook tabs, stackswitcher and a stack is used for navigation.

To post a comment you must log in.
lp:~evfool/midori/lp1263281 updated
6561. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

6562. By Paweł Forysiuk

Don't bother adblocking internal pages and favicons

6563. By Robert Roth

Display locationbar suggestions in the correct order

6564. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

6565. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

6566. By Cris Dywan

Don't use unix-specific semantics for get_extension_config_dir

6567. By Paweł Forysiuk

Fix building with newer mingw versions

6568. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

6569. By Cris Dywan

Implement Open With extension dealing with file types

6570. By Paweł Forysiuk

Make cmake build code before processing data and translations

6571. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

Revision history for this message
Cris Dywan (kalikiana) wrote :

Can we have it enabled based on the GTK+ version? A new build flag is most likely not going to be picked up by packagers or testers and past experience shows that every flag can cost us heavily in bug fixing later.

I'll report back shortly on how the testing goes.

review: Needs Information
Revision history for this message
Cris Dywan (kalikiana) wrote :

Something's off: the row of buttons clings to the top left, and maybe the padding depends on theme but: if I enlarge the window there's a huge gap between the window titlebar and the row of buttons.

lp:~evfool/midori/lp1263281 updated
6572. By André Auzi

Implements context popup menu on menu entries of bookmark bar and bookmark menu.

6573. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

6574. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

Revision history for this message
Robert Roth (evfool) wrote :

Updated the branch:
* now stackswitcher in preferences is enabled for non-OSX systems on GTK>3.10.0
* fixed large gap between buttons and titlebar
* centered the stackswitcher in the window
I hopefully have addressed all your concerns, could I get another review?

lp:~evfool/midori/lp1263281 updated
6575. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

Revision history for this message
Cris Dywan (kalikiana) wrote :

Nice! Thanks a lot for the improvements. The version detection seems to work well.

review: Approve
lp:~evfool/midori/lp1263281 updated
6576. By Robert Roth

Use GtkStackSwitcher with GTK+ >= 3.10

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'katze/katze-preferences.c'
2--- katze/katze-preferences.c 2013-12-09 20:17:51 +0000
3+++ katze/katze-preferences.c 2014-02-28 22:38:24 +0000
4@@ -143,8 +143,12 @@
5 katze_preferences_prepare (KatzePreferences* preferences)
6 {
7 KatzePreferencesPrivate* priv = preferences->priv;
8-
9+
10+ #if GTK_CHECK_VERSION (3, 10, 0) & !HAVE_OSX
11+ priv->notebook = gtk_stack_new ();
12+ #else
13 priv->notebook = gtk_notebook_new ();
14+ #endif
15 gtk_container_set_border_width (GTK_CONTAINER (priv->notebook), 6);
16
17 #if HAVE_OSX
18@@ -156,7 +160,16 @@
19 gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (preferences))),
20 priv->toolbar, FALSE, FALSE, 0);
21 #else
22- priv->toolbar = NULL;
23+ #if GTK_CHECK_VERSION (3, 10, 0) & !HAVE_OSX
24+ priv->toolbar = gtk_stack_switcher_new ();
25+ gtk_stack_switcher_set_stack (GTK_STACK_SWITCHER (priv->toolbar), GTK_STACK (priv->notebook));
26+ gtk_widget_set_halign (priv->toolbar, GTK_ALIGN_CENTER);
27+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (preferences))),
28+ priv->toolbar, FALSE, FALSE, 0);
29+ #else
30+ priv->toolbar = NULL;
31+ #endif
32+
33 #endif
34 priv->toolbutton = NULL;
35 gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (preferences))),
36@@ -219,8 +232,15 @@
37 priv->sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
38 gtk_widget_show (priv->page);
39 gtk_container_set_border_width (GTK_CONTAINER (priv->page), 4);
40+ #if GTK_CHECK_VERSION (3, 10, 0) & !HAVE_OSX
41+ gtk_stack_add_titled (GTK_STACK (priv->notebook),
42+ priv->page, label, label);
43+ #else
44 gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
45 priv->page, gtk_label_new (label));
46+
47+ #endif
48+
49 #if HAVE_OSX
50 priv->toolbutton = GTK_WIDGET (priv->toolbutton ?
51 gtk_radio_tool_button_new_from_widget (

Subscribers

People subscribed via source and target branches

to all changes: