GtkWidget *slider;
GtkWidget *lblText;
GtkAdjustment * adj;
- gdouble sldValue = 0.0;
+ gdouble sldValue = 5.0;
gdouble newValue = 0.0;
char fileContent[64];
char *fileDouble;
slider = gtk_hscale_new_with_range(0.0, 60.0, 0.1);
adj = gtk_range_get_adjustment(GTK_RANGE(slider));
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVisual), TRUE);
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVibrate) , TRUE);
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnSound), TRUE);
inputFilePtr = fopen("/home/user/.config/CallNotify/conf.txt", "r");
fgets(fileContent, 12,inputFilePtr);
- if (fileContent[0]=='y')
- hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVisual), TRUE);
- if (fileContent[2]=='y')
- hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVibrate) , TRUE);
- if (fileContent[4]=='y')
- hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnSound), TRUE);
+ if (fileContent[0]=='n')
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVisual), FALSE);
+ if (fileContent[2]=='n')
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVibrate) , FALSE);
+ if (fileContent[4]=='n')
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnSound), FALSE);
(char*)strtok(fileContent, ";");
(char*)strtok(NULL, ";");
self.soundCall = self.soundFile
self.soundSMS = self.soundFile
self.soundBoth = self.soundFile
- self.volume = 1.0
+ self.volume = 0.5
+ self.visual = True
+ self.sound = True
+ self.vibration = True
+ self.interval = float(5.0)
self.readConfigurationFile()
self.dbg('constructor')
self.sound = raw_set[1] in ('y')
self.vibration = raw_set[2] in ('y')
self.interval = float(raw_set[3].replace(',','.'))
+ self.dbg('visual='+str(self.visual)+' sound='+str(self.sound)+' vibration='+str(self.vibration)+' interval='+str(self.interval))
f.close()
# read sound config file
if self.vibration and profiled.get_value("", "vibrating.alert.enabled") == "On":
self.dbg('vibrate:')
mce.req_vibrator_pattern_activate("PatternIncomingCall")
- time.sleep(1);
+ time.sleep(0.5);
mce.req_vibrator_pattern_deactivate("PatternIncomingCall")
return True