Gtkmm-forge Digest, Vol 6, Issue 5



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 320198] Port to libgda 2 (Glom (bugzilla.gnome.org))
   2. [Bug 371487] New:	Gnome::Vfs::DirectoryHandle::list_load has
      wrong signature (gnomemm (bugzilla.gnome.org))
   3. [Bug 371487]	Gnome::Vfs::DirectoryHandle::list_load has wrong
      signature (gnomemm (bugzilla.gnome.org))
   4. [Bug 371487]	Gnome::Vfs::DirectoryHandle::list_load has wrong
      signature (gnomemm (bugzilla.gnome.org))
   5. [Bug 371561] New: Inconsistency in naming
      Statusbar/ProgressBar (gtkmm (bugzilla.gnome.org))
   6. [Bug 371561] Inconsistency in naming	Statusbar/ProgressBar
      (gtkmm (bugzilla.gnome.org))
   7. [Bug 371561] Inconsistency in naming	Statusbar/ProgressBar
      (gtkmm (bugzilla.gnome.org))
   8. [Bug 371487]	Gnome::Vfs::DirectoryHandle::list_load has wrong
      signature (gnomemm (bugzilla.gnome.org))


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

Message: 1
Date: Mon,  6 Nov 2006 04:43:11 +0000 (UTC)
From: "Glom (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 320198] Port to libgda 2
To: gtkmm-forge lists sourceforge net
Message-ID: <20061106044311 551176C4253 box gnome org>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=320198

  Glom | build | Ver: CVS HEAD


Murray Cumming changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          QAContact|gtkmm-                      |murrayc murrayc com
                   |forge lists sourceforge net |




-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

Message: 2
Date: Mon,  6 Nov 2006 11:56:17 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 371487] New:
	Gnome::Vfs::DirectoryHandle::list_load has wrong signature
To: gtkmm-forge lists sourceforge net
Message-ID: <bug-371487-5595 http bugzilla gnome org/>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=371487

  gnomemm | gnome-vfsmm | Ver: 2.10

           Summary: Gnome::Vfs::DirectoryHandle::list_load has wrong
                    signature
           Product: gnomemm
           Version: 2.10
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gnome-vfsmm
        AssignedTo: gtkmm-forge lists sourceforge net
        ReportedBy: maikbeckmann gmx de
         QAContact: gtkmm-forge lists sourceforge net
     GNOME version: 2.15/2.16
   GNOME milestone: Unspecified


Hello

The following static member-function of Gnome::Vfs::DirectoryHandle:
<directory-handle.h>
static void list_load(const Glib::ListHandle<Glib::ustring>& list,
                      const Glib::ustring& text_uri, 
                      FileInfoOptions info_options) throw(exception);
</directory-handle.h>
seems to be useless.

See this little example program:
<code>
#include <libgnomevfsmm.h>
#include <iostream>
#include <list>

int main(int argc, char** argv)
{
    Gnome::Vfs::init();

    std::list<Glib::ustring>        list;
    Glib::ListHandle<Glib::ustring> listHandle(list);
    Gnome::Vfs::DirectoryHandle::list_load(
        listHandle,
        "ftp://ftp.gnome.org";,
        Gnome::Vfs::FILE_INFO_DEFAULT );

    std::cout << list.size() << std::endl; 

    // ------------------------------
    GList* glist;
    gnome_vfs_directory_list_load(
        &glist, 
        "ftp://ftp.gnome.org";,               
static_cast<GnomeVFSFileInfoOptions>(Gnome::Vfs::FILE_INFO_DEFAULT) );

    std::cout << g_list_length(glist) << std::endl; // prints: 17
    GnomeVFSFileInfo* info =
static_cast<GnomeVFSFileInfo*>(g_list_nth_data(glist,5));
    std::cout << info->name << std::endl;

    return 0;
}
</code>

<output>
0
17
conspiracy
</output>

The GList holds pointers GnomeVFSFileInfo structures, so Glib::ustring
being ListHandle-type makes no sense.


Maik Beckmann


<doc-links>
- Glib::ListHandle
http://gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ListHandle.html
- Gnome::Vfs::DirectoryHandle
http://www.gtkmm.org/gnomemm2/reference/html/classGnome_1_1Vfs_1_1DirectoryHandle.html
- gnome_vfs_directory_list_load
http://developer.gnome.org/doc/API/2.0/gnome-vfs-2.0/gnome-vfs-20-gnome-vfs-directory-list-ops.html#gnome-vfs-directory-list-load
<doc-links>


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

Message: 3
Date: Mon,  6 Nov 2006 14:32:15 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 371487]
	Gnome::Vfs::DirectoryHandle::list_load has wrong signature
To: gtkmm-forge lists sourceforge net
Message-ID: <20061106143215 7BD666C40D1 box gnome org>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=371487

  gnomemm | gnome-vfsmm | Ver: 2.10





------- Comment #1 from Maik Beckmann  2006-11-06 14:31 UTC -------
Hello Again

I worked on this issue, but didn't solve it yet.

I want to comment to points

1. The interface
2. Implementation
3. Is a ListHandle object mutable?

############################

###
1. The interface

Since Gnome::Vfs::FileInfo is a reference counted type 
<doc-link>
http://www.gtkmm.org/gnomemm2/reference/html/classGnome_1_1Vfs_1_1FileInfo.html
</doc-link>
the Interface should IMHO look like this:
<directory-handle.h>
// We are inside namespace Gnome::Vfs and class-definition DirectoryHandle
static void list_load( Glib::ListHandle<Glib::RefPtr<FileInfo> >& list, 
                       const Glib::ustring& text_uri,
                       FileInfoOptions info_options )    throw(exception);
</directory-handle.h>
Note: The ListHandle isn't const anymore, since we want to alter the GList it
wraps.
(Why isn't FileInfoOptions const?)

###
2. Implementation

If we alter the interface only, it would look like this
<directory-handle.cc>
static void 
DirectoryHandle::list_load( Glib::ListHandle<Glib::RefPtr<FileInfo> >& list, 
                            const Glib::ustring& text_uri,
                            FileInfoOptions info_options )    throw(exception);
{
  GList* temp_list = list.data();
  GnomeVFSResult result = 
    gnome_vfs_directory_list_load( 
                          &temp_list, 
                          text_uri.c_str(),   
                          static_cast<GnomeVFSFileInfoOptions>(info_options) );
  handle_result(result);
}
</directory-handle.cc>
but didn't work though.
The line
<code>
GList* temp_list = list.data();
</code>
itents to use temp_list for altering the the GList ListHandle holds. But the
following line
<code>
gnome_vfs_directory_list_load( 
                          &temp_list, // temp_list itself will be altered 
                          text_uri.c_str(),   
                          static_cast<GnomeVFSFileInfoOptions>(info_options) );
</code>
alters the variable temp_list, not the object it points to. 
(I notized this by using ddd for debugging) 

###
3. Is a ListHandle object mutable?

If you look at the ListHandle documentation
<doc-link>
http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ListHandle.html
</doc-link>
you'll see that all member functions are const. This brings up the question:
- Is a ListHandle object mutable? 

If not the interface has to look like this
<code>
static  Glib::ListHandle<Glib::RefPtr<FileInfo> > 
list_load( const Glib::ustring& text_uri,
           /* const? */FileInfoOptions info_options )    throw(exception) ;
</code>


Regards, Maik


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

Message: 4
Date: Mon,  6 Nov 2006 15:00:25 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 371487]
	Gnome::Vfs::DirectoryHandle::list_load has wrong signature
To: gtkmm-forge lists sourceforge net
Message-ID: <20061106150025 0955D6C41B3 box gnome org>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=371487

  gnomemm | gnome-vfsmm | Ver: 2.10





------- Comment #2 from Maik Beckmann  2006-11-06 14:59 UTC -------
I'm thinking about something like this:

<code>
#include <libgnomevfsmm.h>
#include <iostream>
#include <list>

Glib::ListHandle<Glib::RefPtr<Gnome::Vfs::FileInfo> >
list_load( const Glib::ustring& text_uri,
           const Gnome::Vfs::FileInfoOptions info_options) // throw(exception) 
{
    typedef Glib::ListHandle<Glib::RefPtr<Gnome::Vfs::FileInfo> > ret_t;

    GList* temp_list;
    GnomeVFSResult result =
        gnome_vfs_directory_list_load( &temp_list,
                                       text_uri.c_str(),
                                      
static_cast<GnomeVFSFileInfoOptions>(info_options) );

    //handle_result(result);
    return ret_t(temp_list, Glib::OWNERSHIP_SHALLOW); // ...
    // ...I'm not sure about the right ownership!!

}

int main(int argc, char** argv)
{
    Gnome::Vfs::init();

    typedef
        Glib::ListHandle<Glib::RefPtr<Gnome::Vfs::FileInfo> >
        list_t ;

    list_t listHandle = list_load( "ftp://ftp.gnome.org/";,
                                    Gnome::Vfs::FILE_INFO_DEFAULT );

    listHandle.begin();

    for (list_t::const_iterator it=listHandle.begin(); it!= listHandle.end();
++it)
    {
        std::cout << (*it)->get_name() << std::endl;
    }



    return 0;
}
</code>

please spend your 2 cents

Maik


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

Message: 5
Date: Mon,  6 Nov 2006 15:20:47 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 371561] New: Inconsistency in naming
	Statusbar/ProgressBar
To: gtkmm-forge lists sourceforge net
Message-ID: <bug-371561-5595 http bugzilla gnome org/>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=371561

  gtkmm | general | Ver: 2.10.x

           Summary: Inconsistency in naming Statusbar/ProgressBar
           Product: gtkmm
           Version: 2.10.x
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Keywords: usability
          Severity: minor
          Priority: Normal
         Component: general
        AssignedTo: gtkmm-forge lists sourceforge net
        ReportedBy: al059365 alumail uji es
         QAContact: gtkmm-forge lists sourceforge net
     GNOME version: 2.15/2.16
   GNOME milestone: Unspecified


When I was coding I realized that Gtk::Statusbar class didn't have its b in
capital letter but ProgressBar is with a capital B. I think Statusbar should be
written as StatusBar.


Other information:


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

Message: 6
Date: Mon,  6 Nov 2006 15:22:41 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 371561] Inconsistency in naming
	Statusbar/ProgressBar
To: gtkmm-forge lists sourceforge net
Message-ID: <20061106152241 7939B6C414A box gnome org>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=371561

  gtkmm | general | Ver: 2.10.x


German Diago changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |al059365 alumail uji es




-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

Message: 7
Date: Mon,  6 Nov 2006 15:23:54 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 371561] Inconsistency in naming
	Statusbar/ProgressBar
To: gtkmm-forge lists sourceforge net
Message-ID: <20061106152354 B68D26C4153 box gnome org>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=371561

  gtkmm | general | Ver: 2.10.x


German Diago changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|All                         |Linux




-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

Message: 8
Date: Mon,  6 Nov 2006 17:03:40 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
	<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 371487]
	Gnome::Vfs::DirectoryHandle::list_load has wrong signature
To: gtkmm-forge lists sourceforge net
Message-ID: <20061106170340 331F16C43BF box gnome org>
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=371487

  gnomemm | gnome-vfsmm | Ver: 2.10


Murray Cumming changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |murrayc murrayc com




------- Comment #3 from Murray Cumming  2006-11-06 17:02 UTC -------
> Glib::ListHandle<Glib::RefPtr<Gnome::Vfs::FileInfo> >
> list_load( const Glib::ustring& text_uri,
           const Gnome::Vfs::FileInfoOptions info_options) // throw(exception) 

This looks fine, though the const for info_options is meaningless (the
parameter  is passed by value) and should be removed.

Could you submit a patch, please, now that you seem to have figured out how
this should work. That's easier for me to review and test. Many thanks.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

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


End of Gtkmm-forge Digest, Vol 6, Issue 5
*****************************************



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