Re: Compilation error with 3.22.28

2018-03-08 Thread Ingo Brückl
> ./.libs/libgtk-3.so: undefined reference to 
> `_gtk_marshal_BOOLEAN__BOXED_BOXED'
> collect2: error: ld returned 1 exit status

> Any ideas?

The provided gtkmarshalers.c is crappy!
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Regression with label and max-width-chars in GTK3 notebooks?

2018-03-04 Thread Ingo Brückl
With GTK2 you could

  gtk_label_set_max_width_chars(GTK_LABEL(label), 10);
  gtk_notebook_append_page_menu(GTK_NOTEBOOK(notebook), child, label, NULL);

to get a label cut short to a maximum of 10 characters.

With GTK3 this seems to be ignored.

Using max-width-chars is especially useful together with something like

  gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);

but this gives even stranger results with GTK3 - cut short now, but to 2
characters with an ellipse.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Bug 554926 still in 2.24.31

2017-09-02 Thread Ingo Brückl
Hi,

after a few months have passed, a new reminder.

In the meantime, there is a ready-to-apply git patch:

  https://bugzilla.gnome.org/show_bug.cgi?id=785165

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


g_signal_connect() and G_OBJECT

2017-06-30 Thread Ingo Brückl
Hi,

it seems that it was common practice to cast the first argument of
g_signal_connect() to G_OBJECT when I started developing applications with
GTK+ quite a while ago. At least I've learned it that way and am doing it
ever since.

I repeatedly see usage of g_signal_connect() without that cast which seems
to make sense since "instance" only has to be a gpointer and will be checked
G_TYPE_CHECK_INSTANCE at run time.

So I'm just curious. Is/was there a reason for the G_OBJECT cast? Was it
necessary back in the days (when GTK+ 2 took over from GTK+ 1)?

Ingo
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Bug 554926 still in 2.24.31

2017-05-25 Thread Ingo Brückl
On Tue, 25 Apr 2017 13:38:22 +0200, I wrote:

> Please apply commit e3bd926c1ef83027c756488ba19f4353930fc6db to current
> GTK+ 2 (2.24.31) where it is missing.

> The bug has been described in

>   https://bugzilla.gnome.org/show_bug.cgi?id=554926

> and has been fixed on Tue, 10 Aug 2010 04:13:22 + (UTC) in 2.90.5.

Someone please apply and fix it.

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: gdk-pixbuf: Add IANA registered image/emf and image/wmf

2017-05-25 Thread Ingo Brückl
> Please see

>   https://bugzilla.gnome.org/show_bug.cgi?id=782390

Ping?

These media types are being used by shared-mime-info for over 8 months.

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


gdk-pixbuf: Add IANA registered image/emf and image/wmf

2017-05-09 Thread Ingo Brückl
Please see

  https://bugzilla.gnome.org/show_bug.cgi?id=782390

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Bug 554926 still in 2.24.31

2017-05-07 Thread Ingo Brückl
> Please apply commit e3bd926c1ef83027c756488ba19f4353930fc6db to current
> GTK+ 2 (2.24.31) where it is missing.

> The bug has been described in

>   https://bugzilla.gnome.org/show_bug.cgi?id=554926

> and has been fixed on Tue, 10 Aug 2010 04:13:22 + (UTC) in 2.90.5.

Ping?

It should not be a big deal.

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Bug 554926 still in 2.24.31

2017-04-25 Thread Ingo Brückl
Please apply commit e3bd926c1ef83027c756488ba19f4353930fc6db to current
GTK+ 2 (2.24.31) where it is missing.

The bug has been described in

  https://bugzilla.gnome.org/show_bug.cgi?id=554926

and has been fixed on Tue, 10 Aug 2010 04:13:22 + (UTC) in 2.90.5.

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Test suite problems

2016-06-26 Thread Ingo Brückl
> Emmanuele Bassi wrote on Mon, 13 Jun 2016 15:43:21 +0100:

>> GLib and GTK+ track patches on Bugzilla; could you please open a bug at:

>>   https://bugzilla.gnome.org/enter_bug.cgi?product=glib

>> and attach your patches there?

> Done: https://bugzilla.gnome.org/show_bug.cgi?id=767609

Ping.

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Test suite problems

2016-06-13 Thread Ingo Brückl
Emmanuele Bassi wrote on Mon, 13 Jun 2016 15:43:21 +0100:

> GLib and GTK+ track patches on Bugzilla; could you please open a bug at:

>   https://bugzilla.gnome.org/enter_bug.cgi?product=glib

> and attach your patches there?

Done: https://bugzilla.gnome.org/show_bug.cgi?id=767609

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


[PATCH 2/6] tests: Grant timer some time to run

2016-06-13 Thread Ingo Brückl
Don't immediately query the timer, but let it run a while.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 glib/tests/timer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/glib/tests/timer.c b/glib/tests/timer.c
index cb9a268..18a762f 100644
--- a/glib/tests/timer.c
+++ b/glib/tests/timer.c
@@ -31,6 +31,7 @@ test_timer_basic (void)
   gulong micros;

   timer = g_timer_new ();
+  g_usleep (100);

   elapsed = g_timer_elapsed (timer, );

@@ -47,6 +48,7 @@ test_timer_stop (void)
   gdouble elapsed, elapsed2;

   timer = g_timer_new ();
+  g_usleep (100);

   g_timer_stop (timer);

--
2.8.2

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


[PATCH 1/6] tests: Use built modules instead of installed ones

2016-06-13 Thread Ingo Brückl
After the removal of g_local_directory_monitor_get_type() the gio
test suite may fail with

  undefined symbol: g_local_directory_monitor_get_type

when using the installed modules instead of the just built ones.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 gio/tests/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index 749267b..bd1c196 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -19,6 +19,8 @@ AM_CFLAGS = $(GLIB_WARN_CFLAGS)
 # -
 #  Test programs buildable on all platforms

+TESTS_ENVIRONMENT += GIO_MODULE_DIR="$(abs_builddir)$(subdir)/.libs"
+
 test_programs = \
appmonitor  \
async-close-output-stream   \
--
2.8.2

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


[PATCH 3/6] tests: Avoid rounding errors with double precision variables

2016-06-13 Thread Ingo Brückl
The double precision variable 'elapsed' (computed from an guint64 by
division by 1e6) must be "rounded up" in order to pass the test for
equality reliably.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 glib/tests/timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/glib/tests/timer.c b/glib/tests/timer.c
index 18a762f..f165301 100644
--- a/glib/tests/timer.c
+++ b/glib/tests/timer.c
@@ -36,7 +36,7 @@ test_timer_basic (void)
   elapsed = g_timer_elapsed (timer, );

   g_assert_cmpfloat (elapsed, <, 1.0);
-  g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 100);
+  g_assert_cmpuint (micros, ==, ((guint64)((elapsed + 0.005) * 1e6)) % 
100);

   g_timer_destroy (timer);
 }
@@ -56,7 +56,7 @@ test_timer_stop (void)
   g_usleep (100);
   elapsed2 = g_timer_elapsed (timer, NULL);

-  g_assert_cmpfloat (elapsed, ==, elapsed2);
+  g_assert_cmpfloat ((float)elapsed, ==, (float)elapsed2);

   g_timer_destroy (timer);
 }
--
2.8.2

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


[PATCH 6/6] tests: Don't run tests requiring DBUS unconditionally

2016-06-13 Thread Ingo Brückl
The tests defaultvalue, gdbus-peer and gdbus-unix-addresses will fail
without DBUS, so only run them in case we HAVE_DBUS_DAEMON.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 gio/tests/Makefile.am | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index bd1c196..d8054f7 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -34,7 +34,6 @@ test_programs = \
credentials \
data-input-stream   \
data-output-stream  \
-   defaultvalue\
fileattributematcher\
filter-streams  \
giomodule   \
@@ -247,7 +246,6 @@ if OS_UNIX
 test_programs += \
file\
gdbus-peer-object-manager   \
-   gdbus-unix-addresses\
live-g-file \
socket-address  \
stream-rw_all   \
@@ -385,7 +383,6 @@ uninstalled_test_extra_programs += gdbus-test-fixture
 gdbus_test_fixture_LDADD = 
gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)

 # This is peer to peer so it doesn't need a session bus (so we can run it 
normally)
-test_programs += gdbus-peer
 gdbus_peer_LDADD = 
gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)

 # This test is currently unreliable
@@ -400,6 +397,7 @@ gdbus_sessionbus_sources = gdbus-sessionbus.c 
gdbus-sessionbus.h gdbus-tests.h g
 test_programs += \
actions \
dbus-appinfo\
+   defaultvalue\
gapplication\
gdbus-auth  \
gdbus-bz627724  \
@@ -412,6 +410,7 @@ test_programs += \
gdbus-export\
gdbus-introspection \
gdbus-names \
+   gdbus-peer  \
gdbus-proxy \
gdbus-proxy-threads \
gdbus-proxy-well-known-name \
@@ -422,6 +421,10 @@ test_programs += \
gnotification   \
$(NULL)

+if OS_UNIX
+test_programs += gdbus-unix-addresses
+endif
+
 gdbus_proxy_threads_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
 actions_SOURCES  = $(gdbus_sessionbus_sources) 
actions.c
 dbus_appinfo_SOURCES = $(gdbus_sessionbus_sources) 
dbus-appinfo.c
--
2.8.2

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


[PATCH 5/6] tests: Fix network-address test

2016-06-13 Thread Ingo Brückl
GResolver considers the scope ID, which results in an invalid
resolution.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 gio/tests/network-address.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gio/tests/network-address.c b/gio/tests/network-address.c
index 622af17..03bde89 100644
--- a/gio/tests/network-address.c
+++ b/gio/tests/network-address.c
@@ -123,10 +123,8 @@ static ResolveTest address_tests[] = {
   { "192.168.1.2", TRUE,  TRUE,  TRUE },
   { "fe80::42",TRUE,  TRUE,  TRUE },

-  /* GResolver accepts this by ignoring the scope ID. This was not
-   * intentional, but it's best to not "fix" it at this point.
-   */
-  { "fe80::42%1",  TRUE,  TRUE,  FALSE },
+  /* GResolver observes the scope ID. */
+  { "fe80::42%1",  TRUE,  FALSE, FALSE },

   /* g_network_address_parse() accepts these, but they are not
* (just) IP addresses.
--
2.8.2

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


[PATCH 4/6] tests: Continue iochannel test if iconv isn't supporting EUC-JP

2016-06-13 Thread Ingo Brückl
There a two more issue related to bug 428048:

1. The warning makes the test fail, so only warn if we are going
to return with error.

2. In case EUC-JP isn't supported G_CONVERT_ERROR_FAILED may be
reported back as well.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 tests/iochannel-test.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/iochannel-test.c b/tests/iochannel-test.c
index 06a85e5..5901b34 100644
--- a/tests/iochannel-test.c
+++ b/tests/iochannel-test.c
@@ -88,10 +88,12 @@ gint main (gint argc, gchar * argv[])
 g_io_channel_set_encoding (gio_r, encoding, );
 if (gerr)
   {
-g_warning ("%s", gerr->message);
 /* Keep going if this is just a case of iconv not supporting EUC-JP, 
see bug 428048 */
-if (gerr->code != G_CONVERT_ERROR_NO_CONVERSION)
+if (gerr->code != G_CONVERT_ERROR_NO_CONVERSION && gerr->code != 
G_CONVERT_ERROR_FAILED)
+{
+  g_warning ("%s", gerr->message);
   return 1;
+}
 g_clear_error ();
   }

--
2.8.2

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


Test suite problems

2016-06-13 Thread Ingo Brückl
I was upgrading glib from v2.44.1 to v2.48.1 and having some problems with
the test suite.

Please consider the following 6 patches. After having applied them locally,
the test suite stopped from failing and ended error-free.

Ingo
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


GdkPixmap as X11 Pixmap?

2011-06-07 Thread Ingo Brückl
I'm trying to get an X11 Pixmap from a GDK rendering function as follows
(my_pixbuf has been created by gdk-pixbuf-csource):

  GdkPixmap *gdkIcon;
  GdkBitmap *gdkIconMask;
  Pixmap Icon;
  Pixmap IconMask;

  gtk_init(argc, argv);

  gdk_pixbuf_render_pixmap_and_mask_for_colormap
  (
gdk_pixbuf_new_from_inline(-1, my_pixbuf, FALSE, NULL),
gdk_screen_get_system_colormap(gdk_screen_get_default()),
gdkIcon,
gdkIconMask,
128
  );

  Icon = GDK_PIXMAP_XID(gdkIcon);
  IconMask = GDK_PIXMAP_XID(gdkIconMask);

Icon and IconMask are used then to set icon_pixmap and icon_mask with
XSetWMHints() for a window created by XCreateWindow().

What I see on the X11 window is an icon that somehow looks like my_pixbuf.
It seems that there is some distortion or that it is partly destroyed,
maybe overwritten with other data?
Different calls of the program show different distortions of the icon.

What am I doing wrong? Isn't GDK_PIXMAP_XID(gdkIcon) a X11 Pixmap that I can
use in X11 functions?

Ingo
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list