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 627455 - Fix compilation with deprecations
Fix compilation with deprecations
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 637480 (view as bug list)
Depends on: 597895
Blocks: 626688
 
 
Reported: 2010-08-20 04:56 UTC by Benjamin Otte (Company)
Modified: 2011-01-30 09:54 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
clock: Fix compile warning without NetworkManager (937 bytes, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
clock: Draw wih Cairo (2.39 KB, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
fish: Achievement unlocked: a face lift in Cairo (2.08 KB, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
background: Remove unused GC (2.47 KB, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
Gegls from outer Egypt (6.72 KB, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
panel: Draw button widget with Cairo (3.18 KB, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
panel: Draw frame widget with Cairo (4.82 KB, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
build: Explicitly link to libXrandr (2.42 KB, patch)
2010-08-20 04:56 UTC, Benjamin Otte (Company)
committed Details | Review
Move widgets to get_preferred_width/height() API instead of size_request() (30.82 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Use GDK_WINDOW_XID instead of deprecated GDK_WINDOW_XWINDOW (10.60 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Fix includes from libgnome-desktop (1.27 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Don't include gdkconfig.h (819 bytes, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Use GtkStateFlags instead of sealed GtkButton fields (3.45 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Use GdkAppLaunchContext instead of gdk_spawn_command_line_on_screen() (1.80 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Use gdk_x11_window_lookup_for_display() instead of gdk_window_lookup() (1.58 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Adapt to arguments changes in gdk_rgba_parse() and gdk_window_get_geometry() (1.70 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
Remove unused xstuff_net_wm_supports() (1.46 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
committed Details | Review
[Temp] Comment out blocks accessing GtkMenuShell internals (6.31 KB, patch)
2010-12-29 21:54 UTC, Milan Bouchet-Valat
rejected Details | Review
Fix libegg according to GDK deprecations (1.75 KB, patch)
2010-12-30 10:50 UTC, Germán Poo-Caamaño
committed Details | Review
Fix gdk_spawn_* by g_spawn_* and GdkApp (3.85 KB, patch)
2010-12-30 12:33 UTC, Germán Poo-Caamaño
committed Details | Review
Fix gdk_set_sm_client_id deprecated (1.04 KB, patch)
2010-12-30 13:16 UTC, Germán Poo-Caamaño
committed Details | Review
Fix gdk_spawn_on_screen deprecated (2.06 KB, patch)
2010-12-30 13:17 UTC, Germán Poo-Caamaño
committed Details | Review
Removed gdk_xid_table_lookup_for_display() (1.29 KB, patch)
2010-12-30 13:20 UTC, Germán Poo-Caamaño
committed Details | Review
Use gtk_widget_unset_state_flags in panel_menu.c:346 (panel_menu_button_menu_deactivated) (774 bytes, patch)
2010-12-30 17:46 UTC, David Ronis
committed Details | Review
Don't access GtkTreeViewColumn->editable_widget directly (1.70 KB, patch)
2011-01-05 13:52 UTC, Milan Bouchet-Valat
committed Details | Review
Fix use of deprecated gdk_app_launch_context_new() (3.23 KB, patch)
2011-01-07 10:30 UTC, Germán Poo-Caamaño
committed Details | Review
Fix use of deprecated gtk_widget_get_child_requisition() (2.49 KB, patch)
2011-01-07 10:38 UTC, Germán Poo-Caamaño
committed Details | Review
Fix use of deprecated gdk_cursor_unref (2.87 KB, patch)
2011-01-07 10:47 UTC, Germán Poo-Caamaño
committed Details | Review
Fix use of deprecated gtk_widget_size_request() (3.39 KB, patch)
2011-01-07 10:55 UTC, Germán Poo-Caamaño
committed Details | Review
Fix use of deprecated gdk_display_get_pointer() (1.57 KB, patch)
2011-01-08 03:01 UTC, Germán Poo-Caamaño
committed Details | Review
Fix use of deprecated gdk_display_pointer_ungrab() (1.16 KB, patch)
2011-01-08 03:02 UTC, Germán Poo-Caamaño
committed Details | Review
Fix use of deprecated gdk_pointer_grab()/_ungrab() (7.21 KB, patch)
2011-01-08 08:55 UTC, Germán Poo-Caamaño
committed Details | Review
Fix use of pending deprecated gdk_pointer_grab()/_ungrab() (2.54 KB, patch)
2011-01-08 09:10 UTC, Germán Poo-Caamaño
committed Details | Review
Port to GtkStyleContext (58.53 KB, patch)
2011-01-10 12:05 UTC, Milan Bouchet-Valat
needs-work Details | Review
Port to GtkStyleContext (58.68 KB, patch)
2011-01-11 22:36 UTC, Milan Bouchet-Valat
none Details | Review
Port to GtkStyleContext (58.68 KB, patch)
2011-01-11 22:47 UTC, Milan Bouchet-Valat
needs-work Details | Review
Port to GtkStyleContext (65.50 KB, patch)
2011-01-16 22:53 UTC, Milan Bouchet-Valat
needs-work Details | Review

Description Benjamin Otte (Company) 2010-08-20 04:56:02 UTC
The following patches make gnome-panel compile with GDK_DISABLE_DEPRECATED and -Werror here. (Well, I ignored the bonobo/ dir...)
The patches are mostly conversions to Cairo drawing plus some build fixes. I tested them a bit, but of course I don't know the code, so might have missed something obivous.
Comment 1 Benjamin Otte (Company) 2010-08-20 04:56:05 UTC
Created attachment 168353 [details] [review]
clock: Fix compile warning without NetworkManager

Don't compile a function that was only used by the NM code.
Comment 2 Benjamin Otte (Company) 2010-08-20 04:56:07 UTC
Created attachment 168354 [details] [review]
clock: Draw wih Cairo
Comment 3 Benjamin Otte (Company) 2010-08-20 04:56:11 UTC
Created attachment 168355 [details] [review]
fish: Achievement unlocked: a face lift in Cairo
Comment 4 Benjamin Otte (Company) 2010-08-20 04:56:14 UTC
Created attachment 168356 [details] [review]
background: Remove unused GC
Comment 5 Benjamin Otte (Company) 2010-08-20 04:56:17 UTC
Created attachment 168357 [details] [review]
Gegls from outer Egypt

Do the gegling with Cairo.
Comment 6 Benjamin Otte (Company) 2010-08-20 04:56:19 UTC
Created attachment 168358 [details] [review]
panel: Draw button widget with Cairo
Comment 7 Benjamin Otte (Company) 2010-08-20 04:56:22 UTC
Created attachment 168359 [details] [review]
panel: Draw frame widget with Cairo
Comment 8 Benjamin Otte (Company) 2010-08-20 04:56:25 UTC
Created attachment 168360 [details] [review]
build: Explicitly link to libXrandr

Makes things compile again here.
Comment 9 Javier Jardón (IRC: jjardon) 2010-09-22 12:33:38 UTC
Could this get a review, please?
Comment 10 Vincent Untz 2010-09-22 12:42:03 UTC
Yes, but not now, especially as we're in hard code freeze and this is no real bug fix :-)
Comment 11 Javier Jardón (IRC: jjardon) 2010-09-22 12:53:39 UTC
Oh, sorry. I thougth gnome-panel was already branched ;)
Comment 12 Christian Persch 2010-11-07 12:46:08 UTC
All these patches are incorporated on the gtk3 branch (I didn't see this bug when I made that, so there was some duplicated work; everything that still was applicable was taken from the patches here).
Comment 13 David Ronis 2010-11-10 16:49:26 UTC
Is there a tarball release covering these fixes?
Comment 14 Christian Persch 2010-11-11 21:39:30 UTC
No. They don't even work yet, it only compiles. You probably should use panel 2.32.x for now.
Comment 15 André Klapper 2010-12-19 00:42:41 UTC
vuntz: ping
Comment 16 André Klapper 2010-12-19 00:43:44 UTC
*** Bug 637480 has been marked as a duplicate of this bug. ***
Comment 17 Milan Bouchet-Valat 2010-12-29 18:45:38 UTC
I'm currently working on updating gnome-panel to build with recent API breaks (size requisition, GTK_WINDOW_XID, etc.). I'll attach patches in the next few days. So you're warned - avoid duplicate work! ;-)
Comment 18 Milan Bouchet-Valat 2010-12-29 21:54:22 UTC
Created attachment 177213 [details] [review]
Move widgets to get_preferred_width/height() API instead of size_request()

This is how current GTK+3 handles size requisitions. Most of the time,
it simply means splitting the function between height and width. When
possible, we ask children for minimal and natural sizes, but when it's
too complex, we just set minimal_size = natural_size.

This raises GTK+ 3 requirement to 2.91.7.
Comment 19 Milan Bouchet-Valat 2010-12-29 21:54:26 UTC
Created attachment 177214 [details] [review]
Use GDK_WINDOW_XID instead of deprecated GDK_WINDOW_XWINDOW

Required to build with recent GDK3.
Comment 20 Milan Bouchet-Valat 2010-12-29 21:54:31 UTC
Created attachment 177215 [details] [review]
Fix includes from libgnome-desktop

Path has changed with gnome-desktop 3.0.
Comment 21 Milan Bouchet-Valat 2010-12-29 21:54:34 UTC
Created attachment 177216 [details] [review]
Don't include gdkconfig.h

No need to include it directly, and it makes the build fail.
Comment 22 Milan Bouchet-Valat 2010-12-29 21:54:39 UTC
Created attachment 177217 [details] [review]
Use GtkStateFlags instead of sealed GtkButton fields

GTK_STATE_FLAG_ACTIVE means that the button is pressed, and
GTK_STATE_FLAG_PRELIGHT that pointer is over it.
Comment 23 Milan Bouchet-Valat 2010-12-29 21:54:42 UTC
Created attachment 177218 [details] [review]
Use GdkAppLaunchContext instead of gdk_spawn_command_line_on_screen()

The latter has been removed in GDK 3, so use GIO's GAppLaunchContext
and GAppInfo.
Comment 24 Milan Bouchet-Valat 2010-12-29 21:54:46 UTC
Created attachment 177219 [details] [review]
Use gdk_x11_window_lookup_for_display() instead of gdk_window_lookup()

The latter has been removed in GDK 3, use the new X11-specific equivalent.
Comment 25 Milan Bouchet-Valat 2010-12-29 21:54:50 UTC
Created attachment 177220 [details] [review]
Adapt to arguments changes in gdk_rgba_parse() and gdk_window_get_geometry()

Prototypes for these two functions have changed in GDK 3. gdk_rgba_parse()
has swapped color and spec, and gdk_window_get_geometry() has lost it's
depth argument.
Comment 26 Milan Bouchet-Valat 2010-12-29 21:54:54 UTC
Created attachment 177221 [details] [review]
Remove unused xstuff_net_wm_supports()

This function isn't used anywhere and calls gdk_net_wm_supports(),
which has been removed in GDK 3. If needed, it could be changed to
use gdk_x11_screen_supports_net_wm_hint(), but for now better remove
it altogether.
Comment 27 Milan Bouchet-Valat 2010-12-29 21:54:59 UTC
Created attachment 177222 [details] [review]
[Temp] Comment out blocks accessing GtkMenuShell internals

These blocks need to be ported to something else, but no solution
seems to exist in current GTK+ 3. Commenting them out allows the
build to succeed.
Comment 28 Milan Bouchet-Valat 2010-12-29 21:59:55 UTC
The port was actually quicker than I thought. I couldn't test my patches since we still need to find a solution for the GtkMenuShell issue (see comment #27). For now, gnome-panel builds with GTK+ 3, but it fails on start.

Maybe we could temporarily remove the GtkMenuShell stuff in a clean way so that gnome-panel can be tested, but I'd like to hear from you before that - if we can directly implement the fix, it would be better.
Comment 29 Vincent Untz 2010-12-29 22:12:59 UTC
Should have written this on the bug, not just on irc:

23:09 < vuntz> milanbv: ah, won't have time to look at them before next week since I'll be offline soon
23:09 < vuntz> milanbv: but to answer your last comment: I'd just remove the GtkMenuShell stuff that breaks things
23:10 < vuntz> milanbv: also, feel free to push all this to the gtk3 branch
23:10 < vuntz> milanbv: it might help other people
Comment 30 Milan Bouchet-Valat 2010-12-29 23:29:33 UTC
Ah, I just noticed there's a comment about GtkMenuShell at
https://bugzilla.gnome.org/show_bug.cgi?id=612481#c11

It seems we need to add functions to GTK+ to do what we want. Not sure what we should do in the meantime...
Comment 31 Germán Poo-Caamaño 2010-12-30 10:01:40 UTC
Review of attachment 177213 [details] [review]:

The patch looks fine to me. (Unfortunately, I did not realize
you were working on the same patch :( )
Comment 32 Germán Poo-Caamaño 2010-12-30 10:01:42 UTC
Review of attachment 177213 [details] [review]:

The patch looks fine to me. (Unfortunately, I did not realize
you were working on the same patch :( )
Comment 33 Germán Poo-Caamaño 2010-12-30 10:07:33 UTC
Review of attachment 177222 [details] [review]:

In this particular patch, it would be good to add some comments,
such as FIXME, that can help to catch them later.
Comment 34 Germán Poo-Caamaño 2010-12-30 10:50:59 UTC
Created attachment 177248 [details] [review]
Fix libegg according to GDK deprecations

Fix build of libegg (gdk)
Comment 35 Germán Poo-Caamaño 2010-12-30 10:52:28 UTC
Review of attachment 177215 [details] [review]:

Committed in gtk3
Comment 36 Germán Poo-Caamaño 2010-12-30 10:52:45 UTC
Review of attachment 177216 [details] [review]:

Committed in gtk3
Comment 37 Germán Poo-Caamaño 2010-12-30 10:52:59 UTC
Review of attachment 177217 [details] [review]:

Committed in gtk3
Comment 38 Germán Poo-Caamaño 2010-12-30 10:53:30 UTC
Review of attachment 177218 [details] [review]:

Committed in gtk3
Comment 39 Germán Poo-Caamaño 2010-12-30 10:53:48 UTC
Review of attachment 177219 [details] [review]:

Committed in gtk
Comment 40 Germán Poo-Caamaño 2010-12-30 10:54:19 UTC
Review of attachment 177220 [details] [review]:

Committed in gtk3
Comment 41 Germán Poo-Caamaño 2010-12-30 10:57:37 UTC
Review of attachment 177221 [details] [review]:

Committed in gtk3.

FWIW, xstuff is duplicated also in gnome-applets/trashapplet.
Comment 42 Germán Poo-Caamaño 2010-12-30 10:58:34 UTC
Review of attachment 177248 [details] [review]:

Committed in gtk3.
Comment 43 Germán Poo-Caamaño 2010-12-30 12:33:49 UTC
Created attachment 177255 [details] [review]
Fix gdk_spawn_* by g_spawn_* and GdkApp

Use GdkAppLaunchContext instead of gdk_spawn_command_line_on_screen() and use of
g_spawn_async instead of gdk_spawn_on_screen().

I also committed it.
Comment 44 Germán Poo-Caamaño 2010-12-30 13:16:00 UTC
Created attachment 177258 [details] [review]
Fix gdk_set_sm_client_id deprecated

Fix gdk_set_sm_client_id deprecated (replaced by gdk_x11_set_sm_client_id)
on panel-session.

I already committed it.
Comment 45 Germán Poo-Caamaño 2010-12-30 13:17:14 UTC
Created attachment 177259 [details] [review]
Fix gdk_spawn_on_screen deprecated

Fix gdk_spawn_on_screen deprecated on panel-launch.

(I forgot to include panel-launch in a previous commit :-/ )
Comment 46 Germán Poo-Caamaño 2010-12-30 13:20:59 UTC
Created attachment 177260 [details] [review]
Removed gdk_xid_table_lookup_for_display()

Removed gdk_xid_table_lookup_for_display()

According to the documentatiom, GTK+ only stores windows
in its X id table nowadays and the recomendation is to use
gdk_x11_window_lookup_for_display() which was already in
use.  Hence, if the returned value is != NULL then is a window
and we can ask to the user to kill the application.

I already committed it.  With the patch (not committed yet)
submitted by Milan (#c27), gnome-panel is compiling again.  
Now it is time to make it work.

Please check if the rationale is ok.
Comment 47 Milan Bouchet-Valat 2010-12-30 13:22:04 UTC
(In reply to comment #33)
> Review of attachment 177222 [details] [review]:
> 
> In this particular patch, it would be good to add some comments,
> such as FIXME, that can help to catch them later.
I don't think we should push that patch commenting out GtkMenuShell uses, it's really ugly, and it just meant to allow finding further build failures. If we commit something that isn't the final solution, it should be clean enough so that gnome-panel runs correctly.

OK to push attachment 177214 [details] [review] (use GDK_WINDOW_XID) too?
Comment 48 Milan Bouchet-Valat 2010-12-30 13:37:39 UTC
(In reply to comment #45)
> Created an attachment (id=177259) [details] [review]
> Fix gdk_spawn_on_screen deprecated
> 
> Fix gdk_spawn_on_screen deprecated on panel-launch.
> 
> (I forgot to include panel-launch in a previous commit :-/ )
Weird, I thought gnome-panel was building fine with my patches, and yet you found other occurrences of gdk_spawn_on_screen()... Anyway, maybe we should merge your patch with my attachment 177218 [details] [review], and don't bother using GdkAppLaunchContext since setting the DISPLAY env var is simpler?

About attachment 177260 [details] [review], it seems you forgot gdk_x11_window_lookup_for_display() in the if(). I really can't tell about the rationale, though - I just don't understand what you mean by "gdk_x11_window_lookup_for_display() which was already in
use".

Finally, I noticed there are a few gdk_rgba_parse() that need their arguments to be swapped, so this will require another rebase of my commits to be clean.
Comment 49 David Ronis 2010-12-30 17:30:28 UTC
The gtk3 head still doesn't compile, this time with:


panel-menu-button.c: In function 'panel_menu_button_menu_deactivated':
panel-menu-button.c:352:21: error: 'GtkButton' has no member named '_g_sealed__in_button'

I've attached a patch for this (although I don't know if local changes to state_flags propagate as intended).

Further compilation also fails with:

workspace-switcher.c: In function 'close_dialog':
workspace-switcher.c:824:9: error: 'GtkTreeViewColumn' has no member named '_g_sealed__editable_widget'
workspace-switcher.c:824:46: error: 'GtkTreeViewColumn' has no member named '_g_sealed__editable_widget'
workspace-switcher.c:825:40: error: 'GtkTreeViewColumn' has no member named '_g_sealed__editable_widget'
Comment 50 David Ronis 2010-12-30 17:46:33 UTC
Created attachment 177269 [details] [review]
Use gtk_widget_unset_state_flags in panel_menu.c:346 (panel_menu_button_menu_deactivated)

Patch promised in preceding comment
Comment 51 Milan Bouchet-Valat 2010-12-30 19:45:06 UTC
Review of attachment 177269 [details] [review]:

Thanks! I've pushed this patch with spacing fixes: you should have used tabs instead of two spaces, and added a space between a function name and parentheses.
Comment 52 Germán Poo-Caamaño 2010-12-30 21:52:55 UTC
(In reply to comment #48)
> (In reply to comment #45)
> > Created an attachment (id=177259) [details] [review] [details] [review]
> > Fix gdk_spawn_on_screen deprecated
> > 
> > Fix gdk_spawn_on_screen deprecated on panel-launch.
> > 
> > (I forgot to include panel-launch in a previous commit :-/ )
> Weird, I thought gnome-panel was building fine with my patches, and yet you
> found other occurrences of gdk_spawn_on_screen()... Anyway, maybe we should
> merge your patch with my attachment 177218 [details] [review], and don't bother using
> GdkAppLaunchContext since setting the DISPLAY env var is simpler?

I do not have an opinion here.  I would have used GdkAppLaunchContext,
but I could not find how to pass it argv and set the environment 
variable.  So, I thought GdkAppLaunchContext was better for
gdk_spawn_command_line_on_screen and g_spawn_async was better for
gdk_spawn_on_screen.

> About attachment 177260 [details] [review], it seems you forgot
> gdk_x11_window_lookup_for_display() in the if(). I really can't tell about the
> rationale, though - I just don't understand what you mean by
> "gdk_x11_window_lookup_for_display() which was already in
> use".

You are right.  I misread gdk_x11_lookup_xdisplay as 
gdk_x11_window_lookup_for_display, too (it was ~5:00 am ;-)

Fixed it gtk3.
Comment 53 Germán Poo-Caamaño 2010-12-30 22:02:28 UTC
(In reply to comment #47)
> (In reply to comment #33)
> > Review of attachment 177222 [details] [review]:
> > 
> > In this particular patch, it would be good to add some comments,
> > such as FIXME, that can help to catch them later.
> I don't think we should push that patch commenting out GtkMenuShell uses, it's
> really ugly, and it just meant to allow finding further build failures. If we
> commit something that isn't the final solution, it should be clean enough so
> that gnome-panel runs correctly.

Agreed. I was thinking on Vincent's comment (#c29):

"23:09 < vuntz> milanbv: but to answer your last comment: I'd just remove the
GtkMenuShell stuff that breaks things"

However, GtkMenuShell *really* breaks things:
- No popup menu in a menu item (to add menu items as launchers)
- The same for drag & drop items
- Workspace switcher
- Window menu

> OK to push attachment 177214 [details] [review] (use GDK_WINDOW_XID) too?

This is already applied:
http://git.gnome.org/browse/gnome-panel/commit/?h=gtk3&id=ec1d200d170d1ab0c4a5081296ea9f082a6cad0d
Comment 54 Germán Poo-Caamaño 2010-12-31 09:13:25 UTC
Review of attachment 177213 [details] [review]:

::: gnome-panel/button-widget.c
@@ -427,3 @@
 	ButtonWidget *button_widget = BUTTON_WIDGET (widget);
 
-	if (button_widget->priv->pixbuf) {

This condition is necessary, otherwise with no pixbuf
the width returned would be -1, producing several 
warnings.

I applied a fix on gtk3:
http://git.gnome.org/browse/gnome-panel/commit/?h=gtk3&id=2edaeb4abbc8ec6714aefd1fb83df9011d8a42a5
Comment 55 Germán Poo-Caamaño 2010-12-31 09:47:30 UTC
Review of attachment 177259 [details] [review]:

::: gnome-panel/libpanel-util/panel-launch.c
@@ +243,3 @@
+				G_SPAWN_SEARCH_PATH,
+				set_environment,
+				&display,

display should not be passed by reference.  I fixed it
on gtk3 branch.  The same for panel-run-dialog.
Comment 56 Milan Bouchet-Valat 2011-01-05 13:52:47 UTC
Created attachment 177564 [details] [review]
Don't access GtkTreeViewColumn->editable_widget directly

This member has been sealed. Use gtk_cell_area_get_edit_widget() instead.
Comment 57 David Ronis 2011-01-05 15:30:01 UTC
With this last patch, all of gnome-panel compiles.   Once it's committed how about a quick tarball release so that I can finish compiling 2.91.5 (under garnome)?

Thanks to all.
Comment 58 Milan Bouchet-Valat 2011-01-05 15:39:05 UTC
We need to decide what to do with the GtkMenuShell hack before... And then, check that gnome-panel more or less works...
Comment 59 Germán Poo-Caamaño 2011-01-05 18:46:27 UTC
(In reply to comment #58)
> We need to decide what to do with the GtkMenuShell hack before... And then,
> check that gnome-panel more or less works...

we might need accessors for:
- GtkMenuShell->active

  The solution provided in https://bugzilla.gnome.org/show_bug.cgi?id=595496#c17
  does not seem that we could apply it here.

- GtkMenuShell->active_menu_item
- GtkMenuShell->have_grab
- GtkMenuShell->parent_menu_shell

The bug for this accessors is also in gdm (see ttps://bugzilla.gnome.org/show_bug.cgi?id=612472) and https://bugzilla.gnome.org/show_bug.cgi?id=612481

Current state:
- There is no proper height for gnome-menu-bar.  When it is loaded in
  the panel, the panel change its height and it is huge (200px or so).
  It could be also a problem in the panel that does not restrict to the
  applets to a maximum size (I think I read a comment written by Vincent
  on this matter, but I could not find it quickly).
- Lacking of parent_menu_shell now means gnome-panel 
  crashes when you delete gnome-menu-bar applet from the panel.
- IIU, one of the hacks allows to press F10 and get a menu. I do not
  remember when was the last time it worked for me.  Does it work for
  any of you on the stable gnome-panel?
- The clock map crashes as soon as it tries to be shown.
Comment 60 André Klapper 2011-01-05 18:49:42 UTC
(In reply to comment #59)
> we might need accessors for:

Are there bug reports to depend on? See overview in bug 597610...
Comment 61 Germán Poo-Caamaño 2011-01-05 22:13:41 UTC
(In reply to comment #60)
> (In reply to comment #59)
> > we might need accessors for:
> 
> Are there bug reports to depend on? See overview in bug 597610...

Thanks André.  I checked them all of them, and only one of them
is already reported:

GtkMenuShell->active
GtkMenuShell->children (I missed this one previously).

Nevertheless, I was waiting for some feedback (or idea) before
asking for accessors.
Comment 62 André Klapper 2011-01-05 22:15:05 UTC
(In reply to comment #61)
> Nevertheless, I was waiting for some feedback (or idea) before
> asking for accessors.

We simply don't have time. GTK 2.99 is directly around the corner and expected to be API frozen. Might make sense to talk to gtk+ folks directly.
Comment 63 David Ronis 2011-01-05 22:45:25 UTC
I can confirm some of the run-time problems mentioned in comment #59.   I'd also like to add to Andre's preceding comment:  Without a functioning gnome-panel (in particular libpanel-applet) lots of gnome either won't compile or run properly.
Comment 64 Javier Jardón (IRC: jjardon) 2011-01-05 23:03:25 UTC
(In reply to comment #59)
> (In reply to comment #58)
> > We need to decide what to do with the GtkMenuShell hack before... And then,
> > check that gnome-panel more or less works...
> 
> we might need accessors for:
> - GtkMenuShell->active
> 
>   The solution provided in
> https://bugzilla.gnome.org/show_bug.cgi?id=595496#c17
>   does not seem that we could apply it here.
> 
> - GtkMenuShell->active_menu_item

Use gtk_menu_shell_get_selected_item()

> - GtkMenuShell->parent_menu_shell

Use gtk_menu_shell_get_parent_shell()

> - GtkMenuShell->children (I missed this one previously).

You can use gtk_container_get_children() here
Comment 65 Javier Jardón (IRC: jjardon) 2011-01-05 23:04:45 UTC
Patch for GtkMenuShell->active here:
https://bugzilla.gnome.org/show_bug.cgi?id=597895#c6
Comment 66 Javier Jardón (IRC: jjardon) 2011-01-05 23:06:18 UTC
Indeed, for GtkMenuShell->have_grab and GtkMenuShell->active , see federico comments in GDM bug: https://bugzilla.gnome.org/show_bug.cgi?id=612472#c11
Comment 67 Germán Poo-Caamaño 2011-01-05 23:49:22 UTC
(In reply to comment #64)
> (In reply to comment #59)
> > (In reply to comment #58)
> > > We need to decide what to do with the GtkMenuShell hack before... And then,
> > > check that gnome-panel more or less works...
> > 
> > we might need accessors for:
> > - GtkMenuShell->active
> > 
> >   The solution provided in
> > https://bugzilla.gnome.org/show_bug.cgi?id=595496#c17
> >   does not seem that we could apply it here.
> > 
> > - GtkMenuShell->active_menu_item
> 
> Use gtk_menu_shell_get_selected_item()
> 
> > - GtkMenuShell->parent_menu_shell
> 
> Use gtk_menu_shell_get_parent_shell()
> [...]

Thanks Javier.  Now I wonder why I do not get the 
documentation (neither the prototype) of these functions at http://library.gnome.org/devel/gtk/unstable/GtkMenuShell.html
Comment 68 Germán Poo-Caamaño 2011-01-06 00:50:55 UTC
(In reply to comment #66)
> Indeed, for GtkMenuShell->have_grab and GtkMenuShell->active , see federico
> comments in GDM bug: https://bugzilla.gnome.org/show_bug.cgi?id=612472#c11

But 2 of the 3 functions used are not available.

On the other hand, there is no access to GtkMenuShell->submenu
and I could not find accessors in gtk/gtkmenushell.c
Comment 69 Germán Poo-Caamaño 2011-01-06 00:55:32 UTC
(In reply to comment #68)
> (In reply to comment #66)
> > Indeed, for GtkMenuShell->have_grab and GtkMenuShell->active , see federico
> > comments in GDM bug: https://bugzilla.gnome.org/show_bug.cgi?id=612472#c11
> 
> But 2 of the 3 functions used are not available.
> 
> On the other hand, there is no access to GtkMenuShell->submenu
> and I could not find accessors in gtk/gtkmenushell.c

Never mind. It should be gtk_menu_item_get_submenu.
Comment 70 Germán Poo-Caamaño 2011-01-06 02:32:20 UTC
Review of attachment 177564 [details] [review]:

I applied this patch, but I changed the spaces by tabs

I just followed the convention of the function, but it
seems there is a mix between tabs and spaces in gnome-panel
files.
Comment 71 Germán Poo-Caamaño 2011-01-06 07:18:58 UTC
I committed 3 patches that fixes the following 
sealed fields:
- GtkMenuShell->active_menu_item (->submenu)
- GtkMenuShell->parent_menu_shell
- GtkMenuShell->children (->data)

The missing parts are related to grab/ungrab the focus
(keyboard and/or the pointer), which involves the 
following sealed fields:
- GtkMenuShell->have_grab
- GtkMenuShell->active
and also the deprecated function gdk_pointer_grab.

It seems to help the focus in the panel in order to
use the keyboard.  IMVHO, we could drop the code, get
the compilation done properly, fix the crashes, fix
the main features works, and open a new bug with this
regression.

Another alternative is to implement menu_popup using the
api available.  FWIW, the current code in wcnk (copied 
from gtkmenubar.c) was introduced to replace the 
machinery in wnck. See 
https://bugzilla.gnome.org/review?bug=160450&attachment=35166
Comment 72 David Ronis 2011-01-06 14:55:17 UTC
My build no longer works with last night's updates.

Here's the log:

libtool: link: /usr/bin/gcc -I/opt/garnome-svn-2.91.5/include -O2 -g -pipe -DGWEATHER_I_KNOW_THIS_IS_UNSTABLE -Wl,--export-dynamic -o gnome-panel gnome_panel-panel-typebuiltins.o gnome_panel-panel-marshal.o gnome_panel-main.o gnome_panel-panel-widget.o gnome_panel-button-widget.o gnome_panel-xstuff.o gnome_panel-panel-session.o gnome_panel-panel-compatibility.o gnome_panel-panel.o gnome_panel-applet.o gnome_panel-drawer.o gnome_panel-panel-config-global.o gnome_panel-panel-util.o gnome_panel-panel-gconf.o gnome_panel-panel-properties-dialog.o gnome_panel-panel-run-dialog.o gnome_panel-menu.o gnome_panel-panel-context-menu.o gnome_panel-launcher.o gnome_panel-panel-applet-frame.o gnome_panel-panel-applets-manager.o gnome_panel-panel-shell.o gnome_panel-panel-background.o gnome_panel-panel-background-monitor.o gnome_panel-panel-stock-icons.o gnome_panel-panel-action-button.o gnome_panel-panel-menu-bar.o gnome_panel-panel-menu-button.o gnome_panel-panel-menu-items.o gnome_panel-panel-separator.o gnome_panel-panel-recent.o gnome_panel-panel-action-protocol.o gnome_panel-panel-toplevel.o gnome_panel-panel-struts.o gnome_panel-panel-frame.o gnome_panel-panel-xutils.o gnome_panel-panel-multiscreen.o gnome_panel-panel-a11y.o gnome_panel-panel-bindings.o gnome_panel-panel-profile.o gnome_panel-panel-force-quit.o gnome_panel-panel-lockdown.o gnome_panel-panel-addto.o gnome_panel-panel-ditem-editor.o gnome_panel-panel-modules.o gnome_panel-panel-applet-info.o -pthread -Wl,--export-dynamic  -L/opt/garnome-svn-2.91.5/lib ../gnome-panel/libegg/.libs/libegg.a -L/lib ../gnome-panel/libpanel-applet-private/.libs/libpanel-applet-private.a ../gnome-panel/libpanel-util/.libs/libpanel-util.a /opt/garnome-svn-2.91.5/lib/libgnome-desktop-3.so /opt/garnome-svn-2.91.5/lib/libstartup-notification-1.so /usr/lib/libSM.so -luuid /usr/lib/libICE.so /opt/garnome-svn-2.91.5/lib/libgconf-2.so /opt/garnome-svn-2.91.5/lib/libORBit-2.so /opt/garnome-svn-2.91.5/lib/libgnome-menu.so /opt/garnome-svn-2.91.5/lib/libcanberra-gtk3.so -L/usr/local/samba/lib /opt/garnome-svn-2.91.5/lib/libcanberra.so /usr/lib/libvorbisfile.so /usr/lib/libvorbis.so /usr/lib/libogg.so -ltdb /opt/garnome-svn-2.91.5/lib/libltdl.so /opt/garnome-svn-2.91.5/lib/libgtk-3.0.so /opt/garnome-svn-2.91.5/lib/libgdk-3.0.so /opt/garnome-svn-2.91.5/lib/libatk-1.0.so /opt/garnome-svn-2.91.5/lib/libpangocairo-1.0.so /opt/garnome-svn-2.91.5/lib/libpangoft2-1.0.so /usr/lib/libstdc++.so /usr/lib/libXinerama.so /usr/lib/libXi.so /usr/lib/libXcursor.so /usr/lib/libXcomposite.so /usr/lib/libXdamage.so /opt/garnome-svn-2.91.5/lib/libgdk_pixbuf-2.0.so /opt/garnome-svn-2.91.5/lib/libcairo-gobject.so /opt/garnome-svn-2.91.5/lib/libgio-2.0.so -lresolv /usr/lib/libXfixes.so /opt/garnome-svn-2.91.5/lib/libcairo.so /usr/lib/libpixman-1.so /usr/lib/libpng12.so /opt/garnome-svn-2.91.5/lib/libpango-1.0.so -lm /opt/garnome-svn-2.91.5/lib/libfontconfig.so /opt/garnome-svn-2.91.5/lib/libfreetype.so -lz /usr/lib/libexpat.so /opt/garnome-svn-2.91.5/lib/libgmodule-2.0.so /opt/garnome-svn-2.91.5/lib/libdbus-glib-1.so /opt/garnome-svn-2.91.5/lib/libdbus-1.so /opt/garnome-svn-2.91.5/lib/libgobject-2.0.so /opt/garnome-svn-2.91.5/lib/libgthread-2.0.so -lpthread /opt/garnome-svn-2.91.5/lib/libglib-2.0.so /opt/garnome-svn-2.91.5/lib/libiconv.so -lrt /usr/lib/libXrandr.so /usr/lib/libXext.so /usr/lib/libXrender.so /usr/lib/libX11.so /usr/lib/libxcb.so /usr/lib/libXdmcp.so -ldl /usr/lib/libXau.so -pthread -Wl,-rpath -Wl,/opt/garnome-svn-2.91.5/lib -Wl,-rpath -Wl,/opt/garnome-svn-2.91.5/lib
gnome_panel-menu.o: In function `drag_end_menu_cb':
/home/ronis/Project/notar/GNOME/garnome/svn/gnome-panel/work/main.d/gnome-panel-git/gnome-panel/menu.c:1055: undefined reference to `gtk_menu_shell_get_parent_shell'
gnome_panel-menu.o: In function `restore_grabs':
/home/ronis/Project/notar/GNOME/garnome/svn/gnome-panel/work/main.d/gnome-panel-git/gnome-panel/menu.c:840: undefined reference to `gtk_menu_shell_get_parent_shell'
gnome_panel-menu.o: In function `panel_menu_key_press_handler':
/home/ronis/Project/notar/GNOME/garnome/svn/gnome-panel/work/main.d/gnome-panel-git/gnome-panel/menu.c:1917: undefined reference to `gtk_menu_shell_get_selected_item'
collect2: ld returned 1 exit status
Comment 73 Milan Bouchet-Valat 2011-01-06 15:09:56 UTC
I guess you need to update you GTK+, Germán added these fonctions just yesterday.
Comment 74 David Ronis 2011-01-06 19:56:23 UTC
I just updated gtk+ to 2.99.0, updated my gnome-panel sources and tried building

I now get compile errors:

menu.c: In function 'restore_grabs':
menu.c:844:50: error: 'GtkMenuShell' has no member named 'GSEAL'
menu.c:844:58: error: 'have_xgrab' undeclared (first use in this function)
menu.c:844:58: note: each undeclared identifier is reported only once for each function it appears in
menu.c:857:33: error: 'GtkMenuShell' has no member named 'GSEAL'
menu.c: In function 'drag_end_menu_cb':
menu.c:1071:34: error: 'GtkMenuShell' has no member named 'GSEAL'
menu.c:1071:42: error: 'have_xgrab' undeclared (first use in this function)
make[4]: *** [gnome_panel-menu.o] Error 1
make[4]: Leaving directory `/home/ronis/Project/notar/GNOME/garnome/svn/gnome-panel/work/main.d/gnome-panel-git/gnome-panel'


I thought all the gseal's were eliminated?  Is my repository corrupted?
Comment 75 Milan Bouchet-Valat 2011-01-06 19:59:35 UTC
They haven't - they were only commented out with my ugly patch (attachment 177222 [details] [review]). See comments above.
Comment 76 Germán Poo-Caamaño 2011-01-06 20:12:43 UTC
(In reply to comment #74)
> I just updated gtk+ to 2.99.0, updated my gnome-panel sources and tried
> building
> 
> I now get compile errors:
> [...]
> I thought all the gseal's were eliminated?  Is my repository corrupted?

No, according to my comment (c#71) those are still pending.  There
are 3 files involved:
- applets/wncklet/window-menu.c
- gnome-panel/menu.c
- gnome-panel/panel-menu-bar.c

Also, I found the explanation for F10 and grabbing the focus.  This is
still an issue with stable gnome-panel:
https://bugzilla.gnome.org/show_bug.cgi?id=99297
Comment 77 Germán Poo-Caamaño 2011-01-07 10:30:29 UTC
Created attachment 177733 [details] [review]
Fix use of deprecated gdk_app_launch_context_new()
Comment 78 Germán Poo-Caamaño 2011-01-07 10:38:52 UTC
Created attachment 177735 [details] [review]
Fix use of deprecated gtk_widget_get_child_requisition()
Comment 79 Germán Poo-Caamaño 2011-01-07 10:47:03 UTC
Created attachment 177736 [details] [review]
Fix use of deprecated gdk_cursor_unref
Comment 80 Germán Poo-Caamaño 2011-01-07 10:55:59 UTC
Created attachment 177738 [details] [review]
Fix use of deprecated gtk_widget_size_request()
Comment 81 Germán Poo-Caamaño 2011-01-07 11:07:31 UTC
The list of pending functions to be migrated.  Please, note that
g_completion_* is marked as deprecated, but there is no replacement
and -AFAIU- Glib will not break the API/ABI stability.  So, it is ok
to have g_completion_*

panel-widget.c: In function ‘panel_widget_style_set’:
panel-widget.c:1594: warning: implicit declaration of function ‘gtk_widget_get_style’
panel-widget.c:1594: warning: nested extern declaration of ‘gtk_widget_get_style’
panel-widget.c:1594: warning: assignment makes pointer from integer without a cast
panel-widget.c: In function ‘panel_widget_state_changed’:
panel-widget.c:1612: warning: assignment makes pointer from integer without a cast
panel-widget.c: In function ‘panel_widget_realize’:
panel-widget.c:1646: warning: assignment makes pointer from integer without a cast
panel-widget.c: In function ‘panel_widget_applet_drag_start’:
panel-widget.c:1907: warning: implicit declaration of function ‘gdk_pointer_grab’
panel-widget.c:1907: warning: nested extern declaration of ‘gdk_pointer_grab’
panel-widget.c: In function ‘panel_widget_applet_drag_end’:
panel-widget.c:1929: warning: implicit declaration of function ‘gdk_pointer_ungrab’
panel-widget.c:1929: warning: nested extern declaration of ‘gdk_pointer_ungrab’
button-widget.c: In function ‘button_widget_reload_pixbuf’:
button-widget.c:177: warning: implicit declaration of function ‘gtk_widget_render_icon’
button-widget.c:177: warning: nested extern declaration of ‘gtk_widget_render_icon’
button-widget.c:179: warning: assignment makes pointer from integer without a cast
button-widget.c: In function ‘button_widget_draw’:
button-widget.c:374: warning: implicit declaration of function ‘gtk_widget_get_style’
button-widget.c:374: warning: nested extern declaration of ‘gtk_widget_get_style’
button-widget.c:374: warning: assignment makes pointer from integer without a cast
button-widget.c:384: warning: implicit declaration of function ‘gtk_paint_arrow’
button-widget.c:384: warning: nested extern declaration of ‘gtk_paint_arrow’
button-widget.c:415: warning: implicit declaration of function ‘gtk_paint_focus’
button-widget.c:415: warning: nested extern declaration of ‘gtk_paint_focus’
panel-util.c: In function ‘panel_make_unique_desktop_uri’:
panel-util.c:673: warning: ignoring return value of ‘strtol’, declared with attribute warn_unused_result
panel-run-dialog.c: In function ‘panel_run_dialog_destroy’:
panel-run-dialog.c:240: warning: implicit declaration of function ‘g_completion_free’
panel-run-dialog.c:240: warning: nested extern declaration of ‘g_completion_free’
panel-run-dialog.c: In function ‘panel_run_dialog_update_completion’:
panel-run-dialog.c:1445: warning: implicit declaration of function ‘g_completion_new’
panel-run-dialog.c:1445: warning: nested extern declaration of ‘g_completion_new’
panel-run-dialog.c:1445: warning: assignment makes pointer from integer without a cast
panel-run-dialog.c:1495: warning: implicit declaration of function ‘g_completion_add_items’
panel-run-dialog.c:1495: warning: nested extern declaration of ‘g_completion_add_items’
panel-run-dialog.c: In function ‘entry_event’:
panel-run-dialog.c:1573: warning: implicit declaration of function ‘g_completion_complete_utf8’
panel-run-dialog.c:1573: warning: nested extern declaration of ‘g_completion_complete_utf8’
menu.c: In function ‘drag_end_menu_cb’:
menu.c:1064: warning: implicit declaration of function ‘gdk_pointer_grab’
menu.c:1064: warning: nested extern declaration of ‘gdk_pointer_grab’
menu.c:1070: warning: implicit declaration of function ‘gdk_keyboard_grab’
menu.c:1070: warning: nested extern declaration of ‘gdk_keyboard_grab’
menu.c:1076: warning: implicit declaration of function ‘gdk_pointer_ungrab’
menu.c:1076: warning: nested extern declaration of ‘gdk_pointer_ungrab’
panel-applet-frame.c: In function ‘panel_applet_frame_draw’:
panel-applet-frame.c:120: warning: implicit declaration of function ‘gtk_paint_handle’
panel-applet-frame.c:120: warning: nested extern declaration of ‘gtk_paint_handle’
panel-applet-frame.c:120: warning: implicit declaration of function ‘gtk_widget_get_style’
panel-applet-frame.c:120: warning: nested extern declaration of ‘gtk_widget_get_style’
panel-applet-frame.c: In function ‘panel_applet_frame_button_changed’:
panel-applet-frame.c:387: warning: implicit declaration of function ‘gdk_pointer_ungrab’
panel-applet-frame.c:387: warning: nested extern declaration of ‘gdk_pointer_ungrab’
panel-background.c: In function ‘panel_background_set_no_background_on_widget’:
panel-background.c:982: warning: implicit declaration of function ‘gtk_widget_set_style’
panel-background.c:982: warning: nested extern declaration of ‘gtk_widget_set_style’
panel-background.c:983: warning: implicit declaration of function ‘gtk_rc_style_new’
panel-background.c:983: warning: nested extern declaration of ‘gtk_rc_style_new’
panel-background.c:983: warning: assignment makes pointer from integer without a cast
panel-background.c:984: warning: implicit declaration of function ‘gtk_widget_modify_style’
panel-background.c:984: warning: nested extern declaration of ‘gtk_widget_modify_style’
panel-background.c: In function ‘panel_background_set_color_background_on_widget’:
panel-background.c:1052: warning: implicit declaration of function ‘gtk_widget_modify_bg’
panel-background.c:1052: warning: nested extern declaration of ‘gtk_widget_modify_bg’
panel-background.c: In function ‘get_composited_pattern’:
panel-background.c:279: warning: ‘pattern’ may be used uninitialized in this function
panel-background-monitor.c: In function ‘panel_background_monitor_get_region’:
panel-background-monitor.c:406: warning: ‘pwidth’ may be used uninitialized in this function
panel-background-monitor.c:406: note: ‘pwidth’ was declared here
panel-background-monitor.c:406: warning: ‘pheight’ may be used uninitialized in this function
panel-background-monitor.c:406: note: ‘pheight’ was declared here
panel-menu-bar.c: In function ‘panel_menu_bar_class_init’:
panel-menu-bar.c:298: warning: implicit declaration of function ‘gtk_rc_parse_string’
panel-menu-bar.c:298: warning: nested extern declaration of ‘gtk_rc_parse_string’
panel-menu-bar.c: In function ‘panel_menu_bar_on_draw’:
panel-menu-bar.c:315: warning: implicit declaration of function ‘gtk_paint_focus’
panel-menu-bar.c:315: warning: nested extern declaration of ‘gtk_paint_focus’
panel-menu-bar.c:315: warning: implicit declaration of function ‘gtk_widget_get_style’
panel-menu-bar.c:315: warning: nested extern declaration of ‘gtk_widget_get_style’
panel-separator.c: In function ‘panel_separator_draw’:
panel-separator.c:57: warning: implicit declaration of function ‘gtk_widget_get_style’
panel-separator.c:57: warning: nested extern declaration of ‘gtk_widget_get_style’
panel-separator.c:57: warning: assignment makes pointer from integer without a cast
panel-separator.c:62: warning: implicit declaration of function ‘gtk_paint_vline’
panel-separator.c:62: warning: nested extern declaration of ‘gtk_paint_vline’
panel-separator.c:69: warning: implicit declaration of function ‘gtk_paint_hline’
panel-separator.c:69: warning: nested extern declaration of ‘gtk_paint_hline’
panel-toplevel.c: In function ‘panel_toplevel_begin_grab_op’:
panel-toplevel.c:502: warning: implicit declaration of function ‘gdk_pointer_grab’
panel-toplevel.c:502: warning: nested extern declaration of ‘gdk_pointer_grab’
panel-toplevel.c:508: warning: implicit declaration of function ‘gdk_keyboard_grab’
panel-toplevel.c:508: warning: nested extern declaration of ‘gdk_keyboard_grab’
panel-toplevel.c: In function ‘panel_toplevel_end_grab_op’:
panel-toplevel.c:526: warning: implicit declaration of function ‘gdk_pointer_ungrab’
panel-toplevel.c:526: warning: nested extern declaration of ‘gdk_pointer_ungrab’
panel-toplevel.c:527: warning: implicit declaration of function ‘gdk_keyboard_ungrab’
panel-toplevel.c:527: warning: nested extern declaration of ‘gdk_keyboard_ungrab’
panel-toplevel.c: In function ‘panel_toplevel_contains_pointer’:
panel-toplevel.c:1354: warning: implicit declaration of function ‘gdk_display_get_pointer’
panel-toplevel.c:1354: warning: nested extern declaration of ‘gdk_display_get_pointer’
panel-toplevel.c: In function ‘panel_toplevel_update_position’:
panel-toplevel.c:2275: warning: implicit declaration of function ‘gtk_widget_get_style’
panel-toplevel.c:2275: warning: nested extern declaration of ‘gtk_widget_get_style’
panel-toplevel.c:2275: warning: assignment makes pointer from integer without a cast
panel-toplevel.c: In function ‘calculate_minimum_height’:
panel-toplevel.c:2317: warning: assignment makes pointer from integer without a cast
panel-toplevel.c: In function ‘panel_toplevel_update_size’:
panel-toplevel.c:2442: warning: assignment makes pointer from integer without a cast
panel-toplevel.c: In function ‘panel_toplevel_size_allocate’:
panel-toplevel.c:3152: warning: assignment makes pointer from integer without a cast
panel-toplevel.c: In function ‘panel_toplevel_draw’:
panel-toplevel.c:3216: warning: assignment makes pointer from integer without a cast
panel-toplevel.c:3242: warning: implicit declaration of function ‘gtk_paint_handle’
panel-toplevel.c:3242: warning: nested extern declaration of ‘gtk_paint_handle’
panel-frame.c: In function ‘panel_frame_get_preferred_width’:
panel-frame.c:47: warning: implicit declaration of function ‘gtk_widget_get_style’
panel-frame.c:47: warning: nested extern declaration of ‘gtk_widget_get_style’
panel-frame.c:47: warning: assignment makes pointer from integer without a cast
panel-frame.c: In function ‘panel_frame_get_preferred_height’:
panel-frame.c:79: warning: assignment makes pointer from integer without a cast
panel-frame.c: In function ‘panel_frame_size_allocate’:
panel-frame.c:117: warning: assignment makes pointer from integer without a cast
panel-frame.c: In function ‘panel_frame_draw’:
panel-frame.c:172: warning: assignment makes pointer from integer without a cast
panel-xutils.c: In function ‘panel_xutils_set_window_type’:
panel-xutils.c:84: warning: ignoring return value of ‘gdk_error_trap_pop’, declared with attribute warn_unused_result
panel-xutils.c: In function ‘panel_xutils_set_strut’:
panel-xutils.c:153: warning: ignoring return value of ‘gdk_error_trap_pop’, declared with attribute warn_unused_result
panel-xutils.c: In function ‘panel_warp_pointer’:
panel-xutils.c:171: warning: ignoring return value of ‘gdk_error_trap_pop’, declared with attribute warn_unused_result
panel-force-quit.c: In function ‘remove_popup’:
panel-force-quit.c:110: warning: implicit declaration of function ‘gdk_pointer_ungrab’
panel-force-quit.c:110: warning: nested extern declaration of ‘gdk_pointer_ungrab’
panel-force-quit.c:111: warning: implicit declaration of function ‘gdk_keyboard_ungrab’
panel-force-quit.c:111: warning: nested extern declaration of ‘gdk_keyboard_ungrab’
panel-force-quit.c: In function ‘kill_window_response’:
panel-force-quit.c:197: warning: ignoring return value of ‘gdk_error_trap_pop’, declared with attribute warn_unused_result
panel-force-quit.c: In function ‘panel_force_quit’:
panel-force-quit.c:299: warning: implicit declaration of function ‘gdk_pointer_grab’
panel-force-quit.c:299: warning: nested extern declaration of ‘gdk_pointer_grab’
panel-force-quit.c:308: warning: implicit declaration of function ‘gdk_keyboard_grab’
panel-force-quit.c:308: warning: nested extern declaration of ‘gdk_keyboard_grab’
panel-util.c: In function ‘panel_make_unique_desktop_uri’:
panel-util.c:673: warning: ignoring return value of ‘strtol’, declared with attribute warn_unused_result
panel-applet.c: In function ‘panel_applet_button_event’:
panel-applet.c:1068: warning: implicit declaration of function ‘gdk_display_pointer_ungrab’
panel-applet.c:1068: warning: nested extern declaration of ‘gdk_display_pointer_ungrab’
panel-applet.c: In function ‘panel_applet_draw’:
panel-applet.c:1292: warning: implicit declaration of function ‘gtk_paint_focus’
panel-applet.c:1292: warning: nested extern declaration of ‘gtk_paint_focus’
panel-applet.c:1292: warning: implicit declaration of function ‘gtk_widget_get_style’
panel-applet.c:1292: warning: nested extern declaration of ‘gtk_widget_get_style’
panel-applet.c: In function ‘panel_applet_update_background_for_widget’:
panel-applet.c:1539: warning: implicit declaration of function ‘gtk_widget_set_style’
panel-applet.c:1539: warning: nested extern declaration of ‘gtk_widget_set_style’
panel-applet.c:1540: warning: implicit declaration of function ‘gtk_rc_style_new’
panel-applet.c:1540: warning: nested extern declaration of ‘gtk_rc_style_new’
panel-applet.c:1540: warning: assignment makes pointer from integer without a cast
panel-applet.c:1541: warning: implicit declaration of function ‘gtk_widget_modify_style’
panel-applet.c:1541: warning: nested extern declaration of ‘gtk_widget_modify_style’
panel-applet.c:1558: warning: implicit declaration of function ‘gtk_widget_modify_bg’
panel-applet.c:1558: warning: nested extern declaration of ‘gtk_widget_modify_bg’
panel-applet.c:1573: warning: implicit declaration of function ‘gtk_style_copy’
panel-applet.c:1573: warning: nested extern declaration of ‘gtk_style_copy’
panel-applet.c:1573: warning: assignment makes pointer from integer without a cast
panel-applet-gconf.h:76: Warning: PanelApplet: panel_applet_gconf_get_list: return value: Missing (transfer) annotation
panel-applet.h:121: Warning: PanelApplet: panel_applet_factory_main: argument callback: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
clock.c: In function ‘calculate_minimum_height’:
clock.c:395: warning: implicit declaration of function ‘gtk_widget_get_style’
clock.c:395: warning: nested extern declaration of ‘gtk_widget_get_style’
clock.c:395: warning: assignment makes pointer from integer without a cast
clock.c: In function ‘force_no_focus_padding’:
clock.c:1298: warning: implicit declaration of function ‘gtk_rc_parse_string’
clock.c:1298: warning: nested extern declaration of ‘gtk_rc_parse_string’
clock.c: At top level:
clock.c:203: warning: ‘clock_numbers’ defined but not used
clock-map.c: In function ‘clock_map_draw’:
clock-map.c:231: warning: implicit declaration of function ‘gtk_widget_get_style’
clock-map.c:231: warning: nested extern declaration of ‘gtk_widget_get_style’
clock-map.c:231: warning: assignment makes pointer from integer without a cast
fixedtip.c: In function ‘na_fixed_tip_draw’:
fixedtip.c:62: warning: implicit declaration of function ‘gtk_paint_flat_box’
fixedtip.c:62: warning: nested extern declaration of ‘gtk_paint_flat_box’
fixedtip.c:62: warning: implicit declaration of function ‘gtk_widget_get_style’
fixedtip.c:62: warning: nested extern declaration of ‘gtk_widget_get_style’
main.c: In function ‘force_no_focus_padding’:
main.c:271: warning: implicit declaration of function ‘gtk_rc_parse_string’
main.c:271: warning: nested extern declaration of ‘gtk_rc_parse_string’
window-menu.c: In function ‘window_menu_on_draw’:
window-menu.c:123: warning: implicit declaration of function ‘gtk_paint_focus’
window-menu.c:123: warning: nested extern declaration of ‘gtk_paint_focus’
window-menu.c:123: warning: implicit declaration of function ‘gtk_widget_get_style’
window-menu.c:123: warning: nested extern declaration of ‘gtk_widget_get_style’
window-menu.c: In function ‘force_no_focus_padding’:
window-menu.c:140: warning: implicit declaration of function ‘gtk_rc_parse_string’
window-menu.c:140: warning: nested extern declaration of ‘gtk_rc_parse_string’
showdesktop.c: In function ‘update_icon’:
showdesktop.c:156: warning: implicit declaration of function ‘gtk_widget_get_style’
showdesktop.c:156: warning: nested extern declaration of ‘gtk_widget_get_style’
showdesktop.c:156: warning: assignment makes pointer from integer without a cast
showdesktop.c: In function ‘show_desktop_applet_fill’:
showdesktop.c:448: warning: implicit declaration of function ‘gtk_rc_parse_string’
showdesktop.c:448: warning: nested extern declaration of ‘gtk_rc_parse_string’
Comment 82 Germán Poo-Caamaño 2011-01-08 03:01:53 UTC
Created attachment 177800 [details] [review]
Fix use of deprecated gdk_display_get_pointer()
Comment 83 Germán Poo-Caamaño 2011-01-08 03:02:26 UTC
Created attachment 177801 [details] [review]
Fix use of deprecated gdk_display_pointer_ungrab()
Comment 84 Germán Poo-Caamaño 2011-01-08 08:55:40 UTC
Created attachment 177808 [details] [review]
Fix use of deprecated gdk_pointer_grab()/_ungrab()
Comment 85 Germán Poo-Caamaño 2011-01-08 09:00:52 UTC
The list of pending deprecated functions has been reduced to:

‘gdk_keyboard_grab’            menu.c:1070:
‘gdk_keyboard_grab’            panel-force-quit.c:308:
‘gdk_keyboard_grab’            panel-toplevel.c:508:
‘gdk_keyboard_ungrab’          panel-force-quit.c:111:
‘gdk_keyboard_ungrab’          panel-toplevel.c:527:
‘gtk_paint_arrow’              button-widget.c:384:
‘gtk_paint_flat_box’           fixedtip.c:62:
‘gtk_paint_focus’              button-widget.c:415:
‘gtk_paint_focus’              panel-applet.c:1292:
‘gtk_paint_focus’              panel-menu-bar.c:315:
‘gtk_paint_focus’              window-menu.c:123:
‘gtk_paint_handle’             panel-applet-frame.c:120:
‘gtk_paint_handle’             panel-toplevel.c:3242:
‘gtk_paint_hline’              panel-separator.c:69:
‘gtk_paint_vline’              panel-separator.c:62:
‘gtk_rc_parse_string’          clock.c:1298:
‘gtk_rc_parse_string’          main.c:271:
‘gtk_rc_parse_string’          panel-menu-bar.c:298:
‘gtk_rc_parse_string’          showdesktop.c:448:
‘gtk_rc_parse_string’          window-menu.c:140:
‘gtk_rc_style_new’             panel-applet.c:1540:
‘gtk_rc_style_new’             panel-background.c:983:
‘gtk_style_copy’               panel-applet.c:1573:
‘gtk_widget_get_style’         button-widget.c:374:
‘gtk_widget_get_style’         clock-map.c:231:
‘gtk_widget_get_style’         clock.c:395:
‘gtk_widget_get_style’         fixedtip.c:62:
‘gtk_widget_get_style’         panel-applet-frame.c:120:
‘gtk_widget_get_style’         panel-applet.c:1292:
‘gtk_widget_get_style’         panel-frame.c:47:
‘gtk_widget_get_style’         panel-menu-bar.c:315:
‘gtk_widget_get_style’         panel-separator.c:57:
‘gtk_widget_get_style’         panel-toplevel.c:2275:
‘gtk_widget_get_style’         panel-widget.c:1594:
‘gtk_widget_get_style’         showdesktop.c:156:
‘gtk_widget_get_style’         window-menu.c:123:
‘gtk_widget_modify_bg’         panel-applet.c:1558:
‘gtk_widget_modify_bg’         panel-background.c:1052:
‘gtk_widget_modify_style’      panel-applet.c:1541:
‘gtk_widget_modify_style’      panel-background.c:984:
‘gtk_widget_render_icon’       button-widget.c:177:
‘gtk_widget_set_style’         panel-applet.c:1539:
‘gtk_widget_set_style’         panel-background.c:982:
Comment 86 Germán Poo-Caamaño 2011-01-08 09:10:26 UTC
Created attachment 177814 [details] [review]
Fix use of pending deprecated gdk_pointer_grab()/_ungrab()
Comment 87 Milan Bouchet-Valat 2011-01-08 16:14:15 UTC
I'm currently working on the gtk_widget_get_style() removal, let's avoid duplicate work (again).
Comment 88 Milan Bouchet-Valat 2011-01-10 12:05:24 UTC
Created attachment 177921 [details] [review]
Port to GtkStyleContext

Most changes consist in using 'padding' and 'border-width' properties
instead of GtkStyle::xthickness/ythickness. Use GtkWidget::style-updated
signal to replace style-set. Replace GdkColors with GdkRGBA. Remove
use of gtk_paint_*() functions in favor of gtk_render_*().
Comment 89 Milan Bouchet-Valat 2011-01-10 12:10:44 UTC
Comment on attachment 177921 [details] [review]
Port to GtkStyleContext

Above is a first attempt to switch to GtkStyleContext. As usual, not tested beyond building, and it still lacks a proper migration of the background handling, which seems to be quite messy currently.

Germán, if you want to give it a try... ;-) For now, I stop.
Comment 90 Germán Poo-Caamaño 2011-01-11 03:54:49 UTC
Review of attachment 177921 [details] [review]:

The are problems to run it. I did not have enough time to
figure out the problem, though.

Too many warnings complaining that PanelFrame does not have
the properties "padding", later "border-with".

Similar situation for PanelToplevel: "font", "padding"...

According the documentation, "padding" is not a property in
the hierarchy of PanelToplevel (GtkWindow), neither in 
PanelFrame (GtkBin).  However, "border-width" is a style 
property of GtkContainer, which is parent of GtkWindow and
GtkBin, and it fails there, too.
Comment 91 Germán Poo-Caamaño 2011-01-11 03:54:55 UTC
Review of attachment 177921 [details] [review]:

The are problems to run it. I did not have enough time to
figure out the problem, though.

Too many warnings complaining that PanelFrame does not have
the properties "padding", later "border-with".

Similar situation for PanelToplevel: "font", "padding"...

According the documentation, "padding" is not a property in
the hierarchy of PanelToplevel (GtkWindow), neither in 
PanelFrame (GtkBin).  However, "border-width" is a style 
property of GtkContainer, which is parent of GtkWindow and
GtkBin, and it fails there, too.
Comment 92 Germán Poo-Caamaño 2011-01-11 04:02:29 UTC
(In reply to comment #91)
> Review of attachment 177921 [details] [review]:
> 
> The are problems to run it. I did not have enough time to
> figure out the problem, though.
> 
> Too many warnings complaining that PanelFrame does not have
> the properties "padding", later "border-with".
> 
> Similar situation for PanelToplevel: "font", "padding"...
> 
> According the documentation, "padding" is not a property in
> the hierarchy of PanelToplevel (GtkWindow), neither in 
> PanelFrame (GtkBin).  However, "border-width" is a style 
> property of GtkContainer, which is parent of GtkWindow and
> GtkBin, and it fails there, too.

Well, "border-width" is just a property and not a style 
property.
Comment 93 Germán Poo-Caamaño 2011-01-11 07:18:45 UTC
(In reply to comment #88)
> Created an attachment (id=177921) [details] [review]
> Port to GtkStyleContext
> 
> Most changes consist in using 'padding' and 'border-width' properties
> instead of GtkStyle::xthickness/ythickness. Use GtkWidget::style-updated
> signal to replace style-set. Replace GdkColors with GdkRGBA. Remove
> use of gtk_paint_*() functions in favor of gtk_render_*().

FYI, I have pushed a commit that fixes the build with GSEAL.
So, you will have to rebase the patch. However, there is no
conflict at all.

OTOH, I wonder if style-updated may be used to replace 'size_request'
http://git.gnome.org/browse/gnome-panel/tree/gnome-panel/menu.c?h=gtk3#n1226
Comment 94 Milan Bouchet-Valat 2011-01-11 10:11:39 UTC
(In reply to comment #92)
> (In reply to comment #91)
> > Review of attachment 177921 [details] [review] [details]:
> > 
> > The are problems to run it. I did not have enough time to
> > figure out the problem, though.
> > 
> > Too many warnings complaining that PanelFrame does not have
> > the properties "padding", later "border-with".
> > 
> > Similar situation for PanelToplevel: "font", "padding"...
> > 
> > According the documentation, "padding" is not a property in
> > the hierarchy of PanelToplevel (GtkWindow), neither in 
> > PanelFrame (GtkBin).  However, "border-width" is a style 
> > property of GtkContainer, which is parent of GtkWindow and
> > GtkBin, and it fails there, too.
> 
> Well, "border-width" is just a property and not a style 
> property.
Well, there are GtkStyleContext::padding and ::border-width, plus GtkContainer::border-width, which we need to take both into account. But here, I think the problem comes from GtkStyleContext.

The first warning is
gtkstylecontext.c:2484: widget class `PanelFrame' has no style property named `padding'

And indeed, GtkBin doesn't seem to use GtkStyleContext at all, which means PanelFrame doesn't inherit them. But since it doesn't use GtkStyle either, I guess GtkBin isn't supposed to be themed, since it makes little sense to have a common padding for its very different uses (e.g. GtkButton will have its own padding).

I'll ask Carlos, and if that's the case, we'll  either use fixed values as suited, or add a custom PanelFrame class with default values (but I don't think many people want to theme the panel...).

For the font, I'm not sure where we should get it from. GtkWidget itself is getting it from its GtkStyleContext, so it should definitely be OK in PanelFrame too...
Comment 95 Carlos Garnacho 2011-01-11 10:38:02 UTC
(In reply to comment #94)
> Well, there are GtkStyleContext::padding and ::border-width, plus
> GtkContainer::border-width, which we need to take both into account. But here,
> I think the problem comes from GtkStyleContext.
> 
> The first warning is
> gtkstylecontext.c:2484: widget class `PanelFrame' has no style property named
> `padding'

There is a small misconception here, the patch is probably using gtk_widget_style_get(), or a similar function, that function checks the style properties installed through gtk_widget_class_install_style_property(), as GTK+ 2.x has been doing.

GtkStyleContext however offers properties that match the CSS syntax ("padding" being one of them), these are to be retrieved with gtk_style_context_get() or the other helper getters.

Both things end up being modifiable in CSS files, but following somewhat different code paths, and syntax (being style properties offered as "-WidgetName-style-prop-name")

> 
> And indeed, GtkBin doesn't seem to use GtkStyleContext at all, which means
> PanelFrame doesn't inherit them. But since it doesn't use GtkStyle either, I
> guess GtkBin isn't supposed to be themed, since it makes little sense to have a
> common padding for its very different uses (e.g. GtkButton will have its own
> padding).

Yeah, GtkBin itself has little to do with padding, its implementations which get to choose how much size to request/allocate, and it's completely up to them how to do that and whether to follow "guidelines" (a container may also ignore GtkContainer::border-width for example)

> 
> I'll ask Carlos, and if that's the case, we'll  either use fixed values as
> suited, or add a custom PanelFrame class with default values (but I don't think
> many people want to theme the panel...).
> 
> For the font, I'm not sure where we should get it from. GtkWidget itself is
> getting it from its GtkStyleContext, so it should definitely be OK in
> PanelFrame too...

Yes, gtk_style_context_get_font() should be it
Comment 96 Milan Bouchet-Valat 2011-01-11 22:36:15 UTC
Created attachment 178096 [details] [review]
Port to GtkStyleContext

Most changes consist in using 'padding' and 'border-width' properties
instead of GtkStyle::xthickness/ythickness. Use GtkWidget::style-updated
signal to replace style-set. Replace GdkColors with GdkRGBA. Remove
use of gtk_paint_*() functions in favor of gtk_render_*().
Comment 97 Milan Bouchet-Valat 2011-01-11 22:47:25 UTC
Created attachment 178100 [details] [review]
Port to GtkStyleContext

Most changes consist in using 'padding' and 'border-width' properties
instead of GtkStyle::xthickness/ythickness. Use GtkWidget::style-updated
signal to replace style-set. Replace GdkColors with GdkRGBA. Remove
use of gtk_paint_*() functions in favor of gtk_render_*().
Comment 98 Milan Bouchet-Valat 2011-01-11 22:57:29 UTC
I'm attaching a new patch fixing the warnings, a mem leak, and which actually draws the applets background. As the background wasn't correctly drawn for the right part of the panel before my patch, I couldn't test it (plus, see below).

With my patch, size allocation seems to work worse as before, but I don't know why since it don't really change it (except for padding/border, but that only affects a few pixels). Maybe it broke something in that part of the code, need to find where. The panel doesn't always appear, and when it does, it takes half or even the whole height of the screen. Help appreciated! ;-)

About the "size_request" signal in gnome-panel/menu.c, I'm not sure what we can do. I don't really understand why the code wasn't using gtk_widget_set_size_request() instead of connecting to the signal. Anyway, we would have to copy how gtk_menu_item_get_preferred_height(), since it has been changed, which is at least one of the reasons why it doesn't work now. But maybe there's a better solution.

I don't see how you'd like to replace it with "style-updated". How would you set the size then?
Comment 99 Milan Bouchet-Valat 2011-01-16 22:53:06 UTC
Created attachment 178463 [details] [review]
Port to GtkStyleContext

Most changes consist in using 'padding' and 'border-width' properties
instead of GtkStyle::xthickness/ythickness. Use GtkWidget::style-updated
signal to replace style-set. Replace GdkColors with GdkRGBA. Remove
use of gtk_paint_*() functions in favor of gtk_render_*().
Comment 100 Milan Bouchet-Valat 2011-01-16 22:57:12 UTC
Comment on attachment 178100 [details] [review]
Port to GtkStyleContext

New patch fixes the wrong size of the panel (I was using width for the height...), plus many wrong uses of gtk_style_context_get(): this function should take a pointer to GtkBorders, which need to be freed. Use accessors instead.

Now the panel is in a much better shape, but there are still a few issues with the background of the menu bar (the rest works). We also need to figure out what to do with all this background code I don't completely understand. In particular, we need to find a way to reset the background to its default value that doesn't involve GtkStyle.

There's also a border around the menu bar which should be removed,  but that shouldn't be too hard.
Comment 101 Milan Bouchet-Valat 2011-01-16 23:06:28 UTC
Review of attachment 178463 [details] [review]:

Using Splinter to discuss my own code's flaws...

::: gnome-panel/panel-widget.c
@@ +1593,3 @@
+		                       gtk_widget_get_state_flags (widget),
+		                       "background-color", &bg_color,
+		                       "background-image", &bg_image,

This part is wrong because we never override the background in GtkStyleContext: this means we always draw the default background for this widget. See also how panel_background_set_default_style() doesn't affect GtkStyleContext.

We should either let the style context as it is by default, skipping it when the prefs say we should; or modify it correclty, and always draw the background we get from it. But don't mix both solutions... Problem: I haven't found out how we can change the background image in the style context, just like gtk_widget_override_background() does for color.
Comment 102 Germán Poo-Caamaño 2011-01-17 08:08:52 UTC
Review of attachment 178463 [details] [review]:

There are several parts that looks ok to commit. 
I suggest to split this patch in small chunks 
(per module/applet or functions involved), and leave
the ones like drawing the background isolated.

For instance, menu.c is a unit, the same for clock,
calendar-window, etc.

Another thing I notices, the minimum height for the
panel now is 25 instead of 24.

Nevertheless, it is quite a step forward in comparison
with the first attempt (thanks a lot!).  I vote for 
splitting the patch in chunks.

::: gnome-panel/menu.c
@@ +1256,3 @@
+		req_height += padding.top + padding.bottom + border.top + border.bottom;
+		gtk_widget_set_size_request (menuitem, 0, req_height);
+		* This is a bit ugly, since we should keep this in sync with what's in

I think the code above is sufficient.

The log says:
$ git log 1e4a5c8d
  [...]
  (image_menuitem_size_request): impl hack to make sure menu items
  without images are the same height as ones with images.

As far as I see, the code above does that.  I also tested it
adding extra menu items (under Places).

::: gnome-panel/panel-background.c
@@ +1034,3 @@
 	}
 
+        gtk_widget_override_background_color (widget, GTK_STATE_NORMAL, color);

Here, we are not changing anything at all.  I think
you mean this part in your comment.

::: gnome-panel/panel-frame.c
@@ +215,2 @@
         x = y = 0;
+        gtk_style_context_get_border (style, gtk_widget_get_state_flags (widget), &border);

Here we could have the same issue than above (using border
instead xthickness).

OTOH, this code is based on gtk_default_draw_shadow
(gtk/gtkstyle.c), which now use gtk_render_frame.  Perhaps
it worths to take a look at it.

::: gnome-panel/panel-toplevel.c
@@ +2289,2 @@
 	background = &toplevel->priv->panel_widget->background;
 	/* There's no bevels with a color/image background */

IIUU, we should not have bevels, but currently we have
for buttons (applet window selector and custom menu bar).

@@ +3222,2 @@
 	if (toplevel->priv->edges & PANEL_EDGE_RIGHT)
+		challoc.width -= padding.right + border.right;

IIUC, padding.right + border.right == padding.left + border.right.
(or it should be).

I wonder if we should define only one value above, such as:
ythickness = padding.right + border.right
xthickness = padding.top + border.top

It would be the code less prone to errors and it would look like
like the original one.
Comment 103 Germán Poo-Caamaño 2011-01-19 04:01:41 UTC
Milan,

Carlos applied several commits into gtk3 brancn fixing
several #FIXMEchpe.  Some parts of your patch are obsoleted
now and the other ones should be rebased.
Comment 104 Carlos Garcia Campos 2011-01-22 12:10:02 UTC
I'm sorry, I didn't know this patch existed :-(, I think it would be better to open new bug reports for new patches instead of adding more attachments to this bug.
Comment 105 Milan Bouchet-Valat 2011-01-22 12:16:54 UTC
Comment on attachment 178463 [details] [review]
Port to GtkStyleContext

Indeed, that's what I suspected when I discovered your patches this morning when trying to rebase... :-/

You seem to have fixed all the problems I had with my patch, but doing the boring work twice is sad...

Not sure about opening new reports: people that care about the GTK3 port are subscribed here, and I for one am not subscribed to all gnome-panel bugs.
Comment 106 André Klapper 2011-01-22 12:33:37 UTC
In case you decide to use new reports, please set the GNOME target field to 3.0.
Comment 107 Carlos Garcia Campos 2011-01-22 12:34:48 UTC
(In reply to comment #105)
> (From update of attachment 178463 [details] [review])
> Indeed, that's what I suspected when I discovered your patches this morning
> when trying to rebase... :-/

I'm sorry, I thought nobody was working on it.

> Not sure about opening new reports: people that care about the GTK3 port are
> subscribed here, and I for one am not subscribed to all gnome-panel bugs.

Fair enough, I'm now in the CC too.
Comment 108 Germán Poo-Caamaño 2011-01-29 22:44:37 UTC
Just an update:

The missing symbols to fix the compilation are:

‘gdk_keyboard_grab’            menu.c:1087:
‘gtk_widget_reset_style’       panel-background.c:992:
‘gdk_keyboard_grab’            panel-toplevel.c:518:
‘gdk_keyboard_ungrab’          panel-toplevel.c:544:
‘gdk_keyboard_ungrab’          panel-force-quit.c:119:
‘gdk_keyboard_grab’            panel-force-quit.c:328:
‘gtk_widget_reset_style’       panel-applet.c:1530:
‘gtk_widget_get_style’         clock.c:293:
‘gtk_rc_parse_string’          clock.c:1297:
‘gtk_widget_get_style’         clock.c:395:
‘gtk_rc_parse_string’          clock.c:1298:
‘gtk_widget_get_style’         clock-map.c:231:
‘gtk_widget_get_style’         showdesktop.c:156:
Comment 109 Germán Poo-Caamaño 2011-01-30 05:15:50 UTC
(In reply to comment #108)
> Just an update:
> 
> The missing symbols to fix the compilation are:
> 
> ‘gtk_widget_reset_style’       panel-background.c:992:
> ‘gtk_widget_reset_style’       panel-applet.c:1530:

I could not find a replacement for gtk_widget_reset_style() and
later I realized it is not deprecated anymore:
http://git.gnome.org/browse/gtk+/commit/?id=10b6afa1f597a201fb24f3d513aaddab51889812

At least in http://git.gnome.org/browse/gtk+/tree/gtk/gtkwidget.c?id=10b6afa1f597a201fb24f3d513aaddab51889812#n8931 does not look
deprecated anymore.
Comment 110 Germán Poo-Caamaño 2011-01-30 09:54:31 UTC
Now it is possible to build gnome-panel with --enable-deprecation-flags.
The missing symbols are related to g_completion_*, but it is not a big
deal, Glib will not drop the symbols and there is no replacement for
g_completion_*.  In the worst case, the code of g_completion_* should
be included in gnome-panel.

Therefore, I am closing this bug.