예제 #1
0
static void
_fill_zone_config(E_Zone               *zone,
                  E_Config_Dialog_Data *cfdata)
{
   E_Radio_Group *rg;
   Evas *evas = cfdata->evas;
   int i;

   /* Clear old entries first */
   evas_object_del(cfdata->o_desklist);
   cfdata->o_desklist = e_widget_list_add(evas, 1, 0);
   e_scrollframe_child_set(e_widget_scrollframe_object_get(cfdata->o_deskscroll), cfdata->o_desklist);
   e_widget_sub_object_add(cfdata->o_deskscroll, cfdata->o_desklist);

   for (i = 0; i < zone->desk_y_count * zone->desk_x_count; i++)
     {
        E_Desk *desk = zone->desks[i];
        if (!desk) continue;

        struct _E_Config_vdesk *vd = get_vdesk(cfdata, desk->x, desk->y, zone->num);
        if (!vd)
          {
             vd = malloc(sizeof(struct _E_Config_vdesk));
             vd->x = desk->x;
             vd->y = desk->y;
             vd->zone_num = zone->num;
             vd->layout = TILE_NONE;
             cfdata->vdesks = eina_list_append(cfdata->vdesks, vd);
          }

        rg = e_widget_radio_group_new(&(vd->layout));
        Evas_Object *radiolist = e_widget_list_add(evas, 0, 1);

        LIST_ADD(radiolist, e_widget_label_add(evas, desk->name));
        LIST_ADD(radiolist, RADIO("None", TILE_NONE, rg));
        LIST_ADD(radiolist, RADIO("Bigmain", TILE_BIGMAIN, rg));
        LIST_ADD(radiolist, RADIO("Grid", TILE_GRID, rg));
        LIST_ADD(cfdata->o_desklist, radiolist);
     }

   /* Get the correct sizes of desklist and scrollframe */
   int mw, mh;
   e_widget_size_min_get(cfdata->o_desklist, &mw, &mh);
   evas_object_resize(cfdata->o_desklist, mw, mh);
   if (mh > 150)
     mh = 150;
   mw += 32;
   mh += 32;
   e_widget_size_min_set(cfdata->o_deskscroll, mw, mh);
}
예제 #2
0
/*
E_API int
wizard_page_init(E_Wizard_Page *pg EINA_UNUSED, Eina_Bool *need_xdg_desktops EINA_UNUSED, Eina_Bool *need_xdg_icons EINA_UNUSED)
{
   return 1;
}

E_API int
wizard_page_shutdown(E_Wizard_Page *pg EINA_UNUSED)
{
   return 1;
}
*/
E_API int
wizard_page_show(E_Wizard_Page *pg)
{
   Evas_Object *o, *of, *ob;

   o = e_widget_list_add(pg->evas, 1, 0);
   e_wizard_title_set(_("Taskbar"));

   of = e_widget_framelist_add(pg->evas, _("Information"), 0);

   ob = e_widget_textblock_add(pg->evas);
   e_widget_size_min_set(ob, 260 * e_scale, 200 * e_scale);
   e_widget_textblock_markup_set
     (ob,
     _("A taskbar can be added to<br>"
       "show open windows and applications."
       )
     );
   e_widget_framelist_object_append(of, ob);

   ob = e_widget_check_add(pg->evas, _("Enable Taskbar"), &(do_tasks));
   e_widget_framelist_object_append(of, ob);

   e_widget_list_object_append(o, of, 0, 0, 0.5);

   evas_object_show(of);

   e_wizard_page_show(o);
   return 1; /* 1 == show ui, and wait for user, 0 == just continue */
}
예제 #3
0
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) 
{
   Evas_Object *o, *of, *ob;

   o = e_widget_list_add(evas, 0, 0);

   of = e_widget_frametable_add(evas, D_("Feeds"), 0);

   ob = e_widget_check_add(evas, D_("Sort lists by name (disable Move action)"), &(cfdata->feed.sort_name));
   e_widget_frametable_object_append(of, ob, 0, 1, 2, 1, 1, 1, 1, 0);

   e_widget_list_object_append(o, of, 1, 1, 0.5);

   of = e_widget_frametable_add(evas, D_("News Viewer"), 0);

   ob = e_widget_label_add(evas, D_("Font size"));
   e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);

   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f"), NEWS_VIEWER_VCONTENT_FONT_SIZE_MIN, NEWS_VIEWER_VCONTENT_FONT_SIZE_MAX, 1.0, 0, NULL, &(cfdata->viewer.vcontent.font_size), 50);
   e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 0, 1, 0);

   ob = e_widget_label_add(evas, D_("Font color"));
   e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);

   ob = e_widget_color_well_add(evas, cfdata->viewer.vcontent.font_color, 1);
   cfdata->color_viewer_font = ob;
   e_widget_on_change_hook_set(ob, _cb_color_viewer_font_change, cfdata);
   e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);

   e_widget_list_object_append(o, of, 1, 1, 1.0);

   return o;
}
static Evas_Object *
_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas,
		       E_Config_Dialog_Data * cfdata)
{
  Evas_Object *o, *of, *ob, *hostname_entry,
    *port_entry;

  o = e_widget_list_add (evas, 0, 0);

  of = e_widget_frametable_add (evas, D_ ("Configuration"), 1);
  ob = e_widget_label_add (evas, D_ ("Poll Time:"));
  e_widget_frametable_object_append (of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
  ob =
    e_widget_slider_add (evas, 1, 0, D_ ("%1.0f seconds"), 1, 60, 1, 0, NULL,
			 &(cfdata->poll_time), 100);
  e_widget_frametable_object_append (of, ob, 0, 1, 1, 1, 1, 0, 1, 0);
  ob = e_widget_label_add (evas, D_ ("Hostname:"));
  e_widget_frametable_object_append (of, ob, 0, 2, 1, 1, 1, 0, 1, 0);
  hostname_entry =
    e_widget_entry_add (evas, &cfdata->hostname, NULL, NULL, NULL);
  e_widget_size_min_set (hostname_entry, 150, 1);
  e_widget_frametable_object_append (of, hostname_entry, 0, 3, 1, 1, 1, 0, 1,
				     0);
  ob = e_widget_label_add (evas, D_ ("Port:"));
  e_widget_frametable_object_append (of, ob, 0, 4, 1, 1, 1, 0, 1, 0);
  port_entry = e_widget_entry_add (evas, &cfdata->port, NULL, NULL, NULL);
  e_widget_size_min_set (hostname_entry, 150, 1);
  e_widget_frametable_object_append (of, port_entry, 0, 5, 1, 1, 1, 0, 1, 0);
  e_widget_list_object_append (o, of, 1, 1, 0.5);

  ob = e_widget_check_add(evas, D_("Show Popup"), &(cfdata->show_popup));
  e_widget_frametable_object_append(of, ob, 0, 6, 1, 1, 1, 0, 1, 0);

  return o;
}
예제 #5
0
파일: e_entry_dialog.c 프로젝트: Limsik/e17
/* Externally accesible functions */
EAPI E_Entry_Dialog *
e_entry_dialog_show(const char *title, const char *icon, const char *text,
                    const char *initial_text,
                    const char *button_text, const char *button2_text,
                    void (*ok_func)(void *data, char *text),
                    void (*cancel_func)(void *data), void *data)
{
   E_Entry_Dialog *ed;
   E_Dialog *dia;
   Evas_Object *o, *ob;
   Evas_Modifier_Mask mask;
   int w, h;

   ed = E_OBJECT_ALLOC(E_Entry_Dialog, E_ENTRY_DIALOG_TYPE, _e_entry_dialog_free);
   ed->ok.func = ok_func;
   ed->ok.data = data;
   ed->cancel.func = cancel_func;
   ed->cancel.data = data;
   if (initial_text)
     ed->text = strdup(initial_text);

   dia = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_entry_dialog");
   if (!dia)
     {
        e_object_del(E_OBJECT(ed));
        return NULL;
     }
   dia->data = ed;
   ed->dia = dia;

   mask = 0;
   evas_object_key_ungrab(dia->event_object, "space", mask, ~mask);
   e_object_del_attach_func_set(E_OBJECT(dia), _e_entry_dia_del);
   e_win_delete_callback_set(dia->win, _e_entry_dialog_delete);

   if (title) e_dialog_title_set(dia, title);
   if (icon) e_dialog_icon_set(dia, icon, 64);

   o = e_widget_list_add(dia->win->evas, 0, 0);
   if (text)
     {
        ob = e_widget_label_add(dia->win->evas, text);
        e_widget_list_object_append(o, ob, 1, 0, 0.5);
     }

   ed->entry = e_widget_entry_add(dia->win->evas, &(ed->text), NULL, NULL, NULL);
   evas_object_smart_callback_add(ed->entry, "key_down", _e_entry_cb_key_down, ed);
   e_widget_list_object_append(o, ed->entry, 1, 1, 0.5);
   e_widget_size_min_get(o, &w, &h);
   e_dialog_content_set(dia, o, w, h);

   e_dialog_button_add(dia, !button_text ? _("OK") : button_text, NULL, _e_entry_dialog_ok, ed);
   e_dialog_button_add(dia, !button2_text ? _("Cancel") : button2_text, NULL, _e_entry_dialog_cancel, ed);

   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   e_widget_focus_set(ed->entry, 1);
   e_editable_select_all(e_widget_entry_editable_object_get(ed->entry));
   return ed;
}
예제 #6
0
파일: e_mod_config.c 프로젝트: Limsik/e17
static Evas_Object *
_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas,
		       E_Config_Dialog_Data * cfdata)
{
  Evas_Object *o, *of, *ob;

  o = e_widget_list_add (evas, 0, 0);
  of = e_widget_framelist_add (evas, D_ ("Uptime Settings"), 0);

  ob = e_widget_label_add (evas, D_ ("Update Interval:"));
  e_widget_framelist_object_append (of, ob);

  ob = e_widget_slider_add (evas, 1, 0, D_ ("%1.0f seconds"), 1.0, 60.0,
			    1.0, 0, &(cfdata->update_interval), NULL, 100);
  e_widget_framelist_object_append (of, ob);

  ob = e_widget_label_add (evas, D_ ("Check Interval:"));
  e_widget_framelist_object_append (of, ob);

  ob = e_widget_slider_add (evas, 1, 0, D_ ("%1.0f seconds"), 1.0, 60.0,
			    1.0, 0, &(cfdata->check_interval), NULL, 100);
  e_widget_framelist_object_append (of, ob);

  e_widget_list_object_append (o, of, 1, 1, 0.5);

  return o;
}
예제 #7
0
/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
   return 1;
}

EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
   return 1;
}
*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
    Evas_Object *o, *of, *ob;
    E_Radio_Group *rg;

    if (e_config->focus_policy == E_FOCUS_CLICK) focus_mode = 0;

    o = e_widget_list_add(pg->evas, 1, 0);
    e_wizard_title_set(_("Please Wait As We Are Loading Enlightenment Settings!"));

    of = e_widget_framelist_add(pg->evas, _("Focus:"), 0);

    rg = e_widget_radio_group_new(&focus_mode);

    ob = e_widget_radio_add(pg->evas, _("Whenever a window is clicked"), 0, rg);
    e_widget_framelist_object_append(of, ob);
    evas_object_show(ob);
    ob = e_widget_radio_add(pg->evas, _("Whenever the mouse enters a window"), 1, rg);
    e_widget_framelist_object_append(of, ob);
    evas_object_show(ob);

    e_widget_list_object_append(o, of, 0, 0, 0.5);
    evas_object_show(of);

    e_wizard_page_show(o);
//   pg->data = o;
    return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
예제 #8
0
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
   Evas_Object *o, *of, *ob;
   Ecore_Evas *ee;

#ifndef HAVE_WAYLAND_ONLY
   Ecore_X_Window_Attributes att;

   if (!ecore_x_composite_query()) return 0;
   if (!ecore_x_damage_query()) return 0;

   memset((&att), 0, sizeof(Ecore_X_Window_Attributes));
   ecore_x_window_attributes_get(ecore_x_window_root_first_get(), &att);
   if ((att.depth <= 8)) return 0;

   gl_avail = ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11);
#endif

   o = e_widget_list_add(pg->evas, 1, 0);
   e_wizard_title_set(_("Compositing"));


   of = e_widget_framelist_add(pg->evas, _("Settings"), 0);
   if (gl_avail)
     {
        ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 320, 240);
        if (ee)
          {
             ecore_evas_free(ee);
             if (
               (match_xorg_log("*(II)*NVIDIA*: Creating default Display*")) ||
               (match_xorg_log("*(II)*intel*: Creating default Display*")) ||
               (match_xorg_log("*(II)*NOUVEAU*: Creating default Display*")) ||
               (match_xorg_log("*(II)*RADEON*: Creating default Display*"))
               )
               {
                  do_gl = 1;
                  do_vsync = 1;
               }
          }
        ob = e_widget_check_add(pg->evas, _("Hardware Accelerated (OpenGL)"), &(do_gl));
        e_widget_framelist_object_append(of, ob);

        ob = e_widget_check_add(pg->evas, _("Tear-free Rendering (OpenGL only)"), &(do_vsync));
        e_widget_framelist_object_append(of, ob);
     }
   ob = e_widget_check_add(pg->evas, _("Disable composite effects"), &(disable_effects));
   e_widget_framelist_object_append(of, ob);

   e_widget_list_object_append(o, of, 0, 0, 0.5);
   evas_object_show(of);
   e_wizard_page_show(o);

   return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
예제 #9
0
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) 
{
   Evas_Object *o;
   Evas_Object *of, *ob;

   o = e_widget_list_add(evas, 0, 1);

   of = e_widget_frametable_add(evas, D_("Avalaible Feeds"), 0);

   ob = e_widget_ilist_add(evas, 16, 16, NULL);
   e_widget_ilist_multi_select_set(ob, 1);
   cfdata->ilist_feeds = ob;
   news_config_dialog_item_content_refresh_feeds(cfdata->ni);
   e_widget_on_change_hook_set(ob, _cb_feed_change, cfdata);
   e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
   
   ob = e_widget_button_add(evas, D_("Add this Feed"), NULL, _cb_feed_add, cfdata, NULL);
   e_widget_disabled_set(ob, 1);
   cfdata->button_add = ob;
   e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 0);

   e_widget_list_object_append(o, of, 1, 1, 0.0);

   of = e_widget_frametable_add(evas, D_("Selected Feeds"), 0);

   ob = e_widget_ilist_add(evas, 16, 16, NULL);
   e_widget_ilist_multi_select_set(ob, 1);
   cfdata->ilist_selected_feeds = ob;
   news_config_dialog_item_content_refresh_selected_feeds(cfdata->ni);
   e_widget_on_change_hook_set(ob, _cb_selected_feed_change, cfdata);
   e_widget_frametable_object_append(of, ob, 0, 0, 1, 4, 1, 1, 1, 1);

   ob = e_widget_button_add(evas, "Move", "go-up", _cb_feed_up, cfdata, NULL);
   e_widget_disabled_set(ob, 1);
   cfdata->button_up = ob;
   e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 0, 0, 0, 0);
   ob = e_widget_button_add(evas, "Move", "go-down", _cb_feed_down, cfdata, NULL);
   e_widget_disabled_set(ob, 1);
   cfdata->button_down = ob;
   e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 0, 0, 0, 0);

   ob = e_widget_button_add(evas, D_("Remove this Feed"), NULL, _cb_feed_remove, cfdata, NULL);
   cfdata->button_rem = ob;
   e_widget_disabled_set(ob, 1);
   e_widget_frametable_object_append(of, ob, 0, 5, 1, 4, 1, 1, 1, 0);

   e_widget_list_object_append(o, of, 1, 1, 1.0);

   e_dialog_resizable_set(cfd->dia, 1);

   return o;
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) 
{
   Evas_Object *o;
   Evas_Object *of, *ob;
   E_Radio_Group *rg;
   
   o = e_widget_list_add(evas, 0, 0);

   of = e_widget_framelist_add(evas, D_("View Mode"), 0);

   rg = e_widget_radio_group_new(&(cfdata->view_mode));
   ob = e_widget_radio_add(evas, D_("Show one icon for all feeds"), NEWS_ITEM_VIEW_MODE_ONE, rg);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_radio_add(evas, D_("Show all feeds"), NEWS_ITEM_VIEW_MODE_FEED, rg);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_radio_add(evas, D_("Show unread feeds"), NEWS_ITEM_VIEW_MODE_FEED_UNREAD, rg);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_radio_add(evas, D_("Show all feeds marked as important"), NEWS_ITEM_VIEW_MODE_FEED_IMPORTANT, rg);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_radio_add(evas, D_("Show unread feeds marked as important"), NEWS_ITEM_VIEW_MODE_FEED_IMPORTANT_UNREAD, rg);
   e_widget_framelist_object_append(of, ob);

   e_widget_list_object_append(o, of, 1, 1, 0.0);

   of = e_widget_framelist_add(evas, D_("Feed open in"), 0);

   rg = e_widget_radio_group_new(&(cfdata->openmethod));
   ob = e_widget_radio_add(evas, D_("the feed viewer"), NEWS_ITEM_OPENMETHOD_VIEWER, rg);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_radio_add(evas, D_("my favorite browser"), NEWS_ITEM_OPENMETHOD_BROWSER, rg);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Browser opens home url"), &(cfdata->browser_open_home));
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_label_add(evas, D_("instead of feed url"));
   e_widget_framelist_object_append(of, ob);

   e_widget_list_object_append(o, of, 1, 1, 0.0);

   ob = e_widget_label_add(evas, "");
   e_widget_list_object_append(o, ob, 1, 1, 0.0);
   ob = e_widget_check_add(evas, D_("Apply this to all News gadgets"), &(cfdata->apply_to_all));
   e_widget_list_object_append(o, ob, 1, 1, 0.0);
   
   return o;
}
Evas_Object *
e_mod_config_schedule_new_v2(Evas_Object *otb, Evas *evas, E_Config_Dialog_Data *cfdata)
{
   Evas_Object *ot, *ol;
   Evas_Object *label;

   ol = e_widget_list_add(evas, 0, 0);
#define S cfdata->schedule
   S.oburgent = e_widget_check_add(evas, D_("Satisfy urgent windows instantly"),
                                                    &S.urgent);
   evas_object_smart_callback_add(S.oburgent, "changed", _e_mod_config_schedule_urgent_cb, cfdata);
   e_widget_list_object_append(ol, S.oburgent, 0, 0, 0.5);

   S.oblabel = e_widget_label_add(evas, NULL);
   _e_mod_config_schedule_label_update(&S); 
   e_widget_list_object_append(ol, S.oblabel, 0, 0, 0.5);

   label = e_widget_label_add(evas, D_("Break Time"));
   e_widget_list_object_append(ol, label, 1, 0, 0.5);

   S.obbreak = e_widget_slider_add(evas, 1, 0, D_("%1.0f Minutes"), 0.0, 20.0, 1.00, 0, &(S.break_min), NULL, 100);
   evas_object_smart_callback_add(S.obbreak, "changed", _e_mod_config_schedule_obbreak_time_cb, &S); 
   e_widget_list_object_append(ol, S.obbreak, 1, 0, 0.5);

   label = e_widget_label_add(evas, D_("Time to Work before Break"));
   e_widget_list_object_append(ol, label, 1, 0, 0.5);

   S.obwork = e_widget_slider_add(evas, 1, 0, D_("%1.0f Minutes"), 0.0, 90.0, 1.00, 0, &(S.work_min), NULL, 100);
   evas_object_smart_callback_add(S.obwork, "changed", _e_mod_config_schedule_obwork_time_cb, &S); 
   e_widget_list_object_append(ol, S.obwork, 1, 0, 0.5);

   ot = e_widget_table_add(evas, EINA_FALSE);

   S.obstart = e_widget_button_add(evas, D_("Start Working"), "list-add", _e_mod_config_schedule_start_working_cb, &S, cfdata);

   e_widget_table_object_append(ot, S.obstart, 0, 1, 1, 1, 1, 1, 1, 0);

   S.obstop = e_widget_button_add(evas, D_("Stop Working"), "list-remove", _e_mod_config_schedule_stop_working_cb, &S, cfdata);
   e_widget_table_object_append(ot, S.obstop, 1, 1, 1, 1, 1, 1, 1, 0);

   e_widget_list_object_append(ol, ot, 1, 1, 0.5);
   _e_mod_config_schedule_lock_update(&S);
#undef S
   e_widget_toolbook_page_append(otb, NULL, D_("Schedule"), ol, 1, 1, 1, 1, 0.5, 0.0);
   return otb;
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas,
                      E_Config_Dialog_Data *cfdata)
{
   Evas_Object *o, *of, *ob;
   E_Radio_Group *dg;
   char buf[4096];

   o = e_widget_list_add(evas, 0, 0);
   of = e_widget_framelist_add(evas, D_("Display Settings"), 0);
   ob = e_widget_label_add(evas, D_("Poll Time"));
   e_widget_framelist_object_append(of, ob);
   ob =
     e_widget_slider_add(evas, 1, 0, D_("%2.0f minutes"), 15.0, 60.0, 1.0, 0,
                         &(cfdata->poll_time), NULL, 40);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Show Description"), &(cfdata->show_text));
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Popup on mouse over"), &(cfdata->popup_on_hover));
   e_widget_framelist_object_append(of, ob);
   e_widget_list_object_append(o, of, 1, 1, 0.5);

   of = e_widget_framelist_add(evas, D_("Unit Settings"), 0);
   dg = e_widget_radio_group_new(&(cfdata->degrees));
   ob = e_widget_radio_add(evas, D_("Celsius"), DEGREES_C, dg);
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_radio_add(evas, D_("Fahrenheit"), DEGREES_F, dg);
   e_widget_framelist_object_append(of, ob);
   e_widget_list_object_append(o, of, 1, 1, 0.5);

   of = e_widget_frametable_add(evas, D_("Weather.com Forecasts Code"), 0);
   ob = e_widget_label_add(evas, D_("Forecasts Code/US Zip Code"));
   e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->code, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 100, 20);
   e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_label_add(evas, D_("To find the code for your area, go to:"));
   e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 0, 1, 0);
   snprintf(buf, sizeof(buf), D_("%s, find your area, and look at the URL"), "http://www.weather.com");
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 0, 2, 2, 1, 1, 0, 1, 0);
   e_widget_list_object_append(o, of, 1, 1, 0.5);

   return o;
}
예제 #13
0
파일: e_mod_config.c 프로젝트: Limsik/e17
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
   E_Radio_Group *rg;
   Evas_Object *o, *of, *ob;

   o = e_widget_list_add(evas, 0, 0);

   of = e_widget_framelist_add(evas, D_("General Settings"), 0);
   ob = e_widget_check_add(evas, D_("Good ol' IBox style (instead of taskbar style)"), &(cfdata->ibox_style));
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Iconify Window on Click if Window has Focus"), &(cfdata->iconify_focused));
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Do not show dialog windows in Itask"), &(cfdata->skip_dialogs));
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Do not show windows that are always below in Itask"), &(cfdata->skip_always_below_windows));
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Always group Windows from the same Class"), &(cfdata->always_group));
   e_widget_framelist_object_append(of, ob);
   ob = e_widget_check_add(evas, D_("Show Icon Label"), &(cfdata->show_label));
   e_widget_framelist_object_append(of, ob);

   e_widget_list_object_append(o, of, 1, 1, 0.5);

   of = e_widget_framelist_add(evas, D_("Zone"), 0);

   rg = e_widget_radio_group_new((int *)&(cfdata->desk_policy));

   ob = e_widget_radio_add(evas, D_("Show windows from current zone"), 0, rg);
   e_widget_framelist_object_append(of, ob);

   ob = e_widget_radio_add(evas, D_("Show windows from current desktop only"), 1, rg);
   e_widget_framelist_object_append(of, ob);

   e_widget_list_object_append(o, of, 1, 1, 0.5);

   return o;
}
static Evas_Object *
_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas,
		       E_Config_Dialog_Data * cfdata)
{
  Evas_Object *o, *of, *ob;
  E_Radio_Group *rg;

  o = e_widget_list_add (evas, 0, 0);
  of = e_widget_framelist_add (evas, D_ ("General Settings"), 0);
  rg = e_widget_radio_group_new (&(cfdata->always_text));
  ob = e_widget_radio_add (evas, D_ ("Always Show Text"), 1, rg);
  e_widget_framelist_object_append (of, ob);
  ob = e_widget_radio_add (evas, D_ ("Show Text On Mouse Over"), 0, rg);
  e_widget_framelist_object_append (of, ob);
  ob =
    e_widget_check_add (evas, D_ ("Show Text As Percent"),
			&(cfdata->show_percent));
  e_widget_framelist_object_append (of, ob);
#ifdef __linux__
  ob =
    e_widget_check_add (evas, D_ ("Ignore Buffers"),
			&(cfdata->real_ignore_buffers));
  e_widget_framelist_object_append (of, ob);
  ob =
    e_widget_check_add (evas, D_ ("Ignore Cached"),
			&(cfdata->real_ignore_cached));
  e_widget_framelist_object_append (of, ob);
#endif
  ob = e_widget_label_add (evas, D_ ("Check Interval:"));
  e_widget_framelist_object_append (of, ob);
  ob =
    e_widget_slider_add (evas, 1, 0, D_ ("%1.0f seconds"), 1.0, 60.0, 1.0, 0,
			 &(cfdata->poll_time), NULL, 150);
  e_widget_framelist_object_append (of, ob);
  e_widget_list_object_append (o, of, 1, 1, 0.5);

  return o;
}
예제 #15
0
static void
_alarm_snooze(Alarm *al)
{
   E_Dialog *dia;
   Evas_Object *o, *ob;
   Evas *evas;
   char buf[4096];
   int w, h;

   if (al->snooze.dia)
     return;

   dia = e_dialog_new(e_container_current_get(e_manager_current_get()), "Alarm", "_e_modules_alarm_snooze_dialog");
   if (!dia)
     return;
   evas = e_win_evas_get(dia->win);

   snprintf(buf, sizeof(buf), D_("Snooze %s"), al->name);
   e_dialog_title_set(dia, buf);
   
   o = e_widget_list_add(evas, 0, 0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f hours"), 0.0, 24.0, 1.0, 0,
                            NULL, &(al->snooze.hour), 100);
   e_widget_list_object_append(o, ob, 0, 0, 1.0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f minutes"), 0.0, 60.0, 1.0, 0,
                            NULL, &(al->snooze.minute), 100);
   e_widget_list_object_append(o, ob, 0, 0, 1.0);

   e_widget_size_min_get(o, &w, &h);
   e_dialog_content_set(dia, o, w, h);

   e_dialog_button_add(dia, D_("Ok"), NULL, _alarm_cb_dialog_snooze_ok, al);
   e_dialog_button_add(dia, D_("Close"), NULL, _alarm_cb_dialog_snooze_cancel, al);

   al->snooze.dia = dia;
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
}
예제 #16
0
파일: e_mod_config.c 프로젝트: Limsik/e17
static Evas_Object *
_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas,
		       E_Config_Dialog_Data * cfdata)
{
  Evas_Object *o, *of, *ob, *player_entry;
  
  o = e_widget_list_add (evas, 0, 0);

  of = e_widget_frametable_add (evas, D_ ("Configuration"), 1);

  ob = e_widget_label_add (evas, D_ ("Player:"));
  e_widget_frametable_object_append (of, ob, 0, 0, 1, 1, 1, 0, 1, 0);

  player_entry = e_widget_entry_add (evas, &cfdata->player, NULL, NULL, NULL);
  e_widget_frametable_object_append (of, player_entry, 0, 1, 1, 1, 1, 0, 1, 0);
  e_widget_size_min_set (player_entry, 150, 1);

  ob = e_widget_check_add(evas, D_("Show Popup:"), &(cfdata->show_popup));
  e_widget_frametable_object_append(of, ob, 0, 4, 1, 1, 1, 0, 1, 0);

  e_widget_list_object_append (o, of, 1, 1, 0.5);
  return o;
}
예제 #17
0
/*
 * Build the config dialog
 */
static Evas_Object *
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
   Evas_Object *list = NULL, *table = NULL, *subtable = NULL,
         *framelist = NULL, *widget = NULL, *toolbook = NULL;
   E_Radio_Group *rg;
   struct sysinfo meminfo;
   long long memSize;

   // Remove the update timer - has the effect of
   // aborting any current updates
   if (eplanet_conf->bg_set_timer) {
	   ecore_timer_del(eplanet_conf->bg_set_timer);
   }

   // Get total physical RAM for free mem slider
   // Limit to 1024Mb
   sysinfo(&meminfo);
   memSize = meminfo.totalram;
   memSize = memSize / 1024 / 1024;
   if (memSize > 1024)
      memSize = 1024;

   toolbook = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);

   /* Behaviour Tab */
   list = e_widget_list_add(evas, 0, 0);
   widget = e_widget_label_add(evas, D_("Update background every"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%2.0f minutes"), 1, 60, 1, 0,
         NULL, &(cfdata->delay), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas, D_("Delay first background change for"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%3.0f seconds"), 1, 120, 1, 0,
         NULL, &(cfdata->startDelay), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas,
         D_("Run XPlanet using priority"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%1.0f"), ecore_exe_run_priority_get(), 19, 1, 0,
         NULL, &(cfdata->taskPriority), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas,
         D_("Don't run if system load is greater than"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%3.1f"), 1, 32, 0.5, 0,
         &(cfdata->loadLimit), NULL, 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas,
         D_("Don't run if available RAM is less than"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%3.0f Mb"), 0, memSize, 16, 0, NULL,
         &(cfdata->minRamLimit), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

/*
   widget = e_widget_check_add(evas,
         D_("Do not change background if on battery power"),
         &(cfdata->disableOnBattery));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
*/

   // Add behaviour tab to dialog
   e_widget_toolbook_page_append(toolbook, NULL, D_("Behaviour"), list, 0, 0,
         0, 0, 0.5, 0.0);

   /* XPlanet Tab */
   table = e_widget_table_add(evas, 0);

   // Target
   framelist = e_widget_framelist_add(evas, D_("Target"), 0);

   widget = e_widget_ilist_add(evas, 16, 16, NULL);
   cfdata->gui.o_body_ilist = widget;
   e_widget_ilist_multi_select_set(widget, 0);
   e_widget_size_min_set(widget, 160, 150);

   e_widget_framelist_object_append(framelist, widget);
   e_widget_table_object_append(table, framelist, 0, 0, 1, 1, 1, 1, 0, 1);

   // View Type
   framelist = e_widget_framelist_add(evas, D_("View Type"), 0);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.source_type));
   widget = e_widget_radio_add(evas, D_("Origin"), SOURCE_ORIGIN, rg);
   cfdata->gui.o_origin_toggle = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_source_type, cfdata);
   e_widget_framelist_object_append(framelist, widget);

   widget = e_widget_radio_add(evas, D_("Projection"), SOURCE_PROJECTION, rg);
   cfdata->gui.o_projection_toggle = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_source_type, cfdata);
   e_widget_framelist_object_append(framelist, widget);

   widget = e_widget_ilist_add(evas, 16, 16, NULL);
   cfdata->gui.o_source_ilist = widget;
   e_widget_ilist_multi_select_set(widget, 0);
   e_widget_size_min_set(widget, 160, 150);
   e_widget_framelist_object_append(framelist, widget);

   e_widget_table_object_append(table, framelist, 1, 0, 1, 1, 1, 1, 0, 1);

   // Label
   framelist = e_widget_framelist_add(evas, D_("Label"), 0);
   subtable = e_widget_table_add(evas, 0);

   widget = e_widget_check_add(evas, D_("Show label"),
         &(cfdata->gui.show_label));
   evas_object_smart_callback_add(widget, "changed", _cb_show_label, cfdata);
   cfdata->gui.o_show_label = widget;
   e_widget_table_object_append(subtable, widget, 0, 0, 3, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Label text:"));
   e_widget_table_object_append(subtable, widget, 0, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_label_text = widget;
   e_widget_table_object_append(subtable, widget, 1, 1, 2, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Time:"));
   e_widget_table_object_append(subtable, widget, 0, 2, 1, 1, 1, 1, 0, 1);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.label_time));
   widget = e_widget_radio_add(evas, D_("Local"), LABEL_TIME_LOCAL, rg);
   cfdata->gui.o_label_time_local_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("GMT"), LABEL_TIME_GMT, rg);
   cfdata->gui.o_label_time_gmt_toggle = widget;
   e_widget_table_object_append(subtable, widget, 2, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Position:"));
   e_widget_table_object_append(subtable, widget, 0, 3, 1, 1, 1, 1, 0, 1);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.label_pos));
   widget = e_widget_radio_add(evas, D_("Top left"), LABEL_POS_TL, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_tl_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 3, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Top right"), LABEL_POS_TR, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_tr_toggle = widget;
   e_widget_table_object_append(subtable, widget, 2, 3, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Bottom left"), LABEL_POS_BL, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_bl_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 4, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Bottom right"), LABEL_POS_BR, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_br_toggle = widget;
   e_widget_table_object_append(subtable, widget, 2, 4, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Other"), LABEL_POS_OTHER, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_other_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 5, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_label_pos_other_text = widget;
   e_widget_table_object_append(subtable, widget, 2, 5, 2, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Font:"));
   e_widget_table_object_append(subtable, widget, 0, 6, 1, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Not yet implemented"));
   e_widget_table_object_append(subtable, widget, 1, 6, 2, 1, 1, 1, 0, 1);

   e_widget_framelist_object_append(framelist, subtable);

   e_widget_table_object_append(table, framelist, 2, 0, 1, 1, 1, 1, 1, 1);

   // Viewing Position
   framelist = e_widget_framelist_add(evas, D_("Viewing Position"), 0);
   subtable = e_widget_table_add(evas, 0);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.viewpos_type));

   widget = e_widget_radio_add(evas, D_("Random"), VIEWPOS_RANDOM, rg);
   cfdata->gui.o_viewpos_random = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_viewpos, cfdata);
   e_widget_table_object_append(subtable, widget, 0, 0, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Fixed"), VIEWPOS_LATLON, rg);
   cfdata->gui.o_viewpos_latlon = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_viewpos, cfdata);
   e_widget_table_object_append(subtable, widget, 0, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Latitude:"));
   cfdata->gui.o_viewpos_lat_label = widget;
   e_widget_table_object_append(subtable, widget, 1, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_viewpos_lat = widget;
   e_widget_table_object_append(subtable, widget, 2, 1, 1, 1, 1, 1, 1, 1);

   widget = e_widget_label_add(evas, D_("Longitude:"));
   cfdata->gui.o_viewpos_lon_label = widget;
   e_widget_table_object_append(subtable, widget, 3, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_viewpos_lon = widget;
   e_widget_table_object_append(subtable, widget, 4, 1, 1, 1, 1, 1, 1, 1);

   widget = e_widget_radio_add(evas, D_("From file"), VIEWPOS_FILE, rg);
   cfdata->gui.o_viewpos_file = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_viewpos, cfdata);
   e_widget_table_object_append(subtable, widget, 0, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_viewpos_file_val = widget;
   e_widget_table_object_append(subtable, widget, 1, 2, 4, 1, 1, 1, 0, 1);

   widget = e_widget_button_add(evas, D_("..."), NULL, _select_viewpos_file,
         cfd, cfdata);
   cfdata->gui.o_viewpos_file_button = widget;
   e_widget_table_object_append(subtable, widget, 5, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_check_add(evas, D_("Set local time:"),
         &(cfdata->local_xplanet.use_localtime));
   evas_object_smart_callback_add(widget, "changed", _cb_set_localtime, cfdata);
   cfdata->gui.o_use_localtime = widget;
   e_widget_table_object_append(subtable, widget, 0, 3, 2, 1, 1, 1, 0, 1);

   widget = e_widget_slider_add(evas, 1, 0, ("%02.0f:00"), 0, 23, 1, 0, NULL,
         &(cfdata->gui.localtime), NULL);
   cfdata->gui.o_localtime = widget;
   e_widget_table_object_append(subtable, widget, 2, 3, 3, 1, 1, 1, 0, 1);

   e_widget_framelist_object_append(framelist, subtable);

   e_widget_table_object_append(table, framelist, 0, 1, 2, 1, 1, 1, 0, 1);

   // Other settings
   framelist = e_widget_framelist_add(evas, D_("Other Settings"), 0);
   subtable = e_widget_table_add(evas, 0);

   widget = e_widget_check_add(evas, D_("Use config file:"),
         &(cfdata->gui.use_config));
   cfdata->gui.o_config_check = widget;
   e_widget_table_object_append(subtable, widget, 0, 0, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_config_name = widget;
   e_widget_table_object_append(subtable, widget, 1, 0, 1, 1, 1, 1, 1, 1);

   widget = e_widget_label_add(evas, D_("Other command line parameters:"));
   e_widget_table_object_append(subtable, widget, 0, 1, 2, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_extra_options = widget;
   e_widget_table_object_append(subtable, widget, 0, 2, 2, 1, 1, 1, 0, 1);

   e_widget_framelist_object_append(framelist, subtable);
   e_widget_table_object_append(table, framelist, 2, 1, 1, 1, 1, 1, 0, 1);

   // Preview button
//   widget = e_widget_button_add(evas, D_("Preview"), NULL, _show_preview,
//         cfd, cfdata);
//   e_widget_table_object_append(table, widget, 0, 2, 3, 1, 1, 1, 0, 1);

   e_widget_toolbook_page_append(toolbook, NULL, D_("XPlanet"), table, 0, 0, 0,
         0, 0.5, 0.0);
   e_widget_toolbook_page_show(toolbook, 0);

   _populate_xplanet_page(cfdata, 0);

   return toolbook;
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
   Evas_Object *o, *ob, *ol;
   Population *pop;

   pop = cfd->data;
   o = e_widget_list_add(evas, 0, 0);

   ob = e_widget_label_add(evas, D_("Number of penguins:"));
   e_widget_list_object_append(o, ob, 1, 1, 0.5);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f"), 1, 200, 1, 0, NULL, &(cfdata->penguins_count), 200);
   e_widget_list_object_append(o, ob, 1, 1, 0.5);

   ob = e_widget_label_add(evas, D_("Zoom factor:"));
   e_widget_list_object_append(o, ob, 1, 1, 0.5);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.1f X"), 0.2, 3, 0.2, 0, &(cfdata->zoom), NULL, 200);
   e_widget_list_object_append(o, ob, 1, 1, 0.5);

   ob = e_widget_label_add(evas, D_("Transparency:"));
   e_widget_list_object_append(o, ob, 1, 1, 0.5);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f"), 50, 255, 1, 0, NULL, &(cfdata->alpha), 200);
   e_widget_list_object_append(o, ob, 1, 1, 0.5);

   //Lista
   ob = e_widget_label_add(evas, D_("Select population:"));
   e_widget_list_object_append(o, ob, 1, 1, 0.5);
   ol = e_widget_ilist_add(evas, 24, 24, &(cfdata->theme));

   e_widget_ilist_clear(ol);

   Eina_List *l;
   int count;
   l = pop->themes;
   count = 0;
   while (l)
   {
      char *theme;
      char *name;
      Evas_Object *oi;
      theme = l->data;
      name = edje_file_data_get(theme, "PopulationName");
      if (name)
      {
         oi = edje_object_add(evas);
         edje_object_file_set(oi, theme, "icon");
         //printf("TEMA: %s (%s)\n", name, cfdata->theme);
         e_widget_ilist_append(ol, oi, name, NULL, theme, theme);
         if (strcmp(theme, cfdata->theme) == 0)
         {
            e_widget_ilist_selected_set(ol, count);
         }
         count++;
      }
      l = eina_list_next(l);
   }
   e_widget_ilist_go(ol);
   e_widget_size_min_set(ol, 155, 250);
   e_widget_list_object_append(o, ol, 1, 1, 0.5);

   return o;
}
예제 #19
0
static Evas_Object *
_basic_create_widgets(E_Config_Dialog      *cfd,
                      Evas                 *evas,
                      E_Config_Dialog_Data *cfdata)
{
   Evas_Object *o, *ob, *of, *osf, *ossf, *ot;
   E_Radio_Group *rg;
   E_Container *con = e_container_current_get(e_manager_current_get());
   E_Zone *zone;
   Eina_List *l;

   o = e_widget_list_add(evas, 0, 0);
   ot = e_widget_table_add(evas, 0);

   {  /* General settings */
      of = e_widget_framelist_add(evas, D_("General"), 0);
      FRAME_ADD(of, CHECK("Enable tiling", cfdata->tiling_enabled));
      FRAME_ADD(of, CHECK("Don't change window borders", cfdata->dont_touch_borders));
      FRAME_ADD(of, CHECK("Tile dialog windows aswell", cfdata->tile_dialogs));
      FRAME_ADD(of, CHECK("Set too big windows floating automatically", cfdata->float_too_big_windows));
      osf = e_widget_list_add(evas, 0, 0);
      ob = CHECK("Leave space between windows:", cfdata->space_between);
      e_widget_on_change_hook_set(ob, _cb_leave_space_change, cfdata);
      FRAME_ADD(of, ob);
      ossf = e_widget_list_add(evas, 0, 1);
      LIST_ADD(ossf, e_widget_label_add(evas, D_("Horizontal:")));
      LIST_ADD(ossf, e_widget_slider_add(evas, 1, 0, D_("%1.0f px"), 0.0, 50.0, 1.0, 0, NULL, &(cfdata->between_x), 200));
      LIST_ADD(osf, ossf);
      ossf = e_widget_list_add(evas, 0, 1);
      LIST_ADD(ossf, e_widget_label_add(evas, D_("Vertical:")));
      LIST_ADD(ossf, e_widget_slider_add(evas, 1, 0, D_("%1.0f px"), 0.0, 50.0, 1.0, 0, NULL, &(cfdata->between_y), 200));
      LIST_ADD(osf, ossf);
      cfdata->o_space_between = osf;
      recursively_set_disabled(osf, !cfdata->space_between);
      FRAME_ADD(of, osf);
      e_widget_table_object_append(ot, of, 0, 0, 1, 2, 1, 1, 1, 1);
   }

   {  /* Virtual desktop settings */
      of = e_widget_framelist_add(evas, D_("Virtual Desktops"), 0);
      rg = e_widget_radio_group_new(&(cfdata->tiling_mode));
      FRAME_ADD(of, RADIO("Don't tile by default", TILE_NONE, rg));
      FRAME_ADD(of, RADIO("Bigmain: Main window left, small windows right", TILE_BIGMAIN, rg));
      FRAME_ADD(of, RADIO("Grid: Distribute windows equally", TILE_GRID, rg));
      FRAME_ADD(of, RADIO("Individual modes:", TILE_INDIVIDUAL, rg));

      osf = e_widget_list_add(evas, 0, 1);

      {   /* Zone list */
         ILIST(100, 100);
         cfdata->o_zonelist = ob;
         e_widget_on_change_hook_set(ob, _cb_zone_change, cfdata);
         for (l = con->zones; l; l = l->next)
           {
              if (!(zone = l->data)) continue;
              e_widget_ilist_append(ob, NULL, zone->name, NULL, zone, NULL);
           }
         ILIST_GO(0);
         LIST_ADD(osf, ob);
      }

      {   /* List of individual tiling modes */
          /* Order is important here: Firstly create the list, then add it to the
           * scrollframe before any objects get added to the list */
           cfdata->o_desklist = e_widget_list_add(evas, 1, 0);
           cfdata->o_deskscroll = e_widget_scrollframe_simple_add(evas, cfdata->o_desklist);
           cfdata->evas = evas;

           _fill_zone_config(con->zones->data, cfdata);

           LIST_ADD(osf, cfdata->o_deskscroll);
      }
      FRAME_ADD(of, osf);
      e_widget_table_object_append(ot, of, 0, 2, 1, 1, 1, 1, 1, 1);
   }

   {  /* Grid mode settings */
      of = e_widget_framelist_add(evas, D_("Grid mode settings"), 0);
      rg = e_widget_radio_group_new(&(cfdata->grid_distribute_equally));
      FRAME_ADD(of, RADIO("Distribute space equally", 1, rg));
      FRAME_ADD(of, RADIO("Use this number of rows:", 0, rg));
      FRAME_ADD(of, e_widget_slider_add(evas, 1, 0, D_("%1.0f"), 1.0, 12.0, 1.0, 0, NULL, &(cfdata->grid_rows), 100));
      e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1);
   }

   {  /* Bigmain settings */
      of = e_widget_framelist_add(evas, D_("Bigmain settings"), 0);
      FRAME_ADD(of, e_widget_label_add(evas, D_("Big win takes percent of screen:")));
      FRAME_ADD(of, e_widget_slider_add(evas, 1, 0, D_("%.2f"), 0.1, 1.0, 0.01, 0, &(cfdata->big_perc), NULL, 100));
      e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
   }

   {  /* Tiling mode border style */
      osf = e_widget_list_add(evas, 0, 0);
      of = e_widget_framelist_add(evas, D_("Tiling border"), 0);
      ILIST(100, 75);
      e_widget_on_change_hook_set(ob, _cb_tiling_border_change, cfdata);
      int sel = -1, c = 0;
      for (l = e_theme_border_list(); l; l = l->next, c++)
        {
           e_widget_ilist_append(ob, NULL, l->data, NULL, NULL, NULL);
           if (cfdata->tiling_border && !strcmp(l->data, cfdata->tiling_border))
             sel = c;
        }
      ILIST_GO(sel);
      FRAME_ADD(of, ob);
      LIST_ADD(osf, of);

      of = e_widget_framelist_add(evas, D_("Floating border"), 0);
      ILIST(100, 75);
      e_widget_on_change_hook_set(ob, _cb_floating_border_change, cfdata);
      for (sel = -1, c = 0, l = e_theme_border_list(); l; l = l->next, c++)
        {
           e_widget_ilist_append(ob, NULL, l->data, NULL, NULL, NULL);
           if (cfdata->floating_border && !strcmp(l->data, cfdata->floating_border))
             sel = c;
        }
      ILIST_GO(sel);
      FRAME_ADD(of, ob);
      LIST_ADD(osf, of);
   }
   e_widget_table_object_append(ot, osf, 1, 2, 1, 1, 1, 1, 1, 1);
   LIST_ADD(o, ot);

   return o;
}
예제 #20
0
static Evas_Object *
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
   Evas_Object *o = NULL, *of = NULL, *ow = NULL;

   o = e_widget_list_add(evas, 0, 0);

   //General frame
   of = e_widget_framelist_add(evas, D_("General"), 0);
   e_widget_framelist_content_align_set(of, 0.0, 0.0);

   ow = e_widget_check_add(evas, D_("Show in main menu"),
                           &(cfdata->show_menu));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Hide the gadget header"),
                           &(cfdata->hide_header));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Mount volumes on insert"),
                           &(cfdata->auto_mount));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Open filemanager on insert"),
                           &(cfdata->auto_open));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Use a custom file manager"), &(cfdata->fm_chk));
   e_widget_check_checked_set(ow, strlen(cfdata->fm) > 0 ? 1 : 0);
   e_widget_on_change_hook_set(ow, _custom_fm_click, cfdata);
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_entry_add(evas, &(cfdata->fm), NULL, NULL, NULL);
   e_widget_disabled_set(ow, strlen(cfdata->fm) > 0 ? 0 : 1);
   cfdata->entry = ow;
   e_widget_framelist_object_append(of, ow);

   e_widget_list_object_append(o, of, 1, 1, 0.5);

   //Display frame
   of = e_widget_framelist_add(evas, D_("Show in menu"), 0);
   e_widget_framelist_content_align_set(of, 0.0, 0.0);

   ow = e_widget_check_add(evas, D_("Home"), &(cfdata->show_home));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Desktop"), &(cfdata->show_desk));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Trash"), &(cfdata->show_trash));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Filesystem"), &(cfdata->show_root));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Temp"), &(cfdata->show_temp));
   e_widget_framelist_object_append(of, ow);

   ow = e_widget_check_add(evas, D_("Favorites"), &(cfdata->show_bookm));
   e_widget_framelist_object_append(of, ow);

   e_widget_list_object_append(o, of, 1, 1, 0.5);

   return o;
}
예제 #21
0
static void
_forecasts_popup_content_create(Instance *inst)
{
   Evas_Object *o, *ol, *of, *ob, *oi;
   Evas *evas;
   char buf[4096];
   int row = 0, i;
   Evas_Coord w, h, mw, mh;

   if (!inst->location) return;

   inst->popup = e_gadcon_popup_new(inst->gcc);

   evas = inst->popup->win->evas;
   o = e_widget_list_add(evas, 0, 0);
   snprintf(buf, sizeof(buf), D_("%s: Current Conditions"), inst->location);
   of = e_widget_frametable_add(evas, buf, 0);

   snprintf(buf, sizeof(buf), "%s: %d°%c", inst->condition.desc, inst->condition.temp, inst->units.temp);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 0, row, 2, 1, 0, 1, 1, 0);

   oi = _forecasts_popup_icon_create(inst->popup->win->evas, inst->condition.code);
   edje_object_size_max_get(oi, &w, &h);
   DEBUG("Icon size %dx%d", w, h);
   if (w > 160) w = 160;  /* For now there is a limit to how big the icon should be */
   if (h > 160) h = 160;  /* In the future, the icon should be set from the theme, not part of the table */
   ob = e_widget_image_add_from_object(evas, oi, w, h);
   e_widget_frametable_object_append(of, ob, 2, row, 1, 2, 1, 0, 1, 1);

   ob = e_widget_label_add(evas, D_("Wind Chill"));
   e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 0, 0);
   snprintf(buf, sizeof(buf), "%d°%c", inst->details.wind.chill, inst->units.temp);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 0, 0);

   ob = e_widget_label_add(evas, D_("Wind Speed"));
   e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 0, 0);
   snprintf(buf, sizeof(buf), "%d %s", inst->details.wind.speed, inst->units.speed);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 0, 0);

   ob = e_widget_label_add(evas, D_("Humidity"));
   e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 0, 0);
   snprintf(buf, sizeof(buf), "%d %%", inst->details.atmosphere.humidity);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 0, 0);

   ob = e_widget_label_add(evas, D_("Visibility"));
   e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 0, 0);
   snprintf(buf, sizeof(buf), "%.2f %s", inst->details.atmosphere.visibility, inst->units.distance);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 0, 0);

   ob = e_widget_label_add(evas, D_("Pressure"));
   e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 0, 0);
   snprintf(buf, sizeof(buf), "%.2f %s", inst->details.atmosphere.pressure, inst->units.pressure);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 0, 0);

   if (inst->details.atmosphere.rising == 1)
     snprintf(buf, sizeof(buf), D_("Rising"));
   else if (inst->details.atmosphere.rising == 2)
     snprintf(buf, sizeof(buf), D_("Falling"));
   else
     snprintf(buf, sizeof(buf), D_("Steady"));
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 2, row, 1, 1, 1, 0, 1, 0);

   ob = e_widget_label_add(evas, D_("Sunrise / Sunset"));
   e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 0, 0);
   snprintf(buf, sizeof(buf), "%s", inst->details.astronomy.sunrise);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 1, 0);

   snprintf(buf, sizeof(buf), "%s", inst->details.astronomy.sunset);
   ob = e_widget_label_add(evas, buf);
   e_widget_frametable_object_append(of, ob, 2, row, 1, 1, 1, 0, 1, 0);

   e_widget_list_object_append(o, of, 1, 1, 0.5);
   ol = e_widget_list_add(evas, 1, 1);

   for (i = 0; i < inst->ci->days / 5; i++)
     {
        int row = 0;

        if (!i)
          snprintf(buf, sizeof(buf), D_("Today"));
        else if (i == 1)
          snprintf(buf, sizeof(buf), D_("Tomorrow"));
        else
          snprintf(buf, sizeof(buf), "%s", inst->forecast[i].date);
        of = e_widget_frametable_add(evas, buf, 0);

        ob = e_widget_label_add(evas, inst->forecast[i].desc);
        e_widget_frametable_object_append(of, ob, 0, row, 3, 1, 0, 1, 1, 1);

        ob = e_widget_label_add(evas, D_("High"));
        e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 1, 0);
        snprintf(buf, sizeof(buf), "%d°%c", inst->forecast[i].high, inst->units.temp);
        ob = e_widget_label_add(evas, buf);
        e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 1, 0);

        ob = e_widget_image_add_from_object(evas,
                                            _forecasts_popup_icon_create(inst->popup->win->evas,
                                                                         inst->forecast[i].code), 0, 0);
        e_widget_frametable_object_append(of, ob, 2, row, 1, 2, 1, 1, 0, 0);

        ob = e_widget_label_add(evas, D_("Low"));
        e_widget_frametable_object_append(of, ob, 0, ++row, 1, 1, 1, 0, 1, 0);
        snprintf(buf, sizeof(buf), "%d°%c", inst->forecast[i].low, inst->units.temp);
        ob = e_widget_label_add(evas, buf);
        e_widget_frametable_object_append(of, ob, 1, row, 1, 1, 1, 0, 1, 0);
        e_widget_list_object_append(ol, of, 1, 1, 0.5);
     }

   e_widget_list_object_append(o, ol, 1, 1, 0.5);
   e_widget_size_min_get(o, &mw, &mh);
   if ((double)mw / mh > GOLDEN_RATIO)
     mh = mw / GOLDEN_RATIO;
   else if ((double)mw / mh < GOLDEN_RATIO - (double)1)
     mw = mh * (GOLDEN_RATIO - (double)1);
   e_widget_size_min_set(o, mw, mh);

   e_gadcon_popup_content_set(inst->popup, o);
}
예제 #22
0
/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
   return 1;
}

EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
   return 1;
}
*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
    Evas_Object *o, *of, *ob;
    Ecore_Evas *ee;
    Ecore_X_Window_Attributes att;

    if (!ecore_x_composite_query()) return 0;
    if (!ecore_x_damage_query()) return 0;

    memset((&att), 0, sizeof(Ecore_X_Window_Attributes));
    ecore_x_window_attributes_get(ecore_x_window_root_first_get(), &att);
    if ((att.depth <= 8)) return 0;

    ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 320, 240);
    if (ee)
    {
        ecore_evas_free(ee);
        if (
            (match_xorg_log("*(II)*NVIDIA*: Creating default Display*")) ||
            (match_xorg_log("*(II)*intel*: Creating default Display*")) ||
            (match_xorg_log("*(II)*NOUVEAU*: Creating default Display*")) ||
            (match_xorg_log("*(II)*RADEON*: Creating default Display*"))
        )
        {
            do_gl = 1;
            do_vsync = 1;
        }
    }

    o = e_widget_list_add(pg->evas, 1, 0);
    e_wizard_title_set(_("Compositing"));

    of = e_widget_framelist_add(pg->evas, _("Transparent windows and effects"), 0);

    ob = e_widget_textblock_add(pg->evas);
    e_widget_size_min_set(ob, 260 * e_scale, 200 * e_scale);
    e_widget_textblock_markup_set
    (ob,
     _("Compositing provides translucency<br>"
       "for windows, window effects like<br>"
       "fading in and out and zooming<br>"
       "when they appear and dissapear.<br>"
       "It is highly recommended to<br>"
       "enable this for a better<br>"
       "experience, but it comes at a<br>"
       "cost. It requires extra CPU<br>"
       "or a GLSL Shader capable GPU<br>"
       "with well written drivers.<br>"
       "It also will add between 10 to<br>"
       "100 MB to the memory needed<br>"
       "for Enlightenment."
      )
    );
    e_widget_framelist_object_append(of, ob);

    ob = e_widget_check_add(pg->evas, _("Enable Compositing"), &(do_comp));
    e_widget_framelist_object_append(of, ob);

    if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11))
    {
        ob = e_widget_check_add(pg->evas, _("Hardware Accelerated (OpenGL)"), &(do_gl));
        e_widget_framelist_object_append(of, ob);

        ob = e_widget_check_add(pg->evas, _("Tear-free Rendering (OpenGL only)"), &(do_vsync));
        e_widget_framelist_object_append(of, ob);
    }

    e_widget_list_object_append(o, of, 0, 0, 0.5);

    evas_object_show(of);

    e_wizard_page_show(o);
//   pg->data = o;
    return 1; /* 1 == show ui, and wait for user, 0 == just continue */
}
예제 #23
0
static Evas_Object *
_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) 
{
   Evas_Object *o, *o2, *of, *of2, *ob;
   E_Radio_Group *rg;

   o = e_widget_table_add(evas, 0);

   o2 = e_widget_list_add(evas, 0, 0);

   of = e_widget_frametable_add(evas, D_("Feeds"), 0);

   ob = e_widget_label_add(evas, D_("Timer"));
   e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f min"),
			    (float)NEWS_FEED_TIMER_MIN, (float)NEWS_FEED_TIMER_MAX,
			    1.0, 0, NULL, &(cfdata->feed.timer_m), 70);
   e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 0);
   ob = e_widget_check_add(evas, D_("Sort lists by name (disable Move action)"), &(cfdata->feed.sort_name));
   e_widget_frametable_object_append(of, ob, 0, 1, 2, 1, 1, 1, 1, 0);

   e_widget_list_object_append(o2, of, 1, 1, 0.5);

   of = e_widget_framelist_add(evas, D_("Browser"), 0);

   ob = e_widget_label_add(evas, D_("Uses xdg-open script, from freedesktop.org"));
   e_widget_framelist_object_append(of, ob);

   e_widget_list_object_append(o2, of, 1, 1, 0.5);

   of = e_widget_frametable_add(evas, D_("Popup On News"), 0);

   rg = e_widget_radio_group_new(&(cfdata->popup_news.active));
   ob = e_widget_radio_add(evas, D_("Never"),
			   NEWS_FEED_POPUP_NEWS_ACTIVE_NO, rg);
   //TODO: NOT IMPLEMENTED YET
   e_widget_radio_toggle_set(ob, 0);
   e_widget_disabled_set(ob, 1);
   e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 0);
   ob = e_widget_radio_add(evas, D_("Only on urgent feeds"),
			   NEWS_FEED_POPUP_NEWS_ACTIVE_URGENT, rg);
   //TODO: NOT IMPLEMENTED YET
   e_widget_radio_toggle_set(ob, 0);
   e_widget_disabled_set(ob, 1);
   e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 0);
   ob = e_widget_radio_add(evas, D_("On all feeds"),
			   NEWS_FEED_POPUP_NEWS_ACTIVE_ALL, rg);
   //TODO: NOT IMPLEMENTED YET
   e_widget_radio_toggle_set(ob, 0);
   e_widget_disabled_set(ob, 1);
   e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 0);

   ob = e_widget_label_add(evas, D_("Timer"));
   e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f s"),
			    (float)NEWS_POPUP_TIMER_S_MIN,
			    (float)NEWS_POPUP_TIMER_S_MAX,
			    1.0, 0, NULL, &(cfdata->popup_news.timer_s), 70);
   e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 0);

   e_widget_list_object_append(o2, of, 1, 1, 0.5);

   of = e_widget_frametable_add(evas, D_("Popup On Warning / Error"), 0);

   //TODO: NOT IMPLEMENTED YET
   news->config->popup_other.on_timeout = 0;
   cfdata->popup_other.on_timeout = 0;
   ob = e_widget_check_add(evas, D_("Show on timeout ?"), &(cfdata->popup_other.on_timeout));
   //TODO: NOT IMPLEMENTED YET
   e_widget_disabled_set(ob, 1);
   e_widget_frametable_object_append(of, ob, 0, 0, 2, 1, 1, 0, 1, 0);

   ob = e_widget_label_add(evas, D_("Timer"));
   e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f s"),
			    (float)NEWS_POPUP_TIMER_S_MIN,
			    (float)NEWS_POPUP_TIMER_S_MAX,
			    1.0, 0, NULL, &(cfdata->popup_other.timer_s), 70);
   e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 0);

   e_widget_list_object_append(o2, of, 1, 1, 0.5);

   e_widget_table_object_append(o, o2, 0, 0, 1, 1, 1, 1, 1, 1);


   o2 = e_widget_list_add(evas, 0, 0);

   of = e_widget_frametable_add(evas, D_("News Viewer"), 0);

   ob = e_widget_check_add(evas, D_("Unread feeds first"), &(cfdata->viewer.vfeeds.unread_first));
   e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_check_add(evas, D_("Unread articles first"), &(cfdata->viewer.varticles.unread_first));
   e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_check_add(evas, D_("Sort articles by date"), &(cfdata->viewer.varticles.sort_date));
   e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 0, 1, 0);

   of2 = e_widget_frametable_add(evas, D_("Font"), 0);

   ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f"), NEWS_VIEWER_VCONTENT_FONT_SIZE_MIN, NEWS_VIEWER_VCONTENT_FONT_SIZE_MAX, 1.0, 0, NULL, &(cfdata->viewer.vcontent.font_size), 70);
   e_widget_frametable_object_append(of2, ob, 0, 0, 1, 1, 1, 0, 1, 0);

   ob = e_widget_color_well_add(evas, cfdata->viewer.vcontent.font_color, 1);
   cfdata->color_viewer_font = ob;
   e_widget_on_change_hook_set(ob, _cb_color_viewer_font_change, cfdata);
   e_widget_frametable_object_append(of2, ob, 0, 1, 1, 1, 1, 0, 1, 0);

   ob = e_widget_check_add(evas, D_("Font Shadow"), &cfdata->viewer.vcontent.font_shadow);
   e_widget_frametable_object_append(of2, ob, 1, 0, 1, 1, 1, 0, 1, 0);

   ob = e_widget_color_well_add(evas, cfdata->viewer.vcontent.font_shadow_color, 1);
   cfdata->color_viewer_font_shadow = ob;
   e_widget_on_change_hook_set(ob, _cb_color_viewer_font_shadow_change, cfdata);
   e_widget_frametable_object_append(of2, ob, 1, 1, 1, 1, 1, 0, 1, 0);

   e_widget_frametable_object_append(of, of2, 0, 2, 2, 1, 1, 0, 1, 0);

   e_widget_list_object_append(o2, of, 1, 1, 0.0);

   of = e_widget_frametable_add(evas, D_("Proxy"), 0);

   ob = e_widget_check_add(evas, D_("Enable"), &(cfdata->proxy.enable));
   e_widget_frametable_object_append(of, ob, 0, 0, 2, 1, 1, 0, 0, 0);
   ob = e_widget_label_add(evas, D_("Host"));
   e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 0, 0, 0);
   ob = e_widget_entry_add(evas, &(cfdata->proxy.host), NULL, NULL, NULL);
   e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 0, 1, 0);
   ob = e_widget_label_add(evas, D_("Port"));
   e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 0, 0, 0);
   ob = e_widget_entry_add(evas, &(cfdata->proxy.port), NULL, NULL, NULL);
   e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 0, 1, 0);

   e_widget_list_object_append(o2, of, 1, 1, 1.0);

   e_widget_table_object_append(o, o2, 1, 0, 1, 1, 1, 1, 1, 1);

   return o;
}
예제 #24
0
E_Win *
e_int_config_theme_import(E_Config_Dialog *parent)
{
   Evas *evas;
   E_Win *win;
   Evas_Object *o, *ofm;
   Import *import;
   E_Config_Dialog_Data *cfdata;
   Evas_Modifier_Mask mask;
   Evas_Coord w, h;
   Eina_Bool kg;

   import = E_NEW(Import, 1);
   if (!import) return NULL;

   win = e_win_new(parent->con);
   if (!win)
     {
        E_FREE(import);
        return NULL;
     }

   evas = e_win_evas_get(win);

   cfdata = E_NEW(E_Config_Dialog_Data, 1);
   import->cfdata = cfdata;
   import->win = win;
   import->parent = parent;

   e_win_title_set(win, _("Select a Theme..."));
   e_win_delete_callback_set(win, _theme_import_cb_delete);
   e_win_resize_callback_set(win, _theme_import_cb_resize);
   e_win_dialog_set(win, 1);
   e_win_name_class_set(win, "E", "_theme_import_dialog");

   o = edje_object_add(evas);
   import->bg_obj = o;
   e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/main");
   evas_object_move(o, 0, 0);
   evas_object_show(o);

   o = e_widget_list_add(evas, 1, 1);
   e_widget_on_focus_hook_set(o, _theme_import_cb_wid_focus, import);
   import->box_obj = o;
   edje_object_part_swallow(import->bg_obj, "e.swallow.buttons", o);

   o = evas_object_rectangle_add(evas);
   import->event_obj = o;
   mask = 0;
   kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
   if (!kg)
     fprintf(stderr, "ERROR: Unable to redirect \"Tab\" key events to object %p.\n", o);
   mask = evas_key_modifier_mask_get(evas, "Shift");
   kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
   if (!kg)
     fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
   mask = 0;
   kg = evas_object_key_grab(o, "Return", mask, ~mask, 0);
   if (!kg)
     fprintf(stderr, "ERROR: unable to redirect \"Return\" key events to object %p.\n", o);
   mask = 0;
   kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
   if (!kg)
     fprintf(stderr, "ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
   evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
                                  _theme_import_cb_key_down, import);

   o = e_widget_list_add(evas, 0, 0);
   import->content_obj = o;

   ofm = e_widget_fsel_add(evas, e_user_homedir_get(), "/",
                           NULL, NULL,
                           _theme_import_cb_selected, import,
                           _theme_import_cb_changed, import, 1);
   import->fsel_obj = ofm;
   e_widget_list_object_append(o, ofm, 1, 1, 0.5);

   e_widget_size_min_get(o, &w, &h);
   evas_object_size_hint_min_set(o, w, h);
   edje_object_part_swallow(import->bg_obj, "e.swallow.content", o);
   evas_object_show(o);

   import->ok_obj = e_widget_button_add(evas, _("OK"), NULL,
                                        _theme_import_cb_ok, win, cfdata);
   e_widget_list_object_append(import->box_obj, import->ok_obj, 1, 0, 0.5);

   import->cancel_obj = e_widget_button_add(evas, _("Cancel"), NULL,
                                            _theme_import_cb_close,
                                            win, cfdata);
   e_widget_list_object_append(import->box_obj, import->cancel_obj, 1, 0, 0.5);

   e_widget_disabled_set(import->ok_obj, 1);

   e_win_centered_set(win, 1);

   o = import->box_obj;
   e_widget_size_min_get(o, &w, &h);
   evas_object_size_hint_min_set(o, w, h);
   edje_object_part_swallow(import->bg_obj, "e.swallow.buttons", o);

   edje_object_size_min_calc(import->bg_obj, &w, &h);
   evas_object_resize(import->bg_obj, w, h);
   e_win_resize(win, w, h);
   e_win_size_min_set(win, w, h);
   e_win_size_max_set(win, 99999, 99999);
   e_win_show(win);
   e_win_border_icon_set(win, "preferences-desktop-theme");

   win->data = import;

   return win;
}