Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
calls
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Evangelos Ribeiro Tzaras
calls
Commits
ff4418f9
Commit
ff4418f9
authored
Jan 13, 2021
by
Evangelos Ribeiro Tzaras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
record-row: hide copy number menu item
for anonymous callers
parent
1b05ddf7
Pipeline
#63157
failed with stages
in 5 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/calls-call-record-row.c
src/calls-call-record-row.c
+8
-9
src/ui/call-record-row.ui
src/ui/call-record-row.ui
+1
-0
No files found.
src/calls-call-record-row.c
View file @
ff4418f9
...
...
@@ -330,6 +330,12 @@ static void
contact_name_cb
(
CallsCallRecordRow
*
self
)
{
const
gchar
*
name
=
NULL
;
g_autofree
gchar
*
target
=
NULL
;
GAction
*
act
=
g_action_map_lookup_action
(
self
->
action_map
,
"copy-number"
);
g_object_get
(
G_OBJECT
(
self
->
record
),
"target"
,
&
target
,
NULL
);
if
(
self
->
contact
)
{
...
...
@@ -342,21 +348,17 @@ contact_name_cb (CallsCallRecordRow *self)
}
else
{
g_autofree
gchar
*
target
=
NULL
;
g_object_get
(
G_OBJECT
(
self
->
record
),
"target"
,
&
target
,
NULL
);
if
(
!
g_strcmp0
(
target
,
""
))
{
gtk_label_set_text
(
self
->
target
,
ANONYMOUS_CALLER
);
gtk_actionable_set_action_name
(
GTK_ACTIONABLE
(
self
->
button
),
NULL
);
g_simple_action_set_enabled
(
G_SIMPLE_ACTION
(
act
),
FALSE
);
}
else
{
gtk_label_set_text
(
self
->
target
,
target
);
gtk_actionable_set_action_name
(
GTK_ACTIONABLE
(
self
->
button
),
"app.dial"
);
g_simple_action_set_enabled
(
G_SIMPLE_ACTION
(
act
),
TRUE
);
}
}
}
...
...
@@ -648,9 +650,6 @@ calls_call_record_row_init (CallsCallRecordRow *self)
act
=
g_action_map_lookup_action
(
self
->
action_map
,
"delete-call"
);
g_simple_action_set_enabled
(
G_SIMPLE_ACTION
(
act
),
TRUE
);
act
=
g_action_map_lookup_action
(
self
->
action_map
,
"copy-number"
);
g_simple_action_set_enabled
(
G_SIMPLE_ACTION
(
act
),
TRUE
);
self
->
gesture
=
gtk_gesture_long_press_new
(
GTK_WIDGET
(
self
->
event_box
));
gtk_gesture_single_set_touch_only
(
GTK_GESTURE_SINGLE
(
self
->
gesture
),
TRUE
);
g_signal_connect
(
self
->
gesture
,
"pressed"
,
G_CALLBACK
(
long_pressed
),
self
);
...
...
src/ui/call-record-row.ui
View file @
ff4418f9
...
...
@@ -116,6 +116,7 @@
<!-- Translators: This is a phone number -->
<attribute
name=
"label"
translatable=
"yes"
>
_Copy number
</attribute>
<attribute
name=
"action"
>
copy-number
</attribute>
<attribute
name=
"hidden-when"
>
action-disabled
</attribute>
</item>
</section>
</menu>
...
...
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