After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704217 - Make headerbar as titlebar and add close button
Make headerbar as titlebar and add close button
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: shell
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-14 23:25 UTC by Yosef Or Boczko
Modified: 2013-08-18 20:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell: Added parameter a padding for cc_shell_embed_widget_in_header (6.80 KB, patch)
2013-07-14 23:40 UTC, Yosef Or Boczko
none Details | Review
shell: Make headerbar as titlebar and add close button (4.32 KB, patch)
2013-07-15 00:16 UTC, Yosef Or Boczko
none Details | Review
shell: move the search entry to left of the headerbar (1.51 KB, patch)
2013-07-15 00:16 UTC, Yosef Or Boczko
none Details | Review
Screenshot - Settings: overview (94.03 KB, image/png)
2013-07-15 00:18 UTC, Yosef Or Boczko
  Details
Screenshot - Settings: Region & language (19.99 KB, image/png)
2013-07-15 00:21 UTC, Yosef Or Boczko
  Details
shell: Add class style "titlebar" to the headerbar for the csd (1.73 KB, patch)
2013-07-15 13:11 UTC, Yosef Or Boczko
none Details | Review
Screenshot - Settings: overview with CSD (96.41 KB, image/png)
2013-07-15 13:18 UTC, Yosef Or Boczko
  Details
Screenshot - Settings: Region & language with CSD (22.58 KB, image/png)
2013-07-15 13:19 UTC, Yosef Or Boczko
  Details
shell: Make headerbar as titlebar and add close button (3.41 KB, patch)
2013-08-12 19:24 UTC, Yosef Or Boczko
needs-work Details | Review
shell: create search bar and move to him the search entry (5.17 KB, patch)
2013-08-12 19:25 UTC, Yosef Or Boczko
none Details | Review
Screenshot - Settings: overview (run with GTK_CSD=1) (190.06 KB, image/png)
2013-08-12 19:26 UTC, Yosef Or Boczko
  Details
Screenshot - Settings: search page (150.53 KB, image/png)
2013-08-12 19:27 UTC, Yosef Or Boczko
  Details
Screenshot - Settings: Region & language (68.39 KB, image/png)
2013-08-12 19:28 UTC, Yosef Or Boczko
  Details
shell: Fix showing search bar in search from command line (921 bytes, patch)
2013-08-12 21:51 UTC, Yosef Or Boczko
none Details | Review
shell: Enable to hide the search bar with Escape (792 bytes, patch)
2013-08-12 21:56 UTC, Yosef Or Boczko
none Details | Review
shell: Focus search entry just if serach bar is showing (1.41 KB, patch)
2013-08-12 22:11 UTC, Yosef Or Boczko
none Details | Review
shell: create search bar and move to him the search entry (6.36 KB, patch)
2013-08-12 22:13 UTC, Yosef Or Boczko
none Details | Review
shell: create search bar and move to him the search entry (6.36 KB, patch)
2013-08-12 22:13 UTC, Yosef Or Boczko
needs-work Details | Review
shell: Set the headerbar as our titlebar and add a close button (4.73 KB, patch)
2013-08-18 17:50 UTC, Yosef Or Boczko
needs-work Details | Review
shell: Use a search bar for the search entry (6.52 KB, patch)
2013-08-18 19:37 UTC, Yosef Or Boczko
none Details | Review
shell: Set the headerbar as our titlebar and add a close button (4.74 KB, patch)
2013-08-18 20:03 UTC, Yosef Or Boczko
none Details | Review
shell: Set the headerbar as our titlebar and add a close button (4.86 KB, patch)
2013-08-18 20:12 UTC, Yosef Or Boczko
committed Details | Review
shell: Use a search bar for the search entry (6.49 KB, patch)
2013-08-18 20:14 UTC, Yosef Or Boczko
committed Details | Review

Description Yosef Or Boczko 2013-07-14 23:25:38 UTC
I'm not sure about the design, so the patches may vary.
Comment 1 Yosef Or Boczko 2013-07-14 23:40:05 UTC
Created attachment 249148 [details] [review]
shell: Added parameter a padding for cc_shell_embed_widget_in_header
Comment 2 Yosef Or Boczko 2013-07-15 00:16:12 UTC
Created attachment 249150 [details] [review]
shell: Make headerbar as titlebar and add close button
Comment 3 Yosef Or Boczko 2013-07-15 00:16:44 UTC
Created attachment 249151 [details] [review]
shell: move the search entry to left of the headerbar

there isn't enough space between the close button to title.
Comment 4 Yosef Or Boczko 2013-07-15 00:18:35 UTC
Created attachment 249152 [details]
Screenshot - Settings: overview
Comment 5 Yosef Or Boczko 2013-07-15 00:21:49 UTC
Created attachment 249153 [details]
Screenshot - Settings: Region & language
Comment 6 Yosef Or Boczko 2013-07-15 00:34:56 UTC
(In reply to comment #1)
> Created an attachment (id=249148) [details] [review]
> shell: Added parameter a padding for cc_shell_embed_widget_in_header

this for bug #703974#c6 and 703974#c9.
"I wonder if we should compensate for that with a right margin" and
"The right padding problem is also a blocker".
Comment 7 Yosef Or Boczko 2013-07-15 09:57:20 UTC
It is not intended for implementation.
Comment 8 Yosef Or Boczko 2013-07-15 13:11:42 UTC
Created attachment 249195 [details] [review]
shell: Add class style "titlebar" to the headerbar for the csd

Now you can try with GTK_CSD=1.
Comment 9 Yosef Or Boczko 2013-07-15 13:18:49 UTC
Created attachment 249196 [details]
Screenshot - Settings: overview with CSD

gnome-screenshot delete the background - it's probably a bug.
Comment 10 Yosef Or Boczko 2013-07-15 13:19:18 UTC
Created attachment 249197 [details]
Screenshot - Settings: Region & language with CSD
Comment 11 Yosef Or Boczko 2013-08-12 19:21:57 UTC
Reopening.
Allan Day said me that close button is for 3.10.
Comment 12 Yosef Or Boczko 2013-08-12 19:24:32 UTC
Created attachment 251413 [details] [review]
shell: Make headerbar as titlebar and add close button
Comment 13 Yosef Or Boczko 2013-08-12 19:25:14 UTC
Created attachment 251414 [details] [review]
shell: create search bar and move to him the search entry

(I ask Allan Day on this)
Comment 14 Yosef Or Boczko 2013-08-12 19:26:33 UTC
Created attachment 251415 [details]
Screenshot - Settings: overview (run with GTK_CSD=1)
Comment 15 Yosef Or Boczko 2013-08-12 19:27:36 UTC
Created attachment 251416 [details]
Screenshot - Settings: search page
Comment 16 Yosef Or Boczko 2013-08-12 19:28:01 UTC
Created attachment 251417 [details]
Screenshot - Settings: Region & language
Comment 17 Yosef Or Boczko 2013-08-12 21:51:41 UTC
Created attachment 251428 [details] [review]
shell: Fix showing search bar in search from command line
Comment 18 Yosef Or Boczko 2013-08-12 21:56:55 UTC
Created attachment 251429 [details] [review]
shell: Enable to hide the search bar with Escape
Comment 19 Yosef Or Boczko 2013-08-12 22:11:35 UTC
Created attachment 251430 [details] [review]
shell: Focus search entry just if serach bar is showing
Comment 20 Yosef Or Boczko 2013-08-12 22:13:04 UTC
Created attachment 251431 [details] [review]
shell: create search bar and move to him the search entry
Comment 21 Yosef Or Boczko 2013-08-12 22:13:21 UTC
Created attachment 251432 [details] [review]
shell: create search bar and move to him the search entry
Comment 22 Rui Matos 2013-08-18 17:27:00 UTC
Review of attachment 251413 [details] [review]:

Please change the commit title: "shell: Set the headerbar as our titlebar and add a close button"

As pointed on IRC we don't want the subtitle and the main view should be labeled as "All Settings".
Comment 23 Rui Matos 2013-08-18 17:38:02 UTC
Review of attachment 251432 [details] [review]:

Please change the commit title: "shell: Use a search bar for the search entry"

::: shell/cc-window.c
@@ +237,3 @@
   gtk_entry_set_text (GTK_ENTRY (priv->search_entry), "");
+  if (gtk_search_bar_get_search_mode (GTK_SEARCH_BAR (self->priv->search_bar)))
+    gtk_widget_grab_focus (priv->search_entry);

This makes us lose the "just start typing" search. We need some extra code in window_key_press_event to start the search mode in that case.

@@ +1450,3 @@
                                "titlebar");
 
+  /* priv button */

You mean "previous button", right?

@@ +1473,3 @@
+  gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
+  gtk_style_context_add_class (gtk_widget_get_style_context (button),
+                               "image-button");  

No trailing whitespace, please
Comment 24 Yosef Or Boczko 2013-08-18 17:50:37 UTC
Created attachment 252144 [details] [review]
shell: Set the headerbar as our titlebar and add a close button
Comment 25 Yosef Or Boczko 2013-08-18 19:37:16 UTC
Created attachment 252154 [details] [review]
shell: Use a search bar for the search entry
Comment 26 Rui Matos 2013-08-18 19:52:03 UTC
Review of attachment 252144 [details] [review]:

Almost fine.

::: shell/cc-window.c
@@ +1465,3 @@
   gtk_container_add (GTK_CONTAINER (priv->top_right_box), priv->lock_button);
+
+  gtk_widget_show_all (priv->top_right_box);

This works but looks weird. See below.

@@ +1480,3 @@
   create_header (self);
+  gtk_window_set_titlebar (GTK_WINDOW (self), priv->header);
+  gtk_header_bar_set_title (GTK_HEADER_BAR (priv->header), _(DEFAULT_WINDOW_TITLE));

This seems like the correct place to do the show_all() call on the headerbar just like below we do a show_all() on the box.

@@ +1539,2 @@
                        "resizable", TRUE,
                        "title", _(DEFAULT_WINDOW_TITLE),

This string should remain "Settings" since that's the name in the .desktop file and thus what shows up in gnome-shell's app picker and dash but the window title is what shows up in the overview and in alt+tab and we don't want them to be different.
Comment 27 Yosef Or Boczko 2013-08-18 20:03:40 UTC
Created attachment 252156 [details] [review]
shell: Set the headerbar as our titlebar and add a close button
Comment 28 Yosef Or Boczko 2013-08-18 20:12:53 UTC
Created attachment 252157 [details] [review]
shell: Set the headerbar as our titlebar and add a close button
Comment 29 Yosef Or Boczko 2013-08-18 20:14:46 UTC
Created attachment 252158 [details] [review]
shell: Use a search bar for the search entry
Comment 30 Rui Matos 2013-08-18 20:17:46 UTC
Review of attachment 252157 [details] [review]:

Looks good now
Comment 31 Rui Matos 2013-08-18 20:20:26 UTC
Review of attachment 252158 [details] [review]:

You can push after fixing that nit below.

::: shell/cc-window.c
@@ +1466,3 @@
+  gtk_widget_set_valign (priv->search_button, GTK_ALIGN_CENTER);
+  gtk_style_context_add_class (gtk_widget_get_style_context (priv->search_button),
+                               "image-button");  

trailing white space! yuck
Comment 32 Yosef Or Boczko 2013-08-18 20:23:49 UTC
Review of attachment 252157 [details] [review]:

pushed as 9de9364ba5ab28381f62fc41468381baff7a733c - shell: Set the headerbar as our titlebar and add a close button
Comment 33 Yosef Or Boczko 2013-08-18 20:24:18 UTC
Review of attachment 252158 [details] [review]:

pushed as ef995c072897d6a36fc2173b79cfa6347badc6d0 - shell: Use a search bar for the search entry