vte r2292 - in trunk: . src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: vte r2292 - in trunk: . src
- Date: Tue, 2 Dec 2008 12:26:13 +0000 (UTC)
Author: chpe
Date: Tue Dec 2 12:26:13 2008
New Revision: 2292
URL: http://svn.gnome.org/viewvc/vte?rev=2292&view=rev
Log:
* src/vte-private.h:
* src/vte.c: (mark_input_source_invalid),
(_vte_terminal_connect_pty_read), (mark_output_source_invalid),
(_vte_terminal_connect_pty_write),
(_vte_terminal_disconnect_pty_read),
(_vte_terminal_disconnect_pty_write),
(_vte_terminal_enable_input_source), (remove_cursor_timeout),
(vte_terminal_key_press), (vte_terminal_focus_in),
(vte_terminal_focus_out), (vte_terminal_init),
(vte_terminal_unrealize), (vte_terminal_expose),
(vte_terminal_background_update), (add_update_timeout),
(remove_from_active_list), (vte_terminal_add_process_timeout),
(process_timeout), (update_repeat_timeout), (update_timeout): Remove
VTE_INVALID_SOURCE definition and just use 0 directly.
Modified:
trunk/ChangeLog
trunk/src/vte-private.h
trunk/src/vte.c
Modified: trunk/src/vte-private.h
==============================================================================
--- trunk/src/vte-private.h (original)
+++ trunk/src/vte-private.h Tue Dec 2 12:26:13 2008
@@ -91,7 +91,6 @@
#define VTE_CELL_BBOX_SLACK 1
#define I_(string) (g_intern_static_string(string))
-#define VTE_INVALID_SOURCE (0) /* A number which can never be a valid source ID */
/* The structure we use to hold characters we're supposed to display -- this
* includes any supported visible attributes. */
Modified: trunk/src/vte.c
==============================================================================
--- trunk/src/vte.c (original)
+++ trunk/src/vte.c Tue Dec 2 12:26:13 2008
@@ -164,9 +164,9 @@
};
/* these static variables are guarded by the GDK mutex */
-static guint process_timeout_tag = VTE_INVALID_SOURCE;
+static guint process_timeout_tag = 0;
static gboolean in_process_timeout;
-static guint update_timeout_tag = VTE_INVALID_SOURCE;
+static guint update_timeout_tag = 0;
static gboolean in_update_timeout;
static GList *active_terminals;
static GTimer *process_timer;
@@ -3307,7 +3307,7 @@
static void mark_input_source_invalid(VteTerminal *terminal)
{
_vte_debug_print (VTE_DEBUG_IO, "removed poll of vte_terminal_io_read\n");
- terminal->pvt->pty_input_source = VTE_INVALID_SOURCE;
+ terminal->pvt->pty_input_source = 0;
}
static void
_vte_terminal_connect_pty_read(VteTerminal *terminal)
@@ -3316,7 +3316,7 @@
return;
}
- if (terminal->pvt->pty_input_source == VTE_INVALID_SOURCE) {
+ if (terminal->pvt->pty_input_source == 0) {
_vte_debug_print (VTE_DEBUG_IO, "polling vte_terminal_io_read\n");
terminal->pvt->pty_input_source =
g_io_add_watch_full(terminal->pvt->pty_channel,
@@ -3331,7 +3331,7 @@
static void mark_output_source_invalid(VteTerminal *terminal)
{
_vte_debug_print (VTE_DEBUG_IO, "removed poll of vte_terminal_io_write\n");
- terminal->pvt->pty_output_source = VTE_INVALID_SOURCE;
+ terminal->pvt->pty_output_source = 0;
}
static void
_vte_terminal_connect_pty_write(VteTerminal *terminal)
@@ -3341,7 +3341,7 @@
g_io_channel_unix_new(terminal->pvt->pty_master);
}
- if (terminal->pvt->pty_output_source == VTE_INVALID_SOURCE) {
+ if (terminal->pvt->pty_output_source == 0) {
if (vte_terminal_io_write (terminal->pvt->pty_channel,
G_IO_OUT,
terminal))
@@ -3361,21 +3361,21 @@
static void
_vte_terminal_disconnect_pty_read(VteTerminal *terminal)
{
- if (terminal->pvt->pty_input_source != VTE_INVALID_SOURCE) {
+ if (terminal->pvt->pty_input_source != 0) {
_vte_debug_print (VTE_DEBUG_IO, "disconnecting poll of vte_terminal_io_read\n");
g_source_remove(terminal->pvt->pty_input_source);
- terminal->pvt->pty_input_source = VTE_INVALID_SOURCE;
+ terminal->pvt->pty_input_source = 0;
}
}
static void
_vte_terminal_disconnect_pty_write(VteTerminal *terminal)
{
- if (terminal->pvt->pty_output_source != VTE_INVALID_SOURCE) {
+ if (terminal->pvt->pty_output_source != 0) {
_vte_debug_print (VTE_DEBUG_IO, "disconnecting poll of vte_terminal_io_write\n");
g_source_remove(terminal->pvt->pty_output_source);
- terminal->pvt->pty_output_source = VTE_INVALID_SOURCE;
+ terminal->pvt->pty_output_source = 0;
}
}
@@ -4101,7 +4101,7 @@
return;
}
- if (terminal->pvt->pty_input_source == VTE_INVALID_SOURCE) {
+ if (terminal->pvt->pty_input_source == 0) {
_vte_debug_print (VTE_DEBUG_IO, "polling vte_terminal_io_read\n");
terminal->pvt->pty_input_source =
g_io_add_watch_full(terminal->pvt->pty_channel,
@@ -4656,7 +4656,7 @@
remove_cursor_timeout (VteTerminal *terminal)
{
g_source_remove (terminal->pvt->cursor_blink_tag);
- terminal->pvt->cursor_blink_tag = VTE_INVALID_SOURCE;
+ terminal->pvt->cursor_blink_tag = 0;
}
@@ -4779,7 +4779,7 @@
}
}
- if (terminal->pvt->cursor_blink_tag != VTE_INVALID_SOURCE)
+ if (terminal->pvt->cursor_blink_tag != 0)
{
remove_cursor_timeout (terminal);
terminal->pvt->cursor_blink_state = TRUE;
@@ -7144,7 +7144,7 @@
terminal->pvt->cursor_blink_state = TRUE;
if (terminal->pvt->cursor_blinks &&
- terminal->pvt->cursor_blink_tag == VTE_INVALID_SOURCE)
+ terminal->pvt->cursor_blink_tag == 0)
add_cursor_timeout (terminal);
gtk_im_context_focus_in(terminal->pvt->im_context);
@@ -7181,7 +7181,7 @@
terminal->pvt->mouse_cursor_visible = FALSE;
}
- if (terminal->pvt->cursor_blink_tag != VTE_INVALID_SOURCE)
+ if (terminal->pvt->cursor_blink_tag != 0)
remove_cursor_timeout (terminal);
return FALSE;
@@ -7931,7 +7931,7 @@
pvt->incoming = NULL;
pvt->pending = g_array_new(FALSE, FALSE, sizeof(gunichar));
pvt->max_input_bytes = VTE_MAX_INPUT_READ;
- pvt->cursor_blink_tag = VTE_INVALID_SOURCE;
+ pvt->cursor_blink_tag = 0;
pvt->outgoing = _vte_buffer_new();
pvt->outgoing_conv = VTE_INVALID_CONV;
pvt->conv_buffer = _vte_buffer_new();
@@ -7953,8 +7953,8 @@
pvt->default_column_count,
pvt->default_row_count);
g_assert (pvt->pty_master == -1);
- pvt->pty_input_source = VTE_INVALID_SOURCE;
- pvt->pty_output_source = VTE_INVALID_SOURCE;
+ pvt->pty_input_source = 0;
+ pvt->pty_output_source = 0;
pvt->pty_pid = -1;
pvt->child_exit_status = 0;
@@ -8022,7 +8022,7 @@
pvt->block_mode = FALSE;
pvt->had_block_mode = FALSE;
pvt->has_fonts = FALSE;
- pvt->root_pixmap_changed_tag = VTE_INVALID_SOURCE;
+ pvt->root_pixmap_changed_tag = 0;
/* Not all backends generate GdkVisibilityNotify, so mark the
* window as unobscured initially. */
@@ -8189,12 +8189,12 @@
terminal = VTE_TERMINAL(widget);
/* Disconnect from background-change events. */
- if (terminal->pvt->root_pixmap_changed_tag != VTE_INVALID_SOURCE) {
+ if (terminal->pvt->root_pixmap_changed_tag != 0) {
VteBg *bg;
bg = vte_bg_get_for_screen(gtk_widget_get_screen(widget));
g_signal_handler_disconnect (bg,
terminal->pvt->root_pixmap_changed_tag);
- terminal->pvt->root_pixmap_changed_tag = VTE_INVALID_SOURCE;
+ terminal->pvt->root_pixmap_changed_tag = 0;
}
/* Deallocate the cursors. */
@@ -8253,9 +8253,9 @@
}
/* Remove the blink timeout function. */
- if (terminal->pvt->cursor_blink_tag != VTE_INVALID_SOURCE) {
+ if (terminal->pvt->cursor_blink_tag != 0) {
g_source_remove(terminal->pvt->cursor_blink_tag);
- terminal->pvt->cursor_blink_tag = VTE_INVALID_SOURCE;
+ terminal->pvt->cursor_blink_tag = 0;
}
terminal->pvt->cursor_blink_state = FALSE;
@@ -10798,7 +10798,7 @@
event->area.x, event->area.y,
event->area.width, event->area.height);
if (terminal->pvt->active != NULL &&
- update_timeout_tag != VTE_INVALID_SOURCE &&
+ update_timeout_tag != 0 &&
!in_update_timeout) {
/* fix up a race condition where we schedule a delayed update
* after an 'immediate' invalidate all */
@@ -12344,7 +12344,7 @@
saturation = (double) terminal->pvt->bg_saturation;
saturation /= VTE_SATURATION_MAX;
if (terminal->pvt->bg_transparent) {
- if (terminal->pvt->root_pixmap_changed_tag == VTE_INVALID_SOURCE) {
+ if (terminal->pvt->root_pixmap_changed_tag == 0) {
VteBg *bg;
/* Connect to background-change events. */
@@ -13618,7 +13618,7 @@
static void
add_update_timeout (VteTerminal *terminal)
{
- if (update_timeout_tag == VTE_INVALID_SOURCE) {
+ if (update_timeout_tag == 0) {
_vte_debug_print (VTE_DEBUG_TIMEOUT,
"Starting update timeout\n");
update_timeout_tag =
@@ -13628,11 +13628,11 @@
NULL);
}
if (in_process_timeout == FALSE &&
- process_timeout_tag != VTE_INVALID_SOURCE) {
+ process_timeout_tag != 0) {
_vte_debug_print (VTE_DEBUG_TIMEOUT,
"Removing process timeout\n");
g_source_remove (process_timeout_tag);
- process_timeout_tag = VTE_INVALID_SOURCE;
+ process_timeout_tag = 0;
}
if (terminal->pvt->active == NULL) {
_vte_debug_print (VTE_DEBUG_TIMEOUT,
@@ -13670,18 +13670,18 @@
if (active_terminals == NULL) {
if (in_process_timeout == FALSE &&
- process_timeout_tag != VTE_INVALID_SOURCE) {
+ process_timeout_tag != 0) {
_vte_debug_print(VTE_DEBUG_TIMEOUT,
"Removing process timeout\n");
g_source_remove (process_timeout_tag);
- process_timeout_tag = VTE_INVALID_SOURCE;
+ process_timeout_tag = 0;
}
if (in_update_timeout == FALSE &&
- update_timeout_tag != VTE_INVALID_SOURCE) {
+ update_timeout_tag != 0) {
_vte_debug_print(VTE_DEBUG_TIMEOUT,
"Removing update timeout\n");
g_source_remove (update_timeout_tag);
- update_timeout_tag = VTE_INVALID_SOURCE;
+ update_timeout_tag = 0;
}
}
}
@@ -13700,8 +13700,8 @@
"Adding terminal to active list\n");
terminal->pvt->active = active_terminals =
g_list_prepend (active_terminals, terminal);
- if (update_timeout_tag == VTE_INVALID_SOURCE &&
- process_timeout_tag == VTE_INVALID_SOURCE) {
+ if (update_timeout_tag == 0 &&
+ process_timeout_tag == 0) {
_vte_debug_print(VTE_DEBUG_TIMEOUT,
"Starting process timeout\n");
process_timeout_tag =
@@ -13840,7 +13840,7 @@
}
if (terminal->pvt->pty_channel != NULL) {
if (terminal->pvt->pty_input_active ||
- terminal->pvt->pty_input_source == VTE_INVALID_SOURCE) {
+ terminal->pvt->pty_input_source == 0) {
terminal->pvt->pty_input_active = FALSE;
vte_terminal_io_read (terminal->pvt->pty_channel,
G_IO_IN, terminal);
@@ -13871,12 +13871,12 @@
_vte_debug_print (VTE_DEBUG_WORK, ">");
- if (active_terminals && update_timeout_tag == VTE_INVALID_SOURCE) {
+ if (active_terminals && update_timeout_tag == 0) {
again = TRUE;
} else {
_vte_debug_print(VTE_DEBUG_TIMEOUT,
"Stoping process timeout\n");
- process_timeout_tag = VTE_INVALID_SOURCE;
+ process_timeout_tag = 0;
again = FALSE;
}
@@ -13889,7 +13889,7 @@
* at full tilt and making us run to keep up...
*/
g_usleep (0);
- } else if (update_timeout_tag == VTE_INVALID_SOURCE) {
+ } else if (update_timeout_tag == 0) {
/* otherwise free up memory used to capture incoming data */
prune_chunks (10);
}
@@ -13964,7 +13964,7 @@
}
if (terminal->pvt->pty_channel != NULL) {
if (terminal->pvt->pty_input_active ||
- terminal->pvt->pty_input_source == VTE_INVALID_SOURCE) {
+ terminal->pvt->pty_input_source == 0) {
terminal->pvt->pty_input_active = FALSE;
vte_terminal_io_read (terminal->pvt->pty_channel,
G_IO_IN, terminal);
@@ -14015,7 +14015,7 @@
if (active_terminals == NULL) {
_vte_debug_print(VTE_DEBUG_TIMEOUT,
"Stoping update timeout\n");
- update_timeout_tag = VTE_INVALID_SOURCE;
+ update_timeout_tag = 0;
again = FALSE;
}
@@ -14051,11 +14051,11 @@
"Update timeout: %d active\n",
g_list_length (active_terminals));
- if (process_timeout_tag != VTE_INVALID_SOURCE) {
+ if (process_timeout_tag != 0) {
_vte_debug_print(VTE_DEBUG_TIMEOUT,
"Removing process timeout\n");
g_source_remove (process_timeout_tag);
- process_timeout_tag = VTE_INVALID_SOURCE;
+ process_timeout_tag = 0;
}
for (l = active_terminals; l != NULL; l = next) {
@@ -14068,7 +14068,7 @@
}
if (terminal->pvt->pty_channel != NULL) {
if (terminal->pvt->pty_input_active ||
- terminal->pvt->pty_input_source == VTE_INVALID_SOURCE) {
+ terminal->pvt->pty_input_source == 0) {
terminal->pvt->pty_input_active = FALSE;
vte_terminal_io_read (terminal->pvt->pty_channel,
G_IO_IN, terminal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]