#define NET_WIFIQS_APPID "net.wifi-qs"
#define LOCALEDIR "/usr/share/locale"
-#define NETPOPUP_EDJ tzplatform_mkpath(TZ_SYS_RO_UG, "/res/edje/net-popup/netpopup-custom.edj")
+#define NETPOPUP_EDJ tzplatform_mkpath(TZ_SYS_RO_UG, "/res/edje/net-popup/netpopup-custom.edj")
#define QP_PRELOAD_NOTI_ICON_PATH tzplatform_mkpath(TZ_SYS_RO_APP, "/org.tizen.quickpanel/shared/res/noti_icons/Wi-Fi")
#define NETCONFIG_NOTIFICATION_WIFI_ICON \
{
log_print(NET_POPUP, "__net_popup_send_dbus_msg()\n");
- if (conn == NULL || resp == NULL) {
+ if (conn == NULL || resp == NULL)
return -1;
- }
GDBusConnection *gconn = NULL;
GVariant *msg = NULL;
Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *) event;
- if (!ev) {
+ if (!ev)
return ECORE_CALLBACK_RENEW;
- }
- if (!ev->keyname) {
+ if (!ev->keyname)
return ECORE_CALLBACK_RENEW;
- }
log_print(NET_POPUP, "key_release : %s", ev->keyname);
if (g_strcmp0(ev->keyname, "XF86Phone") == 0 ||
Ecore_X_Event_Client_Message *ev = event;
if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) {
- if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF) {
+ if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
log_print(NET_POPUP, "ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF");
- } else if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON) {
+ else if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
log_print(NET_POPUP, "ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON");
- }
}
return ECORE_CALLBACK_RENEW;
}
} else if (g_str_equal(type, "popup_user_resp")) {
app_control_clone(&g_req_handle, request);
__net_popup_show_popup_with_user_resp(request, data);
- }else {
+ } else {
__net_popup_show_notification(request, data);
elm_exit();
}
int rots[4] = { 0, 90, 180, 270 };
- if (!elm_win_wm_rotation_supported_get(win)) {
+ if (!elm_win_wm_rotation_supported_get(win))
return;
- }
elm_win_wm_rotation_available_rotations_set(win, rots, 4);
}
e = evas_object_evas_get(win);
ee = ecore_evas_ecore_evas_get(e);
- ecore_evas_name_class_set(ee,"APP_POPUP","APP_POPUP");
+ ecore_evas_name_class_set(ee, "APP_POPUP", "APP_POPUP");
elm_win_alpha_set(win, EINA_TRUE);
elm_win_borderless_set(win, EINA_TRUE);
#if 0
ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
evas_object_resize(win, w, h);
- utilx_set_system_notification_level (ecore_x_display_get(),
+ utilx_set_system_notification_level(ecore_x_display_get(),
elm_win_xwindow_get(win),
UTILX_NOTIFICATION_LEVEL_LOW);
#endif
}
noti_err = notification_set_time(noti, time(NULL));
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "Failed to notification_set_time : %d", noti_err);
goto error;
}
g_snprintf(icon_path, sizeof(icon_path), "%s%s", QP_PRELOAD_NOTI_ICON_PATH, "/noti_wifi_in_range.png");
noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, icon_path);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "Failed to notification_set_image : %d", noti_err);
goto error;
}
noti_err = notification_set_text_domain(noti, PACKAGE,
LOCALEDIR);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "Failed to notification_set_text_domain : %d", noti_err);
goto error;
}
noti_flags = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_INDICATOR;
noti_err = notification_set_display_applist(noti, noti_flags);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "Failed to notification_set_display_applist: %d", noti_err);
goto error;
}
ret = app_control_create(&service_handle);
log_print(NET_POPUP, "Service create ret[%d]", ret);
- if(ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE)
goto error;
ret = app_control_set_app_id(service_handle, NET_WIFIQS_APPID);
log_print(NET_POPUP, "Service set app id ret = %d", ret);
- if(ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE)
goto error;
ret = app_control_add_extra_data(service_handle, "caller", "notification");
log_print(NET_POPUP, "Service data addition ret = %d", ret);
- if(ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE)
goto error;
noti_err = notification_set_launch_option(noti,
}
noti_err = notification_set_time(noti, time(NULL));
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "fail to notification_set_time : %d", noti_err);
goto error;
}
noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON,
NETCONFIG_NOTIFICATION_WIFI_ICON);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "fail to notification_set_image : %d", noti_err);
goto error;
}
g_snprintf(icon_path, sizeof(icon_path), "%s%s", QP_PRELOAD_NOTI_ICON_PATH, "/noti_wifi_in_range.png");
noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, icon_path);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "fail to notification_set_image : %d", noti_err);
goto error;
}
noti_err = notification_set_text_domain(noti, PACKAGE,
LOCALEDIR);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "fail to notification_set_text_domain : %d", noti_err);
goto error;
}
noti_flags = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_INDICATOR;
noti_err = notification_set_display_applist(noti, noti_flags);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
log_print(NET_POPUP, "fail to notification_set_display_applist : %d", noti_err);
goto error;
}
ret = app_control_create(&service_handle);
log_print(NET_POPUP, "service create ret[%d]", ret);
- if(ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE)
goto error;
ret = app_control_set_operation(service_handle, APP_CONTROL_OPERATION_VIEW);
- if(ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE)
goto error;
log_print(NET_POPUP, "service set operation is successful");
ret = app_control_set_uri(service_handle, "http://www.google.com");
- if(ret != APP_CONTROL_ERROR_NONE)
+ if (ret != APP_CONTROL_ERROR_NONE)
goto error;
noti_err = notification_set_launch_option(noti,