From 2e989474b30d446e74f837a4ea1c0564bbc030c3 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Tue, 10 Nov 2009 11:10:34 +0000 Subject: [PATCH] Use callback changes in edelib --- ede-desktop-conf/ede-desktop-conf.cpp | 4 ++-- ede-desktop/ede-desktop.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ede-desktop-conf/ede-desktop-conf.cpp b/ede-desktop-conf/ede-desktop-conf.cpp index 1c1ac79..bc80dce 100644 --- a/ede-desktop-conf/ede-desktop-conf.cpp +++ b/ede-desktop-conf/ede-desktop-conf.cpp @@ -41,8 +41,8 @@ #include #include #include +#include -#define EDE_DESKTOP_UID 0x10 #define EDE_DESKTOP_CONFIG "ede-desktop" Fl_Menu_Item mode_menu[] = { @@ -269,7 +269,7 @@ void apply_cb(Fl_Widget*, void* w) { conf.set("Icons", "one_click_exec", engage_with_one_click->value()); if(conf.save(EDE_DESKTOP_CONFIG)) - edelib::Window::do_foreign_callback(EDE_DESKTOP_UID); + edelib::foreign_callback_call("ede-desktop"); } void ok_cb(Fl_Widget*, void* w) { diff --git a/ede-desktop/ede-desktop.cpp b/ede-desktop/ede-desktop.cpp index d04ea47..06f6f80 100644 --- a/ede-desktop/ede-desktop.cpp +++ b/ede-desktop/ede-desktop.cpp @@ -38,13 +38,13 @@ #include #include #include +#include #include "ede-desktop.h" #include "DesktopIcon.h" #include "Utils.h" #include "Wallpaper.h" -#define EDE_DESKTOP_UID 0x10 #define CONFIG_NAME "ede-desktop" #define ICONS_CONFIG_NAME "ede-desktop-icons" @@ -107,7 +107,7 @@ static void dir_watch_cb(const char* dir, const char* changed, int flags, void* Desktop::instance()->dir_watch(dir, changed, flags); } -static void settings_changed_cb(void* data) { +static void settings_changed_cb(Fl_Window* win) { Desktop::instance()->read_config(); Desktop::instance()->redraw(); } @@ -142,8 +142,7 @@ Desktop::Desktop() : DESKTOP_WINDOW(0, 0, 100, 100, "") { do_dirwatch = true; #ifdef USE_EDELIB_WINDOW - window_id(EDE_DESKTOP_UID); - foreign_callback(settings_changed_cb); + edelib::foreign_callback_add(this, settings_changed_cb, "ede-desktop"); /* DESKTOP_WINDOW::single_bufer(true); */ #endif @@ -176,6 +175,7 @@ Desktop::~Desktop() { delete dbus; edelib::DirWatch::shutdown(); + edelib::foreign_callback_remove(settings_changed_cb); } void Desktop::init_internals(void) {