forked from enlightenment/enlightenment
completely remove exchange support since this is no longer supported/available
SVN revision: 76957
This commit is contained in:
parent
82bb2e8329
commit
e7f840ddc0
30
configure.ac
30
configure.ac
|
@ -667,22 +667,22 @@ define([CHECK_MODULE_TEMPERATURE],
|
|||
AC_E_CHECK_PKG(TEMPERATURE, [ ecore >= 1.2.0 ecore-file >= 1.2.0 eina >= 1.2.0 ], [], [TEMPERATURE=false])
|
||||
])
|
||||
|
||||
have_exchange=no
|
||||
AC_ARG_ENABLE(exchange,
|
||||
AC_HELP_STRING([--disable-exchange], [disable Exchange support @<:@default=detect@:>@]),
|
||||
[want_exchange=$enableval],
|
||||
[want_exchange=auto]
|
||||
)
|
||||
##have_exchange=no
|
||||
##AC_ARG_ENABLE(exchange,
|
||||
## AC_HELP_STRING([--disable-exchange], [disable Exchange support @<:@default=detect@:>@]),
|
||||
## [want_exchange=$enableval],
|
||||
## [want_exchange=auto]
|
||||
##)
|
||||
|
||||
AM_CONDITIONAL(HAVE_EXCHANGE, false)
|
||||
define([CHECK_MODULE_CONF_THEME],
|
||||
[
|
||||
if test "x$want_exchange" != "xno" ; then
|
||||
AC_E_CHECK_PKG(EXCHANGE, [exchange], [], [:])
|
||||
else
|
||||
AC_MSG_NOTICE([requested to not use exchange library])
|
||||
fi
|
||||
])
|
||||
##define([CHECK_MODULE_CONF_THEME],
|
||||
##[
|
||||
## if test "x$want_exchange" != "xno" ; then
|
||||
## AC_E_CHECK_PKG(EXCHANGE, [exchange], [], [:])
|
||||
## else
|
||||
## AC_MSG_NOTICE([requested to not use exchange library])
|
||||
## fi
|
||||
##])
|
||||
|
||||
|
||||
have_enotify=no
|
||||
|
@ -840,7 +840,7 @@ AC_E_OPTIONAL_MODULE([fileman_opinfo], true)
|
|||
AC_E_OPTIONAL_MODULE([wizard], true)
|
||||
AC_E_OPTIONAL_MODULE([conf], true)
|
||||
AC_E_OPTIONAL_MODULE([conf_wallpaper2], true)
|
||||
AC_E_OPTIONAL_MODULE([conf_theme], true, [CHECK_MODULE_CONF_THEME])
|
||||
AC_E_OPTIONAL_MODULE([conf_theme], true, true)
|
||||
AC_E_OPTIONAL_MODULE([conf_intl], true)
|
||||
AC_E_OPTIONAL_MODULE([msgbus], true)
|
||||
AC_E_OPTIONAL_MODULE([conf_applications], true)
|
||||
|
|
|
@ -15,8 +15,7 @@ INCLUDES = -I. \
|
|||
-I$(top_srcdir)/src/bin \
|
||||
-I$(top_builddir)/src/bin \
|
||||
-I$(top_srcdir)/src/modules \
|
||||
@e_cflags@ \
|
||||
@EXCHANGE_CFLAGS@
|
||||
@e_cflags@
|
||||
|
||||
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
|
@ -36,17 +35,13 @@ module_la_SOURCES = e_mod_main.c \
|
|||
e_int_config_theme.h \
|
||||
e_int_config_theme_import.c \
|
||||
e_int_config_theme_import.h \
|
||||
e_int_config_theme_web.c \
|
||||
e_int_config_theme_web.h \
|
||||
e_int_config_transitions.c \
|
||||
e_int_config_transitions.h \
|
||||
e_int_config_wallpaper.c \
|
||||
e_int_config_wallpaper.h \
|
||||
e_int_config_wallpaper_web.c \
|
||||
e_int_config_wallpaper_web.h \
|
||||
e_int_config_xsettings.c
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@ @EXCHANGE_LIBS@
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
module_la_LDFLAGS = -module -avoid-version
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "e.h"
|
||||
#include "e_int_config_theme_import.h"
|
||||
#include "e_int_config_theme_web.h"
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
|
@ -40,7 +39,6 @@ struct _E_Config_Dialog_Data
|
|||
|
||||
/* Dialog */
|
||||
E_Win *win_import;
|
||||
E_Dialog *dia_web;
|
||||
};
|
||||
|
||||
static const char *parts_list[] =
|
||||
|
@ -106,15 +104,6 @@ e_int_config_theme_import_done(E_Config_Dialog *dia)
|
|||
cfdata->win_import = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
e_int_config_theme_web_done(E_Config_Dialog *dia)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
|
||||
cfdata = dia->cfdata;
|
||||
cfdata->dia_web = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
e_int_config_theme_update(E_Config_Dialog *dia, char *file)
|
||||
{
|
||||
|
@ -302,21 +291,6 @@ _cb_import(void *data1, void *data2 __UNUSED__)
|
|||
cfdata->win_import = e_int_config_theme_import(cfdata->cfd);
|
||||
}
|
||||
|
||||
#ifdef HAVE_EXCHANGE
|
||||
static void
|
||||
_cb_web(void *data1, void *data2 __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
|
||||
cfdata = data1;
|
||||
if (cfdata->dia_web)
|
||||
e_win_raise(cfdata->dia_web->win);
|
||||
else
|
||||
cfdata->dia_web = e_int_config_theme_web(cfdata->cfd);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
|
@ -519,11 +493,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
o = e_widget_button_add(evas, _(" Import..."), "preferences-desktop-theme",
|
||||
_cb_import, cfdata, NULL);
|
||||
e_widget_list_object_append(il, o, 1, 0, 0.5);
|
||||
#ifdef HAVE_EXCHANGE
|
||||
o = e_widget_button_add(evas, _(" Online..."), "network-website",
|
||||
_cb_web, cfdata, NULL);
|
||||
e_widget_list_object_append(il, o, 1, 0, 0.5);
|
||||
#endif
|
||||
e_widget_list_object_append(of, il, 1, 0, 0.0);
|
||||
|
||||
{
|
||||
|
|
|
@ -1,163 +0,0 @@
|
|||
#include "e.h"
|
||||
#include "e_int_config_theme.h"
|
||||
#include "e_int_config_theme_web.h"
|
||||
|
||||
#ifdef HAVE_EXCHANGE
|
||||
#include <Exchange.h>
|
||||
|
||||
typedef struct _Web Web;
|
||||
struct _Web
|
||||
{
|
||||
E_Config_Dialog *parent;
|
||||
E_Dialog *dia;
|
||||
};
|
||||
|
||||
#if 0
|
||||
static void
|
||||
_web_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
Evas_Coord th, vh;
|
||||
|
||||
evas_object_smart_callback_call(obj, "changed", NULL);
|
||||
evas_object_size_hint_min_get(obj, NULL, &th);
|
||||
evas_object_geometry_get(obj, NULL, NULL, NULL, &vh);
|
||||
|
||||
if (y < 0) y = 0;
|
||||
if (y > th - vh) y = th - vh;
|
||||
|
||||
exchange_smart_object_offset_set(obj, 0, y);
|
||||
}
|
||||
|
||||
static void
|
||||
_web_pan_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
|
||||
{
|
||||
if (!x || !y) return;
|
||||
|
||||
exchange_smart_object_offset_get(obj, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
_web_pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
|
||||
{
|
||||
Evas_Coord tw, th, vw, vh;
|
||||
|
||||
evas_object_size_hint_min_get(obj, &tw, &th);
|
||||
evas_object_geometry_get(obj, NULL, NULL, &vw, &vh);
|
||||
|
||||
if (x) *x = tw - vw;
|
||||
if (y) *y = th - vh;
|
||||
}
|
||||
|
||||
static void
|
||||
_web_pan_child_size_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
|
||||
{
|
||||
Evas_Coord tw, th, vw, vh;
|
||||
|
||||
evas_object_size_hint_min_get(obj, &tw, &th);
|
||||
evas_object_geometry_get(obj, NULL, NULL, &vw, &vh);
|
||||
|
||||
if (x) *x = tw;
|
||||
if (y) *y = th;
|
||||
}
|
||||
|
||||
void
|
||||
e_int_config_theme_web_del(E_Dialog *dia)
|
||||
{
|
||||
Web *web;
|
||||
|
||||
web = dia->data;
|
||||
e_int_config_theme_web_done(web->parent);
|
||||
E_FREE(web);
|
||||
e_object_unref(E_OBJECT(dia));
|
||||
}
|
||||
|
||||
static void
|
||||
_web_del_cb(void *obj)
|
||||
{
|
||||
E_Dialog *dia = obj;
|
||||
|
||||
e_int_config_theme_web_del(dia);
|
||||
}
|
||||
|
||||
static void
|
||||
_web_close_cb(void *data, E_Dialog *dia)
|
||||
{
|
||||
e_int_config_theme_web_del(dia);
|
||||
}
|
||||
|
||||
static void
|
||||
_web_apply(const char *path, void *data)
|
||||
{
|
||||
E_Action *a;
|
||||
E_Config_Theme *ct;
|
||||
|
||||
ct = e_theme_config_get("theme");
|
||||
if ((ct) && (!strcmp(ct->file, path))) return;
|
||||
|
||||
e_theme_config_set("theme", path);
|
||||
e_config_save_queue();
|
||||
|
||||
a = e_action_find("restart");
|
||||
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
E_Dialog *
|
||||
e_int_config_theme_web(E_Config_Dialog *parent)
|
||||
{
|
||||
#if 0
|
||||
E_Dialog *dia;
|
||||
Web *web;
|
||||
Evas_Object *ol, *exsm, *sf;
|
||||
Evas_Coord mw, mh;
|
||||
E_Fm2_Config fmc;
|
||||
char usr_dir[PATH_MAX];
|
||||
|
||||
dia = e_dialog_new(parent->con, "E", "_theme_web_dialog");
|
||||
if (!dia) return NULL;
|
||||
|
||||
web = E_NEW(Web, 1);
|
||||
if (!web) return NULL;
|
||||
|
||||
web->dia = dia;
|
||||
web->parent = parent;
|
||||
|
||||
e_dialog_title_set(dia, _("Exchange themes"));
|
||||
e_dialog_border_icon_set(dia, "enlightenment/theme");
|
||||
e_dialog_resizable_set(dia, 1);
|
||||
e_dialog_button_add(dia, _("Close"), NULL, _web_close_cb, web);
|
||||
|
||||
dia->data = web;
|
||||
e_object_del_attach_func_set(E_OBJECT(dia), _web_del_cb);
|
||||
e_win_centered_set(dia->win, 1);
|
||||
|
||||
ol = e_widget_list_add(e_win_evas_get(dia->win), 0, 1);
|
||||
|
||||
// The Exchange Smart Object
|
||||
e_user_dir_concat_static(usr_dir, "themes");
|
||||
exsm = exchange_smart_object_add(e_win_evas_get(dia->win));
|
||||
exchange_smart_object_remote_group_set(exsm, "Border");
|
||||
exchange_smart_object_local_path_set(exsm, usr_dir);
|
||||
exchange_smart_object_apply_cb_set(exsm, _web_apply, NULL);
|
||||
|
||||
// The Scroll Frame
|
||||
sf = e_scrollframe_add(e_win_evas_get(dia->win));
|
||||
e_scrollframe_extern_pan_set(sf, exsm, _web_pan_set, _web_pan_get,
|
||||
_web_pan_max_get, _web_pan_child_size_get);
|
||||
e_scrollframe_policy_set(sf, E_SCROLLFRAME_POLICY_OFF,
|
||||
E_SCROLLFRAME_POLICY_ON);
|
||||
e_scrollframe_thumbscroll_force(sf, 1);
|
||||
|
||||
e_widget_list_object_append(ol, sf, 1, 1, 0.5);
|
||||
e_dialog_content_set(dia, ol, 500, 400);
|
||||
|
||||
e_dialog_show(dia);
|
||||
exchange_smart_object_run(exsm);
|
||||
|
||||
return dia;
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
#else
|
||||
#ifndef E_INT_CONFIG_THEME_WEB_H
|
||||
#define E_INT_CONFIG_THEME_WEB_H
|
||||
|
||||
E_Dialog *e_int_config_theme_web(E_Config_Dialog *parent);
|
||||
void e_int_config_theme_web_del(E_Dialog *dia);
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,295 +0,0 @@
|
|||
#include "e.h"
|
||||
#include "e_int_config_wallpaper.h"
|
||||
#include "e_int_config_wallpaper_web.h"
|
||||
|
||||
#ifdef HAVE_EXCHANGE
|
||||
#include <Exchange.h>
|
||||
|
||||
typedef struct _Web Web;
|
||||
struct _Web
|
||||
{
|
||||
E_Config_Dialog *parent;
|
||||
E_Dialog *dia;
|
||||
Evas_Object *list;
|
||||
Evas_Object *textblock;
|
||||
Evas_Object *image;
|
||||
Eina_List *jobs;
|
||||
Eina_List *objs;
|
||||
};
|
||||
|
||||
enum {
|
||||
BTN_DOWNLOAD,
|
||||
BTN_APPLY,
|
||||
BTN_CLOSE
|
||||
};
|
||||
|
||||
void
|
||||
e_int_config_wallpaper_web_del(E_Dialog *dia)
|
||||
{
|
||||
Web *web;
|
||||
Ecore_File_Download_Job *job;
|
||||
Exchange_Object *wp;
|
||||
Eina_List *l;
|
||||
|
||||
web = dia->data;
|
||||
e_int_config_wallpaper_web_done(web->parent);
|
||||
|
||||
EINA_LIST_FOREACH(web->jobs, l, job)
|
||||
ecore_file_download_abort(job);
|
||||
|
||||
EINA_LIST_FREE(web->objs, wp)
|
||||
exchange_object_free(wp);
|
||||
|
||||
evas_object_del(web->list);
|
||||
evas_object_del(web->textblock);
|
||||
evas_object_del(web->image);
|
||||
|
||||
E_FREE(web);
|
||||
e_object_unref(E_OBJECT(dia));
|
||||
exchange_shutdown();
|
||||
}
|
||||
|
||||
static void
|
||||
_web_del_cb(void *data)
|
||||
{
|
||||
E_Dialog *dia;
|
||||
|
||||
dia = data;
|
||||
e_int_config_wallpaper_web_del(dia);
|
||||
}
|
||||
|
||||
static void
|
||||
_web_download_complete_cb(Exchange_Object *obj __UNUSED__, const char *file __UNUSED__, void *data)
|
||||
{
|
||||
Exchange_Object *wp = data;
|
||||
Web *web = exchange_obj_data_get(wp);
|
||||
|
||||
if (wp == e_widget_ilist_selected_data_get(web->list))
|
||||
{
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 0);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_web_download_btn_cb(void *data, E_Dialog *dia __UNUSED__)
|
||||
{
|
||||
Web *web = data;
|
||||
Exchange_Object *wp;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
wp = e_widget_ilist_selected_data_get(web->list);
|
||||
if (!wp) return;
|
||||
|
||||
e_user_dir_concat(buf, sizeof(buf), "backgrounds");
|
||||
exchange_obj_download(wp, buf, _web_download_complete_cb, wp);
|
||||
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
_web_apply_btn_cb(void *data, E_Dialog *dia __UNUSED__)
|
||||
{
|
||||
Web *web = data;
|
||||
Exchange_Object *wp;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
wp = e_widget_ilist_selected_data_get(web->list);
|
||||
if (!wp) return;
|
||||
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "backgrounds/%s",
|
||||
exchange_obj_file_name_get(wp));
|
||||
|
||||
if (!ecore_file_exists(buf)) return;
|
||||
|
||||
e_bg_default_set(buf);
|
||||
e_bg_update();
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
static void
|
||||
_web_close_btn_cb(void *data __UNUSED__, E_Dialog *dia)
|
||||
{
|
||||
e_int_config_wallpaper_web_del(dia);
|
||||
}
|
||||
|
||||
static void
|
||||
_screenshot_get_cb(Exchange_Object *obj, const char *file, void *data)
|
||||
{
|
||||
Web *web = data;
|
||||
|
||||
if (obj == e_widget_ilist_selected_data_get(web->list))
|
||||
e_widget_image_file_set(web->image, file);
|
||||
}
|
||||
|
||||
static void
|
||||
_list_selection_changed(void *data, Evas_Object *obj)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
Web *web = data;
|
||||
Exchange_Object *wp;
|
||||
Eina_Strbuf *sbuf;
|
||||
|
||||
wp = e_widget_ilist_selected_data_get(obj);
|
||||
exchange_obj_screenshot_get(wp, _screenshot_get_cb, web);
|
||||
// TODO inform the user that the download has started (spinner somewhere)
|
||||
|
||||
// enable download button ?
|
||||
e_user_dir_concat(buf, sizeof(buf), "backgrounds");
|
||||
if (exchange_obj_update_available(wp, buf))
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 0);
|
||||
else
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 1);
|
||||
|
||||
// enable apply button ?
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "backgrounds/%s",
|
||||
exchange_obj_file_name_get(wp));
|
||||
if (ecore_file_exists(buf))
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 0);
|
||||
else
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 1);
|
||||
|
||||
// update textblock
|
||||
sbuf = eina_strbuf_new();
|
||||
e_widget_textblock_plain_set(web->textblock, "");
|
||||
|
||||
if (exchange_obj_name_get(wp))
|
||||
eina_strbuf_append_printf(sbuf, "<b>%s</b>", exchange_obj_name_get(wp));
|
||||
if (exchange_obj_version_get(wp))
|
||||
eina_strbuf_append_printf(sbuf, " v %s", exchange_obj_version_get(wp));
|
||||
eina_strbuf_append(sbuf, "<br>");
|
||||
if (exchange_obj_author_get(wp))
|
||||
eina_strbuf_append_printf(sbuf, "%s %s<br>", _("By"),
|
||||
exchange_obj_author_get(wp));
|
||||
if (exchange_obj_description_get(wp))
|
||||
{
|
||||
printf("\n%s\n", exchange_obj_description_get(wp)); // TODO Fix '&' markup error
|
||||
eina_strbuf_append_printf(sbuf, "<br>%s<br>", exchange_obj_description_get(wp));
|
||||
}
|
||||
e_widget_textblock_markup_set(web->textblock, eina_strbuf_string_get(sbuf));
|
||||
eina_strbuf_free(sbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
_thumbnail_download_cb(Exchange_Object *obj, const char *file, void *data)
|
||||
{
|
||||
Web *web = data;
|
||||
Evas_Object *ic;
|
||||
|
||||
ic = e_widget_image_add_from_file(evas_object_evas_get(web->list),
|
||||
file, 0, 0);
|
||||
e_widget_ilist_append(web->list, ic, exchange_obj_name_get(obj),
|
||||
NULL, obj, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_exchange_query_cb(Eina_List *results, void *data)
|
||||
{
|
||||
Web *web = data;
|
||||
Exchange_Object *wp;
|
||||
Eina_List *l;
|
||||
|
||||
eina_list_free(web->jobs);
|
||||
web->jobs = NULL;
|
||||
|
||||
e_widget_ilist_clear(web->list);
|
||||
if (!results)
|
||||
{
|
||||
e_widget_ilist_append(web->list, NULL, _("Error getting data !"),
|
||||
NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
EINA_LIST_FOREACH(results, l, wp)
|
||||
{
|
||||
exchange_obj_thumbnail_get(wp, _thumbnail_download_cb, web);
|
||||
exchange_obj_data_set(wp, web);
|
||||
}
|
||||
|
||||
web->objs = results;
|
||||
}
|
||||
|
||||
E_Dialog *
|
||||
e_int_config_wallpaper_web(E_Config_Dialog *parent)
|
||||
{
|
||||
E_Dialog *dia;
|
||||
Web *web;
|
||||
Evas_Object *o, *ot, *ot2;
|
||||
Evas *evas;
|
||||
Ecore_File_Download_Job *job;
|
||||
|
||||
if (!exchange_init())
|
||||
return NULL;
|
||||
|
||||
// e_dialog
|
||||
dia = e_dialog_new(parent->con, "E", "_wallpaper_web_dialog");
|
||||
if (!dia) return NULL;
|
||||
|
||||
web = E_NEW(Web, 1);
|
||||
if (!web) return NULL;
|
||||
|
||||
web->dia = dia;
|
||||
web->parent = parent;
|
||||
|
||||
e_dialog_title_set(dia, _("Exchange wallpapers"));
|
||||
e_dialog_resizable_set(dia, 1);
|
||||
e_dialog_button_add(dia, _("Download"), NULL, _web_download_btn_cb, web);
|
||||
e_dialog_button_add(dia, _("Apply"), NULL, _web_apply_btn_cb, web);
|
||||
e_dialog_button_add(dia, _("Close"), NULL, _web_close_btn_cb, web);
|
||||
e_dialog_button_disable_num_set(dia, BTN_DOWNLOAD, 1);
|
||||
e_dialog_button_disable_num_set(dia, BTN_APPLY, 1);
|
||||
|
||||
dia->data = web;
|
||||
e_object_del_attach_func_set(E_OBJECT(dia), _web_del_cb);
|
||||
e_win_centered_set(dia->win, 1);
|
||||
evas = e_win_evas_get(dia->win);
|
||||
|
||||
// main table
|
||||
ot = e_widget_table_add(evas, 0);
|
||||
|
||||
// themes list
|
||||
o = e_widget_ilist_add(evas, 50, 50, NULL);
|
||||
e_widget_size_min_set(o, 200, 200);
|
||||
e_widget_ilist_multi_select_set(o, 0);
|
||||
e_widget_on_change_hook_set(o, _list_selection_changed, web);
|
||||
e_widget_ilist_append(o, NULL, _("Getting data, please wait..."),
|
||||
NULL, NULL, NULL);
|
||||
e_widget_table_object_append(ot, o, 0, 0, 1, 1, 0, 1, 0, 1);
|
||||
web->list = o;
|
||||
|
||||
// second table
|
||||
ot2 = e_widget_table_add(evas, 0);
|
||||
e_widget_table_object_append(ot, ot2, 1, 0, 1, 1, 1, 1, 1, 1);
|
||||
|
||||
// textblock
|
||||
o = e_widget_textblock_add(evas);
|
||||
e_widget_size_min_set(o, 100, 100);
|
||||
e_widget_textblock_plain_set(o, _("Select a background from the list."));
|
||||
e_widget_table_object_append(ot2, o, 0, 0, 1, 1, 1, 1, 1, 0);
|
||||
web->textblock = o;
|
||||
|
||||
// preview image
|
||||
o = e_widget_image_add_from_file(evas, NULL, 100, 100);
|
||||
e_widget_table_object_append(ot2, o, 0, 1, 1, 1, 1, 1, 1, 1);
|
||||
web->image = o;
|
||||
|
||||
// request list from exchange
|
||||
job = exchange_query(NULL, "e/desktop/background", 0, 0, 0, NULL, 0, 0,
|
||||
_exchange_query_cb, web);
|
||||
if (!job)
|
||||
{
|
||||
e_widget_ilist_clear(web->list);
|
||||
e_widget_ilist_append(web->list, NULL, _("Error: can't start the request."),
|
||||
NULL, NULL, NULL);
|
||||
e_widget_textblock_plain_set(web->textblock, "");
|
||||
}
|
||||
else web->jobs = eina_list_append(web->jobs, job);
|
||||
|
||||
// show the dialog
|
||||
e_dialog_content_set(dia, ot, 300, 220);
|
||||
e_dialog_show(dia);
|
||||
e_dialog_border_icon_set(dia, "network-website");
|
||||
|
||||
return dia;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
#else
|
||||
#ifndef E_INT_CONFIG_WALLPAPER_WEB_H
|
||||
#define E_INT_CONFIG_WALLPAPER_WEB_H
|
||||
|
||||
E_Dialog *e_int_config_wallpaper_web(E_Config_Dialog *parent);
|
||||
void e_int_config_wallpaper_web_del(E_Dialog *dia);
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -9,10 +9,8 @@
|
|||
#include "e_int_config_startup.h"
|
||||
#include "e_int_config_theme.h"
|
||||
#include "e_int_config_theme_import.h"
|
||||
#include "e_int_config_theme_web.h"
|
||||
#include "e_int_config_transitions.h"
|
||||
#include "e_int_config_wallpaper.h"
|
||||
#include "e_int_config_wallpaper_web.h"
|
||||
|
||||
#undef E_TYPEDEFS
|
||||
#include "e_int_config_borders.h"
|
||||
|
@ -22,10 +20,8 @@
|
|||
#include "e_int_config_startup.h"
|
||||
#include "e_int_config_theme.h"
|
||||
#include "e_int_config_theme_import.h"
|
||||
#include "e_int_config_theme_web.h"
|
||||
#include "e_int_config_transitions.h"
|
||||
#include "e_int_config_wallpaper.h"
|
||||
#include "e_int_config_wallpaper_web.h"
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
|
|
|
@ -15,8 +15,7 @@ INCLUDES = -I. \
|
|||
-I$(top_srcdir)/src/bin \
|
||||
-I$(top_builddir)/src/bin \
|
||||
-I$(top_srcdir)/src/modules \
|
||||
@e_cflags@ \
|
||||
@EXCHANGE_CFLAGS@
|
||||
@e_cflags@
|
||||
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
module_la_SOURCES = e_mod_main.c \
|
||||
|
@ -24,7 +23,7 @@ module_la_SOURCES = e_mod_main.c \
|
|||
e_int_config_wallpaper.c \
|
||||
e_int_config_wallpaper.h
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@ @EXCHANGE_LIBS@
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
module_la_LDFLAGS = -module -avoid-version
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
Loading…
Reference in New Issue