[Xfce4-commits] r30308 - terminal/trunk/terminal
Nick Schermer
nick at xfce.org
Mon Jul 13 20:00:41 CEST 2009
Author: nick
Date: 2009-07-13 18:00:41 +0000 (Mon, 13 Jul 2009)
New Revision: 30308
Modified:
terminal/trunk/terminal/terminal-preferences.c
terminal/trunk/terminal/terminal-preferences.h
terminal/trunk/terminal/terminal-screen.c
Log:
Rename query_color function.
Modified: terminal/trunk/terminal/terminal-preferences.c
===================================================================
--- terminal/trunk/terminal/terminal-preferences.c 2009-07-13 17:01:16 UTC (rev 30307)
+++ terminal/trunk/terminal/terminal-preferences.c 2009-07-13 18:00:41 UTC (rev 30308)
@@ -1790,15 +1790,15 @@
}
void
-query_color (TerminalPreferences *preferences,
- const gchar *property,
- GdkColor *color_return)
+terminal_preferences_get_color (TerminalPreferences *preferences,
+ const gchar *property,
+ GdkColor *color_return)
{
gchar *spec;
+ terminal_return_if_fail (TERMINAL_IS_PREFERENCES (preferences));
+
g_object_get (G_OBJECT (preferences), property, &spec, NULL);
gdk_color_parse (spec, color_return);
g_free (spec);
}
-
-
Modified: terminal/trunk/terminal/terminal-preferences.h
===================================================================
--- terminal/trunk/terminal/terminal-preferences.h 2009-07-13 17:01:16 UTC (rev 30307)
+++ terminal/trunk/terminal/terminal-preferences.h 2009-07-13 18:00:41 UTC (rev 30308)
@@ -91,7 +91,7 @@
TerminalPreferences *terminal_preferences_get (void);
-void query_color (TerminalPreferences *preferences,
+void terminal_preferences_get_color (TerminalPreferences *preferences,
const gchar *property,
GdkColor *color_return);
Modified: terminal/trunk/terminal/terminal-screen.c
===================================================================
--- terminal/trunk/terminal/terminal-screen.c 2009-07-13 17:01:16 UTC (rev 30307)
+++ terminal/trunk/terminal/terminal-screen.c 2009-07-13 18:00:41 UTC (rev 30308)
@@ -629,14 +629,14 @@
gchar name[32];
guint n;
- query_color (screen->preferences, "color-background", &bg);
- query_color (screen->preferences, "color-foreground", &fg);
- query_color (screen->preferences, "color-cursor", &cursor);
+ terminal_preferences_get_color (screen->preferences, "color-background", &bg);
+ terminal_preferences_get_color (screen->preferences, "color-foreground", &fg);
+ terminal_preferences_get_color (screen->preferences, "color-cursor", &cursor);
for (n = 0; n < 16; ++n)
{
g_snprintf (name, 32, "color-palette%u", n + 1);
- query_color (screen->preferences, name, palette + n);
+ terminal_preferences_get_color (screen->preferences, name, palette + n);
}
vte_terminal_set_colors (VTE_TERMINAL (screen->terminal), &fg, &bg, palette, 16);
@@ -645,7 +645,7 @@
g_object_get (G_OBJECT (screen->preferences), "color-selection-use-default", &selection_use_default, NULL);
if (!selection_use_default)
- query_color (screen->preferences, "color-selection", &selection);
+ terminal_preferences_get_color (screen->preferences, "color-selection", &selection);
vte_terminal_set_color_highlight (VTE_TERMINAL (screen->terminal), selection_use_default ? NULL : &selection);
}
@@ -964,7 +964,7 @@
return;
/* set label color */
- query_color (screen->preferences, "tab-activity-color", &color);
+ terminal_preferences_get_color (screen->preferences, "tab-activity-color", &color);
gtk_widget_modify_fg (screen->tab_label, GTK_STATE_ACTIVE, &color);
/* stop running reset timeout */
More information about the Xfce4-commits
mailing list