Skip to content

Commit

Permalink
gui: gtk: support calls in landscape view
Browse files Browse the repository at this point in the history
Support taking calls in landscape view, which could be useful for usage in
Desktop/VM and Nokia N900.
  • Loading branch information
sicelo authored and IMbackK committed Oct 8, 2023
1 parent 99394c1 commit e4f6af0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions config/sphone.ini
Expand Up @@ -31,6 +31,13 @@ Features=calls;messages
# line identifier (eg. phone number) from the remote party
HiddenLineId=False

[Gui]

# Set True to allow sphone to follow the device orientation for calls, even if
# it is landscape. False (default) causes sphone to always prefer portrait view
# during calls
LandscapeCalls=False

[ExternalExec]

# Scripts set here are called when the corresponding event occures
Expand Down
5 changes: 4 additions & 1 deletion src/modules/gui/gtk2/ui-calls-manager-gtk.c
Expand Up @@ -31,6 +31,7 @@
#include "sphone-modules.h"
#include "gui.h"
#include "comm.h"
#include "sphone-conf.h"

/** Module name */
#define MODULE_NAME "ui-calls-manager-gtk"
Expand Down Expand Up @@ -441,7 +442,9 @@ const gchar *sphone_module_init(void** data)
GtkTreeViewColumn *column;

#ifdef ENABLE_LIBHILDON
hildon_gtk_window_set_portrait_flags(GTK_WINDOW(g_calls_manager.main_window), HILDON_PORTRAIT_MODE_REQUEST);
bool landscape_calls = sphone_conf_get_bool("Gui", "LandscapeCalls", false, NULL);
hildon_gtk_window_set_portrait_flags(GTK_WINDOW(g_calls_manager.main_window),
landscape_calls ? HILDON_PORTRAIT_MODE_SUPPORT : HILDON_PORTRAIT_MODE_REQUEST);
#endif

renderer = gtk_cell_renderer_pixbuf_new();
Expand Down

0 comments on commit e4f6af0

Please sign in to comment.