[virt-tools-list] [virt-viewer v2] util: Fix resource path
Fabiano Fidêncio
fidencio at redhat.com
Tue Jun 21 20:28:39 UTC 2016
Since commit 1f6f1a48 the resource path for icons has been broken.
The reason is that when moving the .ui files to $(srcdir)/resources/ui
the define used for the resources was changed to reflect the new
directory. However, this change wasn't needed by the icons and ended
up with virt-viewer not displaying a few icons.
Let's fix it by setting back the define to the previous one and then
tweak the virt_viewer_util_load_ui() to add "ui" to the resource path,
for loading the ui files.
---
src/virt-viewer-util.c | 3 ++-
src/virt-viewer-util.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/virt-viewer-util.c b/src/virt-viewer-util.c
index 9e52b87..7c95583 100644
--- a/src/virt-viewer-util.c
+++ b/src/virt-viewer-util.c
@@ -50,8 +50,9 @@ virt_viewer_error_quark(void)
GtkBuilder *virt_viewer_util_load_ui(const char *name)
{
GtkBuilder *builder;
- gchar *resource = g_strdup_printf("%s/%s",
+ gchar *resource = g_strdup_printf("%s/%s/%s",
VIRT_VIEWER_RESOURCE_PREFIX,
+ "ui",
name);
builder = gtk_builder_new_from_resource(resource);
diff --git a/src/virt-viewer-util.h b/src/virt-viewer-util.h
index 14a477a..5515f66 100644
--- a/src/virt-viewer-util.h
+++ b/src/virt-viewer-util.h
@@ -34,7 +34,7 @@ enum {
};
#define VIRT_VIEWER_ERROR virt_viewer_error_quark ()
-#define VIRT_VIEWER_RESOURCE_PREFIX "/org/virt-manager/virt-viewer/ui"
+#define VIRT_VIEWER_RESOURCE_PREFIX "/org/virt-manager/virt-viewer"
GQuark virt_viewer_error_quark(void);
--
2.7.4
More information about the virt-tools-list
mailing list