[pitivi: 9/16] Usability fixes for the FileListError dialog



commit fae567cb147b7c96222ac5d0e785e9fae7afa07e
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date:   Sun Dec 26 22:20:28 2010 -0500

    Usability fixes for the FileListError dialog

 pitivi/ui/filelisterrordialog.glade |   47 +++++++++++++++++++++-------------
 pitivi/ui/filelisterrordialog.py    |   14 ++--------
 2 files changed, 32 insertions(+), 29 deletions(-)
---
diff --git a/pitivi/ui/filelisterrordialog.glade b/pitivi/ui/filelisterrordialog.glade
index ba3f550..e3aaf30 100644
--- a/pitivi/ui/filelisterrordialog.glade
+++ b/pitivi/ui/filelisterrordialog.glade
@@ -1,34 +1,38 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
+<?xml version="1.0" encoding="UTF-8"?>
 <glade-interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
   <widget class="GtkDialog" id="filelisterrordialog">
     <property name="visible">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="border_width">12</property>
+    <property name="type_hint">dialog</property>
     <signal name="close" handler="_closeCb"/>
     <signal name="response" handler="_responseCb"/>
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="spacing">12</property>
         <child>
           <widget class="GtkHBox" id="hbox1">
             <property name="visible">True</property>
-            <property name="border_width">10</property>
-            <property name="spacing">5</property>
+            <property name="spacing">6</property>
             <child>
               <widget class="GtkImage" id="image1">
                 <property name="visible">True</property>
                 <property name="stock">gtk-dialog-warning</property>
-                <property name="icon_size">6</property>
+                <property name="icon-size">6</property>
               </widget>
               <packing>
                 <property name="expand">False</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
               <widget class="GtkLabel" id="headline">
                 <property name="visible">True</property>
-                <property name="justify">GTK_JUSTIFY_CENTER</property>
+                <property name="xalign">0</property>
+                <property name="justify">center</property>
+                <property name="wrap">True</property>
               </widget>
               <packing>
                 <property name="position">1</property>
@@ -37,23 +41,23 @@
           </widget>
           <packing>
             <property name="expand">False</property>
-            <property name="padding">5</property>
-            <property name="position">2</property>
+            <property name="position">0</property>
           </packing>
         </child>
         <child>
           <widget class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="width_request">500</property>
+            <property name="height_request">300</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <property name="hscrollbar_policy">never</property>
+            <property name="vscrollbar_policy">automatic</property>
             <child>
               <widget class="GtkViewport" id="viewport1">
                 <property name="visible">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="resize_mode">GTK_RESIZE_QUEUE</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <property name="resize_mode">queue</property>
                 <child>
                   <widget class="GtkVBox" id="errorvbox">
                     <property name="visible">True</property>
@@ -79,21 +83,28 @@
         <child internal-child="action_area">
           <widget class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="layout_style">end</property>
             <child>
               <widget class="GtkButton" id="okbutton1">
+                <property name="label">gtk-ok</property>
+                <property name="response_id">-5</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
+                <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">-5</property>
               </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
           </widget>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </widget>
diff --git a/pitivi/ui/filelisterrordialog.py b/pitivi/ui/filelisterrordialog.py
index 47a741b..3f118e1 100644
--- a/pitivi/ui/filelisterrordialog.py
+++ b/pitivi/ui/filelisterrordialog.py
@@ -47,7 +47,6 @@ class FileListErrorDialog(GladeWindow, Signallable, Loggable):
         self.widgets["headline"].set_text(headline)
         self.window.set_title(title)
         self.errorvbox = self.widgets["errorvbox"]
-        self.window.set_geometry_hints(min_width=400, min_height=200)
 
     def addFailedFile(self, uri, reason=_("Unknown reason"), extra=None):
         """Add the given uri to the list of failed files. You can optionnaly
@@ -56,7 +55,7 @@ class FileListErrorDialog(GladeWindow, Signallable, Loggable):
         """
         self.debug("Uri:%s, reason:%s, extra:%s", uri, reason, extra)
         exp = self._createFileExpander(uri, reason, extra)
-        self.errorvbox.pack_start(exp)
+        self.errorvbox.pack_start(exp, expand=False, fill=False)
         exp.show_all()
         #self.storemodel.append([str(uri), str(reason)])
 
@@ -76,22 +75,15 @@ class FileListErrorDialog(GladeWindow, Signallable, Loggable):
         boldtag.props.weight = pango.WEIGHT_BOLD
         table.add(boldtag)
 
-        if uri:
-            # <b>URI :</b> % uri
-            end = textbuffer.get_end_iter()
-            textbuffer.insert_with_tags(end, _("URI:"), boldtag)
-            end = textbuffer.get_end_iter()
-            textbuffer.insert(end, "%s\n" % uri)
-
         end = textbuffer.get_end_iter()
-        textbuffer.insert_with_tags(end, _("Problem:"), boldtag)
+        textbuffer.insert_with_tags(end, _("Problem:") + " ", boldtag)
 
         end = textbuffer.get_end_iter()
         textbuffer.insert(end, "%s\n" % reason)
 
         if extra:
             end = textbuffer.get_end_iter()
-            textbuffer.insert_with_tags(end, _("Extra information:"), boldtag)
+            textbuffer.insert_with_tags(end, _("Extra information:") + " ", boldtag)
 
             end = textbuffer.get_end_iter()
             textbuffer.insert(end, "%s\n" % extra)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]