From 4b99085adb5db49448edb5b1de17471d7debff19 Mon Sep 17 00:00:00 2001 From: mattn Date: Sun, 16 Mar 2008 16:35:07 +0000 Subject: [PATCH] * readded copyright notice to picomodel plugin * moved plugin bitmaps into install/modules/bitmaps git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/ZeroRadiant@214 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- .../modules}/bitmaps/bkgrnd2d_conf.bmp | Bin .../modules}/bitmaps/bkgrnd2d_xy_toggle.bmp | Bin .../modules}/bitmaps/bkgrnd2d_xz_toggle.bmp | Bin .../modules}/bitmaps/bkgrnd2d_yz_toggle.bmp | Bin .../modules}/bitmaps/bobtoolz_caulk.bmp | Bin .../modules}/bitmaps/bobtoolz_cleanup.bmp | Bin .../modules}/bitmaps/bobtoolz_dropent.bmp | Bin .../modules}/bitmaps/bobtoolz_merge.bmp | Bin .../modules}/bitmaps/bobtoolz_poly.bmp | Bin .../modules}/bitmaps/bobtoolz_split.bmp | Bin .../bitmaps/bobtoolz_trainpathplot.bmp | Bin .../modules}/bitmaps/bobtoolz_treeplanter.bmp | Bin .../modules}/bitmaps/bobtoolz_turnedge.bmp | Bin .../modules}/bitmaps/camera_insp.bmp | Bin .../modules}/bitmaps/model_reload_entity.bmp | Bin .../modules}/bitmaps/picomodel.bmp | Bin .../modules}/bitmaps/sample.bmp | Bin .../modules}/bitmaps/ufoai_actorclip.bmp | Bin .../modules}/bitmaps/ufoai_level1.bmp | Bin .../modules}/bitmaps/ufoai_level2.bmp | Bin .../modules}/bitmaps/ufoai_level3.bmp | Bin .../modules}/bitmaps/ufoai_level4.bmp | Bin .../modules}/bitmaps/ufoai_level5.bmp | Bin .../modules}/bitmaps/ufoai_level6.bmp | Bin .../modules}/bitmaps/ufoai_level7.bmp | Bin .../modules}/bitmaps/ufoai_level8.bmp | Bin .../modules}/bitmaps/ufoai_nodraw.bmp | Bin .../modules}/bitmaps/ufoai_stepon.bmp | Bin .../modules}/bitmaps/ufoai_weaponclip.bmp | Bin plugins/model/plugin.cpp | 143 +----------------- 30 files changed, 4 insertions(+), 139 deletions(-) rename {contrib/bkgrnd2d => install/modules}/bitmaps/bkgrnd2d_conf.bmp (100%) rename {contrib/bkgrnd2d => install/modules}/bitmaps/bkgrnd2d_xy_toggle.bmp (100%) rename {contrib/bkgrnd2d => install/modules}/bitmaps/bkgrnd2d_xz_toggle.bmp (100%) rename {contrib/bkgrnd2d => install/modules}/bitmaps/bkgrnd2d_yz_toggle.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_caulk.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_cleanup.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_dropent.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_merge.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_poly.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_split.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_trainpathplot.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_treeplanter.bmp (100%) rename {contrib/bobtoolz => install/modules}/bitmaps/bobtoolz_turnedge.bmp (100%) rename {contrib/camera => install/modules}/bitmaps/camera_insp.bmp (100%) rename {plugins/model => install/modules}/bitmaps/model_reload_entity.bmp (100%) rename {plugins/model => install/modules}/bitmaps/picomodel.bmp (100%) rename {plugins/sample => install/modules}/bitmaps/sample.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_actorclip.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level1.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level2.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level3.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level4.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level5.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level6.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level7.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_level8.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_nodraw.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_stepon.bmp (100%) rename {contrib/ufoai => install/modules}/bitmaps/ufoai_weaponclip.bmp (100%) diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.bmp b/install/modules/bitmaps/bkgrnd2d_conf.bmp similarity index 100% rename from contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.bmp rename to install/modules/bitmaps/bkgrnd2d_conf.bmp diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.bmp b/install/modules/bitmaps/bkgrnd2d_xy_toggle.bmp similarity index 100% rename from contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.bmp rename to install/modules/bitmaps/bkgrnd2d_xy_toggle.bmp diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.bmp b/install/modules/bitmaps/bkgrnd2d_xz_toggle.bmp similarity index 100% rename from contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.bmp rename to install/modules/bitmaps/bkgrnd2d_xz_toggle.bmp diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.bmp b/install/modules/bitmaps/bkgrnd2d_yz_toggle.bmp similarity index 100% rename from contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.bmp rename to install/modules/bitmaps/bkgrnd2d_yz_toggle.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_caulk.bmp b/install/modules/bitmaps/bobtoolz_caulk.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_caulk.bmp rename to install/modules/bitmaps/bobtoolz_caulk.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_cleanup.bmp b/install/modules/bitmaps/bobtoolz_cleanup.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_cleanup.bmp rename to install/modules/bitmaps/bobtoolz_cleanup.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_dropent.bmp b/install/modules/bitmaps/bobtoolz_dropent.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_dropent.bmp rename to install/modules/bitmaps/bobtoolz_dropent.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_merge.bmp b/install/modules/bitmaps/bobtoolz_merge.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_merge.bmp rename to install/modules/bitmaps/bobtoolz_merge.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_poly.bmp b/install/modules/bitmaps/bobtoolz_poly.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_poly.bmp rename to install/modules/bitmaps/bobtoolz_poly.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_split.bmp b/install/modules/bitmaps/bobtoolz_split.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_split.bmp rename to install/modules/bitmaps/bobtoolz_split.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_trainpathplot.bmp b/install/modules/bitmaps/bobtoolz_trainpathplot.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_trainpathplot.bmp rename to install/modules/bitmaps/bobtoolz_trainpathplot.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_treeplanter.bmp b/install/modules/bitmaps/bobtoolz_treeplanter.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_treeplanter.bmp rename to install/modules/bitmaps/bobtoolz_treeplanter.bmp diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_turnedge.bmp b/install/modules/bitmaps/bobtoolz_turnedge.bmp similarity index 100% rename from contrib/bobtoolz/bitmaps/bobtoolz_turnedge.bmp rename to install/modules/bitmaps/bobtoolz_turnedge.bmp diff --git a/contrib/camera/bitmaps/camera_insp.bmp b/install/modules/bitmaps/camera_insp.bmp similarity index 100% rename from contrib/camera/bitmaps/camera_insp.bmp rename to install/modules/bitmaps/camera_insp.bmp diff --git a/plugins/model/bitmaps/model_reload_entity.bmp b/install/modules/bitmaps/model_reload_entity.bmp similarity index 100% rename from plugins/model/bitmaps/model_reload_entity.bmp rename to install/modules/bitmaps/model_reload_entity.bmp diff --git a/plugins/model/bitmaps/picomodel.bmp b/install/modules/bitmaps/picomodel.bmp similarity index 100% rename from plugins/model/bitmaps/picomodel.bmp rename to install/modules/bitmaps/picomodel.bmp diff --git a/plugins/sample/bitmaps/sample.bmp b/install/modules/bitmaps/sample.bmp similarity index 100% rename from plugins/sample/bitmaps/sample.bmp rename to install/modules/bitmaps/sample.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_actorclip.bmp b/install/modules/bitmaps/ufoai_actorclip.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_actorclip.bmp rename to install/modules/bitmaps/ufoai_actorclip.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level1.bmp b/install/modules/bitmaps/ufoai_level1.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level1.bmp rename to install/modules/bitmaps/ufoai_level1.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level2.bmp b/install/modules/bitmaps/ufoai_level2.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level2.bmp rename to install/modules/bitmaps/ufoai_level2.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level3.bmp b/install/modules/bitmaps/ufoai_level3.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level3.bmp rename to install/modules/bitmaps/ufoai_level3.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level4.bmp b/install/modules/bitmaps/ufoai_level4.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level4.bmp rename to install/modules/bitmaps/ufoai_level4.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level5.bmp b/install/modules/bitmaps/ufoai_level5.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level5.bmp rename to install/modules/bitmaps/ufoai_level5.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level6.bmp b/install/modules/bitmaps/ufoai_level6.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level6.bmp rename to install/modules/bitmaps/ufoai_level6.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level7.bmp b/install/modules/bitmaps/ufoai_level7.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level7.bmp rename to install/modules/bitmaps/ufoai_level7.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_level8.bmp b/install/modules/bitmaps/ufoai_level8.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_level8.bmp rename to install/modules/bitmaps/ufoai_level8.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_nodraw.bmp b/install/modules/bitmaps/ufoai_nodraw.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_nodraw.bmp rename to install/modules/bitmaps/ufoai_nodraw.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_stepon.bmp b/install/modules/bitmaps/ufoai_stepon.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_stepon.bmp rename to install/modules/bitmaps/ufoai_stepon.bmp diff --git a/contrib/ufoai/bitmaps/ufoai_weaponclip.bmp b/install/modules/bitmaps/ufoai_weaponclip.bmp similarity index 100% rename from contrib/ufoai/bitmaps/ufoai_weaponclip.bmp rename to install/modules/bitmaps/ufoai_weaponclip.bmp diff --git a/plugins/model/plugin.cpp b/plugins/model/plugin.cpp index add809f6..ea5ac937 100644 --- a/plugins/model/plugin.cpp +++ b/plugins/model/plugin.cpp @@ -22,143 +22,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "plugin.h" -#if 0 // stop using windowing systems in plugins - put the text in SynapseClient::GetInfo -// ============================================================================= -// Utility functions -static void dialog_button_callback (GtkWidget *widget, gpointer data) -{ - GtkWidget *parent; - int *loop, *ret; - - parent = gtk_widget_get_toplevel (widget); - loop = (int*)g_object_get_data (G_OBJECT (parent), "loop"); - ret = (int*)g_object_get_data (G_OBJECT (parent), "ret"); - - *loop = 0; - *ret = (int)data; -} - -static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data) -{ - int *loop; - - gtk_widget_hide (widget); - loop = (int*)g_object_get_data (G_OBJECT (widget), "loop"); - *loop = 0; - - return TRUE; -} - -int DoAboutBox( GtkWidget *parent ) -{ - GtkWidget *window, *w, *text, *vbox, *hbox, *hbox2, *frame; - GdkPixmap *pixmap; - GdkBitmap *mask; - GtkStyle *style; - int ret, loop = 1; - char buf[2048]; - const picoModule_t **modules, *pm; - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT (window), "delete_event", - GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); - gtk_window_set_title (GTK_WINDOW (window), "About..."); - gtk_container_border_width (GTK_CONTAINER (window), 10); - g_object_set_data (G_OBJECT (window), "loop", &loop); - g_object_set_data (G_OBJECT (window), "ret", &ret); - gtk_widget_realize (window); - - if (parent != NULL) - gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (parent)); - - vbox = gtk_vbox_new (FALSE, 10); - gtk_container_add (GTK_CONTAINER (window), vbox); - gtk_widget_show (vbox); - - style = gtk_widget_get_style(window); - - hbox2 = gtk_hbox_new (FALSE, 10); - gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 2); - gtk_widget_show (hbox2); - - frame = gtk_frame_new (NULL); - gtk_box_pack_start (GTK_BOX (hbox2), frame, FALSE, FALSE, 2); - gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); - gtk_widget_show (frame); - - if( g_FuncTable.m_pfnLoadBitmap( "picomodel.bmp", (void **)&pixmap, (void **)&mask ) ) { - w = gtk_pixmap_new (pixmap, mask); - gtk_container_add (GTK_CONTAINER (frame), w); - gtk_widget_show (w); - } - - w = gtk_label_new ("Model Module v1.0 for GtkRadiant\nby Arnout van Meer (rr2do2@splashdamage.com)\n\nBased on the MD3Model Module by SPoG\nPicoModel Library Copyright (c) 2002, Randy Reddig & seaw0lf" ); - gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2); - gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); - gtk_widget_show (w); - - w = gtk_scrolled_window_new(NULL, NULL); - gtk_box_pack_start(GTK_BOX(vbox), w, TRUE, TRUE, 2); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(w), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); - gtk_widget_show(w); - - text = gtk_text_new(NULL, NULL); - gtk_text_set_editable(GTK_TEXT(text), FALSE); - gtk_container_add(GTK_CONTAINER(w), text); - - strcpy( buf, "#Supported Model Formats:\n" ); - gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, buf, -1); - - for( modules = PicoModuleList( NULL ); *modules != NULL; modules++ ) - { - pm = *modules; - - if( pm == NULL) - break; - - sprintf( buf, "\n%s, version %s, (c) %s", pm->displayName, pm->version, pm->copyright ); - gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, buf, -1); - } - - gtk_text_set_word_wrap(GTK_TEXT(text), FALSE); - gtk_widget_show(text); - - gtk_text_set_point(GTK_TEXT(text), 0); - gtk_text_forward_delete(GTK_TEXT(text), 1); - - w = gtk_hseparator_new (); - gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2); - gtk_widget_show (w); - - hbox = gtk_hbox_new (FALSE, 10); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); - gtk_widget_show (hbox); - - w = gtk_button_new_with_label ("Ok"); - gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); - gtk_signal_connect (GTK_OBJECT (w), "clicked", - GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK)); - GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT); - gtk_widget_grab_default (w); - gtk_widget_show (w); - ret = IDOK; - - gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER); - gtk_widget_show (window); - gtk_grab_add (window); - - while (loop) - gtk_main_iteration (); - - gtk_grab_remove (window); - gtk_widget_destroy (window); - - return ret; -} -#endif - // toolbar implementation class CFlushReloadSelectedToolbarButton : public IToolbarButton @@ -300,8 +163,8 @@ void init_filetypes() // plugin implementation static const char *PLUGIN_NAME = "Model loading module"; -static const char *PLUGIN_COMMANDS = "Flush & Reload Models,Flush & Reload Selected"; -static const char *PLUGIN_ABOUT = "Model loading module"; +static const char *PLUGIN_COMMANDS = "About;-;Flush & Reload Models;Flush & Reload Selected"; +static const char *PLUGIN_ABOUT = "Model Module v1.0 for GtkRadiant\nby Arnout van Meer (rr2do2@splashdamage.com)\n\nBased on the MD3Model Module by SPoG\nPicoModel Library Copyright (c) 2002, Randy Reddig & seaw0lf"; extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget) { @@ -325,6 +188,8 @@ extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool DoFlushReloadSelected(); else if( !strcmp( p, "Flush & Reload Models" ) ) DoFlushReloadAll(); + else if( !strcmp( p, "About" ) ) + g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL); } -- 2.39.2