Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-03 Thread Clemens Buchacher
On Fri, Nov 02, 2012 at 07:38:37PM +0100, Mathieu Trudel-Lapierre wrote:
> 
> I actually did the porting in Ubuntu. The patch probably doesn't apply
> quite as cleanly on git master; but see the attached file which
> migrates the calls to gtk_table_* to gtk_grid_*.

Applies cleanly on git master. Tested by patching 0.9.6.0. Works fine
also without Dan's patch.

Appending your patch for Dan's reference.

Clemens

From: Mathieu Trudel-Lapierre 
Subject: Port GtkTable uses to GtkGrid.

Index: network-manager-pptp/auth-dialog/vpn-password-dialog.c
===
--- network-manager-pptp.orig/auth-dialog/vpn-password-dialog.c 2012-02-15 
11:24:03.803503000 -0500
+++ network-manager-pptp/auth-dialog/vpn-password-dialog.c  2012-02-15 
11:30:20.344710680 -0500
@@ -124,8 +124,8 @@
label = gtk_label_new_with_mnemonic (label_text);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
 
-   gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, row, row + 
1);
-   gtk_table_attach_defaults (GTK_TABLE (table), entry, 1, 2, row, row + 
1);
+   gtk_grid_attach (GTK_GRID (table), label, 0, row, 1, 1);
+   gtk_grid_attach (GTK_GRID (table), entry, 1, row, 1, 1);
 
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
 }
@@ -154,7 +154,7 @@
if (priv->show_password_secondary)
add_row (priv->table, row++, priv->secondary_password_label,  
priv->password_entry_secondary);
 
-   gtk_table_attach_defaults (GTK_TABLE (priv->table), 
priv->show_passwords_checkbox, 1, 2, row, row + 1);
+   gtk_grid_attach (GTK_GRID (priv->table), priv->show_passwords_checkbox, 
1, row, 1, 1);
 
gtk_widget_show_all (priv->table);
 }
@@ -228,9 +228,9 @@
 
priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
-   priv->table = gtk_table_new (4, 2, FALSE);
-   gtk_table_set_col_spacings (GTK_TABLE (priv->table), 12);
-   gtk_table_set_row_spacings (GTK_TABLE (priv->table), 6);
+   priv->table = gtk_grid_new ();
+   gtk_grid_set_column_spacing (GTK_GRID (priv->table), 12);
+   gtk_grid_set_row_spacing (GTK_GRID (priv->table), 6);
gtk_container_add (GTK_CONTAINER (priv->table_alignment), priv->table);
 
priv->password_entry = gtk_entry_new ();
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Mathieu Trudel-Lapierre
On Fri, Nov 2, 2012 at 3:43 PM, Clemens Buchacher  wrote:
> On Fri, Nov 02, 2012 at 10:32:25AM -0400, Pavel Simerda wrote:
>> > On Fri, Nov 02, 2012 at 09:16:29AM -0400, Colin Walters wrote:
>> > > On Fri, 2012-11-02 at 11:59 +0100, Clemens Buchacher wrote:
>> > >
>> > > > So this has been an issue for a while, and the -Werror flag does
>> > > > not
>> > > > help anything besides breaking the build.
>> > >
>> > > You're going to have to learn how to pass options to "configure" if
>> > > you're building software in general.  It's really the maintainer's
>> > > discretion what the defaults are.
>> >
>> > It is not the purpose of configure to work around
>> > platform-independent
>> > build failures.
>>
>> And?
>
> And it is therefore not a solution to do nothing and force the package
> maintainers to deal with this issue.


This wasn't handled very nicely, there is that, but there is an actual
point in making warnings errors and forcing anybody compiling to
willingly change configure settings to avoid the build failure: we
don't forget that there is work that needs to be done.

I actually did the porting in Ubuntu. The patch probably doesn't apply
quite as cleanly on git master; but see the attached file which
migrates the calls to gtk_table_* to gtk_grid_*.

Regards,

Mathieu Trudel-Lapierre 
Freenode: cyphermox, Jabber: mathieu...@gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93


gtk_table_to_gtk_grid.patch
Description: Binary data
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Clemens Buchacher
On Fri, Nov 02, 2012 at 11:36:46AM -0400, Pavel Simerda wrote:
> > And it is therefore not a solution to do nothing and force the
> > package maintainers to deal with this issue.
> 
> I still prefer a proper solution like the one from Dan Winship:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=679130

Sure. No reason to be so curt about it.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Pavel Simerda
> And it is therefore not a solution to do nothing and force the
> package maintainers to deal with this issue.

I still prefer a proper solution like the one from Dan Winship:

https://bugzilla.gnome.org/show_bug.cgi?id=679130
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Clemens Buchacher
On Fri, Nov 02, 2012 at 10:32:25AM -0400, Pavel Simerda wrote:
> > On Fri, Nov 02, 2012 at 09:16:29AM -0400, Colin Walters wrote:
> > > On Fri, 2012-11-02 at 11:59 +0100, Clemens Buchacher wrote:
> > > 
> > > > So this has been an issue for a while, and the -Werror flag does
> > > > not
> > > > help anything besides breaking the build.
> > > 
> > > You're going to have to learn how to pass options to "configure" if
> > > you're building software in general.  It's really the maintainer's
> > > discretion what the defaults are.
> > 
> > It is not the purpose of configure to work around
> > platform-independent
> > build failures.
> 
> And?

And it is therefore not a solution to do nothing and force the package
maintainers to deal with this issue.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Pavel Simerda
> On Fri, Nov 02, 2012 at 09:16:29AM -0400, Colin Walters wrote:
> > On Fri, 2012-11-02 at 11:59 +0100, Clemens Buchacher wrote:
> > 
> > > So this has been an issue for a while, and the -Werror flag does
> > > not
> > > help anything besides breaking the build.
> > 
> > You're going to have to learn how to pass options to "configure" if
> > you're building software in general.  It's really the maintainer's
> > discretion what the defaults are.
> 
> It is not the purpose of configure to work around
> platform-independent
> build failures.

And?
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Clemens Buchacher
On Fri, Nov 02, 2012 at 09:16:29AM -0400, Colin Walters wrote:
> On Fri, 2012-11-02 at 11:59 +0100, Clemens Buchacher wrote:
> 
> > So this has been an issue for a while, and the -Werror flag does not
> > help anything besides breaking the build. 
> 
> You're going to have to learn how to pass options to "configure" if
> you're building software in general.  It's really the maintainer's
> discretion what the defaults are.

It is not the purpose of configure to work around platform-independent
build failures.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Colin Walters
On Fri, 2012-11-02 at 11:59 +0100, Clemens Buchacher wrote:

> So this has been an issue for a while, and the -Werror flag does not
> help anything besides breaking the build. 

You're going to have to learn how to pass options to "configure" if
you're building software in general.  It's really the maintainer's
discretion what the defaults are.

However, I just landed
https://bugzilla.gnome.org/show_bug.cgi?id=687385
for GLib, and will shortly be attempting to do it in more of GNOME.  I
think it gives you a practical middle ground between -Werror and
nothing.  Were NM to consider changes here, it's worth a look.



___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-02 Thread Clemens Buchacher
On Thu, Nov 01, 2012 at 07:32:14PM -0400, Pavel Simerda wrote:
>
> What is it supposed to fix?

This patch is for network-manager-pptp (should have mentioned that). It
does not build against current GTK:

$ ./configure && make
[...]
gcc -Wall -Werror [...] vpn-password-dialog.c
vpn-password-dialog.c: In function ‘add_row’:
vpn-password-dialog.c:127:2: error: ‘gtk_table_attach_defaults’ is deprecated 
(declared at /usr/include/gtk-3.0/gtk/deprecated/gtktable.h:120): Use 'GtkGrid' 
instead [-Werror=deprecated-declarations]

The autoconf script enables -Werror by default. The original bug report
https://bugzilla.gnome.org/show_bug.cgi?id=679130 is dated 2012-06-29.
So this has been an issue for a while, and the -Werror flag does not
help anything besides breaking the build. I therefore suggest that
-Werror be disabled by default. It can be re-enabled on the command line
by running ./configure --enable-more-warnings=error.

Eventually, the deprecations should be fixed as well. But I do not see a
point in disabling a software that is working just fine.

Regards,
Clemens
---

Additional info:

networkmanager-pptp 0.9.6.0-1
gtk3 3.6.1-1
gcc 4.7.2-2
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] fix build: disable -Werror by default (Bug #679130)

2012-11-01 Thread Pavel Simerda
What is it supposed to fix?

- Original Message -
> From: "Clemens Buchacher" 
> To: networkmanager-list@gnome.org
> Sent: Thursday, November 1, 2012 6:58:05 PM
> Subject: [PATCH] fix build: disable -Werror by default (Bug #679130)
> 
> This fixes https://bugzilla.gnome.org/show_bug.cgi?id=679130.
> 
> Signed-off-by: Clemens Buchacher 
> ---
>  m4/compiler_warnings.m4 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4
> index 95ad3fb..ac21b89 100644
> --- a/m4/compiler_warnings.m4
> +++ b/m4/compiler_warnings.m4
> @@ -1,7 +1,7 @@
>  AC_DEFUN([NM_COMPILER_WARNINGS],
>  [AC_ARG_ENABLE(more-warnings,
>   AS_HELP_STRING([--enable-more-warnings], [Possible values:
>   no/yes/error]),
> - set_more_warnings="$enableval",set_more_warnings=error)
> + set_more_warnings="$enableval",set_more_warnings=yes)
>  AC_MSG_CHECKING(for more warnings)
>  if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
>   AC_MSG_RESULT(yes)
> --
> 1.8.0
> 
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/networkmanager-list
> 
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list