summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2020-10-22 20:34:51 +0200
committerChristian Persch <chpe@src.gnome.org>2020-10-22 20:34:51 +0200
commit095876ffca23d2f389c0a83a552164599c2f6e81 (patch)
tree0160e94251482c5c2595b08cff11d4fb7166ddcf /src/app
parent6557b6eec39cafdb334aa59f59984d99abb946c1 (diff)
downloadvte-095876ffca23d2f389c0a83a552164599c2f6e81.tar.gz
lib: Simplify smart pointers for glib/pango/pcre types
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cc8
-rw-r--r--src/app/meson.build2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/app/app.cc b/src/app/app.cc
index a615fd5b..6cd4e844 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -33,13 +33,14 @@
#include <gtk/gtk.h>
#include <cairo/cairo-gobject.h>
#include <vte/vte.h>
-#include "vtepcre2.h"
#include <algorithm>
#include <vector>
#include "glib-glue.hh"
#include "libc-glue.hh"
+#include "pango-glue.hh"
+#include "pcre2-glue.hh"
#include "refptr.hh"
/* options */
@@ -2128,9 +2129,8 @@ vteapp_window_constructed(GObject *object)
/* Style */
if (options.font_string != nullptr) {
- auto desc = pango_font_description_from_string(options.font_string);
- vte_terminal_set_font(window->terminal, desc);
- pango_font_description_free(desc);
+ auto desc = vte::take_freeable(pango_font_description_from_string(options.font_string));
+ vte_terminal_set_font(window->terminal, desc.get());
}
auto fg = options.get_color_fg();
diff --git a/src/app/meson.build b/src/app/meson.build
index 406e1707..9b98288f 100644
--- a/src/app/meson.build
+++ b/src/app/meson.build
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <https://www.gnu.org/licenses/>.
-app_sources = glib_glue_sources + libc_glue_sources + refptr_sources + files(
+app_sources = glib_glue_sources + libc_glue_sources + pango_glue_sources + pcre2_glue_sources + refptr_sources + std_glue_sources + files(
'app.cc',
)