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 727068 - Use headerbar in all the dialogs and use popover
Use headerbar in all the dialogs and use popover
Status: RESOLVED FIXED
Product: gitg
Classification: Applications
Component: gitg
0.3.x
Other Linux
: Normal normal
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2014-03-26 02:25 UTC by Yosef Or Boczko
Modified: 2014-04-14 08:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bump requirements for GTK+ (770 bytes, patch)
2014-03-26 02:29 UTC, Yosef Or Boczko
committed Details | Review
Use headerbar in the commit dialog (5.58 KB, patch)
2014-03-26 02:29 UTC, Yosef Or Boczko
committed Details | Review
Use headerbar in the author details dialog (4.96 KB, patch)
2014-03-26 02:30 UTC, Yosef Or Boczko
none Details | Review
Use headerbar in the clone dialog (5.14 KB, patch)
2014-03-26 02:30 UTC, Yosef Or Boczko
committed Details | Review
Use headerbar in the preferences dialog (2.80 KB, patch)
2014-03-26 02:30 UTC, Yosef Or Boczko
needs-work Details | Review
Use popver for the gear menu (896 bytes, patch)
2014-03-26 02:30 UTC, Yosef Or Boczko
committed Details | Review
Use headerbar in the author details dialog (719 bytes, patch)
2014-04-02 15:58 UTC, Yosef Or Boczko
committed Details | Review
Use headerbar in the preferences dialog (3.26 KB, patch)
2014-04-14 08:06 UTC, Yosef Or Boczko
committed Details | Review

Description Yosef Or Boczko 2014-03-26 02:25:18 UTC
See the patches.
Comment 1 Yosef Or Boczko 2014-03-26 02:29:37 UTC
Created attachment 272945 [details] [review]
Bump requirements for GTK+
Comment 2 Yosef Or Boczko 2014-03-26 02:29:49 UTC
Created attachment 272946 [details] [review]
Use headerbar in the commit dialog
Comment 3 Yosef Or Boczko 2014-03-26 02:30:02 UTC
Created attachment 272947 [details] [review]
Use headerbar in the author details dialog
Comment 4 Yosef Or Boczko 2014-03-26 02:30:18 UTC
Created attachment 272948 [details] [review]
Use headerbar in the clone dialog
Comment 5 Yosef Or Boczko 2014-03-26 02:30:33 UTC
Created attachment 272949 [details] [review]
Use headerbar in the preferences dialog
Comment 6 Yosef Or Boczko 2014-03-26 02:30:44 UTC
Created attachment 272950 [details] [review]
Use popver for the gear menu
Comment 7 Ignacio Casal Quinteiro (nacho) 2014-04-02 14:55:32 UTC
Review of attachment 272945 [details] [review]:

Looks good.
Comment 8 Ignacio Casal Quinteiro (nacho) 2014-04-02 14:56:28 UTC
Review of attachment 272946 [details] [review]:

See comment.

::: gitg/commit/gitg-commit-dialog.vala
@@ +680,3 @@
 	              Ggit.Diff?     diff)
 	{
+		Object(author: author, diff: diff, use_header_bar: 1);

any reason to define this in the code and not in the ui file?
Comment 9 Ignacio Casal Quinteiro (nacho) 2014-04-02 14:58:07 UTC
Review of attachment 272947 [details] [review]:

Maybe I miss something here, but wasn't it the GtkDialog suppose to deal with the buttons redistribution by just setting the use-header-bar property?
Comment 10 Ignacio Casal Quinteiro (nacho) 2014-04-02 14:58:27 UTC
Review of attachment 272950 [details] [review]:

Looks good.
Comment 11 Ignacio Casal Quinteiro (nacho) 2014-04-02 14:59:32 UTC
Review of attachment 272949 [details] [review]:

Fine by me. Although shouldn't we remove at this point the response callback or override?
Comment 12 Yosef Or Boczko 2014-04-02 15:56:59 UTC
(In reply to comment #8)
> Review of attachment 272946 [details] [review]:
> 
> See comment.
> 
> ::: gitg/commit/gitg-commit-dialog.vala
> @@ +680,3 @@
>                    Ggit.Diff?     diff)
>      {
> +        Object(author: author, diff: diff, use_header_bar: 1);
> 
> any reason to define this in the code and not in the ui file?

Since we use templates, we needs to define this also in the code.
I don't know why, I just know if I removed this from the code I not see
any headerbar.

(In reply to comment #11)
> Review of attachment 272949 [details] [review]:
> 
> Fine by me. Although shouldn't we remove at this point the response callback or
> override?

You mean we needs to keep the follwing line?
<action-widget response="-7">button1</action-widget>
(I think we needs to remove it, because we removed the button1 widget.)
Comment 13 Yosef Or Boczko 2014-04-02 15:58:00 UTC
Created attachment 273485 [details] [review]
Use headerbar in the author details dialog
Comment 14 Ignacio Casal Quinteiro (nacho) 2014-04-03 09:06:08 UTC
ok, I recalled right now the issue about construct properties with templates. Just one change I ask you: use_header_bar: true instead of 1.
Comment 15 Yosef Or Boczko 2014-04-03 10:23:42 UTC
(In reply to comment #14)
> ok, I recalled right now the issue about construct properties with templates.
> Just one change I ask you: use_header_bar: true instead of 1.

The use-header-bar property is gint, not gboolean.
In Vala:
gitg/gitg-author-details-dialog.vala:46.12-46.31: error: Cannot convert from `bool' to `int'
			Object (use_header_bar: true);
			        ^^^^^^^^^^^^^^^^^^^^
https://developer.gnome.org/gtk3/3.12/GtkDialog.html#GtkDialog--use-header-bar
Comment 16 jessevdk@gmail.com 2014-04-03 10:26:02 UTC
From the docs:
For technical reasons, this property is declared as an integer property, but you should only set it to TRUE or FALSE.

Lame... technical reasons should not affect good API
Comment 17 Yosef Or Boczko 2014-04-03 10:28:20 UTC
(In reply to comment #16)
> From the docs:
> For technical reasons, this property is declared as an integer property, but
> you should only set it to TRUE or FALSE.
> 
> Lame... technical reasons should not affect good API

I think it work only in C, because in Vala true and false itn't an integer, right?
I guess in the .vapi file there is int and not bool property, so it is.
Comment 18 jessevdk@gmail.com 2014-04-03 10:34:10 UTC
Yes, you could maybe try (int)true instead of 1, but I don't think it's really worth it.
Comment 19 Yosef Or Boczko 2014-04-03 10:36:53 UTC
I think it more clean to write '1' and not try to convert types.

btw, how I can to change the type of the last file I attached?
I forgot to mark it at patch.
Comment 20 Yosef Or Boczko 2014-04-03 10:50:06 UTC
Thanks.

When you finish to review the patches, I'll push them together.
Comment 21 Ignacio Casal Quinteiro (nacho) 2014-04-14 07:56:19 UTC
Review of attachment 273485 [details] [review]:

Looks good.
Comment 22 Ignacio Casal Quinteiro (nacho) 2014-04-14 07:57:14 UTC
Review of attachment 272948 [details] [review]:

Looks good.
Comment 23 Ignacio Casal Quinteiro (nacho) 2014-04-14 07:57:40 UTC
Review of attachment 272946 [details] [review]:

Actually it looks good.
Comment 24 Ignacio Casal Quinteiro (nacho) 2014-04-14 07:59:21 UTC
Review of attachment 272949 [details] [review]:

I meant this here: https://git.gnome.org/browse/gitg/tree/gitg/gitg-application.vala#n244
I think that callback is not needed anymore, can you check?
Comment 25 Yosef Or Boczko 2014-04-14 08:06:14 UTC
Created attachment 274236 [details] [review]
Use headerbar in the preferences dialog
Comment 26 Ignacio Casal Quinteiro (nacho) 2014-04-14 08:07:41 UTC
Review of attachment 274236 [details] [review]:

Looks good.
Comment 27 Yosef Or Boczko 2014-04-14 08:09:09 UTC
Review of attachment 272945 [details] [review]:

Pushed as bc2c61b - Bump requirements for GTK+
Comment 28 Yosef Or Boczko 2014-04-14 08:09:42 UTC
Review of attachment 272946 [details] [review]:

Pushed as ce5c424 - Use headerbar in the commit dialog
Comment 29 Yosef Or Boczko 2014-04-14 08:10:08 UTC
Review of attachment 272948 [details] [review]:

Pushed as 1b4b38e - Use headerbar in the clone dialog
Comment 30 Yosef Or Boczko 2014-04-14 08:10:30 UTC
Review of attachment 272950 [details] [review]:

Pushed as 9504e8f - Use popver for the gear menu
Comment 31 Yosef Or Boczko 2014-04-14 08:10:48 UTC
Review of attachment 273485 [details] [review]:

Pushed as 05564e6 - Use headerbar in the author details dialog
Comment 32 Yosef Or Boczko 2014-04-14 08:11:06 UTC
Review of attachment 274236 [details] [review]:

Pushed as fd9d6c7 - Use headerbar in the preferences dialog