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 597888 - Should build with -DGSEAL_ENABLE
Should build with -DGSEAL_ENABLE
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on: 69872 615292
Blocks: 585391
 
 
Reported: 2009-10-09 10:01 UTC by Maxim Ermilov
Modified: 2010-09-22 15:34 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
Patch for this bug (51.86 KB, patch)
2009-10-09 10:01 UTC, Maxim Ermilov
none Details | Review
Updated patch (52.15 KB, patch)
2009-10-15 10:39 UTC, Maxim Ermilov
needs-work Details | Review
Use accessor functions instead direct access (56.63 KB, patch)
2010-04-18 23:15 UTC, Maxim Ermilov
needs-work Details | Review
Use accessor functions instead direct access (57.07 KB, patch)
2010-04-19 13:22 UTC, Maxim Ermilov
none Details | Review
Use accessor functions instead direct access (62.30 KB, patch)
2010-04-19 23:17 UTC, Maxim Ermilov
committed Details | Review

Description Maxim Ermilov 2009-10-09 10:01:19 UTC
Created attachment 145111 [details] [review]
Patch for this bug

To be ready for GNOME 3 gnome-control-center should be able to build with
-DGSEAL_ENABLE

See http://live.gnome.org/GnomeGoals/UseGseal for more details

Also replace hack in capplets/common/theme-thumbnail.c.

Remaining functions: 
GTK_WIDGET_REALIZED
GTK_WIDGET_SET_FLAGS (, GTK_NO_WINDOW)
Comment 1 Javier Jardón (IRC: jjardon) 2009-10-09 11:40:25 UTC
Hello Maxim,

You can substitute 

GTK_WIDGET_SET_FLAGS (, GTK_NO_WINDOW)

with

gtk_widget_set_has_window()
Comment 2 Maxim Ermilov 2009-10-15 10:39:16 UTC
Created attachment 145498 [details] [review]
Updated patch

Remaining functions: 
GTK_WIDGET_REALIZED
Comment 3 Jens Granseuer 2009-10-17 16:26:41 UTC
Comment on attachment 145498 [details] [review]
Updated patch

I guess you wanted to remove that second line.

+    gtk_widget_set_has_window (scroll_area, TRUE);
     GTK_WIDGET_SET_FLAGS (scroll_area, GTK_NO_WINDOW);

Also, this looks a bit odd:
+                            <property name="yalign">0.4699999988079071</property>

Since the patch does a lot more than just replace field accesses 1:1 it should wait until we've branched for 2.30.

And I'm wondering if, when we have one function that calls gtk_get_xxx a dozen times, using a temporary var to store xxx might be a tad less, hm, verbose, at least.
Comment 4 André Klapper 2009-12-20 23:07:28 UTC
(In reply to comment #3)
> Since the patch does a lot more than just replace field accesses 1:1 it should
> wait until we've branched for 2.30.

Ping, as control-center has branched.
Comment 5 Javier Jardón (IRC: jjardon) 2009-12-21 17:03:09 UTC
(In reply to comment #3)
> (From update of attachment 145498 [details] [review])
> I guess you wanted to remove that second line.
> 
> +    gtk_widget_set_has_window (scroll_area, TRUE);
>      GTK_WIDGET_SET_FLAGS (scroll_area, GTK_NO_WINDOW);

I think that this should be:

gtk_widget_set_has_window (scroll_area, FALSE);
Comment 6 Maxim Ermilov 2010-04-18 23:15:17 UTC
Created attachment 159042 [details] [review]
Use accessor functions instead direct access
Comment 7 Javier Jardón (IRC: jjardon) 2010-04-18 23:35:13 UTC
Review of attachment 159042 [details] [review]:

The patch seems correct except the issue noted below.

Also, It would be nice if you store the variables instead call the same function several times.

::: capplets/display/scrollarea.c
@@ +765,3 @@
     gdk_window_set_user_data (area->priv->input_window, area);
+						    gtk_widget_get_window (widget)));
+    gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget),

You should use gtk_widget_style_attach () here.
Comment 8 Maxim Ermilov 2010-04-19 13:22:35 UTC
Created attachment 159070 [details] [review]
Use accessor functions instead direct access
Comment 9 Jens Granseuer 2010-04-19 20:14:56 UTC
(In reply to comment #7)
> Also, It would be nice if you store the variables instead call the same
> function several times.

I'm with Javier here.
Comment 10 Maxim Ermilov 2010-04-19 23:17:13 UTC
Created attachment 159123 [details] [review]
Use accessor functions instead direct access

don't call the same function several times
Comment 11 Jens Granseuer 2010-04-21 17:33:28 UTC
Comment on attachment 159123 [details] [review]
Use accessor functions instead direct access

Thanks, Maxim!
Comment 12 André Klapper 2010-04-22 15:32:03 UTC
So this now "only" needs fixing of libslab, or what is left?
Comment 13 Maxim Ermilov 2010-04-22 15:44:37 UTC
(In reply to comment #12)
> So this now "only" needs fixing of libslab, or what is left?

yes
Comment 14 Jens Granseuer 2010-04-23 17:04:20 UTC
Closing this, then.
Comment 15 André Klapper 2010-06-30 11:33:37 UTC
Patch in bug 615292 comment 14 is needed to fix this => reopening.
Comment 16 Javier Jardón (IRC: jjardon) 2010-07-15 01:37:09 UTC
Closing as #bug 615292 comment 14 is applied now
Comment 17 Bastien Nocera 2010-09-22 15:34:15 UTC
Closing for real :)