Commit c48b51bb authored by Emmanuel Milou's avatar Emmanuel Milou

Restore deleted modifications

parent a7807384
......@@ -33,6 +33,7 @@ PKG_CHECK_MODULES(DEPS, \
gtk+-2.0 >= 2.2 \
glib-2.0 >= 2.2 \
libsexy >= 0.1 \
libebook-1.2 >= 2.22
)
......@@ -42,6 +43,7 @@ AC_SUBST(DEPS_LIBS)
AC_OUTPUT([
Makefile
src/Makefile
src/contactlist/Makefile
pixmaps/Makefile
sflphone.desktop
])
......
......@@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps
icon_DATA = sflphone.png
buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history.svg history2.svg sflphone.png stock_person.svg icon_rec.svg rec_call.svg
buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history.svg history2.svg sflphone.png stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg home.svg
buttonsdir = $(datadir)/sflphone
EXTRA_DIST = $(buttons_DATA) $(icon_DATA)
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg2108"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/stock/generic"
sodipodi:docname="stock_person.svg"
inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-icon-theme/48x48/stock/generic/stock_person.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.0">
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective39" />
<linearGradient
id="linearGradient4562">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4564" />
<stop
style="stop-color:#d6d6d2;stop-opacity:1;"
offset="1"
id="stop4566" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4356">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4358" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4360" />
</linearGradient>
<linearGradient
id="linearGradient3824">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3826" />
<stop
style="stop-color:#c9c9c9;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop3828" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3820" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3816"
id="radialGradient3822"
cx="31.112698"
cy="19.008621"
fx="31.112698"
fy="19.008621"
r="8.6620579"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4356"
id="linearGradient4362"
x1="20.661695"
y1="35.817974"
x2="22.626925"
y2="36.217758"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.4574725,8.6573699e-2,-8.4475822e-2,0.4688334,-3.7001476,-5.7438166)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4356"
id="linearGradient4366"
gradientUnits="userSpaceOnUse"
x1="22.686766"
y1="36.3904"
x2="21.408455"
y2="35.739632"
gradientTransform="matrix(-0.4548256,0.1001553,9.7728308e-2,0.4661207,19.475571,-6.1586599)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4356"
id="linearGradient1366"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4548256,0.1001553,9.7728308e-2,0.4661207,13.107279,-9.3553728)"
x1="22.686766"
y1="36.3904"
x2="21.408455"
y2="35.739632" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3824"
id="linearGradient1372"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.4652065,0,0,0.4767595,-12.117924,-7.3917619)"
x1="30.935921"
y1="29.553486"
x2="30.935921"
y2="35.803486" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4562"
id="radialGradient4568"
cx="24.753788"
cy="26.814409"
fx="24.753788"
fy="26.814409"
r="17.986025"
gradientTransform="matrix(0.4708262,0,-1.1611519e-8,0.4867499,-3.5907712,-3.5342702)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4562"
id="radialGradient3816"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.558489,0,-1.377346e-8,0.563387,14.87134,4.364123)"
cx="29.922075"
cy="17.727694"
fx="29.922075"
fy="17.727694"
r="17.986025" />
<filter
inkscape:collect="always"
x="-0.076111108"
width="1.1522222"
y="-0.28344828"
height="1.5668966"
id="filter5655">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.4531044"
id="feGaussianBlur5657" />
</filter>
</defs>
<sodipodi:namedview
inkscape:showpageshadow="false"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.16862745"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4"
inkscape:cx="14.000535"
inkscape:cy="28.945566"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
fill="#9db029"
stroke="#727e0a"
inkscape:window-width="872"
inkscape:window-height="815"
inkscape:window-x="207"
inkscape:window-y="92"
borderlayer="true" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Person</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>user</rdf:li>
<rdf:li>person</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license
rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
<cc:requires
rdf:resource="http://web.resource.org/cc/SourceCode" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="cipek"
inkscape:groupmode="layer"
style="display:inline">
<path
style="opacity:1;fill:url(#linearGradient1372);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 4.1651393,8.8345802 L 6.138843,8.8345802 L 4.9875164,7.7389402 L 4.7408031,8.0760604 L 4.4940899,7.8232205 L 4.1651393,8.8345802 z"
id="path4173" />
<path
sodipodi:nodetypes="cccc"
id="path4370"
d="M 6.430587,11.556284 C 7.003373,11.279297 7.269997,10.601658 7.269997,10.601658 C 6.823808,8.674127 5.420266,7.3392773 5.420266,7.3392773 C 5.420266,7.3392773 6.566811,10.363174 6.430587,11.556284 z"
style="opacity:0.22784807;fill:url(#linearGradient1366);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="dalsi cipek"
style="display:inline">
<rect
style="opacity:0.34857142;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.30000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible;filter:url(#filter5655);enable-background:accumulate"
id="rect4608"
width="38.183765"
height="10.253048"
x="5.3033009"
y="35.448853"
rx="5.126524"
ry="5.126524"
transform="matrix(0.3250676,0,0,0.3331404,6.89512e-2,0.7930955)" />
<path
style="opacity:1;fill:url(#radialGradient4568);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.35188666px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 5.747901,15.484233 L 10.682162,15.484233 C 12.080203,15.484233 13.464322,14.958876 13.971669,13.461513 C 14.453455,12.03959 14.053907,9.331795 10.928875,7.1405156 L 5.0899998,7.1405156 C 1.9649683,9.1632345 1.5744381,11.929484 2.2939191,13.545793 C 3.0268962,15.19242 4.2676231,15.484233 5.747901,15.484233 z"
id="path4308"
sodipodi:nodetypes="cczcczc" />
<path
sodipodi:nodetypes="cccc"
id="path4364"
d="M 12.79888,14.752996 C 13.371666,14.476009 13.638289,13.79837 13.638289,13.79837 C 13.1921,11.870839 11.788558,10.53599 11.788558,10.53599 C 11.788558,10.53599 12.935103,13.559886 12.79888,14.752996 z"
style="opacity:0.29120878;fill:url(#linearGradient4366);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
inkscape:r_cx="true"
inkscape:r_cy="true" />
<path
style="opacity:0.54945056;fill:url(#linearGradient4362);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 3.5664124,14.960262 C 2.9860173,14.700442 2.7262518,14.07431 2.7262518,14.07431 C 3.1176214,12.134311 4.4567857,10.714959 4.4567857,10.714959 C 4.4567857,10.714959 3.3964304,13.77171 3.5664124,14.960262 z"
id="path4354"
sodipodi:nodetypes="cccc"
inkscape:r_cx="true"
inkscape:r_cy="true" />
<path
sodipodi:nodetypes="cczcczc"
id="path4314"
d="M 5.634667,15.115814 L 10.684449,15.104916 C 11.954768,15.104916 13.212438,14.627555 13.673434,13.266988 C 14.111206,11.974967 13.627851,9.514549 10.788314,7.5234596 L 5.2422484,7.4035828 C 2.4027116,9.2415112 1.8531144,11.755044 2.5174989,13.343568 C 3.1818841,14.932092 4.1513831,15.104916 5.634667,15.115814 z"
style="opacity:0.64285715;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.35188669px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
d="M 39.774755,19.008621 A 8.6620579,8.6620579 0 1 1 22.45064,19.008621 A 8.6620579,8.6620579 0 1 1 39.774755,19.008621 z"
sodipodi:ry="8.6620579"
sodipodi:rx="8.6620579"
sodipodi:cy="19.008621"
sodipodi:cx="31.112698"
id="path4318"
style="opacity:1;fill:url(#radialGradient3822);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
sodipodi:type="arc"
transform="matrix(0.4652065,0,0,0.4767595,-6.3991871,-2.6974863)" />
<path
sodipodi:type="arc"
style="opacity:1;fill:url(#radialGradient3816);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.74718857px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
id="path4320"
sodipodi:cx="31.112698"
sodipodi:cy="19.008621"
sodipodi:rx="8.6620579"
sodipodi:ry="8.6620579"
d="M 39.774755,19.008621 A 8.6620579,8.6620579 0 1 1 22.45064,19.008621 A 8.6620579,8.6620579 0 1 1 39.774755,19.008621 z"
transform="matrix(0.4652065,0,0,0.4767595,-6.3410376,-4.366146)" />
<path
d="M 39.774755,19.008621 A 8.6620579,8.6620579 0 1 1 22.45064,19.008621 A 8.6620579,8.6620579 0 1 1 39.774755,19.008621 z"
sodipodi:ry="8.6620579"
sodipodi:rx="8.6620579"
sodipodi:cy="19.008621"
sodipodi:cx="31.112698"
id="path4322"
style="opacity:0.19620254;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.82296228px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
sodipodi:type="arc"
transform="matrix(0.4223732,0,0,0.4328624,-5.0083678,-3.5317177)" />
</g>
</svg>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
bin_PROGRAMS = sflphone-gtk
SUBDIRS=contactlist
# noinst_LTLIBRARIES = libsflphonegtk.la
NOFIFY_LIBS=-lnotify
SEXY_LIBS=-lsexy
......@@ -24,7 +28,7 @@ sflphone_gtk_SOURCES = \
menus.c \
calltab.c \
calltree.c \
historyfilter.c \
searchfilter.c \
actions.c \
configwindow.c \
accountlist.c \
......@@ -34,14 +38,18 @@ sflphone_gtk_SOURCES = \
$(STATUSICON_SOURCE) \
codeclist.c \
timestamp.c \
reqaccount.c
reqaccount.c \
addressbook-config.c
noinst_HEADERS = actions.h dbus.h sflnotify.h mainwindow.h calllist.h dialpad.h audioconf.h codeclist.h assistant.h \
callmanager-glue.h errors.h sflphone_const.h configurationmanager-glue.h instance-glue.h menus.h calltab.h calltree.h configwindow.h \
accountlist.h accountwindow.h marshaller.h sliders.h $(STATUSICON_HEADER) timestamp.h historyfilter.c reqaccount.h
accountlist.h accountwindow.h marshaller.h sliders.h $(STATUSICON_HEADER) timestamp.h searchfilter.h reqaccount.h addressbook-config.h
EXTRA_DIST = marshaller.list
sflphone_gtk_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SEXY_LIBS)
sflphone_gtk_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SEXY_LIBS) \
./contactlist/libcontact.la
AM_CPPFLAGS = $(DEPS_CFLAGS) \
-DICONS_DIR=\""$(prefix)/share/sflphone"\" \
......
This diff is collapsed.
/*
* Copyright (C) 2009 Savoir-Faire Linux inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "addressbook-config.h"
AddressBook_Config *addressbook_config;
void addressbook_load_parameters (AddressBook_Config **settings) {
GHashTable *_params = NULL;
AddressBook_Config *_settings;
// Allocate a struct
_settings = g_new0 (AddressBook_Config, 1);
// Fetch the settings from D-Bus
_params = (GHashTable*) dbus_get_addressbook_settings ();
if (_params == NULL) {
_settings->max_results = 30;
_settings->display_contact_photo = 0;
_settings->search_phone_business = 1;
_settings->search_phone_home = 1;
_settings->search_phone_mobile = 1;
}
else {
_settings->max_results = (guint)(g_hash_table_lookup (_params, ADDRESSBOOK_MAX_RESULTS));
_settings->display_contact_photo = (guint) (g_hash_table_lookup (_params, ADDRESSBOOK_DISPLAY_CONTACT_PHOTO));
_settings->search_phone_business = (guint) (g_hash_table_lookup (_params, ADDRESSBOOK_DISPLAY_PHONE_BUSINESS));
_settings->search_phone_home = (guint) (g_hash_table_lookup (_params, ADDRESSBOOK_DISPLAY_PHONE_HOME));
_settings->search_phone_mobile = (guint) (g_hash_table_lookup (_params, ADDRESSBOOK_DISPLAY_PHONE_MOBILE));
}
*settings = _settings;
}
void addressbook_save_parameters (void) {
GHashTable *params = NULL;
params = g_hash_table_new (NULL, g_str_equal);
g_hash_table_replace (params, (gpointer)ADDRESSBOOK_MAX_RESULTS, (gpointer)addressbook_config->max_results);
g_hash_table_replace (params, (gpointer)ADDRESSBOOK_DISPLAY_CONTACT_PHOTO, (gpointer)addressbook_config->display_contact_photo);
g_hash_table_replace (params, (gpointer)ADDRESSBOOK_DISPLAY_PHONE_BUSINESS, (gpointer)addressbook_config->search_phone_business);
g_hash_table_replace (params, (gpointer)ADDRESSBOOK_DISPLAY_PHONE_HOME, (gpointer)addressbook_config->search_phone_home);
g_hash_table_replace (params, (gpointer)ADDRESSBOOK_DISPLAY_PHONE_MOBILE, (gpointer)addressbook_config->search_phone_mobile);
dbus_set_addressbook_settings (params);
// Decrement the reference count
g_hash_table_unref (params);
}
static void max_results_cb (GtkRange* scale) {
addressbook_config->max_results = (guint) gtk_range_get_value (GTK_RANGE (scale));
}
static void display_contact_photo_cb (GtkWidget *widget) {
addressbook_config->display_contact_photo = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
}
static void search_phone_business_cb (GtkWidget *widget) {
addressbook_config->search_phone_business = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
}
static void search_phone_home_cb (GtkWidget *widget) {
addressbook_config->search_phone_home = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
}
static void search_phone_mobile_cb (GtkWidget *widget) {
addressbook_config->search_phone_mobile = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
}
GtkWidget* create_addressbook_settings () {
GtkWidget *ret, *result_frame, *box, *value, *label, *photo, *item;
// Load the user value
addressbook_load_parameters (&addressbook_config);
ret = gtk_vbox_new(FALSE, 10);
gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
result_frame = gtk_frame_new(_("Search Parameters"));
gtk_box_pack_start(GTK_BOX(ret), result_frame, FALSE, FALSE, 0);
gtk_widget_show (result_frame);
box = gtk_vbox_new( FALSE , 1);
gtk_widget_show (box);
gtk_container_add (GTK_CONTAINER(result_frame) , box);
// SCALE BUTTON - NUMBER OF RESULTS
label = gtk_label_new (_("Maximum result number for a request: "));
gtk_box_pack_start (GTK_BOX(box) , label , FALSE , FALSE , 1);
value = gtk_hscale_new_with_range (25.0 , 50.0 , 5.0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), value);
gtk_scale_set_digits (GTK_SCALE(value) , 0);
gtk_scale_set_value_pos (GTK_SCALE(value) , GTK_POS_RIGHT);
gtk_range_set_value (GTK_RANGE( value ) , addressbook_config->max_results);
gtk_box_pack_start (GTK_BOX(box) , value , TRUE , TRUE , 0);
g_signal_connect (G_OBJECT (value) , "value-changed" , G_CALLBACK(max_results_cb), NULL );
// PHOTO DISPLAY
photo = gtk_check_button_new_with_mnemonic( _("_Display contact photo if available"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(photo), addressbook_config->display_contact_photo);
g_signal_connect (G_OBJECT(photo) , "clicked" , G_CALLBACK (display_contact_photo_cb), NULL);
gtk_box_pack_start (GTK_BOX(box) , photo , TRUE , TRUE , 1);
label = gtk_label_new (_("Search for and display: "));
gtk_box_pack_start (GTK_BOX(box) , label , FALSE , FALSE , 1);
item = gtk_check_button_new_with_mnemonic( _("_Business phone"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item), addressbook_config->search_phone_business);
g_signal_connect (G_OBJECT(item) , "clicked" , G_CALLBACK (search_phone_business_cb) , NULL);
gtk_box_pack_start (GTK_BOX(box) , item , TRUE , TRUE , 1);
item = gtk_check_button_new_with_mnemonic( _("_Home phone"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item), addressbook_config->search_phone_home);
g_signal_connect (G_OBJECT(item) , "clicked" , G_CALLBACK (search_phone_home_cb) , NULL);
gtk_box_pack_start (GTK_BOX(box) , item , TRUE , TRUE , 1);
item = gtk_check_button_new_with_mnemonic( _("_Mobile phone"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item), addressbook_config->search_phone_mobile);
g_signal_connect (G_OBJECT(item) , "clicked" , G_CALLBACK (search_phone_mobile_cb) , NULL);
gtk_box_pack_start (GTK_BOX(box) , item , TRUE , TRUE , 1);
gtk_widget_show_all(ret);
return ret;
}
gboolean addressbook_display (AddressBook_Config *settings, const gchar *field) {
gboolean display = FALSE;
if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_CONTACT_PHOTO) == 0)
display = (settings->display_contact_photo == 1)? TRUE : FALSE;
else if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_PHONE_BUSINESS) == 0)
display = (settings->search_phone_business == 1)? TRUE : FALSE;
else if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_PHONE_HOME) == 0)
display = (settings->search_phone_home == 1)? TRUE : FALSE;
else if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_PHONE_MOBILE) == 0)
display = (settings->search_phone_mobile == 1)? TRUE : FALSE;
else
display = FALSE;
return display;
}
/*
* Copyright (C) 2009 Savoir-Faire Linux inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _ADDRESS_BOOK_CONFIG
#define _ADDRESS_BOOK_CONFIG
#include <gtk/gtk.h>
#include <glib/gtypes.h>
#include "actions.h"
G_BEGIN_DECLS
#define ADDRESSBOOK_MAX_RESULTS "ADDRESSBOOK_MAX_RESULTS"
#define ADDRESSBOOK_DISPLAY_CONTACT_PHOTO "ADDRESSBOOK_DISPLAY_CONTACT_PHOTO"
#define ADDRESSBOOK_DISPLAY_PHONE_BUSINESS "ADDRESSBOOK_DISPLAY_PHONE_BUSINESS"