[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright ACE-desktop/ACE gtkshell/containers.c...
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright ACE-desktop/ACE gtkshell/containers.c... |
Date: |
Fri, 23 Feb 2007 19:15:05 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 07/02/23 19:15:05
Modified files:
ACE-desktop : ACE
gtkshell : containers.c gtkshell.c gtkshell.h label.c
option_options.c text.c
Log message:
Added option to support frames around labels. Use option with
Console. Add frame if window is managed without scrolled window.
Allow specification of logfile for Console.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/ACE?cvsroot=antiright&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/containers.c?cvsroot=antiright&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/gtkshell.c?cvsroot=antiright&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/gtkshell.h?cvsroot=antiright&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/label.c?cvsroot=antiright&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/option_options.c?cvsroot=antiright&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/text.c?cvsroot=antiright&r1=1.10&r2=1.11
Patches:
Index: ACE-desktop/ACE
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/ACE,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- ACE-desktop/ACE 21 Feb 2007 22:35:01 -0000 1.8
+++ ACE-desktop/ACE 23 Feb 2007 19:15:05 -0000 1.9
@@ -96,7 +96,13 @@
}
Console()
{
- nice gtkshell -os -ou 5000 -aul 'tail -n 3 /var/log/messages'
+ if [ "$1" = "" ]; then
+ local LOGFILE=/var/log/messages
+ else
+ local LOGFILE=$1
+ fi
+
+ nice gtkshell -os -of -og +0-0 -ou 5000 -aul "tail -n 3 $LOGFILE"
}
swap_load()
{
@@ -150,7 +156,7 @@
trap "rm -f $TMP" 2
echo '#!/bin/sh' > $TMP
- echo "$ARSHELL -os -on $OPTIONS \\" >> $TMP
+ echo "$ARSHELL -os -of -on $OPTIONS \\" >> $TMP
echo " -og +$(ACE Deskbar_X)+$(ACE Deskbar_Y)\\" >> $TMP
if [ "$UPDATER" = "TRUE" ]; then
Index: gtkshell/containers.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/containers.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- gtkshell/containers.c 23 Feb 2007 03:11:52 -0000 1.5
+++ gtkshell/containers.c 23 Feb 2007 19:15:05 -0000 1.6
@@ -43,7 +43,7 @@
{
gsh->rows.h = gtk_hbox_new (FALSE, 2);
- if (!gsh->flags.dont_scroll)
+ ARIFNB(gsh->flags.dont_scroll)
{
gsh_setup_scrolled_window (gsh);
gtk_scrolled_window_add_with_viewport (
@@ -52,7 +52,13 @@
}
else
{
+ GtkWidget *frame;
+
+ frame=gtk_frame_new(NULL);
gtk_container_add (GTK_CONTAINER (gsh->window),
+
frame);
+ gtk_widget_show(frame);
+ gtk_container_add (GTK_CONTAINER (frame),
gsh->rows.h);
}
Index: gtkshell/gtkshell.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/gtkshell.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- gtkshell/gtkshell.c 23 Feb 2007 03:11:52 -0000 1.14
+++ gtkshell/gtkshell.c 23 Feb 2007 19:15:05 -0000 1.15
@@ -98,3 +98,16 @@
gsh_GSH (gsh);
gsh->window = gsh_create_main_window ();
}
+
+void
+gsh_widget_set_bg(GtkWidget * widget, int red, int green, int blue)
+{
+ GdkColor color;
+
+ color.red=red;
+ color.green=green;
+ color.blue=blue;
+
+ gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &color);
+}
+
Index: gtkshell/gtkshell.h
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/gtkshell.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- gtkshell/gtkshell.h 23 Feb 2007 03:11:52 -0000 1.15
+++ gtkshell/gtkshell.h 23 Feb 2007 19:15:05 -0000 1.16
@@ -36,6 +36,7 @@
gboolean updating;
gboolean horizontal_labels;
gboolean prompt_echoes;
+ gboolean framed_labels;
};
struct GSH_Rows
@@ -89,4 +90,8 @@
GtkWidget *
gsh_create_main_window ();
+void
+ gsh_widget_set_bg(GtkWidget *widget, int red, int green, int blue);
+
+
#endif
Index: gtkshell/label.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/label.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- gtkshell/label.c 22 Feb 2007 23:16:45 -0000 1.8
+++ gtkshell/label.c 23 Feb 2007 19:15:05 -0000 1.9
@@ -27,7 +27,6 @@
set_options(struct GSH * gsh, GtkWidget *label)
{
gtk_label_set_single_line_mode (GTK_LABEL (label), FALSE);
- gtk_label_set_max_width_chars (GTK_LABEL (label), 80);
if (gsh->flags.horizontal_labels == TRUE)
gtk_label_set_angle (GTK_LABEL (label), 270.0);
@@ -41,6 +40,8 @@
gsh_add_label (struct GSH * gsh, char *text)
{
GtkWidget *label;
+ GtkWidget *frame;
+ GtkWidget *to_be_managed;
ARPASSERT(gsh);
@@ -48,9 +49,22 @@
set_options(gsh, label);
+ if(gsh->flags.framed_labels)
+ {
+ frame=gtk_frame_new(NULL);
+ gtk_container_add(GTK_CONTAINER(frame), label);
+ gtk_widget_show(label);
+ to_be_managed=frame;
+ }
+ else
+ {
+ UNUSED(frame);
+ to_be_managed=label;
+ }
+
/* This uses expanded management, as the label may be displaying a large
text area. */
- gsh_manage (gsh, label);
+ gsh_manage (gsh, to_be_managed);
return label;
}
Index: gtkshell/option_options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/option_options.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- gtkshell/option_options.c 21 Feb 2007 16:15:49 -0000 1.8
+++ gtkshell/option_options.c 23 Feb 2007 19:15:05 -0000 1.9
@@ -34,6 +34,9 @@
case 'e':
gsh->flags.button_exits = TRUE;
break;
+ case 'f':
+ gsh->flags.framed_labels = TRUE;
+ break;
case 'g':
gsh_count (argc, counter);
Index: gtkshell/text.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/text.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gtkshell/text.c 23 Feb 2007 03:11:52 -0000 1.10
+++ gtkshell/text.c 23 Feb 2007 19:15:05 -0000 1.11
@@ -33,10 +33,14 @@
/* Set up callback data. */
cb = (struct GSH_CBData *) xmalloc (sizeof (struct GSH_CBData));
cb->gsh = gsh;
- ARIFP(command)
+ /*ARIFP(command)
asprintf ((char **) &cb->data, "%s", command);
else
- asprintf ((char **) &cb->data, "echo");
+ asprintf ((char **) &cb->data, "echo");*/
+ ARIFP(command)
+ cb->data=command; /* Static storage, will not pass out of
scope. */
+ else
+ cb->data="echo"; /* Literal */
/* Create widget. */
entry = gtk_entry_new ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright ACE-desktop/ACE gtkshell/containers.c...,
Jeffrey Bedard <=