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;
}
예제 #2
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;
}
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;
}
예제 #4
0
/* Private Functions */
static void 
_e_toolbar_smart_add(Evas_Object *obj) 
{
   Evas *evas;
   E_Toolbar_Smart_Data *sd;
   Evas_Object *o;
   char buf[4096];
   
   if ((!obj) || !(evas = evas_object_evas_get(obj))) return;
   
   sd = malloc(sizeof(E_Toolbar_Smart_Data));
   if (!sd) return;
   sd->valign = 0.0;
   sd->path = NULL;
   
   evas_object_smart_data_set(obj, sd);

   snprintf(buf, sizeof(buf), "%s/fileman.edj", e_module_dir_get(conf_module));
   
   o = edje_object_add(evas);
   sd->o_base = o;
   if (!e_theme_edje_object_set(o, "base/theme/modules/fileman", 
				"modules/fileman/toolbar"))
     edje_object_file_set(o, buf, "modules/fileman/toolbar");
   evas_object_smart_member_add(o, obj);
   edje_object_size_min_calc(o, &sd->w, &sd->h);

   o = e_widget_button_add(evas, _("Up"), "widget/up_dir", 
			   _e_toolbar_btn_cb, obj, NULL);
   sd->o_btn = o;
   edje_object_part_swallow(sd->o_base, "e.swallow.button", o);
   evas_object_show(o);
   
   edje_object_part_text_set(sd->o_base, "e.text.location", _("Location:"));

   o = e_widget_entry_add(evas, &(sd->path), NULL, NULL, NULL);
   sd->o_entry = o;
   edje_object_part_swallow(sd->o_base, "e.swallow.entry", o);
   evas_object_show(o);
   
   evas_object_smart_callback_add(sd->o_entry, "key_down", 
				  _e_toolbar_key_down_cb, obj);
}
예제 #5
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;
}
예제 #6
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;
}
예제 #7
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;
}
예제 #8
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;
}
예제 #9
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, *ob, *otb;
   E_Radio_Group *rg;

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


   o = e_widget_table_add(evas, 0);

   ob = e_widget_label_add(evas, D_("Command"));
   e_widget_table_object_append(o, ob, 0, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->status_cmd, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 150, 1);
   e_widget_table_object_append(o, ob, 1, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_label_add(evas, D_("(Example: ping -c 5 127.0.0.1)"));
   e_widget_table_object_append(o, ob, 1, 1, 2, 1, 1, 0, 1, 0);

   ob = e_widget_label_add(evas, D_("Poll Time"));
   e_widget_table_object_append(o, ob, 0, 2, 2, 1, 1, 0, 1, 0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%2.0f hours"), 0.0, 24.0, 1.0, 0,
			  &(cfdata->poll_time_hours), NULL, 40);
   e_widget_table_object_append(o, ob, 1, 2, 2, 1, 1, 0, 1, 0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%2.0f mins"), 0.0, 59.0, 1.0, 0,
			  &(cfdata->poll_time_mins), NULL, 40);
   e_widget_table_object_append(o, ob, 1, 3, 2, 1, 1, 0, 1, 0);
   ob = e_widget_slider_add(evas, 1, 0, D_("%2.0f secs"), 0.0, 59.0, 1.0, 0,
			  &(cfdata->poll_time_secs), NULL, 40);
   e_widget_table_object_append(o, ob, 1, 4, 2, 1, 1, 0, 1, 0);

   ob = e_widget_label_add(evas, D_("Doubleclick Command"));
   e_widget_table_object_append(o, ob, 0, 5, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->dblclk_cmd, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 150, 1);
   e_widget_table_object_append(o, ob, 1, 5, 1, 1, 1, 0, 1, 0);
   ob = e_widget_check_add(evas, D_("Refresh after Execution"), &(cfdata->refresh_after_dblclk_cmd));
   e_widget_table_object_append(o, ob, 1, 6, 1, 1, 1, 0, 1, 0);

   e_widget_toolbook_page_append(otb, NULL, D_("Command"), o, 1, 0, 1, 0, 0.5, 0.0);


   o = e_widget_table_add(evas, 0);

   ob = e_widget_label_add(evas, D_("Title"));
   e_widget_table_object_append(o, ob, 0, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->display_name, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 150, 1);
   e_widget_table_object_append(o, ob, 1, 0, 1, 1, 1, 0, 1, 0);

   ob = e_widget_label_add(evas, D_("Mode"));
   e_widget_table_object_append(o, ob, 0, 1, 1, 1, 1, 0, 1, 0);
   rg = e_widget_radio_group_new (&(cfdata->display_mode));
   ob = e_widget_radio_add (evas, D_("Evaluate Command Result"), 0, rg);
   e_widget_table_object_append(o, ob, 1, 1, 1, 1, 1, 0, 1, 0);
   ob = e_widget_radio_add (evas, D_("Show Command Output"), 1, rg);
   e_widget_table_object_append(o, ob, 1, 2, 1, 1, 1, 0, 1, 0);

   ob = e_widget_label_add(evas, D_("Custom Icon"));
   e_widget_table_object_append(o, ob, 0, 3, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->icon_path, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 150, 1);
   e_widget_table_object_append(o, ob, 1, 3, 1, 1, 1, 0, 1, 0);

   e_widget_toolbook_page_append(otb, NULL, D_("Display"), o, 1, 0, 1, 0, 0.5, 0.0);


   o = e_widget_table_add(evas, 0);

   rg = e_widget_radio_group_new (&(cfdata->okstate_mode));
   ob = e_widget_radio_add (evas, D_("Expected Exitcode"), 0, rg);
   e_widget_table_object_append(o, ob, 0, 0, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->okstate_exitcode, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 150, 1);
   e_widget_table_object_append(o, ob, 1, 0, 1, 1, 1, 0, 1, 0);

   ob = e_widget_radio_add (evas, D_("Expected String"), 1, rg);
   e_widget_table_object_append(o, ob, 0, 1, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->okstate_string, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 150, 1);
   e_widget_table_object_append(o, ob, 1, 1, 1, 1, 1, 0, 1, 0);

   ob = e_widget_radio_add (evas, D_("Expected Lines"), 2, rg);
   e_widget_table_object_append(o, ob, 0, 2, 1, 1, 1, 0, 1, 0);
   ob = e_widget_entry_add(evas, &cfdata->okstate_lines, NULL, NULL, NULL);
   e_widget_size_min_set(ob, 150, 1);
   e_widget_table_object_append(o, ob, 1, 2, 1, 1, 1, 0, 1, 0);

   e_widget_toolbook_page_append(otb, NULL, D_("Evaluation"), o, 1, 0, 1, 0, 0.5, 0.0);


   e_widget_toolbook_page_show(otb, 0);
   return otb;
}