[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright/gtkshell terminal.c terminal_struct.h
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright/gtkshell terminal.c terminal_struct.h |
Date: |
Wed, 09 Jan 2008 21:24:45 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 08/01/09 21:24:45
Modified files:
gtkshell : terminal.c terminal_struct.h
Log message:
Fix multiple terminal widget support.
Make sure no tab code is built when tab support is not enabled.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/terminal.c?cvsroot=antiright&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/terminal_struct.h?cvsroot=antiright&r1=1.12&r2=1.13
Patches:
Index: terminal.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/terminal.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- terminal.c 7 Dec 2007 20:00:25 -0000 1.33
+++ terminal.c 9 Jan 2008 21:24:44 -0000 1.34
@@ -274,6 +274,7 @@
}
#endif /* USE_TABS */
+#ifdef USE_TABS
static void
new_terminal_tab(struct GSH_Terminal * term, const gchar * command)
{
@@ -285,34 +286,40 @@
tab_id=term->__notebook_page
=gtk_notebook_append_page(GTK_NOTEBOOK(term->__notebook),
term->widget, hbox);
-#ifdef USE_TABS
- GSHCONNECT(term->__notebook, "change-current-page", change_page_cb,
term);
+ GSHCONNECT(term->__notebook, "change-current-page",
+ change_page_cb, term);
make_tab_label(term, command, hbox, tab_id);
-#else /* !USE_TABS */
- gtk_notebook_set_show_tabs(GTK_NOTEBOOK(term->__notebook), FALSE);
- command=NULL;
-#endif /* USE_TABLS */
}
+#endif /* USE_TABS */
static GtkWidget *
gsh_GSH_Terminal_add(struct GSH_Terminal * term, const gchar * command)
{
+#ifdef USE_TABS
gboolean original_tab=TRUE;
+#endif /* USE_TABS */
/* Create and set properties of the VTE-based terminal. */
#ifdef HAVE_VTE
+#ifdef USE_TABS
if(!term->__notebook)
gtk_widget_show(term->__notebook=gtk_notebook_new());
else
original_tab=FALSE;
new_terminal_tab(term, command);
+#else /* ! USE_TABS */
+ gtk_widget_show(term->widget=vte_terminal_new());
+#endif /* USE_TABS */
#else /* not HAVE_VTE */
term->widget = NULL;
#endif /* HAVE_VTE */
setup_terminal_signals(term);
set_terminal_options(term);
gsh_terminal_run(term, command);
-
+#ifdef USE_TABS
return original_tab ? term->__notebook : NULL;
+#else
+ return term->widget;
+#endif /* USE_TABS */
}
static void
@@ -329,7 +336,9 @@
term->font=NULL;
term->dimensions.width=80;
term->dimensions.height=24;
+#ifdef USE_TABS
term->__notebook=NULL;
+#endif /* USE_TABS */
}
static void
Index: terminal_struct.h
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/terminal_struct.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- terminal_struct.h 3 Dec 2007 19:40:21 -0000 1.12
+++ terminal_struct.h 9 Jan 2008 21:24:45 -0000 1.13
@@ -32,9 +32,11 @@
void (*delete)(struct GSH_Terminal *);
GtkWidget * (*add)(struct GSH_Terminal *, const gchar *);
gpointer gsh;
+#ifdef USE_TABS
GtkWidget * __notebook;
gchar * __tab_command;
gint __notebook_page;
+#endif /* USE_TABS */
};
struct GSH_Terminal *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright/gtkshell terminal.c terminal_struct.h,
Jeffrey Bedard <=