Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Glade
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
Package 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
ZenWalker
Glade
Commits
29d16f4b
Commit
29d16f4b
authored
Sep 25, 2020
by
Juan Pablo Ugarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GladeProject: cleanup glade_project_command_paste()
parent
ccd09e9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
19 deletions
+5
-19
gladeui/glade-project.c
gladeui/glade-project.c
+5
-19
No files found.
gladeui/glade-project.c
View file @
29d16f4b
...
...
@@ -5318,8 +5318,7 @@ glade_project_command_paste (GladeProject *project,
{
GladeClipboard
*
clipboard
;
GList
*
list
;
GladeWidget
*
widget
=
NULL
,
*
parent
;
gint
placeholder_relations
=
0
;
GladeWidget
*
widget
=
NULL
,
*
parent
=
NULL
;
g_return_if_fail
(
GLADE_IS_PROJECT
(
project
));
...
...
@@ -5339,8 +5338,10 @@ glade_project_command_paste (GladeProject *project,
/* If there is a selection, paste in to the selected widget, otherwise
* paste into the placeholder's parent, or at the toplevel
*/
parent
=
list
?
glade_widget_get_from_gobject
(
list
->
data
)
:
(
placeholder
)
?
glade_placeholder_get_parent
(
placeholder
)
:
NULL
;
if
(
list
)
parent
=
glade_widget_get_from_gobject
(
list
->
data
);
else
if
(
placeholder
)
parent
=
glade_placeholder_get_parent
(
placeholder
);
widget
=
glade_clipboard_widgets
(
clipboard
)
?
glade_clipboard_widgets
(
clipboard
)
->
data
:
NULL
;
...
...
@@ -5393,21 +5394,6 @@ glade_project_command_paste (GladeProject *project,
}
}
/* Check that we have compatible heirarchies */
for
(
list
=
glade_clipboard_widgets
(
clipboard
);
list
&&
list
->
data
;
list
=
list
->
next
)
{
widget
=
list
->
data
;
if
(
!
GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL
(
glade_widget_get_adaptor
(
widget
))
&&
parent
)
{
/* Count placeholder relations
*/
if
(
glade_widget_placeholder_relation
(
parent
,
widget
))
placeholder_relations
++
;
}
}
glade_command_paste
(
glade_clipboard_widgets
(
clipboard
),
parent
,
placeholder
,
project
);
}
...
...
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