Lines 218-234
Link Here
|
218 |
} |
218 |
} |
219 |
|
219 |
|
220 |
static void |
220 |
static void |
221 |
ogmrip_crop_dialog_scale_value_changed (OGMRipCropDialog *dialog, GtkWidget *scale) |
221 |
ogmrip_crop_dialog_scale_button_released (OGMRipCropDialog *dialog, GdkEventButton *event, GtkWidget *scale) |
222 |
{ |
222 |
{ |
223 |
gulong frame; |
223 |
if (event->button == 1) |
224 |
gchar *text; |
224 |
{ |
|
|
225 |
gulong frame; |
226 |
gchar *text; |
225 |
|
227 |
|
226 |
frame = (guint) gtk_range_get_value (GTK_RANGE (scale)); |
228 |
frame = (guint) gtk_range_get_value (GTK_RANGE (scale)); |
227 |
text = g_strdup_printf (_("Frame %lu of %lu"), frame, dialog->priv->length); |
229 |
text = g_strdup_printf (_("Frame %lu of %lu"), frame, dialog->priv->length); |
228 |
gtk_label_set_text (GTK_LABEL (dialog->priv->label), text); |
230 |
gtk_label_set_text (GTK_LABEL (dialog->priv->label), text); |
229 |
g_free (text); |
231 |
g_free (text); |
230 |
|
232 |
|
231 |
ogmrip_crop_dialog_grab_frame (dialog, frame); |
233 |
ogmrip_crop_dialog_grab_frame (dialog, frame); |
|
|
234 |
} |
232 |
} |
235 |
} |
233 |
|
236 |
|
234 |
G_DEFINE_TYPE (OGMRipCropDialog, ogmrip_crop_dialog, GTK_TYPE_DIALOG) |
237 |
G_DEFINE_TYPE (OGMRipCropDialog, ogmrip_crop_dialog, GTK_TYPE_DIALOG) |
Lines 291-299
Link Here
|
291 |
dialog->priv->label = glade_xml_get_widget (xml, "frame-label"); |
294 |
dialog->priv->label = glade_xml_get_widget (xml, "frame-label"); |
292 |
|
295 |
|
293 |
dialog->priv->scale = glade_xml_get_widget (xml, "frame-scale"); |
296 |
dialog->priv->scale = glade_xml_get_widget (xml, "frame-scale"); |
294 |
gtk_range_set_update_policy (GTK_RANGE (dialog->priv->scale), GTK_UPDATE_DELAYED); |
297 |
g_signal_connect_swapped (dialog->priv->scale, "button-release-event", |
295 |
g_signal_connect_swapped (dialog->priv->scale, "value-changed", |
298 |
G_CALLBACK (ogmrip_crop_dialog_scale_button_released), dialog); |
296 |
G_CALLBACK (ogmrip_crop_dialog_scale_value_changed), dialog); |
|
|
297 |
|
299 |
|
298 |
g_object_unref (xml); |
300 |
g_object_unref (xml); |
299 |
} |
301 |
} |