mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Use callback changes in edelib
This commit is contained in:
parent
6cee1f2ee5
commit
2e989474b3
@ -41,8 +41,8 @@
|
||||
#include <edelib/Util.h>
|
||||
#include <edelib/FontChooser.h>
|
||||
#include <edelib/Directory.h>
|
||||
#include <edelib/ForeignCallback.h>
|
||||
|
||||
#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) {
|
||||
|
@ -38,13 +38,13 @@
|
||||
#include <edelib/Nls.h>
|
||||
#include <edelib/MessageBox.h>
|
||||
#include <edelib/MenuButton.h>
|
||||
#include <edelib/ForeignCallback.h>
|
||||
|
||||
#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) {
|
||||
|
Loading…
Reference in New Issue
Block a user