[Xfce4-commits] r30098 - terminal/trunk/terminal
Nick Schermer
nick at xfce.org
Sat Jun 27 21:31:35 CEST 2009
Author: nick
Date: 2009-06-27 19:31:35 +0000 (Sat, 27 Jun 2009)
New Revision: 30098
Modified:
terminal/trunk/terminal/main.c
terminal/trunk/terminal/terminal-app.c
terminal/trunk/terminal/terminal-dbus.c
terminal/trunk/terminal/terminal-image-loader.c
terminal/trunk/terminal/terminal-monitor.c
terminal/trunk/terminal/terminal-options.c
terminal/trunk/terminal/terminal-preferences-dialog.c
terminal/trunk/terminal/terminal-screen.c
terminal/trunk/terminal/terminal-shortcut-editor.c
terminal/trunk/terminal/terminal-tab-header.c
terminal/trunk/terminal/terminal-toolbars-model.c
terminal/trunk/terminal/terminal-widget.c
terminal/trunk/terminal/terminal-window.c
Log:
Cleanup code (trailing spaces, tabs).
Modified: terminal/trunk/terminal/main.c
===================================================================
--- terminal/trunk/terminal/main.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/main.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -260,7 +260,7 @@
}
}
#endif /* !HAVE_DBUS */
-
+
if (!terminal_app_process (app, nargv, nargc, &error))
{
g_printerr (_("Unable to launch terminal: %s\n"), error->message);
Modified: terminal/trunk/terminal/terminal-app.c
===================================================================
--- terminal/trunk/terminal/terminal-app.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-app.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -106,7 +106,7 @@
terminal_app_class_init (TerminalAppClass *klass)
{
GObjectClass *gobject_class;
-
+
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = terminal_app_finalize;
}
@@ -171,7 +171,7 @@
const gchar *accel;
gboolean shortcuts_no_menukey;
- g_object_get (G_OBJECT (app->preferences),
+ g_object_get (G_OBJECT (app->preferences),
"shortcuts-no-menukey", &shortcuts_no_menukey,
NULL);
@@ -261,7 +261,7 @@
{
GtkWidget *window;
GdkScreen *screen;
-
+
_terminal_return_if_fail (TERMINAL_IS_WINDOW (existing));
_terminal_return_if_fail (TERMINAL_IS_SCREEN (terminal));
_terminal_return_if_fail (TERMINAL_IS_APP (app));
Modified: terminal/trunk/terminal/terminal-dbus.c
===================================================================
--- terminal/trunk/terminal/terminal-dbus.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-dbus.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -84,7 +84,7 @@
* or something like that.
*/
- if (dbus_message_is_method_call (message,
+ if (dbus_message_is_method_call (message,
TERMINAL_DBUS_INTERFACE,
TERMINAL_DBUS_METHOD_LAUNCH))
{
@@ -248,7 +248,7 @@
dbus_error_free (&derror);
return FALSE;
}
-
+
/* generate the message */
message = dbus_message_new_method_call (TERMINAL_DBUS_SERVICE,
TERMINAL_DBUS_PATH,
Modified: terminal/trunk/terminal/terminal-image-loader.c
===================================================================
--- terminal/trunk/terminal/terminal-image-loader.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-image-loader.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -257,7 +257,7 @@
x0 = MIN ((width - source_width) / 2, dx);
y0 = MIN ((height - source_height) / 2, dy);
- gdk_pixbuf_composite (loader->pixbuf, target, dx, dy,
+ gdk_pixbuf_composite (loader->pixbuf, target, dx, dy,
MIN (width, source_width),
MIN (height, source_height),
x0, y0, 1.0, 1.0,
@@ -373,22 +373,22 @@
{
red[i] = CLAMP ((loader->darkness * (loader->bgcolor.red >> 8))
+ ((1.0 - loader->darkness) * i), 0, 255);
- green[i] = CLAMP ((loader->darkness * (loader->bgcolor.green >> 8))
+ green[i] = CLAMP ((loader->darkness * (loader->bgcolor.green >> 8))
+ ((1.0 - loader->darkness) * i), 0, 255);
- blue[i] = CLAMP ((loader->darkness * (loader->bgcolor.blue >> 8))
+ blue[i] = CLAMP ((loader->darkness * (loader->bgcolor.blue >> 8))
+ ((1.0 - loader->darkness) * i), 0, 255);
- }
+ }
}
stride = gdk_pixbuf_get_rowstride (pixbuf);
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
- channels = gdk_pixbuf_get_n_channels (pixbuf);
+ width = gdk_pixbuf_get_width (pixbuf);
+ height = gdk_pixbuf_get_height (pixbuf);
+ channels = gdk_pixbuf_get_n_channels (pixbuf);
- for (y = 0; y < height; ++y)
+ for (y = 0; y < height; ++y)
{
- pixels = gdk_pixbuf_get_pixels (pixbuf) + y * stride;
-
+ pixels = gdk_pixbuf_get_pixels (pixbuf) + y * stride;
+
for (x = 0; x < width * channels; ++x)
{
switch (x % channels)
Modified: terminal/trunk/terminal/terminal-monitor.c
===================================================================
--- terminal/trunk/terminal/terminal-monitor.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-monitor.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -103,7 +103,7 @@
static gboolean
-entity_info_equals (const EntityInfo *a,
+entity_info_equals (const EntityInfo *a,
const EntityInfo *b)
{
return ((a->exists && b->exists) || (!a->exists && !b->exists))
Modified: terminal/trunk/terminal/terminal-options.c
===================================================================
--- terminal/trunk/terminal/terminal-options.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-options.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -64,7 +64,7 @@
gint i;
gint j;
gint n;
-
+
if (attrs_return != NULL)
{
win_attr = terminal_window_attr_new ();
@@ -188,7 +188,7 @@
"the working directory as its parameter"));
goto failed;
}
- else
+ else
{
s = argv[++n];
}
@@ -349,7 +349,7 @@
{
if (win_attr != NULL)
{
- win_attr->menubar = (argv[n][2] == 's')
+ win_attr->menubar = (argv[n][2] == 's')
? TERMINAL_VISIBILITY_SHOW
: TERMINAL_VISIBILITY_HIDE;
}
@@ -481,7 +481,7 @@
}
g_free (default_directory);
g_free (default_display);
-
+
return TRUE;
failed:
Modified: terminal/trunk/terminal/terminal-preferences-dialog.c
===================================================================
--- terminal/trunk/terminal/terminal-preferences-dialog.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-preferences-dialog.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -171,7 +171,7 @@
gtk_box_pack_start (GTK_BOX (hbox), dialog->notebook, TRUE, TRUE, 0);
gtk_widget_show (dialog->notebook);
-
+
/*
General
*/
@@ -187,7 +187,7 @@
label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Title</b>"), "use-markup", TRUE, NULL);
gtk_frame_set_label_widget (GTK_FRAME (frame), label);
gtk_widget_show (label);
-
+
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 12);
@@ -226,7 +226,7 @@
hbox = gtk_hbox_new (FALSE, 0);
gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (hbox);
-
+
combo = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Replaces initial title"));
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Goes before initial title"));
@@ -524,7 +524,7 @@
label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Opening New Windows</b>"), "use-markup", TRUE, NULL);
gtk_frame_set_label_widget (GTK_FRAME (frame), label);
gtk_widget_show (label);
-
+
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (frame), vbox);
@@ -961,7 +961,7 @@
entry = gtk_entry_new ();
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
exo_mutual_binding_new (G_OBJECT (dialog->preferences), "term", G_OBJECT (entry), "text");
- gtk_widget_set_tooltip_text (entry,
+ gtk_widget_set_tooltip_text (entry,
_("This specifies the value the $TERM environment variable is set "
"to, when a new terminal tab or terminal window is opened. The default "
"should be ok for most systems. If you have problems with colors in "
@@ -1177,7 +1177,7 @@
if (G_LIKELY (spec != NULL))
{
g_value_init (&value, spec->value_type);
- g_param_value_set_default (spec, &value);
+ g_param_value_set_default (spec, &value);
g_object_set_property (G_OBJECT (dialog->preferences), "binding-backspace", &value);
g_value_unset (&value);
}
@@ -1187,7 +1187,7 @@
if (G_LIKELY (spec != NULL))
{
g_value_init (&value, spec->value_type);
- g_param_value_set_default (spec, &value);
+ g_param_value_set_default (spec, &value);
g_object_set_property (G_OBJECT (dialog->preferences), "binding-delete", &value);
g_value_unset (&value);
}
@@ -1197,7 +1197,7 @@
if (G_LIKELY (spec != NULL))
{
g_value_init (&value, spec->value_type);
- g_param_value_set_default (spec, &value);
+ g_param_value_set_default (spec, &value);
g_object_set_property (G_OBJECT (dialog->preferences), "term", &value);
g_value_unset (&value);
}
@@ -1215,7 +1215,7 @@
terminal_preferences_dialog_new (GtkWindow *parent)
{
GtkWidget *dialog;
-
+
dialog = g_object_new (TERMINAL_TYPE_PREFERENCES_DIALOG, NULL);
if (parent != NULL)
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
Modified: terminal/trunk/terminal/terminal-screen.c
===================================================================
--- terminal/trunk/terminal/terminal-screen.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-screen.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -142,7 +142,7 @@
guint background_timer_id;
guint launch_idle_id;
-
+
gboolean activity;
guint reset_activity_cb;
};
@@ -476,7 +476,7 @@
shell_fullpath = pw->pw_shell;
if (shell_fullpath != NULL)
- shell_name = strrchr (shell_fullpath, '/');
+ shell_name = strrchr (shell_fullpath, '/');
if (shell_name != NULL)
++shell_name;
@@ -722,7 +722,7 @@
{
gboolean bval;
g_object_get (G_OBJECT (screen->preferences), "misc-cursor-blinks", &bval, NULL);
- vte_terminal_set_cursor_blink_mode (VTE_TERMINAL (screen->terminal),
+ vte_terminal_set_cursor_blink_mode (VTE_TERMINAL (screen->terminal),
bval ? VTE_CURSOR_BLINK_ON : VTE_CURSOR_BLINK_OFF);
}
@@ -877,6 +877,8 @@
g_object_notify (G_OBJECT (screen), "title");
}
+
+
static gboolean terminal_screen_reset_activity(TerminalScreen *screen)
{
screen->activity = FALSE;
@@ -885,6 +887,8 @@
return FALSE;
}
+
+
static void
terminal_screen_vte_window_contents_changed (VteTerminal *terminal,
TerminalScreen *screen)
@@ -911,6 +915,8 @@
(GSourceFunc)terminal_screen_reset_activity, screen);
}
+
+
static gboolean
terminal_screen_timer_background (gpointer user_data)
{
@@ -1026,7 +1032,7 @@
terminal_dialogs_show_error (GTK_WIDGET (screen), error, _("Failed to execute child"));
g_error_free (error);
}
- else
+ else
{
g_object_get (G_OBJECT (screen->preferences),
"command-update-records", &update,
Modified: terminal/trunk/terminal/terminal-shortcut-editor.c
===================================================================
--- terminal/trunk/terminal/terminal-shortcut-editor.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-shortcut-editor.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -470,7 +470,7 @@
model = gtk_tree_view_get_model (GTK_TREE_VIEW (editor));
if (gtk_tree_model_get_iter_first (model, &parent))
{
- do
+ do
{
if (gtk_tree_model_iter_children (model, &child, &parent))
{
@@ -488,7 +488,7 @@
}
while (gtk_tree_model_iter_next (model, &parent));
}
-
+
g_free (accel);
}
Modified: terminal/trunk/terminal/terminal-tab-header.c
===================================================================
--- terminal/trunk/terminal/terminal-tab-header.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-tab-header.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -271,7 +271,7 @@
const gchar *title;
gboolean act = FALSE;
GdkColor act_color;
-
+
switch (prop_id)
{
case PROP_TAB_POS:
@@ -390,7 +390,7 @@
/**
* terminal_tab_header_new:
- *
+ *
* Allocates a new #TerminalTabHeader object.
*
* Return value : Pointer to the allocated #TerminalTabHeader object.
Modified: terminal/trunk/terminal/terminal-toolbars-model.c
===================================================================
--- terminal/trunk/terminal/terminal-toolbars-model.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-toolbars-model.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -182,7 +182,7 @@
{
g_object_ref (G_OBJECT (model));
}
-
+
return model;
}
Modified: terminal/trunk/terminal/terminal-widget.c
===================================================================
--- terminal/trunk/terminal/terminal-widget.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-widget.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -746,7 +746,7 @@
for (i = 0; i < G_N_ELEMENTS (regex_patterns); i++)
if (widget->regex_tags[i] != -1)
{
- vte_terminal_match_remove (VTE_TERMINAL (widget),
+ vte_terminal_match_remove (VTE_TERMINAL (widget),
widget->regex_tags[i]);
widget->regex_tags[i] = -1;
}
Modified: terminal/trunk/terminal/terminal-window.c
===================================================================
--- terminal/trunk/terminal/terminal-window.c 2009-06-27 19:31:18 UTC (rev 30097)
+++ terminal/trunk/terminal/terminal-window.c 2009-06-27 19:31:35 UTC (rev 30098)
@@ -192,7 +192,7 @@
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
-
+
GtkWidget *menubar;
GtkWidget *toolbars;
GtkWidget *notebook;
@@ -212,8 +212,8 @@
static const GtkActionEntry action_entries[] =
{
{ "file-menu", NULL, N_ ("_File"), NULL, NULL, NULL, },
- { "new-tab", TERMINAL_STOCK_NEWTAB, N_ ("Open _Tab"), NULL, N_ ("Open a new terminal tab"), G_CALLBACK (terminal_window_action_new_tab), },
- { "new-window", TERMINAL_STOCK_NEWWINDOW, N_ ("Open T_erminal"), "<control><shift>N", N_ ("Open a new terminal window"), G_CALLBACK (terminal_window_action_new_window), },
+ { "new-tab", TERMINAL_STOCK_NEWTAB, N_ ("Open _Tab"), NULL, N_ ("Open a new terminal tab"), G_CALLBACK (terminal_window_action_new_tab), },
+ { "new-window", TERMINAL_STOCK_NEWWINDOW, N_ ("Open T_erminal"), "<control><shift>N", N_ ("Open a new terminal window"), G_CALLBACK (terminal_window_action_new_window), },
{ "detach-tab", NULL, N_ ("_Detach Tab"), NULL, N_ ("Open a new window for the current terminal tab"), G_CALLBACK (terminal_window_action_detach_tab), },
{ "close-tab", TERMINAL_STOCK_CLOSETAB, N_ ("C_lose Tab"), NULL, N_ ("Close the current terminal tab"), G_CALLBACK (terminal_window_action_close_tab), },
{ "close-window", TERMINAL_STOCK_CLOSEWINDOW, N_ ("_Close Window"), NULL, N_ ("Close the terminal window"), G_CALLBACK (terminal_window_action_close_window), },
@@ -332,8 +332,8 @@
window->ui_manager = gtk_ui_manager_new ();
gtk_ui_manager_insert_action_group (window->ui_manager, window->action_group, 0);
gtk_ui_manager_add_ui_from_string (window->ui_manager, terminal_window_ui, terminal_window_ui_length, NULL);
-
+
accel_group = gtk_ui_manager_get_accel_group (window->ui_manager);
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
@@ -395,7 +395,7 @@
exo_binding_new (G_OBJECT (window->preferences), "misc-tab-position", G_OBJECT (window->notebook), "tab-pos");
/* set the notebook group id */
- gtk_notebook_set_group (GTK_NOTEBOOK (window->notebook),
+ gtk_notebook_set_group (GTK_NOTEBOOK (window->notebook),
(gpointer) window_notebook_group);
/* signals */
@@ -1149,7 +1149,7 @@
/* release our reference */
g_object_unref (G_OBJECT (screen));
}
-
+
return NULL;
}
@@ -1354,7 +1354,7 @@
TerminalWindow *window)
{
/* check if we already have a preferences dialog instance */
- if (G_UNLIKELY (window->preferences_dialog != NULL))
+ if (G_UNLIKELY (window->preferences_dialog != NULL))
{
/* move to the current screen and make transient for this window */
gtk_window_set_screen (GTK_WINDOW (window->preferences_dialog), gtk_widget_get_screen (GTK_WIDGET (window)));
@@ -1636,7 +1636,7 @@
TerminalWindow *window;
GtkAction *action;
gboolean setting;
-
+
window = g_object_new (TERMINAL_TYPE_WINDOW, NULL);
/* setup full screen */
@@ -1762,13 +1762,13 @@
*
* Return value: TRUE if @screen is active.
**/
-gboolean
+gboolean
terminal_window_is_screen_active (TerminalScreen *screen)
{
TerminalWindow *window = NULL;
GtkNotebook *notebook;
gint page_num;
-
+
window = g_object_get_data (G_OBJECT (screen), I_("terminal-window"));
_terminal_return_val_if_fail (TERMINAL_IS_WINDOW (window), FALSE);
notebook = GTK_NOTEBOOK (window->notebook);
More information about the Xfce4-commits
mailing list