Categories: S60 | Maemo
This page was last modified 13:55, 22 November 2007.
Using common dialogs with S60 and Maemo Platform
From Forum Nokia Wiki
Comparison
Both S60 Platform and Maemo Platform have a number of common dialogs to ease the application development.
Comparing S60 and Maemo Platforms
S60 Platform
enum TCommonDialogType
{
ECFDDialogTypeNormal,
ECFDDialogTypeSelect,
ECFDDialogTypeSave,
ECFDDialogTypeMove,
ECFDDialogTypeBrowse,
ECFDDialogTypeDefaultSetting,
ECFDDialogTypeCopy
};
... TFileName fileName; TBuf<KMaxFileName> defaultPath; TCommonDialogType dialogType = ECFDDialogTypeSave; ... CAknFileSelectionDialog* dialog = CAknFileSelectionDialog::NewL(dialogType); ... TBool result = dialog->RunDlgLD(fileName, defaultPath); ...
Maemo Platform
typedef struct _AppData AppData;
struct _AppData
{
HildonProgram *program; /* handle to application */
HildonWindow *window; /* handle to app's window */
osso_context_t *osso; /* handle to osso */
};
/* Struct to include view's information */
typedef struct _MainView MainView;
struct _MainView
{
/* Handle to app's data */
AppData *data;
...
};
/* File chooser */
gchar* interface_file_chooser(MainView * mainview, GtkFileChooserAction action)
{
GtkWidget *dialog;
gchar* filename = NULL;
dialog = hildon_file_chooser_dialog_new( GTK_WINDOW(mainview->data->program), action);
gtk_widget_show_all (GTK_WIDGET(dialog));
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
{
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
}
gtk_widget_destroy (dialog);
return filename;
}
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple views with dialogs | djgtram | Symbian User Interface | 0 | 2005-01-01 20:33 |
| SRTP support on S60 platform | winfoware999 | General Symbian C++ | 1 | 2008-06-13 09:56 |
| UDP/HTTP(S) issues | spieri | Mobile Java Networking & Messaging & Security | 1 | 2006-11-13 23:33 |
| Developing a GUI Application for S60 2nd and S60 3rd Editions. Compatibility issues. | AlfredoRU | Symbian User Interface | 3 | 2007-02-02 12:16 |
| Invalid .vcproj using SDK 8.0a makmake | Neotilus | Symbian Tools & SDKs | 0 | 2005-04-22 13:18 |


