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 560980 - Drop libglade dependency; use GtkBuilder
Drop libglade dependency; use GtkBuilder
Status: RESOLVED FIXED
Product: gyrus
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Gyrus Maintainers
Gyrus Maintainers
Depends on:
Blocks: 572883
 
 
Reported: 2008-11-15 23:52 UTC by Francisco Rojas
Modified: 2010-12-26 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
drop libglade dependency (149.45 KB, patch)
2008-11-16 00:06 UTC, Francisco Rojas
none Details | Review
rebased version against trunk (148.96 KB, patch)
2009-02-23 20:24 UTC, Claudio Saavedra
none Details | Review
Migrate from libglade to GtkBuilder (100.42 KB, patch)
2010-05-18 20:06 UTC, Francisco Rojas
none Details | Review
This patch eliminates the dependency on libglade. Now, gtkbuilder is used. (183.18 KB, patch)
2010-10-29 19:20 UTC, Alejandro Valdes
none Details | Review
without whitespaces and tabs. removed changes don't related with this bug. (183.17 KB, patch)
2010-11-02 20:36 UTC, Alejandro Valdes
needs-work Details | Review
Drop libglade dependency, use GtkBuilder. (182.71 KB, patch)
2010-11-23 01:18 UTC, Alejandro Valdes
committed Details | Review

Description Francisco Rojas 2008-11-15 23:52:06 UTC
Title says it all.
Comment 1 Francisco Rojas 2008-11-16 00:06:53 UTC
Created attachment 122754 [details] [review]
drop libglade dependency

This makes use of GtkBuilder instead of libglade.
The glade file can't deleted becouse is no stable support for editing GtkBuilder-files directly yet.
Also this patch needs-work. I had problems with the find-dialog and mailboxNew-dialog. For some reason show two dialog-windows instead the right one.

Could you give me a hand please?
Comment 2 Claudio Saavedra 2009-02-23 20:24:57 UTC
Created attachment 129365 [details] [review]
rebased version against trunk

This is a rebased version against trunk. I didn't have time to review the problems you mention, though.
Comment 3 Claudio Saavedra 2009-11-13 01:16:02 UTC
What's the status of this? Maybe regenerating the gtkbuilder files with a newer version of the script would be good.
Comment 4 Francisco Rojas 2010-05-18 20:06:10 UTC
Created attachment 161377 [details] [review]
Migrate from libglade to GtkBuilder

I didn't deleted the glade files although isn't necessary anymore, also we should change the glade directory name
Comment 5 Alejandro Valdes 2010-10-29 19:20:45 UTC
Created attachment 173520 [details] [review]
This patch eliminates the dependency on libglade. Now, gtkbuilder is used.

This patch eliminates the dependency on libglade. Now, gtkbuilder is used. Glade files was converted in gtkbuilder format. Deleted Glade files and XML files created.
Comment 6 Claudio Saavedra 2010-10-31 17:54:25 UTC
Are both latest patches to be applied one after another? Or does patch 173520 supersedes patch 161377?

173520 has many changes unrelated to this bug, mixes whitespaces with tabs, etc. Please clean it up.
Comment 7 Alejandro Valdes 2010-11-02 14:42:38 UTC
This patch supersedes 161377.

This warnings don't affect to the correct apply of patch.
Comment 8 Alejandro Valdes 2010-11-02 20:36:56 UTC
Created attachment 173716 [details] [review]
without whitespaces and tabs. removed changes don't related with this bug.

without whitespaces and tabs. removed changes don't related with this bug.
Comment 9 Claudio Saavedra 2010-11-14 21:11:05 UTC
Review of attachment 173716 [details] [review]:

There are still a few indentation issues, and the following issues need to be fixed before. For changes that you want to do that are unrelated to the migration, feel free to open new bugs but don't squeeze them here, no matter how minor they are.

::: configure.in
@@ -22,3 @@
 GNOME_COMPILE_WARNINGS(maximum)
 
 GTK_REQUIRED=2.10.0

The GtkBuilder class was added in GTK+ 2.12, so you need to increase the version required.

::: src/glade/Makefile.am
@@ +6,3 @@
 #
 
 glade_DATA = \

ui_DATA would be a better name for this directive.

::: src/gyrus-report.c
@@ +148,3 @@
 			   -1);
 	
+	g_snprintf(buf, sizeof(buf), "%.1f", perc);

This has nothing to do with the GtkBuilder conversion.

@@ +191,3 @@
 	renderer = gtk_cell_renderer_text_new ();
         gtk_tree_view_column_pack_start (column, renderer, FALSE);
+	gtk_tree_view_column_set_cell_data_func(column, renderer, gyrus_report_cell_data_func, NULL, NULL);

Neither has this.

@@ +321,1 @@
 

Neither this.

::: src/gyrus-session.c
@@ +809,3 @@
+	entry_name = GTK_WIDGET (gtk_builder_get_object (builder, "entry_name"));
+
+	// set model to combobox of mailbox hierarchy separator

This is a C++ comment.

@@ +812,3 @@
+	gtk_combo_box_set_model (GTK_COMBO_BOX (combobox_sep_char), GTK_TREE_MODEL (model_separator));
+	cell = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combobox_sep_char),cell,TRUE);

Use proper spacing.

@@ +815,3 @@
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combobox_sep_char), cell, "text", 0, NULL );
+
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton_port),143);

And here.
Comment 10 Alejandro Valdes 2010-11-23 01:18:34 UTC
Created attachment 175081 [details] [review]
 Drop libglade dependency, use GtkBuilder. 

Drop libglade dependency, use GtkBuilder. 

I reviewed the issues. (https://bugzilla.gnome.org/review?bug=560980&attachment=173716)
Comment 11 Alejandro Valdes 2010-12-22 20:10:46 UTC
Hi!

Some news with the patch?

Regards,
Comment 12 Claudio Saavedra 2010-12-26 12:45:19 UTC
The patch doesn't build because you removed the preferences sources from gyrus_SOURCES in Makefile.am. If you wanted to do that, you should have created a different patch and make sure that it actually builds.
Comment 13 Claudio Saavedra 2010-12-26 13:00:06 UTC
+	gtk_list_store_append(GTK_LIST_STORE(model_separator), &iter);
+	gtk_list_store_set (GTK_LIST_STORE(model_separator), &iter,0,"Autodetect", -1);

This is also wrong because "Autodetect" is a localized string.
Comment 14 Claudio Saavedra 2010-12-26 15:28:46 UTC
Enabling the tests breaks the build, since the test UI still uses glade.

gyrus-talk.c:3:25: error: glade/glade.h: No such file or directory
gyrus-talk.c: In function ‘on_connection_close’:
gyrus-talk.c:124: warning: unused variable ‘buf’
gyrus-talk.c: In function ‘main’:
gyrus-talk.c:241: error: ‘GladeXML’ undeclared (first use in this function)
gyrus-talk.c:241: error: (Each undeclared identifier is reported only once
gyrus-talk.c:241: error: for each function it appears in.)
gyrus-talk.c:241: error: ‘gxml’ undeclared (first use in this function)
gyrus-talk.c:247: warning: implicit declaration of function ‘glade_xml_new’
gyrus-talk.c:249: warning: implicit declaration of function ‘glade_xml_get_widget’
gyrus-talk.c:272: warning: implicit declaration of function ‘glade_xml_signal_autoconnect’
make[2]: *** [gyrus-talk.o] Error 1
make[2]: Leaving directory `/home/claudio/git/gnome/gyrus/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/claudio/git/gnome/gyrus'
make: *** [all] Error 2
Comment 15 Claudio Saavedra 2010-12-26 15:31:28 UTC
Comment on attachment 175081 [details] [review]
 Drop libglade dependency, use GtkBuilder. 

Pushed this, plus a dozen of other commits fixing stuff. Please check the git log for details and next time pay attention to these things as well. Thank you.
Comment 16 Claudio Saavedra 2010-12-26 15:55:28 UTC
(In reply to comment #14)
> Enabling the tests breaks the build, since the test UI still uses glade.
> 
> gyrus-talk.c:3:25: error: glade/glade.h: No such file or directory
> gyrus-talk.c: In function ‘on_connection_close’:
> gyrus-talk.c:124: warning: unused variable ‘buf’
> gyrus-talk.c: In function ‘main’:
> gyrus-talk.c:241: error: ‘GladeXML’ undeclared (first use in this function)
> gyrus-talk.c:241: error: (Each undeclared identifier is reported only once
> gyrus-talk.c:241: error: for each function it appears in.)
> gyrus-talk.c:241: error: ‘gxml’ undeclared (first use in this function)
> gyrus-talk.c:247: warning: implicit declaration of function ‘glade_xml_new’
> gyrus-talk.c:249: warning: implicit declaration of function
> ‘glade_xml_get_widget’
> gyrus-talk.c:272: warning: implicit declaration of function
> ‘glade_xml_signal_autoconnect’
> make[2]: *** [gyrus-talk.o] Error 1
> make[2]: Leaving directory `/home/claudio/git/gnome/gyrus/tests'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/claudio/git/gnome/gyrus'
> make: *** [all] Error 2

Fixed this by migrating it to GtkBuilder. Closing this as FIXED now.