[Xfce4-commits] [xfce/xfdesktop] 05/05: Some code formatting
noreply at xfce.org
noreply at xfce.org
Thu Mar 26 04:30:15 CET 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository xfce/xfdesktop.
commit bb1140b49afb837634aa6f15cbcbc6bf29450c71
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date: Tue Mar 17 11:47:29 2015 +0100
Some code formatting
Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
src/xfce-desktop-menu.c | 8 ++++----
src/xfce-desktop-menu.h | 4 ++--
src/xfdesktop-app-menu-item.c | 38 +++++++++++++++++++-------------------
src/xfdesktop-app-menu-item.h | 6 +++---
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/xfce-desktop-menu.c b/src/xfce-desktop-menu.c
index fd1a2a7..480b7cb 100644
--- a/src/xfce-desktop-menu.c
+++ b/src/xfce-desktop-menu.c
@@ -171,7 +171,7 @@ desktop_menu_add_items(XfceDesktopMenu *desktop_menu,
} else if(GARCON_IS_MENU_ITEM(l->data)) {
garcon_item = l->data;
- mi = xfdesktop_app_menu_item_new (GARCON_MENU_ITEM (garcon_item));
+ mi = xfdesktop_app_menu_item_new(GARCON_MENU_ITEM(garcon_item));
gtk_widget_show(mi);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
@@ -187,7 +187,7 @@ _generate_menu(XfceDesktopMenu *desktop_menu)
DBG("Load menu");
- if(!garcon_menu_load (desktop_menu->garcon_menu, NULL, &error)) {
+ if(!garcon_menu_load(desktop_menu->garcon_menu, NULL, &error)) {
g_warning("Unable to load menu: %s", error->message);
g_error_free(error);
return FALSE;
@@ -240,7 +240,7 @@ xfce_desktop_menu_new(gboolean deferred)
void
xfce_desktop_menu_populate_menu(XfceDesktopMenu *desktop_menu,
- GtkWidget *menu)
+ GtkWidget *menu)
{
g_return_if_fail(desktop_menu && menu);
@@ -293,7 +293,7 @@ xfce_desktop_menu_force_regen(XfceDesktopMenu *desktop_menu)
void
xfce_desktop_menu_set_show_icons(XfceDesktopMenu *desktop_menu,
- gboolean show_icons)
+ gboolean show_icons)
{
g_return_if_fail(desktop_menu != NULL);
diff --git a/src/xfce-desktop-menu.h b/src/xfce-desktop-menu.h
index 110ab95..62959e2 100644
--- a/src/xfce-desktop-menu.h
+++ b/src/xfce-desktop-menu.h
@@ -28,11 +28,11 @@ typedef struct _XfceDesktopMenu XfceDesktopMenu;
XfceDesktopMenu *xfce_desktop_menu_new(gboolean deferred);
void xfce_desktop_menu_populate_menu(XfceDesktopMenu *desktop_menu,
- GtkWidget *menu);
+ GtkWidget *menu);
GtkWidget *xfce_desktop_menu_get_widget(XfceDesktopMenu *desktop_menu);
void xfce_desktop_menu_force_regen(XfceDesktopMenu *desktop_menu);
void xfce_desktop_menu_set_show_icons(XfceDesktopMenu *desktop_menu,
- gboolean show_icons);
+ gboolean show_icons);
void xfce_desktop_menu_destroy(XfceDesktopMenu *desktop_menu);
diff --git a/src/xfdesktop-app-menu-item.c b/src/xfdesktop-app-menu-item.c
index a9161e0..213befa 100644
--- a/src/xfdesktop-app-menu-item.c
+++ b/src/xfdesktop-app-menu-item.c
@@ -123,7 +123,7 @@ xfdesktop_app_menu_item_set_property(GObject *object,
app_menu_item->item = g_value_dup_object(value);
g_signal_connect_swapped(G_OBJECT(app_menu_item->item), "changed",
G_CALLBACK(xfdesktop_app_menu_item_changed), app_menu_item);
- xfdesktop_app_menu_item_changed (app_menu_item);
+ xfdesktop_app_menu_item_changed(app_menu_item);
break;
default:
@@ -188,20 +188,20 @@ xfdesktop_app_menu_item_set_icon(XfdesktopAppMenuItem *app_menu_item)
if(gtk_icon_theme_has_icon(icon_theme, icon_name))
image = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_MENU);
else {
- if (g_path_is_absolute(icon_name)) {
+ if(g_path_is_absolute(icon_name)) {
pixbuf = gdk_pixbuf_new_from_file_at_scale(icon_name, w, h, TRUE, NULL);
} else {
/* try to lookup names like application.png in the theme */
p = strrchr(icon_name, '.');
- if (p) {
+ if(p) {
name = g_strndup(icon_name, p - icon_name);
pixbuf = gtk_icon_theme_load_icon(icon_theme, name, size, 0, NULL);
- g_free (name);
+ g_free(name);
name = NULL;
}
/* maybe they point to a file in the pixbufs folder */
- if (G_UNLIKELY(pixbuf == NULL)) {
+ if(G_UNLIKELY(pixbuf == NULL)) {
filename = g_build_filename("pixmaps", icon_name, NULL);
name = xfce_resource_lookup(XFCE_RESOURCE_DATA, filename);
g_free(filename);
@@ -244,15 +244,15 @@ xfdesktop_app_menu_item_changed(XfdesktopAppMenuItem *app_menu_item)
xfdesktop_app_menu_item_set_icon(app_menu_item);
label = garcon_menu_item_get_name(app_menu_item->item);
- if (G_UNLIKELY (label == NULL))
- label = "";
+ if(G_UNLIKELY(label == NULL))
+ label = "";
gtk_menu_item_set_label(GTK_MENU_ITEM(app_menu_item), label);
}
static void
-xfdesktop_app_menu_item_append_quote (GString *string,
- const gchar *unquoted)
+xfdesktop_app_menu_item_append_quote(GString *string,
+ const gchar *unquoted)
{
gchar *quoted;
@@ -367,7 +367,7 @@ xfdesktop_app_menu_item_edit_launcher(XfdesktopAppMenuItem *app_menu_item)
}
static void
-xfdesktop_app_menu_item_activate (XfdesktopAppMenuItem *app_menu_item)
+xfdesktop_app_menu_item_activate(XfdesktopAppMenuItem *app_menu_item)
{
XfconfChannel *channel;
gchar *command;
@@ -379,15 +379,15 @@ xfdesktop_app_menu_item_activate (XfdesktopAppMenuItem *app_menu_item)
TRACE("entering");
command = xfdesktop_app_menu_item_command(app_menu_item);
- if (command == NULL)
+ if(command == NULL)
return;
evt = (GdkEventButton *)gtk_get_current_event();
- channel = xfconf_channel_get (XFDESKTOP_CHANNEL);
- right_click_edits = xfconf_channel_get_bool (channel,
- "/desktop-icons/right-click-edits-menu",
- TRUE);
+ channel = xfconf_channel_get(XFDESKTOP_CHANNEL);
+ right_click_edits = xfconf_channel_get_bool(channel,
+ "/desktop-icons/right-click-edits-menu",
+ TRUE);
/* See if we're trying to edit the launcher */
if(evt && GDK_BUTTON_RELEASE == evt->type) {
@@ -416,17 +416,17 @@ xfdesktop_app_menu_item_activate (XfdesktopAppMenuItem *app_menu_item)
}
GtkWidget *
-xfdesktop_app_menu_item_new (GarconMenuItem *item)
+xfdesktop_app_menu_item_new(GarconMenuItem *item)
{
g_return_val_if_fail(GARCON_IS_MENU_ITEM(item), NULL);
- return g_object_new (XFDESKTOP_TYPE_APP_MENU_ITEM,
- "item", item, NULL);
+ return g_object_new(XFDESKTOP_TYPE_APP_MENU_ITEM,
+ "item", item, NULL);
}
void
-xfdesktop_app_menu_item_set_show_icon (gboolean show_icon)
+xfdesktop_app_menu_item_set_show_icon(gboolean show_icon)
{
global_show_icons = show_icon;
}
diff --git a/src/xfdesktop-app-menu-item.h b/src/xfdesktop-app-menu-item.h
index 3d08367..67ae217 100644
--- a/src/xfdesktop-app-menu-item.h
+++ b/src/xfdesktop-app-menu-item.h
@@ -27,11 +27,11 @@
G_BEGIN_DECLS
-#define XFDESKTOP_TYPE_APP_MENU_ITEM (xfdesktop_app_menu_item_get_type())
+#define XFDESKTOP_TYPE_APP_MENU_ITEM (xfdesktop_app_menu_item_get_type())
#define XFDESKTOP_APP_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XFDESKTOP_TYPE_APP_MENU_ITEM, XfdesktopAppMenuItem))
#define XFDESKTOP_APP_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), XFDESKTOP_TYPE_APP_MENU_ITEM, XfdesktopAppMenuItemClass))
-#define XFCE_IS_APP_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDESKTOP_TYPE_APP_MENU_ITEM))
-#define XFCE_IS_APP_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), XFDESKTOP_TYPE_APP_MENU_ITEM))
+#define XFCE_IS_APP_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDESKTOP_TYPE_APP_MENU_ITEM))
+#define XFCE_IS_APP_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), XFDESKTOP_TYPE_APP_MENU_ITEM))
#define XFDESKTOP_APP_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), XFDESKTOP_TYPE_APP_MENU_ITEM, XfdesktopAppMenuItemClass))
typedef struct _XfdesktopAppMenuItem XfdesktopAppMenuItem;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list