From 4d0c364880fecb64ac6a3597fd426d42ef257701 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Fri, 30 Nov 2018 16:54:05 +0100 Subject: update to 48b, new fabric-loader definition --- src/main/java/net/fabricmc/example/mixin/ExampleMixin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/net/fabricmc/example/mixin/ExampleMixin.java b/src/main/java/net/fabricmc/example/mixin/ExampleMixin.java index 60b731f..0fc8f68 100644 --- a/src/main/java/net/fabricmc/example/mixin/ExampleMixin.java +++ b/src/main/java/net/fabricmc/example/mixin/ExampleMixin.java @@ -1,12 +1,12 @@ package net.fabricmc.example.mixin; -import net.minecraft.client.MinecraftGame; +import net.minecraft.client.MinecraftClient; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -@Mixin(MinecraftGame.class) +@Mixin(MinecraftClient.class) public class ExampleMixin { @Inject(at = @At("HEAD"), method = "init()V") private void init(CallbackInfo info) { -- cgit 1.4.1 /fork-branding'>feature/fork-branding Unnamed repository; edit this file 'description' to name the repository.blog
summary refs log tree commit diff stats
path: root/src/gtk2-prefs/callbacks.cpp
blob: 9cc5c92884cf09fbb8f390e34f1d8a5ad720a6d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gtk/gtk.h>
#include <iostream>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

#include "main.h"



extern GtkWidget* g_main_window;

void
on_main_showpreviewtoggle_toggled               (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{
	if (gtk_toggle_button_get_active (togglebutton)) {
		gtk_widget_show(lookup_widget(g_main_window, "main_previewhbox"));
		gtk_button_set_label(GTK_BUTTON(togglebutton), "Hide preview <<");
		gtk_window_resize(GTK_WINDOW(g_main_window), 700, 330);
	} else {
		gtk_widget_hide(lookup_widget(g_main_window, "main_previewhbox"));
		gtk_button_set_label(GTK_BUTTON(togglebutton), "Show preview >>");
		gtk_window_resize(GTK_WINDOW(g_main_window), 300, 330);
	}

}


/*
extern GtkWidget* g_fontsel_dialog;


void
on_fontsel_dialog_response             (GtkDialog       *dialog,
                                        gint             id,
                                        gpointer         user_data)
{

	switch(id) {
		case GTK_RESPONSE_OK:
		{
			const char* font = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(dialog));
			std::string f = (font ? font : "");
			set_theme(get_selected_theme(), f);
			break;
		}
//		case GTK_RESPONSE_CANCEL:
//			gtk_widget_destroy(g_fontsel_dialog);
//			g_fontsel_dialog = 0;
//			return;

	}
	gtk_widget_destroy(g_fontsel_dialog);
	g_fontsel_dialog = 0;

}


gboolean
on_fontsel_dialog_delete_event         (GtkWidget       *widget,
                                        GdkEvent        *event,
                                        gpointer         user_data)
{
	gtk_widget_destroy(g_fontsel_dialog);
	g_fontsel_dialog = 0;

	return FALSE;
}


void
on_main_fontselectbutton_clicked       (GtkButton       *button,
                                        gpointer         user_data)
{
	g_fontsel_dialog = create_fontsel_dialog();
	gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(g_fontsel_dialog), get_current_font().c_str());
	gtk_widget_show(g_fontsel_dialog);
}
*/





void
on_main_ok_button_clicked              (GtkButton       *button,
                                        gpointer         user_data)
{
	if (save_current_theme())
		gtk_main_quit();
}


void
on_main_cancel_button_clicked          (GtkButton       *button,
                                        gpointer         user_data)
{
	gtk_main_quit();
}


void
on_main_reset_button_clicked           (GtkButton       *button,
                                        gpointer         user_data)
{
	set_theme(get_orig_theme(), get_orig_font());
}


gboolean
on_main_window_delete_event            (GtkWidget       *widget,
                                        GdkEvent        *event,
                                        gpointer         user_data)
{
	program_shutdown();
	return true;
}


void
on_main_use_default_font_radio_toggled (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{
	bool default_font = gtk_toggle_button_get_active(togglebutton);

	gtk_widget_set_sensitive(lookup_widget(g_main_window, "main_font_selector_button"), !default_font);

	apply_theme(get_selected_theme(), get_selected_font());
}


void
on_main_font_selector_button_font_set  (GtkFontButton   *fontbutton,
                                        gpointer         user_data)
{
	apply_theme(get_selected_theme(), get_selected_font());
}


void
on_new2_activate                       (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_open2_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_save2_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_save_as2_activate                   (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_quit2_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_cut2_activate                       (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_copy2_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_paste2_activate                     (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_delete2_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}


void
on_about2_activate                     (GtkMenuItem     *menuitem,
                                        gpointer         user_data)
{

}