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
2a6c8f12
Commit
2a6c8f12
authored
13 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
#7081: Add mute button icon
parent
f79f5200
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
gnome/src/uimanager.c
+59
-1
59 additions, 1 deletion
gnome/src/uimanager.c
with
59 additions
and
1 deletion
gnome/src/uimanager.c
+
59
−
1
View file @
2a6c8f12
...
@@ -1090,10 +1090,65 @@ static const GtkActionEntry menu_entries[] = {
...
@@ -1090,10 +1090,65 @@ static const GtkActionEntry menu_entries[] = {
N_
(
"About this application"
),
G_CALLBACK
(
help_about
)
}
N_
(
"About this application"
),
G_CALLBACK
(
help_about
)
}
};
};
static
void
register_custom_stock_icon
(
void
)
{
static
gboolean
registered
=
FALSE
;
if
(
!
registered
)
{
GdkPixbuf
*
pixbuf
;
GtkIconFactory
*
factory
;
static
GtkStockItem
items
[]
=
{
{
"SFLPHONE_MUTE_CALL"
,
"_GTK!"
,
0
,
0
,
NULL
}
};
registered
=
TRUE
;
/* Register our stock items */
gtk_stock_add
(
items
,
G_N_ELEMENTS
(
items
));
/* Add our custom icon factory to the list of defaults */
factory
=
gtk_icon_factory_new
();
gtk_icon_factory_add_default
(
factory
);
/* demo_find_file() looks in the current directory first,
* so you can run gtk-demo without installing GTK, then looks
* in the location where the file is installed.
*/
pixbuf
=
NULL
;
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/mic.svg"
,
NULL
);
if
(
pixbuf
==
NULL
)
{
DEBUG
(
"Error could not create mic.svg pixbuf"
);
}
/* Register icon to accompany stock item */
if
(
pixbuf
!=
NULL
)
{
GtkIconSet
*
icon_set
;
GdkPixbuf
*
transparent
;
/* The gtk-logo-rgb icon has a white background, make it transparent */
transparent
=
gdk_pixbuf_add_alpha
(
pixbuf
,
TRUE
,
0xff
,
0xff
,
0xff
);
icon_set
=
gtk_icon_set_new_from_pixbuf
(
transparent
);
gtk_icon_factory_add
(
factory
,
"SFLPHONE_MUTE_CALL"
,
icon_set
);
gtk_icon_set_unref
(
icon_set
);
g_object_unref
(
pixbuf
);
g_object_unref
(
transparent
);
}
else
g_warning
(
"failed to load GTK logo for toolbar"
);
/* Drop our reference to the factory, GTK will hold a reference. */
g_object_unref
(
factory
);
}
}
static
const
GtkToggleActionEntry
toggle_menu_entries
[]
=
{
static
const
GtkToggleActionEntry
toggle_menu_entries
[]
=
{
{
"Transfer"
,
GTK_STOCK_TRANSFER
,
N_
(
"_Transfer"
),
"<control>T"
,
N_
(
"Transfer the call"
),
NULL
,
TRUE
},
{
"Transfer"
,
GTK_STOCK_TRANSFER
,
N_
(
"_Transfer"
),
"<control>T"
,
N_
(
"Transfer the call"
),
NULL
,
TRUE
},
{
"Record"
,
GTK_STOCK_MEDIA_RECORD
,
N_
(
"_Record"
),
"<control>R"
,
N_
(
"Record the current conversation"
),
NULL
,
TRUE
},
{
"Record"
,
GTK_STOCK_MEDIA_RECORD
,
N_
(
"_Record"
),
"<control>R"
,
N_
(
"Record the current conversation"
),
NULL
,
TRUE
},
{
"Mute"
,
GTK_STOCK_CANCEL
,
N_
(
"_Mute"
),
"<control>M"
,
N_
(
"Mute microphone for this call"
),
G_CALLBACK
(
call_mute
),
FALSE
},
{
"Mute"
,
"SFLPHONE_MUTE_CALL"
,
N_
(
"_Mute"
),
"<control>M"
,
N_
(
"Mute microphone for this call"
),
G_CALLBACK
(
call_mute
),
FALSE
},
{
"Toolbar"
,
NULL
,
N_
(
"_Show toolbar"
),
"<control>T"
,
N_
(
"Show the toolbar"
),
NULL
,
TRUE
},
{
"Toolbar"
,
NULL
,
N_
(
"_Show toolbar"
),
"<control>T"
,
N_
(
"Show the toolbar"
),
NULL
,
TRUE
},
{
"Dialpad"
,
NULL
,
N_
(
"_Dialpad"
),
"<control>D"
,
N_
(
"Show the dialpad"
),
G_CALLBACK
(
dialpad_bar_cb
),
TRUE
},
{
"Dialpad"
,
NULL
,
N_
(
"_Dialpad"
),
"<control>D"
,
N_
(
"Show the dialpad"
),
G_CALLBACK
(
dialpad_bar_cb
),
TRUE
},
{
"VolumeControls"
,
NULL
,
N_
(
"_Volume controls"
),
"<control>V"
,
N_
(
"Show the volume controls"
),
G_CALLBACK
(
volume_bar_cb
),
TRUE
},
{
"VolumeControls"
,
NULL
,
N_
(
"_Volume controls"
),
"<control>V"
,
N_
(
"Show the volume controls"
),
G_CALLBACK
(
volume_bar_cb
),
TRUE
},
...
@@ -1108,6 +1163,9 @@ GtkUIManager *uimanager_new(void)
...
@@ -1108,6 +1163,9 @@ GtkUIManager *uimanager_new(void)
GtkWidget
*
window
=
get_main_window
();
GtkWidget
*
window
=
get_main_window
();
GtkUIManager
*
ui_manager
=
gtk_ui_manager_new
();
GtkUIManager
*
ui_manager
=
gtk_ui_manager_new
();
/* Register new icons as GTK_STOCK_ITEMS */
register_custom_stock_icon
();
/* Create an accel group for window's shortcuts */
/* Create an accel group for window's shortcuts */
gchar
*
path
=
g_build_filename
(
SFLPHONE_UIDIR_UNINSTALLED
,
"./ui.xml"
,
NULL
);
gchar
*
path
=
g_build_filename
(
SFLPHONE_UIDIR_UNINSTALLED
,
"./ui.xml"
,
NULL
);
guint
manager_id
;
guint
manager_id
;
...
...
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