fix argument type warnings by casting to appropriate type
2009-01-25 Jens Granseuer <jensgr@gmx.net> * gnome-keybinding-properties.c: (add_custom_shortcut): fix argument type warnings by casting to appropriate type svn path=/trunk/; revision=9209
This commit is contained in:
parent
a62dabe380
commit
70284272a7
2 changed files with 18 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-01-25 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* gnome-keybinding-properties.c: (add_custom_shortcut): fix argument
|
||||||
|
type warnings by casting to appropriate type
|
||||||
|
|
||||||
==================== 2.25.3 ====================
|
==================== 2.25.3 ====================
|
||||||
==================== 2.25.2 ====================
|
==================== 2.25.2 ====================
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ description_set_func (GtkTreeViewColumn *tree_column,
|
||||||
"text", key_entry->description != NULL ?
|
"text", key_entry->description != NULL ?
|
||||||
key_entry->description : _("<Unknown Action>"),
|
key_entry->description : _("<Unknown Action>"),
|
||||||
NULL);
|
NULL);
|
||||||
else
|
else
|
||||||
g_object_set (cell,
|
g_object_set (cell,
|
||||||
"editable", FALSE, NULL);
|
"editable", FALSE, NULL);
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ key_match (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer d
|
||||||
KEYENTRY_COLUMN, &element,
|
KEYENTRY_COLUMN, &element,
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
if (element && g_strcmp0 (element->gconf_key, match_data->key) == 0)
|
if (element && g_strcmp0 (element->gconf_key, match_data->key) == 0)
|
||||||
{
|
{
|
||||||
match_data->found = TRUE;
|
match_data->found = TRUE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -422,13 +422,13 @@ key_match (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer d
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
key_is_already_shown (GtkTreeModel *model, const KeyListEntry *entry)
|
key_is_already_shown (GtkTreeModel *model, const KeyListEntry *entry)
|
||||||
{
|
{
|
||||||
KeyMatchData data;
|
KeyMatchData data;
|
||||||
|
|
||||||
data.key = entry->name;
|
data.key = entry->name;
|
||||||
data.found = FALSE;
|
data.found = FALSE;
|
||||||
gtk_tree_model_foreach (model, key_match, &data);
|
gtk_tree_model_foreach (model, key_match, &data);
|
||||||
|
|
||||||
return data.found;
|
return data.found;
|
||||||
|
@ -502,12 +502,12 @@ find_section (GtkTreeModel *model,
|
||||||
{
|
{
|
||||||
gint i, j;
|
gint i, j;
|
||||||
gboolean found;
|
gboolean found;
|
||||||
|
|
||||||
i = gtk_tree_model_iter_n_children (model, NULL);
|
i = gtk_tree_model_iter_n_children (model, NULL);
|
||||||
found = FALSE;
|
found = FALSE;
|
||||||
gtk_tree_model_get_iter_first (model, iter);
|
gtk_tree_model_get_iter_first (model, iter);
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
{
|
{
|
||||||
char *description = NULL;
|
char *description = NULL;
|
||||||
|
|
||||||
gtk_tree_model_iter_next (model, iter);
|
gtk_tree_model_iter_next (model, iter);
|
||||||
|
@ -544,7 +544,7 @@ append_keys_to_tree (GladeXML *dialog,
|
||||||
model = gtk_tree_view_get_model (GTK_TREE_VIEW (WID ("shortcut_treeview")));
|
model = gtk_tree_view_get_model (GTK_TREE_VIEW (WID ("shortcut_treeview")));
|
||||||
|
|
||||||
/* Try to find a section parent iter, if it already exists */
|
/* Try to find a section parent iter, if it already exists */
|
||||||
find_section (model, &iter, title);
|
find_section (model, &iter, title);
|
||||||
parent_iter = iter;
|
parent_iter = iter;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -661,7 +661,7 @@ append_keys_to_tree (GladeXML *dialog,
|
||||||
-1);
|
-1);
|
||||||
gtk_tree_view_expand_all (GTK_TREE_VIEW (WID ("shortcut_treeview")));
|
gtk_tree_view_expand_all (GTK_TREE_VIEW (WID ("shortcut_treeview")));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (client);
|
g_object_unref (client);
|
||||||
|
|
||||||
/* Don't show an empty section */
|
/* Don't show an empty section */
|
||||||
|
@ -961,7 +961,7 @@ reload_key_entries (gpointer wm_name, GladeXML *dialog)
|
||||||
}
|
}
|
||||||
g_list_free (list);
|
g_list_free (list);
|
||||||
|
|
||||||
/* Load custom shortcuts _after_ system-provided ones,
|
/* Load custom shortcuts _after_ system-provided ones,
|
||||||
* since some of the custom shortcuts may also be listed
|
* since some of the custom shortcuts may also be listed
|
||||||
* in a file. Loading the custom shortcuts last makes
|
* in a file. Loading the custom shortcuts last makes
|
||||||
* such keys not show up in the custom section.
|
* such keys not show up in the custom section.
|
||||||
|
@ -1451,8 +1451,8 @@ update_custom_shortcut (GtkTreeModel *model, GtkTreeIter *iter)
|
||||||
edit_custom_shortcut (key);
|
edit_custom_shortcut (key);
|
||||||
if (key->command == NULL || key->command[0] == '\0')
|
if (key->command == NULL || key->command[0] == '\0')
|
||||||
remove_custom_shortcut (model, iter);
|
remove_custom_shortcut (model, iter);
|
||||||
else
|
else
|
||||||
gtk_tree_store_set (GTK_TREE_STORE (model), iter,
|
gtk_tree_store_set (GTK_TREE_STORE (model), iter,
|
||||||
KEYENTRY_COLUMN, key, -1);
|
KEYENTRY_COLUMN, key, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1504,7 +1504,7 @@ add_custom_shortcut (GtkTreeView *tree_view,
|
||||||
dir = find_free_gconf_key (&error);
|
dir = find_free_gconf_key (&error);
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
{
|
{
|
||||||
show_error (gtk_widget_get_toplevel (tree_view), error);
|
show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tree_view))), error);
|
||||||
|
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
return;
|
return;
|
||||||
|
@ -1737,7 +1737,7 @@ selection_changed (GtkTreeSelection *selection, gpointer data)
|
||||||
can_remove = TRUE;
|
can_remove = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_set_sensitive (button, can_remove);
|
gtk_widget_set_sensitive (button, can_remove);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue