Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

GeanyMiniScript: make the plugin compile against GTK3 #97

Merged
merged 1 commit into from about 1 year ago

3 participants

earshinov Colomban Wendling Frank Lanitz
earshinov

No description provided.

Colomban Wendling
Owner
b4n commented March 30, 2013

Looks good.

Frank Lanitz frlan merged commit 4bec489 into from March 31, 2013
Frank Lanitz frlan closed this March 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 31, 2013
earshinov GeanyMiniScript: make the plugin compile against GTK3 a7d2fd1
This page is out of date. Refresh to see the latest.
1  build/geanyminiscript.m4
... ...
@@ -1,7 +1,6 @@
1 1
 AC_DEFUN([GP_CHECK_GEANYMINISCRIPT],
2 2
 [
3 3
     GP_ARG_DISABLE([GeanyMiniScript], [auto])
4  
-    GP_CHECK_PLUGIN_GTK2_ONLY([GeanyMiniScript])
5 4
     GP_COMMIT_PLUGIN_STATUS([GeanyMiniScript])
6 5
     AC_CONFIG_FILES([
7 6
         geanyminiscript/Makefile
41  geanyminiscript/src/gms_gui.c
@@ -56,7 +56,7 @@
56 56
 #include    "gms_debug.h"
57 57
 #include    "gms.h"
58 58
 #include    "gms_gui.h"
59  
-  
  59
+
60 60
 /*
61 61
  * *****************************************************************************
62 62
  *  Local Macro and new local type definition
@@ -82,7 +82,6 @@ typedef struct {
82 82
     GtkWidget   *rb_ndoc      ; /*!< radio button : the filter output is in the current document */
83 83
 
84 84
     GtkWidget   *e_script[GMS_NB_TYPE_SCRIPT] ; /*!< entry for script configuration */
85  
-    GtkTooltips *tips         ; /*!< tips of button of the top bar */
86 85
     PangoFontDescription *fontdesc;
87 86
 } gms_gui_t  ;
88 87
 
@@ -200,7 +199,7 @@ static void save_prefs_file(
200 199
 
201 200
     if ( g_file_test( this->config_dir, G_FILE_TEST_EXISTS ) != TRUE )
202 201
         g_mkdir( this->config_dir, 0755 ) ;
203  
-		
  202
+
204 203
     if ( g_file_test( gms_pref->str, G_FILE_TEST_EXISTS ) != TRUE )
205 204
         g_mkdir( gms_pref->str, 0755 ) ;
206 205
 
@@ -250,7 +249,7 @@ static void gms_cb_load(
250 249
 {
251 250
     gms_private_t *this = GMS_PRIVATE(data) ;
252 251
     GtkWidget    *p_dialog ;
253  
-    
  252
+
254 253
     p_dialog = gtk_file_chooser_dialog_new (_("Load Mini-Script File"),
255 254
                                     GTK_WINDOW(this->mw) ,
256 255
                                     GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -307,7 +306,7 @@ static void gms_cb_save(
307 306
 {
308 307
     gms_private_t *this = GMS_PRIVATE(data) ;
309 308
     GtkWidget    *p_dialog ;
310  
-    
  309
+
311 310
     p_dialog = gtk_file_chooser_dialog_new (_("Save Mini-Script File"),
312 311
                                     GTK_WINDOW(this->mw) ,
313 312
                                     GTK_FILE_CHOOSER_ACTION_SAVE,
@@ -355,7 +354,7 @@ static void gms_cb_info(
355 354
                                 GTK_BUTTONS_CLOSE,
356 355
                                 NULL);
357 356
     gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dlg), _(geany_info));
358  
-                                
  357
+
359 358
     gtk_dialog_run(GTK_DIALOG(dlg));
360 359
     GMS_FREE_WIDGET(dlg);
361 360
 }
@@ -424,7 +423,7 @@ gms_handle_t gms_new(
424 423
                         GTK_STOCK_EXECUTE,GTK_RESPONSE_APPLY,
425 424
                         NULL
426 425
                          ) ;
427  
-        vb_dlg   = GTK_BOX (GTK_DIALOG(this->w.dlg)->vbox)  ;
  426
+        vb_dlg   = GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(this->w.dlg)))  ;
428 427
 
429 428
         if ( width > 800 )
430 429
             width = 800 ;
@@ -434,9 +433,7 @@ gms_handle_t gms_new(
434 433
 
435 434
         gtk_window_set_default_size( GTK_WINDOW(this->w.dlg) , width/2 , height/2 ) ;
436 435
 
437  
- 
438  
-        this->w.tips = gtk_tooltips_new ();
439  
-        
  436
+
440 437
      /* Hbox : type de script */
441 438
         hb_st = gtk_hbox_new (FALSE, 0);
442 439
         gtk_container_set_border_width (GTK_CONTAINER (hb_st), 0);
@@ -445,30 +442,30 @@ gms_handle_t gms_new(
445 442
         b_new   = new_button_from_stock( mode_txt_icon, GTK_STOCK_CLEAR  ) ;
446 443
         gtk_box_pack_start( GTK_BOX (hb_st), b_new, FALSE, FALSE, 0);
447 444
         g_signal_connect (G_OBJECT (b_new), "clicked",G_CALLBACK (gms_cb_new), (gpointer) this );
448  
-        gtk_tooltips_set_tip (GTK_TOOLTIPS (this->w.tips), b_new, _("Clear the mini-script window") , "");
  445
+        gtk_widget_set_tooltip_text(b_new, _("Clear the mini-script window"));
449 446
 
450 447
         b_open   = new_button_from_stock( mode_txt_icon, GTK_STOCK_OPEN  ) ;
451 448
         gtk_box_pack_start( GTK_BOX (hb_st), b_open, FALSE, FALSE, 0);
452 449
         g_signal_connect (G_OBJECT (b_open), "clicked",G_CALLBACK (gms_cb_load), (gpointer) this );
453  
-        gtk_tooltips_set_tip (GTK_TOOLTIPS (this->w.tips), b_open, _("Load a mini-script into this window"), "");
  450
+        gtk_widget_set_tooltip_text(b_open, _("Load a mini-script into this window"));
454 451
 
455 452
         b_save   = new_button_from_stock( mode_txt_icon, GTK_STOCK_SAVE_AS  ) ;
456 453
         gtk_box_pack_start( GTK_BOX (hb_st),b_save, FALSE, FALSE, 0);
457 454
         g_signal_connect (G_OBJECT (b_save), "clicked",G_CALLBACK (gms_cb_save), (gpointer) this );
458  
-        gtk_tooltips_set_tip (GTK_TOOLTIPS (this->w.tips), b_save, _("Save the mini-script into a file"), "");
  455
+        gtk_widget_set_tooltip_text(b_save, _("Save the mini-script into a file"));
459 456
 
460 457
         b_info   = new_button_from_stock( mode_txt_icon, GTK_STOCK_INFO  ) ;
461 458
         gtk_box_pack_end( GTK_BOX (hb_st), b_info, FALSE, FALSE, 0);
462 459
         g_signal_connect (G_OBJECT (b_info), "clicked",G_CALLBACK (gms_cb_info), (gpointer) this );
463  
-        gtk_tooltips_set_tip (GTK_TOOLTIPS (this->w.tips), b_info, _("Display a information about the mini-script plugin"), "");
  460
+        gtk_widget_set_tooltip_text(b_info, _("Display a information about the mini-script plugin"));
464 461
 
465  
-        this->w.cb_st = gtk_combo_box_new_text() ;
  462
+        this->w.cb_st = gtk_combo_box_text_new() ;
466 463
         for ( i=0;i<GMS_NB_TYPE_SCRIPT ; i++ )
467  
-           gtk_combo_box_append_text( GTK_COMBO_BOX(this->w.cb_st), label_script_cmd[i] ) ;
468  
-        gtk_combo_box_set_active(GTK_COMBO_BOX(this->w.cb_st), 0 );
  464
+           gtk_combo_box_text_append_text( GTK_COMBO_BOX_TEXT(this->w.cb_st), label_script_cmd[i] ) ;
  465
+        gtk_combo_box_set_active(GTK_COMBO_BOX(this->w.cb_st), 0);
469 466
         gtk_box_pack_start(GTK_BOX(hb_st), this->w.cb_st, FALSE, FALSE, 0);
470  
-        GTK_WIDGET_SET_FLAGS (this->w.cb_st, GTK_CAN_DEFAULT);
471  
-        gtk_tooltips_set_tip (GTK_TOOLTIPS (this->w.tips), this->w.cb_st, _("select the mini-script type"), "");
  467
+        gtk_widget_set_can_default(this->w.cb_st, TRUE);
  468
+        gtk_widget_set_tooltip_text(this->w.cb_st, _("select the mini-script type"));
472 469
 
473 470
     /* Scroll Box : script */
474 471
         sb_script =  gtk_scrolled_window_new (NULL,NULL);
@@ -501,7 +498,7 @@ gms_handle_t gms_new(
501 498
      *                   selection/current document/all documents of the current session */
502 499
         f_rbi = gtk_frame_new (_("filter input") );
503 500
         gtk_box_pack_start( GTK_BOX (hb_rb), f_rbi, FALSE, FALSE, 0);
504  
-        gtk_tooltips_set_tip (GTK_TOOLTIPS (this->w.tips), f_rbi, _("select the input of mini-script filter"), "");
  501
+        gtk_widget_set_tooltip_text(f_rbi, _("select the input of mini-script filter"));
505 502
 
506 503
         hb_rbi = gtk_hbox_new (FALSE, 0);
507 504
         gtk_container_set_border_width (GTK_CONTAINER (hb_rbi), 0);
@@ -520,7 +517,7 @@ gms_handle_t gms_new(
520 517
      *                   current document/ or new document */
521 518
         f_rbo = gtk_frame_new (_("filter output") );
522 519
         gtk_box_pack_start( GTK_BOX(hb_rb), f_rbo, FALSE, FALSE, 0);
523  
-        gtk_tooltips_set_tip (GTK_TOOLTIPS (this->w.tips), f_rbo, _("select the output of mini-script filter"), "");
  520
+        gtk_widget_set_tooltip_text(f_rbo, _("select the output of mini-script filter"));
524 521
 
525 522
         hb_rbo = gtk_hbox_new (FALSE, 0);
526 523
         gtk_container_set_border_width (GTK_CONTAINER(hb_rbo), 0);
@@ -588,7 +585,7 @@ void gms_delete(
588 585
 
589 586
         for ( i=0;i<GMS_NB_TYPE_SCRIPT ; i++ )
590 587
             g_string_free(this->script_cmd[i] ,flag) ;
591  
-        
  588
+
592 589
         GMS_G_FREE( this )  ;
593 590
     }
594 591
 }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.