diff --git a/icons/luna/mappings b/icons/luna/mappings
index a7388e1..61c9d5a 100644
--- a/icons/luna/mappings
+++ b/icons/luna/mappings
@@ -229,6 +229,7 @@ mimetypes/audio-aac-->file_generic_media
mimetypes/audio-flac-->file_generic_media
mimetypes/audio-midi-->file_generic_media
mimetypes/audio-mpeg-->file_generic_media
+mimetypes/audio-vnd.wave-->file_generic_media
mimetypes/audio-x-generic-->file_generic_media
mimetypes/font-collection-->file_generic_font
mimetypes/font-otf-->file_otf
diff --git a/packaging/targets b/packaging/targets
index cdd083d..e09f00d 100644
--- a/packaging/targets
+++ b/packaging/targets
@@ -21,6 +21,7 @@ shell/cpl/desk
shell/cpl/printers
shell/cpl/sysdm
shell/desktop
+shell/doctmpls
shell/exitwin
shell/explorer
shell/run
diff --git a/shared/comgtk/.gitignore b/shared/comgtk/.gitignore
index be59141..b6d9cd9 100644
--- a/shared/comgtk/.gitignore
+++ b/shared/comgtk/.gitignore
@@ -1,3 +1,4 @@
# Ignore dynamically generated source
assets.h
+location.h
version.c
diff --git a/shared/comgtk/public/location.h b/shared/comgtk/public/location.h
deleted file mode 100644
index 8f57926..0000000
--- a/shared/comgtk/public/location.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/** @file */
-
-#ifndef __COMGTK_LOCATION_H__
-#define __COMGTK_LOCATION_H__
-
-/**
- * @def WINTC_ASSETS_DIR
- *
- * The absolute path for the directory that contains the assets for WinTC
- * components.
- */
-#define WINTC_ASSETS_DIR "/usr/share/wintc"
-
-/**
- * @def WINTC_CONFIG_DIR
- *
- * The absolute path for the directory that contains system-wide configuration
- * for WinTC components.
- */
-#define WINTC_CONFIG_DIR "/etc/wintc"
-
-#endif
diff --git a/shared/shell/CMakeLists.txt b/shared/shell/CMakeLists.txt
index 0ac9576..bc03923 100644
--- a/shared/shell/CMakeLists.txt
+++ b/shared/shell/CMakeLists.txt
@@ -33,6 +33,7 @@ wintc_resolve_library(wintc-shcommon WINTC_SHCOMMON)
wintc_resolve_library(wintc-shellext WINTC_SHELLEXT)
wintc_resolve_library(wintc-shlang WINTC_SHLANG)
wintc_resolve_library(wintc-winbrand WINTC_WINBRAND)
+wintc_resolve_library(libxml-2.0 XML2)
wintc_compile_resources()
@@ -99,6 +100,7 @@ target_include_directories(
PRIVATE ${WINTC_SHELLEXT_INCLUDE_DIRS}
PRIVATE ${WINTC_SHLANG_INCLUDE_DIRS}
PRIVATE ${WINTC_WINBRAND_INCLUDE_DIRS}
+ PRIVATE ${XML2_INCLUDE_DIRS}
)
target_link_directories(
@@ -115,6 +117,7 @@ target_link_directories(
PRIVATE ${WINTC_SHELLEXT_LIBRARY_DIRS}
PRIVATE ${WINTC_SHLANG_LIBRARY_DIRS}
PRIVATE ${WINTC_WINBRAND_LIBRARY_DIRS}
+ PRIVATE ${XML2_LIBRARY_DIRS}
)
target_link_libraries(
@@ -131,6 +134,7 @@ target_link_libraries(
PRIVATE ${WINTC_SHELLEXT_LIBRARIES}
PRIVATE ${WINTC_SHLANG_LIBRARIES}
PRIVATE ${WINTC_WINBRAND_LIBRARIES}
+ PRIVATE ${XML2_LIBRARIES}
)
# FreeBSD requires linking to libsysinfo port
diff --git a/shared/shell/deps b/shared/shell/deps
index 3281ffb..5995438 100644
--- a/shared/shell/deps
+++ b/shared/shell/deps
@@ -7,3 +7,4 @@ bt,rt:wintc-comgtk
bt,rt:wintc-exec
bt,rt:wintc-shcommon
bt,rt:wintc-shellext
+bt,rt:xml2
diff --git a/shared/shell/src/icnvwbeh.c b/shared/shell/src/icnvwbeh.c
index 2667b4f..e9b71b5 100644
--- a/shared/shell/src/icnvwbeh.c
+++ b/shared/shell/src/icnvwbeh.c
@@ -122,7 +122,11 @@ struct _WinTCShIconViewBehaviour
GObject __parent__;
WinTCShBrowser* browser;
- GtkWidget* icon_view;
+
+ // UI related
+ //
+ GtkWidget* icon_view;
+ GtkCellRenderer* icon_view_text_cell;
// View state
//
@@ -282,6 +286,28 @@ static void wintc_sh_icon_view_behaviour_constructed(
GTK_SELECTION_MULTIPLE
);
+ // Find the text cell in the icon view, make it editable
+ //
+ GList* renderers =
+ gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(behaviour->icon_view));
+
+ for (GList* iter = renderers; iter; iter = iter->next)
+ {
+ if (GTK_IS_CELL_RENDERER_TEXT(iter->data))
+ {
+ behaviour->icon_view_text_cell =
+ GTK_CELL_RENDERER(iter->data);
+
+ g_object_set(
+ G_OBJECT(iter->data),
+ "editable", TRUE,
+ NULL
+ );
+ }
+ }
+
+ g_list_free(renderers);
+
// Attach signals
//
g_signal_connect(
@@ -824,6 +850,45 @@ static void on_current_view_items_added(
COLUMN_VIEW_HASH, item->hash,
-1
);
+
+ // If this is a new item then focus it
+ //
+ if (item->hint == WINTC_SHEXT_VIEW_ITEM_IS_NEW)
+ {
+ WINTC_LOG_DEBUG("shell: icon view - new item for editing");
+
+ GtkTreePath* tree_path =
+ gtk_tree_model_get_path(
+ GTK_TREE_MODEL(behaviour->list_model),
+ &iter
+ );
+
+ gtk_widget_grab_focus(
+ behaviour->icon_view
+ );
+ gtk_icon_view_unselect_all(
+ GTK_ICON_VIEW(behaviour->icon_view)
+ );
+ gtk_icon_view_select_path(
+ GTK_ICON_VIEW(behaviour->icon_view),
+ tree_path
+ );
+
+ //
+ // FIXME: Commented out, this function is broken and doesn't
+ // actually do anything
+ //
+ /**
+ gtk_icon_view_set_cursor(
+ GTK_ICON_VIEW(behaviour->icon_view),
+ tree_path,
+ behaviour->icon_view_text_cell,
+ TRUE
+ );
+ */
+
+ gtk_tree_path_free(tree_path);
+ }
}
}
diff --git a/shared/shell/src/res/menufs.ui b/shared/shell/src/res/menufs.ui
index 2a06b57..3f403b0 100644
--- a/shared/shell/src/res/menufs.ui
+++ b/shared/shell/src/res/menufs.ui
@@ -20,10 +20,27 @@
- -
- control.no-op
+
New
-
+
+
+ -
+ control.view-op
+ Folder
+ inode-directory
+ 80
+
+ -
+ control.view-op
+ Shortcut
+ emblem-symbolic-link
+ 100
+
+
+
+
+
-
diff --git a/shared/shell/src/vwdesk.c b/shared/shell/src/vwdesk.c
index 97b74d1..aa52e94 100644
--- a/shared/shell/src/vwdesk.c
+++ b/shared/shell/src/vwdesk.c
@@ -30,6 +30,7 @@ static WinTCShextViewItem s_desktop_items[] = {
"computer",
FALSE,
0,
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT,
NULL
},
{
@@ -37,6 +38,7 @@ static WinTCShextViewItem s_desktop_items[] = {
"folder-documents",
FALSE,
0,
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT,
NULL
},
{
@@ -44,14 +46,16 @@ static WinTCShextViewItem s_desktop_items[] = {
"network-workgroup",
FALSE,
0,
- NULL
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT,
+ NULL,
},
{
"Recycle Bin",
"user-trash",
FALSE,
0,
- NULL
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT,
+ NULL,
}
};
diff --git a/shared/shell/src/vwdrives.c b/shared/shell/src/vwdrives.c
index 9c3bc2d..401073f 100644
--- a/shared/shell/src/vwdrives.c
+++ b/shared/shell/src/vwdrives.c
@@ -24,8 +24,22 @@ static GHashTable* s_drives_map = NULL;
// FIXME: Temporary - only item is the drive root atm
//
static WinTCShextViewItem s_temp_items[] = {
- { "/", "drive-harddisk", FALSE, 0, "file:///" },
- { "Control Panel", "preferences-other", FALSE, 0, NULL }
+ {
+ "/",
+ "drive-harddisk",
+ FALSE,
+ 0,
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT,
+ "file:///"
+ },
+ {
+ "Control Panel",
+ "preferences-other",
+ FALSE,
+ 0,
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT,
+ NULL
+ }
};
//
diff --git a/shared/shell/src/vwfs.c b/shared/shell/src/vwfs.c
index 9882c44..72b523f 100644
--- a/shared/shell/src/vwfs.c
+++ b/shared/shell/src/vwfs.c
@@ -1,5 +1,7 @@
#include
#include
+#include
+#include
#include
#include
#include
@@ -19,6 +21,21 @@ enum
PROP_ICON_NAME
};
+enum
+{
+ WINTC_SH_VIEW_FS_OP_NEW_FOLDER = 80,
+ WINTC_SH_VIEW_FS_OP_NEW_SHORTCUT = 100
+};
+
+//
+// PRIVATE STRUCTURES
+//
+typedef struct _WinTCShViewFSNewTemplate
+{
+ gchar* filename;
+ gchar* name;
+} WinTCShViewFSNewTemplate;
+
//
// FORWARD DECLARATIONS
//
@@ -88,6 +105,9 @@ static WinTCShextOperation* wintc_sh_view_fs_spawn_operation(
GError** error
);
+static void clear_new_template(
+ WinTCShViewFSNewTemplate* template
+);
static void clear_view_item(
WinTCShextViewItem* item
);
@@ -99,6 +119,16 @@ static gboolean real_activate_item(
GError** error
);
+static void wintc_sh_view_fs_update_new_templates(
+ WinTCShViewFS* view_fs
+);
+
+static gboolean shopr_new(
+ WinTCIShextView* view,
+ WinTCShextOperation* operation,
+ GtkWindow* wnd,
+ GError** error
+);
static gboolean shopr_open(
WinTCIShextView* view,
WinTCShextOperation* operation,
@@ -142,6 +172,9 @@ struct _WinTCShViewFS
WinTCShFSClipboard* fs_clipboard;
WinTCShextHost* shext_host;
+
+ GList* list_new_templates;
+ guint next_new_hash; // For flagging a view item we just made as new
};
//
@@ -235,6 +268,11 @@ static void wintc_sh_view_fs_dispose(
g_clear_object(&(view_fs->fs_monitor));
g_clear_object(&(view_fs->shext_host));
+ g_clear_list(
+ &(view_fs->list_new_templates),
+ (GDestroyNotify) clear_new_template
+ );
+
(G_OBJECT_CLASS(wintc_sh_view_fs_parent_class))->dispose(object);
}
@@ -452,9 +490,11 @@ static GMenuModel* wintc_sh_view_fs_get_operations_for_item(
}
static GMenuModel* wintc_sh_view_fs_get_operations_for_view(
- WINTC_UNUSED(WinTCIShextView* view)
+ WinTCIShextView* view
)
{
+ WinTCShViewFS* view_fs = WINTC_SH_VIEW_FS(view);
+
GtkBuilder* builder;
GMenuModel* menu;
@@ -472,6 +512,58 @@ static GMenuModel* wintc_sh_view_fs_get_operations_for_view(
)
);
+ // Populate New submenu
+ //
+ GMenu* section_new_templates =
+ G_MENU(
+ gtk_builder_get_object(
+ builder,
+ "section-new-templates"
+ )
+ );
+
+ gint view_op_id = WINTC_SHEXT_OP_NEW + 1;
+
+ wintc_sh_view_fs_update_new_templates(view_fs);
+
+ for (GList* iter = view_fs->list_new_templates; iter; iter = iter->next)
+ {
+ WinTCShViewFSNewTemplate* template =
+ (WinTCShViewFSNewTemplate*) iter->data;
+
+ // Cap off menu items
+ //
+ if (!WINTC_SHEXT_OP_IS_NEW_OP(view_op_id))
+ {
+ break;
+ }
+
+ // Create the menu item
+ //
+ GIcon* icon = g_themed_icon_new(template->filename);
+ GMenuItem* menu_item = g_menu_item_new(NULL, NULL);
+
+ g_menu_item_set_label(menu_item, template->name);
+ g_menu_item_set_icon(menu_item, icon);
+
+ g_menu_item_set_action_and_target(
+ menu_item,
+ "control.view-op",
+ "i",
+ view_op_id
+ );
+
+ g_menu_append_item(
+ section_new_templates,
+ menu_item
+ );
+
+ view_op_id++;
+
+ g_object_unref(icon);
+ g_object_unref(menu_item);
+ }
+
g_object_unref(builder);
return menu;
@@ -654,7 +746,7 @@ static WinTCShextOperation* wintc_sh_view_fs_spawn_operation(
{
case WINTC_SHEXT_KNOWN_OP_OPEN:
ret->func = shopr_open;
- ret->priv = targets;
+ ret->priv = g_steal_pointer(&targets);
break;
case WINTC_SHEXT_KNOWN_OP_PASTE:
@@ -662,11 +754,24 @@ static WinTCShextOperation* wintc_sh_view_fs_spawn_operation(
break;
default:
- g_free(ret);
- g_critical("%s", "shell: fs - invalid op");
- return NULL;
+ // Could be a NEW operation...
+ //
+ if (WINTC_SHEXT_OP_IS_NEW_OP(operation_id))
+ {
+ ret->func = shopr_new;
+ ret->priv = GINT_TO_POINTER(operation_id);
+ }
+ else
+ {
+ g_free(g_steal_pointer(&ret));
+ g_critical("%s", "shell: fs - invalid op");
+ }
+
+ break;
}
+ g_clear_list(&targets, NULL);
+
return ret;
}
@@ -689,8 +794,17 @@ WinTCIShextView* wintc_sh_view_fs_new(
}
//
-// CALLBACKS
+// PRIVATE FUNCTIONS
//
+static void clear_new_template(
+ WinTCShViewFSNewTemplate* template
+)
+{
+ g_free(template->filename);
+ g_free(template->name);
+ g_free(template);
+}
+
static void clear_view_item(
WinTCShextViewItem* item
)
@@ -767,6 +881,278 @@ static gboolean real_activate_item(
return success;
}
+static void wintc_sh_view_fs_update_new_templates(
+ WinTCShViewFS* view_fs
+)
+{
+ GList* templates =
+ wintc_sh_fs_get_names_as_list(
+ WINTC_ASSETS_DIR G_DIR_SEPARATOR_S "templates",
+ FALSE,
+ G_FILE_TEST_IS_REGULAR,
+ FALSE,
+ NULL
+ );
+
+ g_clear_list(
+ &(view_fs->list_new_templates),
+ (GDestroyNotify) clear_new_template
+ );
+
+ for (GList* iter = templates; iter; iter = iter->next)
+ {
+ const gchar* filename = (gchar*) iter->data;
+
+ // Pull out the MIME type parts from filename
+ //
+ const gchar* p_mime_base_end = strstr(filename, "-");
+
+ if (!p_mime_base_end)
+ {
+ g_warning(
+ "shell: fs - doesn't look like valid MIME: %s",
+ filename
+ );
+
+ continue;
+ }
+
+ // Build the file path...
+ //
+ gchar* mime_base = wintc_substr(filename, p_mime_base_end);
+ gchar* mime_spec = wintc_substr(p_mime_base_end + 1, NULL);
+ gchar* mime_specfn = g_strdup_printf("%s.xml", mime_spec);
+
+ gchar* mime_path =
+ g_build_path(
+ G_DIR_SEPARATOR_S,
+ G_DIR_SEPARATOR_S,
+ "usr",
+#ifdef WINTC_PKGMGR_BSDPKG
+ "local",
+#endif
+ "share",
+ "mime",
+ mime_base,
+ mime_specfn,
+ NULL
+ );
+
+ // Attempt to parse the MIME XML
+ //
+ xmlDocPtr xml_mime = xmlParseFile(mime_path);
+
+ g_free(mime_base);
+ g_free(mime_spec);
+ g_free(mime_specfn);
+ g_free(mime_path);
+
+ if (!xml_mime)
+ {
+ WINTC_LOG_DEBUG(
+ "shell: fs - could not get XML for %s",
+ filename
+ );
+
+ continue;
+ }
+
+ // Retrieve the name
+ //
+ xmlNodePtr xml_root = xmlDocGetRootElement(xml_mime);
+
+ for (xmlNodePtr node = xml_root->children; node; node = node->next)
+ {
+ // We're looking for
+ //
+ xmlChar* node_lang;
+
+ if (node->type != XML_ELEMENT_NODE)
+ {
+ continue;
+ }
+
+ if (g_strcmp0((gchar*) node->name, "comment") != 0)
+ {
+ continue;
+ }
+
+ if ((node_lang = xmlNodeGetLang(node)))
+ {
+ xmlFree(node_lang);
+ continue;
+ }
+
+ // Create the new template item
+ //
+ WinTCShViewFSNewTemplate* template =
+ g_new(WinTCShViewFSNewTemplate, 1);
+
+ xmlChar* mime_name = xmlNodeGetContent(node);
+
+ template->filename = g_strdup(filename);
+ template->name = g_strdup((gchar*) mime_name);
+
+ xmlFree(mime_name);
+
+ view_fs->list_new_templates =
+ g_list_prepend(
+ view_fs->list_new_templates,
+ template
+ );
+
+ break;
+ }
+
+ xmlFreeDoc(xml_mime);
+ }
+
+ if (view_fs->list_new_templates)
+ {
+ view_fs->list_new_templates =
+ g_list_reverse(view_fs->list_new_templates);
+ }
+
+ g_list_free_full(
+ templates,
+ (GDestroyNotify) g_free
+ );
+}
+
+//
+// CALLBACKS
+//
+static gboolean shopr_new(
+ WinTCIShextView* view,
+ WinTCShextOperation* operation,
+ WINTC_UNUSED(GtkWindow* wnd),
+ GError** error
+)
+{
+ //
+ // FIXME: Localisation needed in the names this func uses
+ //
+
+ WinTCShViewFS* view_fs = WINTC_SH_VIEW_FS(view);
+
+ // Folder creation is ID 80, above that and we're dealing with a MIME
+ // template
+ //
+ gint op = GPOINTER_TO_INT(operation->priv);
+ gboolean is_folder = op == WINTC_SH_VIEW_FS_OP_NEW_FOLDER;
+
+ GFile* file;
+ guint hash;
+ gchar* path;
+ GError* local_error = NULL;
+ gchar* name;
+ const gchar* name_type;
+ gboolean success;
+ WinTCShViewFSNewTemplate* template;
+
+ if (is_folder)
+ {
+ name_type = "Folder";
+ }
+ else
+ {
+ template =
+ (WinTCShViewFSNewTemplate*)
+ g_list_nth_data(
+ view_fs->list_new_templates,
+ op - WINTC_SH_VIEW_FS_OP_NEW_FOLDER - 1
+ );
+
+ name_type = template->name;
+ }
+
+ for (gint attempt = 0; attempt < 100; attempt++)
+ {
+ if (attempt)
+ {
+ name =
+ g_strdup_printf(
+ "New %s (%d)",
+ name_type,
+ attempt
+ );
+ }
+ else
+ {
+ name =
+ g_strdup_printf(
+ "New %s",
+ name_type
+ );
+ }
+
+ path = g_build_path(G_DIR_SEPARATOR_S, view_fs->path, name, NULL);
+ hash = g_str_hash(path);
+ file = g_file_new_for_path(path);
+
+ if (is_folder)
+ {
+ success =
+ g_file_make_directory(
+ file,
+ NULL,
+ &local_error
+ );
+ }
+ else
+ {
+ gchar* template_path = g_build_path(
+ G_DIR_SEPARATOR_S,
+ WINTC_ASSETS_DIR,
+ "templates",
+ template->filename,
+ NULL
+ );
+ GFile* template_file = g_file_new_for_path(template_path);
+
+ success =
+ g_file_copy (
+ template_file,
+ file,
+ G_FILE_COPY_NONE,
+ NULL,
+ NULL,
+ NULL,
+ &local_error
+ );
+
+ g_free(template_path);
+ g_object_unref(template_file);
+ }
+
+ g_free(path);
+ g_free(name);
+ g_object_unref(file);
+
+ if (success)
+ {
+ view_fs->next_new_hash = hash;
+ return TRUE;
+ }
+ else
+ {
+ if (local_error->code == G_IO_ERROR_EXISTS)
+ {
+ g_clear_error(&local_error);
+ continue;
+ }
+ else
+ {
+ g_propagate_error(error, local_error);
+ return FALSE;
+ }
+ }
+ }
+
+ // FIXME: Set error here
+ return FALSE;
+}
+
static gboolean shopr_open(
WinTCIShextView* view,
WinTCShextOperation* operation,
@@ -878,6 +1264,14 @@ static void on_file_monitor_changed(
item->is_leaf = !is_dir;
item->hash = g_str_hash(file_path);
+ // Did we just make this item?
+ //
+ if (item->hash == view_fs->next_new_hash)
+ {
+ item->hint = WINTC_SHEXT_VIEW_ITEM_IS_NEW;
+ view_fs->next_new_hash = 0;
+ }
+
g_hash_table_insert(
view_fs->fs_map_entries,
GUINT_TO_POINTER(item->hash),
diff --git a/shared/shellext/public/viewitem.h b/shared/shellext/public/viewitem.h
index 952b7b8..b9cdc44 100644
--- a/shared/shellext/public/viewitem.h
+++ b/shared/shellext/public/viewitem.h
@@ -5,16 +5,26 @@
#include
+//
+// PUBLIC ENUMS
+//
+typedef enum
+{
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT = 0,
+ WINTC_SHEXT_VIEW_ITEM_IS_NEW
+} WinTCShextViewItemHint;
+
//
// PUBLIC STRUCTURES
//
typedef struct _WinTCShextViewItem
{
- gchar* display_name;
- gchar* icon_name;
- gboolean is_leaf;
- guint hash;
- gpointer priv;
+ gchar* display_name;
+ gchar* icon_name;
+ gboolean is_leaf;
+ guint hash;
+ WinTCShextViewItemHint hint;
+ gpointer priv;
} WinTCShextViewItem;
typedef struct _WinTCShextViewItemsUpdate
diff --git a/shared/shellext/public/viewops.h b/shared/shellext/public/viewops.h
index 4a04cc0..6d36922 100644
--- a/shared/shellext/public/viewops.h
+++ b/shared/shellext/public/viewops.h
@@ -40,9 +40,14 @@ typedef enum
WINTC_SHEXT_KNOWN_OP_COPY_TO,
WINTC_SHEXT_KNOWN_OP_PROPERTIES,
+ WINTC_SHEXT_OP_NEW = 80, // 80-99 for 'New...' menu items, max 20 items
+
WINTC_SHEXT_OP_CUSTOM = 100
} WinTCShextOperationId;
+#define WINTC_SHEXT_OP_IS_NEW_OP(op) \
+ (op >= WINTC_SHEXT_OP_NEW && op < WINTC_SHEXT_OP_CUSTOM)
+
//
// PUBLIC STRUCTURES
//
diff --git a/shared/shellext/src/if_view.c b/shared/shellext/src/if_view.c
index 04ed4b3..a44bac7 100644
--- a/shared/shellext/src/if_view.c
+++ b/shared/shellext/src/if_view.c
@@ -272,8 +272,6 @@ void wintc_shext_path_info_demangle_uri(
// handle a path incoming from WinTC
//
- wintc_shext_path_info_free_data(path_info);
-
//
// STEP 1: Check if this is a GUID path
//
diff --git a/shell/cpl/printers/src/vwprntrs.c b/shell/cpl/printers/src/vwprntrs.c
index 185d3c2..319542d 100644
--- a/shell/cpl/printers/src/vwprntrs.c
+++ b/shell/cpl/printers/src/vwprntrs.c
@@ -25,7 +25,14 @@ static GHashTable* s_printers_map = NULL;
// FIXME: Temporary, until we display printers
//
static WinTCShextViewItem s_temp_items[] = {
- { "FPO", "printer", TRUE, 0, NULL }
+ {
+ "FPO",
+ "printer",
+ TRUE,
+ 0,
+ WINTC_SHEXT_VIEW_ITEM_DEFAULT,
+ NULL
+ }
};
//
diff --git a/shell/doctmpls/CMakeLists.txt b/shell/doctmpls/CMakeLists.txt
new file mode 100644
index 0000000..57b3e21
--- /dev/null
+++ b/shell/doctmpls/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.12)
+
+project(
+ wintc-document-templates
+ VERSION 1.0
+ DESCRIPTION "Windows Total Conversion document templates."
+ LANGUAGES C
+)
+
+set(PROJECT_ANYARCH true)
+set(PROJECT_FREESTATUS true)
+set(PROJECT_MAINTAINER "Rory Fewell ")
+
+set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
+
+include(GNUInstallDirs)
+
+include(../../packaging/cmake-inc/common/CMakeLists.txt)
+include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
+
+# Installation
+#
+wintc_configure_and_install_packaging()
+
+install(
+ DIRECTORY ${PROJECT_ROOT}/res/
+ DESTINATION ${WINTC_ASSETS_INSTALL_DIR}/templates
+)
diff --git a/shell/doctmpls/res/application-msword b/shell/doctmpls/res/application-msword
new file mode 100644
index 0000000..e69de29
diff --git a/shell/doctmpls/res/application-zip b/shell/doctmpls/res/application-zip
new file mode 100644
index 0000000..15cb0ec
Binary files /dev/null and b/shell/doctmpls/res/application-zip differ
diff --git a/shell/doctmpls/res/audio-vnd.wave b/shell/doctmpls/res/audio-vnd.wave
new file mode 100644
index 0000000..a6a9cc8
Binary files /dev/null and b/shell/doctmpls/res/audio-vnd.wave differ
diff --git a/shell/doctmpls/res/image-bmp b/shell/doctmpls/res/image-bmp
new file mode 100644
index 0000000..e69de29
diff --git a/shell/doctmpls/res/text-plain b/shell/doctmpls/res/text-plain
new file mode 100644
index 0000000..e69de29
diff --git a/shell/doctmpls/res/text-richtext b/shell/doctmpls/res/text-richtext
new file mode 100644
index 0000000..aa6f57c
Binary files /dev/null and b/shell/doctmpls/res/text-richtext differ
diff --git a/shell/explorer/CMakeLists.txt b/shell/explorer/CMakeLists.txt
index 1e2b747..db5cd7b 100644
--- a/shell/explorer/CMakeLists.txt
+++ b/shell/explorer/CMakeLists.txt
@@ -24,6 +24,7 @@ wintc_resolve_library(libcanberra CANBERRA)
wintc_resolve_library(libcanberra-gtk3 CANBERRA_GTK3)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
+wintc_resolve_library(webkit2gtk-4.1 WEBKITGTK)
wintc_resolve_library(wintc-comctl WINTC_COMCTL)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_resolve_library(wintc-shcommon WINTC_SHCOMMON)
@@ -31,20 +32,6 @@ wintc_resolve_library(wintc-shell WINTC_SHELL)
wintc_resolve_library(wintc-shellext WINTC_SHELLEXT)
wintc_resolve_library(wintc-shlang WINTC_SHLANG)
-# FreeBSD currently does not have webkit2gtk-4.1 -- not a huge problem here
-# because the only different between 4.0 and 4.1 is apparently usage of
-# libsoap2 vs. libsoap3, which we don't really care about
-#
-# FIXME: Review this again sometime in future, I think there is ongoing
-# with the webkit2gtk port on FreeBSD so this will probably get sorted
-# out eventually
-#
-if (${WINTC_PKGMGR} STREQUAL "bsdpkg")
- wintc_resolve_library(webkit2gtk-4.0 WEBKITGTK)
-else()
- wintc_resolve_library(webkit2gtk-4.1 WEBKITGTK)
-endif()
-
wintc_compile_resources()
add_executable(
diff --git a/shell/explorer/src/window.c b/shell/explorer/src/window.c
index 2005a01..9703b15 100644
--- a/shell/explorer/src/window.c
+++ b/shell/explorer/src/window.c
@@ -543,7 +543,7 @@ static void wintc_explorer_window_set_property(
// FIXME: We don't handle extended paths yet!
//
- WinTCShextPathInfo path_info;
+ WinTCShextPathInfo path_info = { 0 };
wintc_shext_path_info_demangle_uri(
&path_info,
diff --git a/shell/taskband/src/start/personal.c b/shell/taskband/src/start/personal.c
index 2698471..2949b17 100644
--- a/shell/taskband/src/start/personal.c
+++ b/shell/taskband/src/start/personal.c
@@ -842,8 +842,8 @@ static void refresh_personal_menu(
)
);
- g_object_unref(entry_internet);
- g_object_unref(entry_email);
+ g_clear_object(&entry_internet);
+ g_clear_object(&entry_email);
// Add separator between defaults & MFU
//
diff --git a/tools/bldutils/depmap/apk-maps b/tools/bldutils/depmap/apk-maps
index ee6c428..a7caba0 100644
--- a/tools/bldutils/depmap/apk-maps
+++ b/tools/bldutils/depmap/apk-maps
@@ -46,5 +46,7 @@ wintc-syscfg-->bt,rt-->libwintc-syscfg
wintc-winbrand-->bt,rt-->libwintc-winbrand
xcursorgen-->bt,rt-->xcursorgen
xdg-mime-->bt,rt-->xdg-utils
+xml2-->bt-->libxml2-dev
+xml2-->rt-->libxml2
zip-->bt-->libzip-dev
zip-->rt-->libzip
diff --git a/tools/bldutils/depmap/archpkg-maps b/tools/bldutils/depmap/archpkg-maps
index 0e09613..01ea6c8 100644
--- a/tools/bldutils/depmap/archpkg-maps
+++ b/tools/bldutils/depmap/archpkg-maps
@@ -34,4 +34,5 @@ wintc-syscfg-->bt,rt-->wintc-syscfg
wintc-winbrand-->bt,rt-->wintc-winbrand
xcursorgen-->bt,rt-->xorg-xcursorgen
xdg-mime-->bt,rt-->xdg-utils
+xml2-->bt,rt-->libxml2
zip-->bt,rt-->libzip
diff --git a/tools/bldutils/depmap/bsdpkg-maps b/tools/bldutils/depmap/bsdpkg-maps
index 059e695..9a49d9f 100644
--- a/tools/bldutils/depmap/bsdpkg-maps
+++ b/tools/bldutils/depmap/bsdpkg-maps
@@ -11,13 +11,13 @@ msgfmt-->bt,rt-->gettext
networkmanager-->bt,rt-->NULL
plymouth-->bt,rt-->splash
pulseaudio-->bt,rt-->pulseaudio
-python3-packaging-->bt,rt-->py39-packaging
-python3-venv-->bt,rt-->py39-virtualenv
+python3-packaging-->bt,rt-->py311-packaging
+python3-venv-->bt,rt-->py311-virtualenv
sass-->bt,rt-->rubygem-sass
sqlite3-->bt,rt-->sqlite3
sysinfo-->bt,rt-->libsysinfo
upower-glib-->bt,rt-->upower
-webkitgtk-->bt,rt-->webkit2-gtk3
+webkitgtk-->bt,rt-->webkit2-gtk_41
wintc-comctl-->bt,rt-->wintc-comctl
wintc-comgtk-->bt,rt-->wintc-comgtk
wintc-exec-->bt,rt-->wintc-exec
@@ -33,4 +33,5 @@ wintc-syscfg-->bt,rt-->wintc-syscfg
wintc-winbrand-->bt,rt-->wintc-winbrand
xcursorgen-->bt,rt-->xcursorgen
xdg-mime-->bt,rt-->xdg-utils
+xml2-->bt,rt-->libxml2
zip-->bt,rt-->libzip
diff --git a/tools/bldutils/depmap/deb-maps b/tools/bldutils/depmap/deb-maps
index f5eed5a..e6576f3 100644
--- a/tools/bldutils/depmap/deb-maps
+++ b/tools/bldutils/depmap/deb-maps
@@ -47,5 +47,7 @@ wintc-syscfg-->bt,rt-->libwintc-syscfg
wintc-winbrand-->bt,rt-->libwintc-winbrand
xcursorgen-->bt,rt-->x11-apps
xdg-mime-->bt,rt-->xdg-utils
+xml2-->bt-->libxml2-dev
+xml2-->rt-->libxml2
zip-->bt-->libzip-dev
zip-->rt-->libzip4|libzip5
diff --git a/tools/bldutils/depmap/rpm-maps b/tools/bldutils/depmap/rpm-maps
index cd0c078..365d38d 100644
--- a/tools/bldutils/depmap/rpm-maps
+++ b/tools/bldutils/depmap/rpm-maps
@@ -46,5 +46,7 @@ wintc-syscfg-->bt,rt-->wintc-syscfg
wintc-winbrand-->bt,rt-->wintc-winbrand
xcursorgen-->bt,rt-->xcursorgen
xdg-mime-->bt,rt-->xdg-utils
+xml2-->bt-->libxml2-devel
+xml2-->rt-->libxml2
zip-->bt-->libzip-devel
zip-->rt-->libzip
diff --git a/tools/bldutils/depmap/xbps-maps b/tools/bldutils/depmap/xbps-maps
index a5acc43..68bbc1e 100644
--- a/tools/bldutils/depmap/xbps-maps
+++ b/tools/bldutils/depmap/xbps-maps
@@ -46,5 +46,7 @@ wintc-syscfg-->bt,rt-->wintc-syscfg
wintc-winbrand-->bt,rt-->wintc-winbrand
xcursorgen-->bt,rt-->xcursorgen
xdg-mime-->bt,rt-->xdg-utils
+xml2-->bt-->libxml2-devel
+xml2-->rt-->libxml2
zip-->bt-->libzip-devel
zip-->rt-->libzip