summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2022-02-11 19:01:03 +0100
committerChristian Persch <chpe@src.gnome.org>2022-02-11 19:01:03 +0100
commitbe0ca2a79414d3db2a991631148db63937c1a93e (patch)
tree30931c825b28e1a52076385378ea920dc393b3d0
parent6d80d3bca78397b2073f61e7954f3ceb45a8cb37 (diff)
downloadvte-be0ca2a79414d3db2a991631148db63937c1a93e.tar.gz
widget: Defer alignment API to next cycle
This API is untested and can possibly be improved, so don't freeze it now.
-rw-r--r--doc/reference/vte-sections.txt.in8
-rw-r--r--src/app/app.cc43
-rw-r--r--src/vte/vteterminal.h28
-rw-r--r--src/vtegtk.cc274
-rw-r--r--src/vtegtk.hh4
5 files changed, 0 insertions, 357 deletions
diff --git a/doc/reference/vte-sections.txt.in b/doc/reference/vte-sections.txt.in
index 4c9680f0..283dd056 100644
--- a/doc/reference/vte-sections.txt.in
+++ b/doc/reference/vte-sections.txt.in
@@ -105,14 +105,6 @@ vte_terminal_search_set_wrap_around
vte_terminal_event_check_regex_array
vte_terminal_event_check_regex_simple
#endif /* VTE_GTK */
-vte_terminal_get_xalign
-vte_terminal_set_xalign
-vte_terminal_get_yalign
-vte_terminal_set_yalign
-vte_terminal_get_xfill
-vte_terminal_set_xfill
-vte_terminal_get_yfill
-vte_terminal_set_yfill
<SUBSECTION>
VteFeatureFlags
diff --git a/src/app/app.cc b/src/app/app.cc
index 581bb165..3b7835aa 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -121,8 +121,6 @@ public:
VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM};
VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK};
VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS};
- VteAlign xalign{VteAlign(-1)};
- VteAlign yalign{VteAlign(-1)};
vte::glib::RefPtr<GtkCssProvider> css{};
#if VTE_GTK == 3
@@ -477,28 +475,6 @@ private:
return true;
}
- static gboolean
- parse_xalign(char const* option, char const* value, void* data, GError** error)
- {
- auto const that = static_cast<Options*>(data);
- auto v = int{};
- auto const rv = that->parse_enum(VTE_TYPE_ALIGN, value, v, error);
- if (rv)
- that->xalign = VteAlign(v);
- return rv;
- }
-
- static gboolean
- parse_yalign(char const* option, char const* value, void* data, GError** error)
- {
- auto const that = static_cast<Options*>(data);
- auto v = int{};
- auto const rv = that->parse_enum(VTE_TYPE_ALIGN, value, v, error);
- if (rv)
- that->yalign = VteAlign(v);
- return rv;
- }
-
public:
double get_alpha() const
@@ -687,17 +663,6 @@ public:
#endif
{ "use-theme-colors", 0, 0, G_OPTION_ARG_NONE, &use_theme_colors,
"Use foreground and background colors from the gtk+ theme", nullptr },
-
- { "xalign", 0, 0, G_OPTION_ARG_CALLBACK, (void*)parse_xalign,
- "Horizontal alignment (start|end|center)", "ALIGN" },
- { "yalign", 0, 0, G_OPTION_ARG_CALLBACK, (void*)parse_yalign,
- "Vertical alignment (fill|start|end|center)", "ALIGN" },
- { "no-xfill", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &no_xfill,
- "No horizontal fillment", nullptr },
- { "no-yfill", 0, 0, G_OPTION_ARG_NONE, &no_yfill,
- "No vertical fillment", nullptr },
-
-
#if VTE_GTK == 3
{ "no-argb-visual", 0, 0, G_OPTION_ARG_NONE, &no_argb_visual,
"Don't use an ARGB visual", nullptr },
@@ -2577,14 +2542,6 @@ vteapp_window_constructed(GObject *object)
vte_terminal_set_scroll_unit_is_pixels(window->terminal, options.scroll_unit_is_pixels);
vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines);
vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode);
- if (options.xalign != VteAlign(-1))
- vte_terminal_set_xalign(window->terminal, options.xalign);
- if (options.yalign != VteAlign(-1))
- vte_terminal_set_yalign(window->terminal, options.yalign);
- if (options.no_xfill)
- vte_terminal_set_xfill(window->terminal, false);
- if (options.no_yfill)
- vte_terminal_set_yfill(window->terminal, false);
/* Style */
if (options.font_string != nullptr) {
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index 0d3cf51c..41f153d0 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -551,34 +551,6 @@ void vte_terminal_set_enable_sixel(VteTerminal *terminal,
_VTE_PUBLIC
gboolean vte_terminal_get_enable_sixel(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-_VTE_PUBLIC
-void vte_terminal_set_xalign(VteTerminal* terminal,
- VteAlign align) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
-_VTE_PUBLIC
-VteAlign vte_terminal_get_xalign(VteTerminal* terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
-_VTE_PUBLIC
-void vte_terminal_set_yalign(VteTerminal* terminal,
- VteAlign align) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
-_VTE_PUBLIC
-VteAlign vte_terminal_get_yalign(VteTerminal* terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
-_VTE_PUBLIC
-void vte_terminal_set_xfill(VteTerminal* terminal,
- gboolean fill) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
-_VTE_PUBLIC
-gboolean vte_terminal_get_xfill(VteTerminal* terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
-_VTE_PUBLIC
-void vte_terminal_set_yfill(VteTerminal* terminal,
- gboolean fill) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
-_VTE_PUBLIC
-gboolean vte_terminal_get_yfill(VteTerminal* terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
-
G_DEFINE_AUTOPTR_CLEANUP_FUNC(VteTerminal, g_object_unref)
G_END_DECLS
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 61915e71..05b82294 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -1015,22 +1015,6 @@ try
g_value_set_string (value, vte_terminal_get_word_char_exceptions (terminal));
break;
- case PROP_XALIGN:
- g_value_set_enum(value, vte_terminal_get_xalign(terminal));
- break;
-
- case PROP_YALIGN:
- g_value_set_enum(value, vte_terminal_get_yalign(terminal));
- break;
-
- case PROP_XFILL:
- g_value_set_boolean(value, vte_terminal_get_xfill(terminal));
- break;
-
- case PROP_YFILL:
- g_value_set_boolean(value, vte_terminal_get_yfill(terminal));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
return;
@@ -1149,22 +1133,6 @@ try
vte_terminal_set_word_char_exceptions (terminal, g_value_get_string (value));
break;
- case PROP_XALIGN:
- vte_terminal_set_xalign(terminal, VteAlign(g_value_get_enum(value)));
- break;
-
- case PROP_YALIGN:
- vte_terminal_set_yalign(terminal, VteAlign(g_value_get_enum(value)));
- break;
-
- case PROP_XFILL:
- vte_terminal_set_xfill(terminal, g_value_get_boolean(value));
- break;
-
- case PROP_YFILL:
- vte_terminal_set_yfill(terminal, g_value_get_boolean(value));
- break;
-
/* Not writable */
case PROP_CURRENT_DIRECTORY_URI:
case PROP_CURRENT_FILE_URI:
@@ -2359,56 +2327,6 @@ vte_terminal_class_init(VteTerminalClass *klass)
NULL,
(GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
- /**
- * VteTerminal:xalign:
- *
- * The horizontal alignment of @terminal within its allocation.
- *
- * Since: 0.68
- */
- pspecs[PROP_XALIGN] =
- g_param_spec_enum("xalign", nullptr, nullptr,
- VTE_TYPE_ALIGN,
- VTE_ALIGN_START,
- GParamFlags(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
-
- /**
- * VteTerminal:yalign:
- *
- * The vertical alignment of @terminal within its allocation
- *
- * Since: 0.68
- */
- pspecs[PROP_YALIGN] =
- g_param_spec_enum("yalign", nullptr, nullptr,
- VTE_TYPE_ALIGN,
- VTE_ALIGN_START,
- GParamFlags(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
-
- /**
- * VteTerminal:xfill:
- *
- * The horizontal fillment of @terminal within its allocation.
- *
- * Since: 0.68
- */
- pspecs[PROP_XFILL] =
- g_param_spec_boolean("xfill", nullptr, nullptr,
- TRUE,
- GParamFlags(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
-
- /**
- * VteTerminal:yfill:
- *
- * The vertical fillment of @terminal within its allocation
- *
- * Since: 0.68
- */
- pspecs[PROP_YFILL] =
- g_param_spec_boolean("yfill", nullptr, nullptr,
- TRUE,
- GParamFlags(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
-
g_object_class_install_properties(gobject_class, LAST_PROP, pspecs);
#if VTE_GTK == 3
@@ -6276,198 +6194,6 @@ constexpr bool check_enum_value<VteAlign>(VteAlign value) noexcept
}
}
-/**
- * vte_terminal_set_xalign:
- * @terminal: a #VteTerminal
- * @align: alignment value from #VteAlign
- *
- * Sets the horizontal alignment of @terminal within its allocation.
- *
- * Note: %VTE_ALIGN_START_FILL is not supported, and will be treated
- * like %VTE_ALIGN_START.
- *
- * Since: 0.68
- */
-void
-vte_terminal_set_xalign(VteTerminal* terminal,
- VteAlign align) noexcept
-try
-{
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
- g_return_if_fail(check_enum_value(align));
-
- if (WIDGET(terminal)->set_xalign(align))
- g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_XALIGN]);
-}
-catch (...)
-{
- vte::log_exception();
-}
-
-/**
- * vte_terminal_get_xalign:
- * @terminal: a #VteTerminal
- *
- * Returns: the horizontal alignment of @terminal within its allocation
- *
- * Since: 0.68
- */
-VteAlign
-vte_terminal_get_xalign(VteTerminal* terminal) noexcept
-try
-{
- g_return_val_if_fail(VTE_IS_TERMINAL(terminal), VTE_ALIGN_START);
-
- return WIDGET(terminal)->xalign();
-}
-catch (...)
-{
- vte::log_exception();
- return VTE_ALIGN_START;
-}
-
-/**
- * vte_terminal_set_yalign:
- * @terminal: a #VteTerminal
- * @align: alignment value from #VteAlign
- *
- * Sets the vertical alignment of @terminal within its allocation.
- *
- * Since: 0.68
- */
-void
-vte_terminal_set_yalign(VteTerminal* terminal,
- VteAlign align) noexcept
-try
-{
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
- g_return_if_fail(check_enum_value(align));
-
- if (WIDGET(terminal)->set_yalign(align))
- g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_YALIGN]);
-}
-catch (...)
-{
- vte::log_exception();
-}
-
-/**
- * vte_terminal_get_yalign:
- * @terminal: a #VteTerminal
- *
- * Returns: the vertical alignment of @terminal within its allocation
- *
- * Since: 0.68
- */
-VteAlign
-vte_terminal_get_yalign(VteTerminal* terminal) noexcept
-try
-{
- g_return_val_if_fail(VTE_IS_TERMINAL(terminal), VTE_ALIGN_START);
-
- return WIDGET(terminal)->yalign();
-}
-catch (...)
-{
- vte::log_exception();
- return VTE_ALIGN_START;
-}
-
-/**
- * vte_terminal_set_xfill:
- * @terminal: a #VteTerminal
- * @fill: fillment value from #VteFill
- *
- * Sets the horizontal fillment of @terminal within its allocation.
- *
- * Note: %VTE_FILL_START_FILL is not supported, and will be treated
- * like %VTE_FILL_START.
- *
- * Since: 0.68
- */
-void
-vte_terminal_set_xfill(VteTerminal* terminal,
- gboolean fill) noexcept
-try
-{
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
-
- if (WIDGET(terminal)->set_xfill(fill != false))
- g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_XFILL]);
-}
-catch (...)
-{
- vte::log_exception();
-}
-
-/**
- * vte_terminal_get_xfill:
- * @terminal: a #VteTerminal
- *
- * Returns: the horizontal fillment of @terminal within its allocation
- *
- * Since: 0.68
- */
-gboolean
-vte_terminal_get_xfill(VteTerminal* terminal) noexcept
-try
-{
- g_return_val_if_fail(VTE_IS_TERMINAL(terminal), true);
-
- return WIDGET(terminal)->xfill();
-}
-catch (...)
-{
- vte::log_exception();
- return true;
-}
-
-/**
- * vte_terminal_set_yfill:
- * @terminal: a #VteTerminal
- * @fill: fillment value from #VteFill
- *
- * Sets the vertical fillment of @terminal within its allocation.
- *
- * Since: 0.68
- */
-void
-vte_terminal_set_yfill(VteTerminal* terminal,
- gboolean fill) noexcept
-try
-{
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
-
- if (WIDGET(terminal)->set_yfill(fill != false))
- g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_YFILL]);
-}
-catch (...)
-{
- vte::log_exception();
-}
-
-/**
- * vte_terminal_get_yfill:
- * @terminal: a #VteTerminal
- *
- * Returns: the vertical fillment of @terminal within its allocation
- *
- * Since: 0.68
- */
-gboolean
-vte_terminal_get_yfill(VteTerminal* terminal) noexcept
-try
-{
- g_return_val_if_fail(VTE_IS_TERMINAL(terminal), true);
-
- return WIDGET(terminal)->yfill();
-}
-catch (...)
-{
- vte::log_exception();
- return true;
-}
-
namespace vte {
using namespace std::literals;
diff --git a/src/vtegtk.hh b/src/vtegtk.hh
index 778b555a..6b7a1ea2 100644
--- a/src/vtegtk.hh
+++ b/src/vtegtk.hh
@@ -92,10 +92,6 @@ enum {
PROP_TEXT_BLINK_MODE,
PROP_WINDOW_TITLE,
PROP_WORD_CHAR_EXCEPTIONS,
- PROP_XALIGN,
- PROP_YALIGN,
- PROP_XFILL,
- PROP_YFILL,
LAST_PROP,
/* override properties */