~ubuntu-branches/ubuntu/saucy/parole/saucy

« back to all changes in this revision

Viewing changes to src/common/parole-rc-utils.c

  • Committer: Package Import Robot
  • Author(s): Lionel Le Folgoc
  • Date: 2013-01-09 19:08:53 UTC
  • mfrom: (3.1.3 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130109190853-zeh9ksa0ijwzgmrs
Tags: 0.4.0-0ubuntu1
* New upstream release.
* debian/control:
  - add b-dep on libxfconf-0-dev since parole now uses Xfconf
  - suggests gnome-codec-install for the missing codec feature.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    return rc;
48
48
}
49
49
 
50
 
void parole_rc_write_entry_bool (const gchar *property, const gchar *group, gboolean value)
51
 
{
52
 
    XfceRc *rc = parole_get_resource_file (group, FALSE);
53
 
    
54
 
    xfce_rc_write_bool_entry (rc, property, value);
55
 
    xfce_rc_close (rc);
56
 
}
57
 
 
58
 
void parole_rc_write_entry_int (const gchar *property, const gchar *group, gint value)
59
 
{
60
 
    XfceRc *rc = parole_get_resource_file (group, FALSE);
61
 
    
62
 
    xfce_rc_write_int_entry (rc, property, value);
63
 
    xfce_rc_close (rc);
64
 
}
65
 
 
66
 
void parole_rc_write_entry_string (const gchar *property, const gchar *group, const gchar *value)
67
 
{
68
 
    XfceRc *rc = parole_get_resource_file (group, FALSE);
69
 
    
70
 
    xfce_rc_write_entry (rc, property, value);
71
 
    xfce_rc_close (rc);
72
 
}
73
 
 
74
 
void parole_rc_write_entry_list (const gchar *property, const gchar *group, gchar **value)
75
 
{
76
 
    XfceRc *rc = parole_get_resource_file (group, FALSE);
77
 
    
78
 
    xfce_rc_write_list_entry (rc, property, value, ";");
79
 
    xfce_rc_close (rc);
80
 
}
81
 
 
82
 
gboolean parole_rc_read_entry_bool (const gchar *property, const gchar *group, gboolean fallback)
83
 
{
84
 
    XfceRc *rc = parole_get_resource_file (group, TRUE);
85
 
    gboolean ret_val = fallback;
86
 
    
87
 
    if ( rc )
88
 
    {
89
 
        ret_val = xfce_rc_read_bool_entry (rc, property, fallback);
90
 
        xfce_rc_close (rc);
91
 
    }
92
 
    
93
 
    return ret_val;
94
 
}
95
 
 
96
 
gint parole_rc_read_entry_int (const gchar *property, const gchar *group, gint fallback)
97
 
{
98
 
    XfceRc *rc = parole_get_resource_file (group, TRUE);
99
 
    gint ret_val = fallback;
100
 
    
101
 
    if ( rc )
102
 
    {
103
 
        ret_val =  xfce_rc_read_int_entry (rc, property, fallback);
104
 
        xfce_rc_close (rc);
105
 
    }
106
 
    
107
 
    return ret_val;
108
 
}
109
 
 
110
 
const gchar *parole_rc_read_entry_string (const gchar *property, const gchar *group, const gchar *fallback)
111
 
{
112
 
    const gchar *ret_val = fallback;
113
 
    XfceRc *rc = parole_get_resource_file (group, TRUE);
114
 
    
115
 
    if ( rc )
116
 
    {
117
 
        ret_val = xfce_rc_read_entry (rc, property, fallback);
118
 
        xfce_rc_close (rc);
119
 
    }
120
 
    
121
 
    return ret_val;
122
 
}
123
 
 
124
 
gchar **parole_rc_read_entry_list (const gchar *property, const gchar *group)
125
 
{
126
 
    gchar **ret_val = NULL;
127
 
    XfceRc *rc = parole_get_resource_file (group, TRUE);
128
 
    
129
 
    if ( rc )
130
 
    {
131
 
        ret_val = xfce_rc_read_list_entry (rc, property, ";");
132
 
        xfce_rc_close (rc);
133
 
    }
134
 
    
135
 
    return ret_val;
136
 
}
137
 
 
138
50
gchar **parole_get_history_full (const gchar *relpath)
139
51
{
140
52
    gchar **lines = NULL;