A bunch of moving stuff around
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/talkatu/data/messageactions.ui Sun Aug 19 03:05:28 2018 -0500
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.22.1 --> + <requires lib="gtk+" version="3.20"/> + <template class="TalkatuMessageActions" parent="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <object class="GtkEventBox" id="reactions"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">face-smile</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + <object class="GtkEventBox" id="actions"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">open-menu-symbolic</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> --- a/talkatu/data/messageview.ui Sun Aug 19 01:49:25 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
- <requires lib="gtk+" version="3.20"/>
- <template class="TalkatuMessageView" parent="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">4</property>
- <property name="spacing">4</property>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
- <property name="icon_name">dialog-information</property>
- <property name="icon_size">6</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <object class="GtkLabel" id="display_name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><span font-weight="bold">grim</span></property>
- <property name="use_markup">True</property>
- <property name="selectable">True</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- <object class="GtkLabel" id="timestamp">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">10:10</property>
- <property name="selectable">True</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- <object class="GtkLabel" id="contents">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">This is my cool message that needs to be quite a bit longer</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
--- a/talkatu/data/talkatu.gresource.xml Sun Aug 19 01:49:25 2018 -0500
+++ b/talkatu/data/talkatu.gresource.xml Sun Aug 19 03:05:28 2018 -0500
@@ -2,7 +2,7 @@
<gresource prefix="/org/bitbucket/rw_grim/talkatu/ui">
<file compressed="true">linkdialog.ui</file>
- <file compressed="true">messageview.ui</file>
+ <file compressed="true">messageactions.ui</file> <file compressed="true">tagtable.ui</file>
<file compressed="true">toolbar.ui</file>
--- a/talkatu/meson.build Sun Aug 19 01:49:25 2018 -0500
+++ b/talkatu/meson.build Sun Aug 19 03:05:28 2018 -0500
@@ -15,7 +15,7 @@
'talkatumarkdownbuffer.h',
'talkatumenutoolbutton.h',
- 'talkatumessageview.h',
+ 'talkatumessageactions.h', @@ -34,7 +34,7 @@
'talkatumarkdownbuffer.c',
'talkatumenutoolbutton.c',
- 'talkatumessageview.c',
+ 'talkatumessageactions.c', --- a/talkatu/talkatuhistory.c Sun Aug 19 01:49:25 2018 -0500
+++ b/talkatu/talkatuhistory.c Sun Aug 19 03:05:28 2018 -0500
@@ -19,7 +19,7 @@
#include <talkatu/talkatuhistory.h>
#include <talkatu/talkatumessage.h>
-#include <talkatu/talkatumessageview.h>
+#include <talkatu/talkatumessageactions.h> @@ -47,11 +47,11 @@
data = g_object_get_data(G_OBJECT(anchor), "talkatu-message");
GtkTextView *text_view = GTK_TEXT_VIEW(user_data);
- GtkWidget *message_view = talkatu_message_view_new(TALKATU_MESSAGE(data));
+ GtkWidget *message_actions = talkatu_message_actions_new(TALKATU_MESSAGE(data)); - gtk_text_view_add_child_at_anchor(text_view, message_view, anchor);
+ gtk_text_view_add_child_at_anchor(text_view, message_actions, anchor); - gtk_widget_show_all(message_view);
+ gtk_widget_show_all(message_actions); --- a/talkatu/talkatuhistorybuffer.c Sun Aug 19 01:49:25 2018 -0500
+++ b/talkatu/talkatuhistorybuffer.c Sun Aug 19 03:05:28 2018 -0500
@@ -52,6 +52,16 @@
contents = talkatu_message_get_contents(message);
g_message("writing message '%s'", contents);
+ gtk_text_buffer_insert( + GTK_TEXT_BUFFER(buffer), + /* add the anchor that contains the message */ anchor = gtk_text_child_anchor_new();
@@ -64,15 +74,6 @@
- // gtk_text_buffer_insert(
- // GTK_TEXT_BUFFER(buffer),
/******************************************************************************
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/talkatu/talkatumessageactions.c Sun Aug 19 03:05:28 2018 -0500
@@ -0,0 +1,68 @@
+ * Copyright (C) 2017-2018 Gary Kramlich <grim@reaperworld.com> + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. +#include "talkatu/talkatumessageactions.h" + * SECTION:talkatumessageview + * @Short_description: A display widget for #TalkatuMessage's + * Talkatu provides a simple formatting message_actions that gives the user the ability + * to format any #TalkatuBuffer via the formatting actions. +G_DEFINE_TYPE(TalkatuMessageActions, talkatu_message_actions, GTK_TYPE_BOX) +/****************************************************************************** + *****************************************************************************/ +talkatu_message_actions_init(TalkatuMessageActions *message_actions) { + gtk_widget_init_template(GTK_WIDGET(message_actions)); +talkatu_message_actions_class_init(TalkatuMessageActionsClass *klass) { + gtk_widget_class_set_template_from_resource( + GTK_WIDGET_CLASS(klass), + "/org/bitbucket/rw_grim/talkatu/ui/messageactions.ui" +/****************************************************************************** + *****************************************************************************/ + * talkatu_message_actions_new: + * Creates a new #TalkatuMessageActions that provides the user with an interface to + * control the formatting of a #TalkatuBuffer. + * Returns: (transfer full): The new #TalkatuMessageActions instance. +talkatu_message_actions_new(TalkatuMessage *message) { + return GTK_WIDGET(g_object_new( + TALKATU_TYPE_MESSAGE_ACTIONS, --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/talkatu/talkatumessageactions.h Sun Aug 19 03:05:28 2018 -0500
@@ -0,0 +1,73 @@
+ * Copyright (C) 2017-2018 Gary Kramlich <grim@reaperworld.com> + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. +#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */ +#if !defined(TALKATU_GLOBAL_HEADER_INSIDE) && !defined(TALKATU_COMPILATION) +#error "only <talkatu.h> may be included directly" +#endif /* __GI_SCANNER__ */ +#ifndef TALKATU_MESSAGE_ACTIONS_H +#define TALKATU_MESSAGE_ACTIONS_H +#define TALKATU_TYPE_MESSAGE_ACTIONS (talkatu_message_actions_get_type()) +#define TALKATU_MESSAGE_ACTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TALKATU_TYPE_MESSAGE_ACTIONS, TalkatuMessageActions)) +#define TALKATU_MESSAGE_ACTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TALKATU_TYPE_MESSAGE_ACTIONS, TalkatuMessageActionsClass)) +#define TALKATU_IS_MESSAGE_ACTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TALKATU_TYPE_MESSAGE_ACTIONS)) +#define TALKATU_IS_MESSAGE_ACTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TALKATU_TYPE_MESSAGE_ACTIONS)) +#define TALKATU_MESSAGE_ACTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TALKATU_TYPE_MESSAGE_ACTIONS, TalkatuMessageActionsClass)) +typedef struct _TalkatuMessageActions TalkatuMessageActions; +typedef struct _TalkatuMessageActionsClass TalkatuMessageActionsClass; +#include <glib-object.h> +#include <talkatu/talkatumessage.h> +struct _TalkatuMessageActions { + void (*_talkatu_reserved1)(void); + void (*_talkatu_reserved2)(void); + void (*_talkatu_reserved3)(void); + void (*_talkatu_reserved4)(void); +struct _TalkatuMessageActionsClass { + void (*_talkatu_reserved1)(void); + void (*_talkatu_reserved2)(void); + void (*_talkatu_reserved3)(void); + void (*_talkatu_reserved4)(void); +GType talkatu_message_actions_get_type(void); +GtkWidget *talkatu_message_actions_new(TalkatuMessage *message); +#endif /* TALKATU_MESSAGE_ACTIONS_H */ --- a/talkatu/talkatumessageview.c Sun Aug 19 01:49:25 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
- * Copyright (C) 2017-2018 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include "talkatu/talkatumessageview.h"
- * SECTION:talkatumessageview
- * @Short_description: A display widget for #TalkatuMessage's
- * Talkatu provides a simple formatting message_view that gives the user the ability
- * to format any #TalkatuBuffer via the formatting actions.
-G_DEFINE_TYPE(TalkatuMessageView, talkatu_message_view, GTK_TYPE_BOX)
-/******************************************************************************
- *****************************************************************************/
-talkatu_message_view_init(TalkatuMessageView *message_view) {
- gtk_widget_init_template(GTK_WIDGET(message_view));
-talkatu_message_view_class_init(TalkatuMessageViewClass *klass) {
- gtk_widget_class_set_template_from_resource(
- GTK_WIDGET_CLASS(klass),
- "/org/bitbucket/rw_grim/talkatu/ui/messageview.ui"
-/******************************************************************************
- *****************************************************************************/
- * talkatu_message_view_new:
- * Creates a new #TalkatuMessageView that provides the user with an interface to
- * control the formatting of a #TalkatuBuffer.
- * Returns: (transfer full): The new #TalkatuMessageView instance.
-talkatu_message_view_new(TalkatuMessage *message) {
- return GTK_WIDGET(g_object_new(
- TALKATU_TYPE_MESSAGE_VIEW,
--- a/talkatu/talkatumessageview.h Sun Aug 19 01:49:25 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
- * Copyright (C) 2017-2018 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
-#if !defined(TALKATU_GLOBAL_HEADER_INSIDE) && !defined(TALKATU_COMPILATION)
-#error "only <talkatu.h> may be included directly"
-#endif /* __GI_SCANNER__ */
-#ifndef TALKATU_MESSAGE_VIEW_H
-#define TALKATU_MESSAGE_VIEW_H
-#define TALKATU_TYPE_MESSAGE_VIEW (talkatu_message_view_get_type())
-#define TALKATU_MESSAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TALKATU_TYPE_MESSAGE_VIEW, TalkatuMessageView))
-#define TALKATU_MESSAGE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TALKATU_TYPE_MESSAGE_VIEW, TalkatuMessageViewClass))
-#define TALKATU_IS_MESSAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TALKATU_TYPE_MESSAGE_VIEW))
-#define TALKATU_IS_MESSAGE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TALKATU_TYPE_MESSAGE_VIEW))
-#define TALKATU_MESSAGE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TALKATU_TYPE_MESSAGE_VIEW, TalkatuMessageViewClass))
-typedef struct _TalkatuMessageView TalkatuMessageView;
-typedef struct _TalkatuMessageViewClass TalkatuMessageViewClass;
-#include <glib-object.h>
-#include <talkatu/talkatumessage.h>
-struct _TalkatuMessageView {
- void (*_talkatu_reserved1)(void);
- void (*_talkatu_reserved2)(void);
- void (*_talkatu_reserved3)(void);
- void (*_talkatu_reserved4)(void);
-struct _TalkatuMessageViewClass {
- void (*_talkatu_reserved1)(void);
- void (*_talkatu_reserved2)(void);
- void (*_talkatu_reserved3)(void);
- void (*_talkatu_reserved4)(void);
-GType talkatu_message_view_get_type(void);
-GtkWidget *talkatu_message_view_new(TalkatuMessage *message);
-#endif /* TALKATU_MESSAGE_VIEW_H */