Formatting fixes

This commit is contained in:
Matthias Clasen 2014-12-23 18:37:28 -05:00
parent 79ada68f8c
commit a7cf67f201

View File

@ -1,5 +1,4 @@
/*
* gtkappchooserbutton.h: an app-chooser combobox
/* gtkappchooserbutton.c: an app-chooser combobox
*
* Copyright (C) 2010 Red Hat, Inc.
*
@ -172,7 +171,8 @@ select_application_func_cb (GtkTreeModel *model,
gpointer user_data)
{
SelectAppData *data = user_data;
GAppInfo *app_to_match = data->info, *app = NULL;
GAppInfo *app_to_match = data->info;
GAppInfo *app = NULL;
gboolean custom;
gboolean result;
@ -251,7 +251,8 @@ other_application_item_activated_cb (GtkAppChooserButton *self)
GtkWindow *toplevel;
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self)));
dialog = gtk_app_chooser_dialog_new_for_content_type (toplevel, GTK_DIALOG_DESTROY_WITH_PARENT,
dialog = gtk_app_chooser_dialog_new_for_content_type (toplevel,
GTK_DIALOG_DESTROY_WITH_PARENT,
self->priv->content_type);
gtk_window_set_modal (GTK_WINDOW (dialog), gtk_window_get_modal (toplevel));
@ -575,7 +576,6 @@ gtk_app_chooser_button_finalize (GObject *obj)
g_hash_table_destroy (self->priv->custom_item_names);
g_free (self->priv->content_type);
g_free (self->priv->heading);
g_object_unref (self->priv->store);
G_OBJECT_CLASS (gtk_app_chooser_button_parent_class)->finalize (obj);
@ -636,7 +636,6 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (oclass, PROP_SHOW_DEFAULT_ITEM, pspec);
/**
* GtkAppChooserButton:heading:
*
@ -647,10 +646,9 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
P_("Heading"),
P_("The text to show at the top of the dialog"),
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (oclass, PROP_HEADING, pspec);
/**
* GtkAppChooserButton::custom-item-activated:
* @self: the object which received the signal
@ -676,9 +674,7 @@ gtk_app_chooser_button_init (GtkAppChooserButton *self)
{
self->priv = gtk_app_chooser_button_get_instance_private (self);
self->priv->custom_item_names =
g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
self->priv->store = gtk_list_store_new (NUM_COLUMNS,
G_TYPE_APP_INFO,
G_TYPE_STRING, /* name */
@ -696,8 +692,7 @@ app_chooser_button_iter_from_custom_name (GtkAppChooserButton *self,
GtkTreeIter iter;
gchar *custom_name = NULL;
if (!gtk_tree_model_get_iter_first
(GTK_TREE_MODEL (self->priv->store), &iter))
if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (self->priv->store), &iter))
return FALSE;
do {
@ -729,8 +724,7 @@ real_insert_custom_item (GtkAppChooserButton *self,
{
if (custom)
{
if (g_hash_table_lookup (self->priv->custom_item_names,
name) != NULL)
if (g_hash_table_lookup (self->priv->custom_item_names, name) != NULL)
{
g_warning ("Attempting to add custom item %s to GtkAppChooserButton, "
"when there's already an item with the same name", name);
@ -855,11 +849,10 @@ gtk_app_chooser_button_set_active_custom_item (GtkAppChooserButton *self,
g_return_if_fail (GTK_IS_APP_CHOOSER_BUTTON (self));
g_return_if_fail (name != NULL);
if (g_hash_table_lookup (self->priv->custom_item_names, name) == NULL ||
if (!g_hash_table_contains (self->priv->custom_item_names, name) ||
!app_chooser_button_iter_from_custom_name (self, name, &iter))
{
g_warning ("Can't find the item named %s in the app chooser.",
name);
g_warning ("Can't find the item named %s in the app chooser.", name);
return;
}