Skip to content
Snippets Groups Projects
Commit f96d8651 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

* #6326 : gives the start/stop preview button a fixed size

remove redundant "preview"
parent 87ee4787
Branches
No related tags found
No related merge requests found
...@@ -108,7 +108,7 @@ preview_is_running_cb(GObject *obj, GParamSpec *pspec, gpointer user_data) ...@@ -108,7 +108,7 @@ preview_is_running_cb(GObject *obj, GParamSpec *pspec, gpointer user_data)
g_object_get(obj, "running", &running, NULL); g_object_get(obj, "running", &running, NULL);
if (!running) { if (!running) {
GtkButton *button = GTK_BUTTON(user_data); GtkButton *button = GTK_BUTTON(user_data);
gtk_button_set_label(button, "_Start preview"); gtk_button_set_label(button, "_Start");
dbus_stop_video_preview(); dbus_stop_video_preview();
} }
return TRUE; return TRUE;
...@@ -153,8 +153,8 @@ static void ...@@ -153,8 +153,8 @@ static void
preview_button_clicked(GtkButton *button, gpointer data UNUSED) preview_button_clicked(GtkButton *button, gpointer data UNUSED)
{ {
preview_button = GTK_WIDGET(button); preview_button = GTK_WIDGET(button);
if (g_strcmp0(gtk_button_get_label(button), "_Start preview") == 0) { if (g_strcmp0(gtk_button_get_label(button), "_Start") == 0) {
gtk_button_set_label(button, "_Stop preview"); gtk_button_set_label(button, "_Stop");
static const char *formats[2] = { "rgb24", "bgra" }; static const char *formats[2] = { "rgb24", "bgra" };
...@@ -163,7 +163,7 @@ preview_button_clicked(GtkButton *button, gpointer data UNUSED) ...@@ -163,7 +163,7 @@ preview_button_clicked(GtkButton *button, gpointer data UNUSED)
} }
else { else {
/* user clicked stop */ /* user clicked stop */
gtk_button_set_label(button, "_Start preview"); gtk_button_set_label(button, "_Start");
dbus_stop_video_preview(); dbus_stop_video_preview();
} }
} }
...@@ -789,7 +789,8 @@ GtkWidget* create_video_configuration() ...@@ -789,7 +789,8 @@ GtkWidget* create_video_configuration()
gnome_main_section_new_with_table (_ ("Preview"), &frame, &table, 1, 2); gnome_main_section_new_with_table (_ ("Preview"), &frame, &table, 1, 2);
gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
preview_button = gtk_button_new_with_mnemonic(_("_Start preview")); preview_button = gtk_button_new_with_mnemonic(_("_Start"));
gtk_widget_set_size_request(preview_button, 80, 30);
gtk_table_attach(GTK_TABLE(table), preview_button, 0, 1, 0, 1, 0, 0, 0, 6); gtk_table_attach(GTK_TABLE(table), preview_button, 0, 1, 0, 1, 0, 0, 0, 6);
g_signal_connect(G_OBJECT(preview_button), "clicked", G_CALLBACK(preview_button_clicked), NULL); g_signal_connect(G_OBJECT(preview_button), "clicked", G_CALLBACK(preview_button_clicked), NULL);
gtk_widget_show(GTK_WIDGET(preview_button)); gtk_widget_show(GTK_WIDGET(preview_button));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment