radio_index ++;
}
-#if 0
-// if (ld->ugd->print_search_mode != PTS_SEARCH_INITIAL) {
-
- elm_genlist_item_append(
- genlist,
- &refresh_itc,
- (void *)ad,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL,
- NULL);
-// }
-#endif
-
*print_counter = radio_index-1;
PTS_DEBUG("printer num = %d\n", *print_counter);
Evas_Object *box = elm_box_add(popup);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-/*
- * XXX - below 143 value is just for entry height of 2text.1icon.4 style in genlist
- */
elm_box_pack_end(box, genlist);
+ /*
+ * XXX - below 143 value is just for entry height of 2text.1icon.4 style in genlist
+ */
+
int rotate_angle = 0;
if (ad->win) {
rotate_angle = elm_win_rotation_get(ad->win);
PRINTER_LIST_POPUP_LN_W * elm_config_scale_get(),
ad->list_info.printer_list_popup_landscape_height);
- elm_object_content_set(popup, box);
-
ad->list_info.printer_list_popup_box = box;
ad->list_info.printer_list_popup = popup;
+ elm_object_content_set(popup, box);
evas_object_show(genlist);
evas_object_show(box);
evas_object_show(popup);
evas_object_show(parent);
PTS_TRACE_END;
- return genlist;
+ return popup;
}
void pts_search_printer_select(pts_appdata_t *ad)
Evas_Object *pts_create_print_search_popup(Evas_Object *parent)
{
PTS_TRACE_BEGIN;
- PTS_RET_IF(parent == NULL, "parent is NULL");
+ PTS_RETV_IF(parent == NULL, NULL, "parent is NULL");
int ret = 0;
Evas_Object *layout = NULL;
void *item_data = elm_object_item_data_get(item);
//PTS_RET_IF(NULL == item_data, "item data is NULL"); //FIXME: related to Jira issue #
- if (item_data == (void *)ad->list_info.active_printer){
- Evas_Object *ao = elm_object_item_access_object_get(item);
+ pt_print_option_e option = (pt_print_option_e)item_data;
+ PTS_RET_IF(option >= PT_OPTION_ID_MAX, "UNKNOWN OPTION REALIZED - %d", option);
+
+ PTS_DEBUG("realized print option: [%d]\n", option);
+
+ if (PT_OPTION_ID_PAPERSIZE == option
+ || PT_OPTION_ID_RANGE == option
+ || PT_OPTION_ID_QUALITY == option
+ || PT_OPTION_ID_PAPER == option
+ || PT_OPTION_ID_GRAYSCALE == option
+ || PT_OPTION_ID_DUPLEX == option) {
+
+ Evas_Object *ao = elm_object_item_access_object_get(item);
+ PTS_RET_IF(NULL == ao, "Access object is NULL");
+ elm_access_info_set(ao, ELM_ACCESS_TYPE, IDS_SCRREAD_EXPANDABLE_LIST_TYPE);
+ elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_EXPANDABLE_LIST_CONTEXT);
+ PTS_DEBUG("Item #%d access context info: [%s]", option, IDS_SCRREAD_EXPANDABLE_LIST_CONTEXT);
+ } else if (PT_OPTION_ID_COPIES == option) {
+ Evas_Object *ao = elm_object_item_access_object_get(item);
+ PTS_RET_IF(NULL == ao, "Access object is NULL");
+ elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_SETTINS_ITEM_CONTEXT);
+ PTS_DEBUG("Item #%d access context info: [%s]", option, IDS_SCRREAD_SETTINS_ITEM_CONTEXT);
+ } else if (PT_OPTION_ID_PRINTER == option) {
+ Evas_Object *ao = elm_object_item_access_object_get(item);
PTS_RET_IF(NULL == ao, "Access object is NULL");
elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_PRINTER_ITEM_CONTEXT);
PTS_DEBUG("Item #printer access context info: [%s]", IDS_SCRREAD_PRINTER_ITEM_CONTEXT);
}
- else {
- //REINTERPRETING POINTER since it's ENUM!
- pt_print_option_e option = (pt_print_option_e)item_data;
- PTS_RET_IF(option >= PT_OPTION_ID_MAX, "UNKNOWN OPTION REALIZED - %d", option);
-
- PTS_DEBUG("realized print option: [%d]\n", option);
-
- if (PT_OPTION_ID_PAPERSIZE == option
- || PT_OPTION_ID_RANGE == option
- || PT_OPTION_ID_QUALITY == option
- || PT_OPTION_ID_PAPER == option
- || PT_OPTION_ID_GRAYSCALE == option
- || PT_OPTION_ID_DUPLEX == option) {
-
- Evas_Object *ao = elm_object_item_access_object_get(item);
- PTS_RET_IF(NULL == ao, "Access object is NULL");
- elm_access_info_set(ao, ELM_ACCESS_TYPE, IDS_SCRREAD_EXPANDABLE_LIST_TYPE);
- elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_EXPANDABLE_LIST_CONTEXT);
- PTS_DEBUG("Item #%d access context info: [%s]", option, IDS_SCRREAD_EXPANDABLE_LIST_CONTEXT);
- }
- else if (PT_OPTION_ID_COPIES == option) {
- Evas_Object *ao = elm_object_item_access_object_get(item);
- PTS_RET_IF(NULL == ao, "Access object is NULL");
- elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_SETTINS_ITEM_CONTEXT);
- PTS_DEBUG("Item #%d access context info: [%s]", option, IDS_SCRREAD_SETTINS_ITEM_CONTEXT);
- }
- }
+
PTS_TRACE_END;
}
ad->setting_info.printer_item = elm_genlist_item_append(
genlist,
&itc_printer,
- (void *)ad->list_info.active_printer,
+ (void *)PT_OPTION_ID_PRINTER,
NULL,
ELM_GENLIST_ITEM_NONE,
__pts_setting_view_printer_sel, ad);
return genlist;
}
+#if 0
Evas_Object *pt_util_add_bg(Evas_Object *obj, Eina_Bool is_window)
{
PTS_TRACE_BEGIN;
PTS_TRACE_END;
return bg;
}
+#endif
/**
* This function let the app create setting view