gnome-terminal r2512 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2512 - trunk/src
- Date: Thu, 20 Mar 2008 10:15:28 +0000 (GMT)
Author: chpe
Date: Thu Mar 20 10:15:28 2008
New Revision: 2512
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2512&view=rev
Log:
Remove the GConfClient argument from terminal_profile_new.
Modified:
trunk/src/terminal-profile.c
trunk/src/terminal-profile.h
trunk/src/terminal.c
Modified: trunk/src/terminal-profile.c
==============================================================================
--- trunk/src/terminal-profile.c (original)
+++ trunk/src/terminal-profile.c Thu Mar 20 10:15:28 2008
@@ -324,16 +324,19 @@
pango_font_description_free (priv->font);
+ g_object_unref (priv->conf);
+
G_OBJECT_CLASS (terminal_profile_parent_class)->finalize (object);
}
TerminalProfile*
-terminal_profile_new (const char *name,
- GConfClient *conf)
+terminal_profile_new (const char *name)
{
TerminalProfile *profile;
TerminalProfilePrivate *priv;
GError *err;
+ GConfClient *conf;
+
g_return_val_if_fail (profiles != NULL, NULL);
g_return_val_if_fail (terminal_profile_lookup (name) == NULL,
@@ -342,9 +345,7 @@
profile = g_object_new (TERMINAL_TYPE_PROFILE, NULL);
priv = profile->priv;
- priv->conf = conf;
- g_object_ref (G_OBJECT (conf));
-
+ conf = priv->conf = gconf_client_get_default ();
priv->name = g_strdup (name);
priv->profile_dir = gconf_concat_dir_and_key (CONF_PROFILES_PREFIX,
@@ -2421,7 +2422,7 @@
if (profile == NULL)
{
- profile = terminal_profile_new (FALLBACK_PROFILE_ID, conf);
+ profile = terminal_profile_new (FALLBACK_PROFILE_ID);
terminal_profile_update (profile);
}
Modified: trunk/src/terminal-profile.h
==============================================================================
--- trunk/src/terminal-profile.h (original)
+++ trunk/src/terminal-profile.h Thu Mar 20 10:15:28 2008
@@ -139,8 +139,7 @@
GType terminal_profile_get_type (void) G_GNUC_CONST;
-TerminalProfile* terminal_profile_new (const char *name,
- GConfClient *conf);
+TerminalProfile* terminal_profile_new (const char *name);
const char* terminal_profile_get_name (TerminalProfile *profile);
const char* terminal_profile_get_visible_name (TerminalProfile *profile);
Modified: trunk/src/terminal.c
==============================================================================
--- trunk/src/terminal.c (original)
+++ trunk/src/terminal.c Thu Mar 20 10:15:28 2008
@@ -1670,7 +1670,7 @@
{
TerminalProfile *profile;
- profile = terminal_profile_new (tmp_slist->data, conf);
+ profile = terminal_profile_new (tmp_slist->data);
terminal_profile_update (profile);
}
@@ -1974,7 +1974,7 @@
gtk_widget_destroy (new_profile_dialog);
escaped_name = terminal_profile_create (base_profile, name, transient_parent);
- new_profile = terminal_profile_new (escaped_name, conf);
+ new_profile = terminal_profile_new (escaped_name);
terminal_profile_update (new_profile);
sync_profile_list (FALSE, NULL);
g_free (escaped_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]