{
GObject parent_instance;
- MidoriBrowser* browser;
-
- gchar* name;
MidoriWebSettings* settings;
KatzeArray* bookmarks;
KatzeArray* trash;
KatzeArray* extensions;
KatzeArray* browsers;
+ MidoriBrowser* browser;
MidoriAppInstance instance;
#if !HAVE_HILDON || !HAVE_LIBNOTIFY
#endif
};
+static gchar* app_name = NULL;
+
struct _MidoriAppClass
{
GObjectClass parent_class;
GIOChannel* channel;
#endif
- if (!app->name)
+ if (!(display = gdk_display_get_default ()))
+ return MidoriAppInstanceNull;
+
{
#if HAVE_UNIQUE
const gchar* config = sokoke_set_config_dir (NULL);
gchar* name_hash;
name_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, config, -1);
- app->name = g_strconcat ("midori", "_", name_hash, NULL);
+ katze_assign (app_name, g_strconcat ("midori", "_", name_hash, NULL));
g_free (name_hash);
g_object_notify (G_OBJECT (app), "name");
#else
- app->name = g_strdup (PACKAGE_NAME);
+ katze_assign (app_name, g_strdup (PACKAGE_NAME));
#endif
}
- if (!(display = gdk_display_get_default ()))
- return MidoriAppInstanceNull;
-
display_name = g_strdup (gdk_display_get_name (display));
n = strlen (display_name);
for (i = 0; i < n; i++)
if (strchr (":.\\/", display_name[i]))
display_name[i] = '_';
- instance_name = g_strdup_printf ("de.twotoasts.%s_%s", app->name, display_name);
+ instance_name = g_strdup_printf ("de.twotoasts.%s_%s", app_name, display_name);
+ g_free (display_name);
+ katze_assign (app_name, instance_name);
#if HAVE_UNIQUE
instance = unique_app_new (instance_name, NULL);
(GIOFunc)midori_app_io_channel_watch_cb, app);
}
#endif
-
- g_free (instance_name);
- g_free (display_name);
-
#endif
return instance;
}
+const gchar*
+midori_app_get_name (MidoriApp* app)
+{
+ return app_name;
+}
+
static void
midori_app_init (MidoriApp* app)
{
{
MidoriApp* app = MIDORI_APP (object);
- katze_assign (app->name, NULL);
+ katze_assign (app_name, NULL);
katze_object_assign (app->settings, NULL);
katze_object_assign (app->bookmarks, NULL);
katze_object_assign (app->trash, NULL);
switch (prop_id)
{
case PROP_NAME:
- katze_assign (app->name, g_value_dup_string (value));
+ katze_assign (app_name, g_value_dup_string (value));
break;
case PROP_SETTINGS:
katze_object_assign (app->settings, g_value_dup_object (value));
switch (prop_id)
{
case PROP_NAME:
- g_value_set_string (value, app->name);
+ g_value_set_string (value, app_name);
break;
case PROP_SETTINGS:
g_value_set_object (value, app->settings);
#include "midori-view.h"
#include "midori-browser.h"
#include "midori-searchaction.h"
+#include "midori-app.h"
#include "midori-platform.h"
#include "midori-core.h"
#include "midori-findbar.h"
"style=\"position: absolute; right: 15px; bottom: 15px; z-index: -9;\">"
"<table>"
"<tr><td>Command line</td><td>%s</td></tr>"
- "<tr><td>Midori</td><td>%s</td></tr>"
+ "<tr><td>Midori</td><td>%s (%s)</td></tr>"
"<tr><td>WebKitGTK+</td><td>%d.%d.%d (%d.%d.%d)</td></tr>"
"<tr><td>GTK+</td><td>%d.%d.%d (%d.%d.%d)</td></tr>"
"<tr><td>Glib</td><td>%d.%d.%d (%d.%d.%d)</td></tr>"
"</body></html>",
_("Version numbers in brackets show the version used at runtime."),
command_line,
- PACKAGE_VERSION,
+ PACKAGE_VERSION, midori_app_get_name (NULL),
WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION,
webkit_major_version (),
webkit_minor_version (),