[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright ACE-desktop/ACE gtkshell/terminal.c x...
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright ACE-desktop/ACE gtkshell/terminal.c x... |
Date: |
Thu, 29 Nov 2007 20:56:18 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 07/11/29 20:56:18
Modified files:
ACE-desktop : ACE
gtkshell : terminal.c
xshell : button.c
Log message:
Begin working on code to improve child exit behavior for terminal.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/ACE?cvsroot=antiright&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/terminal.c?cvsroot=antiright&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/antiright/xshell/button.c?cvsroot=antiright&r1=1.13&r2=1.14
Patches:
Index: ACE-desktop/ACE
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/ACE,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- ACE-desktop/ACE 11 Nov 2007 23:07:15 -0000 1.53
+++ ACE-desktop/ACE 29 Nov 2007 20:56:17 -0000 1.54
@@ -475,8 +475,9 @@
Settings()
{
local CMD="exec $ARSHELL -or 10"
-
- CMD="$CMD 'ACE -A View_Settings & # See_All_Values,gtk-preferences'"
+ CMD="$CMD -ol -oi 'small toolbar'"
+ CMD="$CMD 'ACE -A View_Settings & # See_All_Values'"
+ # CMD="$CMD 'ACE -A View_Settings & # See_All_Values,gtk-preferences'"
# Ensure the existance of a configuration file.
ACE_Check_Configuration_File
for title in $(ACE_record_titles); do
Index: gtkshell/terminal.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/terminal.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- gtkshell/terminal.c 24 Nov 2007 10:53:41 -0000 1.29
+++ gtkshell/terminal.c 29 Nov 2007 20:56:17 -0000 1.30
@@ -74,6 +74,20 @@
}
static void
+handle_child_exited(
+#ifdef HAVE_VTE
+ VteReaper * vtereaper,
+#else /* ! HAVE_VTE */
+ gpointer * reaper,
+#endif /* HAVE_VTE */
+ gint arg1, gint arg2, gpointer user_data)
+{
+ struct GSH_Terminal * term = user_data;
+ gtk_widget_destroy(term->widget->parent);
+ gtk_widget_destroy(term->widget);
+}
+
+static void
gsh_terminal_run(struct GSH_Terminal * term, const gchar * command)
{
/* Set up line and column counts so that VI has correct display
@@ -94,13 +108,19 @@
const gchar *argv[] = { shell, "-c", command, NULL };
/* Start the command in the terminal. */
#ifdef HAVE_VTE
- vte_terminal_fork_command(VTE_TERMINAL(term->widget), shell,
- (char **)argv, (char **)envv, NULL, TRUE, TRUE, TRUE);
+ vte_reaper_add_child(
+ vte_terminal_fork_command(VTE_TERMINAL(term->widget),
+ shell, (char **)argv, (char **)envv,
+ NULL, TRUE, TRUE, TRUE));
#endif /* HAVE_VTE */
}
/* Free after use. */
g_free(height);
g_free(width);
+
+ /* Handle terminal exit. */
+ g_signal_connect(G_OBJECT(term->widget), "child-exited",
+ handle_child_exited, term);
}
static void
@@ -197,8 +217,10 @@
terminal=gtk_notebook_get_nth_page(notebook, tab_id);
gtk_notebook_remove_page(notebook, tab_id);
- //gtk_widget_destroy(terminal);
- //free(close_data);
+ /*
+ gtk_widget_destroy(terminal);
+ free(close_data);
+ */
}
static void
Index: xshell/button.c
===================================================================
RCS file: /sources/antiright/antiright/xshell/button.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- xshell/button.c 25 Nov 2007 00:01:00 -0000 1.13
+++ xshell/button.c 29 Nov 2007 20:56:17 -0000 1.14
@@ -26,40 +26,15 @@
draw_label(XShell * xsh, XWidget * button)
{
XSHButtonData * data = (XSHButtonData *)button->data;
- char * label=data->label;
+ const char * label=data->label;
XShellGUI * gui = &(xsh->gui);
Display * dpy = gui->display;
- GC gc = xsh->gui.gc;
- const unsigned int label_length = strlen(label);
- const unsigned int font_width = XSH_FONT_WIDTH(xsh);
- const unsigned int font_height = XSH_FONT_HEIGHT(xsh);
+ GC gc = gui->gc;
XSH_SET_COLOR(dpy, gc, 0, 0, 0);
- XDrawString(xsh->gui.display, button->window, xsh->gui.gc,
- font_width, font_height-XSH_WIDGET_PADDING,
- label, label_length);
-#if 0
- {
- XWindowAttributes * geometry = &(button->geometry);
-
- XMoveResizeWindow(xsh->gui.display, button->window,
- geometry->x, geometry->y,
- font_width*label_length,
font_height+XSH_WIDGET_PADDING*2);
- }
-
-{
- unsigned int width, height;
- GC gc = xsh->gui.gc;
- Pixmap pixmap;
- XReadBitmapFile(dpy, button->window,
- "bitmap.xbm", &width, &height,
- &pixmap, NULL, NULL);
- XSH_SET_COLOR(dpy, xsh->gui.gc, 255,255,255);
- XCopyPlane(dpy, pixmap, button->window,
- xsh->gui.gc, 0, 0, width, height, 0, 0, 1);
- XFreePixmap(dpy, pixmap);
-}
-#endif
+ XDrawString(dpy, button->window, gc, XSH_FONT_WIDTH(xsh),
+ XSH_FONT_HEIGHT(xsh)-XSH_WIDGET_PADDING,
+ label, strlen(label));
}
static void
@@ -74,12 +49,20 @@
draw_label((XShell *)(button->xsh), button);
}
-static void
-xshell_system(const char * command)
+static Bool
+special_command(const char * command)
{
if(!strcmp(command, "Exit___"))
exit(0);
else
+ return False;
+ return True;
+}
+
+static void
+xshell_system(const char * command)
+{
+ if(!special_command(command))
system(command);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright ACE-desktop/ACE gtkshell/terminal.c x...,
Jeffrey Bedard <=