Commit c5dc8cf6 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Federico Mena Quintero

Patch from Hans-Petter Jansson <hpj@ximian.com> to align the bookmarks

2003-12-01  Federico Mena Quintero  <federico@ximian.com>

	Patch from Hans-Petter Jansson <hpj@ximian.com> to align the
	bookmarks buttons with the location entry.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_constructor): Use a GtkSizeGroup for the
	bookmarks buttons and the location entry.
parent 4f42c35a
2003-12-01 Federico Mena Quintero <federico@ximian.com>
Patch from Hans-Petter Jansson <hpj@ximian.com> to align the
bookmarks buttons with the location entry.
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_constructor): Use a GtkSizeGroup for the
bookmarks buttons and the location entry.
2003-12-01 Federico Mena Quintero <federico@ximian.com> 2003-12-01 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the * gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the
......
2003-12-01 Federico Mena Quintero <federico@ximian.com>
Patch from Hans-Petter Jansson <hpj@ximian.com> to align the
bookmarks buttons with the location entry.
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_constructor): Use a GtkSizeGroup for the
bookmarks buttons and the location entry.
2003-12-01 Federico Mena Quintero <federico@ximian.com> 2003-12-01 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the * gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the
......
2003-12-01 Federico Mena Quintero <federico@ximian.com>
Patch from Hans-Petter Jansson <hpj@ximian.com> to align the
bookmarks buttons with the location entry.
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_constructor): Use a GtkSizeGroup for the
bookmarks buttons and the location entry.
2003-12-01 Federico Mena Quintero <federico@ximian.com> 2003-12-01 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the * gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the
......
2003-12-01 Federico Mena Quintero <federico@ximian.com>
Patch from Hans-Petter Jansson <hpj@ximian.com> to align the
bookmarks buttons with the location entry.
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_constructor): Use a GtkSizeGroup for the
bookmarks buttons and the location entry.
2003-12-01 Federico Mena Quintero <federico@ximian.com> 2003-12-01 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the * gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the
......
2003-12-01 Federico Mena Quintero <federico@ximian.com>
Patch from Hans-Petter Jansson <hpj@ximian.com> to align the
bookmarks buttons with the location entry.
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_constructor): Use a GtkSizeGroup for the
bookmarks buttons and the location entry.
2003-12-01 Federico Mena Quintero <federico@ximian.com> 2003-12-01 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the * gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "gtkmessagedialog.h" #include "gtkmessagedialog.h"
#include "gtkprivate.h" #include "gtkprivate.h"
#include "gtkscrolledwindow.h" #include "gtkscrolledwindow.h"
#include "gtksizegroup.h"
#include "gtkstock.h" #include "gtkstock.h"
#include "gtktable.h" #include "gtktable.h"
#include "gtktoolbar.h" #include "gtktoolbar.h"
...@@ -1062,17 +1063,9 @@ shortcuts_drag_data_received_cb (GtkWidget *widget, ...@@ -1062,17 +1063,9 @@ shortcuts_drag_data_received_cb (GtkWidget *widget,
static GtkWidget * static GtkWidget *
create_shortcuts_tree (GtkFileChooserDefault *impl) create_shortcuts_tree (GtkFileChooserDefault *impl)
{ {
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *hbox2;
GtkWidget *widget;
GtkTreeSelection *selection; GtkTreeSelection *selection;
GtkTreeViewColumn *column; GtkTreeViewColumn *column;
GtkCellRenderer *renderer; GtkCellRenderer *renderer;
GtkWidget *image;
vbox = gtk_vbox_new (FALSE, 12);
gtk_widget_show (vbox);
/* Scrolled window */ /* Scrolled window */
...@@ -1081,7 +1074,6 @@ create_shortcuts_tree (GtkFileChooserDefault *impl) ...@@ -1081,7 +1074,6 @@ create_shortcuts_tree (GtkFileChooserDefault *impl)
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (impl->shortcuts_scrollwin), gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (impl->shortcuts_scrollwin),
GTK_SHADOW_IN); GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), impl->shortcuts_scrollwin, TRUE, TRUE, 0);
gtk_widget_show (impl->shortcuts_scrollwin); gtk_widget_show (impl->shortcuts_scrollwin);
/* Tree */ /* Tree */
...@@ -1133,10 +1125,18 @@ create_shortcuts_tree (GtkFileChooserDefault *impl) ...@@ -1133,10 +1125,18 @@ create_shortcuts_tree (GtkFileChooserDefault *impl)
gtk_tree_view_append_column (GTK_TREE_VIEW (impl->shortcuts_tree), column); gtk_tree_view_append_column (GTK_TREE_VIEW (impl->shortcuts_tree), column);
/* Bookmark buttons */ return impl->shortcuts_scrollwin;
}
static GtkWidget *
create_shortcuts_buttons (GtkFileChooserDefault *impl)
{
GtkWidget *hbox;
GtkWidget *hbox2;
GtkWidget *widget;
GtkWidget *image;
hbox = gtk_hbox_new (FALSE, 12); hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox); gtk_widget_show (hbox);
/* "Add bookmark" */ /* "Add bookmark" */
...@@ -1168,7 +1168,7 @@ create_shortcuts_tree (GtkFileChooserDefault *impl) ...@@ -1168,7 +1168,7 @@ create_shortcuts_tree (GtkFileChooserDefault *impl)
gtk_box_pack_start (GTK_BOX (hbox), impl->remove_bookmark_button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), impl->remove_bookmark_button, FALSE, FALSE, 0);
gtk_widget_show_all (impl->remove_bookmark_button); gtk_widget_show_all (impl->remove_bookmark_button);
return vbox; return hbox;
} }
/* Creates the widgets for the file list */ /* Creates the widgets for the file list */
...@@ -1289,6 +1289,8 @@ gtk_file_chooser_default_constructor (GType type, ...@@ -1289,6 +1289,8 @@ gtk_file_chooser_default_constructor (GType type,
GtkWidget *widget; GtkWidget *widget;
GList *focus_chain; GList *focus_chain;
GtkWidget *hbox; GtkWidget *hbox;
GtkWidget *vbox;
GtkSizeGroup *size_group;
object = parent_class->constructor (type, object = parent_class->constructor (type,
n_construct_properties, n_construct_properties,
...@@ -1306,7 +1308,7 @@ gtk_file_chooser_default_constructor (GType type, ...@@ -1306,7 +1308,7 @@ gtk_file_chooser_default_constructor (GType type,
/* Basic table */ /* Basic table */
table = gtk_table_new (3, 2, FALSE); table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 12); gtk_table_set_col_spacings (GTK_TABLE (table), 12);
gtk_table_set_row_spacings (GTK_TABLE (table), 12); gtk_table_set_row_spacings (GTK_TABLE (table), 12);
gtk_box_pack_start (GTK_BOX (impl), table, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (impl), table, TRUE, TRUE, 0);
...@@ -1332,13 +1334,29 @@ gtk_file_chooser_default_constructor (GType type, ...@@ -1332,13 +1334,29 @@ gtk_file_chooser_default_constructor (GType type,
/* Shortcuts list */ /* Shortcuts list */
vbox = gtk_vbox_new (FALSE, 12);
gtk_paned_add1 (GTK_PANED (hpaned), vbox);
gtk_widget_show (vbox);
widget = create_shortcuts_tree (impl); widget = create_shortcuts_tree (impl);
gtk_paned_add1 (GTK_PANED (hpaned), widget); gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 0);
gtk_widget_show (widget);
widget = create_shortcuts_buttons (impl);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
gtk_size_group_add_widget (size_group, widget);
/* Folder tree */ /* Folder tree */
vbox = gtk_vbox_new (FALSE, 12);
gtk_paned_add2 (GTK_PANED (hpaned), vbox);
gtk_widget_show (vbox);
hbox = gtk_hbox_new (FALSE, 12); hbox = gtk_hbox_new (FALSE, 12);
gtk_paned_add2 (GTK_PANED (hpaned), hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox); gtk_widget_show (hbox);
widget = create_folder_tree (impl); widget = create_folder_tree (impl);
...@@ -1352,10 +1370,10 @@ gtk_file_chooser_default_constructor (GType type, ...@@ -1352,10 +1370,10 @@ gtk_file_chooser_default_constructor (GType type,
/* Location/filename entry */ /* Location/filename entry */
entry_widget = create_filename_entry (impl); entry_widget = create_filename_entry (impl);
gtk_table_attach (GTK_TABLE (table), entry_widget, gtk_box_pack_start (GTK_BOX (vbox), entry_widget, FALSE, FALSE, 0);
0, 2, 2, 3,
GTK_EXPAND | GTK_FILL, 0, gtk_size_group_add_widget (size_group, entry_widget);
0, 0); g_object_unref (size_group);
/* Preview */ /* Preview */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment