Skip to content
Snippets Groups Projects
Commit 241c4065 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

gnome: cleanup

parent f7a6a712
No related branches found
No related tags found
No related merge requests found
......@@ -46,19 +46,6 @@ G_BEGIN_DECLS
#define ADDRESSBOOK_DISPLAY_PHONE_BUSINESS "ADDRESSBOOK_DISPLAY_PHONE_BUSINESS"
#define ADDRESSBOOK_DISPLAY_PHONE_HOME "ADDRESSBOOK_DISPLAY_PHONE_HOME"
#define ADDRESSBOOK_DISPLAY_PHONE_MOBILE "ADDRESSBOOK_DISPLAY_PHONE_MOBILE"
/*
typedef struct _AddressBook_Config {
// gint64: a signed integer guaranteed to be 64 bits on all platforms
// To print or scan values of this type, use G_GINT64_MODIFIER and/or G_GINT64_FORMAT
gint enable;
gint max_results;
gint display_contact_photo;
gint search_phone_home;
gint search_phone_business;
gint search_phone_mobile;
} AddressBook_Config;
*/
/**
* Save the parameters through D-BUS
......
......@@ -103,6 +103,12 @@ remove_from_toolbar(GtkWidget *widget)
gtk_container_remove(GTK_CONTAINER(toolbar_), widget);
}
static bool
is_non_empty_string(const char *str)
{
return str && strlen(str) > 0;
}
void
update_actions()
{
......@@ -245,7 +251,7 @@ update_actions()
if (active_calltree_tab == current_calls_tab)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), GTK_TOOL_ITEM(hangUpWidget_), 1);
else if (active_calltree_tab == history_tab) {
if (selectedCall->_recordfile && strlen(selectedCall->_recordfile) > 0) {
if (is_non_empty_string(selectedCall->_recordfile)) {
if (selectedCall->_record_is_playing)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), GTK_TOOL_ITEM(stopRecordWidget_), 3);
else
......@@ -355,7 +361,7 @@ update_actions()
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), GTK_TOOL_ITEM(imToolbar_), pos);
}
} else if (active_calltree_tab == history_tab) {
if (selectedConf->_recordfile && strlen(selectedConf->_recordfile) > 0) {
if (is_non_empty_string(selectedConf->_recordfile)) {
if (selectedConf->_record_is_playing)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), GTK_TOOL_ITEM(stopRecordWidget_), 3);
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment