com gtk/php-gtk: Weird title characters bug test script: test/bug_gtkdialog_title.phpw
[email protected] (David Soria Parra) Wed, 19 Oct 2005 17:34:29 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: c9f393af97333ca550918b3f299d9e0c5b03a9f9 Author: Christian Weiske <[email protected]> Wed, 19 Oct 2005 17:34:29 +0000 Parents: a76fa20400b231f9d9a1a493a9afc5cb112244b2 Branches: master Link: http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=c9f393af97333ca550918b3f299d9e0c5b03a9f9 Log: Weird title characters bug test script Changed paths: A test/bug_gtkdialog_title.phpw Diff: c9f393af97333ca550918b3f299d9e0c5b03a9f9 diff --git a/test/bug_gtkdialog_title.phpw b/test/bug_gtkdialog_title.phpw new file mode 100644 index 0000000..3ce58ab --- /dev/null +++ b/test/bug_gtkdialog_title.phpw @@ -0,0 +1,52 @@ +<?php +/** +* Start the program, look at the title: Weird chars +* Click on the "Show again" button. Different weird chars. +*/ +function showDialog() +{ + $dialog = new GtkDialog('abcdef', null, 0, array( Gtk::STOCK_OK, Gtk::RESPONSE_OK, '_Show again', Gtk::RESPONSE_CANCEL)); + + $hbox = new GtkHBox(false, 8); + $hbox->set_border_width(8); + $dialog->vbox->pack_start($hbox, false, false, 0); + + $stock = GtkImage::new_from_stock( + Gtk::STOCK_DIALOG_QUESTION, + Gtk::ICON_SIZE_DIALOG); + $hbox->pack_start($stock, false, false, 0); + + $table = new GtkTable(2, 2); + $table->set_row_spacings(4); + $table->set_col_spacings(4); + $hbox->pack_start($table, true, true, 0); + + $label = new GtkLabel('Entry _1'); + $label->set_use_underline(true); + $table->attach($label, 0, 1, 0, 1); + $local_entry1 = new GtkEntry(); + //$local_entry1->set_text($this->entry1->get_text()); + $table->attach($local_entry1, 1, 2, 0, 1); + $label->set_mnemonic_widget($local_entry1); + + $label = new GtkLabel('Entry _2'); + $label->set_use_underline(true); + $table->attach($label, 0, 1, 1, 2); + $local_entry2 = new GtkEntry(); + //$local_entry2->set_text($this->entry2->get_text()); + $table->attach($local_entry2, 1, 2, 1, 2); + $label->set_mnemonic_widget($local_entry2); + + $dialog->show_all(); + + $response = $dialog->run(); + + $dialog->destroy(); + if ($response == Gtk::RESPONSE_CANCEL) { + showDialog(); + // $this->entry1->set_text($local_entry1->get_text()); + // $this->entry2->set_text($local_entry2->get_text()); + } +} +showDialog(); +?> \ No newline at end of file