Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3b229c464 | ||
|
|
effa685762 | ||
|
|
a30ce043f4 |
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Robert Fulton
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+6
-3
@@ -965,15 +965,17 @@ static void on_open_clicked(GtkButton *button, gpointer user_data) {
|
||||
|
||||
static void on_refresh_clicked(GtkButton *button, gpointer user_data) {
|
||||
MarkydWindow *self = (MarkydWindow *)user_data;
|
||||
const gchar *path;
|
||||
const gchar *current;
|
||||
gchar *path;
|
||||
|
||||
(void)button;
|
||||
|
||||
path = markyd_app_get_current_path(self->app);
|
||||
if (!path || path[0] == '\0') {
|
||||
current = markyd_app_get_current_path(self->app);
|
||||
if (!current || current[0] == '\0') {
|
||||
return;
|
||||
}
|
||||
|
||||
path = g_strdup(current);
|
||||
if (!markyd_app_open_file(self->app, path)) {
|
||||
GtkWidget *error_dialog = gtk_message_dialog_new(
|
||||
GTK_WINDOW(self->window),
|
||||
@@ -984,6 +986,7 @@ static void on_refresh_clicked(GtkButton *button, gpointer user_data) {
|
||||
gtk_dialog_run(GTK_DIALOG(error_dialog));
|
||||
gtk_widget_destroy(error_dialog);
|
||||
}
|
||||
g_free(path);
|
||||
}
|
||||
|
||||
static void on_settings_clicked(GtkButton *button, gpointer user_data) {
|
||||
|
||||
Reference in new issue
Block a user