Commit 8229a222 authored by Alexander Schwinn's avatar Alexander Schwinn

Yay, it works !!!

parent f588259b
......@@ -272,15 +272,15 @@ thunar_application_class_init (ThunarApplicationClass *klass)
}
static void
thunar_application_cb (ThunarApplication *application)
{
printf("thunar_application_cb\n");
}
static GActionEntry app_entries[] = {
{ "test", thunar_application_cb, NULL, NULL, NULL },
};
//static void
//thunar_application_cb (ThunarApplication *application)
//{
// printf("thunar_application_cb\n");
//}
//
//static GActionEntry app_entries[] = {
// { "test", thunar_application_cb, NULL, NULL, NULL },
//};
static void
......@@ -293,18 +293,6 @@ thunar_application_init (ThunarApplication *application)
application->progress_dialog = NULL;
application->preferences = NULL;
g_action_map_add_action_entries (G_ACTION_MAP (application),
app_entries, G_N_ELEMENTS (app_entries),
application);
//GtkWidget* window = gtk_widget_get_toplevel (launcher->widget);
//application->action = g_simple_action_new ("Test123", NULL);
//g_signal_connect (application->action, "activate", thunar_application_cb, NULL);
//g_action_map_add_action (application, application->action);
const char *accels[] = {"<Contol>d", NULL};
gtk_application_set_accels_for_action (application, "test", accels);
g_application_set_flags (G_APPLICATION (application), G_APPLICATION_HANDLES_COMMAND_LINE);
g_application_add_main_option_entries (G_APPLICATION (application), option_entries);
......@@ -367,6 +355,17 @@ thunar_application_dbus_init (ThunarApplication *application)
void callback ( GSimpleAction *action, GVariant *parameter, gpointer user_data )
{
g_print ( "<Ctrl>C pressed\n" );
}
static GActionEntry actions[] = {
{ "test", callback, NULL, NULL, NULL },
};
static void
thunar_application_startup (GApplication *gapp)
{
......@@ -397,6 +396,11 @@ thunar_application_startup (GApplication *gapp)
/* connect to the session manager */
application->session_client = thunar_session_client_new (opt_sm_client_id);
g_action_map_add_action_entries(G_ACTION_MAP(application), actions, G_N_ELEMENTS(actions), NULL);
const char *accels[] = {"<Ctrl>k", NULL};
gtk_application_set_accels_for_action (application, "app.test", accels);
/* check if we have a saved accel map */
path = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, ACCEL_MAP_PATH);
if (G_LIKELY (path != NULL))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment