Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
8a1ae9bb
Commit
8a1ae9bb
authored
15 years ago
by
Julien Bonjean
Browse files
Options
Downloads
Patches
Plain Diff
[#2916] Added support to disable a shortcut
parent
d1057e02
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-client-gnome/src/config/shortcuts-config.c
+20
-0
20 additions, 0 deletions
sflphone-client-gnome/src/config/shortcuts-config.c
sflphone-client-gnome/src/config/shortcuts-config.h
+7
-3
7 additions, 3 deletions
sflphone-client-gnome/src/config/shortcuts-config.h
with
27 additions
and
3 deletions
sflphone-client-gnome/src/config/shortcuts-config.c
+
20
−
0
View file @
8a1ae9bb
...
...
@@ -85,12 +85,15 @@ setup_tree_view(GtkWidget *treeview)
gtk_tree_view_append_column
(
GTK_TREE_VIEW
(
treeview
),
column
);
g_signal_connect
(
G_OBJECT
(
renderer
),
"accel_edited"
,
G_CALLBACK
(
accel_edited
),
(
gpointer
)
treeview
);
g_signal_connect
(
G_OBJECT
(
renderer
),
"accel_cleared"
,
G_CALLBACK
(
accel_cleared
),
(
gpointer
)
treeview
);
}
static
void
accel_edited
(
GtkCellRendererAccel
*
renderer
,
gchar
*
path
,
guint
accel_key
,
GdkModifierType
mask
,
guint
hardware_keycode
,
GtkTreeView
*
treeview
)
{
DEBUG
(
"Accel edited"
);
GtkTreeModel
*
model
;
GtkTreeIter
iter
;
...
...
@@ -105,3 +108,20 @@ accel_edited(GtkCellRendererAccel *renderer, gchar *path, guint accel_key,
// Update GDK bindings
shortcuts_update_bindings
(
atoi
(
path
),
code
);
}
static
void
accel_cleared
(
GtkCellRendererAccel
*
renderer
,
gchar
*
path
,
GtkTreeView
*
treeview
)
{
DEBUG
(
"Accel cleared"
);
GtkTreeModel
*
model
;
GtkTreeIter
iter
;
// Update treeview
model
=
gtk_tree_view_get_model
(
treeview
);
if
(
gtk_tree_model_get_iter_from_string
(
model
,
&
iter
,
path
))
gtk_list_store_set
(
GTK_LIST_STORE
(
model
),
&
iter
,
MASK
,
0
,
VALUE
,
0
,
-
1
);
// Update GDK bindings
shortcuts_update_bindings
(
atoi
(
path
),
0
);
}
This diff is collapsed.
Click to expand it.
sflphone-client-gnome/src/config/shortcuts-config.h
+
7
−
3
View file @
8a1ae9bb
...
...
@@ -34,15 +34,19 @@ enum
};
GtkWidget
*
create_shortcuts_settings
();
create_shortcuts_settings
();
static
void
setup_tree_view
(
GtkWidget
*
treeview
);
setup_tree_view
(
GtkWidget
*
treeview
);
static
void
accel_edited
(
GtkCellRendererAccel
*
renderer
,
gchar
*
path
,
guint
accel_key
,
accel_edited
(
GtkCellRendererAccel
*
renderer
,
gchar
*
path
,
guint
accel_key
,
GdkModifierType
mask
,
guint
hardware_keycode
,
GtkTreeView
*
treeview
);
static
void
accel_cleared
(
GtkCellRendererAccel
*
renderer
,
gchar
*
path
,
GtkTreeView
*
treeview
);
G_END_DECLS
#endif // _SHORTCUTS_CONFIG
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment