[Xfce4-commits] <thunar:jannis/ui-improvements> Improve the UI according to bugs #7496 and #7497.

Jannis Pohlmann noreply at xfce.org
Fri Apr 15 14:10:02 CEST 2011


Updating branch refs/heads/jannis/ui-improvements
         to d4147001add62af4330625bdcfb2410b48d74c61 (commit)
       from 6f6bd15ae0f1117126db05c03c129771e3119fe9 (commit)

commit d4147001add62af4330625bdcfb2410b48d74c61
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Fri Apr 15 14:07:52 2011 +0200

    Improve the UI according to bugs #7496 and #7497.

 thunar/thunar-statusbar.c |   37 +++++++++++++++++++++++++------------
 thunar/thunar-window.c    |   12 ++++++------
 2 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/thunar/thunar-statusbar.c b/thunar/thunar-statusbar.c
index 5222eaf..3b8533b 100644
--- a/thunar/thunar-statusbar.c
+++ b/thunar/thunar-statusbar.c
@@ -1,20 +1,22 @@
-/* $Id$ */
+/* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
  * Copyright (c) 2005-2006 Benedikt Meurer <benny at xfce.org>
+ * Copyright (c) 2011 Jannis Pohlmann <jannis at xfce.org>
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of 
+ * the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+ * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA  02111-1307  USA
+ * You should have received a copy of the GNU General Public 
+ * License along with this program; if not, write to the Free 
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -64,6 +66,8 @@ G_DEFINE_TYPE (ThunarStatusbar, thunar_statusbar, GTK_TYPE_STATUSBAR)
 static void
 thunar_statusbar_class_init (ThunarStatusbarClass *klass)
 {
+  static gboolean style_initialized = FALSE;
+
   GObjectClass *gobject_class;
 
   gobject_class = G_OBJECT_CLASS (klass);
@@ -82,6 +86,15 @@ thunar_statusbar_class_init (ThunarStatusbarClass *klass)
                                                         "text",
                                                         NULL,
                                                         EXO_PARAM_WRITABLE));
+
+  if (!style_initialized)
+    {
+      gtk_rc_parse_string ("style \"thunar-statusbar-internal\" {\n"
+                           "  GtkStatusbar::shadow-type = GTK_SHADOW_NONE\n"
+                           "}\n"
+                           "class \"ThunarStatusbar\" "
+                           "style \"thunar-statusbar-internal\"\n");
+    }
 }
 
 
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 4735b3b..d258d8f 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -1,7 +1,7 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
  * Copyright (c) 2005-2007 Benedikt Meurer <benny at xfce.org>
- * Copyright (c) 2009-2010 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -821,7 +821,7 @@ thunar_window_init (ThunarWindow *window)
     }
 
   window->paned = gtk_hpaned_new ();
-  gtk_container_set_border_width (GTK_CONTAINER (window->paned), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (window->paned), 0);
   gtk_table_attach (GTK_TABLE (window->table), window->paned, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
   gtk_widget_show (window->paned);
 
@@ -832,7 +832,7 @@ thunar_window_init (ThunarWindow *window)
   /* always remember the last separator position for newly opened windows */
   exo_binding_new (G_OBJECT (window->paned), "position", G_OBJECT (window->preferences), "last-separator-position");
 
-  window->view_box = gtk_vbox_new (FALSE, 6);
+  window->view_box = gtk_table_new (3, 1, FALSE);
   gtk_paned_pack2 (GTK_PANED (window->paned), window->view_box, TRUE, FALSE);
   gtk_widget_show (window->view_box);
 
@@ -1290,7 +1290,7 @@ thunar_window_install_location_bar (ThunarWindow *window,
       else
         {
           /* it's a standalone location bar, just place it above the view */
-          gtk_box_pack_start (GTK_BOX (window->view_box), window->location_bar, FALSE, FALSE, 0);
+          gtk_table_attach (GTK_TABLE (window->view_box), window->location_bar, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 6);
         }
 
       /* display the new location bar widget */
@@ -1806,7 +1806,7 @@ thunar_window_action_statusbar_changed (GtkToggleAction *action,
     {
       /* setup a new statusbar */
       window->statusbar = thunar_statusbar_new ();
-      gtk_table_attach (GTK_TABLE (window->table), window->statusbar, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+      gtk_table_attach (GTK_TABLE (window->view_box), window->statusbar, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
       gtk_widget_show (window->statusbar);
 
       /* connect to the view (if any) */
@@ -1903,7 +1903,7 @@ thunar_window_action_view_changed (GtkRadioAction *action,
       exo_binding_new (G_OBJECT (window->view), "loading", G_OBJECT (window->throbber), "animated");
       exo_binding_new (G_OBJECT (window->view), "selected-files", G_OBJECT (window->launcher), "selected-files");
       exo_mutual_binding_new (G_OBJECT (window->view), "zoom-level", G_OBJECT (window), "zoom-level");
-      gtk_box_pack_end (GTK_BOX (window->view_box), window->view, TRUE, TRUE, 0);
+      gtk_table_attach (GTK_TABLE (window->view_box), window->view, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
       gtk_widget_grab_focus (window->view);
       gtk_widget_show (window->view);
 



More information about the Xfce4-commits mailing list