Enlightenment CVS committal
Author : jethomas
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_filepicker.c
Log Message:
Align the bottom widgets of the filepicker a bit better.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filepicker.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- ewl_filepicker.c 5 Aug 2008 21:04:14 -0000 1.55
+++ ewl_filepicker.c 12 Aug 2008 03:35:13 -0000 1.56
@@ -13,6 +13,7 @@
#include "ewl_toolbar.h"
#include "ewl_icon_theme.h"
#include "ewl_scrollpane.h"
+#include "ewl_grid.h"
#include "ewl_macros.h"
#include "ewl_private.h"
#include "ewl_debug.h"
@@ -100,7 +101,7 @@
int
ewl_filepicker_init(Ewl_Filepicker *fp)
{
- Ewl_Widget *o, *box;
+ Ewl_Widget *o, *box, *grid;
const char *path;
DENTER_FUNCTION(DLEVEL_STABLE);
@@ -188,18 +189,18 @@
fp);
ewl_widget_show(fp->file_list);
- o = ewl_hbox_new();
- ewl_container_child_append(EWL_CONTAINER(fp), o);
- ewl_widget_show(o);
-
- box = ewl_vbox_new();
- ewl_container_child_append(EWL_CONTAINER(o), box);
- ewl_object_fill_policy_set(EWL_OBJECT(o),
+ grid = ewl_grid_new();
+ ewl_container_child_append(EWL_CONTAINER(fp), grid);
+ ewl_grid_dimensions_set(EWL_GRID(grid), 2, 2);
+ ewl_grid_column_preferred_w_use(EWL_GRID(grid), 1);
+ ewl_object_fill_policy_set(EWL_OBJECT(grid),
EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE);
- ewl_widget_show(box);
+ ewl_widget_show(grid);
fp->file_entry = ewl_entry_new();
- ewl_container_child_append(EWL_CONTAINER(box), fp->file_entry);
+ ewl_container_child_append(EWL_CONTAINER(grid), fp->file_entry);
+ ewl_grid_child_position_set(EWL_GRID(grid), fp->file_entry, 0, 0, 0,
0);
+ ewl_grid_hhomogeneous_set(EWL_GRID(grid), FALSE);
ewl_widget_show(fp->file_entry);
fp->filters = ecore_list_new();
@@ -217,37 +218,32 @@
ewl_filepicker_cb_type_header);
fp->mvc_filters.combo = ewl_combo_new();
- ewl_mvc_model_set(EWL_MVC(fp->mvc_filters.combo),
- fp->mvc_filters.model);
- ewl_mvc_view_set(EWL_MVC(fp->mvc_filters.combo),
- fp->mvc_filters.view);
+ ewl_mvc_model_set(EWL_MVC(fp->mvc_filters.combo),
fp->mvc_filters.model);
+ ewl_mvc_view_set(EWL_MVC(fp->mvc_filters.combo), fp->mvc_filters.view);
ewl_mvc_data_set(EWL_MVC(fp->mvc_filters.combo), fp);
ewl_combo_editable_set(EWL_COMBO(fp->mvc_filters.combo), TRUE);
- ewl_callback_append(fp->mvc_filters.combo,
- EWL_CALLBACK_VALUE_CHANGED,
+ ewl_callback_append(fp->mvc_filters.combo, EWL_CALLBACK_VALUE_CHANGED,
ewl_filepicker_cb_type_change, fp);
- ewl_container_child_append(EWL_CONTAINER(box),
- fp->mvc_filters.combo);
+ ewl_container_child_append(EWL_CONTAINER(grid), fp->mvc_filters.combo);
+ ewl_grid_child_position_set(EWL_GRID(grid), fp->mvc_filters.combo,
+ 0, 0, 1, 1);
ewl_object_fill_policy_set(EWL_OBJECT(fp->mvc_filters.combo),
EWL_FLAG_FILL_HFILL |
EWL_FLAG_FILL_VSHRINKABLE);
ewl_widget_show(fp->mvc_filters.combo);
- box = ewl_vbox_new();
- ewl_container_child_append(EWL_CONTAINER(o), box);
- ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_SHRINKABLE);
- ewl_widget_show(box);
-
fp->ret_button = ewl_button_new();
- ewl_container_child_append(EWL_CONTAINER(box), fp->ret_button);
+ ewl_container_child_append(EWL_CONTAINER(grid), fp->ret_button);
+ ewl_grid_child_position_set(EWL_GRID(grid), fp->ret_button, 1, 1, 0,
0);
ewl_stock_type_set(EWL_STOCK(fp->ret_button), EWL_STOCK_OPEN);
ewl_callback_append(fp->ret_button, EWL_CALLBACK_CLICKED,
ewl_filepicker_cb_button_clicked, fp);
ewl_object_fill_policy_set(EWL_OBJECT(fp->ret_button),
- EWL_FLAG_FILL_HFILL |
EWL_FLAG_FILL_VSHRINKABLE);
+ EWL_FLAG_FILL_SHRINKABLE);
ewl_widget_show(fp->ret_button);
o = ewl_button_new();
- ewl_container_child_append(EWL_CONTAINER(box), o);
+ ewl_container_child_append(EWL_CONTAINER(grid), o);
+ ewl_grid_child_position_set(EWL_GRID(grid), o, 1, 1, 1, 1);
ewl_stock_type_set(EWL_STOCK(o), EWL_STOCK_CANCEL);
ewl_callback_append(o, EWL_CALLBACK_CLICKED,
ewl_filepicker_cb_button_clicked, fp);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs