[totem] Various small UI fixes
- From: Philip Withnall <pwithnall src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem] Various small UI fixes
- Date: Mon, 28 Sep 2009 08:27:52 +0000 (UTC)
commit fc91c757dcb6bd625349f4c8788368d6375325d7
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Sep 28 09:27:13 2009 +0100
Various small UI fixes
A series of small UI fixes to various dialogues and sidebars to fix
spacing and padding issues, and make them pretty.
src/plugins/jamendo/jamendo.py | 1 +
src/plugins/jamendo/jamendo.ui | 184 +++++++++-------------------
src/plugins/opensubtitles/opensubtitles.py | 10 ++-
src/plugins/opensubtitles/opensubtitles.ui | 72 ++++++-----
src/plugins/publish/publish-plugin.ui | 7 +-
src/plugins/youtube/youtube.ui | 5 +-
src/totem-open-location.c | 1 +
7 files changed, 118 insertions(+), 162 deletions(-)
---
diff --git a/src/plugins/jamendo/jamendo.py b/src/plugins/jamendo/jamendo.py
index 3ff5dc6..9fd4e42 100644
--- a/src/plugins/jamendo/jamendo.py
+++ b/src/plugins/jamendo/jamendo.py
@@ -142,6 +142,7 @@ class JamendoPlugin(totem.Plugin):
combo.set_active(self.AUDIO_FORMATS.index(format))
spinbutton = self.builder.get_object('album_num_spinbutton')
spinbutton.set_value(num_per_page)
+ self.config_dialog.set_default_response(gtk.RESPONSE_OK)
return self.config_dialog
def reset(self):
diff --git a/src/plugins/jamendo/jamendo.ui b/src/plugins/jamendo/jamendo.ui
index 5f70146..39953e1 100644
--- a/src/plugins/jamendo/jamendo.ui
+++ b/src/plugins/jamendo/jamendo.ui
@@ -88,6 +88,15 @@
</popup>
</ui>
</object>
+ <object class="GtkImage" id="album_button_image">
+ <property name="visible">True</property>
+ <property name="stock">gtk-jump-to</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </object>
<object class="GtkVBox" id="container">
<property name="visible">True</property>
<property name="homogeneous">False</property>
@@ -113,7 +122,7 @@
<object class="GtkHBox" id="search_hbox">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkComboBox" id="search_combo">
<property name="model">search_combo_model</property>
@@ -164,7 +173,7 @@
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="results_scrolledwindow">
<property name="visible">True</property>
@@ -178,29 +187,17 @@
<property name="visible">True</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
- <object class="GtkVBox" id="results_vbox">
+ <object class="GtkTreeView" id="results_treeview">
+ <property name="model">results_treeview_model</property>
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkTreeView" id="results_treeview">
- <property name="model">results_treeview_model</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
</object>
</child>
</object>
@@ -254,7 +251,7 @@
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="popular_scrolledwindow">
<property name="visible">True</property>
@@ -268,29 +265,17 @@
<property name="visible">True</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
- <object class="GtkVBox" id="popular_vbox">
+ <object class="GtkTreeView" id="popular_treeview">
+ <property name="model">popular_treeview_model</property>
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkTreeView" id="popular_treeview">
- <property name="model">popular_treeview_model</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
</object>
</child>
</object>
@@ -344,7 +329,7 @@
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="latest_scrolledwindow">
<property name="visible">True</property>
@@ -358,29 +343,17 @@
<property name="visible">True</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
- <object class="GtkVBox" id="latest_vbox">
+ <object class="GtkTreeView" id="latest_treeview">
+ <property name="model">latest_treeview_model</property>
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkTreeView" id="latest_treeview">
- <property name="model">latest_treeview_model</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
</object>
</child>
</object>
@@ -441,7 +414,7 @@
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkButton" id="album_button">
<property name="visible">True</property>
@@ -449,53 +422,8 @@
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <child>
- <object class="GtkHBox" id="album_button_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkImage" id="album_button_image">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="download_button_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Jamendo Album Page</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
+ <property name="image">album_button_image</property>
+ <property name="label" translatable="yes">Jamendo Album Page</property>
</object>
<packing>
<property name="padding">0</property>
@@ -507,7 +435,7 @@
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkButton" id="previous_button">
<property name="visible">True</property>
@@ -594,7 +522,7 @@
<object class="GtkVBox" id="config_dialog_container">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">2</property>
+ <property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="buttons">
<property name="visible">True</property>
@@ -617,6 +545,9 @@
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
</object>
</child>
</object>
@@ -633,12 +564,13 @@
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">2</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <property name="border_width">5</property>
<child>
<object class="GtkLabel" id="album_num_label">
<property name="visible">True</property>
- <property name="label" translatable="yes">Number of albums to _retrieve</property>
+ <property name="label" translatable="yes">Number of albums to _retrieve:</property>
<property name="use_underline">True</property>
<property name="mnemonic-widget">album_num_spinbutton</property>
<property name="use_markup">False</property>
@@ -704,7 +636,7 @@
<child>
<object class="GtkLabel" id="preferred_format_label">
<property name="visible">True</property>
- <property name="label" translatable="yes">Preferred audio _format</property>
+ <property name="label" translatable="yes">Preferred audio _format:</property>
<property name="use_underline">True</property>
<property name="mnemonic-widget">preferred_format_combo</property>
<property name="use_markup">False</property>
@@ -737,8 +669,8 @@
</object>
</child>
<action-widgets>
- <action-widget response="0">cancel_button</action-widget>
- <action-widget response="0">ok_button</action-widget>
+ <action-widget response="-6">cancel_button</action-widget><!-- GTK_RESPONSE_CANCEL -->
+ <action-widget response="-5">ok_button</action-widget><!-- GTK_RESPONSE_OK -->
</action-widgets>
</object>
<object class="GtkMenu" constructor="uimanager1" id="popup_menu"/>
diff --git a/src/plugins/opensubtitles/opensubtitles.py b/src/plugins/opensubtitles/opensubtitles.py
index 08f52ea..640223e 100644
--- a/src/plugins/opensubtitles/opensubtitles.py
+++ b/src/plugins/opensubtitles/opensubtitles.py
@@ -393,7 +393,8 @@ class OpenSubtitles(totem.Plugin):
self.dialog.set_transient_for (self.totem.get_main_window())
self.dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
- # Connect the callback
+ # Connect the callbacks
+ self.dialog.connect ('key-press-event', self.on_window__key_press_event)
self.treeview.get_selection().connect('changed', self.on_treeview__row_change)
self.treeview.connect('row-activated', self.on_treeview__row_activate)
@@ -593,6 +594,13 @@ class OpenSubtitles(totem.Plugin):
# Callbacks
+ def on_window__key_press_event(self, widget, event):
+ if event.keyval == gtk.keysyms.Escape:
+ self.dialog.destroy()
+ self.dialog = None
+ return True
+ return False
+
def on_treeview__row_change(self, selection):
if selection.count_selected_rows() > 0:
self.apply_button.set_sensitive(True)
diff --git a/src/plugins/opensubtitles/opensubtitles.ui b/src/plugins/opensubtitles/opensubtitles.ui
index c90af47..ce06941 100644
--- a/src/plugins/opensubtitles/opensubtitles.ui
+++ b/src/plugins/opensubtitles/opensubtitles.ui
@@ -28,7 +28,7 @@
<property name="icon-size">4</property>
</object>
<object class="GtkWindow" id="subtitles_dialog">
- <property name="border_width">5</property>
+ <property name="border_width">12</property>
<property name="title" translatable="yes">Download Movie Subtitles</property>
<property name="window_position">center-on-parent</property>
<property name="default_width">400</property>
@@ -101,8 +101,11 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Language</b></property>
+ <property name="label" translatable="yes">Language</property>
<property name="use_markup">True</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
@@ -139,38 +142,45 @@
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbbox1">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="layout_style">end</property>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="top_padding">12</property>
<child>
- <object class="GtkButton" id="apply_button">
- <property name="label" translatable="yes">_Play with Subtitle</property>
+ <object class="GtkHButtonBox" id="hbbox1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image_apply</property>
- <property name="use-underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="close_button">
- <property name="label">gtk-close</property>
- <property name="use-stock">True</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="apply_button">
+ <property name="label" translatable="yes">_Play with Subtitle</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image_apply</property>
+ <property name="use-underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="close_button">
+ <property name="label">gtk-close</property>
+ <property name="use-stock">True</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
diff --git a/src/plugins/publish/publish-plugin.ui b/src/plugins/publish/publish-plugin.ui
index d665c17..70ec0cf 100644
--- a/src/plugins/publish/publish-plugin.ui
+++ b/src/plugins/publish/publish-plugin.ui
@@ -55,11 +55,14 @@
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="xpad">12</property>
- <property name="label" translatable="yes"><small>The name used for announcing the playlist service on the network.
+ <property name="label" translatable="yes">The name used for announcing the playlist service on the network.
All occurrences of the string <b>%u</b> will be replaced by your name,
-and <b>%h</b> will be replaced by your computer's host name.</small></property>
+and <b>%h</b> will be replaced by your computer's host name.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
+ <attributes>
+ <attribute name="scale" value="0.833333333"/><!-- PANGO_SCALE_SMALL -->
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/plugins/youtube/youtube.ui b/src/plugins/youtube/youtube.ui
index f3e65df..d333094 100644
--- a/src/plugins/youtube/youtube.ui
+++ b/src/plugins/youtube/youtube.ui
@@ -35,7 +35,7 @@
</child>
<child>
<object class="GtkHBox" id="yt_hbox">
- <property name="spacing">4</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkButton" id="yt_search_button">
<property name="use-stock">True</property>
@@ -73,7 +73,7 @@
<signal name="switch-page" handler="notebook_switch_page_cb"/>
<child>
<object class="GtkVBox" id="yt_vbox_search">
- <property name="spacing">4</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="yt_scrolled_window_search">
<property name="hscrollbar-policy">GTK_POLICY_NEVER</property>
@@ -119,6 +119,7 @@
</child>
<child>
<object class="GtkVBox" id="yt_vbox_related">
+ <property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="yt_scrolled_window_related">
<property name="hscrollbar-policy">GTK_POLICY_AUTOMATIC</property>
diff --git a/src/totem-open-location.c b/src/totem-open-location.c
index e496ebc..afa2451 100644
--- a/src/totem-open-location.c
+++ b/src/totem-open-location.c
@@ -174,6 +174,7 @@ totem_open_location_new (Totem *totem)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
+ gtk_container_set_border_width (GTK_CONTAINER (open_location), 5);
gtk_dialog_set_default_response (GTK_DIALOG (open_location), GTK_RESPONSE_OK);
g_signal_connect (G_OBJECT (open_location), "delete-event",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]