[gnome-subtitles] Fix bug #620027 - Crash when shifting selected subtitles
- From: Pedro Daniel da Rocha Melo e Castro <pcastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-subtitles] Fix bug #620027 - Crash when shifting selected subtitles
- Date: Wed, 9 Jun 2010 23:22:58 +0000 (UTC)
commit c8c88a711bf99fbb1ab87d5bb0f8315c2c0fe885
Author: Pedro Castro <mail pedrocastro org>
Date: Thu Jun 10 00:22:45 2010 +0100
Fix bug #620027 - Crash when shifting selected subtitles
src/Glade/TimingsShiftDialog.glade | 10 ++++------
src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs | 7 +++++--
2 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/Glade/TimingsShiftDialog.glade b/src/Glade/TimingsShiftDialog.glade
index fbc35a3..9b182e6 100644
--- a/src/Glade/TimingsShiftDialog.glade
+++ b/src/Glade/TimingsShiftDialog.glade
@@ -14,7 +14,6 @@
<child internal-child="vbox">
<widget class="GtkVBox" id="dialogVBox">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
<widget class="GtkFrame" id="amountFrame">
<property name="visible">True</property>
@@ -103,7 +102,6 @@
<child>
<widget class="GtkVBox" id="vBox">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<widget class="GtkRadioButton" id="allSubtitlesRadioButton">
@@ -112,8 +110,8 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
+ <property name="active">True</property>
<property name="draw_indicator">True</property>
- <property name="group">selectedSubtitlesRadioButton</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -128,8 +126,8 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">allSubtitlesRadioButton</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -145,7 +143,7 @@
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <property name="group">selectedSubtitlesRadioButton</property>
+ <property name="group">allSubtitlesRadioButton</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -161,7 +159,7 @@
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <property name="group">selectedSubtitlesRadioButton</property>
+ <property name="group">allSubtitlesRadioButton</property>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs b/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs
index 1c705d3..2531575 100644
--- a/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs
+++ b/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs
@@ -1,6 +1,6 @@
/*
* This file is part of Gnome Subtitles.
- * Copyright (C) 2006-2009 Pedro Castro
+ * Copyright (C) 2006-2010 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -87,7 +87,10 @@ public class TimingsShiftDialog : GladeDialog {
fromFirstSubtitleToSelectionRadioButton.Sensitive = (selectionCount == 1);
fromSelectionToLastSubtitleRadioButton.Sensitive = (selectionCount == 1);
- selectedSubtitlesRadioButton.Active = true;
+ if (selectionCount > 0)
+ selectedSubtitlesRadioButton.Active = true;
+ else
+ selectedSubtitlesRadioButton.Sensitive = false;
}
private void UpdateSpinButtonValue (bool initializing) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]