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 573375 - Use GtkBuilder
Use GtkBuilder
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: wizard
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2009-02-27 11:05 UTC by Bastien Nocera
Modified: 2009-04-09 23:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkBuilder UI for Gnome Bluetooth Wizard (47.31 KB, patch)
2009-03-03 10:07 UTC, Robert Ancell
needs-work Details | Review
Rebuilt patch and corrected .ui file (31.29 KB, patch)
2009-03-27 10:32 UTC, Robert Ancell
none Details | Review

Description Bastien Nocera 2009-02-27 11:05:08 UTC
Instead of the current hard-coded interface
Comment 1 Robert Ancell 2009-03-03 10:07:07 UTC
Created attachment 129929 [details] [review]
GtkBuilder UI for Gnome Bluetooth Wizard

Contains:
- .glade file generated in Glade 3
- .ui file generated from .glade file using gtk-builder-convert
- Modifications to wizard/main.c to use the GtkBuilder file

Remaining work:
- What to do if the file fails to load
- The UI file is loaded from the current directory
- The UI file is not installed
- There is a bug in the passcode dialog.  Open it an click on the any radio button - the dialog closes.  It doesn't seem to be calling any callback when the currently selected one is clicked and I can't see why this is closing the dialog.

I probably wont get around to finishing the patch so someone else please continue this work.
Comment 2 Robert Ancell 2009-03-03 10:17:54 UTC
Additionally the standard UI problem of the bold labels marked for translation with markup.
Comment 3 Bastien Nocera 2009-03-03 10:57:53 UTC
You forgot to mark those signal handlers as non-static (ie. remove the static keyword in front of the function, and declare them at the top of the file).
Comment 4 Robert Ancell 2009-03-03 11:41:49 UTC
I tried that but it still didn't work.  I'm guessing it needs to be linked against gmodule/have the correct compiler flags as in:
http://library.gnome.org/devel/gtk/unstable/GtkBuilder.html#gtk-builder-connect-signals
Comment 5 Robert Ancell 2009-03-04 08:59:53 UTC
The passcode dialog but is that the radio buttons have a response ID.  If you manually edit the .ui file and remove response="0" for the radio buttons it works fine.  There doesn't seem to be a way for Glade to specify no response ID so this may be a Glade bug.
Comment 6 Bastien Nocera 2009-03-27 09:10:31 UTC
Could you please update your patch? It doesn't apply against trunk anymore.

I'll try to fix it up afterwards.
Comment 7 Robert Ancell 2009-03-27 10:32:52 UTC
Created attachment 131490 [details] [review]
Rebuilt patch and corrected .ui file

Rebuilt against head and the .ui file is fixed by passing it through Glade 2.6.0.
Comment 8 Bastien Nocera 2009-04-06 15:10:03 UTC
Had to make quite a few changes, as you were using the old UI for the passkey dialogue, and the Close button was getting disabled even when the custom entry wasn't selected.

I also killed a few unused widgets, and hid the passkey label by default. Hopefully it still works alright.

Fixed in trunk:
http://svn.gnome.org/viewvc/gnome-bluetooth?view=revision&revision=569
Comment 9 Bastien Nocera 2009-04-07 16:20:41 UTC
Reopening, we obviously need to use the signal handlers in the GtkBuilder file.
Comment 10 Bastien Nocera 2009-04-09 23:17:59 UTC
All done in trunk.