slitaz-tools rev 189
desktopbox: add comd 'calendar' using glade XML file
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 12 14:47:37 2008 +0200 (2008-05-12) |
parents | dcc5d11de1b3 |
children | 92aedc898747 |
files | glade/calendar.glade tinyutils/desktopbox |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/glade/calendar.glade Mon May 12 14:47:37 2008 +0200 1.3 @@ -0,0 +1,74 @@ 1.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1.5 +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> 1.6 +<!--Generated with glade3 3.4.4 on Mon May 12 14:25:14 2008 --> 1.7 +<glade-interface> 1.8 + <widget class="GtkWindow" id="MAIN_WINDOW"> 1.9 + <property name="title" translatable="yes">Calendar</property> 1.10 + <property name="window_position">GTK_WIN_POS_MOUSE</property> 1.11 + <property name="decorated">False</property> 1.12 + <child> 1.13 + <widget class="GtkVBox" id="vbox1"> 1.14 + <property name="visible">True</property> 1.15 + <child> 1.16 + <widget class="GtkCalendar" id="calendar1"> 1.17 + <property name="visible">True</property> 1.18 + <property name="can_focus">True</property> 1.19 + <property name="year">2008</property> 1.20 + <property name="month">4</property> 1.21 + <property name="day">11</property> 1.22 + </widget> 1.23 + </child> 1.24 + <child> 1.25 + <widget class="GtkHBox" id="hbox1"> 1.26 + <property name="visible">True</property> 1.27 + <child> 1.28 + <widget class="GtkAspectFrame" id="aspectframe1"> 1.29 + <property name="width_request">180</property> 1.30 + <property name="visible">True</property> 1.31 + <property name="label_xalign">0</property> 1.32 + <property name="shadow_type">GTK_SHADOW_NONE</property> 1.33 + <property name="ratio">1</property> 1.34 + <child> 1.35 + <placeholder/> 1.36 + </child> 1.37 + </widget> 1.38 + </child> 1.39 + <child> 1.40 + <widget class="GtkToolbar" id="toolbar1"> 1.41 + <property name="visible">True</property> 1.42 + <property name="toolbar_style">GTK_TOOLBAR_ICONS</property> 1.43 + <property name="show_arrow">False</property> 1.44 + <child> 1.45 + <widget class="GtkToolButton" id="osmo"> 1.46 + <property name="visible">True</property> 1.47 + <property name="icon_name">osmo</property> 1.48 + <signal name="clicked" handler="osmo&"/> 1.49 + </widget> 1.50 + <packing> 1.51 + <property name="expand">False</property> 1.52 + </packing> 1.53 + </child> 1.54 + <child> 1.55 + <widget class="GtkToolButton" id="exit"> 1.56 + <property name="visible">True</property> 1.57 + <property name="stock_id">gtk-close</property> 1.58 + <signal name="clicked" handler="exit:Normal"/> 1.59 + </widget> 1.60 + <packing> 1.61 + <property name="expand">False</property> 1.62 + </packing> 1.63 + </child> 1.64 + </widget> 1.65 + <packing> 1.66 + <property name="position">1</property> 1.67 + </packing> 1.68 + </child> 1.69 + </widget> 1.70 + <packing> 1.71 + <property name="position">1</property> 1.72 + </packing> 1.73 + </child> 1.74 + </widget> 1.75 + </child> 1.76 + </widget> 1.77 +</glade-interface>
2.1 --- a/tinyutils/desktopbox Mon May 12 02:11:11 2008 +0200 2.2 +++ b/tinyutils/desktopbox Mon May 12 14:47:37 2008 +0200 2.3 @@ -1,5 +1,5 @@ 2.4 #! /bin/sh 2.5 -# 2.6 +# 2.7 # Multi-call script provinding GTK boxes to manage a desktop following 2.8 # Freedesktop standars. 2.9 # 2.10 @@ -7,6 +7,9 @@ 2.11 # 2.12 VERSION=20080512 2.13 2.14 +# Glade XML file path. 2.15 +GLADE_XML=/usr/share/slitaz-tools/glade 2.16 + 2.17 # Standards directories. 2.18 mkdir -p $HOME/Desktop $HOME/.local/share/applications 2.19 2.20 @@ -47,6 +50,7 @@ 2.21 new-folder Creat a new folder on the desktop with mkdir. 2.22 new-file Creat a new empty file or SHell script on the desktop. 2.23 add-icons Add a system icon on the desktop. 2.24 + calendar Display a calendard under mouse pointer. 2.25 logout Prompt for X session exit or system halt/reboot.\n" 2.26 } 2.27 2.28 @@ -64,7 +68,7 @@ 2.29 <b>$NEW_FOLDER_LABEL</b>\" 2.30 </label> 2.31 </text> 2.32 - 2.33 + 2.34 <hbox> 2.35 <entry> 2.36 <default>$FOLDER_ENTRY_MSG</default> 2.37 @@ -98,7 +102,7 @@ 2.38 <b>$NEW_FILE_LABEL</b>\" 2.39 </label> 2.40 </text> 2.41 - 2.42 + 2.43 <hbox> 2.44 <entry> 2.45 <default>$FILE_ENTRY_MSG</default> 2.46 @@ -175,6 +179,11 @@ 2.47 </vbox> 2.48 </window>' 2.49 export DESKTOP_DIALOG=${DESKTOP_DIALOG}${ACTIONS} ;; 2.50 + calendar) 2.51 + # Calendar using glade file. 2.52 + # 2.53 + gtkdialog --glade-xml=$GLADE_XML/calendar.glade \ 2.54 + --program=MAIN_WINDOW ;; 2.55 logout) 2.56 # X session/system logout. 2.57 #