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 594053 - Use accessor functions instead direct access (use GSEAL GnomeGoal)
Use accessor functions instead direct access (use GSEAL GnomeGoal)
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on: 69872 478309 594535 609763
Blocks: 585391
 
 
Reported: 2009-09-03 16:35 UTC by Bastien Nocera
Modified: 2010-02-15 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use accessor functions instead direct acces (4.51 KB, patch)
2009-09-08 16:14 UTC, Javier Jardón (IRC: jjardon)
needs-work Details | Review
Use accessor functions instead direct access.part2 (45.87 KB, patch)
2009-09-08 17:55 UTC, Javier Jardón (IRC: jjardon)
needs-work Details | Review
Use accessor functions instead direct accessv2 (53.27 KB, patch)
2010-02-10 21:19 UTC, Javier Jardón (IRC: jjardon)
needs-work Details | Review
Use accessor functions instead direct access.v3 (52.99 KB, patch)
2010-02-12 17:29 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Bastien Nocera 2009-09-03 16:35:04 UTC
As per subject
Comment 1 Bastien Nocera 2009-09-04 13:15:22 UTC
commit 1c895947d4c69ec40e6a1e51ffccc4e2487edd13
Author: Bastien Nocera <hadess@hadess.net>
Date:   Fri Sep 4 14:14:18 2009 +0100

    Remove use of sealed struct members for volume popup
    
    As we now have an accessor function for the popup itself.
Comment 2 Javier Jardón (IRC: jjardon) 2009-09-08 16:14:56 UTC
Created attachment 142707 [details] [review]
Use accessor functions instead direct acces

Partial patch. No GTK+ bump required
Comment 3 Javier Jardón (IRC: jjardon) 2009-09-08 17:55:50 UTC
Created attachment 142714 [details] [review]
Use accessor functions instead direct access.part2

Requiered GTK+ cersion bumped to 2.17.10
I've used all the GTK+ 2.17.11 api available, still missing:
GTK_WIDGET_REALIZED ()
GTK_WIDGET_MAPPED ()
GTK_STATUSBAR ()->label
GTK_STAUSBAR ()->frame
Comment 4 Bastien Nocera 2009-12-15 20:04:54 UTC
Could you please update your patches?
Comment 5 Javier Jardón (IRC: jjardon) 2010-02-10 21:19:25 UTC
Created attachment 153472 [details] [review]
Use accessor functions instead direct accessv2

Here the updated patch,
sorry for the delay, I was waiting for the API was available in GTK+ (just landed in 2.19.5)
Comment 6 Bastien Nocera 2010-02-12 16:20:51 UTC
Review of attachment 153472 [details] [review]:

::: browser-plugin/totem-glow-button.c
@@ +248,3 @@
 	/* Draw a rectangle with bg[SELECTED] */
+	gdk_draw_rectangle (pixmap,
+			    gtk_widget_get_style (buttonw)->bg_gc[GTK_STATE_SELECTED],

Really don't like that. Do this in 2 steps instead.

@@ +272,2 @@
 	gdk_draw_drawable (pixmap,
+			   gtk_widget_get_style (widget)->bg_gc[GTK_STATE_NORMAL],

Same comment as above.

::: src/eggfileformatchooser.c
@@ +590,3 @@
 
+  if (gtk_window_get_group (parent))
+    gtk_window_group_add_window (gtk_window_get_group (parent), GTK_WINDOW (dialog));

Those changes need to go in libegg. A separate commit should be done to update this file.

::: src/totem-cell-renderer-video.c
@@ +440,3 @@
 	layout = gtk_widget_create_pango_layout (widget, priv->title);
 	if (pixbuf != NULL) {
+		PangoFontDescription *desc = pango_font_description_copy_static (gtk_widget_get_style (widget)->font_desc);

Separate call please.

::: src/totem-fullscreen.c
@@ +102,3 @@
 	screen = gtk_window_get_screen (GTK_WINDOW (priv->parent_window));
 	gdk_screen_get_monitor_geometry (screen,
+					 gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (priv->parent_window)),

Too long, please separate the calls.

::: src/totem-preferences.c
@@ +550,3 @@
+	gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (totem->prefs))), 2);
+	gtk_widget_reparent (GTK_WIDGET (item), gtk_dialog_get_content_area (GTK_DIALOG (totem->prefs)));
+	gtk_widget_show_all (gtk_dialog_get_content_area (GTK_DIALOG (totem->prefs)));

Could you please get the content_area just the once, and reuse it?
Comment 7 Javier Jardón (IRC: jjardon) 2010-02-12 17:29:44 UTC
Created attachment 153642 [details] [review]
Use accessor functions instead direct access.v3

Here a new patch with your comments.

I've sent a patch to libegg too and marked the bug as blocker of this one.
Comment 8 Bastien Nocera 2010-02-12 18:12:40 UTC
Comment on attachment 153642 [details] [review]
Use accessor functions instead direct access.v3

Ready to go in after the libegg changes have been made.
Comment 9 Javier Jardón (IRC: jjardon) 2010-02-12 18:54:33 UTC
Comment on attachment 153642 [details] [review]
Use accessor functions instead direct access.v3

commit eb74e996cbddfa6758b2bb392fbbaf7310adf3b6
Comment 10 Bastien Nocera 2010-02-15 12:28:29 UTC
Committed the patch from the other bug to Totem. Will update if there's any more spins of it.

commit e6b0a67f88ecccd13edf349379f30ac36812e04c
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Feb 15 12:27:00 2010 +0000

    Update eggfileformatchooser from bug 609763
    
    Fix compilation with GSEAL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=609763