Compare commits

..

No commits in common. "73868c81b04ee2ecef07009b065cdcc16953029d" and "128a205b2917391552d21a2f57988adf68e3e07c" have entirely different histories.

3 changed files with 7 additions and 9 deletions

View File

@ -78,6 +78,7 @@
<property name="width_request">720</property>
<property name="height_request">405</property>
<property name="can_focus">False</property>
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
<child>
<object class="GtkPaned" id="mainPane">
<property name="visible">True</property>

View File

@ -7,15 +7,12 @@
static void quit_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
{
struct mainWindow *mainWindow = *((struct mainWindow **) user_data);
g_print("TODO\n");
gtk_window_close(GTK_WINDOW(mainWindow->mainWindow));
}
static void settings_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
{
struct mainWindow *mainWindow = *((struct mainWindow **) user_data);
g_print("nTODO\n");
}
@ -26,7 +23,7 @@ const GActionEntry app_actions[] = {
static void activate(GApplication *app, gpointer user_data)
{
struct mainWindow *mainWindow = *((struct mainWindow **) user_data);
struct mainWindow *mainWindow;
struct mdiary_settings *settings;
gchar *settings_path;
@ -46,7 +43,6 @@ static void activate(GApplication *app, gpointer user_data)
int main(int argc, char *argv[])
{
struct mainWindow *mainWindow;
GtkApplication *app;
GMenu *app_menu;
GMenu *p1;
@ -54,8 +50,8 @@ int main(int argc, char *argv[])
int status;
app = gtk_application_new("net.notsyncing.mdiary", G_APPLICATION_FLAGS_NONE);
g_application_register(G_APPLICATION(app), NULL, NULL);
g_signal_connect(app, "activate", G_CALLBACK(activate), &mainWindow);
g_application_register(GTK_APPLICATION(app), NULL, NULL);
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
app_menu = g_menu_new();
p1 = g_menu_new();
@ -65,7 +61,7 @@ int main(int argc, char *argv[])
g_menu_append_section(app_menu, NULL, G_MENU_MODEL(p1));
g_menu_append_section(app_menu, NULL, G_MENU_MODEL(p2));
gtk_application_set_app_menu(app, G_MENU_MODEL(app_menu));
g_action_map_add_action_entries(G_ACTION_MAP(app), app_actions, G_N_ELEMENTS(app_actions), &mainWindow);
g_action_map_add_action_entries(G_ACTION_MAP(app), app_actions, G_N_ELEMENTS(app_actions), app);
gtk_application_set_app_menu(GTK_APPLICATION(app), G_MENU_MODEL(app_menu));
g_object_unref(p1);
g_object_unref(p2);

View File

@ -670,6 +670,7 @@ void mainWindow_entrySelected(GtkWidget *widget, gpointer user_data)
g_free(summary);
g_free(temp);
} else {
//gtk_text_buffer_set_text(mainWindow->textBuffer, "", 0);
mainWindow_set_text(mainWindow, "");
gtk_label_set_text(GTK_LABEL(mainWindow->labelSummary), "Please select an entry in the list above.");
}