summary refs log tree commit diff stats
path: root/plugins/fishlim/keystore.c
AgeCommit message (Expand)Author
2012-10-24A lot more rebrandingBerke Viktor
2012-07-26Make FiSHLiM consistent with recent naming changesBerke Viktor
2012-07-18Prepare FiSHLiM to use the plugin config APIBerke Viktor
2012-05-04sync with fishlim headBerke Viktor
2012-01-03sync with fishlim headBerke Viktor
2011-11-25get in sync with fishlim upstreamBerke Viktor
2011-11-24fix fishlim config handlerBerke Viktor
2011-11-24add fishlim pluginBerke Viktor
' href='#n66'>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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
/* GTK+ Preference Tool
 * Copyright (C) 2003-2005 Alex Shaduri.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#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)
{

}