[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright doc/arshell.1 lib/button.c lib/menuba...
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright doc/arshell.1 lib/button.c lib/menuba... |
Date: |
Sun, 29 Aug 2004 18:57:40 -0400 |
CVSROOT: /cvsroot/antiright
Module name: antiright
Branch:
Changes by: Jeffrey Bedard <address@hidden> 04/08/29 22:52:58
Modified files:
doc : arshell.1
lib : button.c menubar.c
src/arshell : dialog.c textedit.c
Removed files:
src : antiright-mail.awk
Log message:
Minor fixes.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/doc/arshell.1.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/lib/button.c.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/lib/menubar.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/src/arshell/dialog.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/src/arshell/textedit.c.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: antiright/doc/arshell.1
diff -u antiright/doc/arshell.1:1.1 antiright/doc/arshell.1:1.2
--- antiright/doc/arshell.1:1.1 Thu Aug 19 21:51:10 2004
+++ antiright/doc/arshell.1 Sun Aug 29 22:52:58 2004
@@ -4,7 +4,7 @@
.SH SYNOPSIS
.B arshell
[[-A[[C][D[Ff][mp label]]][bi label icon]
-[l label][m[[fevh] label]][s][t label][w]]Ep
+[l label][m[[fevh] label]][s][t label][w]]E[f file]p
[r rows][U[[LPTW] command][f frequency]][W label]][command]
.SH DESCRIPTION
.I Arshell
@@ -85,6 +85,10 @@
.B \-E
Makes it so that a button press cause the arshell to exit after the action for
the button is performed.
+.B \-f
+This loads and parses the interface definition contained within
+.I file.
+This feature is only available if yetanotherclib is installed.
.B \-p
Creates a work area, if necessary, and accepts input from a pipe, placing it
in the work area.
Index: antiright/lib/button.c
diff -u antiright/lib/button.c:1.7 antiright/lib/button.c:1.8
--- antiright/lib/button.c:1.7 Mon Aug 23 01:15:56 2004
+++ antiright/lib/button.c Sun Aug 29 22:52:58 2004
@@ -38,6 +38,7 @@
Widget button_widget;
antiright_set(XmNpacking, XmPACK_TIGHT);
button_widget=XmCreatePushButton(parent_widget, name, ARARGS);
+ antiright_label_string(button_widget, name);
XtManageChild(button_widget);
XtAddCallback(button_widget, XmNactivateCallback, callback, client_data);
if((client_data != NULL) & antiright.arm_status)
Index: antiright/lib/menubar.c
diff -u antiright/lib/menubar.c:1.9 antiright/lib/menubar.c:1.10
--- antiright/lib/menubar.c:1.9 Mon Aug 23 01:15:56 2004
+++ antiright/lib/menubar.c Sun Aug 29 22:52:58 2004
@@ -179,6 +179,7 @@
submenu_widget=antiright_menu(help_widget, "Manual");
antiright_manual_button(submenu_widget, "ACE");
antiright_manual_button(submenu_widget, "arcd");
+ antiright_manual_button(submenu_widget, "arshell");
ARCLARG;
antiright_set(XmNmnemonic, 's');
antiright_manual_button(submenu_widget, "system.antiright");
Index: antiright/src/arshell/dialog.c
diff -u antiright/src/arshell/dialog.c:1.6 antiright/src/arshell/dialog.c:1.7
--- antiright/src/arshell/dialog.c:1.6 Wed Aug 25 23:50:18 2004
+++ antiright/src/arshell/dialog.c Sun Aug 29 22:52:58 2004
@@ -85,10 +85,9 @@
void
arshell_font_dialog()
{
-
- Widget font_selector;
#if XmVERSION > 1 & XmREVISION > 1
Widget form;
+ Widget font_selector;
ARCLARG;
form=antiright_form(arshell.gui.widgets.mainwindow);
arshell.gui.widgets.work=form;
@@ -109,6 +108,7 @@
ARCLARG;
#else
#if HAVE_XLT
+ Widget font_selector;
antiright_set_title("Font Selector");
ARCLARG;
font_selector=XltCreateFontChooser(arshell.gui.widgets.mainwindow,
Index: antiright/src/arshell/textedit.c
diff -u antiright/src/arshell/textedit.c:1.13
antiright/src/arshell/textedit.c:1.14
--- antiright/src/arshell/textedit.c:1.13 Mon Aug 23 01:15:56 2004
+++ antiright/src/arshell/textedit.c Sun Aug 29 22:52:58 2004
@@ -124,7 +124,7 @@
call_data=(XtPointer)NULL;
exit(0);
}
-int
+unsigned int
arshell_line(XmTextPosition end_position)
{
int lines=1;
@@ -140,6 +140,28 @@
return(lines);
}
void
+arshell_position(XmTextPosition current_position, unsigned int *total_lines
+ unsigned int *current_line, unsigned int *current_column)
+{
+ char *text=XmTextGetString(arshell.gui.widgets.work);
+ XmTextPosition position=0;
+ (*total_lines)=1;
+ while(position < end_position)
+ {
+ if(text[position]=='\n')
+ {
+ (*total_lines)++;
+ (*current_column)=0;
+ }
+ (*current_column)++;
+ if(position==current_position)
+ (*current_line)=(*total_lines);
+ position++;
+ }
+ XtFree(text);
+ return(lines);
+}
+void
arshell_goto_line(unsigned int line)
{
/* Declare a counter for the number of lines counted. */
@@ -179,8 +201,13 @@
arshell_status()
{
char *status;
- asprintf(&status, "Lines:%d Current:%d",
- arshell_text_lines(), arshell_current_line());
+ unsigned int lines_uint, current_uint;
+ float percent;
+ lines_uint=arshell_text_lines();
+ current_uint=arshell_current_line();
+ percent=current_uint/lines_uint;
+ asprintf(&status, "Lines:%d, Current:%d, Percent:%f",
+ lines_uint, current_uint, percent*100);
antiright_status(status);
free(status);
}
@@ -203,8 +230,13 @@
arshell_verified_status(XmTextVerifyCallbackStruct *call_pointer)
{
char *status;
- asprintf(&status, "Lines:%d Current:%d",
- arshell_text_lines(), arshell_line(call_pointer->newInsert));
+ XmTextPosition last=XmTextGetLastPosition(arshell.gui.widgets.work);
+ XmTextPosition current=call_pointer->newInsert;
+ unsigned int lines_uint=arshell_text_lines();
+ unsigned int current_uint=arshell_line(current);
+ float percent=(float)current/(float)last;
+ asprintf(&status, "Lines:%d, Current:%d, Percent:%f",
+ lines_uint, current_uint, percent*100);
antiright_status(status);
free(status);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright doc/arshell.1 lib/button.c lib/menuba...,
Jeffrey Bedard <=