[SCM] gsequencer/upstream: fixed editor and disabled some controls
jkraehemann-guest at users.alioth.debian.org
jkraehemann-guest at users.alioth.debian.org
Sun Jun 14 16:07:06 UTC 2015
The following commit has been merged in the upstream branch:
commit a0334afc0340dc8ebbc309a3faa11a1edfbdf422
Author: Joël Krähemann <weedlight at gmail.com>
Date: Wed Jun 10 00:17:16 2015 +0200
fixed editor and disabled some controls
diff --git a/src/ags/X/ags_menu_bar.c b/src/ags/X/ags_menu_bar.c
index f59bd6a..0d8757c 100644
--- a/src/ags/X/ags_menu_bar.c
+++ b/src/ags/X/ags_menu_bar.c
@@ -460,10 +460,10 @@ ags_zoom_combo_box_new()
combo_box = (GtkComboBoxText *) gtk_combo_box_text_new();
- gtk_combo_box_text_append_text(combo_box,
- "16:1\0");
- gtk_combo_box_text_append_text(combo_box,
- "8:1\0");
+ // gtk_combo_box_text_append_text(combo_box,
+ // "16:1\0");
+ // gtk_combo_box_text_append_text(combo_box,
+ // "8:1\0");
gtk_combo_box_text_append_text(combo_box,
"4:1\0");
gtk_combo_box_text_append_text(combo_box,
diff --git a/src/ags/X/ags_navigation.c b/src/ags/X/ags_navigation.c
index efc5233..9de947d 100644
--- a/src/ags/X/ags_navigation.c
+++ b/src/ags/X/ags_navigation.c
@@ -256,8 +256,8 @@ ags_navigation_init(AgsNavigation *navigation)
gtk_widget_queue_draw((GtkWidget *) navigation->duration_time);
gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->duration_time, FALSE, FALSE, 2);
- navigation->duration_tact = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_NOTE_EDIT_MAX_CONTROLS * 64.0, 1.0);
- gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->duration_tact, FALSE, FALSE, 2);
+ // navigation->duration_tact = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_NOTE_EDIT_MAX_CONTROLS * 64.0, 1.0);
+ // gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->duration_tact, FALSE, FALSE, 2);
/* expansion */
@@ -279,10 +279,10 @@ ags_navigation_init(AgsNavigation *navigation)
4.0);
gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->loop_right_tact, FALSE, FALSE, 2);
- navigation->scroll = (GtkCheckButton *) gtk_check_button_new_with_label("auto-scroll\0");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(navigation->scroll),
- TRUE);
- gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->scroll, FALSE, FALSE, 2);
+ // navigation->scroll = (GtkCheckButton *) gtk_check_button_new_with_label("auto-scroll\0");
+ // gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(navigation->scroll),
+ // TRUE);
+ // gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->scroll, FALSE, FALSE, 2);
}
void
@@ -380,8 +380,8 @@ ags_navigation_connect(AgsConnectable *connectable)
g_signal_connect_after((GObject *) navigation->position_tact, "value-changed\0",
G_CALLBACK(ags_navigation_position_tact_callback), (gpointer) navigation);
- g_signal_connect((GObject *) navigation->duration_tact, "value-changed\0",
- G_CALLBACK(ags_navigation_duration_tact_callback), (gpointer) navigation);
+ // g_signal_connect((GObject *) navigation->duration_tact, "value-changed\0",
+ // G_CALLBACK(ags_navigation_duration_tact_callback), (gpointer) navigation);
/* devout */
g_signal_connect_after((GObject *) navigation->devout, "tic\0",
@@ -432,6 +432,7 @@ ags_navigation_real_change_position(AgsNavigation *navigation,
{
AgsWindow *window;
AgsEditor *editor;
+ gchar *timestr;
double tact_factor, zoom_factor;
double tact;
@@ -440,11 +441,18 @@ ags_navigation_real_change_position(AgsNavigation *navigation,
zoom_factor = 0.25;
- tact_factor = exp2(8.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
- tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 4.0);
+ tact_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
+ tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 2.0);
gtk_adjustment_set_value(GTK_RANGE(editor->note_edit->hscrollbar)->adjustment,
tact_counter * window->editor->note_edit->control_current.control_width * (16.0 / tact_factor));
+
+ timestr = ags_navigation_tact_to_time_string(tact_counter,
+ navigation->bpm->adjustment->value);
+ gtk_label_set_text(navigation->position_time, timestr);
+
+ g_free(timestr);
+
}
/**
diff --git a/src/ags/X/editor/ags_note_edit.c b/src/ags/X/editor/ags_note_edit.c
index d902651..bf81293 100644
--- a/src/ags/X/editor/ags_note_edit.c
+++ b/src/ags/X/editor/ags_note_edit.c
@@ -337,8 +337,8 @@ ags_note_edit_reset_horizontally(AgsNoteEdit *note_edit, guint flags)
zoom_factor = 0.25;
- tact_factor = exp2(8.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
- tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 4.0);
+ tact_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
+ tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 2.0);
if((AGS_NOTE_EDIT_RESET_WIDTH & flags) != 0){
note_edit->control_unit.control_width = (guint) (((double) note_edit->control_width * zoom_factor * tact));
@@ -503,7 +503,7 @@ ags_note_edit_draw_segment(AgsNoteEdit *note_edit, cairo_t *cr)
cairo_line_to(cr, (double) note_edit->width, (double) i);
cairo_stroke(cr);
- tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 4.0);
+ tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 2.0);
i = note_edit->control_current.x0;
diff --git a/src/ags/X/editor/ags_note_edit_callbacks.c b/src/ags/X/editor/ags_note_edit_callbacks.c
index 213cdf1..01b4155 100644
--- a/src/ags/X/editor/ags_note_edit_callbacks.c
+++ b/src/ags/X/editor/ags_note_edit_callbacks.c
@@ -163,7 +163,7 @@ ags_note_edit_drawing_area_button_press_event (GtkWidget *widget, GdkEventButton
if((AGS_NOTE_EDIT_ADDING_NOTE & (note_edit->flags)) != 0 ||
(AGS_NOTE_EDIT_POSITION_CURSOR & (note_edit->flags)) != 0){
- tact = exp2(8.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
+ tact = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
if(AGS_IS_PANEL(machine)){
}else if(AGS_IS_MIXER(machine)){
@@ -455,7 +455,7 @@ ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButto
note_edit->control.x1_offset = (guint) round((double) note_edit->hscrollbar->scrollbar.range.adjustment->value);
note_edit->control.y1_offset = (guint) round((double) note_edit->vscrollbar->scrollbar.range.adjustment->value);
- tact = exp2(8.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
+ tact = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
cr = gdk_cairo_create(widget->window);
cairo_push_group(cr);
@@ -722,7 +722,7 @@ ags_note_edit_drawing_area_motion_notify_event (GtkWidget *widget, GdkEventMotio
note_edit->control.x1_offset = (guint) round((double) note_edit->hscrollbar->scrollbar.range.adjustment->value);
note_edit->control.y1_offset = (guint) round((double) note_edit->vscrollbar->scrollbar.range.adjustment->value);
- tact = exp2(8.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
+ tact = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
cr = gdk_cairo_create(widget->window);
cairo_push_group(cr);
diff --git a/src/ags/X/editor/ags_toolbar.c b/src/ags/X/editor/ags_toolbar.c
index b16c602..f7be4b6 100644
--- a/src/ags/X/editor/ags_toolbar.c
+++ b/src/ags/X/editor/ags_toolbar.c
@@ -157,9 +157,9 @@ ags_toolbar_init(AgsToolbar *toolbar)
label = (GtkLabel *) gtk_label_new("zoom\0");
gtk_toolbar_append_widget((GtkToolbar *) toolbar, (GtkWidget *) label, NULL, NULL);
- toolbar->zoom_history = 4;
+ toolbar->zoom_history = 2;
toolbar->zoom = (GtkComboBoxText *) ags_zoom_combo_box_new();
- gtk_combo_box_set_active((GtkComboBox *) toolbar->zoom, 4);
+ gtk_combo_box_set_active((GtkComboBox *) toolbar->zoom, 2);
gtk_toolbar_append_widget((GtkToolbar *) toolbar, (GtkWidget *) toolbar->zoom, NULL , NULL);
/* edit modes */
diff --git a/src/ags/X/editor/ags_toolbar_callbacks.c b/src/ags/X/editor/ags_toolbar_callbacks.c
index ed9f1c3..401bf46 100644
--- a/src/ags/X/editor/ags_toolbar_callbacks.c
+++ b/src/ags/X/editor/ags_toolbar_callbacks.c
@@ -304,13 +304,13 @@ ags_toolbar_zoom_callback(GtkComboBox *combo_box, AgsToolbar *toolbar)
history = gtk_combo_box_get_active(combo_box);
- zoom = exp2((double) history - 4.0);
- zoom_old = exp2((double) toolbar->zoom_history - 4.0);
+ zoom = exp2((double) history - 2.0);
+ zoom_old = exp2((double) toolbar->zoom_history - 2.0);
zoom_factor = 0.25;
- tact_factor = exp2(8.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
- tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 4.0);
+ tact_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom));
+ tact = exp2((double) gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->zoom) - 2.0);
toolbar->zoom_history = history;
--
gsequencer packaging
More information about the pkg-multimedia-commits
mailing list