[latexila/gnome-3] Utils: get dialog component: do not expand
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila/gnome-3] Utils: get dialog component: do not expand
- Date: Sun, 4 Mar 2012 02:15:08 +0000 (UTC)
commit c06024fe5bdb2744b84e3d6b7b56458315f73400
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Sun Mar 4 03:14:45 2012 +0100
Utils: get dialog component: do not expand
It will be useful for the build tool dialog (next commit).
src/project_dialogs.vala | 4 ++++
src/templates.vala | 5 +++++
src/utils.vala | 3 +--
3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/project_dialogs.vala b/src/project_dialogs.vala
index 6254966..353821e 100644
--- a/src/project_dialogs.vala
+++ b/src/project_dialogs.vala
@@ -36,12 +36,14 @@ namespace ProjectDialogs
FileChooserButton directory_chooser = new FileChooserButton (_("Directory"),
FileChooserAction.SELECT_FOLDER);
directory_chooser.set_size_request (250, -1);
+ directory_chooser.hexpand = true;
Widget component = Utils.get_dialog_component (_("Directory"), directory_chooser);
content_area.pack_start (component, false);
// main file
FileChooserButton main_file_chooser = new FileChooserButton (_("Main File"),
FileChooserAction.OPEN);
+ main_file_chooser.hexpand = true;
component = Utils.get_dialog_component (_("Main File"), main_file_chooser);
content_area.pack_start (component, false);
@@ -127,6 +129,7 @@ namespace ProjectDialogs
Label location = new Label (project_dir);
location.set_line_wrap (true);
location.set_halign (Align.START);
+ location.hexpand = true;
Widget component = Utils.get_dialog_component (_("Location of the project"),
location);
@@ -135,6 +138,7 @@ namespace ProjectDialogs
// main file
FileChooserButton main_file_chooser = new FileChooserButton (_("Main File"),
FileChooserAction.OPEN);
+ main_file_chooser.hexpand = true;
component = Utils.get_dialog_component (_("Main File"), main_file_chooser);
content_area.pack_start (component, false);
diff --git a/src/templates.vala b/src/templates.vala
index 581b523..97717f3 100644
--- a/src/templates.vala
+++ b/src/templates.vala
@@ -124,12 +124,14 @@ public class Templates : GLib.Object
/* icon view for the default templates */
IconView icon_view_default_templates = create_icon_view (default_store);
Widget scrollbar = Utils.add_scrollbar (icon_view_default_templates);
+ scrollbar.hexpand = true;
Widget component = Utils.get_dialog_component (_("Default templates"), scrollbar);
vpaned.pack1 (component, true, true);
/* icon view for the personal templates */
IconView icon_view_personal_templates = create_icon_view (personal_store);
scrollbar = Utils.add_scrollbar (icon_view_personal_templates);
+ scrollbar.hexpand = true;
component = Utils.get_dialog_component (_("Your personal templates"), scrollbar);
vpaned.pack2 (component, false, true);
@@ -220,6 +222,7 @@ public class Templates : GLib.Object
/* name */
Entry entry = new Entry ();
+ entry.hexpand = true;
Widget component = Utils.get_dialog_component (_("Name of the new template"),
entry);
content_area.pack_start (component, false);
@@ -228,6 +231,7 @@ public class Templates : GLib.Object
// we take the default store because it contains all the icons
IconView icon_view = create_icon_view (default_store);
Widget scrollbar = Utils.add_scrollbar (icon_view);
+ scrollbar.expand = true;
component = Utils.get_dialog_component (_("Choose an icon"), scrollbar);
content_area.pack_start (component);
@@ -283,6 +287,7 @@ public class Templates : GLib.Object
IconView icon_view = create_icon_view (personal_store);
icon_view.set_selection_mode (SelectionMode.MULTIPLE);
Widget scrollbar = Utils.add_scrollbar (icon_view);
+ scrollbar.hexpand = true;
Widget component = Utils.get_dialog_component (_("Personal templates"),
scrollbar);
content_area.pack_start (component);
diff --git a/src/utils.vala b/src/utils.vala
index 793d317..73e2eb6 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -310,7 +310,7 @@ namespace Utils
return button;
}
- public Widget get_dialog_component (string title, Widget widget)
+ public Grid get_dialog_component (string title, Widget widget)
{
Grid grid = new Grid ();
grid.orientation = Orientation.VERTICAL;
@@ -325,7 +325,6 @@ namespace Utils
// left margin for the widget
widget.set_margin_left (12);
- widget.set_hexpand (true);
grid.add (widget);
return grid;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]