}
}
#if defined APPLICATION
- fprintf(stderr, "VIEW %i\n", priv->view);
if ((priv->view == 1 && dbus_message_is_signal(msg, LIVEWP_SIGNAL_INTERFACE, LIVEWP_STOP_LIVEBG_ON_VIEW1))||
(priv->view == 2 && dbus_message_is_signal(msg, LIVEWP_SIGNAL_INTERFACE, LIVEWP_STOP_LIVEBG_ON_VIEW2))||
(priv->view == 3 && dbus_message_is_signal(msg, LIVEWP_SIGNAL_INTERFACE, LIVEWP_STOP_LIVEBG_ON_VIEW3))||
*/
if (priv){
- livewp_deinitialize_dbus(priv);
- switch (priv->view){
+ switch (priv->view + 1){
case 1: send_dbus_signal (priv, LIVEWP_SIGNAL_INTERFACE,
LIVEWP_SIGNAL_PATH, LIVEWP_STOP_LIVEBG_ON_VIEW1);
break;
break;
}
}
+ livewp_deinitialize_dbus(priv);
while (TRUE){
- fprintf(stderr,"checking true\n");
wpid = wait(&status);
if (wpid == priv->pid)
break;
}
- fprintf(stderr,"out from applet\n");
}
static void
GKeyFile *gkey_file = NULL;
gchar *str = NULL;
gboolean result = FALSE;
- if (number > 3 || number < 0)
+ if (number > 4 || number < 1)
return FALSE;
- str = g_strdup_printf("livewp-home-widget.desktop-%i",number);
+ str = g_strdup_printf("livewp-home-widget.desktop-%i", (number - 1));
config_file = hd_config_file_new(NULL, "/home/user/.config/hildon-desktop/", "home.plugins");
gkey_file = hd_config_file_load_file(config_file, FALSE);
GKeyFile *gkey_file = NULL;
gchar *str = NULL;
- if (number > 3 || number < 0)
+ if (number > 4 || number < 1)
return;
- str = g_strdup_printf("livewp-home-widget.desktop-%i",number);
+ str = g_strdup_printf("livewp-home-widget.desktop-%i",(number - 1));
config_file = hd_config_file_new(NULL, "/home/user/.config/hildon-desktop/", "home.plugins");
gkey_file = hd_config_file_load_file(config_file, FALSE);
GKeyFile *gkey_file = NULL;
gchar *str = NULL;
- if (number > 3 || number < 0)
+ if (number > 4 || number < 1)
return;
- str = g_strdup_printf("livewp-home-widget.desktop-%i",number);
+ str = g_strdup_printf("livewp-home-widget.desktop-%i", (number - 1));
config_file = hd_config_file_new(NULL, "/home/user/.config/hildon-desktop/", "home.plugins");
gkey_file = hd_config_file_load_file(config_file, FALSE);