Gtkmm-forge Digest, Vol 37, Issue 8



Send Gtkmm-forge mailing list submissions to
	gtkmm-forge lists sourceforge net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/gtkmm-forge
or, via email, send a message with subject or body 'help' to
	gtkmm-forge-request lists sourceforge net

You can reach the person managing the list at
	gtkmm-forge-owner lists sourceforge net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gtkmm-forge digest..."


gtkmm-forge is the mailing list that receives gtkmm bug reports from bugzilla.  A daily digest is sent to gtkmm-main, to encourage people to help fixing the bugs. Do not try to unsubscribe gtkmm-forge from gtkmm-list.


Today's Topics:

   1. [Bug 585413] Glib::Value<std::string>	specialization
      (glibmm (bugzilla.gnome.org))
   2. [Bug 585521] wrong size allocation in	RecentManager::add_item
      (gtkmm (bugzilla.gnome.org))
   3. [Bug 328831] Dialog helper functions (gtkmm (bugzilla.gnome.org))
   4. [Bug 585413] Glib::Value<std::string>	specialization
      (glibmm (bugzilla.gnome.org))
   5. [Bug 328831] Dialog helper functions (gtkmm (bugzilla.gnome.org))
   6. [Bug 585413] Glib::Value<std::string>	specialization
      (glibmm (bugzilla.gnome.org))
   7. [Bug 585521] wrong size allocation in	RecentManager::add_item
      (gtkmm (bugzilla.gnome.org))


----------------------------------------------------------------------

Message: 1
Date: Mon, 15 Jun 2009 21:26:28 +0000 (UTC)
From: "glibmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 585413] Glib::Value<std::string>
	specialization
To: gtkmm-forge lists sourceforge net
Message-ID: <20090615212628 7A06123F5A8 label gnome org>
Content-Type: text/plain; charset=utf-8

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=585413

  glibmm | object | Ver: 2.20.x

Daniel Elstner changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |minor
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX




------- Comment #4 from Daniel Elstner  2009-06-15 21:26 UTC -------
(In reply to comment #1)
> Glib specializes
> on std::string for Glib::Value to implement it as a cstring.  Why, I don't
> know, it is essentially crippling std::string.

You are correct. Glib::Value<std::string> supports only a subset of the set of
possible values of an std::string object. Which means that you cannot
transparently store every possible std::string in a Glib::Value<std::string>. I
agree that this is not ideal.

However, there is a reason for this behavior: We want std::string to be
recognizable as a string by the GObject type framework. Without the
specialization, a custom boxed type would be created for it. While this would
solve the problem you are having, it would make the value completely opaque to
GObject. In practical terms, that means GtkTreeView will no longer know how to
display it, GtkListStore and GtkTreeStore will no longer know how to sort it,
and so on.

The purpose of Glib::Value<> is to bridge the GObject and C++ type systems. In
the GObject world, a string cannot contain a NUL byte. In the world of the C++
STL, it can. Conceptually, it is a string in either universe, and should
therefore be exposed as such in the C++ API. It is unfortunate that these two
ideas of what a string is don't match perfectly, but that is something we will
have to live with. std::string::c_str() isn't applicable to all possible STL
strings either, but it was still useful enough to have it in the standard.

If you really really want this to be supported, you will have to push for a
change to the C API. If you all you need is a work-around, encapsulate the
std::string within a custom type.

I'm closing this as WONTFIX, sorry.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=585413.



------------------------------

Message: 2
Date: Mon, 15 Jun 2009 21:34:07 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 585521] wrong size allocation in
	RecentManager::add_item
To: gtkmm-forge lists sourceforge net
Message-ID: <20090615213407 DF63023F53B label gnome org>
Content-Type: text/plain; charset=utf-8

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=585521

  gtkmm | general | Ver: 2.16.x




------- Comment #6 from Daniel Elstner  2009-06-15 21:34 UTC -------
Just to preempt confusion: This a bug on any machine and in no way limited to
64 bit systems.

On a side note, the code excerpt looks suspiciously like something that needs
to be reworked anyway. Reasonable uses of g_malloc() in non-generated wrapper
code are rare.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=585521.



------------------------------

Message: 3
Date: Mon, 15 Jun 2009 21:41:56 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 328831] Dialog helper functions
To: gtkmm-forge lists sourceforge net
Message-ID: <20090615214156 3C05123F5A7 label gnome org>
Content-Type: text/plain; charset=utf-8

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=328831

  gtkmm | general | Ver: 2.8.x




------- Comment #16 from Daniel Elstner  2009-06-15 21:41 UTC -------
The only way to make this work correctly with just one function call is a modal
dialog.

Also, I don't think it is enough if we can show that it can be used in a manner
that is not broken. I think in order to justify the addition of convenience
API, that situation should also be *frequent*.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=328831.



------------------------------

Message: 4
Date: Mon, 15 Jun 2009 22:42:12 +0000 (UTC)
From: "glibmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 585413] Glib::Value<std::string>
	specialization
To: gtkmm-forge lists sourceforge net
Message-ID: <20090615224212 B8A3823F5A7 label gnome org>
Content-Type: text/plain; charset=utf-8

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=585413

  glibmm | object | Ver: 2.20.x




------- Comment #5 from reklipz gmail com  2009-06-15 22:42 UTC -------
As I'm not very familiar with the underlying glib C API, maybe you can help me
understand a few things.

As there is not inheritance in C, where does GString fall in relation to
GObject and GValue (and also it to GObject)?

I assume that the GString struct and the G_TYPE_STRING of GValue are not the
same then (as GString seems to support the NUL character).

I would say that the amount that I want this supported falls somewhere between
really and really really.  It's not enough to go and learn the C API and
architecture of glib (at least not at the moment).


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=585413.



------------------------------

Message: 5
Date: Tue, 16 Jun 2009 07:59:51 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 328831] Dialog helper functions
To: gtkmm-forge lists sourceforge net
Message-ID: <20090616075951 638C423F5A8 label gnome org>
Content-Type: text/plain; charset=utf-8

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=328831

  gtkmm | general | Ver: 2.8.x




------- Comment #17 from baltasarq yahoo es  2009-06-16 07:59 UTC -------
(In reply to comment #16)
> The only way to make this work correctly with just one function call is a modal
> dialog.

Well, it is a modal dialog. It wouldn't make sense in any other way.

> Also, I don't think it is enough if we can show that it can be used in a manner
> that is not broken. I think in order to justify the addition of convenience
> API, that situation should also be *frequent*.

I can only talk about my own experience. I created utility.cpp when I started
to work with Gtk--, and I ported it to C# when I recently worked with Gtk#. For
me, they are very useful, and they are definitely a must.

About other languages and graphic toolkits, it appears in many incarnations.

In C#, and specifically in Windows.Forms, a dialog such as the one shown by the
utility function commented above, is created through a static function
(MessageBox.Show). This function is actually overloaded for various uses, from
the simplest (just a text message) to the most complex one (various
buttons...).

In Delphi/VCL, you have a convenient function (ShowMessage) with the same
functionality.

In Java/Swing, you do also have a static function
(JOptionPane.showMessageDialog).


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=328831.



------------------------------

Message: 6
Date: Tue, 16 Jun 2009 16:52:51 +0000 (UTC)
From: "glibmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 585413] Glib::Value<std::string>
	specialization
To: gtkmm-forge lists sourceforge net
Message-ID: <20090616165251 74A4B23F5A9 label gnome org>
Content-Type: text/plain; charset=utf-8

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=585413

  glibmm | object | Ver: 2.20.x

Murray Cumming changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |




------- Comment #6 from Murray Cumming  2009-06-16 16:52 UTC -------
I don't think GString has anything to do with this. It's just an API that C
coders use to make it easier to manipulate strings.

Without looking into this much, I wonder if there is a way to provide our own
callback to do the copying.

Or maybe we can somehow allow a different Value specialization to be used,
optionally.

Reopening, because it should at least be documented.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=585413.



------------------------------

Message: 7
Date: Tue, 16 Jun 2009 16:57:48 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 585521] wrong size allocation in
	RecentManager::add_item
To: gtkmm-forge lists sourceforge net
Message-ID: <20090616165748 3DE1C23F5AF label gnome org>
Content-Type: text/plain; charset=utf-8

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=585521

  gtkmm | general | Ver: 2.16.x




------- Comment #7 from Murray Cumming  2009-06-16 16:57 UTC -------
Applied in git Thanks. Please patch the ChangeLog in future.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=585521.



------------------------------

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects

------------------------------

_______________________________________________
Gtkmm-forge mailing list
Gtkmm-forge lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gtkmm-forge


End of Gtkmm-forge Digest, Vol 37, Issue 8
******************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]