October 9th, 2009 by seb
Get a the remote branch gnome-2-28
git checkout --track origin/gnome-2-28
Commit on a branch the last commit done on master
git cherry-pick master
Remove changes in the index, do not change local file
git reset
Remove changes in local file to match index
git reset --hard
Warning, uncommitted changes are not in any branch. So removing them with the previous command will remove them in all branch.
Posted in Uncategorized | No Comments »
September 21st, 2009 by seb
Each executable contains a list of pathes for loading dynamic library. You can get this list using:
readelf -d executable_name
or
chrpath -l executable_name
And it is possible to change this path using:
chrpath -r new_path_separated_by_double_colon executable_name
There are more detailled explanation here: http://www.eyrie.org/~eagle/notes/rpath.html
Posted in Uncategorized | No Comments »
September 12th, 2009 by seb
A function like gconf_client_get_bool returns FALSE if the value is set to FALSE or if the value is missing. Moreover, the err argument is not set, if the value is missing.
One way to return another default value if the key is missing is to use the function gconf_client_get that will return NULL in this case.
A function to get a boolean value can be written like:
static gboolean
get_bool_default (GConfClient *client, const gchar *key, gboolean def)
{
gboolean value = def;
GConfValue* val;
val = gconf_client_get (client, key, NULL);
if (val != NULL)
{
value = gconf_value_get_bool (val);
gconf_value_free (val);
}
return value;
}
I haven’t found a way to remove a not user defined gconf key, so to check this code, my current solution is just to read another key.
Posted in Uncategorized | No Comments »
August 13th, 2009 by seb
Here is a new blog about coding, I will try to put here my thought while I’m working on GNOME.
Posted in Uncategorized | No Comments »