summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlogdrake36
1 files changed, 28 insertions, 8 deletions
diff --git a/logdrake b/logdrake
index 10fe3e60..53c4c507 100755
--- a/logdrake
+++ b/logdrake
@@ -68,6 +68,14 @@ $window->set_title( _("logdrake") );
$window->set_policy(1, 1, 1);
$window->border_width (5);
+
+my $cal = gtkset_sensitive(new Gtk::Calendar(),0);
+my (undef,undef,undef,$mday) = localtime(time);
+$cal->select_day($mday);
+my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
+my $cal_mode=0;
+my $cal_butt = gtksignal_connect(new Gtk::CheckButton("Show only for this day"), clicked =>sub{$cal_mode =!$cal_mode; gtkset_sensitive($cal,$cal_mode);});
+
### menus definition
# the menus are not shown
# but they provides shiny shortcut like C-q
@@ -140,7 +148,7 @@ gtkadd($window,
0, gtkadd(new Gtk::Frame(_("Settings")),
gtkpack__(new Gtk::VBox(0,5),
gtkpack__(new Gtk::VBox(0,5),
- _("Show lines"),
+# _("Show lines"),
gtkpack__(new Gtk::HBox(0,5),
_("matching"),
$e_yes = new Gtk::Entry(),
@@ -149,12 +157,16 @@ gtkadd($window,
)
),
_("tips: you can use OR"),
- if_ (!$::isFile, gtkpack (new Gtk::VBox(0,5),
- map {
- ${"b_". $_} = new Gtk::CheckButton($files{$_}{desc})
- } keys %files,
- )
- ),
+ gtkpack_(new Gtk::HBox(0,0),
+ 1, if_ (!$::isFile, gtkpack (gtkset_border_width(new Gtk::VBox(0,0),0),
+ map { ${"b_". $_} = new Gtk::CheckButton($files{$_}{desc}) } keys %files,
+ )
+ ),
+ 0, gtkpack__(gtkset_border_width(new Gtk::VBox(0,0),10),
+ $cal_butt,
+ $cal
+ )
+ ),
gtksignal_connect(new Gtk::Button(_("search")), clicked => \&search)
)
),
@@ -212,7 +224,12 @@ sub parse_file {
my $ey= $e_yes->get_chars(0, -1);
my $en= $e_no->get_chars(0, -1);
$ey =~ s/ OR /\|/;
-
+
+ if ($cal_mode) {
+ my ($year, $month, $day) = $cal->get_date();
+ $ey= $months[$month]."\\s{1,2}$day\\s.*$ey\n";
+ }
+
foreach (@all) {
$i++;
if ($i % 10) {
@@ -340,6 +357,9 @@ sub destroy_window {
# log
# $Log$
+# Revision 1.16 2001/08/10 09:28:35 yduret
+# added calendar functionnality
+#
# Revision 1.15 2001/08/10 01:46:05 yduret
# corrected vnew usage (thc gc)
#