Browse Source

Adapt to the edbus->eldbus name change.

Submitted by:	Doug Newgard <scimmia22@outlook.com>


SVN revision: 84552
master
rakuco 9 years ago committed by rakuco
parent
commit
442e5ffc32
  1. 2
      configure.ac
  2. 6
      src/bin/Makefile.am
  3. 58
      src/bin/main.c

2
configure.ac

@ -59,7 +59,7 @@ AC_SUBST(ALL_LINGUAS)
AM_GNU_GETTEXT_VERSION([0.12.1])
AM_GNU_GETTEXT([external])
PKG_CHECK_MODULES([EDBUS], [edbus2])
PKG_CHECK_MODULES([ELDBUS], [eldbus])
PKG_CHECK_MODULES([ELEMENTARY], [elementary])
PKG_CHECK_MODULES([EWEBKIT], [ewebkit ecore-file])

6
src/bin/Makefile.am

@ -11,14 +11,14 @@ INCLUDES = \
-DLOCALEDIR=\"$(localedir)\" \
@ELEMENTARY_CFLAGS@ \
@EWEBKIT_CFLAGS@ \
@EDBUS_CFLAGS@
@ELDBUS_CFLAGS@
bin_PROGRAMS = eve
if BUILD_QUICKLAUNCH
bin_PROGRAMS += eve_ql
endif
eve_LDADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @EDBUS_LIBS@ -lm
eve_LDADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @ELDBUS_LIBS@ -lm
eve_SOURCES = main.c view.c chrome.c eve_state.c
if BUILD_QUICKLAUNCH
@ -31,7 +31,7 @@ if BUILD_QUICKLAUNCH
eve_qldir = $(quicklauncher_libdir)
eve_ql_LTLIBRARIES = eve_ql.la
eve_ql_la_SOURCES = main.c view.c chrome.c eve_state.c
eve_ql_la_LIBADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @EDBUS_LIBS@ -lm
eve_ql_la_LIBADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @ELDBUS_LIBS@ -lm
eve_ql_la_CFLAGS =
eve_ql_la_LDFLAGS = -module -avoid-version -no-undefined
eve_ql_SOURCES = main.c

58
src/bin/main.c

@ -15,7 +15,7 @@
#include <Ecore_Getopt.h>
#include <Ecore_File.h>
#include <EDBus.h>
#include <Eldbus.h>
#include <stdlib.h>
#include "gettext.h"
@ -33,7 +33,7 @@ struct Cursor {
};
struct Eve_DBus_Request_Name_Response {
EDBus_Connection *conn;
Eldbus_Connection *conn;
const char *url;
};
@ -375,15 +375,15 @@ static const Ecore_Getopt options = {
}
};
static EDBus_Message *
_cb_dbus_open_url(const EDBus_Service_Interface *iface __UNUSED__,
const EDBus_Message *msg)
static Eldbus_Message *
_cb_dbus_open_url(const Eldbus_Service_Interface *iface __UNUSED__,
const Eldbus_Message *msg)
{
Browser_Window *win = eina_list_data_get(app.windows);
char *tmp_uri;
char *uri;
if (!edbus_message_arguments_get(msg, "s", &tmp_uri))
if (!eldbus_message_arguments_get(msg, "s", &tmp_uri))
goto end;
if ((uri = uri_sanitize(tmp_uri)))
@ -393,52 +393,52 @@ _cb_dbus_open_url(const EDBus_Service_Interface *iface __UNUSED__,
free(uri);
}
end:
return edbus_message_method_return_new(msg);
return eldbus_message_method_return_new(msg);
}
static const EDBus_Method methods[] = {
{ "open_url", EDBUS_ARGS({"s", "url"}), NULL, _cb_dbus_open_url },
static const Eldbus_Method methods[] = {
{ "open_url", ELDBUS_ARGS({"s", "url"}), NULL, _cb_dbus_open_url },
{ }
};
static const EDBus_Service_Interface_Desc desc = {
static const Eldbus_Service_Interface_Desc desc = {
"org.enlightenment.eve", methods
};
static void
_cb_dbus_request_name(void *data, const EDBus_Message *msg,
EDBus_Pending *pending)
_cb_dbus_request_name(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending)
{
struct Eve_DBus_Request_Name_Response *response = data;
unsigned ret;
if (edbus_message_error_get(msg, NULL, NULL))
if (eldbus_message_error_get(msg, NULL, NULL))
goto cleanup;
if (!edbus_message_arguments_get(msg, "u", &ret))
if (!eldbus_message_arguments_get(msg, "u", &ret))
goto cleanup;
switch (ret) {
case EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER:
case EDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER:
case ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER:
case ELDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER:
{
edbus_service_interface_register(response->conn,
eldbus_service_interface_register(response->conn,
"/org/enlightenment/eve", &desc);
}
break;
case EDBUS_NAME_REQUEST_REPLY_IN_QUEUE:
case EDBUS_NAME_REQUEST_REPLY_EXISTS:
case ELDBUS_NAME_REQUEST_REPLY_IN_QUEUE:
case ELDBUS_NAME_REQUEST_REPLY_EXISTS:
{
EDBus_Message *open_url;
Eldbus_Message *open_url;
ERR("eve is already running. Opening %s there and exiting",
response->url);
open_url = edbus_message_method_call_new("org.enlightenment.eve",
open_url = eldbus_message_method_call_new("org.enlightenment.eve",
"/org/enlightenment/eve",
"org.enlightenment.eve",
"open_url");
edbus_message_arguments_append(open_url, "s", response->url);
edbus_connection_send(response->conn, open_url, NULL, NULL, -1);
eldbus_message_arguments_append(open_url, "s", response->url);
eldbus_connection_send(response->conn, open_url, NULL, NULL, -1);
}
elm_exit();
}
@ -633,7 +633,7 @@ elm_main(int argc, char **argv)
const char *user_agent_str;
char *backing_store_option = NULL;
Backing_Store backing_store_enum;
EDBus_Connection *conn = NULL;
Eldbus_Connection *conn = NULL;
size_t dirlen;
Ecore_Timer *session_save_timer = NULL;
@ -718,7 +718,7 @@ elm_main(int argc, char **argv)
elm_theme_extension_add(NULL, PACKAGE_DATA_DIR "/default.edj");
ewk_init();
eve_state_init();
edbus_init();
eldbus_init();
home = getenv("HOME");
if (!home || !home[0])
@ -872,7 +872,7 @@ elm_main(int argc, char **argv)
else
url = config_home_page_get(config);
conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION);
conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
if (conn)
{
struct Eve_DBus_Request_Name_Response *response = calloc(1, sizeof(*response));
@ -881,7 +881,7 @@ elm_main(int argc, char **argv)
response->conn = conn;
response->url = url;
edbus_name_request(conn, "org.enlightenment.eve", 0,
eldbus_name_request(conn, "org.enlightenment.eve", 0,
_cb_dbus_request_name, response);
}
@ -912,7 +912,7 @@ end_fav:
_cb_session_save(session);
session_free(session);
end_session:
if (conn) edbus_connection_unref(conn);
if (conn) eldbus_connection_unref(conn);
if (session_save_timer) ecore_timer_del(session_save_timer);
eina_log_domain_unregister(_log_domain);
@ -920,7 +920,7 @@ end_session:
elm_shutdown();
ewk_shutdown();
eve_state_shutdown();
edbus_shutdown();
eldbus_shutdown();
return r;
}

Loading…
Cancel
Save