Skip to content

Commit

Permalink
Update style to indent cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWiseNoob committed Dec 8, 2023
1 parent 111f23b commit 25f3b41
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Language: Cpp
BasedOnStyle: GNU

AlignAfterOpenBracket: BlockIndent
BreakBeforeBraces: Stroustrup
ColumnLimit: 80
IndentCaseLabels: true
IndentWidth: 4
PointerAlignment: Left
3 changes: 1 addition & 2 deletions src/app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
#include "appwin.h"
#include "sidebar.h"

struct _OMPApp
{
struct _OMPApp {
AdwApplication parent;
};

Expand Down
3 changes: 1 addition & 2 deletions src/appwin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#include "appwin.h"
#include "sidebar.h"

struct _OMPAppWindow
{
struct _OMPAppWindow {
AdwApplicationWindow parent;

GtkWidget* sidebar;
Expand Down
63 changes: 22 additions & 41 deletions src/sidebar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,21 @@
#include <adwaita.h>
#include <gtk/gtk.h>

struct _OMPSidebar
{
struct _OMPSidebar {
AdwBin parent;

GtkWidget* show_sidebar_button;
gboolean sidebar_button_active;
};

enum
{
PROP_0,
PROP_SIDEBAR_BUTTON_ACTIVE,
NUM_PROPERTIES
};
enum { PROP_0, PROP_SIDEBAR_BUTTON_ACTIVE, NUM_PROPERTIES };

enum
{
SHOW_PANEL,
LAST_SIGNAL
};
enum { SHOW_PANEL, LAST_SIGNAL };

static GParamSpec* properties[NUM_PROPERTIES] = {
NULL,
};

static gint signals[LAST_SIGNAL] = {
0,
};
Expand All @@ -47,20 +38,15 @@ omp_sidebar_get_property (
{
OMPSidebar* self = OMP_APP_SIDEBAR (object);

switch (property_id)
{
case PROP_SIDEBAR_BUTTON_ACTIVE:
{
g_value_set_boolean (value, self->sidebar_button_active);
}
break;

default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
break;
}
switch (property_id) {
case PROP_SIDEBAR_BUTTON_ACTIVE: {
g_value_set_boolean (value, self->sidebar_button_active);
} break;

default: {
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
} break;
}
}

static void
Expand All @@ -70,20 +56,15 @@ omp_sidebar_set_property (
{
OMPSidebar* self = OMP_APP_SIDEBAR (object);

switch (property_id)
{
case PROP_SIDEBAR_BUTTON_ACTIVE:
{
self->sidebar_button_active = g_value_get_boolean (value);
}
break;

default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
break;
}
switch (property_id) {
case PROP_SIDEBAR_BUTTON_ACTIVE: {
self->sidebar_button_active = g_value_get_boolean (value);
} break;

default: {
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
} break;
}
}

static void
Expand Down

0 comments on commit 25f3b41

Please sign in to comment.