[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright ACE-desktop/ACE ACE-desktop/dateload....
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright ACE-desktop/ACE ACE-desktop/dateload.... |
Date: |
Sun, 18 Feb 2007 22:43:25 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 07/02/18 22:43:25
Modified files:
ACE-desktop : ACE dateload.c system.antiright
gtkshell : button.c dialog_options.c geometry.c row.c
updated.c
libantiright : library.h
Log message:
Removed newline in dateload output. Changed geometry
specification in ACE Deskbar. Rewrote awk command to determine
screen dimensions. Modified ACE_Verification function to
not use scrolled window, to format prompt, and to only show yes
and no in the choices. Added color selection dialog to gtkshell.
Added ARBUG, ARWARN, and ARERR macros to libantiright. Split
out the check portion of gsh_check_and_set_geometry. Added a missing,
though unnecessary, break statement to the dialog option switch.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/ACE?cvsroot=antiright&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/dateload.c?cvsroot=antiright&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/system.antiright?cvsroot=antiright&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/button.c?cvsroot=antiright&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/dialog_options.c?cvsroot=antiright&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/geometry.c?cvsroot=antiright&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/row.c?cvsroot=antiright&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/updated.c?cvsroot=antiright&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/antiright/libantiright/library.h?cvsroot=antiright&r1=1.4&r2=1.5
Patches:
Index: ACE-desktop/ACE
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/ACE,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ACE-desktop/ACE 17 Feb 2007 23:10:27 -0000 1.2
+++ ACE-desktop/ACE 18 Feb 2007 22:43:25 -0000 1.3
@@ -1,6 +1,6 @@
#!/bin/sh
-# AntiRight (c) 2002-2006 Jeffrey Bedard address@hidden
+# AntiRight (c) 2002-2007 Jeffrey Bedard address@hidden
# This file is part of AntiRight.
@@ -20,9 +20,12 @@
DEBUG=0
if [ "$DEBUG" = "1" ]; then
+ set -vx
+ Debug()
+ {
COUNTER=$(($COUNTER+1))
echo $COUNTER
- set -vx
+ }
fi
ARSHELL=gtkshell
@@ -30,8 +33,8 @@
ACE_Verification()
{
- $ARSHELL -oe -al "$1"\
- 'echo -n 1 \# Yes,_do_that.' 'echo -n 0 \# No,_do_not_do_that.'
+ $ARSHELL -os -or 1 -oe -al "$(echo $1 __ | tr '_' ' ')"\
+ 'echo -n 1 \# Yes' 'echo -n 0 \# No'
}
ACE_Check_Configuration_File()
{
@@ -107,20 +110,22 @@
}
X_dimensions()
{
- xdpyinfo | grep dim | awk '{print $2}'
+ xdpyinfo\
+ | awk -v field=$1 '/dim/{dimensions=$2}\
+ END{split(dimensions, xy, "x"); print xy[field];}'
}
X_width()
{
- X_dimensions | cut -dx -f1
+ X_dimensions 1
}
X_height()
{
- X_dimensions | cut -dx -f2
+ X_dimensions 2
}
Deskbar()
{
if [ "$(ACE deskbar_style)" = "0" ]; then
- $ARSHELL -og +$(ACE Deskbar_X)+$(ACE Deskbar_Y)\
+ $ARSHELL -og $(ACE Deskbar_X)$(ACE Deskbar_Y)\
-or 1\
-aul "uptime | tr -d '\n'"\
'ACE Lock'\
@@ -132,6 +137,7 @@
-at env
else
local STYLE="$(ACE deskbar_style)"
+
if [ "$STYLE" = "2" ]; then
local OPTIONS="-or 16 -oh"
else
@@ -145,6 +151,7 @@
if [ "$TMPDIR" = "" ]; then
local TMPDIR=/tmp
fi
+
local TMP=$TMPDIR/ACE.panel.$$
trap "rm -f $TMP" 2
@@ -157,10 +164,13 @@
echo " $ACE_STRING\\" >> $TMP
fi
+ if [ "$STYLE" = "1" ]; then
echo " -at env\\" >> $TMP
+ fi
for item in $(ACE Panel_Items); do
- echo ' -aI '"'"ACE $item"'" $icon/$item.png "\\" >> $TMP
+ echo ' -aI '"'"ACE $item"'" $icon/$item.png "\\"\
+ >> $TMP
done
if [ "$UPDATER" = "TRUE" ]; then
@@ -170,7 +180,7 @@
fi
chmod +x $TMP
- cat $TMP
+ # cat $TMP
$TMP
rm -f $TMP
fi
Index: ACE-desktop/dateload.c
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/dateload.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ACE-desktop/dateload.c 17 Feb 2007 23:12:06 -0000 1.4
+++ ACE-desktop/dateload.c 18 Feb 2007 22:43:25 -0000 1.5
@@ -17,7 +17,7 @@
getloadavg(loadavg, 3);
- g_print(" %s %.2f, %.2f, %.2f\n",
+ g_print(" %s %.2f, %.2f, %.2f",
date, loadavg[0], loadavg[1], loadavg[2]);
return(0);
Index: ACE-desktop/system.antiright
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/system.antiright,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ACE-desktop/system.antiright 17 Feb 2007 23:12:06 -0000 1.2
+++ ACE-desktop/system.antiright 18 Feb 2007 22:43:25 -0000 1.3
@@ -61,7 +61,7 @@
Open_URL: ACE -L Open_URL xterm -e lynx
# Meta Information
-background: echo skyblue
+background: echo grey30
foreground: echo black
# Customizations
Terminal:exec mrxvt
@@ -77,8 +77,8 @@
Browser:exec firefox2
Sticky_Note: ACE -A Sticky_Note
Panel_Items: echo Lock_Display Screen Terminal File_Manager System_Monitor
Browser File_Sharing Text_Editor Word_Processor Image_Editor Calculator
Sticky_Note
-Deskbar_X:echo 4
-Deskbar_Y:echo 972
Browser:exec firefox
File_Sharing:exec nice -n 20 gtk-gnutella
-Deskbar_X:echo 0
+Deskbar_X:echo +0
+Deskbar_Y:echo +0
+
Index: gtkshell/button.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/button.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- gtkshell/button.c 17 Feb 2007 23:07:31 -0000 1.5
+++ gtkshell/button.c 18 Feb 2007 22:43:25 -0000 1.6
@@ -31,7 +31,7 @@
struct GSH_CBData *cb;
#ifdef DEBUG
- g_message("gsh_command_button");
+ ARBUG("gsh_command_button");
#endif /* DEBUG */
/* Allocate and initialize elements. */
@@ -49,7 +49,7 @@
gsh_manage(gsh, gsh->button);
#ifdef DEBUG
- g_message("==> row: %d out of %d rows\n",
+ g_debug("==> row: %d out of %d rows\n",
gsh->rows.row, gsh->rows.rows);
#endif /* DEBUG */
}
Index: gtkshell/dialog_options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/dialog_options.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- gtkshell/dialog_options.c 13 Feb 2007 03:23:28 -0000 1.3
+++ gtkshell/dialog_options.c 18 Feb 2007 22:43:25 -0000 1.4
@@ -57,9 +57,32 @@
g_print("%s\n", font);
g_free(font);
}
+
exit(0);
}
+void
+gsh_color_dialog()
+{
+ GtkWidget *dialog;
+
+ dialog=gtk_color_selection_dialog_new("Color Selector");
+
+ if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
+ {
+ GdkColor *color;
+
+ gtk_color_selection_get_current_color(
+ GTK_COLOR_SELECTION(
+ GTK_COLOR_SELECTION_DIALOG(dialog)
+ ->colorsel),
+ color);
+
+ g_print("#%x%x%x\n", color->red, color->green, color->blue);
+ }
+
+ exit(0);
+}
void
gsh_handle_dialog_arguments(struct GSH *gsh, int argc, char **argv,
@@ -68,6 +91,9 @@
assert(strlen(argv[(*counter)])>2);
switch(argv[(*counter)][2])
{
+ case 'c': /* Color Selection */
+ gsh_color_dialog();
+ break;
case 'D': /* Folder Creation Selector */
gsh_folder_create_dialog(gsh);
break;
@@ -80,6 +106,7 @@
break;
case 'F': /* Font Selection */
gsh_font_dialog();
+ break;
case 'f': /* File Selection */
gsh_file_open_dialog(gsh);
break;
Index: gtkshell/geometry.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/geometry.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- gtkshell/geometry.c 17 Feb 2007 23:07:31 -0000 1.5
+++ gtkshell/geometry.c 18 Feb 2007 22:43:25 -0000 1.6
@@ -26,23 +26,33 @@
void
gsh_set_geometry(struct GSH *gsh)
{
- assert(gsh->geometry);
+ if(gsh->geometry)
+ {
gtk_window_parse_geometry(GTK_WINDOW(gsh->window),
gsh->geometry);
+ free(gsh->geometry);
+ }
}
-void
-gsh_check_and_set_geometry(struct GSH *gsh)
+gboolean
+gsh_check_geometry(struct GSH *gsh)
{
+ gboolean geometry_status=FALSE;
+
if(!gsh->geometry && !gsh->flags.dont_scroll)
asprintf(&gsh->geometry, "400x300");
- if(!gsh->flags.dont_scroll)
- {
- gsh_set_geometry(gsh);
- free(gsh->geometry);
- }
+ if(gsh->geometry)
+ geometry_status=TRUE;
+
+ return geometry_status;
+}
+void
+gsh_check_and_set_geometry(struct GSH *gsh)
+{
+ if(gsh_check_geometry(gsh))
+ gsh_set_geometry(gsh);
}
Index: gtkshell/row.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/row.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- gtkshell/row.c 17 Feb 2007 23:07:31 -0000 1.5
+++ gtkshell/row.c 18 Feb 2007 22:43:25 -0000 1.6
@@ -26,7 +26,7 @@
gsh_manage(struct GSH *gsh, GtkWidget *widget)
{
#ifdef DEBUG
- g_message("gsh_manage()");
+ ARBUG("gsh_manage()");
#endif /* DEBUG */
gsh_check_row(gsh);
@@ -35,7 +35,7 @@
gsh->rows.row++;
#ifdef DEBUG
- g_message("==> gsh_row: %d, gsh_rows: %d",
+ g_debug("==> gsh_row: %d, gsh_rows: %d",
gsh->rows.row, gsh->rows.rows);
#endif /* DEBUG */
@@ -56,8 +56,8 @@
{
#ifdef DEBUG
- g_message("gsh_check_row()");
- g_message("==> gsh_row: %d, gsh_rows: %d",
+ ARBUG("gsh_check_row()");
+ g_debug("==> gsh_row: %d, gsh_rows: %d",
gsh->rows.row, gsh->rows.rows);
#endif
@@ -65,7 +65,7 @@
{
#ifdef DEBUG
- g_message("==> new row");
+ ARBUG("new row");
#endif
gsh_new_row(gsh);
Index: gtkshell/updated.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/updated.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- gtkshell/updated.c 17 Feb 2007 23:07:31 -0000 1.3
+++ gtkshell/updated.c 18 Feb 2007 22:43:25 -0000 1.4
@@ -28,7 +28,7 @@
{
#ifdef DEBUG
- g_message("gsh_append_updater()");
+ ARBUG("gsh_append_updater()");
#endif /* DEBUG */
gsh->update.list=g_slist_append(gsh->update.list, item);
@@ -92,7 +92,7 @@
struct GSH *gsh;
#ifdef DEBUG
- g_message("gsh_perform_updates()");
+ ARBUG("gsh_perform_updates()");
#endif /* DEBUG */
gsh=(struct GSH *)data;
@@ -100,7 +100,7 @@
UNUSED(data); /* DATA is unused. */
#ifdef DEBUG
- assert (gsh->update.list);
+ g_assert (gsh->update.list);
#endif /* DEBUG */
g_slist_foreach(gsh->update.list, gsh_update_each, gsh);
@@ -113,7 +113,7 @@
{
#ifdef DEBUG
- g_message("gsh_start_updates()");
+ ARBUG("gsh_start_updates()");
#endif /* DEBUG */
gsh_perform_updates(gsh);
Index: libantiright/library.h
===================================================================
RCS file: /sources/antiright/antiright/libantiright/library.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- libantiright/library.h 9 Feb 2007 16:40:14 -0000 1.4
+++ libantiright/library.h 18 Feb 2007 22:43:25 -0000 1.5
@@ -35,5 +35,10 @@
#include "system.h"
#include "util.h"
+#define ARBUGPARAM(message) "%s:%d: %s", __FILE__, __LINE__, message
+#define ARBUG(message) g_debug(ARBUGPARAM(message))
+#define ARWARN(message) g_warning(ARBUGPARAM(message))
+#define ARERR(message) g_error(ARBUGPARAM(message))
+
#endif /* LIBAR_LIBRARY_H */
- [Antiright-devel] antiright ACE-desktop/ACE ACE-desktop/dateload....,
Jeffrey Bedard <=