static email_string_t EMAIL_COMPOSER_STRING_NULL = { NULL, NULL };
-static bool edit_mode = false;
static Elm_Genlist_Item_Class select_address_itc;
static Elm_Genlist_Item_Class add_to_contact_popup_itc;
debug_enter();
/* To prevent displaying gal-search popup when email address is set on entry. (entry_changed_cb is called!) */
- if (edit_mode == true) {
- edit_mode = false;
+ if (ugd->is_mbe_edit_mode) {
+ ugd->is_mbe_edit_mode = false;
return;
}
EmailAddressInfo *ai = (EmailAddressInfo *)eina_list_nth(ri->email_list, ri->selected_email_idx);
retm_if(!ai, "ai is NULL!");
- edit_mode = true; /* To prevent displaying gal-search popup when email address is set on entry. (entry_changed_cb is called!) */
+ ugd->is_mbe_edit_mode = true; /* To prevent displaying gal-search popup when email address is set on entry. (entry_changed_cb is called!) */
char *existing_text = g_strdup(elm_entry_entry_get(ugd->selected_entry));
static void _composer_contacts_update_recp_info_for_mbe(EmailComposerUGD *ugd, Evas_Object *mbe);
static void _composer_contacts_update_recp_info_for_recipients(EmailComposerUGD *ugd);
-GDBusConnection *_g_composer_dbus_conn = NULL;
-guint _g_composer_network_id = 0;
-
static email_string_t EMAIL_COMPOSER_STRING_NULL = { NULL, NULL };
static email_string_t EMAIL_COMPOSER_STRING_BUTTON_OK = { PACKAGE, "IDS_EMAIL_BUTTON_OK" };
static email_string_t EMAIL_COMPOSER_STRING_TPOP_LOADING_ING = { PACKAGE, "IDS_EMAIL_TPOP_LOADING_ING" };
debug_enter();
GError *error = NULL;
- if (_g_composer_dbus_conn == NULL) {
- _g_composer_dbus_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+ if (ugd->dbus_conn == NULL) {
+ ugd->dbus_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
if (error) {
debug_error("g_bus_get_sync() failed (%s)", error->message);
g_error_free(error);
return COMPOSER_ERROR_DBUS_FAIL;
}
- _g_composer_network_id = g_dbus_connection_signal_subscribe(_g_composer_dbus_conn, NULL, "User.Email.NetworkStatus", "email", "/User/Email/NetworkStatus",
+ ugd->dbus_network_id = g_dbus_connection_signal_subscribe(ugd->dbus_conn, NULL, "User.Email.NetworkStatus", "email", "/User/Email/NetworkStatus",
NULL, G_DBUS_SIGNAL_FLAGS_NONE, _composer_gdbus_signal_receiver_cb, (void *)ugd, NULL);
- retvm_if(_g_composer_network_id == GDBUS_SIGNAL_SUBSCRIBE_FAILURE, COMPOSER_ERROR_DBUS_FAIL, "g_dbus_connection_signal_subscribe() failed!");
+ retvm_if(ugd->dbus_network_id == GDBUS_SIGNAL_SUBSCRIBE_FAILURE, COMPOSER_ERROR_DBUS_FAIL, "g_dbus_connection_signal_subscribe() failed!");
}
debug_leave();
{
debug_enter();
- g_dbus_connection_signal_unsubscribe(_g_composer_dbus_conn, _g_composer_network_id);
- g_object_unref(_g_composer_dbus_conn);
- _g_composer_dbus_conn = NULL;
- _g_composer_network_id = 0;
+ g_dbus_connection_signal_unsubscribe(ugd->dbus_conn, ugd->dbus_network_id);
+ g_object_unref(ugd->dbus_conn);
+ ugd->dbus_conn = NULL;
+ ugd->dbus_network_id = 0;
debug_leave();
}