mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Move the about dialog to the glade file, add accessible tags examples to
2008-01-29 Johan Dahlin <johan@gnome.org> * demos/gtk-demo/builder.c: (quit_activate), (about_activate), (do_builder): * demos/gtk-demo/demo.ui: Move the about dialog to the glade file, add accessible tags examples to the markup file. svn path=/trunk/; revision=19426
This commit is contained in:
parent
5c1a343c75
commit
12b46f84bf
@ -1,3 +1,11 @@
|
||||
2008-01-29 Johan Dahlin,,, <johan@gnome.org>
|
||||
|
||||
* demos/gtk-demo/builder.c: (quit_activate), (about_activate),
|
||||
(do_builder):
|
||||
* demos/gtk-demo/demo.ui:
|
||||
Move the about dialog to the glade file, add accessible tags
|
||||
examples to the markup file.
|
||||
|
||||
2008-01-28 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
* gtk/gtkprintunixdialog.c (draw_page_cb): do not leak the pango
|
||||
|
@ -6,9 +6,15 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkBuilder *builder;
|
||||
|
||||
void
|
||||
quit_activate (GtkAction *action)
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||
gtk_widget_destroy (window);
|
||||
}
|
||||
|
||||
void
|
||||
@ -16,18 +22,15 @@ about_activate (GtkAction *action)
|
||||
{
|
||||
GtkWidget *about_dlg;
|
||||
|
||||
about_dlg = gtk_about_dialog_new ();
|
||||
gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about_dlg),
|
||||
"GtkBuilder demo");
|
||||
about_dlg = GTK_WIDGET (gtk_builder_get_object (builder, "aboutdialog1"));
|
||||
gtk_dialog_run (GTK_DIALOG (about_dlg));
|
||||
gtk_widget_destroy (about_dlg);
|
||||
gtk_widget_hide (about_dlg);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_builder (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkBuilder *builder;
|
||||
GError *err = NULL;
|
||||
gchar *filename;
|
||||
|
||||
|
@ -141,18 +141,28 @@
|
||||
</toolbar>
|
||||
</ui>
|
||||
</object>
|
||||
|
||||
<object class="GtkAboutDialog" id="aboutdialog1">
|
||||
<property name="program-name" translatable="yes">GtkBuilder demo</property>
|
||||
<accessibility>
|
||||
<relation target="window1" type="subwindow-of"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default_height">250</property>
|
||||
<property name="default_width">440</property>
|
||||
<property name="title">builder</property>
|
||||
<property name="title">GtkBuilder demo</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object constructor="uimanager" class="GtkMenuBar" id="menubar1">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-menubar">
|
||||
<property name="AtkObject::accessible-name">The menubar</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
</packing>
|
||||
@ -160,6 +170,11 @@
|
||||
<child>
|
||||
<object constructor="uimanager" class="GtkToolbar" id="toolbar1">
|
||||
<property name="visible">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-toolbar">
|
||||
<property name="AtkObject::accessible-name">The toolbar</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -177,6 +192,14 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="tooltip-column">3</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-treeview">
|
||||
<property name="AtkObject::accessible-name">Name list</property>
|
||||
<property name="AtkObject::accessible-description">
|
||||
A list of person with name, surname and age columns
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="column1">
|
||||
<property name="title">Name</property>
|
||||
@ -212,6 +235,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<accessibility>
|
||||
<action action_name="move-cursor" description="Move the cursor to select another person."/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
|
Loading…
Reference in New Issue
Block a user