Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
What is the equivalent of GTK_FILE_CHOOSER (dialog) in xblite ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Julien  
View profile  
 More options Mar 23 2009, 2:01 pm
From: Julien <j.a.rouil...@gmail.com>
Date: Mon, 23 Mar 2009 11:01:53 -0700 (PDT)
Local: Mon, Mar 23 2009 2:01 pm
Subject: [GTK+] What is the equivalent of GTK_FILE_CHOOSER (dialog) in xblite ?
Hello all,

I'm playing with GTK+ for xblite and cannot figure me out which
argument pass to gtk_file_chooser_get_filename. In other words, what
is the equivalent of GTK_FILE_CHOOSER for the xblite binding of GTK+.

IF (gtk_dialog_run (dialog) = $$GTK_RESPONSE_ACCEPT) THEN
    filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER
(dialog));
END IF

I assume that in C++, GTK_FILE_CHOOSER() returns a pointer to the
"File" field of the "Open file" dialog but have no idea how to
retrieve such GTK child grid in xblite.

Some valid code to open the "Open file" dialog is pasted in the 2nd
message of this thread.
http://www.xblite.com/forum/m-1237579901/

Thanks for any help.

Julien


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Liviu  
View profile  
 More options Mar 25 2009, 7:06 pm
From: Liviu <xx.li...@gmail.com>
Date: Wed, 25 Mar 2009 16:06:37 -0700 (PDT)
Local: Wed, Mar 25 2009 7:06 pm
Subject: Re: What is the equivalent of GTK_FILE_CHOOSER (dialog) in xblite ?
Hi Julien,

This code works for me:

gtk_init (argc, argv)
title$ = "Open file"
dialog = gtk_file_chooser_dialog_new (&title$, NULL, $
$GTK_FILE_CHOOSER_ACTION_OPEN, &$$GTK_STOCK_CANCEL, $
$GTK_RESPONSE_CANCEL, &$$GTK_STOCK_OPEN, $$GTK_RESPONSE_ACCEPT, NULL)

IF (gtk_dialog_run (dialog) = $$GTK_RESPONSE_ACCEPT) THEN
    filename = gtk_file_chooser_get_filename_utf8 (dialog)
    PRINT CSTRING$(filename)
    'open_file (filename);
    'g_free (filename);
END IF

gtk_widget_destroy (dialog)

a$ = INLINE$("Press ENTER to exit")

As you see, you will have to use gtk_file_chooser_get_filename_utf8
instead of gtk_file_chooser_get_filename
(see gtkfilechooser.h
/* Reserve old names for DLL ABI backward compatibility */
#define gtk_file_chooser_get_filename
gtk_file_chooser_get_filename_utf8
)

As far I understand GTK_FILE_CHOOSER is a macro that cast the dialog
pointer.
(
#define GTK_TYPE_FILE_CHOOSER_DIALOG
(gtk_file_chooser_dialog_get_type ())
#define GTK_FILE_CHOOSER_DIALOG(obj)
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_CHOOSER_DIALOG,
GtkFileChooserDialog))
)

To be onest, I am using Common Dialog Controls for this kind of
situations (and when I know the program will run only on Win32).

Hope this helps more than confuse..

Cheers,
Liviu

On Mar 24, 7:01 am, Julien <j.a.rouil...@gmail.com> wrote:

> Hello all,

In other words, what


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien  
View profile  
 More options Mar 29 2009, 8:04 am
From: Julien <j.a.rouil...@gmail.com>
Date: Sun, 29 Mar 2009 05:04:28 -0700 (PDT)
Local: Sun, Mar 29 2009 8:04 am
Subject: Re: What is the equivalent of GTK_FILE_CHOOSER (dialog) in xblite ?
Hi Liviu,

Thanks a lot. Seems that you better understood than me what
GTK_FILE_CHOOSER is. :-)
Your code works fine and that's the only thing that matters.
Cheers.

Julien

On Mar 26, 1:06 am, Liviu <xx.li...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »