dbus_connection_add_filter(priv->dbus_conn_session,
(DBusHandleMessageFunction)get_livewp_signal_cb,
priv, NULL);
+#if 0
filter_string =
g_strdup_printf("type='signal', interface='%s'", NOTIFY_SIGNAL_INTERFACE);
dbus_bus_add_match(priv->dbus_conn_session, filter_string, &error);
dbus_connection_add_filter(priv->dbus_conn_session,
(DBusHandleMessageFunction)get_livewp_signal_cb,
priv, NULL);
+#endif
}
}
START_FUNCTION;
#endif
-/* fprintf (stderr, "PATH11111111111111111111 %s %s %s\n", dbus_message_get_path(msg), dbus_message_get_interface (msg), dbus_message_get_member (msg)); */
+#if 0
+#if defined APPLICATION
+ fprintf (stderr, "APPLICATION PATH11111111111111111111 %s %s %s\n", dbus_message_get_path(msg), dbus_message_get_interface (msg), dbus_message_get_member (msg));
+#endif
+
+#if defined CONTROLPANEL
+ fprintf (stderr, "APPLICATION PATH11111111111111111111 %s %s %s\n", dbus_message_get_path(msg), dbus_message_get_interface (msg), dbus_message_get_member (msg));
+#endif
+
+#if !(defined CONTROLPANEL || defined APPLICATION)
+ fprintf (stderr, "APPLET PATH11111111111111111111 %s %s %s\n", dbus_message_get_path(msg), dbus_message_get_interface (msg), dbus_message_get_member (msg));
+#endif
+#endif
+
+ if (!priv)
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
if (dbus_message_is_signal(msg, LIVEWP_SIGNAL_INTERFACE, LIVEWP_RELOAD_CONFIG)){
if(read_config(priv)){
fprintf(stderr, "\nCan not read config file.\n");
}else{
read_config(priv);
-#if !(defined APPLICATION || defined CONTROLPANEL)
+#if defined APPLICATION
reload_scene(priv->desktop_plugin);
#endif
}
gobject_class->destroy = (gpointer)lw_applet_finalize;
object_class->finalize = desktop_widget_finalize;
widget_class->realize = lw_applet_realize;
- widget_class->expose_event = lw_applet_expose_event;
+// widget_class->expose_event = lw_applet_expose_event;
g_type_class_add_private (klass, sizeof (Animation_WallpaperPrivate));
void
quit_from_program (Animation_WallpaperPrivate *priv)
{
+ fprintf(stderr,"quit_from_program\n");
if (priv){
livewp_deinitialize_dbus(priv);
+ if (priv->view_notify != 0) {
+ gconf_client_notify_remove (gconf_client_get_default (), priv->view_notify);
+ priv->view_notify = 0;
+ }
if (priv->long_timer){
g_source_remove(priv->long_timer);
priv->long_timer = 0;
priv->short_timer = 0;
}
destroy_scene(priv->desktop_plugin);
- if (priv->view_notify != 0)
- gconf_client_notify_remove (gconf_client_get_default (), priv->view_notify);
+ osso_deinitialize(priv->osso);
+ g_hash_table_destroy(priv->hash_scene_func);
+ g_free(priv->desktop_plugin);
+ priv->desktop_plugin = NULL;
+ g_free(priv);
+ priv = NULL;
}
gtk_main_quit();;
}
main(int argc, char *argv[])
{
GtkWidget *main_widget = NULL;
- GtkWidget *window;
- GtkWidget *btn_setting, *vbox, *btn_power;
- gint result;
HildonProgram *app;
int view = 1;
fprintf(stderr,"VISIBLE %i %i\n",priv->visible, current_active_view());
gconf_client_add_dir(gconf_client_get_default (), "/apps/osso/hildon-desktop/views", GCONF_CLIENT_PRELOAD_NONE, NULL);
priv->view_notify = gconf_client_notify_add(gconf_client_get_default (),"/apps/osso/hildon-desktop/views/current",
- view_changed, priv, NULL, NULL);
+ (GConfClientNotifyFunc)view_changed, priv, NULL, NULL);
init_scene_theme(desktop_plugin);
priv->long_timer = g_timeout_add(LONG_TIMER, (GtkFunction)long_timeout, desktop_plugin);
gtk_main();
+ return 0;
}