+2008-05-13 Victor Jaquez <vjaquez@igalia.com>
+
+ * doc/visual_index.xml
+ Fix reference to HildonLoginDialog in documentation
+
+ * doc/hildon-docs.sgml
+ * doc/hildon.types
+ * examples/Makefile.am
+ * examples/hildon-dialog-example.c
+ * src/Makefile.am
+ * src/hildon-dialog.c
+ * src/hildon-dialog.h
+ * src/hildon.h
+ New HildonDialog widget.
+
2008-05-09 Alberto Garcia <agarcia@igalia.com>
* src/hildon-pannable-area.c
<chapter>
<title>Dialogs</title>
+ <xi:include href="xml/hildon-dialog.xml"/>
<xi:include href="xml/hildon-set-password-dialog.xml"/>
<xi:include href="xml/hildon-get-password-dialog.xml"/>
<xi:include href="xml/hildon-login-dialog.xml"/>
#include <src/hildon-window.h>
#include <src/hildon-wizard-dialog.h>
#include <src/hildon-calendar.h>
+#include <src/hildon-dialog.h>
hildon_banner_get_type
hildon_calendar_popup_get_type
hildon_wizard_dialog_get_type
hildon_window_get_type
hildon_calendar_get_type
+hildon_dialog_get_type
<link linkend="HildonHVolumebar">
<inlinegraphic fileref="hvolumebar.png" format="PNG"></inlinegraphic>
</link>
- <link linkend="HildonDialog">
+ <link linkend="HildonLoginDialog">
<inlinegraphic fileref="login-dialog.png" format="PNG"></inlinegraphic>
</link>
<link linkend="HildonNote">
hildon-hvolumebar-timer-example \
hildon-toolbar-seekbar-example \
hildon-pannable-area-example \
- hildon-logical-color-example
+ hildon-logical-color-example \
+ hildon-dialog-example
# Hildon window
hildon_window_example_LDADD = $(HILDON_OBJ_LIBS)
hildon_pannable_area_example_CFLAGS = $(HILDON_OBJ_CFLAGS)
hildon_pannable_area_example_SOURCES = hildon-pannable-area-example.c
+# Hildon dialog
+hildon_dialog_example_LDADD = $(HILDON_OBJ_LIBS)
+hildon_dialog_example_CFLAGS = $(HILDON_OBJ_CFLAGS)
+hildon_dialog_example_SOURCES = hildon-dialog-example.c
+
endif
--- /dev/null
+/*
+ * This file is a part of hildon examples
+ *
+ * Copyright (C) 2008 Nokia Corporation, all rights reserved.
+ *
+ * Author: Victor Jaquez <vjaquez@igalia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include "hildon.h"
+
+int
+main (int argc,
+ char **args)
+{
+ HildonDialog *d;
+ GtkWidget *label;
+
+ gtk_init (&argc, &args);
+
+ d = HILDON_DIALOG (hildon_dialog_new ());
+ label = gtk_label_new ("Hello, world!");
+
+ gtk_window_set_title (GTK_WINDOW (d), "Hi!");
+ gtk_dialog_add_button (GTK_DIALOG (d), GTK_STOCK_OK, GTK_RESPONSE_NONE);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG(d)->vbox), label);
+
+ gtk_widget_show_all (GTK_WIDGET (d));
+
+ gtk_dialog_run (GTK_DIALOG (d));
+
+ return 0;
+}
hildon-pannable-area.c \
hildon-bread-crumb-trail.c \
hildon-bread-crumb.c \
- hildon-bread-crumb-widget.c
+ hildon-bread-crumb-widget.c \
+ hildon-dialog.c
libhildon_@API_VERSION_MAJOR@_built_public_headers = \
hildon-enum-types.h \
hildon-pannable-area.h \
hildon-bread-crumb-trail.h \
hildon-bread-crumb.h \
+ hildon-dialog.h \
hildon-version.h
libhildon_@API_VERSION_MAJOR@_include_HEADERS = $(libhildon_@API_VERSION_MAJOR@_public_headers) \
--- /dev/null
+/*
+ * This file is a part of hildon
+ *
+ * Copyright (C) 2008 Nokia Corporation, all rights reserved.
+ *
+ * Contact: Karl Lattimer <karl.lattimer@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/**
+ * SECTION:hildon-dialog
+ * @short_description: Widget representing a popup window in the Hildon framework.
+ * @see_also: #HildonCodeDialog, #HildonColorChooserDialog, #HildonFontSelectionDialog, #HildonGetPasswordDialog, #HildonLoginDialog, #HildonSetPasswordDialog, #HildonSortDialog, #HildonWizardDialog
+ *
+ * The HildonDialog is a GTK widget which represent a popup window in the
+ * Hildon framework. It is derived from the GtkDialog and provides additional
+ * commodities specific to the Hildon framework.
+ *
+ * <example>
+ * <title>Simple <structname>HildonDialog</structname> usage</title>
+ * <programlisting>
+ * void quick_message (gchar *message)
+ * {
+ * <!-- -->
+ * GtkWidget *dialog, *label;
+ * <!-- -->
+ * dialog = hildon_dialog_new ();
+ * label = gtk_label_new (message);
+ * <!-- -->
+ * g_signal_connect_swapped (dialog,
+ * "response",
+ * G_CALLBACK (gtk_widget_destroy),
+ * dialog);
+ * <!-- -->
+ * gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
+ * label);
+ * gtk_widget_show_all (dialog);
+ * <!-- -->
+ * }
+ * </programlisting>
+ * </example>
+ */
+
+#include "hildon-dialog.h"
+
+G_DEFINE_TYPE (HildonDialog, hildon_dialog, GTK_TYPE_DIALOG);
+
+static void
+hildon_dialog_class_init (HildonDialogClass * dialog_class)
+{
+}
+
+static void
+hildon_dialog_init (HildonDialog *self)
+{
+}
+
+/**
+ * hildon_dialog_new:
+ *
+ * Creates a new #HildonDialog widget
+ *
+ * Returns: the newly created #HildonDialog
+ */
+GtkWidget*
+hildon_dialog_new (void)
+{
+ GtkWidget *self = g_object_new (HILDON_TYPE_DIALOG, NULL);
+
+ return self;
+}
--- /dev/null
+/*
+ * This file is a part of hildon
+ *
+ * Copyright (C) 2008 Nokia Corporation, all rights reserved.
+ *
+ * Contact: Karl Lattimer <karl.lattimer@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_DIALOG_H__
+#define __HILDON_DIALOG_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkdialog.h>
+
+#include "hildon-defines.h"
+
+G_BEGIN_DECLS
+
+#define HILDON_TYPE_DIALOG \
+ (hildon_dialog_get_type ())
+
+#define HILDON_DIALOG(obj) \
+ (GTK_CHECK_CAST (obj, HILDON_TYPE_DIALOG, HildonDialog))
+
+#define HILDON_DIALOG_CLASS(klass) \
+ (GTK_CHECK_CLASS_CAST ((klass),\
+ HILDON_TYPE_DIALOG, HildonDialogClass))
+
+#define HILDON_IS_DIALOG(obj) \
+ (GTK_CHECK_TYPE (obj, HILDON_TYPE_DIALOG))
+
+#define HILDON_IS_DIALOG_CLASS(klass) \
+ (GTK_CHECH_CLASS_TYPE ((klass), HILDON_TYPE_DIALOG))
+
+#define HILDON_DIALOG_GET_CLASS(obj) \
+ ((HildonDialogClass *) G_OBJECT_GET_CLASS (obj))
+
+typedef struct _HildonDialog HildonDialog;
+
+typedef struct _HildonDialogClass HildonDialogClass;
+
+struct _HildonDialog
+{
+ GtkDialog parent;
+};
+
+struct _HildonDialogClass
+{
+ GtkDialogClass parent_class;
+
+ /* Padding for future extension */
+ void (*_hildon_reserved1)(void);
+ void (*_hildon_reserved2)(void);
+ void (*_hildon_reserved3)(void);
+};
+
+GType G_GNUC_CONST
+hildon_dialog_get_type (void);
+
+GtkWidget*
+hildon_dialog_new (void);
+
+G_END_DECLS
+
+#endif /* __HILDON_DIALOG_H__ */
#include "hildon-calendar.h"
#include "hildon-bread-crumb-trail.h"
#include "hildon-pannable-area.h"
+#include "hildon-dialog.h"
#endif