Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
polkit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zbigniew Jędrzejewski-Szmek
polkit
Commits
048b4207
Commit
048b4207
authored
Jun 02, 2009
by
David Zeuthen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return the icon name instead of a GIcon in PolkitActionDescription
parent
0d3aef69
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
45 deletions
+10
-45
docs/polkit/polkit-1-sections.txt
docs/polkit/polkit-1-sections.txt
+1
-1
src/polkit/polkitactiondescription.c
src/polkit/polkitactiondescription.c
+3
-27
src/polkit/polkitactiondescription.h
src/polkit/polkitactiondescription.h
+1
-1
src/polkitbackend/polkitbackendlocalauthority.c
src/polkitbackend/polkitbackendlocalauthority.c
+1
-7
src/programs/polkit.c
src/programs/polkit.c
+4
-9
No files found.
docs/polkit/polkit-1-sections.txt
View file @
048b4207
...
@@ -225,7 +225,7 @@ polkit_action_description_get_description
...
@@ -225,7 +225,7 @@ polkit_action_description_get_description
polkit_action_description_get_message
polkit_action_description_get_message
polkit_action_description_get_vendor_name
polkit_action_description_get_vendor_name
polkit_action_description_get_vendor_url
polkit_action_description_get_vendor_url
polkit_action_description_get_icon
polkit_action_description_get_icon
_name
polkit_action_description_get_implicit_any
polkit_action_description_get_implicit_any
polkit_action_description_get_implicit_inactive
polkit_action_description_get_implicit_inactive
polkit_action_description_get_implicit_active
polkit_action_description_get_implicit_active
...
...
src/polkit/polkitactiondescription.c
View file @
048b4207
...
@@ -45,8 +45,6 @@ struct _PolkitActionDescription
...
@@ -45,8 +45,6 @@ struct _PolkitActionDescription
_PolkitActionDescription
*
real
;
_PolkitActionDescription
*
real
;
gchar
**
annotation_keys
;
gchar
**
annotation_keys
;
GIcon
*
icon
;
};
};
struct
_PolkitActionDescriptionClass
struct
_PolkitActionDescriptionClass
...
@@ -72,9 +70,6 @@ polkit_action_description_finalize (GObject *object)
...
@@ -72,9 +70,6 @@ polkit_action_description_finalize (GObject *object)
g_strfreev
(
action_description
->
annotation_keys
);
g_strfreev
(
action_description
->
annotation_keys
);
if
(
action_description
->
icon
!=
NULL
)
g_object_unref
(
action_description
->
icon
);
if
(
G_OBJECT_CLASS
(
polkit_action_description_parent_class
)
->
finalize
!=
NULL
)
if
(
G_OBJECT_CLASS
(
polkit_action_description_parent_class
)
->
finalize
!=
NULL
)
G_OBJECT_CLASS
(
polkit_action_description_parent_class
)
->
finalize
(
object
);
G_OBJECT_CLASS
(
polkit_action_description_parent_class
)
->
finalize
(
object
);
}
}
...
@@ -153,29 +148,10 @@ polkit_action_description_get_implicit_active (PolkitActionDescription *action_d
...
@@ -153,29 +148,10 @@ polkit_action_description_get_implicit_active (PolkitActionDescription *action_d
}
}
GIcon
*
const
gchar
*
polkit_action_description_get_icon
(
PolkitActionDescription
*
action_description
)
polkit_action_description_get_icon
_name
(
PolkitActionDescription
*
action_description
)
{
{
const
gchar
*
icon_name
;
return
_polkit_action_description_get_icon_name
(
action_description
->
real
);
GError
*
error
;
if
(
action_description
->
icon
!=
NULL
)
goto
out
;
icon_name
=
_polkit_action_description_get_icon_name
(
action_description
->
real
);
if
(
icon_name
==
NULL
||
strlen
(
icon_name
)
==
0
)
goto
out
;
error
=
NULL
;
action_description
->
icon
=
g_icon_new_for_string
(
icon_name
,
&
error
);
if
(
action_description
->
icon
==
NULL
)
{
g_warning
(
"polkit_action_description_get_icon: %s"
,
error
->
message
);
g_error_free
(
error
);
}
out:
return
action_description
->
icon
;
}
}
const
gchar
*
const
gchar
*
...
...
src/polkit/polkitactiondescription.h
View file @
048b4207
...
@@ -50,7 +50,7 @@ const gchar *polkit_action_description_get_description (PolkitActi
...
@@ -50,7 +50,7 @@ const gchar *polkit_action_description_get_description (PolkitActi
const
gchar
*
polkit_action_description_get_message
(
PolkitActionDescription
*
action_description
);
const
gchar
*
polkit_action_description_get_message
(
PolkitActionDescription
*
action_description
);
const
gchar
*
polkit_action_description_get_vendor_name
(
PolkitActionDescription
*
action_description
);
const
gchar
*
polkit_action_description_get_vendor_name
(
PolkitActionDescription
*
action_description
);
const
gchar
*
polkit_action_description_get_vendor_url
(
PolkitActionDescription
*
action_description
);
const
gchar
*
polkit_action_description_get_vendor_url
(
PolkitActionDescription
*
action_description
);
GIcon
*
polkit_action_description_get_icon
(
PolkitActionDescription
*
action_description
);
const
gchar
*
polkit_action_description_get_icon_name
(
PolkitActionDescription
*
action_description
);
PolkitImplicitAuthorization
polkit_action_description_get_implicit_any
(
PolkitActionDescription
*
action_description
);
PolkitImplicitAuthorization
polkit_action_description_get_implicit_any
(
PolkitActionDescription
*
action_description
);
PolkitImplicitAuthorization
polkit_action_description_get_implicit_inactive
(
PolkitActionDescription
*
action_description
);
PolkitImplicitAuthorization
polkit_action_description_get_implicit_inactive
(
PolkitActionDescription
*
action_description
);
...
...
src/polkitbackend/polkitbackendlocalauthority.c
View file @
048b4207
...
@@ -1614,13 +1614,7 @@ get_localized_data_for_challenge (PolkitBackendLocalAuthority *authority,
...
@@ -1614,13 +1614,7 @@ get_localized_data_for_challenge (PolkitBackendLocalAuthority *authority,
}
}
if
(
icon_name
==
NULL
)
if
(
icon_name
==
NULL
)
{
{
GIcon
*
icon
;
icon_name
=
g_strdup
(
polkit_action_description_get_icon_name
(
action_desc
));
icon
=
polkit_action_description_get_icon
(
action_desc
);
if
(
icon
!=
NULL
)
{
icon_name
=
g_icon_to_string
(
icon
);
//g_object_unref (icon);
}
}
}
...
...
src/programs/polkit.c
View file @
048b4207
...
@@ -372,13 +372,13 @@ print_action (PolkitActionDescription *action)
...
@@ -372,13 +372,13 @@ print_action (PolkitActionDescription *action)
{
{
const
gchar
*
vendor
;
const
gchar
*
vendor
;
const
gchar
*
vendor_url
;
const
gchar
*
vendor_url
;
GIcon
*
icon
;
const
gchar
*
icon_name
;
const
gchar
*
const
*
annotation_keys
;
const
gchar
*
const
*
annotation_keys
;
guint
n
;
guint
n
;
vendor
=
polkit_action_description_get_vendor_name
(
action
);
vendor
=
polkit_action_description_get_vendor_name
(
action
);
vendor_url
=
polkit_action_description_get_vendor_url
(
action
);
vendor_url
=
polkit_action_description_get_vendor_url
(
action
);
icon
=
polkit_action_description_get_icon
(
action
);
icon
_name
=
polkit_action_description_get_icon_name
(
action
);
g_print
(
"%s:
\n
"
,
polkit_action_description_get_action_id
(
action
));
g_print
(
"%s:
\n
"
,
polkit_action_description_get_action_id
(
action
));
g_print
(
" description: %s
\n
"
,
polkit_action_description_get_description
(
action
));
g_print
(
" description: %s
\n
"
,
polkit_action_description_get_description
(
action
));
...
@@ -388,13 +388,8 @@ print_action (PolkitActionDescription *action)
...
@@ -388,13 +388,8 @@ print_action (PolkitActionDescription *action)
if
(
vendor_url
!=
NULL
)
if
(
vendor_url
!=
NULL
)
g_print
(
" vendor_url: %s
\n
"
,
vendor_url
);
g_print
(
" vendor_url: %s
\n
"
,
vendor_url
);
if
(
icon
!=
NULL
)
if
(
icon_name
!=
NULL
)
{
g_print
(
" icon: %s
\n
"
,
icon_name
);
gchar
*
s
;
s
=
g_icon_to_string
(
icon
);
g_print
(
" icon: %s
\n
"
,
s
);
g_free
(
s
);
}
g_print
(
" implicit any: %s
\n
"
,
polkit_implicit_authorization_to_string
(
polkit_action_description_get_implicit_any
(
action
)));
g_print
(
" implicit any: %s
\n
"
,
polkit_implicit_authorization_to_string
(
polkit_action_description_get_implicit_any
(
action
)));
g_print
(
" implicit inactive: %s
\n
"
,
polkit_implicit_authorization_to_string
(
polkit_action_description_get_implicit_inactive
(
action
)));
g_print
(
" implicit inactive: %s
\n
"
,
polkit_implicit_authorization_to_string
(
polkit_action_description_get_implicit_inactive
(
action
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment