SeeMD rebrand

This commit is contained in:
NotAlexNoyle committed 2026-07-01 14:33:04 -04:00
1 parent e27c392078
commit 5c4affefbd
19 files changed
+180 -180

No files matched your search

+13 -13
View File
@@ -29,8 +29,8 @@ jobs:
- name: ABI check (GLib)
run: |
set -euo pipefail
if nm -D viewmd | grep -q ' g_string_free_and_steal$'; then
echo "Error: viewmd links against g_string_free_and_steal (too-new GLib ABI for jammy/mint 21.x)" >&2
if nm -D seemd | grep -q ' g_string_free_and_steal$'; then
echo "Error: seemd links against g_string_free_and_steal (too-new GLib ABI for jammy/mint 21.x)" >&2
exit 1
fi
@@ -41,7 +41,7 @@ jobs:
ARCH="$(dpkg --print-architecture)"
MAINTAINER="${GITHUB_REPOSITORY_OWNER} <noreply@github.com>"
PKGDIR="dist/deb/viewmd_${VERSION}_${ARCH}"
PKGDIR="dist/deb/seemd_${VERSION}_${ARCH}"
rm -rf "$PKGDIR"
mkdir -p "$PKGDIR/DEBIAN"
@@ -57,7 +57,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: viewmd-deb
name: seemd-deb
path: dist/deb/*.deb
rpm:
@@ -87,7 +87,7 @@ jobs:
TAG="${{ github.event.release.tag_name || github.ref_name }}"
VERSION="${TAG#v}"
mkdir -p dist
git archive --format=tar.gz --prefix="viewmd-${VERSION}/" -o "dist/viewmd-${VERSION}.tar.gz" HEAD
git archive --format=tar.gz --prefix="seemd-${VERSION}/" -o "dist/seemd-${VERSION}.tar.gz" HEAD
- name: Build .rpm
run: |
@@ -98,25 +98,25 @@ jobs:
TOPDIR="$PWD/dist/rpmbuild"
mkdir -p "$TOPDIR"/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
cp "dist/viewmd-${VERSION}.tar.gz" "$TOPDIR/SOURCES/"
cp "dist/seemd-${VERSION}.tar.gz" "$TOPDIR/SOURCES/"
sed \
-e "s/@VERSION@/${VERSION}/g" \
-e "s|@URL@|${URL}|g" \
packaging/rpm/viewmd.spec.in > "$TOPDIR/SPECS/viewmd.spec"
packaging/rpm/seemd.spec.in > "$TOPDIR/SPECS/seemd.spec"
rpmbuild \
--define "_topdir ${TOPDIR}" \
-bb "$TOPDIR/SPECS/viewmd.spec"
-bb "$TOPDIR/SPECS/seemd.spec"
mkdir -p dist/rpm
# Only publish the main runtime RPM (exclude -debuginfo/-debugsource).
find "$TOPDIR/RPMS" -type f -name 'viewmd-[0-9]*.rpm' -exec cp -v -t dist/rpm {} +
find "$TOPDIR/RPMS" -type f -name 'seemd-[0-9]*.rpm' -exec cp -v -t dist/rpm {} +
- uses: actions/upload-artifact@v4
with:
name: viewmd-rpm
path: dist/rpm/viewmd-[0-9]*.rpm
name: seemd-rpm
path: dist/rpm/seemd-[0-9]*.rpm
release-assets:
runs-on: ubuntu-latest
@@ -126,7 +126,7 @@ jobs:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
pattern: viewmd-*
pattern: seemd-*
merge-multiple: true
path: dist
@@ -135,4 +135,4 @@ jobs:
with:
files: |
dist/*.deb
dist/viewmd-[0-9]*.rpm
dist/seemd-[0-9]*.rpm
+5 -5
View File
@@ -9,7 +9,7 @@ BINDIR = .
SOURCES = $(wildcard $(SRCDIR)/*.c)
OBJECTS = $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o) $(OBJDIR)/md4c.o
TARGET = $(BINDIR)/viewmd
TARGET = $(BINDIR)/seemd
PREFIX ?= /usr/local
DESTDIR ?=
@@ -38,12 +38,12 @@ clean:
rm -rf $(OBJDIR) $(TARGET)
install: $(TARGET)
install -Dm755 $(TARGET) $(DESTDIR)$(bindir)/viewmd
install -Dm644 assets/viewmd.desktop $(DESTDIR)$(applicationsdir)/viewmd.desktop
install -Dm755 $(TARGET) $(DESTDIR)$(bindir)/seemd
install -Dm644 assets/seemd.desktop $(DESTDIR)$(applicationsdir)/seemd.desktop
uninstall:
rm -f $(DESTDIR)$(bindir)/viewmd
rm -f $(DESTDIR)$(applicationsdir)/viewmd.desktop
rm -f $(DESTDIR)$(bindir)/seemd
rm -f $(DESTDIR)$(applicationsdir)/seemd.desktop
# Header dependencies
$(OBJDIR)/main.o: $(SRCDIR)/app.h $(SRCDIR)/window.h
+12 -12
View File
@@ -1,8 +1,8 @@
# ViewMD
# SeeMD
A lightweight GTK 3 markdown viewer and editor for desktop Linux. It is ideal as your default app for opening `.md` files. Uses the excellent library [md4c](https://github.com/mity/md4c) for markdown parsing and WebKitGTK for GitHub-style preview rendering. This project is a fork of [ViewMD](https://github.com/rabfulton/ViewMD) by NotAlexNoyle.
![ViewMD](assets/screenshot.png)
![SeeMD](assets/screenshot.png)
## Features
@@ -40,14 +40,14 @@ Code blocks currently support a beta version of keyword highlighting for fenced
### Arch Linux (AUR)
https://aur.archlinux.org/packages/viewmd
https://aur.archlinux.org/packages/seemd
### Debian/Ubuntu (.deb)
Install a built `.deb` package with:
```bash
sudo apt install ./viewmd_*.deb
sudo apt install ./seemd_*.deb
```
### Fedora/RHEL (.rpm)
@@ -55,12 +55,12 @@ sudo apt install ./viewmd_*.deb
Install a built `.rpm` package with:
```bash
sudo dnf install ./viewmd-*.rpm
sudo dnf install ./seemd-*.rpm
```
## Usage
Run `viewmd` to start the application.
Run `seemd` to start the application.
- **Open button**: Open a markdown document
- **Reload button**: Reload the currently open document from disk
@@ -77,11 +77,11 @@ Run `viewmd` to start the application.
### Set as Default `.md` Viewer
After installing, associate markdown MIME types with `viewmd.desktop`:
After installing, associate markdown MIME types with `seemd.desktop`:
```bash
xdg-mime default viewmd.desktop text/markdown
xdg-mime default viewmd.desktop text/x-markdown
xdg-mime default seemd.desktop text/markdown
xdg-mime default seemd.desktop text/x-markdown
```
Verify the current default:
@@ -105,8 +105,8 @@ sudo make install
```
This installs:
- Binary to `/usr/local/bin/viewmd`
- Desktop file to `/usr/local/share/applications/viewmd.desktop`
- Binary to `/usr/local/bin/seemd`
- Desktop file to `/usr/local/share/applications/seemd.desktop`
### Uninstallation
@@ -134,7 +134,7 @@ sudo dnf install gtk3-devel webkit2gtk4.1-devel
- Arch: `packaging/arch/PKGBUILD`
- Debian: `packaging/deb/control.in`
- RPM: `packaging/rpm/viewmd.spec.in`
- RPM: `packaging/rpm/seemd.spec.in`
## License
Released under the [MIT License](LICENSE).
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=ViewMD
Name=SeeMD
Comment=Lightweight markdown viewer
Exec=viewmd %F
Exec=seemd %F
Icon=accessories-text-editor
Terminal=false
Type=Application
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -1,9 +1,9 @@
pkgname=viewmd
pkgname=seemd
pkgver=0.r0.g0000000
pkgrel=1
pkgdesc="Lightweight GTK3 markdown viewer"
arch=('x86_64')
url="https://github.com/rabfulton/ViewMD"
url="https://github.com/NotAlexNoyle/SeeMD"
license=('MIT')
depends=('gtk3' 'webkit2gtk-4.1')
makedepends=('git' 'gcc' 'make' 'pkgconf')
+3 -3
View File
@@ -1,9 +1,9 @@
Package: viewmd
Package: seemd
Version: @VERSION@
Section: utils
Priority: optional
Architecture: @ARCH@
Maintainer: @MAINTAINER@
Depends: libgtk-3-0, libwebkit2gtk-4.1-0
Description: ViewMD - lightweight GTK3 markdown viewer
ViewMD is a lightweight GTK3 markdown viewer with GitHub-style WebKit preview rendering.
Description: SeeMD - lightweight GTK3 markdown viewer
SeeMD is a lightweight GTK3 markdown viewer with GitHub-style WebKit preview rendering.
@@ -1,11 +1,11 @@
Name: viewmd
Name: seemd
Version: @VERSION@
Release: 1%{?dist}
Summary: Lightweight GTK3 markdown viewer
License: MIT
URL: @URL@
Source0: viewmd-%{version}.tar.gz
Source0: seemd-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: make
@@ -17,10 +17,10 @@ Requires: gtk3
Requires: webkit2gtk4.1
%description
ViewMD is a lightweight GTK3 markdown viewer with GitHub-style WebKit preview rendering.
SeeMD is a lightweight GTK3 markdown viewer with GitHub-style WebKit preview rendering.
%prep
%autosetup -n viewmd-%{version}
%autosetup -n seemd-%{version}
%build
make %{?_smp_mflags}
@@ -30,9 +30,9 @@ rm -rf %{buildroot}
make install DESTDIR=%{buildroot} PREFIX=%{_prefix}
%files
%{_bindir}/viewmd
%{_datadir}/applications/viewmd.desktop
%{_bindir}/seemd
%{_datadir}/applications/seemd.desktop
%changelog
* Thu Jan 01 1970 ViewMD Packager <noreply@example.com> - @VERSION@-1
* Thu Jan 01 1970 SeeMD Packager <noreply@example.com> - @VERSION@-1
- Initial package
BIN
View File
Binary file not shown.
+5 -5
View File
@@ -27,7 +27,7 @@ MarkydApp *markyd_app_new(void) {
flags = (GApplicationFlags)(flags | G_APPLICATION_NON_UNIQUE |
G_APPLICATION_HANDLES_OPEN);
self->gtk_app = gtk_application_new("org.viewmd.app", flags);
self->gtk_app = gtk_application_new("org.seemd.app", flags);
self->current_file_path = NULL;
g_signal_connect(self->gtk_app, "activate", G_CALLBACK(on_activate), self);
@@ -69,10 +69,10 @@ static void markyd_app_update_window_title(MarkydApp *self) {
if (self->current_file_path && self->current_file_path[0] != '\0') {
gchar *base = g_path_get_basename(self->current_file_path);
title = g_strdup_printf("ViewMD - %s", base);
title = g_strdup_printf("SeeMD - %s", base);
g_free(base);
} else {
title = g_strdup("ViewMD");
title = g_strdup("SeeMD");
}
gtk_window_set_title(GTK_WINDOW(self->window->window), title);
@@ -111,7 +111,7 @@ static void on_open(GtkApplication *gtk_app, GFile **files, gint n_files,
}
if (!opened && n_files > 0) {
g_printerr("ViewMD: unable to open provided file(s)\n");
g_printerr("SeeMD: unable to open provided file(s)\n");
}
markyd_window_show(self->window);
@@ -126,7 +126,7 @@ static void markyd_app_ensure_window(MarkydApp *self) {
self->editor = self->window->editor;
markyd_editor_set_content(self->editor,
"# ViewMD\n\nUse the Open button to load a markdown document.");
"# SeeMD\n\nUse the Open button to load a markdown document.");
markyd_app_update_window_title(self);
}
+1 -1
View File
@@ -50,7 +50,7 @@ void config_free(MarkydConfig *cfg) {
const gchar *config_get_path(void) {
if (!config_path) {
const gchar *config_dir = g_get_user_config_dir();
gchar *new_app_dir = g_build_filename(config_dir, "viewmd", NULL);
gchar *new_app_dir = g_build_filename(config_dir, "seemd", NULL);
g_mkdir_with_parents(new_app_dir, 0755);
config_path = g_build_filename(new_app_dir, "config.ini", NULL);
+21 -21
View File
@@ -41,7 +41,7 @@ static gchar *get_url_from_iter_tags(GtkTextIter *iter) {
for (GSList *node = tags; node != NULL; node = node->next) {
GtkTextTag *tag = GTK_TEXT_TAG(node->data);
const gchar *stored =
(const gchar *)g_object_get_data(G_OBJECT(tag), VIEWMD_LINK_URL_DATA);
(const gchar *)g_object_get_data(G_OBJECT(tag), SEEMD_LINK_URL_DATA);
if (stored && stored[0] != '\0') {
url = g_strdup(stored);
break;
@@ -300,8 +300,8 @@ static void scale_image_widget(GtkWidget *widget, gint max_width) {
return;
}
image = g_object_get_data(G_OBJECT(widget), "viewmd-image-widget-child");
orig = g_object_get_data(G_OBJECT(widget), "viewmd-image-orig-pixbuf");
image = g_object_get_data(G_OBJECT(widget), "seemd-image-widget-child");
orig = g_object_get_data(G_OBJECT(widget), "seemd-image-orig-pixbuf");
if (!GTK_IS_IMAGE(image) || !GDK_IS_PIXBUF(orig)) {
return;
}
@@ -313,9 +313,9 @@ static void scale_image_widget(GtkWidget *widget, gint max_width) {
}
requested_width = GPOINTER_TO_INT(
g_object_get_data(G_OBJECT(widget), "viewmd-image-requested-width"));
g_object_get_data(G_OBJECT(widget), "seemd-image-requested-width"));
requested_height = GPOINTER_TO_INT(
g_object_get_data(G_OBJECT(widget), "viewmd-image-requested-height"));
g_object_get_data(G_OBJECT(widget), "seemd-image-requested-height"));
compute_image_display_size(ow, oh, requested_width, requested_height, max_width,
&display_width, &display_height);
@@ -346,9 +346,9 @@ static void refresh_image_widget_scales(MarkydEditor *self) {
while (!gtk_text_iter_equal(&iter, &end)) {
GtkTextChildAnchor *anchor = gtk_text_iter_get_child_anchor(&iter);
if (anchor &&
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_ANCHOR_DATA) != NULL) {
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_ANCHOR_DATA) != NULL) {
GtkWidget *image_widget =
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_WIDGET_DATA);
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_WIDGET_DATA);
if (image_widget) {
scale_image_widget(image_widget, max_width);
}
@@ -371,18 +371,18 @@ static void render_image_widgets(MarkydEditor *self) {
while (!gtk_text_iter_equal(&iter, &end)) {
GtkTextChildAnchor *anchor = gtk_text_iter_get_child_anchor(&iter);
if (anchor &&
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_ANCHOR_DATA) != NULL) {
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_ANCHOR_DATA) != NULL) {
GtkWidget *image_widget =
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_WIDGET_DATA);
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_WIDGET_DATA);
if (!image_widget) {
const gchar *src =
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_SRC_DATA);
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_SRC_DATA);
const gchar *alt =
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_ALT_DATA);
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_ALT_DATA);
gint requested_width = GPOINTER_TO_INT(
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_WIDTH_DATA));
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_WIDTH_DATA));
gint requested_height = GPOINTER_TO_INT(
g_object_get_data(G_OBJECT(anchor), VIEWMD_IMAGE_HEIGHT_DATA));
g_object_get_data(G_OBJECT(anchor), SEEMD_IMAGE_HEIGHT_DATA));
gchar *path = NULL;
if (resolve_image_source_path(self, src, &path)) {
@@ -394,13 +394,13 @@ static void render_image_widgets(MarkydEditor *self) {
gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box), FALSE);
gtk_widget_set_halign(event_box, GTK_ALIGN_START);
gtk_container_add(GTK_CONTAINER(event_box), image);
g_object_set_data(G_OBJECT(event_box), "viewmd-image-widget-child",
g_object_set_data(G_OBJECT(event_box), "seemd-image-widget-child",
image);
g_object_set_data_full(G_OBJECT(event_box), "viewmd-image-orig-pixbuf",
g_object_set_data_full(G_OBJECT(event_box), "seemd-image-orig-pixbuf",
orig, g_object_unref);
g_object_set_data(G_OBJECT(event_box), "viewmd-image-requested-width",
g_object_set_data(G_OBJECT(event_box), "seemd-image-requested-width",
GINT_TO_POINTER(requested_width));
g_object_set_data(G_OBJECT(event_box), "viewmd-image-requested-height",
g_object_set_data(G_OBJECT(event_box), "seemd-image-requested-height",
GINT_TO_POINTER(requested_height));
scale_image_widget(event_box, max_width);
image_widget = event_box;
@@ -420,7 +420,7 @@ static void render_image_widgets(MarkydEditor *self) {
gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(self->text_view),
image_widget, anchor);
gtk_widget_show_all(image_widget);
g_object_set_data(G_OBJECT(anchor), VIEWMD_IMAGE_WIDGET_DATA, image_widget);
g_object_set_data(G_OBJECT(anchor), SEEMD_IMAGE_WIDGET_DATA, image_widget);
g_free(path);
} else {
scale_image_widget(image_widget, max_width);
@@ -442,16 +442,16 @@ static void render_table_widgets(MarkydEditor *self) {
while (!gtk_text_iter_equal(&iter, &end)) {
GtkTextChildAnchor *anchor = gtk_text_iter_get_child_anchor(&iter);
if (anchor &&
g_object_get_data(G_OBJECT(anchor), VIEWMD_TABLE_ANCHOR_DATA) != NULL) {
g_object_get_data(G_OBJECT(anchor), SEEMD_TABLE_ANCHOR_DATA) != NULL) {
GtkWidget *table =
g_object_get_data(G_OBJECT(anchor), VIEWMD_TABLE_WIDGET_DATA);
g_object_get_data(G_OBJECT(anchor), SEEMD_TABLE_WIDGET_DATA);
if (!table) {
table = markdown_create_table_widget(anchor);
if (table) {
gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(self->text_view), table,
anchor);
gtk_widget_show_all(table);
g_object_set_data(G_OBJECT(anchor), VIEWMD_TABLE_WIDGET_DATA, table);
g_object_set_data(G_OBJECT(anchor), SEEMD_TABLE_WIDGET_DATA, table);
}
}
}
+51 -51
View File
@@ -28,7 +28,7 @@
#define TAG_TABLE_HEADER "table_header"
#define TAG_TABLE_SEPARATOR "table_separator"
#define TAG_INVISIBLE "invisible"
#define TABLE_MODEL_DATA_KEY "viewmd-table-model"
#define TABLE_MODEL_DATA_KEY "seemd-table-model"
typedef struct {
gboolean ordered;
@@ -85,13 +85,13 @@ typedef struct {
typedef struct {
gboolean is_header;
GPtrArray *cells; /* gchar* */
} ViewmdTableRow;
} SeemdTableRow;
typedef struct {
guint col_count;
GArray *aligns; /* MD_ALIGN */
GPtrArray *rows; /* ViewmdTableRow* */
} ViewmdTable;
GPtrArray *rows; /* SeemdTableRow* */
} SeemdTable;
typedef struct {
gint start_offset;
@@ -115,8 +115,8 @@ typedef struct {
gboolean list_item_prefix_pending;
guint quote_depth;
gboolean in_table_head;
ViewmdTable *table_model;
ViewmdTableRow *table_current_row;
SeemdTable *table_model;
SeemdTableRow *table_current_row;
GString *table_cell_text;
guint table_current_col;
gboolean in_image;
@@ -144,8 +144,8 @@ static void html_element_free(gpointer data) {
g_free(el);
}
static void viewmd_table_row_free(gpointer data) {
ViewmdTableRow *row = (ViewmdTableRow *)data;
static void seemd_table_row_free(gpointer data) {
SeemdTableRow *row = (SeemdTableRow *)data;
if (!row) {
return;
}
@@ -155,8 +155,8 @@ static void viewmd_table_row_free(gpointer data) {
g_free(row);
}
static void viewmd_table_free(gpointer data) {
ViewmdTable *table = (ViewmdTable *)data;
static void seemd_table_free(gpointer data) {
SeemdTable *table = (SeemdTable *)data;
if (!table) {
return;
}
@@ -169,11 +169,11 @@ static void viewmd_table_free(gpointer data) {
g_free(table);
}
static ViewmdTable *viewmd_table_new(guint col_count) {
ViewmdTable *table = g_new0(ViewmdTable, 1);
static SeemdTable *seemd_table_new(guint col_count) {
SeemdTable *table = g_new0(SeemdTable, 1);
table->col_count = col_count;
table->aligns = g_array_sized_new(FALSE, FALSE, sizeof(MD_ALIGN), col_count);
table->rows = g_ptr_array_new_with_free_func(viewmd_table_row_free);
table->rows = g_ptr_array_new_with_free_func(seemd_table_row_free);
for (guint i = 0; i < col_count; i++) {
MD_ALIGN align = MD_ALIGN_DEFAULT;
g_array_append_val(table->aligns, align);
@@ -181,7 +181,7 @@ static ViewmdTable *viewmd_table_new(guint col_count) {
return table;
}
static void table_ensure_col_count(ViewmdTable *table, guint col_count) {
static void table_ensure_col_count(SeemdTable *table, guint col_count) {
if (!table || col_count <= table->col_count) {
return;
}
@@ -807,7 +807,7 @@ gchar *markdown_normalize_anchor_slug(const gchar *text) {
gchar *markdown_anchor_mark_name(const gchar *fragment) {
gchar *slug = markdown_normalize_anchor_slug(fragment);
gchar *name = g_strdup_printf("%s%s", VIEWMD_ANCHOR_MARK_PREFIX, slug);
gchar *name = g_strdup_printf("%s%s", SEEMD_ANCHOR_MARK_PREFIX, slug);
g_free(slug);
return name;
}
@@ -842,7 +842,7 @@ static void create_heading_anchor(RenderCtx *ctx) {
slug = (count == 0) ? g_strdup(base) : g_strdup_printf("%s-%u", base, count);
g_hash_table_replace(ctx->anchor_counts, g_strdup(base), GUINT_TO_POINTER(count + 1));
mark_name = g_strdup_printf("%s%s", VIEWMD_ANCHOR_MARK_PREFIX, slug);
mark_name = g_strdup_printf("%s%s", SEEMD_ANCHOR_MARK_PREFIX, slug);
gtk_text_buffer_get_iter_at_offset(ctx->buffer, &at, ctx->heading_start_offset);
gtk_text_buffer_create_mark(ctx->buffer, mark_name, &at, TRUE);
@@ -879,7 +879,7 @@ static gchar *table_cell_markup_to_plain(const gchar *markup) {
}
static void table_search_index_free(gpointer data) {
ViewmdTableSearchIndex *index = (ViewmdTableSearchIndex *)data;
SeemdTableSearchIndex *index = (SeemdTableSearchIndex *)data;
if (!index) {
return;
}
@@ -889,9 +889,9 @@ static void table_search_index_free(gpointer data) {
g_free(index);
}
static void table_emit_hidden_search_text(RenderCtx *ctx, ViewmdTable *table,
static void table_emit_hidden_search_text(RenderCtx *ctx, SeemdTable *table,
GtkTextChildAnchor *anchor) {
ViewmdTableSearchIndex *index;
SeemdTableSearchIndex *index;
gboolean saved_has_output;
guint saved_trailing_newlines;
const gchar *cell_sep = " ";
@@ -905,12 +905,12 @@ static void table_emit_hidden_search_text(RenderCtx *ctx, ViewmdTable *table,
saved_has_output = ctx->has_output;
saved_trailing_newlines = ctx->trailing_newlines;
index = g_new0(ViewmdTableSearchIndex, 1);
index->cells = g_array_new(FALSE, FALSE, sizeof(ViewmdTableSearchCellRange));
index = g_new0(SeemdTableSearchIndex, 1);
index->cells = g_array_new(FALSE, FALSE, sizeof(SeemdTableSearchCellRange));
index->start_offset = gtk_text_iter_get_offset(&ctx->iter);
for (guint r = 0; r < table->rows->len; r++) {
ViewmdTableRow *row = g_ptr_array_index(table->rows, r);
SeemdTableRow *row = g_ptr_array_index(table->rows, r);
if (!row) {
continue;
}
@@ -936,7 +936,7 @@ static void table_emit_hidden_search_text(RenderCtx *ctx, ViewmdTable *table,
cell_end = gtk_text_iter_get_offset(&ctx->iter);
if (cell_end > cell_start) {
ViewmdTableSearchCellRange cell_range = {(gint)r, (gint)c, cell_start,
SeemdTableSearchCellRange cell_range = {(gint)r, (gint)c, cell_start,
cell_end};
g_array_append_val(index->cells, cell_range);
}
@@ -953,7 +953,7 @@ static void table_emit_hidden_search_text(RenderCtx *ctx, ViewmdTable *table,
if (index->end_offset > index->start_offset) {
apply_tag_by_name_offsets(ctx->buffer, TAG_INVISIBLE, index->start_offset,
index->end_offset);
g_object_set_data_full(G_OBJECT(anchor), VIEWMD_TABLE_SEARCH_INDEX_DATA, index,
g_object_set_data_full(G_OBJECT(anchor), SEEMD_TABLE_SEARCH_INDEX_DATA, index,
table_search_index_free);
} else {
table_search_index_free(index);
@@ -1016,11 +1016,11 @@ static void table_capture_span_leave(RenderCtx *ctx, MD_SPANTYPE type) {
}
static void table_start_row(RenderCtx *ctx) {
ViewmdTableRow *row;
SeemdTableRow *row;
if (!ctx || !ctx->table_model) {
return;
}
row = g_new0(ViewmdTableRow, 1);
row = g_new0(SeemdTableRow, 1);
row->is_header = ctx->in_table_head;
row->cells = g_ptr_array_new_with_free_func(g_free);
g_ptr_array_add(ctx->table_model->rows, row);
@@ -1076,16 +1076,16 @@ static void table_emit_anchor(RenderCtx *ctx) {
return;
}
if (ctx->table_model->rows->len == 0 || ctx->table_model->col_count == 0) {
viewmd_table_free(ctx->table_model);
seemd_table_free(ctx->table_model);
ctx->table_model = NULL;
return;
}
anchor = gtk_text_buffer_create_child_anchor(ctx->buffer, &ctx->iter);
note_non_newline_output(ctx);
g_object_set_data(G_OBJECT(anchor), VIEWMD_TABLE_ANCHOR_DATA, GINT_TO_POINTER(1));
g_object_set_data(G_OBJECT(anchor), SEEMD_TABLE_ANCHOR_DATA, GINT_TO_POINTER(1));
g_object_set_data_full(G_OBJECT(anchor), TABLE_MODEL_DATA_KEY, ctx->table_model,
viewmd_table_free);
seemd_table_free);
/* Keep table text searchable via Ctrl+F without showing duplicate content. */
table_emit_hidden_search_text(ctx, ctx->table_model, anchor);
@@ -1103,8 +1103,8 @@ static void image_emit_anchor(RenderCtx *ctx) {
anchor = gtk_text_buffer_create_child_anchor(ctx->buffer, &ctx->iter);
note_non_newline_output(ctx);
g_object_set_data(G_OBJECT(anchor), VIEWMD_IMAGE_ANCHOR_DATA, GINT_TO_POINTER(1));
g_object_set_data_full(G_OBJECT(anchor), VIEWMD_IMAGE_SRC_DATA,
g_object_set_data(G_OBJECT(anchor), SEEMD_IMAGE_ANCHOR_DATA, GINT_TO_POINTER(1));
g_object_set_data_full(G_OBJECT(anchor), SEEMD_IMAGE_SRC_DATA,
g_strdup(ctx->image_src), g_free);
if (ctx->image_alt && ctx->image_alt->len > 0) {
@@ -1112,13 +1112,13 @@ static void image_emit_anchor(RenderCtx *ctx) {
} else {
alt = g_strdup("");
}
g_object_set_data_full(G_OBJECT(anchor), VIEWMD_IMAGE_ALT_DATA, alt, g_free);
g_object_set_data_full(G_OBJECT(anchor), SEEMD_IMAGE_ALT_DATA, alt, g_free);
if (ctx->image_width > 0) {
g_object_set_data(G_OBJECT(anchor), VIEWMD_IMAGE_WIDTH_DATA,
g_object_set_data(G_OBJECT(anchor), SEEMD_IMAGE_WIDTH_DATA,
GINT_TO_POINTER(ctx->image_width));
}
if (ctx->image_height > 0) {
g_object_set_data(G_OBJECT(anchor), VIEWMD_IMAGE_HEIGHT_DATA,
g_object_set_data(G_OBJECT(anchor), SEEMD_IMAGE_HEIGHT_DATA,
GINT_TO_POINTER(ctx->image_height));
}
@@ -1554,7 +1554,7 @@ static void html_push_link_tags(RenderCtx *ctx, HtmlElement *el,
}
url_tag = gtk_text_buffer_create_tag(ctx->buffer, NULL, NULL);
g_object_set_data_full(G_OBJECT(url_tag), VIEWMD_LINK_URL_DATA, g_strdup(href),
g_object_set_data_full(G_OBJECT(url_tag), SEEMD_LINK_URL_DATA, g_strdup(href),
g_free);
push_active_tag_by_name(ctx, TAG_LINK, &el->pushed_tags);
push_active_tag(ctx, url_tag, &el->pushed_tags);
@@ -1820,9 +1820,9 @@ static void html_open_element(RenderCtx *ctx, const gchar *name,
el->kind = HTML_EL_TABLE;
ensure_newlines(ctx, 2);
if (ctx->table_model) {
viewmd_table_free(ctx->table_model);
seemd_table_free(ctx->table_model);
}
ctx->table_model = viewmd_table_new(0);
ctx->table_model = seemd_table_new(0);
ctx->table_current_row = NULL;
ctx->in_table_head = FALSE;
} else if (html_name_is(name, "thead")) {
@@ -2248,9 +2248,9 @@ static int on_enter_block(MD_BLOCKTYPE type, void *detail, void *userdata) {
MD_BLOCK_TABLE_DETAIL *tbl = (MD_BLOCK_TABLE_DETAIL *)detail;
ensure_newlines(ctx, 2);
if (ctx->table_model) {
viewmd_table_free(ctx->table_model);
seemd_table_free(ctx->table_model);
}
ctx->table_model = viewmd_table_new(tbl ? tbl->col_count : 0);
ctx->table_model = seemd_table_new(tbl ? tbl->col_count : 0);
ctx->table_current_row = NULL;
ctx->in_table_head = FALSE;
break;
@@ -2372,7 +2372,7 @@ static int on_enter_span(MD_SPANTYPE type, void *detail, void *userdata) {
MD_SPAN_A_DETAIL *a = (MD_SPAN_A_DETAIL *)detail;
gchar *href = attr_to_string(a ? &a->href : NULL);
GtkTextTag *url_tag = gtk_text_buffer_create_tag(ctx->buffer, NULL, NULL);
g_object_set_data_full(G_OBJECT(url_tag), VIEWMD_LINK_URL_DATA, href, g_free);
g_object_set_data_full(G_OBJECT(url_tag), SEEMD_LINK_URL_DATA, href, g_free);
push_active_tag_by_name(ctx, TAG_LINK,
&g_array_index(ctx->span_stack, SpanState,
ctx->span_stack->len - 1)
@@ -2609,7 +2609,7 @@ static gfloat align_to_xalign(MD_ALIGN align) {
}
GtkWidget *markdown_create_table_widget(GtkTextChildAnchor *anchor) {
ViewmdTable *table;
SeemdTable *table;
GtkWidget *wrapper;
GtkWidget *grid;
@@ -2617,14 +2617,14 @@ GtkWidget *markdown_create_table_widget(GtkTextChildAnchor *anchor) {
return NULL;
}
table = (ViewmdTable *)g_object_get_data(G_OBJECT(anchor), TABLE_MODEL_DATA_KEY);
table = (SeemdTable *)g_object_get_data(G_OBJECT(anchor), TABLE_MODEL_DATA_KEY);
if (!table || table->col_count == 0 || !table->rows || table->rows->len == 0) {
return NULL;
}
wrapper = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_style_context_add_class(gtk_widget_get_style_context(wrapper),
"viewmd-table");
"seemd-table");
gtk_widget_set_halign(wrapper, GTK_ALIGN_START);
gtk_widget_set_margin_top(wrapper, 6);
gtk_widget_set_margin_bottom(wrapper, 6);
@@ -2633,13 +2633,13 @@ GtkWidget *markdown_create_table_widget(GtkTextChildAnchor *anchor) {
grid = gtk_grid_new();
gtk_style_context_add_class(gtk_widget_get_style_context(grid),
"viewmd-table-grid");
"seemd-table-grid");
gtk_grid_set_row_spacing(GTK_GRID(grid), 0);
gtk_grid_set_column_spacing(GTK_GRID(grid), 0);
gtk_box_pack_start(GTK_BOX(wrapper), grid, TRUE, TRUE, 0);
for (guint r = 0; r < table->rows->len; r++) {
ViewmdTableRow *row = g_ptr_array_index(table->rows, r);
SeemdTableRow *row = g_ptr_array_index(table->rows, r);
if (!row) {
continue;
}
@@ -2661,17 +2661,17 @@ GtkWidget *markdown_create_table_widget(GtkTextChildAnchor *anchor) {
}
gtk_style_context_add_class(gtk_widget_get_style_context(cell),
"viewmd-table-cell");
"seemd-table-cell");
if (row->is_header) {
gtk_style_context_add_class(gtk_widget_get_style_context(cell),
"viewmd-table-header-cell");
"seemd-table-header-cell");
}
g_object_set_data(G_OBJECT(cell), VIEWMD_TABLE_CELL_ROW_DATA,
g_object_set_data(G_OBJECT(cell), SEEMD_TABLE_CELL_ROW_DATA,
GINT_TO_POINTER((gint)r));
g_object_set_data(G_OBJECT(cell), VIEWMD_TABLE_CELL_COL_DATA,
g_object_set_data(G_OBJECT(cell), SEEMD_TABLE_CELL_COL_DATA,
GINT_TO_POINTER((gint)c));
gtk_style_context_add_class(gtk_widget_get_style_context(label),
"viewmd-table-label");
"seemd-table-label");
gtk_widget_set_hexpand(cell, FALSE);
gtk_widget_set_vexpand(cell, FALSE);
gtk_container_add(GTK_CONTAINER(cell), label);
@@ -2760,7 +2760,7 @@ void markdown_apply_tags(GtkTextBuffer *buffer, const gchar *source) {
g_string_free(ctx.image_alt, TRUE);
}
if (ctx.table_model) {
viewmd_table_free(ctx.table_model);
seemd_table_free(ctx.table_model);
}
if (ctx.heading_text) {
g_string_free(ctx.heading_text, TRUE);
+19 -19
View File
@@ -4,7 +4,7 @@
#include <gtk/gtk.h>
/* GObject data key used to mark hrule child anchors inserted into the buffer. */
#define TRAYMD_HRULE_ANCHOR_DATA "viewmd-hr-anchor"
#define TRAYMD_HRULE_ANCHOR_DATA "seemd-hr-anchor"
/* Initialize markdown tags on a text buffer */
void markdown_init_tags(GtkTextBuffer *buffer);
@@ -13,44 +13,44 @@ void markdown_init_tags(GtkTextBuffer *buffer);
void markdown_update_accent_tags(GtkTextBuffer *buffer);
/* Data key set on per-link metadata tags to store resolved URL/href. */
#define VIEWMD_LINK_URL_DATA "viewmd-link-url"
#define SEEMD_LINK_URL_DATA "seemd-link-url"
/* Prefix for named text marks used as internal heading anchors. */
#define VIEWMD_ANCHOR_MARK_PREFIX "viewmd-anchor-"
#define SEEMD_ANCHOR_MARK_PREFIX "seemd-anchor-"
/* GObject data key used to mark table child anchors with parsed table data. */
#define VIEWMD_TABLE_ANCHOR_DATA "viewmd-table-anchor"
#define SEEMD_TABLE_ANCHOR_DATA "seemd-table-anchor"
/* GObject data key set on table anchors for hidden searchable index metadata. */
#define VIEWMD_TABLE_SEARCH_INDEX_DATA "viewmd-table-search-index"
#define SEEMD_TABLE_SEARCH_INDEX_DATA "seemd-table-search-index"
/* GObject data key set on table anchors for attached table widget instance. */
#define VIEWMD_TABLE_WIDGET_DATA "viewmd-table-widget"
#define SEEMD_TABLE_WIDGET_DATA "seemd-table-widget"
/* GObject data keys set on each table cell widget. */
#define VIEWMD_TABLE_CELL_ROW_DATA "viewmd-table-cell-row"
#define VIEWMD_TABLE_CELL_COL_DATA "viewmd-table-cell-col"
#define SEEMD_TABLE_CELL_ROW_DATA "seemd-table-cell-row"
#define SEEMD_TABLE_CELL_COL_DATA "seemd-table-cell-col"
/* CSS classes for table search highlight states. */
#define VIEWMD_TABLE_CELL_MATCH_CLASS "viewmd-table-cell-match"
#define VIEWMD_TABLE_CELL_CURRENT_CLASS "viewmd-table-cell-current"
#define SEEMD_TABLE_CELL_MATCH_CLASS "seemd-table-cell-match"
#define SEEMD_TABLE_CELL_CURRENT_CLASS "seemd-table-cell-current"
/* GObject data keys for image anchors and metadata. */
#define VIEWMD_IMAGE_ANCHOR_DATA "viewmd-image-anchor"
#define VIEWMD_IMAGE_SRC_DATA "viewmd-image-src"
#define VIEWMD_IMAGE_ALT_DATA "viewmd-image-alt"
#define VIEWMD_IMAGE_WIDGET_DATA "viewmd-image-widget"
#define VIEWMD_IMAGE_WIDTH_DATA "viewmd-image-width"
#define VIEWMD_IMAGE_HEIGHT_DATA "viewmd-image-height"
#define SEEMD_IMAGE_ANCHOR_DATA "seemd-image-anchor"
#define SEEMD_IMAGE_SRC_DATA "seemd-image-src"
#define SEEMD_IMAGE_ALT_DATA "seemd-image-alt"
#define SEEMD_IMAGE_WIDGET_DATA "seemd-image-widget"
#define SEEMD_IMAGE_WIDTH_DATA "seemd-image-width"
#define SEEMD_IMAGE_HEIGHT_DATA "seemd-image-height"
typedef struct {
gint row;
gint col;
gint start_offset;
gint end_offset;
} ViewmdTableSearchCellRange;
} SeemdTableSearchCellRange;
typedef struct {
gint start_offset;
gint end_offset;
GArray *cells; /* ViewmdTableSearchCellRange */
} ViewmdTableSearchIndex;
GArray *cells; /* SeemdTableSearchCellRange */
} SeemdTableSearchIndex;
/* Normalize heading/link text into anchor slug form. Caller owns result. */
gchar *markdown_normalize_anchor_slug(const gchar *text);
+39 -39
View File
@@ -12,9 +12,9 @@ typedef struct {
gint table_col;
} SearchMatch;
#define TAG_SEARCH_MATCH "viewmd_search_match"
#define TAG_SEARCH_CURRENT "viewmd_search_current"
#define TOOLBAR_LABEL_DATA "viewmd-toolbar-label"
#define TAG_SEARCH_MATCH "seemd_search_match"
#define TAG_SEARCH_CURRENT "seemd_search_current"
#define TOOLBAR_LABEL_DATA "seemd-toolbar-label"
static void on_open_clicked(GtkButton *button, gpointer user_data);
static void on_refresh_clicked(GtkButton *button, gpointer user_data);
@@ -75,7 +75,7 @@ static void set_toolbar_button_label(GtkWidget *button, const gchar *label);
static void restore_editor_focus(MarkydWindow *self);
static gboolean geometry_debug_enabled(void) {
const gchar *v = g_getenv("VIEWMD_DEBUG_GEOMETRY");
const gchar *v = g_getenv("SEEMD_DEBUG_GEOMETRY");
if (!v) {
v = g_getenv("TRAYMD_DEBUG_GEOMETRY");
}
@@ -174,15 +174,15 @@ static void set_table_cell_highlight(GtkWidget *cell, gboolean match,
style = gtk_widget_get_style_context(cell);
if (match) {
gtk_style_context_add_class(style, VIEWMD_TABLE_CELL_MATCH_CLASS);
gtk_style_context_add_class(style, SEEMD_TABLE_CELL_MATCH_CLASS);
} else {
gtk_style_context_remove_class(style, VIEWMD_TABLE_CELL_MATCH_CLASS);
gtk_style_context_remove_class(style, SEEMD_TABLE_CELL_MATCH_CLASS);
}
if (current) {
gtk_style_context_add_class(style, VIEWMD_TABLE_CELL_CURRENT_CLASS);
gtk_style_context_add_class(style, SEEMD_TABLE_CELL_CURRENT_CLASS);
} else {
gtk_style_context_remove_class(style, VIEWMD_TABLE_CELL_CURRENT_CLASS);
gtk_style_context_remove_class(style, SEEMD_TABLE_CELL_CURRENT_CLASS);
}
}
@@ -247,9 +247,9 @@ static GtkWidget *lookup_table_cell_widget(GtkWidget *table_widget, gint row,
for (GList *g = grid_children; g != NULL; g = g->next) {
GtkWidget *cell = GTK_WIDGET(g->data);
gint cell_row = GPOINTER_TO_INT(
g_object_get_data(G_OBJECT(cell), VIEWMD_TABLE_CELL_ROW_DATA));
g_object_get_data(G_OBJECT(cell), SEEMD_TABLE_CELL_ROW_DATA));
gint cell_col = GPOINTER_TO_INT(
g_object_get_data(G_OBJECT(cell), VIEWMD_TABLE_CELL_COL_DATA));
g_object_get_data(G_OBJECT(cell), SEEMD_TABLE_CELL_COL_DATA));
if (cell_row == row && cell_col == col) {
found = cell;
break;
@@ -275,9 +275,9 @@ static void clear_table_search_highlight(MarkydWindow *self, gboolean clear_matc
while (!gtk_text_iter_equal(&iter, &end)) {
GtkTextChildAnchor *anchor = gtk_text_iter_get_child_anchor(&iter);
if (anchor &&
g_object_get_data(G_OBJECT(anchor), VIEWMD_TABLE_ANCHOR_DATA) != NULL) {
g_object_get_data(G_OBJECT(anchor), SEEMD_TABLE_ANCHOR_DATA) != NULL) {
GtkWidget *table_widget =
g_object_get_data(G_OBJECT(anchor), VIEWMD_TABLE_WIDGET_DATA);
g_object_get_data(G_OBJECT(anchor), SEEMD_TABLE_WIDGET_DATA);
if (table_widget && GTK_IS_CONTAINER(table_widget)) {
GList *wrapper_children =
gtk_container_get_children(GTK_CONTAINER(table_widget));
@@ -291,11 +291,11 @@ static void clear_table_search_highlight(MarkydWindow *self, gboolean clear_matc
GtkWidget *cell = GTK_WIDGET(g->data);
if (clear_match) {
gtk_style_context_remove_class(gtk_widget_get_style_context(cell),
VIEWMD_TABLE_CELL_MATCH_CLASS);
SEEMD_TABLE_CELL_MATCH_CLASS);
}
if (clear_current) {
gtk_style_context_remove_class(gtk_widget_get_style_context(cell),
VIEWMD_TABLE_CELL_CURRENT_CLASS);
SEEMD_TABLE_CELL_CURRENT_CLASS);
}
}
g_list_free(grid_children);
@@ -333,8 +333,8 @@ static gboolean resolve_table_match_location(MarkydWindow *self, gint start_offs
while (!gtk_text_iter_equal(&iter, &end)) {
GtkTextChildAnchor *anchor = gtk_text_iter_get_child_anchor(&iter);
if (anchor) {
ViewmdTableSearchIndex *index = g_object_get_data(
G_OBJECT(anchor), VIEWMD_TABLE_SEARCH_INDEX_DATA);
SeemdTableSearchIndex *index = g_object_get_data(
G_OBJECT(anchor), SEEMD_TABLE_SEARCH_INDEX_DATA);
if (index && start_offset < index->end_offset &&
end_offset > index->start_offset) {
if (out_anchor) {
@@ -342,10 +342,10 @@ static gboolean resolve_table_match_location(MarkydWindow *self, gint start_offs
}
if (index->cells) {
ViewmdTableSearchCellRange *overlap_cell = NULL;
SeemdTableSearchCellRange *overlap_cell = NULL;
for (guint i = 0; i < index->cells->len; i++) {
ViewmdTableSearchCellRange *cell =
&g_array_index(index->cells, ViewmdTableSearchCellRange, i);
SeemdTableSearchCellRange *cell =
&g_array_index(index->cells, SeemdTableSearchCellRange, i);
if (start_offset >= cell->start_offset && start_offset < cell->end_offset) {
if (out_row) {
*out_row = cell->row;
@@ -396,7 +396,7 @@ static void apply_table_search_match_highlight(MarkydWindow *self) {
}
table_widget =
g_object_get_data(G_OBJECT(match->table_anchor), VIEWMD_TABLE_WIDGET_DATA);
g_object_get_data(G_OBJECT(match->table_anchor), SEEMD_TABLE_WIDGET_DATA);
cell = lookup_table_cell_widget(table_widget, match->table_row, match->table_col);
if (cell) {
set_table_cell_highlight(cell, TRUE, FALSE);
@@ -428,7 +428,7 @@ static void jump_to_search_match(MarkydWindow *self, gint index,
match = &g_array_index(self->search_matches, SearchMatch, index);
if (match->table_anchor && match->table_row >= 0 && match->table_col >= 0) {
GtkWidget *table_widget =
g_object_get_data(G_OBJECT(match->table_anchor), VIEWMD_TABLE_WIDGET_DATA);
g_object_get_data(G_OBJECT(match->table_anchor), SEEMD_TABLE_WIDGET_DATA);
GtkWidget *cell =
lookup_table_cell_widget(table_widget, match->table_row, match->table_col);
if (cell) {
@@ -449,7 +449,7 @@ static void jump_to_search_match(MarkydWindow *self, gint index,
gboolean scrolled_to_cell = FALSE;
if (match->table_row >= 0 && match->table_col >= 0) {
GtkWidget *table_widget = g_object_get_data(G_OBJECT(match->table_anchor),
VIEWMD_TABLE_WIDGET_DATA);
SEEMD_TABLE_WIDGET_DATA);
GtkWidget *cell = lookup_table_cell_widget(table_widget, match->table_row,
match->table_col);
if (cell) {
@@ -732,7 +732,7 @@ static void on_about_clicked(GtkButton *button, gpointer user_data) {
gtk_container_add(GTK_CONTAINER(popover), box);
title = gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(title), "<b>ViewMD</b>");
gtk_label_set_markup(GTK_LABEL(title), "<b>SeeMD</b>");
gtk_label_set_xalign(GTK_LABEL(title), 0.0f);
gtk_box_pack_start(GTK_BOX(box), title, FALSE, FALSE, 0);
@@ -742,7 +742,7 @@ static void on_about_clicked(GtkButton *button, gpointer user_data) {
gtk_box_pack_start(GTK_BOX(box), summary, FALSE, FALSE, 0);
details = gtk_label_new(
"This is a fork of ViewMD by NotAlexNoyle, with additional features, "
"This is a fork of SeeMD by NotAlexNoyle, with additional features, "
"including GitHub-style preview rendering, HTML-in-Markdown support, "
"editing, saving, toolbar labels, and improved image sizing.");
gtk_label_set_xalign(GTK_LABEL(details), 0.0f);
@@ -763,7 +763,7 @@ MarkydWindow *markyd_window_new(MarkydApp *app) {
self->app = app;
self->window = gtk_application_window_new(app->gtk_app);
gtk_window_set_title(GTK_WINDOW(self->window), "ViewMD");
gtk_window_set_title(GTK_WINDOW(self->window), "SeeMD");
gtk_window_set_default_size(GTK_WINDOW(self->window), config->window_width,
config->window_height);
@@ -774,7 +774,7 @@ MarkydWindow *markyd_window_new(MarkydApp *app) {
}
if (geometry_debug_enabled()) {
g_printerr("ViewMD geometry init: x=%d y=%d w=%d h=%d maximized=%d\n",
g_printerr("SeeMD geometry init: x=%d y=%d w=%d h=%d maximized=%d\n",
config->window_x, config->window_y, config->window_width,
config->window_height, config->window_maximized);
}
@@ -794,10 +794,10 @@ MarkydWindow *markyd_window_new(MarkydApp *app) {
gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(self->header_bar), TRUE);
gtk_window_set_titlebar(GTK_WINDOW(self->window), self->header_bar);
self->lbl_title = gtk_button_new_with_label("ViewMD");
self->lbl_title = gtk_button_new_with_label("SeeMD");
gtk_button_set_relief(GTK_BUTTON(self->lbl_title), GTK_RELIEF_NONE);
gtk_widget_set_focus_on_click(self->lbl_title, FALSE);
gtk_widget_set_tooltip_text(self->lbl_title, "About ViewMD");
gtk_widget_set_tooltip_text(self->lbl_title, "About SeeMD");
gtk_widget_set_halign(self->lbl_title, GTK_ALIGN_END);
gtk_widget_set_margin_start(self->lbl_title, 12);
gtk_widget_set_margin_end(self->lbl_title, 12);
@@ -981,28 +981,28 @@ void markyd_window_apply_css(MarkydWindow *self) {
"window {"
" background-color: %s;"
"}"
".viewmd-table-cell {"
".seemd-table-cell {"
" background-color: %s;"
" border-style: solid;"
" border-width: 1px;"
" border-color: %s;"
"}"
".viewmd-table-header-cell {"
".seemd-table-header-cell {"
" background-color: %s;"
"}"
".viewmd-table-cell label {"
".seemd-table-cell label {"
" color: %s;"
"}"
".viewmd-table-cell." VIEWMD_TABLE_CELL_MATCH_CLASS " {"
".seemd-table-cell." SEEMD_TABLE_CELL_MATCH_CLASS " {"
" background-color: %s;"
"}"
".viewmd-table-cell." VIEWMD_TABLE_CELL_MATCH_CLASS " label {"
".seemd-table-cell." SEEMD_TABLE_CELL_MATCH_CLASS " label {"
" color: %s;"
"}"
".viewmd-table-cell." VIEWMD_TABLE_CELL_CURRENT_CLASS " {"
".seemd-table-cell." SEEMD_TABLE_CELL_CURRENT_CLASS " {"
" background-color: %s;"
"}"
".viewmd-table-cell." VIEWMD_TABLE_CELL_CURRENT_CLASS " label {"
".seemd-table-cell." SEEMD_TABLE_CELL_CURRENT_CLASS " label {"
" color: %s;"
"}",
config->font_family, config->font_size, bg, fg, fg, bg, fg, fg, sel_bg, bg,
@@ -1403,15 +1403,15 @@ static gboolean on_configure_event(GtkWidget *widget, GdkEventConfigure *event,
if (geometry_debug_enabled()) {
if (have_extents) {
g_printerr(
"ViewMD configure: event=%dx%d gtk=%dx%d saved=%dx%d frame=%dx%d at (%d,%d)\n",
"SeeMD configure: event=%dx%d gtk=%dx%d saved=%dx%d frame=%dx%d at (%d,%d)\n",
event->width, event->height, gtk_w, gtk_h, width, height,
frame_extents.width, frame_extents.height, x, y);
} else {
g_printerr("ViewMD configure: event=%dx%d gtk=%dx%d saved=%dx%d at (%d,%d)\n",
g_printerr("SeeMD configure: event=%dx%d gtk=%dx%d saved=%dx%d at (%d,%d)\n",
event->width, event->height, gtk_w, gtk_h, width, height, x,
y);
}
g_printerr("ViewMD saved: x=%d y=%d w=%d h=%d\n", config->window_x,
g_printerr("SeeMD saved: x=%d y=%d w=%d h=%d\n", config->window_x,
config->window_y, config->window_width, config->window_height);
}
}
@@ -1486,7 +1486,7 @@ static GtkWidget *create_settings_dialog(MarkydApp *app) {
gint row = 0;
dialog = gtk_dialog_new_with_buttons(
"ViewMD Settings", GTK_WINDOW(app->window->window),
"SeeMD Settings", GTK_WINDOW(app->window->window),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, "_Cancel",
GTK_RESPONSE_CANCEL, "_Apply", GTK_RESPONSE_APPLY, NULL);