Commit Graph

878 Commits

Author SHA1 Message Date
Markus Göllnitz
3d5ff3dbdc contacts-box: adjust search bar's margin inside toolbar
A toolbar view, per its docs, expects its toolbar
children to either be of a set of known widget types that
are supported by default, or otherwise be a Gtk.Box-like
container with the .toolbar CSS style class.

This expectation was not met, but instead similar, but
not identical margins manually applied. These similar yet
different margins made it look off.

While this now adheres to the toolbar child requirements
of libadwaita, and the margins look more familiar, it
still breaks with libadwaita's assumption that toolbars
are not stacked. Its stylesheet allows for stacking
toolbar views only if one is providing the top and the
other the bottom one.

This view, especially, deserves a more thorough design
overhaul, regardless of this. Thus, I will leave it at
this.

Link: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ToolbarView.html

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/791>
2025-10-10 18:37:07 +00:00
Markus Göllnitz
cab52d464c new-call-box: wrap dialer in scrolled window
It was possible to increase the window's size below the
minimum size of the dialer view. As such it is important
to wrap it in a scrolled window in order not to lose
access to otherwise hidden interface components.

This is, of course, not a replacement for a better
adapting dialer.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/791>
2025-10-10 18:37:07 +00:00
Markus Göllnitz
f7da8ecfbb main-window: move bottom switcher to toolbar
The toolbar view is meant for these. This allows
libadwaita's style to apply the way it can be seen in
basically every other GNOME app.

The differences are with the scroll dependent undershoot
instead of an unconditional border.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/791>
2025-10-10 18:37:07 +00:00
Markus Göllnitz
ba3e0b47ed main-window: increase width of switcher breakpoint
The current breakpoint is more or less perfect for
English. However, there are other languages with longer
strings there, such as German. Increasing the width at
which the breakpoint sits to switch the switcher location
enables most languages to have no or minimal ellipses
while not looking too spacious with English.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/791>
2025-10-10 18:37:07 +00:00
Guido Günther
574e1f79a3 application: Drop ignore_activation flag
Rather use gapplication service. This makes the flow similar to what
Chatty does and makes us hold/release rather than having an application
window.

It also allows us to drop the --daemon.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/760>
2025-08-30 10:52:20 +00:00
Guido Günther
fbfe680f6a application: Validate daemon flag only on first startup
The activate method is used when the application is activated via
various means - e.g. via the `Activate` DBus method. We don't want to
ignore that activation just because calls was started with the
`--daemon` option. Rename the variable to better match what it means.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/760>
2025-08-30 10:52:20 +00:00
Guido Günther
24542d3bc2 application: Don't try to remove inexistent window
If the app never showed a window (e.g. in daemon mode) this
would otherwise raise a critical.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/760>
2025-08-30 10:52:20 +00:00
Boris Shtrasman
b640733424 emergency-call-types: add Israeli emergency numbers
Signed-off-by: Boris Shtrasman <41102-borissh@users.noreply.gitlab.gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/785>
2025-07-19 00:43:55 +03:00
Vivek wagdare
23b2208c1c contacts-box: Add vertical margins to SearchEntry in contacts view
Add proper vertical margins (12px) to the SearchEntry widget in the
contacts view to improve spacing and visual consistency. This matches
the existing horizontal margins and follows GNOME design guidelines.

This change improves the visual appearance by preventing the search bar
from appearing cramped, especially when using high-contrast themes.

Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/672
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/762>
2025-05-24 18:03:09 +02:00
knoppix
ef9db6ce84 main-window.ui: add a proper callback for Close button
The signal click of Close button is connected to "gtk_widget_hide".
As a result the window is hided, but still active and the whole
program renders unresponsive.

The Close button can appear for example if USSD_STATUS_IDLE comes
before a user press Cancel button in dialog window
(could be for example because of carrier timeout).
The "adw_dialog_close" function should be called instead.

Signed-off-by: knoppix <knoppix@4d2.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/776>
2025-05-24 15:53:43 +00:00
Guido Günther
a7caa59fba account-overview: Ref list models
GTK4's filters models swallow the reference.

Without this calls crashes like this:

```
    #0  g_type_check_instance (type_instance=type_instance@entry=0x555c0f84ce90) at ../../../gobject/gtype.c:4024
    #1  0x00007f0837af6e18 in g_signal_handlers_disconnect_matched
        (instance=0x555c0f84ce90, mask=mask@entry=(G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), signal_id=signal_id@entry=0, detail=detail@entry=0, closure=closure@entry=0x0, func=func@entry=0x7f0836f828a0 <gtk_filter_list_model_items_changed_cb>, data=0x555c0f84f1b0) at ../../../gobject/gsignal.c:3007
    #2  0x00007f0836f82459 in gtk_filter_list_model_clear_model (self=self@entry=0x555c0f84f1b0 [GtkFilterListModel]) at ../../../gtk/gtkfilterlistmodel.c:497
    #3  0x00007f0836f824f4 in gtk_filter_list_model_clear_model (self=0x555c0f84f1b0 [GtkFilterListModel]) at ../../../gtk/gtkfilterlistmodel.c:493
    #4  gtk_filter_list_model_dispose (object=0x555c0f84f1b0 [GtkFilterListModel]) at ../../../gtk/gtkfilterlistmodel.c:661
    #5  0x00007f0837ae1289 in g_object_unref (_object=0x555c0f84f1b0) at ../../../gobject/gobject.c:4438
    #6  0x00007f08379b47f3 in g_hash_table_remove_all_nodes (hash_table=hash_table@entry=0x555c0f84d2c0, notify=notify@entry=1, destruction=destruction@entry=1)
        at ../../../glib/ghash.c:656
    #7  0x00007f08379b53a3 in g_hash_table_remove_all_nodes (hash_table=0x555c0f84d2c0, notify=1, destruction=1) at ../../../glib/ghash.c:578
    #8  g_hash_table_unref (hash_table=0x555c0f84d2c0) at ../../../glib/ghash.c:1438
    #9  g_hash_table_unref (hash_table=0x555c0f84d2c0) at ../../../glib/ghash.c:1432
    #10 0x0000555bf0b649b2 in calls_manager_finalize (object=0x555c0f84b800 [CallsManager]) at ../src/calls-manager.c:465
    #11 0x00007f0837ae14fe in g_object_unref (_object=0x555c0f84b800) at ../../../gobject/gobject.c:4509
    #12 0x0000555bf0b5b92d in finalize (object=0x555c0f82fcb0 [CallsApplication]) at ../src/calls-application.c:780
    #13 0x00007f0837ae14fe in g_object_unref (_object=0x555c0f82fcb0) at ../../../gobject/gobject.c:4509
    #14 0x0000555bf0b58cd4 in main (argc=1, argv=0x7fffc05d57a8) at ../src/main.c:47
```

Steps to reproduce:

- start calls
- open account dialog
- close account dialog
- hit control-c to end calls daemon
- observe above crash

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/777>
2025-05-05 12:37:05 +00:00
Guido Günther
7c0fcbc158 call-box: Use correct property
There's no `selected-index` property. This makes sure we properly switch
between keypad and text entry.

Fixes ee3abc0 ("treewide: Replace libhandy with libadwaita")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/775>
2025-04-28 16:19:32 +02:00
Guido Günther
d275a1cedc ussd-dialog: Reindent
Done as a separate commit to ease review

Gbp-Dch: Ignore
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
2024-11-10 16:53:48 +01:00
Guido Günther
4bd12c1102 ussd-dialog: Use AdwSpinner
Make it a bit larger while at that

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
2024-11-10 16:53:48 +01:00
Guido Günther
d5cc163801 main-window: Use AdwDialog for USSD
We grab the focus hence making the text entry easy to identify and by
following the content size we get a reasonable width.

Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/681

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
2024-11-10 16:53:48 +01:00
Guido Günther
047b5a1495 ussd-dialog: Simplify navigation
Focus the entry by default so we keep the OSK open when there's
additional input required

Helps: https://gitlab.gnome.org/GNOME/calls/-/issues/681

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
2024-11-10 16:53:48 +01:00
Guido Günther
39d953c011 ussd-dialog: Set phone input purose on entry
USSD menus are usually navigatable with dumb phone keyboards
so this makes a good default.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
2024-11-10 16:53:48 +01:00
Guido Günther
52e7f56efd main-window: Set log domain
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
2024-11-10 16:53:48 +01:00
Guido Günther
8d1a339cf1 build: Bump libadwaita dependency to 1.6
Needed for AdwSpinner

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/761>
2024-11-10 16:53:48 +01:00
Guido Günther
38ad7dae2a call-record-row: Turn the realized check into a critical
This makes sure we don't ignore it should it happen again.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
4baa4f5141 call-record-row: Unparent popover in dispose
Finalize is too late to break reference cycles.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
6d9b88546d util: Drop now unused macros
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
08a01fb1c5 call-record-row: Use g_clear_signal_handler
glib is recent enough nowadays

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
2f8877b107 call-record-row: Drop superfluous cast
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
f4e8373eaa history-box: Keep ref on list model
The gtk_*list_model_new() functions are `transfer: full` for the model.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
12812f64c6 history-box: No need to unparent the stack
GTK cleans up for us

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
e2f3f5ef53 settings: Don't leak autoload plugins
Use the correct cleanup func

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
313d18509d settings: Don't leak audio codecs
Use the correct cleanup func

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
141eb85580 calls-manager: Don't leak hash tables
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
fc9aabb1ec calls-manager: Keep ref on list models
The gtk_*list_model_new() functions are `transfer: full` for the model.
Since we keep accessing the underlying models we keep the refs for clear
ownership and drop them in finalize.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
2024-09-21 06:23:20 +00:00
Guido Günther
2b5d2f53a9 calls-notifier: Use official notification category
See https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/50

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/748>
2024-09-21 06:15:19 +00:00
Evangelos Ribeiro Tzaras
b15d557106 record-row: Only popup context menu if row is realized
This works around the long press gesture
(mis?) firing the "press" signal on a
row that is not realized anymore
(because the slice model in the history box
 currently rebuilds all rows when the items change).

Fixes: https://gitlab.gnome.org/GNOME/calls/-/issues/666
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 17:43:15 +02:00
Evangelos Ribeiro Tzaras
d9e6fb3717 record-row: Prefer g_signal_connect_object() over a plain connect()
Apparently the slice list model in the history box
rebuilds the whole list when a single new record gets added.

Additionally, the "pressed" signal gets emitted on the
GtkGestureLongPress controller even when the call button is tapped
(i.e. should not have been pressed down for longer than the required timeout).
This then causes the callback to be invoked with a disposed record row.

This commit ensures the signals get properly disconnected
even in the face of unforeseen cleanup of the record row.

Helps with https://gitlab.gnome.org/GNOME/calls/-/issues/666

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 17:42:51 +02:00
Evangelos Ribeiro Tzaras
f810e0a9b1 tree: Remove custom clearing macros
The macros was emulating g_clear_handle_id() and friends
let's use the glib functions directly instead.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:59:27 +02:00
Evangelos Ribeiro Tzaras
5eabbb2ada record-store: Simplify struct setup of record call data
Just a mechanical change that results in -2 lines.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:59:11 +02:00
Evangelos Ribeiro Tzaras
3b1cf7b5ee record-row: Prefer g_autoptr for GDateTime
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:40:35 +02:00
Evangelos Ribeiro Tzaras
03a50260ec history-box: Add debug statement
This helps in debugging in debugging
why the slice list model rebuilds the whole list
when a single call gets added.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:40:35 +02:00
Evangelos Ribeiro Tzaras
9dfaac19cc record-row: Define log domain
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:40:35 +02:00
Evangelos Ribeiro Tzaras
87ad8acf39 record-row: Remove unused include
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:40:35 +02:00
Evangelos Ribeiro Tzaras
32b8995f2d record-row: Remove unnecessary cast
g_object_get() wants a gpointer,
so there is no need for casting to GObject*.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:40:35 +02:00
Evangelos Ribeiro Tzaras
5473f03be9 record-store: Remove unnecessary casts
g_object_get() accepts gpointer, so casting is not needed.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
2024-09-14 11:40:35 +02:00
Chris Talbot
29fdb869f0 new-call-box: clear number entry when windows is closed
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/717>
2024-09-02 15:56:58 +00:00
Chris Talbot
45b4717c78 contacts-box: clear entry if window is closed
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/717>
2024-09-02 15:56:58 +00:00
Chris Talbot
28ca838ab4 application: add signal for main window hiding
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/717>
2024-09-02 15:56:58 +00:00
Anton Lazarev
7577e85cd9 contacts-box: add .boxed-list CSS class
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/727>
2024-08-31 20:58:09 +00:00
Anton Lazarev
bb4d92f920 call buttons: Add .flat CSS class
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/727>
2024-08-31 20:58:09 +00:00
Guido Günther
05dc7c24ef main-window: Use AdwAboutDialog
Fixes the deprecation warning and lets us use a bottom
sheet that can always be closed.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/749>
2024-08-31 15:17:20 +00:00
Guido Günther
7241f8bed4 build: Bump libadwaita dep to 1.5
Needed for AdwAboutDialog

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/749>
2024-08-31 15:17:20 +00:00
Balló György
ef5467fb64 build: Actually translate metainfo
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/751>
2024-08-31 08:11:50 +00:00
Balló György
5fde6bcc3a application: Set default window icon
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/750>
2024-08-31 00:36:09 +02:00