Merge lp:~robert-ancell/unity-control-center/legacy-width-code into lp:unity-control-center

Proposed by Robert Ancell on 2016-03-09
Status: Merged
Approved by: Sebastien Bacher on 2016-03-15
Approved revision: 12852
Merged at revision: 12855
Proposed branch: lp:~robert-ancell/unity-control-center/legacy-width-code
Merge into: lp:unity-control-center
Diff against target: 69 lines (+10/-28)
1 file modified
shell/gnome-control-center.c (+10/-28)
To merge this branch: bzr merge lp:~robert-ancell/unity-control-center/legacy-width-code
Reviewer Review Type Date Requested Status
Sebastien Bacher 2016-03-09 Approve on 2016-03-15
Review via email: mp+288580@code.launchpad.net

Commit message

Drop legacy g-c-c code for panel width.

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

right!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/gnome-control-center.c'
2--- shell/gnome-control-center.c 2014-02-24 17:28:38 +0000
3+++ shell/gnome-control-center.c 2016-03-09 22:24:54 +0000
4@@ -50,8 +50,7 @@
5 /* Use a fixed width for the shell, since resizing horizontally is more awkward
6 * for the user than resizing vertically
7 * Both sizes are defined in https://live.gnome.org/Design/SystemSettings/ */
8-#define FIXED_WIDTH 740
9-#define UNITY_FIXED_WIDTH 850
10+#define FIXED_WIDTH 850
11 #define FIXED_HEIGHT 650
12 #define SMALL_SCREEN_FIXED_HEIGHT 400
13
14@@ -1116,12 +1115,8 @@
15 gtk_widget_show (W (priv->builder, "search-entry"));
16 gtk_widget_hide (W (priv->builder, "lock-button"));
17
18- if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity"))
19- gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox),
20- UNITY_FIXED_WIDTH, NULL, &nat_height);
21- else
22- gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox),
23- FIXED_WIDTH, NULL, &nat_height);
24+ gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox),
25+ FIXED_WIDTH, NULL, &nat_height);
26 gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window),
27 priv->small_screen == SMALL_SCREEN_TRUE ? SMALL_SCREEN_FIXED_HEIGHT : nat_height);
28 }
29@@ -1130,22 +1125,12 @@
30 gtk_widget_hide (W (priv->builder, "search-entry"));
31 /* set the scrolled window small so that it doesn't force
32 the window to be larger than this panel */
33- if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) {
34- gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->window),
35- UNITY_FIXED_WIDTH, NULL, &nat_height);
36- gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window), MIN_ICON_VIEW_HEIGHT);
37- gtk_window_resize (GTK_WINDOW (priv->window),
38- UNITY_FIXED_WIDTH,
39- nat_height);
40- }
41- else {
42- gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->window),
43- FIXED_WIDTH, NULL, &nat_height);
44- gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window), MIN_ICON_VIEW_HEIGHT);
45- gtk_window_resize (GTK_WINDOW (priv->window),
46- FIXED_WIDTH,
47- nat_height);
48- }
49+ gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->window),
50+ FIXED_WIDTH, NULL, &nat_height);
51+ gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window), MIN_ICON_VIEW_HEIGHT);
52+ gtk_window_resize (GTK_WINDOW (priv->window),
53+ FIXED_WIDTH,
54+ nat_height);
55 }
56 }
57
58@@ -1605,10 +1590,7 @@
59 /* Main scrolled window */
60 priv->scrolled_window = W (priv->builder, "scrolledwindow1");
61
62- if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity"))
63- gtk_widget_set_size_request (priv->scrolled_window, UNITY_FIXED_WIDTH, -1);
64- else
65- gtk_widget_set_size_request (priv->scrolled_window, FIXED_WIDTH, -1);
66+ gtk_widget_set_size_request (priv->scrolled_window, FIXED_WIDTH, -1);
67 priv->main_vbox = W (priv->builder, "main-vbox");
68 g_signal_connect (priv->notebook, "notify::page",
69 G_CALLBACK (notebook_page_notify_cb), priv);

Subscribers

People subscribed via source and target branches