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 733683 - Stop using GdHeaderButton
Stop using GdHeaderButton
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-24 15:09 UTC by Debarshi Ray
Modified: 2014-07-27 22:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Drop Gd.HeaderSimpleButton (7.64 KB, patch)
2014-07-24 15:16 UTC, Debarshi Ray
reviewed Details | Review
Drop Gd.HeaderToggleButton (1.41 KB, patch)
2014-07-24 15:24 UTC, Debarshi Ray
reviewed Details | Review
Drop Gd.HeaderMenuButton (2.98 KB, patch)
2014-07-24 16:25 UTC, Debarshi Ray
none Details | Review
Drop Gd.HeaderSimpleButton (7.30 KB, patch)
2014-07-26 06:33 UTC, Debarshi Ray
committed Details | Review
Drop Gd.HeaderToggleButton (1.33 KB, patch)
2014-07-26 06:34 UTC, Debarshi Ray
committed Details | Review
Drop Gd.HeaderMenuButton (2.89 KB, patch)
2014-07-26 06:35 UTC, Debarshi Ray
committed Details | Review
build: Drop unused libgd components (639 bytes, patch)
2014-07-27 06:14 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-07-24 15:09:30 UTC
These days we can accomplish the same using standard GTK+ API. So let's just use that.
Comment 1 Debarshi Ray 2014-07-24 15:16:47 UTC
Created attachment 281607 [details] [review]
Drop Gd.HeaderSimpleButton
Comment 2 Debarshi Ray 2014-07-24 15:24:47 UTC
Created attachment 281609 [details] [review]
Drop Gd.HeaderToggleButton
Comment 3 Cosimo Cecchi 2014-07-24 15:49:39 UTC
Review of attachment 281607 [details] [review]:

Does GtkImage not do the right thing if we just pass the icon name in without a pixel size?
Looks good otherwise.
Comment 4 Cosimo Cecchi 2014-07-24 15:50:00 UTC
Review of attachment 281609 [details] [review]:

See comment on the other patch.
Comment 5 Debarshi Ray 2014-07-24 16:25:55 UTC
Created attachment 281618 [details] [review]
Drop Gd.HeaderMenuButton

Should gtk_button_set_label be annotated as allow-none?
Comment 6 Debarshi Ray 2014-07-26 06:33:06 UTC
Created attachment 281750 [details] [review]
Drop Gd.HeaderSimpleButton
Comment 7 Debarshi Ray 2014-07-26 06:34:48 UTC
Created attachment 281751 [details] [review]
Drop Gd.HeaderToggleButton
Comment 8 Debarshi Ray 2014-07-26 06:35:35 UTC
Created attachment 281752 [details] [review]
Drop Gd.HeaderMenuButton
Comment 9 Debarshi Ray 2014-07-26 06:36:38 UTC
(In reply to comment #3)
> Review of attachment 281607 [details] [review]:
> 
> Does GtkImage not do the right thing if we just pass the icon name in without a
> pixel size?

You are right, it does. I have removed those. Do you want me to squash the patches? I kept them separate because I was replacing them one by one, but now I realize that there isn't much difference between them.
Comment 10 Cosimo Cecchi 2014-07-26 08:12:36 UTC
Review of attachment 281750 [details] [review]:

Looks good
Comment 11 Cosimo Cecchi 2014-07-26 08:12:58 UTC
Review of attachment 281751 [details] [review]:

Looks good
Comment 12 Cosimo Cecchi 2014-07-26 08:15:33 UTC
Review of attachment 281752 [details] [review]:

OK

::: src/mainToolbar.js
@@ +179,3 @@
 
+        if (this._selectionMenu) {
+            if (primary) {

Want to file a bug against GTK for the NULL-ability of gtk_button_set_label()?

@@ +181,3 @@
+            if (primary) {
+                this._selectionMenu.set_label(primary);
+                this._selectionMenu.get_child().use_markup = true;

I think it'd be nice if GtkButton supported this in a less hackish way - either by having a property on the button itself, or with a separate gtk_button_set_markup() method. Maybe file a bug against GTK for this as well?
Comment 13 Debarshi Ray 2014-07-27 06:14:00 UTC
Created attachment 281801 [details] [review]
build: Drop unused libgd components
Comment 14 Cosimo Cecchi 2014-07-27 12:39:55 UTC
Review of attachment 281801 [details] [review]:

Looks good