aboutsummaryrefslogtreecommitdiffstats
path: root/src/support.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-04 15:26:35 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-04 17:05:41 -0300
commit657069d8da19cd1f35103bc233dd8e6a44224ceb (patch)
tree7d4a686b4ce825aa745043a49a3106f103eb8c10 /src/support.c
parent778a02eb5e31039bb0c23d3eabbab5963f45c90c (diff)
Unify coding style
The coding style of Camorama is a mess. It doesn't consistently follow the same style. Unify it by applying a coding style close to the Linux Kernel. There is an exception, however: here, we'll use indent with 4, and won't use tabs. Rationale for using the Kernel style: 1) The checkpatch.pl script there can do lots of cleanups; 2) There used to be a lindent line (with I still have here), with do several other style cleanups. So, most of the changes can happen on a more automatic way. Still, care should be taken with static constants, as Kernel initializes them with zeros, while userspace don't. Accidentally, I'm more familiar with this style, with makes easier for me to contribute :-D No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/support.c')
-rw-r--r--src/support.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/support.c b/src/support.c
index 98b081d..cb90cda 100644
--- a/src/support.c
+++ b/src/support.c
@@ -9,29 +9,29 @@
#include <gdk/gdkkeysyms.h>
#include <config.h>
-GtkWidget *xpm_label_box (gchar * xpm_filename)
+GtkWidget *xpm_label_box(gchar *xpm_filename)
{
GtkWidget *box;
GtkWidget *image;
/* Create box for image and label */
- box = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (box), 2);
+ box = gtk_hbox_new(FALSE, 0);
+ gtk_container_set_border_width(GTK_CONTAINER(box), 2);
/* Now on to the image stuff */
- image = gtk_image_new_from_file (xpm_filename);
+ image = gtk_image_new_from_file(xpm_filename);
/* Create a label for the button */
/* Pack the image and label into the box */
- gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 3);
+ gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 3);
- gtk_widget_show (image);
+ gtk_widget_show(image);
return box;
}
-int error_dialog (char *message)
+int error_dialog(char *message)
{
GtkWidget *dialog;
int test;
@@ -39,10 +39,9 @@ int error_dialog (char *message)
dialog = gtk_message_dialog_new(NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- "%s", message);
+ GTK_BUTTONS_CLOSE, "%s", message);
- test = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ test = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
return test;
}

Privacy Policy