Gnome2::DateEdit cant turn off time section
- From: Mitchell Laks <mlaks post harvard edu>
- To: gtk-perl-list gnome org
- Subject: Gnome2::DateEdit cant turn off time section
- Date: Sun, 27 Jan 2008 13:21:21 -0500
Hi,
The Gome2::DateEdit widget has two sections, date and time. For my application
the only relevant issue is the date. I don't want to display the time as it is not relevant
and will confuse the users.
I noticed that when I set up a gui with glade-3 and succeeded in turning off the time section
however when I invoked it with my gtk2-perl driver it stil displayed the time.
So, I said, maybe a bug in gtk2-perl, well let me shut downt the time section with an explicit
flag after display. Thus I tried:
***********************
#!/usr/bin/perl -w
use strict;
use Gtk2 '-init';
use Gtk2::GladeXML;
my $gui=Gtk2::GladeXML->new('mefilm2.glade');
my $window = $gui->get_widget('window1');
my $dateedit=$gui->get_widget('gnomedateedit1');
$dateedit->set_flags('show-time',0);
$gui->signal_autoconnect_from_package('main');
$window->show_all();
Gtk2->main;
sub on_window1_delete_event {
Gtk2->main_quit;
}
*********************
this did not work, it still displayed the time:
So I did an explicit construction from scratch:
#! /usr/bin/perl -w
use strict;
use Gtk2 '-init';
use Glib qw/TRUE FALSE/;
use Gnome2;
#standard window creation, placement, and signal connecting
my $window = Gtk2::Window->new('toplevel');
$window->signal_connect('delete_event' => sub { Gtk2->main_quit; });
$window->set_border_width(5);
$window->set_position('center_always');
my $dateedit =Gnome2::DateEdit->new(0,0,0);
my $scalar = $dateedit->get_flags;
print "my scalar is $scalar \n";
$window->add($dateedit);
$window->show_all();
Gtk2->main();
*************
notice I set the flag to 0.
This also displays the time.
It seems to ignore the flag about showing time!
Why?
How do I stop time :)?
Thanks for all your wonderful work and help !,
Mitchell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]